Concrete visitor for all AST classes.
Represents binary expression in the NMODL.
Represents a BREAKPOINT block in NMODL.
Represents CONDUCTANCE statement in NMODL.
Represents top level AST node for whole NMODL input.
Concrete visitor for all AST classes.
Visitor for generating CONDUCTANCE statements for ions
std::vector< std::shared_ptr< const ast::Ast > > use_ion_nodes
use ion ast nodes
std::map< std::string, std::string > string_map
string_set all_vars
set of all variables for SymPy
void visit_breakpoint_block(ast::BreakpointBlock &node) override
visit node of type ast::BreakpointBlock
std::vector< std::string > ordered_binary_exprs_lhs
ditto but for LHS of expression only
std::vector< std::string > ordered_binary_exprs
list in order of binary expressions in breakpoint
string_set i_ignore
set of currents to ignore
SympyConductanceVisitor()=default
std::vector< std::shared_ptr< const ast::Ast > > nonspecific_nodes
non specific currents
bool NONSPECIFIC_CONDUCTANCE_ALREADY_EXISTS
std::vector< std::string > generate_statement_strings(ast::BreakpointBlock &node)
void lookup_nonspecific_statements()
void lookup_useion_statements()
string_map i_name
map between current write names and ion names
std::map< std::string, std::size_t > binary_expr_index
map from lhs of binary expression to index of expression in above vector
void visit_program(ast::Program &node) override
visit node of type ast::Program
static std::string to_nmodl_for_sympy(const ast::Ast &node)
void visit_binary_expression(ast::BinaryExpression &node) override
visit node of type ast::BinaryExpression
void visit_conductance_hint(ast::ConductanceHint &node) override
visit node of type ast::ConductanceHint
bool under_breakpoint_block
true while visiting breakpoint block
std::set< std::string > string_set
encapsulates code generation backend implementations
static Node * node(Object *)
Base class for all Abstract Syntax Tree node types.