AzureMarker / intellij-lalrpop

Jetbrains plugin for the LALRPOP parser-generator
MIT License
16 stars 2 forks source link

Other bugs in the grammar #8

Closed dnbln closed 3 years ago

dnbln commented 3 years ago

I tried importing gluon's lalrpop grammar and found out that:

  1. '_ is not recognized as a lifetime ({Id} doesn't match _)
  2. The where element, even though it is defined, it is never matched in the lexer.
  3. The forall rule doesn't match nothing(it always expects a for in the grammar_where_clause rule). This can be fixed with:
    - forall ::= FOR LESSTHAN <<comma type_param>> GREATERTHAN |
    + forall ::= (FOR LESSTHAN <<comma type_param>> GREATERTHAN)?

    Or

    - forall ::= FOR LESSTHAN <<comma type_param>> GREATERTHAN |
    + forall ::= FOR LESSTHAN <<comma type_param>> GREATERTHAN | ()
AzureMarker commented 3 years ago

Thanks! If you want, feel free to open an PR, otherwise I'll work on this when I get a chance.

Edit: looks like you're working on this in #9.