I'm working on a compiler. The textbooks I have say to output a 3-address intermediate code. This can be translated into the target language of choice.
I don't have a problem with the bulk of the source being translated to 3-addr code. But for the data-rich symbol table, this is awkward.
Is the exclusive use of 3-addr code old, obsolete advice? My compiler is multi-pass compiler. I'm working pretty hard to build a symbol table in my first pass, and I'm pretty much having to reconstruct it in 3-address code for the next pass. This seems like make-work to me when I could create from my symbol table XML or JSON. I could write that to the intermediate file instead.
How should I represent my symbol table in the intermediate code?