The result of a parsing process is often a Syntax Tree (ST). This is a tree, that represents the syntactic information extracted from the input during the parsing process.

Tunnel Grammar Studio generates Parsing Machines (PM) from Augmented Backus-Naur form grammars to a source code. The PM implements the visitor pattern for the ST construction. One way to use the PM is to inherit the visitor interface and at runtime to construct a custom ST. The second way is to generate an abstract or a concrete syntax tree architect - an object that will construct automatically the ST as instances of object oriented classes. After the ST is complete, the client code can use it and free it on demand. The automatically generated ST are supporting iterative and recursive iterations, to string conversions and destructors.

The client may use the trees directly or write a code (glue code), that connects the automatically generated ST structures with the actual client program. This level of abstraction brings a lot of benefits in the development process, because changes to the language grammar may require only changes to the glue code, not to the whole client program.

For more information: Tunnel Grammar Studio
At 2019 Nov 17, 16:48 GMT in news channel Versions