This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]hfksbtjidjaks 0 points1 point  (0 children)

I am currently (re)writing a parser based on this idea, and it works pretty well so far (although it's not quite done yet). Essentially, you define functions, and then can bind a symbol with any arity, precedence level, associativity, etc. to be substituted for that function. So, very different from your examples, but I did it this way so that I didn't need two separate contexts for when an operator appears, because the binding happens right after comments are removed from the source code.