Haskell00
Haskell00

Reputation: 63

ANTLR 4 target language generation

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

Answers (1)

Haskell00
Haskell00

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

Related Questions