cenotelie / hime

Apache License 2.0
27 stars 4 forks source link

Duplicated nullable variables in RNGLR parsing #21

Closed woutersl closed 9 years ago

woutersl commented 9 years ago

Original report by Laurent Wouters (Bitbucket: 557058:675792b6-d731-4823-9f7d-c6dfcb2df2b5, ).


In some cases, nullable varialbes get duplicated in the output AST with the RNGLR parsing method.

Test case:

grammar Test
{
    options
    {
        Axiom = "unit";
    }
    terminals
    { }
    rules
    {
        unit -> 'X' nullable ;
        nullable -> ;
    }
}

The expected AST is unit(X nullable).

The produced (incorrect) AST is unit(X nullable nullable).

woutersl commented 9 years ago

Original comment by Laurent Wouters (Bitbucket: 557058:675792b6-d731-4823-9f7d-c6dfcb2df2b5, ).


Verified with the use case.

woutersl commented 9 years ago

Original comment by Laurent Wouters (Bitbucket: 557058:675792b6-d731-4823-9f7d-c6dfcb2df2b5, ).


[fix] Fixed issue #21 with duplicated nullable variables in RNGLR parsers

woutersl commented 9 years ago

Original comment by Laurent Wouters (Bitbucket: 557058:675792b6-d731-4823-9f7d-c6dfcb2df2b5, ).


[fix] Fixed issue #21 with duplicated nullable variables in RNGLR parsers