4 ms·
Does it use a generator to generate lexer and parser or author is suggesting to write them manually?
by SneakerXZ 13y ago
Does it use a generator to generate lexer and parser or author is suggesting to write them manually?
- mcmillhj 13y agoI imagine if the goal is to design from the ground up, you wouldn't be using a generator.
- orangeduck 13y agoAuthor here. A parser combinator library is used to do the parsing.
- SneakerXZ 13y agoToo bad, always everyone who teaches how to write a programming language uses generators but actual production programming languages never use them. Except of a few langugages. I wonder why...
- kevinnk 13y agoIt's hard to generate high quality error messages with current generators unfortunately. More common nowadays is building first with a generator and switching to recursive decent when it becomes too unwieldy.
- hamburglar 13y agoMy one criticism is that it's a fairly big leap from learning C from ground zero to being a client of a complex, high-level library like mpc. I feel like the moment you hit the call to mpca_lang, anyone who really was learning C at the beginning shifted from "learning C" mode to "copy and paste C code I don't understand" mode.