-
Notifications
You must be signed in to change notification settings - Fork 32
fpp to xml
This tool parses FPP models, performs semantic checking on them, and writes out XML files that can be presented to F Prime tools (e.g., C++ autocoders, ground data system) or external tools for further processing.
Options:
-
-d
dir: Set the output directory to dir. If this option is not present, then the output directory is the current directory. -
-i
files: Import files. These files are read in for their symbols, but their definitions do not cause any code to be generated. -
-n
file: Write the names of the generated files to file. This is useful for collecting build dependencies. -
-p
files: Specify local prefixes to delete when importing and including files in generated code. -
-s
string size: Specify the default string size. If this option is present, the argument must be a decimal integer value between 1 and 1024. If this option is not present, the default string size is 80.
Input:
-
A list fl_tr of files to translate: either the single file stdin or a list of files specified on the command line.
-
A list fl_i of files to import, specified as arguments to the
-i
option.
Output:
-
A set of XML files, written to the output directory.
-
If the
-n
option is present, then the names of the generated XML files.
Procedure:
-
Parse each of the files in fl_tr, generating a list tul_tr of translation units. When parsing, recursively resolve include specifiers.
-
Do the same for fl_i, generating a list tul_i.
-
Perform semantic checking on the concatenation of tul_fl and tul_i.
-
Check that no two definitions in tul_tr will generate an XML file with the same name. If so, halt with an error message.
-
Generate the output for the definitions in tul_tr.