2 KiB
code_gen.py

Overview
Convert the value of tok from string to bool, while maintaining line number & column.
API Index
- Function:
tok_to_bool - Function:
tok_to_int - Function:
tok_to_str - Class:
VersionInfo - Function:
test - Function:
build_info
API Reference
[Function] tok_to_bool
function tok_to_bool(tok)
Convert the value of tok from string to bool, while maintaining line number & column.
[Function] tok_to_int
function tok_to_int(tok)
Convert the value of tok from string to int, while maintaining line number & column.
[Function] tok_to_str
function tok_to_str(tok)
Convert the value of tok from string to string, while maintaining line number & column.
[Class] VersionInfo(object)
No description provided.
Methods
__init__(self, input_raw)
No description provided.
fparams(self)
No description provided.
[Function] test
function test(terms_raw, report, latex)
Compiles the post-processing term specifications from DSL into targets.
This compiles the Lark AST through all 4 pipeline stages (Stage 1 to 4) and outputs the resulting Fortran source code via Jinja2, a LaTeX equation dictionary, or a code generation IR report.
Arguments:
terms_raw(str): The raw string contents of the DSL terms specification input file.report(bool): If True, generates and saves the intermediate code generation report.latex(bool): If True, prints LaTeX equations of the averaged terms to stdout.
[Function] build_info
function build_info(terms_raw)
Generates and prints build information for the current code generation run.
Arguments:
terms_raw(str): The raw string contents of the DSL terms specification input file.