Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.compilers    |    Compiler construction, theory, etc. (Mod    |    2,753 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 2,382 of 2,753    |
|    Anton Ertl to Kaz Kylheku    |
|    Re: precedences vs. hierarchy    |
|    08 Jun 16 09:48:49    |
      From: anton@mips.complang.tuwien.ac.at              Kaz Kylheku <545-066-4921@kylheku.com> writes:       >You need the concept of associativity to tell whether       >A + B + C is (A + B) + C or A + (B + C).              But if + is really associative (e.g., not FP addition), these two are       equivalent.              >In table shift-reduce parsers (Yacc, and such), associativity rules       >resolve conflicts.              Of course, you can also write the grammar in an unambiguous way, then       you don't need associativity rules to resolve the ambiguity; a       disadvantage of precedence and associativity declarations is that they       can hide more ambiguities than you intended.              - anton       --       M. Anton Ertl       anton@mips.complang.tuwien.ac.at       http://www.complang.tuwien.ac.at/anton/              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca