Conversation

when we talk about an operator's precedence in terms of "how strongly it binds", is the metaphor here that the operators are glue between the operands, and that a parser breaks apart the weakest links first?
7
13
I always imagined the binding strength as meaningful, elastic whitespace. Operators that bind more tightly pull their operands in together, like this: a + b ^ c * d a + b^c * d
3
6
I've wished in the past for whitespace-based associativity. It seems to me that 1+2 * 3 should parse as (1 + 2) * 3 and 1 + 2*3 should parse as 1 + (2 * 3)
10
3