3 ms·
> > • It’s highly instructive, in a way that using a parser generator is not. Top-down parsers are nice, but even better would be not to have to write them eac
by avmich 6y ago
> > • It’s highly instructive, in a way that using a parser generator is not.
Top-down parsers are nice, but even better would be not to have to write them each time you need to parse something. Also top-down parsers don't handle (well) some of useful grammar constructs, and it's tedious to remember always formulate grammars in a certain way. Next, grammars are for many people more convenient to work with than actual parser code. So parser generators have their place.
> To quote Feynman: “What I cannot create, I do not understand”
And this can be true for parser generators. After you've figured how to do that you could be tempted to never use external tools, and have a nice jump from, say, arbitrary CFG to a generalized LR, while controlling all the parts in between.
> • It’s not actually difficult!