开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜