I'm trying to generate three address instructions for some VERY simple C programs, however, I'm having a bit of trouble understanding all this. Googling this stuff I found a bunch of presentations using attributes of non-terminals, such as place and code. I don't really see the need for this. Isn't it enough to traverse the parse tree and generate the code from that?
Also, one more thing, why would I need symbol tables? Isn't it enough to just have a quadruple for each statement?
Thank you very much