-
Notifications
You must be signed in to change notification settings - Fork 31
fpp syntax
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:
-
-a
: Print the AST. -
-i
: Resolve include specifiers.
Input: A list fl of files: either the single file stdin or a list of files specified on the command line.
Output:
-
By default, no output if the parsing succeeds; otherwise an error message.
-
If option
-a
is present, then a text representation of the AST.
Procedure:
-
Parse each of the files in fl to a translation unit tu, reporting any errors that occur.
-
If
-i
is present, then recursively resolve include specifiers. Check for include cycles. Upon detecting an include cycle, halt with an error message. -
If
-a
is present, then write out the AST as text.