2 ms·
How often are yacc/lex grammars actually portable? Truly portable too — usable in different threading contexts, for example. You say they are declarative. My e
by wwright 8y ago
How often are yacc/lex grammars actually portable? Truly portable too — usable in different threading contexts, for example.
You say they are declarative. My experience is admittedly very limited, but I would call them anything but declarative. There are declarative elements, but the actual payload of your code is very, very often imperative. (A lot of this is shaped by the API, imo).
I compare this to parser combinators (like parsec) and PEGs (like luapeg and rust-peg). I find these other options are more naturally side-effect free, both internally and externally.