Get groups with flex?
Heres an example rule for oct values. Instead of using YYTEXT i'd like to get the value, letter and the # at end (8,...64). How might i get them? I guessed printf("%s", $1) to see if i'd get the value but lex gave me a comp开发者_JAVA技巧ile error instead
0([0-7]+)(([us])(8|16|32|64))?
Also it appears "group" isn't in the manual.
There are no capturing groups in flex.
I think this would best be represented as several states, with separate matching rules and state transitions.
精彩评论