6.1.1.2.1.1.1.12.1.2. pycropml.transpiler.antlr_py.stics.run module

pycropml.transpiler.antlr_py.stics.run.fortrancomments(code)[source]

Extract comments inside Fortran code

pycropml.transpiler.antlr_py.stics.run.run_stics(component, package)[source]
pycropml.transpiler.antlr_py.stics.run.transform_type(pseudo_type)[source]
pycropml.transpiler.antlr_py.stics.run.translate(node, asgt, imports, inout=[], index=[])[source]

Transform specific nodes based on class of subnodes of node. It also allows to extract some usefull information. At finish the modified node contains only the constructs of CyML and converted in CyML after applying translate_simple function.

Parameters:
  • node (Node) – A subtree of asgt

  • asgt (Node) – A tree

  • imports (str) – Names of the import Modules used in the code from where the node is generated

  • inout (list, optional) – Names of the inputs and outputs of the ModelUnit. Defaults to [].

Returns:

init, algo and external functions files

Return type:

files

pycropml.transpiler.antlr_py.stics.run.translate_simple(r, total_tree=None)[source]

Transform the ASG of Fortran code in the Common Model Representation that is transformed into CyML

Parameters:

r (Node) – The modified ASG of Fortran

Returns:

The generated CyML code

Return type:

str