For my GameVM project I'm using ANTLR v4 to create multiple compiler frontends. Generating the lexer and parser for each language saved me a ton of work (especially since I have no background in compiler writing), but I'm getting bogged down on implementing ASTs for each language.
The AST is just the next step. I'm planning on supporting at least 10 different languages that will be transformed to a yet to be decided IR.
Maybe there's no way to transform a parse tree to an AST but by implementing the node types one at a time and writing visitor functions to do the translation but I can't help but feel there's an easier way to do this.
Any ideas or help would be appreciated