-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
It's tedious to parse expressions without associativity attributes.
Left associative = reduce in a shift/reduce conflict
Right associative = shift in a shift/reduce conflict
I don't like ocamlyacc/menhir/happy style associativity lines before non-terminals/productions. I think we should probably use Rust attribute syntax and annotate productions with the associativity attributes. Examples:
#[assoc(left)]
<e1:Expr> "+" <e2:Expr> => ...
#[assoc(right)]
<e1:Expr> "?" <e2:Expr> ":" <e3:Expr> => ...Metadata
Metadata
Assignees
Labels
No labels