I had a really hard time understanding the provided code. The bison tutorial is not much of a help because it barely provides explanations.
Then I sat down and tried to read into the bison manual and tried to understand what happens.
So this is the outcome of me commenting on everything I did not understand. I would appreciate if you could read through it and tell my if I made any mistakes/ misunderstood some things.