Re:Parsing with Haskell
by simonmic on Monday July 11, 2022 @01:21AM
(#32052517)
Agreed, and I would state it more strongly: it's unclear how / significant extra work to provide good error messages if you have a separate lexer stage. And sooner or later you will want good error messages.
1. You might not know a priori that the lexical analysis can be done without any knowledge of the surrounding grammatical context.
2. You may be able to give more informative error messages if you know the grammatical context.