New AST

These pages are for exploring ideas and designing a new AST and/or "Intermediate Representation" tree for further semantic analysis of 4GL/ABL source code.

The output of Proparse and ProRefactor will be used to generate an IR tree which is more appropriate for control flow, data flow, and other kinds of analysis.

Proparse creates a syntax tree which is great for lint, code documentation, and search-and-replace tasks. It is also very usable for resolving symbols and determining scopes - which is exactly what ProRefactor does.

It is common in compilers to find the use of an Intermediate Representation (IR), which is part way between parsing and generating target code (machine code, byte code, etc). Before the target code is written, the IR undergoes a series of "semantic preserving" transformations, such as constant propagation, dead code removal, and other optimizations.

Many of these optimizations on the IR require control flow and data flow analysis to be performed. These are the things that we are interested in.

This topic belongs to the Codeparse group, and we will use its forum/mailing-list for discussions.