Fix the parser

If you clean and rebuild the program, you will notice a brief warning pass by. It says:

shift/reduce conflicts: 4

Later in the semester, we will learn why they are called “shift/reduce” conflicts. For now, we just need to know that they indicate ambiguities.

This warning indicates ambiguities in the parser.

Similarly, if we run the tests, we will learn that the parser is not implementing precedence and associativity correctly.

TODO

  • Edit the parser to fix the bugs. This documentation will be helpful.
  • Rebuild the executable, and make sure the output does not mention any conflicts.
  • Rerun the tests, to make sure they pass.