(f)lex can you have multiple expressions in one state? -


is possible have multiple expression in 1 state similar? hoping group few expressions make life easy myself. want similar below not working , recognise 1st expr , although match expr doesnt save array using yytext. im guessing im doing wrong appreciated.thanks

<some_state>"milk;" | "honey;"    | "cinnamon;" | "cardamon;" | "rum;"      | "brandy;"   | "whiskey;"  | "aquavit;"  | "kahula;"   { printf("example"); array[i].addition = yytext;begin(amount_state);} 

if flex allowed, can use start condition scope following:

<some_state>{ "milk;"         | "honey;"        | ...             | "kahula;"       { printf("example"); ... } } 

if at&t lex allowed, unfortunately may invalid...


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -