4 ms·
Is there any grammar for a modern language that is context sensitive and expresses the constraints better than a context free grammar? It’s true almost no usab
by beagle3 7y ago
Is there any grammar for a modern language that is context sensitive and expresses the constraints better than a context free grammar?
It’s true almost no usable language is really CF, but a CF grammar with a few semantic patches still seems to be the better way to describe them.
It’s been a while since I needed to parse a grammar, but if I had to I’d probably use re2c+lemon, Ometa/ohm, or a hand-rolled Pratt parser. (Or an Earley parser if the grammar was ambiguous and it made sense)