Repository navigation
Workflow
Here is how to work together to grow GOOL.
The package gool.recognizer.xxx defines a visitor, which travels the xxx input (abstract), and produces its GOOL representation (abstract).
The package gool.xxx tells the user of the GOOL system which are the primitives that are recognized. They must be kept up-to-date.
The package gool.generator.yyy defines a visitor, which travels the GOOL representation (abstract), and produces the yyy output (concrete).
In order to add an xxx input language, you need a parser that takes concrete input language into abstract input langue. The place to do this is gool.parser.xxx.
You need to define a visitor, which travels the xxx input (abstract), and produces its GOOL representation (abstract). The place to do this is gool.recognizer.xxx.
You need to define a xxx input directory in gool.properties.
In order to add a yyy output language, you need a visitor, which travels the GOOL representation (abstract), and produces the yyy output (concrete). The place to do this is gool.generator.yyy
You also need to define a helper for executing the yyy output concrete code. For some languages, such as Java or C++, the output concrete needs to be compiled by the native yyy compiler first. The place to do all this is gool.executor.yyy.
You need to define a yyy output directory and some yyy execution commands in gool.properties.
The GOOL intermediate language is the bridge between the input language and the output language. To have more things usefully translated through that bridge, one may need to enlarge the bridge. This means extending the GOOL abstract language defined as an Abstract Syntax Tree in gool.ast.