3 ms·
Theorem 6.8.2 in the PDF: It is undecidable whether a context-free grammar is ambiguous. PEGs are unambiguous by construction, so I assumed we were talking abo
by panic 9y ago
Theorem 6.8.2 in the PDF: It is undecidable whether a context-free grammar is ambiguous.
PEGs are unambiguous by construction, so I assumed we were talking about grammars which would be ambiguous as CFGs (replacing every ordered choice with a nondeterministic choice). What kind of ambiguity were you thinking about?
- zzzcpan 9y agoAny ambiguity that manifests itself as unreachable alternatives in PEGs can be detected for example. Doesn't matter if it's undecidable whether the whole grammar is ambiguous.