In ocamllex, I can use _ as a lexer rule to match any string that does not match previously defined rules, and raise errors. How can achieve this in lex/flex?
Typically, you would define a rule like this, which would go at the very end:
.|\n { /* process default here */ }
This rule will match any character that wasn't matched by any other rule.
Hope this helps!
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more