#2388: piraha fails to detect if the same grammar item is specified more than once
Reporter:Roland Haas
Status:new
Milestone:
Version:
Type:bug
Priority:minor
Component:Cactus

Piraha fails to detect if a peg contains multiple definitions for the same item and overwrites the earlier definitions with the later. Eg this is accepted:

    40  options = (?i:options?) : {vname}( , {vname}|[ \t]{vname})*
    41  storage = (?i:storage) : {vname}( , {vname}|[ \t]{vname})*
    42  triggers = (?i:triggers?) : {vname}( , {vname}|[ \t]{vname})*
[...]
    67    )
    68  storage = (?i:storage: {vname}( , {vname}|([ \t]|\\\r?\n)+{vname})* )
    69  block = \{ (({statement}|{block}) )* \} | {statement}

even though both lines 41 and 68 define storage.

--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2388/piraha-fails-to-detect-if-the-same-grammar