Ad
  • Custom User Avatar

    I hit that mine too with my first implementation of pass1(), and was a little frustrated that the tree wasn't accepted and I had to refactor.

    That said, and to be fair, the grammar for expression and term does define the order the tree should be built in, altough it could be a nice gesture to explicitly state the associativity in the description too.

  • Custom User Avatar

    But your tree does not seem to conform to the associativity described with the grammar syntax? The grammar does not allow for expression on the right.