2 Apr
2020
2 Apr
'20
7:35 p.m.
On 3/04/20 2:13 pm, Victor Stinner wrote:
"Unlike LL(1) parsers PEG-based parsers cannot be ambiguous: if a string parses, it has exactly one valid parse tree. This means that a PEG-based parser cannot suffer from the ambiguity problems described in the previous section."
That paragraph seems rather confused. I think what it *might* be trying to say is that a PEG parser allows you to write productions with overlapping first sets (which would be "ambiguous" for an LL parser), but still somehow guarantees that a unique parse tree is produced. The latter suggests that the grammar as a whole still needs to be unambiguous. -- Greg