Closed purpleidea closed 6 years ago
https://westes.github.io/flex/manual/Matching.html#Matching
Flex, which inspired nex, gives unmatched characters a default "ECHO" action, which means they get printed to standard output. Should I make nex do this too?
That's a good question, and I'm not sufficiently enough of an expert to know what the right decision is. My only guess is that it would be less useful to print to stdout because putting stuff on the terminal of the calling program wouldn't be great. If anything it should be optional.
At least for now, I've dealt with the ERROR case, and it's not the worst thing in the world for me. I'm not blocked on this, so I guess I can close it.
hey there,
playing with nex, and using the below... The problem is I had to add an
ERROR
identifier to match anything not previously caught since otherwise random typos in the lexed code are skipped silently. Any advice on how to improve this?Thanks!