Skip to content

Compiler Phases and Intermediate Representation

Christopher Diggins edited this page Aug 13, 2023 · 1 revision

The Plato compiler has multiple passes and intermediate representations.

  1. ParserInput - wraps the source code strings with a line/column lookup table.
  2. ParserNode - A linked list of structures with labels and indexes into source created by specific rules in grammar.
  3. ParserTreeNode - A tree of parser nodes generated from the list of ParserNode structures.
  4. CstNode - A set of strongly typed structures representing the Concrete Syntax Tree auto-generated from the grammar .
  5. AstNode - An Abstract Syntax Tree which represent the syntax in generic and simplified format.
  6. Symbol - First level representation of semantics, created during name resolution. Does not resolve overloaded functions.
Clone this wiki locally