On Fri, Sep 16, 2016 at 4:13 PM adonovan via golang-nuts <
golang-nuts@googlegroups.com> wrote:

> The grammar is indeed ambiguous, but the ambiguity is (implicitly)
resolved by favoring the leftmost derivation, which is what you get from an
LL(k) parser. By the same token (hah!), the grammar expresses that unary
operations have higher precedence than binary ones. For example, -x + y is
parsed as (-x)+y, not -(x+y). If you want a derivation other than the
leftmost one, you need to use parentheses.

Thank you as well. This information is valuable for fixing the issue.



You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to