6.1.1.2.1.1.1.4.1.9. pycropml.transpiler.antlr_py.csharp.run module¶
- class pycropml.transpiler.antlr_py.csharp.run.CheckingInOut2(env_init=None, isAlgo=False)[source]¶
Bases:
Middleware_summary_ This code defines a middleware class called “CheckingInOut” that checks the inputs and outputs of a given code block. It does this by keeping track of the current scope and environment, and adding any new variables to the environment. It also keeps track of the inputs and outputs of the code block by checking if a variable is already in the current scope or not. The middleware class has methods for different types of statements and expressions, such as assignment, if statements, for loops, and function calls. The purpose of this middleware is to ensure that the inputs and outputs of a code block are well-defined and can be used by other parts of a program.
- class pycropml.transpiler.antlr_py.csharp.run.Custom_call2(vars, extfunc=[], not_declared={}, ext_func_inout={}, member_category={})[source]¶
Bases:
Middleware
- class pycropml.transpiler.antlr_py.csharp.run.For_statement2[source]¶
Bases:
Middleware
- class pycropml.transpiler.antlr_py.csharp.run.Local2(declnames=[], params={})[source]¶
Bases:
Middleware
- class pycropml.transpiler.antlr_py.csharp.run.Member_access2(totaltree, prec_cur=[])[source]¶
Bases:
Middleware
- pycropml.transpiler.antlr_py.csharp.run.description_tags = ['//%%CyML Description Begin%%', '//%%CyML Description End%%']¶
Read BioMA component and extract metadata
- pycropml.transpiler.antlr_py.csharp.run.redefine_params(m: Node, var_: Dict, member_category, inputs, outputs, extfunc, instance_dclass) List[Node][source]¶
It allows to change all parameters which are instance of domain class with the explicit attributes required
- Parameters:
- Returns:
New parameters nodes
- Return type:
List[Node]
- pycropml.transpiler.antlr_py.csharp.run.run_csharp(component, output)[source]¶
Transform a CSharp component in Crop2ML
- Parameters:
component (_type_) – csharp component path
output (_type_) – Crop2ML package path
- pycropml.transpiler.antlr_py.csharp.run.translate(total_tree, varinfo, algo, not_declared, res_inout={}, member_category={}, pa={})[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.