Re:A meta approach to implementing programming languages (2018)
by mhh__ on Sunday February 24, 2019 @01:11PM
(#19239721)
Error messages are a much more important reason to use a hand written parser/lexer: Unless you basically write your own parser generator, it'll never be as direct or fluent as a hand written parser
[ Parent
| on HN ]
Re:A meta approach to implementing programming languages (2018)
by zzzcpan on Sunday February 24, 2019 @01:37PM
(#19239848)
I'm not sure what you are confusing higher order parsers with, but there is absolute no problem with providing a couple of higher order abstractions for error messages. In fact, error messages are much easier to produce that way, than manually.
Re:A meta approach to implementing programming languages (2018)
by mhh__ on Sunday February 24, 2019 @05:38PM
(#19241092)
Are they? I'll be upfront in saying I've never done any actual work with parser combinators (I played with Parsec for about 15 minutes on the train), but I don't see how having direct control is worse. Easier, it may be, but I can only imagine real world situations harder when you get to the nasty stuff in your implementation (e.g. C++ templates basically need to be "run" while being parsed, or lexed even)