(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
Post a Comment