|
|
|
|
|
by nvoorhies
5724 days ago
|
|
Most sane programming language syntaxes are confined to a subset of CFGs, usually LALR, which is nice and easy to generate fast parsers for. To parse any CFG you have to fall back to strategies like CKY that have worst case behaviors that are way worse than linear, like CKY or GLR or what have you. But yeah, context sensitive stuff can be way worse. Unless new evidence has surfaced in the years since I finished a degree in linguistics, there's only a couple of pieces of evidence for language constructions in natural languages that can't be generated by a context free grammar, like a Adv1Adv2Adv3Adj1Adj2Adj3 construction in Zürich dialectical German (where Adv = adverb and Adj=adjective, and numbers represent which adverb modifies which adjective). |
|