lace-language / lace

4 stars 0 forks source link

Evaluate precedence parsing techniques #24

Closed tertsdiepraam closed 1 year ago

tertsdiepraam commented 1 year ago

There's 3 possible relevant options for precedence parsing (afaik):

Not very high priority, but we could evaluate these a bit and settle on one of these techniques.

bal-e commented 1 year ago

Arguments against the current recursive descent approach:

While my approach looks more complex than recursive descent, it is doing a lot more work, it allows us to add new operators easily, and we can experiment with interesting parsing semantics. It is a lot easier to reason about the precedences of operators (just check Prec), and it will better support us in adding to the compiler over time.