GOLD (parser)

The GOLD Parsing System ( Grammar Oriented Language Developer) is a free software ( under zlib license) for creating parsers and interpreters for formal languages ​​, such as scripting languages. The parser uses the LALR principle. Defining the syntax of the programming language, a grammar is stored in Backus -Naur Form.

The software consists of the following components:

  • The builder is used to translate a written in the so-called GOLD metalanguage Formal Grammar in the parse tables. The builder is part of an integrated development environment that includes a generator for program skeletons and an interactive test environment for grammars.
  • The translated grammar is provided by the builder as a file.
  • The engine converts the text to be parsed based on the parse tables in machine. There are engines for different target platforms and programming languages ​​. ( Sometimes several ) engines are available for the following platforms: C, C , NET, Java, D, Delphi, Visual Basic, Python..

When parsing a source text, the icons of a rule are read until this is complete. Following the rule is reduced. In the reduction of the rule is a symbol of the parent rule. In this way, a tree structure, the so-called " derivation tree". That reflects the logical structure of the source code. The tree structure is not part of the GOLD Parsing System. The parser informs the caller rather read about the symbols and the reductions. It is up to the application to build a suitable tree.

271790
de