Reputation: 63
I am trying to build a translator using ANTLR 4 and Java, so far I am done with the grammar and the Parse tree generation. I used ArrayLists with the ANTLR Listener to read each node from the Parse Tree.
My problem is that, I don't know what is the sequence to generate the target language.
Could any one please, provide me with step-by-step guidance to generate the target language, or any source code the shows these steps.
Thank you,
Upvotes: 0
Views: 422
Reputation: 63
Language Implementation Patterns book provides step-by-step guidance to code generation techniques under ANTLR 4 and sample code in Java.
Upvotes: 1