parsing package
bast
module
Brian AST representation
This is a standard Python AST representation with additional information added.
Exported members:
brian_ast
, BrianASTRenderer
, dtype_hierarchy
Classes
|
This class is modelled after |
Functions
|
Returns an AST tree representation with additional information |
|
Returns 'boolean', 'integer' or 'float' |
|
Returns 'boolean', 'integer' or 'float' |
|
|
|
|
|
|
dependencies
module
Exported members:
abstract_code_dependencies
Functions
|
Analyses identifiers used in abstract code blocks |
|
expressions
module
AST parsing based analysis of expressions
Exported members:
parse_expression_dimensions
Functions
|
Determines if an expression is of boolean type or not |
|
Returns the unit value of an expression, and checks its validity |
functions
module
Exported members:
AbstractCodeFunction
, abstract_code_from_function
, extract_abstract_code_functions
, substitute_abstract_code_functions
Classes
|
The information defining an abstract code function |
|
Inlines a function call using temporary variables |
|
Rewrites all variable names in names by prepending pre |
Functions
Converts the body of the function to abstract code |
Returns a set of abstract code functions from function definitions. |
|
Performs inline substitution of all the functions in the code |
rendering
module
Exported members:
NodeRenderer
, NumpyNodeRenderer
, CPPNodeRenderer
, SympyNodeRenderer
Classes
|
|
|
|
statements
module
Functions
|
Parses a single line of code into "var op expr". |
sympytools
module
Utility functions for parsing expressions and statements.
Classes
|
Printer that overrides the printing of some basic sympy objects. |
Functions
|
Returns the complexity of an expression (either string or sympy) |
|
Parses a string into a sympy expression. |
|
Converts a sympy expression into a string. |
Objects
Printer that overrides the printing of some basic sympy objects. |