Concrete visitor for all AST classes.
Represents a AFTER block in NMODL.
Represents BBCOREPOINTER statement in NMODL.
Represents a BEFORE block in NMODL.
Represents binary expression in the NMODL.
Represents a BREAKPOINT block in NMODL.
Represents CONDUCTANCE statement in NMODL.
Represents a CONSTRUCTOR block in the NMODL.
Represents a block used for variable timestep integration (CVODE) of DERIVATIVE blocks.
Represents DERIVATIVE block in the NMODL.
Represent a callback to NEURON's derivimplicit solver.
Represents a DESTRUCTOR block in the NMODL.
Represent linear solver solution block based on Eigen.
Represent newton solver solution block based on Eigen.
Represents ELECTRODE_CURRENT variables statement in NMODL.
Represents a INITIAL block in the NMODL.
Represents LINEAR block in the NMODL.
Extracts information required for LONGITUDINAL_DIFFUSION for each KINETIC block.
Represents NONLINEAR block in the NMODL.
Represents the coreneuron nrn_state callback function.
Represents top level AST node for whole NMODL input.
Represents block encapsulating list of statements.
Represents SUFFIX statement in NMODL.
Represents TABLE statement in NMODL.
Represents THREADSAFE statement in NMODL.
Statement to indicate a change in timestep in a given block.
Represents a C code block.
Represent WATCH statement in NMODL.
Helper visitor to gather AST information to help code generation.
static void sort_with_mod2c_symbol_order(std::vector< SymbolType > &symbols)
How symbols are stored in NEURON? See notes written in markdown file.
void visit_derivimplicit_callback(const ast::DerivimplicitCallback &node) override
visit node of type ast::DerivimplicitCallback
void visit_derivative_block(const ast::DerivativeBlock &node) override
visit node of type ast::DerivativeBlock
void check_cvode_codegen(const ast::Program &node)
Find whether or not we need to emit CVODE-related code for NEURON Notes: we generate CVODE-related co...
void visit_non_linear_block(const ast::NonLinearBlock &node) override
visit node of type ast::NonLinearBlock
void visit_breakpoint_block(const ast::BreakpointBlock &node) override
visit node of type ast::BreakpointBlock
void visit_thread_safe(const ast::ThreadSafe &) override
visit node of type ast::ThreadSafe
bool table_statement_used
table statement found
void visit_before_block(const ast::BeforeBlock &node) override
visit node of type ast::BeforeBlock
void visit_update_dt(const ast::UpdateDt &node) override
visit node of type ast::UpdateDt
void visit_discrete_block(const ast::DiscreteBlock &node) override
visit node of type ast::DiscreteBlock
void visit_nrn_state_block(const ast::NrnStateBlock &node) override
visit node of type ast::NrnStateBlock
void visit_function_table_block(const ast::FunctionTableBlock &node) override
visit node of type ast::FunctionTableBlock
void visit_function_call(const ast::FunctionCall &node) override
visit node of type ast::FunctionCall
bool under_derivative_block
if visiting derivative block
void visit_linear_block(const ast::LinearBlock &node) override
visit node of type ast::LinearBlock
void visit_longitudinal_diffusion_block(const ast::LongitudinalDiffusionBlock &node) override
visit node of type ast::LongitudinalDiffusionBlock
void visit_eigen_linear_solver_block(const ast::EigenLinearSolverBlock &node) override
visit node of type ast::EigenLinearSolverBlock
void visit_conductance_hint(const ast::ConductanceHint &node) override
visit node of type ast::ConductanceHint
void find_table_variables()
bool under_breakpoint_block
if visiting breakpoint block
void visit_after_block(const ast::AfterBlock &node) override
visit node of type ast::AfterBlock
std::shared_ptr< ast::Expression > assign_lhs
lhs of assignment in derivative block
void find_neuron_global_variables()
bool enable_cvode
Config variable for enabling/disabling CVODE, see emit_cvode.
void find_ion_variables(const ast::Program &node)
Find all ions used in mod file.
void visit_table_statement(const ast::TableStatement &node) override
visit node of type ast::TableStatement
void visit_suffix(const ast::Suffix &node) override
visit node of type ast::Suffix
void visit_verbatim(const ast::Verbatim &node) override
visit verbatim block and find all symbols used
void visit_constructor_block(const ast::ConstructorBlock &node) override
visit node of type ast::ConstructorBlock
void visit_eigen_newton_solver_block(const ast::EigenNewtonSolverBlock &node) override
visit node of type ast::EigenNewtonSolverBlock
codegen::CodegenInfo analyze(const ast::Program &node)
run visitor and return information for code generation
void visit_electrode_current(const ast::ElectrodeCurrent &node) override
visit node of type ast::ElectrodeCurrent
void visit_factor_def(const ast::FactorDef &node) override
visit node of type ast::FactorDef
void visit_statement_block(const ast::StatementBlock &node) override
Visit statement block and find prime symbols appear in derivative block.
void visit_net_receive_block(const ast::NetReceiveBlock &node) override
visit node of type ast::NetReceiveBlock
std::shared_ptr< symtab::Symbol > SymbolType
CodegenHelperVisitor(bool enable_cvode=false)
void visit_watch_statement(const ast::WatchStatement &node) override
visit node of type ast::WatchStatement
std::vector< std::shared_ptr< symtab::Symbol > > SymbolVectorType
void find_range_variables()
Find range variables i.e.
void visit_watch(const ast::Watch &node) override
visit node of type ast::Watch
symtab::SymbolTable * psymtab
symbol table for the program
void visit_program(const ast::Program &node) override
visit node of type ast::Program
codegen::CodegenInfo info
holds all codegen related information
void visit_function_block(const ast::FunctionBlock &node) override
visit node of type ast::FunctionBlock
void find_non_range_variables()
Find non-range variables i.e.
void visit_binary_expression(const ast::BinaryExpression &node) override
visit node of type ast::BinaryExpression
void visit_for_netcon(const ast::ForNetcon &node) override
visit node of type ast::ForNetcon
void visit_procedure_block(const ast::ProcedureBlock &node) override
visit node of type ast::ProcedureBlock
bool under_net_receive_block
if visiting net receive block
void visit_bbcore_pointer(const ast::BbcorePointer &node) override
visit node of type ast::BbcorePointer
void visit_initial_block(const ast::InitialBlock &node) override
visit node of type ast::InitialBlock
void visit_destructor_block(const ast::DestructorBlock &node) override
visit node of type ast::DestructorBlock
void visit_cvode_block(const ast::CvodeBlock &node) override
visit node of type ast::CvodeBlock
Represent symbol table for a NMODL block.
Concrete constant visitor for all AST classes.
Various types to store code generation specific information.
encapsulates code generation backend implementations
static Node * node(Object *)
Represent information collected from AST for code generation.
Implement classes for representing symbol table at block and file scope.