Flex default rule

后端 未结 3 1346
渐次进展
渐次进展 2021-01-06 11:19

How do I customize the default action for flex. I found something like <*> but when I run it it says \"flex scanner jammed\"? Also the . rule only adds a rule so it does

3条回答
  •  执笔经年
    2021-01-06 12:01

    There's no such thing. This sounds suspiciously like an XY problem—you've asked us how to customise flex's default action (Y), but you're really wanting it to achieve some other end, X.

    What's X?

    Re: your question, why does adding "." not do the trick? You can't perform an action in the absence of a matched amount, so the question as asked may make no sense. flex won't do anything if there is no match, so to add a "default" rule, just make it match something.

提交回复
热议问题