piraha fails to detect if the same grammar item is specified more than once

Issue #2388 resolved
Roland Haas created an issue

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.

Comments (1)

  1. Log in to comment