Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 ocamllex 中,我可以_用作词法分析器规则来匹配任何与先前定义的规则不匹配的字符串,并引发错误。如何在 lex/flex 中实现这一点?
_
通常,您会定义这样的规则,该规则将在最后执行:
.|\n { /* process default here */ }
此规则将匹配任何其他规则不匹配的任何字符。
希望这可以帮助!