News for hackers. Stuff that matters.
Re:Challenging LR Parsing by jcranmer on Wednesday September 16, 2020 @12:08PM (#24493995)
Because parsing "a += b * c" as "(a += b) * c" is a wonderful, intuitive program.

(This does assume that op= is an expression in your language.)

Re:Challenging LR Parsing by sreekotay on Wednesday September 16, 2020 @02:37PM (#24495863)
Edit: Realized what I was tring to say: Intuitive might be the wrong thing to chase.

Intuitive to who? :) Trivial programs are trivial. We might be stuck in the BCPL derived syntax that trade a false notion of intuitive for complexity of implentation and maintenance. (And I do mean might --- it's not hard not to think incrementally from the languages we know) --- but "inituitive" is EXACTLY the problem: I guess I was arguing we might consider searching for simple and predictable (even if that comes at the cost of slightly higher initial learning?)

Re:Challenging LR Parsing by sreekotay on Wednesday September 16, 2020 @06:05PM (#24498533)
e.g. maybe write it as "b * c += a" ? ... lol full on LR - no ambiguiity.
Re:Challenging LR Parsing by phkahler on Wednesday September 16, 2020 @12:46PM (#24494438)
Including precedence rules will take care of that.
Re:Challenging LR Parsing by masklinn on Wednesday September 16, 2020 @01:19PM (#24494841)
That… would be jcranmer's point, they're replying to a toplevel comment advocating for not having precedence.