janconway wrote:
Hey, kinda bit lost with the lab assignment in college. any tips would be really appreciated.
basically we were given a flex file and we've to modify it to see if a string is a keyword or identifier within C itself. Just a bit lost as to where to start.
do i initialise a linked list to compare the two arrays or what?
If it is just a C programming assignment(no knowlegdge of compilers,
parsers etc. is assumed), you can take a two dimensional array
containing all the keywords,identifiers etc
key[][] = { "int","float",etc etc}
and compare with strcmp(input,key[i]) for all i. This was how I did MY
assignment :)
regards,
GVK
--
Happy Hacking!!!