Skip to content

fpp syntax

github-actions[bot] edited this page Oct 23, 2026 · 6 revisions

This tool parses FPP source files into an abstract syntax tree (AST) and optionally writes out the AST. It is mainly useful during compiler development.

Options:

  1. -a: Print the AST.

  2. -e: Expand syntax. Resolve include specifiers, add state machine enums, and expand templates.

Input: A list fl of files: either the single file stdin or a list of files specified on the command line.

Output:

  1. By default, no output if the parsing succeeds; otherwise an error message.

  2. If option -a is present, then a text representation of the AST. If the input contains multiple source files, then each source file is parsed into an AST, and the output is the AST formed by concatenating the individual ASTs.

Procedure:

  1. Parse each of the files in fl to a translation unit tu, reporting any errors that occur.

  2. If -e is present, then expand syntax and enter symbols, yielding a new list tul' of translation units.

  3. If -a is present, then form an AST by concatenating the elements of tul' and write it out as text.

Clone this wiki locally