I'm writing a small program in Flex/Bison to tokenize/parse a query language I created. I was wondering if there is any way to create any keywords in Flex/Bison.
What I mean is: flex breaks down input into a list of tokens but is there a way to create a list of keywords, so that everytime flex sees on of them it will return the word "keyword".
or following is the only way to do this:
"dog"|"cat" return KEYWORD;
Is there any data-structure that flex/bison can use, so that everytime it sees a member of that data-structure, it will recognize it as a keyword?
Thanks, Sarah
"dog"|"cat" return KEYWORD;
– fjardon