pyg4ometry.fluka.preprocessor¶
Attributes¶
Classes¶
Functions¶
|
|
|
|
|
|
|
Module Contents¶
- pyg4ometry.fluka.preprocessor._degree_input(f)¶
- pyg4ometry.fluka.preprocessor._degree_output(f)¶
- pyg4ometry.fluka.preprocessor._FLUKA_PREDEFINED_IDS¶
- pyg4ometry.fluka.preprocessor._FLUKA_PREDEFINED_FUNCTIONS¶
- pyg4ometry.fluka.preprocessor.preprocess(filein)¶
- class pyg4ometry.fluka.preprocessor._IfInfo(any_branch_satisfied, read_until_next)¶
Tells us about current conditional and its state at the current line.
If the conditional at this level has been satisfied (e.g. if the IF has been satisfied then we don’t read any subsequent ELIF or ELSE clauses, we skip until the next ENDIF).
If we should read until the next conditional directive (e.g. if the IF or ELIF has been satisfied then we should read all lines following this directive until we reach the next conditional directive.
- any_branch_satisfied¶
- read_until_next¶
- __repr__()¶
- pyg4ometry.fluka.preprocessor._parse_preprocessor_define(directive, split_line, defines)¶
- pyg4ometry.fluka.preprocessor._parse_preprocessor_conditional(directive, split_line, defines, if_stack)¶
- pyg4ometry.fluka.preprocessor._parse_preprocessor_include(directory, directive, split_line, line_stack)¶
- class pyg4ometry.fluka.preprocessor._Calc(definitions)¶
Bases:
ast.NodeVisitorA node visitor base class that walks the abstract syntax tree and calls a visitor function for every node found. This function may return a value which is forwarded by the visit method.
This class is meant to be subclassed, with the subclass adding visitor methods.
Per default the visitor functions for the nodes are
'visit_'+ class name of the node. So a TryFinally node visit function would be visit_TryFinally. This behavior can be changed by overriding the visit method. If no visitor function exists for a node (return value None) the generic_visit visitor is used instead.Don’t use the NodeVisitor if you want to apply changes to nodes during traversing. For this a special visitor exists (NodeTransformer) that allows modifications.
- op_map¶
- definitions¶
- evaluate(expression)¶
- visit_BinOp(node)¶
- visit_UnaryOp(node)¶
- visit_Constant(node)¶
- visit_Name(node)¶
- visit_Call(node)¶
- visit_Expr(node)¶