incomp-flame-post/docs/code_gen.md

2 KiB

code_gen.py

![Language](https://img.shields.io/badge/Language-Python Source-green?style=for-the-badge)

Overview

Convert the value of tok from string to bool, while maintaining line number & column.

API Index


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.