Code Generators - Java
Code generation is the process by which a compiler converts a syntactically-correct program into a series of instructions that could be executed by a machine. The input to the code generation stage typically consists of a parse tree, abstract syntax tree, or intermediate language code; the target machine may be a physical machine such as a microprocessor, or an abstract machine such as a virtual machine or an intermediate language.
From : en.wikipedia.org/wiki/Code_generator
JTB
JTB is a syntax tree builder to be used with the Java Compiler Compiler (JavaCC) parser generator. It takes a plain JavaCC grammar file as input and automatically generates the following:
A set of syntax tree classes based on the productions in the grammar, utilizing the Visitor design pattern.
Two interfaces: Visitor and GJVisitor. Two depth-first visitors: DepthFirstVisitor and GJDepthFirst, whose default methods simply visit the children of the current node.
A JavaCC grammar jtb.out.jj with the proper annotations to build the syntax tree during parsing.
visit
JTB
JTB was visited : 104 times
Loading .....