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?
Conversation
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 have seen people using variable amount of empty lines (=white space) to group/partition longer code files
1
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
2
3
I'm pretty sure Fortress had this!



