AzureMarker / intellij-lalrpop

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

Plugin doesn't support cascading precedence annotations #57

Open TheOnlyTails opened 5 months ago

TheOnlyTails commented 5 months ago

LALRPOP recently added support for cascading precedence annotations, which apply to all alternatives below them until the next annotation/end of the rule, as so:

Expr: Expr = {
    #[precedence(level="1")]
    <Number> => ...
    "-" <Expr> => ...

    #[precedence(level="2", assoc="left")]
    <left: Expr> "*" <right: Expr> => ...,
    <left: Expr> "/" <right: Expr> => ..., 

    #[precedence(level="3", assoc="left")]
    <left: Expr> "+" <right: Expr> => ...
    <left: Expr> "-" <right: Expr> => ...,
};

However, this plugin doesn't support this, and requires an annotation on every alternative.