User Guide

Classes for implementing Abstract Syntax Tree (AST) More...

Detailed Description

Classes for implementing Abstract Syntax Tree (AST)

Classes

class  nmodl::ast::AfterBlock
 Represents a AFTER block in NMODL. More...
 
class  nmodl::ast::Argument
 Represents an argument to functions and procedures. More...
 
class  nmodl::ast::AssignedBlock
 Represents a ASSIGNED block in the NMODL. More...
 
class  nmodl::ast::AssignedDefinition
 Represents a statement in ASSIGNED or STATE block. More...
 
struct  nmodl::ast::Ast
 Base class for all Abstract Syntax Tree node types. More...
 
class  nmodl::ast::BABlock
 Represents a block to be executed before or after another block. More...
 
class  nmodl::ast::BABlockType
 Type to represent different block types for before/after block. More...
 
class  nmodl::ast::BbcorePointer
 Represents BBCOREPOINTER statement in NMODL. More...
 
class  nmodl::ast::BbcorePointerVar
 Represent a single variable of type BBCOREPOINTER. More...
 
class  nmodl::ast::BeforeBlock
 Represents a BEFORE block in NMODL. More...
 
class  nmodl::ast::BinaryExpression
 Represents binary expression in the NMODL. More...
 
class  nmodl::ast::BinaryOperator
 Operator used in ast::BinaryExpression. More...
 
class  nmodl::ast::Block
 Base class for all block scoped nodes. More...
 
class  nmodl::ast::BlockComment
 Represents a multi-line comment in NMODL. More...
 
class  nmodl::ast::Boolean
 Represents a boolean variable. More...
 
class  nmodl::ast::BreakpointBlock
 Represents a BREAKPOINT block in NMODL. More...
 
class  nmodl::ast::Compartment
 Represent COMPARTMENT statement in NMODL. More...
 
class  nmodl::ast::ConductanceHint
 Represents CONDUCTANCE statement in NMODL. More...
 
class  nmodl::ast::Conserve
 Represent CONSERVE statement in NMODL. More...
 
class  nmodl::ast::ConstantBlock
 Represent CONSTANT block in the mod file. More...
 
class  nmodl::ast::ConstantStatement
 Represent statement in CONSTANT block of NMODL. More...
 
class  nmodl::ast::ConstantVar
 Represents a variable in the ast::ConstantBlock. More...
 
class  nmodl::ast::ConstructorBlock
 Represents a CONSTRUCTOR block in the NMODL. More...
 
class  nmodl::ast::CvodeBlock
 Represents a block used for variable timestep integration (CVODE) of DERIVATIVE blocks. More...
 
class  nmodl::ast::Define
 Represents a DEFINE statement in NMODL. More...
 
class  nmodl::ast::DerivativeBlock
 Represents DERIVATIVE block in the NMODL. More...
 
class  nmodl::ast::DerivimplicitCallback
 Represent a callback to NEURON's derivimplicit solver. More...
 
class  nmodl::ast::DestructorBlock
 Represents a DESTRUCTOR block in the NMODL. More...
 
class  nmodl::ast::DiffEqExpression
 Represents differential equation in DERIVATIVE block. More...
 
class  nmodl::ast::DiscreteBlock
 TODO. More...
 
class  nmodl::ast::Double
 Represents a double variable. More...
 
class  nmodl::ast::DoubleUnit
 TODO. More...
 
class  nmodl::ast::EigenLinearSolverBlock
 Represent linear solver solution block based on Eigen. More...
 
class  nmodl::ast::EigenNewtonSolverBlock
 Represent newton solver solution block based on Eigen. More...
 
class  nmodl::ast::ElectrodeCurVar
 TODO. More...
 
class  nmodl::ast::ElectrodeCurrent
 Represents ELECTRODE_CURRENT variables statement in NMODL. More...
 
class  nmodl::ast::ElseIfStatement
 TODO. More...
 
class  nmodl::ast::ElseStatement
 TODO. More...
 
class  nmodl::ast::Expression
 Base class for all expressions in the NMODL. More...
 
class  nmodl::ast::ExpressionStatement
 TODO. More...
 
class  nmodl::ast::ExternVar
 TODO. More...
 
class  nmodl::ast::External
 This construct is deprecated and no longer supported in the NMODL. More...
 
class  nmodl::ast::FactorDef
 TODO. More...
 
class  nmodl::ast::Float
 Represents a float variable. More...
 
class  nmodl::ast::ForNetcon
 TODO. More...
 
class  nmodl::ast::FromStatement
 TODO. More...
 
class  nmodl::ast::FunctionBlock
 TODO. More...
 
class  nmodl::ast::FunctionCall
 TODO. More...
 
class  nmodl::ast::FunctionTableBlock
 TODO. More...
 
class  nmodl::ast::Global
 Represents GLOBAL statement in NMODL. More...
 
class  nmodl::ast::GlobalVar
 TODO. More...
 
class  nmodl::ast::Identifier
 Base class for all identifiers. More...
 
class  nmodl::ast::IfStatement
 TODO. More...
 
class  nmodl::ast::Include
 Represents an INCLUDE statement in NMODL. More...
 
class  nmodl::ast::IndependentBlock
 Represents a INDEPENDENT block in the NMODL. More...
 
class  nmodl::ast::IndexedName
 Represents specific element of an array variable. More...
 
class  nmodl::ast::InitialBlock
 Represents a INITIAL block in the NMODL. More...
 
class  nmodl::ast::Integer
 Represents an integer variable. More...
 
class  nmodl::ast::KineticBlock
 TODO. More...
 
class  nmodl::ast::LagStatement
 Represents a LAG statement in the mod file. More...
 
class  nmodl::ast::Limits
 TODO. More...
 
class  nmodl::ast::LinEquation
 One equation in a system of equations tha collectively form a LINEAR block. More...
 
class  nmodl::ast::LineComment
 Represents a one line comment in NMODL. More...
 
class  nmodl::ast::LinearBlock
 Represents LINEAR block in the NMODL. More...
 
class  nmodl::ast::LocalListStatement
 TODO. More...
 
class  nmodl::ast::LocalVar
 TODO. More...
 
class  nmodl::ast::LonDiffuse
 Represent LONGITUDINAL_DIFFUSION statement in NMODL. More...
 
class  nmodl::ast::LongitudinalDiffusionBlock
 Extracts information required for LONGITUDINAL_DIFFUSION for each KINETIC block. More...
 
class  nmodl::ast::Model
 TODO. More...
 
class  nmodl::ast::MutexLock
 Represent MUTEXLOCK statement in NMODL. More...
 
class  nmodl::ast::MutexUnlock
 Represent MUTEXUNLOCK statement in NMODL. More...
 
class  nmodl::ast::Name
 Represents a name. More...
 
class  nmodl::ast::NetReceiveBlock
 TODO. More...
 
class  nmodl::ast::NeuronBlock
 Represent NEURON block in the mod file. More...
 
class  nmodl::ast::Node
 Base class for all AST node. More...
 
class  nmodl::ast::NonLinEquation
 One equation in a system of equations that collectively make a NONLINEAR block. More...
 
class  nmodl::ast::NonLinearBlock
 Represents NONLINEAR block in the NMODL. More...
 
class  nmodl::ast::Nonspecific
 Represents NONSPECIFIC_CURRENT variables statement in NMODL. More...
 
class  nmodl::ast::NonspecificCurVar
 TODO. More...
 
class  nmodl::ast::NrnStateBlock
 Represents the coreneuron nrn_state callback function. More...
 
class  nmodl::ast::Number
 Base class for all numbers. More...
 
class  nmodl::ast::NumberRange
 TODO. More...
 
class  nmodl::ast::OntologyStatement
 Represents CURIE information in NMODL. More...
 
class  nmodl::ast::ParamAssign
 TODO. More...
 
class  nmodl::ast::ParamBlock
 Represents a PARAMETER block in the NMODL. More...
 
class  nmodl::ast::ParenExpression
 TODO. More...
 
class  nmodl::ast::Pointer
 Represents POINTER statement in NMODL. More...
 
class  nmodl::ast::PointerVar
 TODO. More...
 
class  nmodl::ast::PrimeName
 Represents a prime variable (for ODE) More...
 
class  nmodl::ast::ProcedureBlock
 TODO. More...
 
class  nmodl::ast::Program
 Represents top level AST node for whole NMODL input. More...
 
class  nmodl::ast::ProtectStatement
 TODO. More...
 
class  nmodl::ast::RandomVar
 Single variable of type RANDOM. More...
 
class  nmodl::ast::RandomVarList
 Represents RANDOM statement in NMODL. More...
 
class  nmodl::ast::Range
 Represents RANGE variables statement in NMODL. More...
 
class  nmodl::ast::RangeVar
 TODO. More...
 
class  nmodl::ast::ReactVarName
 TODO. More...
 
class  nmodl::ast::ReactionOperator
 TODO. More...
 
class  nmodl::ast::ReactionStatement
 TODO. More...
 
class  nmodl::ast::ReadIonVar
 TODO. More...
 
class  nmodl::ast::SolutionExpression
 Represent solution of a block in the AST. More...
 
class  nmodl::ast::SolveBlock
 TODO. More...
 
class  nmodl::ast::StateBlock
 Represents a STATE block in the NMODL. More...
 
class  nmodl::ast::Statement
 TODO. More...
 
class  nmodl::ast::StatementBlock
 Represents block encapsulating list of statements. More...
 
class  nmodl::ast::String
 Represents a string. More...
 
class  nmodl::ast::Suffix
 Represents SUFFIX statement in NMODL. More...
 
class  nmodl::ast::TableStatement
 Represents TABLE statement in NMODL. More...
 
class  nmodl::ast::ThreadSafe
 Represents THREADSAFE statement in NMODL. More...
 
class  nmodl::ast::UnaryExpression
 TODO. More...
 
class  nmodl::ast::UnaryOperator
 TODO. More...
 
class  nmodl::ast::Unit
 TODO. More...
 
class  nmodl::ast::UnitBlock
 TODO. More...
 
class  nmodl::ast::UnitDef
 TODO. More...
 
class  nmodl::ast::UnitState
 TODO. More...
 
class  nmodl::ast::UpdateDt
 Statement to indicate a change in timestep in a given block. More...
 
class  nmodl::ast::Useion
 Represents USEION statement in NMODL. More...
 
class  nmodl::ast::Valence
 TODO. More...
 
class  nmodl::ast::VarName
 Represents a variable. More...
 
class  nmodl::ast::Verbatim
 Represents a C code block. More...
 
class  nmodl::ast::Watch
 TODO. More...
 
class  nmodl::ast::WatchStatement
 Represent WATCH statement in NMODL. More...
 
class  nmodl::ast::WhileStatement
 TODO. More...
 
class  nmodl::ast::WrappedExpression
 Wrap any other expression type. More...
 
class  nmodl::ast::WriteIonVar
 TODO. More...
 

Functions

virtual std::shared_ptr< Astnmodl::ast::Ast::get_shared_ptr ()
 get std::shared_ptr from this pointer of the AST node More...
 
virtual std::shared_ptr< const Astnmodl::ast::Ast::get_shared_ptr () const
 get std::shared_ptr from this pointer of the AST node More...
 
virtual bool nmodl::ast::Ast::is_ast () const noexcept
 Check if the ast node is an instance of ast::Ast. More...
 
virtual bool nmodl::ast::Ast::is_node () const noexcept
 Check if the ast node is an instance of ast::Node. More...
 
virtual bool nmodl::ast::Ast::is_statement () const noexcept
 Check if the ast node is an instance of ast::Statement. More...
 
virtual bool nmodl::ast::Ast::is_expression () const noexcept
 Check if the ast node is an instance of ast::Expression. More...
 
virtual bool nmodl::ast::Ast::is_block () const noexcept
 Check if the ast node is an instance of ast::Block. More...
 
virtual bool nmodl::ast::Ast::is_identifier () const noexcept
 Check if the ast node is an instance of ast::Identifier. More...
 
virtual bool nmodl::ast::Ast::is_number () const noexcept
 Check if the ast node is an instance of ast::Number. More...
 
virtual bool nmodl::ast::Ast::is_string () const noexcept
 Check if the ast node is an instance of ast::String. More...
 
virtual bool nmodl::ast::Ast::is_integer () const noexcept
 Check if the ast node is an instance of ast::Integer. More...
 
virtual bool nmodl::ast::Ast::is_float () const noexcept
 Check if the ast node is an instance of ast::Float. More...
 
virtual bool nmodl::ast::Ast::is_double () const noexcept
 Check if the ast node is an instance of ast::Double. More...
 
virtual bool nmodl::ast::Ast::is_boolean () const noexcept
 Check if the ast node is an instance of ast::Boolean. More...
 
virtual bool nmodl::ast::Ast::is_name () const noexcept
 Check if the ast node is an instance of ast::Name. More...
 
virtual bool nmodl::ast::Ast::is_prime_name () const noexcept
 Check if the ast node is an instance of ast::PrimeName. More...
 
virtual bool nmodl::ast::Ast::is_indexed_name () const noexcept
 Check if the ast node is an instance of ast::IndexedName. More...
 
virtual bool nmodl::ast::Ast::is_var_name () const noexcept
 Check if the ast node is an instance of ast::VarName. More...
 
virtual bool nmodl::ast::Ast::is_argument () const noexcept
 Check if the ast node is an instance of ast::Argument. More...
 
virtual bool nmodl::ast::Ast::is_react_var_name () const noexcept
 Check if the ast node is an instance of ast::ReactVarName. More...
 
virtual bool nmodl::ast::Ast::is_read_ion_var () const noexcept
 Check if the ast node is an instance of ast::ReadIonVar. More...
 
virtual bool nmodl::ast::Ast::is_write_ion_var () const noexcept
 Check if the ast node is an instance of ast::WriteIonVar. More...
 
virtual bool nmodl::ast::Ast::is_nonspecific_cur_var () const noexcept
 Check if the ast node is an instance of ast::NonspecificCurVar. More...
 
virtual bool nmodl::ast::Ast::is_electrode_cur_var () const noexcept
 Check if the ast node is an instance of ast::ElectrodeCurVar. More...
 
virtual bool nmodl::ast::Ast::is_range_var () const noexcept
 Check if the ast node is an instance of ast::RangeVar. More...
 
virtual bool nmodl::ast::Ast::is_global_var () const noexcept
 Check if the ast node is an instance of ast::GlobalVar. More...
 
virtual bool nmodl::ast::Ast::is_pointer_var () const noexcept
 Check if the ast node is an instance of ast::PointerVar. More...
 
virtual bool nmodl::ast::Ast::is_random_var () const noexcept
 Check if the ast node is an instance of ast::RandomVar. More...
 
virtual bool nmodl::ast::Ast::is_bbcore_pointer_var () const noexcept
 Check if the ast node is an instance of ast::BbcorePointerVar. More...
 
virtual bool nmodl::ast::Ast::is_extern_var () const noexcept
 Check if the ast node is an instance of ast::ExternVar. More...
 
virtual bool nmodl::ast::Ast::is_param_block () const noexcept
 Check if the ast node is an instance of ast::ParamBlock. More...
 
virtual bool nmodl::ast::Ast::is_independent_block () const noexcept
 Check if the ast node is an instance of ast::IndependentBlock. More...
 
virtual bool nmodl::ast::Ast::is_assigned_block () const noexcept
 Check if the ast node is an instance of ast::AssignedBlock. More...
 
virtual bool nmodl::ast::Ast::is_state_block () const noexcept
 Check if the ast node is an instance of ast::StateBlock. More...
 
virtual bool nmodl::ast::Ast::is_initial_block () const noexcept
 Check if the ast node is an instance of ast::InitialBlock. More...
 
virtual bool nmodl::ast::Ast::is_constructor_block () const noexcept
 Check if the ast node is an instance of ast::ConstructorBlock. More...
 
virtual bool nmodl::ast::Ast::is_destructor_block () const noexcept
 Check if the ast node is an instance of ast::DestructorBlock. More...
 
virtual bool nmodl::ast::Ast::is_statement_block () const noexcept
 Check if the ast node is an instance of ast::StatementBlock. More...
 
virtual bool nmodl::ast::Ast::is_derivative_block () const noexcept
 Check if the ast node is an instance of ast::DerivativeBlock. More...
 
virtual bool nmodl::ast::Ast::is_linear_block () const noexcept
 Check if the ast node is an instance of ast::LinearBlock. More...
 
virtual bool nmodl::ast::Ast::is_non_linear_block () const noexcept
 Check if the ast node is an instance of ast::NonLinearBlock. More...
 
virtual bool nmodl::ast::Ast::is_discrete_block () const noexcept
 Check if the ast node is an instance of ast::DiscreteBlock. More...
 
virtual bool nmodl::ast::Ast::is_function_table_block () const noexcept
 Check if the ast node is an instance of ast::FunctionTableBlock. More...
 
virtual bool nmodl::ast::Ast::is_function_block () const noexcept
 Check if the ast node is an instance of ast::FunctionBlock. More...
 
virtual bool nmodl::ast::Ast::is_procedure_block () const noexcept
 Check if the ast node is an instance of ast::ProcedureBlock. More...
 
virtual bool nmodl::ast::Ast::is_net_receive_block () const noexcept
 Check if the ast node is an instance of ast::NetReceiveBlock. More...
 
virtual bool nmodl::ast::Ast::is_solve_block () const noexcept
 Check if the ast node is an instance of ast::SolveBlock. More...
 
virtual bool nmodl::ast::Ast::is_breakpoint_block () const noexcept
 Check if the ast node is an instance of ast::BreakpointBlock. More...
 
virtual bool nmodl::ast::Ast::is_before_block () const noexcept
 Check if the ast node is an instance of ast::BeforeBlock. More...
 
virtual bool nmodl::ast::Ast::is_after_block () const noexcept
 Check if the ast node is an instance of ast::AfterBlock. More...
 
virtual bool nmodl::ast::Ast::is_ba_block () const noexcept
 Check if the ast node is an instance of ast::BABlock. More...
 
virtual bool nmodl::ast::Ast::is_for_netcon () const noexcept
 Check if the ast node is an instance of ast::ForNetcon. More...
 
virtual bool nmodl::ast::Ast::is_kinetic_block () const noexcept
 Check if the ast node is an instance of ast::KineticBlock. More...
 
virtual bool nmodl::ast::Ast::is_unit_block () const noexcept
 Check if the ast node is an instance of ast::UnitBlock. More...
 
virtual bool nmodl::ast::Ast::is_constant_block () const noexcept
 Check if the ast node is an instance of ast::ConstantBlock. More...
 
virtual bool nmodl::ast::Ast::is_neuron_block () const noexcept
 Check if the ast node is an instance of ast::NeuronBlock. More...
 
virtual bool nmodl::ast::Ast::is_unit () const noexcept
 Check if the ast node is an instance of ast::Unit. More...
 
virtual bool nmodl::ast::Ast::is_double_unit () const noexcept
 Check if the ast node is an instance of ast::DoubleUnit. More...
 
virtual bool nmodl::ast::Ast::is_local_var () const noexcept
 Check if the ast node is an instance of ast::LocalVar. More...
 
virtual bool nmodl::ast::Ast::is_limits () const noexcept
 Check if the ast node is an instance of ast::Limits. More...
 
virtual bool nmodl::ast::Ast::is_number_range () const noexcept
 Check if the ast node is an instance of ast::NumberRange. More...
 
virtual bool nmodl::ast::Ast::is_constant_var () const noexcept
 Check if the ast node is an instance of ast::ConstantVar. More...
 
virtual bool nmodl::ast::Ast::is_binary_operator () const noexcept
 Check if the ast node is an instance of ast::BinaryOperator. More...
 
virtual bool nmodl::ast::Ast::is_unary_operator () const noexcept
 Check if the ast node is an instance of ast::UnaryOperator. More...
 
virtual bool nmodl::ast::Ast::is_reaction_operator () const noexcept
 Check if the ast node is an instance of ast::ReactionOperator. More...
 
virtual bool nmodl::ast::Ast::is_paren_expression () const noexcept
 Check if the ast node is an instance of ast::ParenExpression. More...
 
virtual bool nmodl::ast::Ast::is_binary_expression () const noexcept
 Check if the ast node is an instance of ast::BinaryExpression. More...
 
virtual bool nmodl::ast::Ast::is_diff_eq_expression () const noexcept
 Check if the ast node is an instance of ast::DiffEqExpression. More...
 
virtual bool nmodl::ast::Ast::is_unary_expression () const noexcept
 Check if the ast node is an instance of ast::UnaryExpression. More...
 
virtual bool nmodl::ast::Ast::is_non_lin_equation () const noexcept
 Check if the ast node is an instance of ast::NonLinEquation. More...
 
virtual bool nmodl::ast::Ast::is_lin_equation () const noexcept
 Check if the ast node is an instance of ast::LinEquation. More...
 
virtual bool nmodl::ast::Ast::is_function_call () const noexcept
 Check if the ast node is an instance of ast::FunctionCall. More...
 
virtual bool nmodl::ast::Ast::is_watch () const noexcept
 Check if the ast node is an instance of ast::Watch. More...
 
virtual bool nmodl::ast::Ast::is_ba_block_type () const noexcept
 Check if the ast node is an instance of ast::BABlockType. More...
 
virtual bool nmodl::ast::Ast::is_unit_def () const noexcept
 Check if the ast node is an instance of ast::UnitDef. More...
 
virtual bool nmodl::ast::Ast::is_factor_def () const noexcept
 Check if the ast node is an instance of ast::FactorDef. More...
 
virtual bool nmodl::ast::Ast::is_valence () const noexcept
 Check if the ast node is an instance of ast::Valence. More...
 
virtual bool nmodl::ast::Ast::is_unit_state () const noexcept
 Check if the ast node is an instance of ast::UnitState. More...
 
virtual bool nmodl::ast::Ast::is_local_list_statement () const noexcept
 Check if the ast node is an instance of ast::LocalListStatement. More...
 
virtual bool nmodl::ast::Ast::is_model () const noexcept
 Check if the ast node is an instance of ast::Model. More...
 
virtual bool nmodl::ast::Ast::is_define () const noexcept
 Check if the ast node is an instance of ast::Define. More...
 
virtual bool nmodl::ast::Ast::is_include () const noexcept
 Check if the ast node is an instance of ast::Include. More...
 
virtual bool nmodl::ast::Ast::is_param_assign () const noexcept
 Check if the ast node is an instance of ast::ParamAssign. More...
 
virtual bool nmodl::ast::Ast::is_assigned_definition () const noexcept
 Check if the ast node is an instance of ast::AssignedDefinition. More...
 
virtual bool nmodl::ast::Ast::is_conductance_hint () const noexcept
 Check if the ast node is an instance of ast::ConductanceHint. More...
 
virtual bool nmodl::ast::Ast::is_expression_statement () const noexcept
 Check if the ast node is an instance of ast::ExpressionStatement. More...
 
virtual bool nmodl::ast::Ast::is_protect_statement () const noexcept
 Check if the ast node is an instance of ast::ProtectStatement. More...
 
virtual bool nmodl::ast::Ast::is_from_statement () const noexcept
 Check if the ast node is an instance of ast::FromStatement. More...
 
virtual bool nmodl::ast::Ast::is_while_statement () const noexcept
 Check if the ast node is an instance of ast::WhileStatement. More...
 
virtual bool nmodl::ast::Ast::is_if_statement () const noexcept
 Check if the ast node is an instance of ast::IfStatement. More...
 
virtual bool nmodl::ast::Ast::is_else_if_statement () const noexcept
 Check if the ast node is an instance of ast::ElseIfStatement. More...
 
virtual bool nmodl::ast::Ast::is_else_statement () const noexcept
 Check if the ast node is an instance of ast::ElseStatement. More...
 
virtual bool nmodl::ast::Ast::is_watch_statement () const noexcept
 Check if the ast node is an instance of ast::WatchStatement. More...
 
virtual bool nmodl::ast::Ast::is_mutex_lock () const noexcept
 Check if the ast node is an instance of ast::MutexLock. More...
 
virtual bool nmodl::ast::Ast::is_mutex_unlock () const noexcept
 Check if the ast node is an instance of ast::MutexUnlock. More...
 
virtual bool nmodl::ast::Ast::is_conserve () const noexcept
 Check if the ast node is an instance of ast::Conserve. More...
 
virtual bool nmodl::ast::Ast::is_compartment () const noexcept
 Check if the ast node is an instance of ast::Compartment. More...
 
virtual bool nmodl::ast::Ast::is_lon_diffuse () const noexcept
 Check if the ast node is an instance of ast::LonDiffuse. More...
 
virtual bool nmodl::ast::Ast::is_reaction_statement () const noexcept
 Check if the ast node is an instance of ast::ReactionStatement. More...
 
virtual bool nmodl::ast::Ast::is_lag_statement () const noexcept
 Check if the ast node is an instance of ast::LagStatement. More...
 
virtual bool nmodl::ast::Ast::is_constant_statement () const noexcept
 Check if the ast node is an instance of ast::ConstantStatement. More...
 
virtual bool nmodl::ast::Ast::is_table_statement () const noexcept
 Check if the ast node is an instance of ast::TableStatement. More...
 
virtual bool nmodl::ast::Ast::is_suffix () const noexcept
 Check if the ast node is an instance of ast::Suffix. More...
 
virtual bool nmodl::ast::Ast::is_useion () const noexcept
 Check if the ast node is an instance of ast::Useion. More...
 
virtual bool nmodl::ast::Ast::is_nonspecific () const noexcept
 Check if the ast node is an instance of ast::Nonspecific. More...
 
virtual bool nmodl::ast::Ast::is_electrode_current () const noexcept
 Check if the ast node is an instance of ast::ElectrodeCurrent. More...
 
virtual bool nmodl::ast::Ast::is_range () const noexcept
 Check if the ast node is an instance of ast::Range. More...
 
virtual bool nmodl::ast::Ast::is_global () const noexcept
 Check if the ast node is an instance of ast::Global. More...
 
virtual bool nmodl::ast::Ast::is_random_var_list () const noexcept
 Check if the ast node is an instance of ast::RandomVarList. More...
 
virtual bool nmodl::ast::Ast::is_pointer () const noexcept
 Check if the ast node is an instance of ast::Pointer. More...
 
virtual bool nmodl::ast::Ast::is_bbcore_pointer () const noexcept
 Check if the ast node is an instance of ast::BbcorePointer. More...
 
virtual bool nmodl::ast::Ast::is_external () const noexcept
 Check if the ast node is an instance of ast::External. More...
 
virtual bool nmodl::ast::Ast::is_thread_safe () const noexcept
 Check if the ast node is an instance of ast::ThreadSafe. More...
 
virtual bool nmodl::ast::Ast::is_verbatim () const noexcept
 Check if the ast node is an instance of ast::Verbatim. More...
 
virtual bool nmodl::ast::Ast::is_line_comment () const noexcept
 Check if the ast node is an instance of ast::LineComment. More...
 
virtual bool nmodl::ast::Ast::is_block_comment () const noexcept
 Check if the ast node is an instance of ast::BlockComment. More...
 
virtual bool nmodl::ast::Ast::is_ontology_statement () const noexcept
 Check if the ast node is an instance of ast::OntologyStatement. More...
 
virtual bool nmodl::ast::Ast::is_program () const noexcept
 Check if the ast node is an instance of ast::Program. More...
 
virtual bool nmodl::ast::Ast::is_nrn_state_block () const noexcept
 Check if the ast node is an instance of ast::NrnStateBlock. More...
 
virtual bool nmodl::ast::Ast::is_eigen_newton_solver_block () const noexcept
 Check if the ast node is an instance of ast::EigenNewtonSolverBlock. More...
 
virtual bool nmodl::ast::Ast::is_eigen_linear_solver_block () const noexcept
 Check if the ast node is an instance of ast::EigenLinearSolverBlock. More...
 
virtual bool nmodl::ast::Ast::is_cvode_block () const noexcept
 Check if the ast node is an instance of ast::CvodeBlock. More...
 
virtual bool nmodl::ast::Ast::is_longitudinal_diffusion_block () const noexcept
 Check if the ast node is an instance of ast::LongitudinalDiffusionBlock. More...
 
virtual bool nmodl::ast::Ast::is_wrapped_expression () const noexcept
 Check if the ast node is an instance of ast::WrappedExpression. More...
 
virtual bool nmodl::ast::Ast::is_derivimplicit_callback () const noexcept
 Check if the ast node is an instance of ast::DerivimplicitCallback. More...
 
virtual bool nmodl::ast::Ast::is_solution_expression () const noexcept
 Check if the ast node is an instance of ast::SolutionExpression. More...
 
virtual bool nmodl::ast::Ast::is_update_dt () const noexcept
 Check if the ast node is an instance of ast::UpdateDt. More...
 
virtual Astnmodl::ast::Ast::get_parent () const
 Parent getter. More...
 
virtual void nmodl::ast::Ast::set_parent (Ast *p)
 Parent setter. More...
 

Variables

Astnmodl::ast::Ast::parent = nullptr
 Generic pointer to the parent. More...
 

Ctor & dtor

 nmodl::ast::Ast::Ast ()=default
 
virtual nmodl::ast::Ast::~Ast ()=default
 

Pure Virtual Functions

virtual AstNodeType nmodl::ast::Ast::get_node_type () const =0
 Return type (ast::AstNodeType) of AST node. More...
 
virtual std::string nmodl::ast::Ast::get_node_type_name () const =0
 Return type (ast::AstNodeType) of ast node as std::string. More...
 
virtual std::string nmodl::ast::Ast::get_nmodl_name () const
 Return NMODL statement of ast node as std::string. More...
 
virtual void nmodl::ast::Ast::accept (visitor::Visitor &v)=0
 Accept (or visit) the AST node using current visitor. More...
 
virtual void nmodl::ast::Ast::accept (visitor::ConstVisitor &v) const =0
 Accept (or visit) the AST node using a given visitor. More...
 
virtual void nmodl::ast::Ast::visit_children (visitor::Visitor &v)=0
 Visit children i.e. More...
 
virtual void nmodl::ast::Ast::visit_children (visitor::ConstVisitor &v) const =0
 Visit children i.e. More...
 
virtual Astnmodl::ast::Ast::clone () const
 Create a copy of the current node. More...
 

Not implemented

virtual std::string nmodl::ast::Ast::get_node_name () const
 Return name of of the node. More...
 
virtual const ModTokennmodl::ast::Ast::get_token () const
 Return associated token for the AST node. More...
 
virtual symtab::SymbolTablenmodl::ast::Ast::get_symbol_table () const
 Return associated symbol table for the AST node. More...
 
virtual std::shared_ptr< StatementBlocknmodl::ast::Ast::get_statement_block () const
 Return associated statement block for the AST node. More...
 
virtual void nmodl::ast::Ast::set_symbol_table (symtab::SymbolTable *symtab)
 Set symbol table for the AST node. More...
 
virtual void nmodl::ast::Ast::set_name (const std::string &name)
 Set name for the AST node. More...
 
virtual void nmodl::ast::Ast::negate ()
 Negate the value of AST node. More...
 

Function Documentation

◆ accept() [1/2]

virtual void nmodl::ast::Ast::accept ( visitor::ConstVisitor v) const
pure virtual

Accept (or visit) the AST node using a given visitor.

Parameters
vconstant visitor visiting the AST node accept(visitor::Visitor&);

Implemented in nmodl::ast::EigenNewtonSolverBlock, nmodl::ast::EigenLinearSolverBlock, nmodl::ast::AssignedDefinition, nmodl::ast::FunctionBlock, nmodl::ast::ProcedureBlock, nmodl::ast::CvodeBlock, nmodl::ast::Useion, nmodl::ast::FromStatement, nmodl::ast::LinearBlock, nmodl::ast::NonLinearBlock, nmodl::ast::AssignedBlock, nmodl::ast::ReactionStatement, nmodl::ast::TableStatement, nmodl::ast::FactorDef, nmodl::ast::FunctionTableBlock, nmodl::ast::KineticBlock, nmodl::ast::LongitudinalDiffusionBlock, nmodl::ast::StatementBlock, nmodl::ast::DerivativeBlock, nmodl::ast::SolveBlock, nmodl::ast::Program, nmodl::ast::IfStatement, nmodl::ast::ParamAssign, nmodl::ast::DiscreteBlock, nmodl::ast::ForNetcon, nmodl::ast::NetReceiveBlock, nmodl::ast::Global, nmodl::ast::LocalListStatement, nmodl::ast::Pointer, nmodl::ast::WatchStatement, nmodl::ast::VarName, nmodl::ast::Compartment, nmodl::ast::LonDiffuse, nmodl::ast::BinaryExpression, nmodl::ast::BreakpointBlock, nmodl::ast::DestructorBlock, nmodl::ast::NeuronBlock, nmodl::ast::ConstantVar, nmodl::ast::ParamBlock, nmodl::ast::AfterBlock, nmodl::ast::ConstructorBlock, nmodl::ast::StateBlock, nmodl::ast::ConstantBlock, nmodl::ast::InitialBlock, nmodl::ast::BABlock, nmodl::ast::IndependentBlock, nmodl::ast::Define, nmodl::ast::LagStatement, nmodl::ast::PrimeName, nmodl::ast::Argument, nmodl::ast::ConductanceHint, nmodl::ast::IndexedName, nmodl::ast::BeforeBlock, nmodl::ast::NrnStateBlock, nmodl::ast::UnitBlock, nmodl::ast::Include, nmodl::ast::Conserve, nmodl::ast::ElseIfStatement, nmodl::ast::Integer, nmodl::ast::LinEquation, nmodl::ast::NonLinEquation, nmodl::ast::WhileStatement, nmodl::ast::FunctionCall, nmodl::ast::ReactVarName, nmodl::ast::Suffix, nmodl::ast::UnitDef, nmodl::ast::Name, nmodl::ast::UnaryExpression, nmodl::ast::BbcorePointer, nmodl::ast::DoubleUnit, nmodl::ast::Limits, nmodl::ast::NumberRange, nmodl::ast::RandomVarList, nmodl::ast::SolutionExpression, nmodl::ast::Valence, nmodl::ast::Watch, nmodl::ast::Double, nmodl::ast::String, nmodl::ast::BlockComment, nmodl::ast::ElectrodeCurrent, nmodl::ast::ElseStatement, nmodl::ast::External, nmodl::ast::Model, nmodl::ast::Nonspecific, nmodl::ast::OntologyStatement, nmodl::ast::ProtectStatement, nmodl::ast::Range, nmodl::ast::UpdateDt, nmodl::ast::Verbatim, nmodl::ast::BbcorePointerVar, nmodl::ast::ElectrodeCurVar, nmodl::ast::ExternVar, nmodl::ast::GlobalVar, nmodl::ast::LocalVar, nmodl::ast::NonspecificCurVar, nmodl::ast::PointerVar, nmodl::ast::RandomVar, nmodl::ast::RangeVar, nmodl::ast::ReadIonVar, nmodl::ast::Unit, nmodl::ast::WriteIonVar, nmodl::ast::Float, nmodl::ast::Boolean, nmodl::ast::ConstantStatement, nmodl::ast::DerivimplicitCallback, nmodl::ast::DiffEqExpression, nmodl::ast::ExpressionStatement, nmodl::ast::LineComment, nmodl::ast::ParenExpression, nmodl::ast::WrappedExpression, nmodl::ast::BABlockType, nmodl::ast::BinaryOperator, nmodl::ast::ReactionOperator, nmodl::ast::UnaryOperator, nmodl::ast::UnitState, nmodl::ast::MutexLock, nmodl::ast::MutexUnlock, nmodl::ast::ThreadSafe, nmodl::ast::Block, nmodl::ast::Number, nmodl::ast::Expression, nmodl::ast::Identifier, nmodl::ast::Node, and nmodl::ast::Statement.

◆ accept() [2/2]

virtual void nmodl::ast::Ast::accept ( visitor::Visitor v)
pure virtual

Accept (or visit) the AST node using current visitor.

Instead of visiting children of AST node, like Ast::visit_children, accept allows to visit the current node itself using the concrete visitor provided.

Parameters
vConcrete visitor that will be used to recursively visit children
Note
Below is an example of accept method implementation which shows how visitor method corresponding to ast::IndexedName node is called allowing to visit the node itself in the visitor.
void IndexedName::accept(visitor::Visitor& v) override {
v.visit_indexed_name(this);
}

Implemented in nmodl::ast::EigenNewtonSolverBlock, nmodl::ast::EigenLinearSolverBlock, nmodl::ast::AssignedDefinition, nmodl::ast::FunctionBlock, nmodl::ast::ProcedureBlock, nmodl::ast::CvodeBlock, nmodl::ast::Useion, nmodl::ast::FromStatement, nmodl::ast::LinearBlock, nmodl::ast::NonLinearBlock, nmodl::ast::AssignedBlock, nmodl::ast::ReactionStatement, nmodl::ast::TableStatement, nmodl::ast::FactorDef, nmodl::ast::FunctionTableBlock, nmodl::ast::KineticBlock, nmodl::ast::LongitudinalDiffusionBlock, nmodl::ast::StatementBlock, nmodl::ast::DerivativeBlock, nmodl::ast::SolveBlock, nmodl::ast::Program, nmodl::ast::IfStatement, nmodl::ast::ParamAssign, nmodl::ast::DiscreteBlock, nmodl::ast::ForNetcon, nmodl::ast::NetReceiveBlock, nmodl::ast::Global, nmodl::ast::LocalListStatement, nmodl::ast::Pointer, nmodl::ast::WatchStatement, nmodl::ast::VarName, nmodl::ast::Compartment, nmodl::ast::LonDiffuse, nmodl::ast::BinaryExpression, nmodl::ast::BreakpointBlock, nmodl::ast::DestructorBlock, nmodl::ast::NeuronBlock, nmodl::ast::ConstantVar, nmodl::ast::ParamBlock, nmodl::ast::AfterBlock, nmodl::ast::ConstructorBlock, nmodl::ast::StateBlock, nmodl::ast::ConstantBlock, nmodl::ast::InitialBlock, nmodl::ast::BABlock, nmodl::ast::IndependentBlock, nmodl::ast::Define, nmodl::ast::LagStatement, nmodl::ast::PrimeName, nmodl::ast::Argument, nmodl::ast::ConductanceHint, nmodl::ast::IndexedName, nmodl::ast::BeforeBlock, nmodl::ast::NrnStateBlock, nmodl::ast::UnitBlock, nmodl::ast::Include, nmodl::ast::Conserve, nmodl::ast::ElseIfStatement, nmodl::ast::Integer, nmodl::ast::LinEquation, nmodl::ast::NonLinEquation, nmodl::ast::WhileStatement, nmodl::ast::FunctionCall, nmodl::ast::ReactVarName, nmodl::ast::Suffix, nmodl::ast::UnitDef, nmodl::ast::Name, nmodl::ast::UnaryExpression, nmodl::ast::BbcorePointer, nmodl::ast::DoubleUnit, nmodl::ast::Limits, nmodl::ast::NumberRange, nmodl::ast::RandomVarList, nmodl::ast::SolutionExpression, nmodl::ast::Valence, nmodl::ast::Watch, nmodl::ast::Double, nmodl::ast::String, nmodl::ast::BlockComment, nmodl::ast::ElectrodeCurrent, nmodl::ast::ElseStatement, nmodl::ast::External, nmodl::ast::Model, nmodl::ast::Nonspecific, nmodl::ast::OntologyStatement, nmodl::ast::ProtectStatement, nmodl::ast::Range, nmodl::ast::UpdateDt, nmodl::ast::Verbatim, nmodl::ast::BbcorePointerVar, nmodl::ast::ElectrodeCurVar, nmodl::ast::ExternVar, nmodl::ast::GlobalVar, nmodl::ast::LocalVar, nmodl::ast::NonspecificCurVar, nmodl::ast::PointerVar, nmodl::ast::RandomVar, nmodl::ast::RangeVar, nmodl::ast::ReadIonVar, nmodl::ast::Unit, nmodl::ast::WriteIonVar, nmodl::ast::Float, nmodl::ast::Boolean, nmodl::ast::ConstantStatement, nmodl::ast::DerivimplicitCallback, nmodl::ast::DiffEqExpression, nmodl::ast::ExpressionStatement, nmodl::ast::LineComment, nmodl::ast::ParenExpression, nmodl::ast::WrappedExpression, nmodl::ast::BABlockType, nmodl::ast::BinaryOperator, nmodl::ast::ReactionOperator, nmodl::ast::UnaryOperator, nmodl::ast::UnitState, nmodl::ast::MutexLock, nmodl::ast::MutexUnlock, nmodl::ast::ThreadSafe, nmodl::ast::Block, nmodl::ast::Number, nmodl::ast::Expression, nmodl::ast::Identifier, nmodl::ast::Node, and nmodl::ast::Statement.

◆ Ast()

nmodl::ast::Ast::Ast ( )
default

◆ clone()

Ast * nmodl::ast::Ast::clone ( ) const
virtual

Create a copy of the current node.

Ast member function definition.

Recursively make a new copy/clone of the current node including all members and return a pointer to the node. This is used for passes like nmodl::visitor::InlineVisitor where nodes are cloned in the ast.

Returns
pointer to the clone/copy of the current node

Reimplemented in nmodl::ast::LinearBlock, nmodl::ast::BinaryExpression, nmodl::ast::NonLinearBlock, nmodl::ast::AssignedBlock, nmodl::ast::BreakpointBlock, nmodl::ast::DestructorBlock, nmodl::ast::NeuronBlock, nmodl::ast::ParamBlock, nmodl::ast::StatementBlock, nmodl::ast::AfterBlock, nmodl::ast::ConstructorBlock, nmodl::ast::DerivativeBlock, nmodl::ast::Double, nmodl::ast::StateBlock, nmodl::ast::EigenNewtonSolverBlock, nmodl::ast::Integer, nmodl::ast::String, nmodl::ast::ConstantBlock, nmodl::ast::InitialBlock, nmodl::ast::PrimeName, nmodl::ast::Argument, nmodl::ast::AssignedDefinition, nmodl::ast::EigenLinearSolverBlock, nmodl::ast::IndexedName, nmodl::ast::LagStatement, nmodl::ast::ConductanceHint, nmodl::ast::Useion, nmodl::ast::FactorDef, nmodl::ast::FunctionBlock, nmodl::ast::IndependentBlock, nmodl::ast::ProcedureBlock, nmodl::ast::ReactionStatement, nmodl::ast::TableStatement, nmodl::ast::VarName, nmodl::ast::BbcorePointer, nmodl::ast::CvodeBlock, nmodl::ast::FromStatement, nmodl::ast::RandomVarList, nmodl::ast::FunctionTableBlock, nmodl::ast::IfStatement, nmodl::ast::KineticBlock, nmodl::ast::Name, nmodl::ast::BABlock, nmodl::ast::LongitudinalDiffusionBlock, nmodl::ast::ParamAssign, nmodl::ast::SolveBlock, nmodl::ast::Compartment, nmodl::ast::Float, nmodl::ast::ForNetcon, nmodl::ast::LonDiffuse, nmodl::ast::NetReceiveBlock, nmodl::ast::Program, nmodl::ast::ConstantVar, nmodl::ast::DiscreteBlock, nmodl::ast::BABlockType, nmodl::ast::Boolean, nmodl::ast::Include, nmodl::ast::UnaryExpression, nmodl::ast::BeforeBlock, nmodl::ast::Conserve, nmodl::ast::ConstantStatement, nmodl::ast::Define, nmodl::ast::DoubleUnit, nmodl::ast::ElseIfStatement, nmodl::ast::FunctionCall, nmodl::ast::Limits, nmodl::ast::LinEquation, nmodl::ast::NonLinEquation, nmodl::ast::NrnStateBlock, nmodl::ast::NumberRange, nmodl::ast::ReactVarName, nmodl::ast::SolutionExpression, nmodl::ast::Suffix, nmodl::ast::UnitBlock, nmodl::ast::UnitDef, nmodl::ast::Valence, nmodl::ast::Watch, nmodl::ast::WhileStatement, nmodl::ast::BbcorePointerVar, nmodl::ast::BinaryOperator, nmodl::ast::Block, nmodl::ast::BlockComment, nmodl::ast::DerivimplicitCallback, nmodl::ast::DiffEqExpression, nmodl::ast::ElectrodeCurVar, nmodl::ast::ElectrodeCurrent, nmodl::ast::ElseStatement, nmodl::ast::ExpressionStatement, nmodl::ast::ExternVar, nmodl::ast::External, nmodl::ast::Global, nmodl::ast::GlobalVar, nmodl::ast::LineComment, nmodl::ast::LocalListStatement, nmodl::ast::LocalVar, nmodl::ast::Model, nmodl::ast::Nonspecific, nmodl::ast::NonspecificCurVar, nmodl::ast::OntologyStatement, nmodl::ast::ParenExpression, nmodl::ast::Pointer, nmodl::ast::PointerVar, nmodl::ast::ProtectStatement, nmodl::ast::RandomVar, nmodl::ast::Range, nmodl::ast::RangeVar, nmodl::ast::ReactionOperator, nmodl::ast::ReadIonVar, nmodl::ast::UnaryOperator, nmodl::ast::Unit, nmodl::ast::UpdateDt, nmodl::ast::Verbatim, nmodl::ast::WatchStatement, nmodl::ast::WrappedExpression, nmodl::ast::WriteIonVar, nmodl::ast::UnitState, nmodl::ast::Number, nmodl::ast::Expression, nmodl::ast::Identifier, nmodl::ast::MutexLock, nmodl::ast::MutexUnlock, nmodl::ast::ThreadSafe, nmodl::ast::Node, and nmodl::ast::Statement.

Definition at line 26 of file ast.cpp.

◆ get_nmodl_name()

virtual std::string nmodl::ast::Ast::get_nmodl_name ( ) const
inlinevirtual

Return NMODL statement of ast node as std::string.

Every node is related to a special statement in the NMODL. This statement can be returned as a std::string for printing to text/json form.

Returns
name of the statement as a string
See also
Ast::get_nmodl_name

Reimplemented in nmodl::ast::LinearBlock, nmodl::ast::NonLinearBlock, nmodl::ast::AssignedBlock, nmodl::ast::BreakpointBlock, nmodl::ast::DestructorBlock, nmodl::ast::NeuronBlock, nmodl::ast::ParamBlock, nmodl::ast::AfterBlock, nmodl::ast::ConstructorBlock, nmodl::ast::DerivativeBlock, nmodl::ast::StateBlock, nmodl::ast::EigenNewtonSolverBlock, nmodl::ast::ConstantBlock, nmodl::ast::InitialBlock, nmodl::ast::EigenLinearSolverBlock, nmodl::ast::LagStatement, nmodl::ast::ConductanceHint, nmodl::ast::Useion, nmodl::ast::FunctionBlock, nmodl::ast::IndependentBlock, nmodl::ast::ProcedureBlock, nmodl::ast::ReactionStatement, nmodl::ast::TableStatement, nmodl::ast::BbcorePointer, nmodl::ast::CvodeBlock, nmodl::ast::FromStatement, nmodl::ast::RandomVarList, nmodl::ast::FunctionTableBlock, nmodl::ast::IfStatement, nmodl::ast::KineticBlock, nmodl::ast::LongitudinalDiffusionBlock, nmodl::ast::SolveBlock, nmodl::ast::Compartment, nmodl::ast::ForNetcon, nmodl::ast::LonDiffuse, nmodl::ast::NetReceiveBlock, nmodl::ast::DiscreteBlock, nmodl::ast::Include, nmodl::ast::BeforeBlock, nmodl::ast::Conserve, nmodl::ast::Define, nmodl::ast::ElseIfStatement, nmodl::ast::LinEquation, nmodl::ast::NonLinEquation, nmodl::ast::NrnStateBlock, nmodl::ast::UnitBlock, nmodl::ast::WhileStatement, nmodl::ast::BlockComment, nmodl::ast::ElectrodeCurrent, nmodl::ast::ElseStatement, nmodl::ast::External, nmodl::ast::Global, nmodl::ast::LocalListStatement, nmodl::ast::Model, nmodl::ast::Nonspecific, nmodl::ast::OntologyStatement, nmodl::ast::Pointer, nmodl::ast::ProtectStatement, nmodl::ast::Range, nmodl::ast::UpdateDt, nmodl::ast::Verbatim, nmodl::ast::WatchStatement, nmodl::ast::MutexLock, nmodl::ast::MutexUnlock, and nmodl::ast::ThreadSafe.

Definition at line 141 of file ast.hpp.

◆ get_node_name()

◆ get_node_type()

virtual AstNodeType nmodl::ast::Ast::get_node_type ( ) const
pure virtual

Return type (ast::AstNodeType) of AST node.

Every node in the ast has a type defined in ast::AstNodeType. This type is can be used to check/compare node types.

Implemented in nmodl::ast::LinearBlock, nmodl::ast::BinaryExpression, nmodl::ast::NonLinearBlock, nmodl::ast::AssignedBlock, nmodl::ast::BreakpointBlock, nmodl::ast::DestructorBlock, nmodl::ast::NeuronBlock, nmodl::ast::ParamBlock, nmodl::ast::StatementBlock, nmodl::ast::AfterBlock, nmodl::ast::ConstructorBlock, nmodl::ast::DerivativeBlock, nmodl::ast::Double, nmodl::ast::StateBlock, nmodl::ast::EigenNewtonSolverBlock, nmodl::ast::Integer, nmodl::ast::String, nmodl::ast::ConstantBlock, nmodl::ast::InitialBlock, nmodl::ast::PrimeName, nmodl::ast::Argument, nmodl::ast::AssignedDefinition, nmodl::ast::EigenLinearSolverBlock, nmodl::ast::IndexedName, nmodl::ast::LagStatement, nmodl::ast::ConductanceHint, nmodl::ast::Useion, nmodl::ast::FactorDef, nmodl::ast::FunctionBlock, nmodl::ast::IndependentBlock, nmodl::ast::ProcedureBlock, nmodl::ast::ReactionStatement, nmodl::ast::TableStatement, nmodl::ast::VarName, nmodl::ast::BbcorePointer, nmodl::ast::CvodeBlock, nmodl::ast::FromStatement, nmodl::ast::RandomVarList, nmodl::ast::FunctionTableBlock, nmodl::ast::IfStatement, nmodl::ast::KineticBlock, nmodl::ast::Name, nmodl::ast::BABlock, nmodl::ast::LongitudinalDiffusionBlock, nmodl::ast::ParamAssign, nmodl::ast::SolveBlock, nmodl::ast::Compartment, nmodl::ast::Float, nmodl::ast::ForNetcon, nmodl::ast::LonDiffuse, nmodl::ast::NetReceiveBlock, nmodl::ast::Program, nmodl::ast::ConstantVar, nmodl::ast::DiscreteBlock, nmodl::ast::BABlockType, nmodl::ast::Boolean, nmodl::ast::Include, nmodl::ast::UnaryExpression, nmodl::ast::BeforeBlock, nmodl::ast::Conserve, nmodl::ast::ConstantStatement, nmodl::ast::Define, nmodl::ast::DoubleUnit, nmodl::ast::ElseIfStatement, nmodl::ast::FunctionCall, nmodl::ast::Limits, nmodl::ast::LinEquation, nmodl::ast::NonLinEquation, nmodl::ast::NrnStateBlock, nmodl::ast::NumberRange, nmodl::ast::ReactVarName, nmodl::ast::SolutionExpression, nmodl::ast::Suffix, nmodl::ast::UnitBlock, nmodl::ast::UnitDef, nmodl::ast::Valence, nmodl::ast::Watch, nmodl::ast::WhileStatement, nmodl::ast::BbcorePointerVar, nmodl::ast::BinaryOperator, nmodl::ast::Block, nmodl::ast::BlockComment, nmodl::ast::DerivimplicitCallback, nmodl::ast::DiffEqExpression, nmodl::ast::ElectrodeCurVar, nmodl::ast::ElectrodeCurrent, nmodl::ast::ElseStatement, nmodl::ast::ExpressionStatement, nmodl::ast::ExternVar, nmodl::ast::External, nmodl::ast::Global, nmodl::ast::GlobalVar, nmodl::ast::LineComment, nmodl::ast::LocalListStatement, nmodl::ast::LocalVar, nmodl::ast::Model, nmodl::ast::Nonspecific, nmodl::ast::NonspecificCurVar, nmodl::ast::OntologyStatement, nmodl::ast::ParenExpression, nmodl::ast::Pointer, nmodl::ast::PointerVar, nmodl::ast::ProtectStatement, nmodl::ast::RandomVar, nmodl::ast::Range, nmodl::ast::RangeVar, nmodl::ast::ReactionOperator, nmodl::ast::ReadIonVar, nmodl::ast::UnaryOperator, nmodl::ast::Unit, nmodl::ast::UpdateDt, nmodl::ast::Verbatim, nmodl::ast::WatchStatement, nmodl::ast::WrappedExpression, nmodl::ast::WriteIonVar, nmodl::ast::UnitState, nmodl::ast::Number, nmodl::ast::Expression, nmodl::ast::Identifier, nmodl::ast::MutexLock, nmodl::ast::MutexUnlock, nmodl::ast::ThreadSafe, nmodl::ast::Node, and nmodl::ast::Statement.

◆ get_node_type_name()

virtual std::string nmodl::ast::Ast::get_node_type_name ( ) const
pure virtual

Return type (ast::AstNodeType) of ast node as std::string.

Every node in the ast has a type defined in ast::AstNodeType. This type name can be returned as a std::string for printing ast to text/json form.

Returns
name of the node type as a string
See also
Ast::get_node_name

Implemented in nmodl::ast::LinearBlock, nmodl::ast::BinaryExpression, nmodl::ast::NonLinearBlock, nmodl::ast::AssignedBlock, nmodl::ast::BreakpointBlock, nmodl::ast::DestructorBlock, nmodl::ast::NeuronBlock, nmodl::ast::ParamBlock, nmodl::ast::StatementBlock, nmodl::ast::AfterBlock, nmodl::ast::ConstructorBlock, nmodl::ast::DerivativeBlock, nmodl::ast::Double, nmodl::ast::StateBlock, nmodl::ast::EigenNewtonSolverBlock, nmodl::ast::Integer, nmodl::ast::String, nmodl::ast::ConstantBlock, nmodl::ast::InitialBlock, nmodl::ast::PrimeName, nmodl::ast::Argument, nmodl::ast::AssignedDefinition, nmodl::ast::EigenLinearSolverBlock, nmodl::ast::IndexedName, nmodl::ast::LagStatement, nmodl::ast::ConductanceHint, nmodl::ast::Useion, nmodl::ast::FactorDef, nmodl::ast::FunctionBlock, nmodl::ast::IndependentBlock, nmodl::ast::ProcedureBlock, nmodl::ast::ReactionStatement, nmodl::ast::TableStatement, nmodl::ast::VarName, nmodl::ast::BbcorePointer, nmodl::ast::CvodeBlock, nmodl::ast::FromStatement, nmodl::ast::RandomVarList, nmodl::ast::FunctionTableBlock, nmodl::ast::IfStatement, nmodl::ast::KineticBlock, nmodl::ast::Name, nmodl::ast::BABlock, nmodl::ast::LongitudinalDiffusionBlock, nmodl::ast::ParamAssign, nmodl::ast::SolveBlock, nmodl::ast::Compartment, nmodl::ast::Float, nmodl::ast::ForNetcon, nmodl::ast::LonDiffuse, nmodl::ast::NetReceiveBlock, nmodl::ast::Program, nmodl::ast::ConstantVar, nmodl::ast::DiscreteBlock, nmodl::ast::BABlockType, nmodl::ast::Boolean, nmodl::ast::Include, nmodl::ast::UnaryExpression, nmodl::ast::BeforeBlock, nmodl::ast::Conserve, nmodl::ast::ConstantStatement, nmodl::ast::Define, nmodl::ast::DoubleUnit, nmodl::ast::ElseIfStatement, nmodl::ast::FunctionCall, nmodl::ast::Limits, nmodl::ast::LinEquation, nmodl::ast::NonLinEquation, nmodl::ast::NrnStateBlock, nmodl::ast::NumberRange, nmodl::ast::ReactVarName, nmodl::ast::SolutionExpression, nmodl::ast::Suffix, nmodl::ast::UnitBlock, nmodl::ast::UnitDef, nmodl::ast::Valence, nmodl::ast::Watch, nmodl::ast::WhileStatement, nmodl::ast::BbcorePointerVar, nmodl::ast::BinaryOperator, nmodl::ast::Block, nmodl::ast::BlockComment, nmodl::ast::DerivimplicitCallback, nmodl::ast::DiffEqExpression, nmodl::ast::ElectrodeCurVar, nmodl::ast::ElectrodeCurrent, nmodl::ast::ElseStatement, nmodl::ast::ExpressionStatement, nmodl::ast::ExternVar, nmodl::ast::External, nmodl::ast::Global, nmodl::ast::GlobalVar, nmodl::ast::LineComment, nmodl::ast::LocalListStatement, nmodl::ast::LocalVar, nmodl::ast::Model, nmodl::ast::Nonspecific, nmodl::ast::NonspecificCurVar, nmodl::ast::OntologyStatement, nmodl::ast::ParenExpression, nmodl::ast::Pointer, nmodl::ast::PointerVar, nmodl::ast::ProtectStatement, nmodl::ast::RandomVar, nmodl::ast::Range, nmodl::ast::RangeVar, nmodl::ast::ReactionOperator, nmodl::ast::ReadIonVar, nmodl::ast::UnaryOperator, nmodl::ast::Unit, nmodl::ast::UpdateDt, nmodl::ast::Verbatim, nmodl::ast::WatchStatement, nmodl::ast::WrappedExpression, nmodl::ast::WriteIonVar, nmodl::ast::UnitState, nmodl::ast::Number, nmodl::ast::Expression, nmodl::ast::Identifier, nmodl::ast::MutexLock, nmodl::ast::MutexUnlock, nmodl::ast::ThreadSafe, nmodl::ast::Node, and nmodl::ast::Statement.

◆ get_parent()

Ast * nmodl::ast::Ast::get_parent ( ) const
virtual

Parent getter.

returning a raw pointer may create less problems that the shared_from_this from the parent.

Check Ast::parent for more information

Definition at line 311 of file ast.cpp.

◆ get_shared_ptr() [1/2]

std::shared_ptr< const Ast > nmodl::ast::Ast::get_shared_ptr ( )
virtual

get std::shared_ptr from this pointer of the AST node

Reimplemented in nmodl::ast::LinearBlock, nmodl::ast::NonLinearBlock, nmodl::ast::AssignedBlock, nmodl::ast::BreakpointBlock, nmodl::ast::DestructorBlock, nmodl::ast::NeuronBlock, nmodl::ast::ParamBlock, nmodl::ast::AfterBlock, nmodl::ast::ConstructorBlock, nmodl::ast::DerivativeBlock, nmodl::ast::StateBlock, nmodl::ast::EigenNewtonSolverBlock, nmodl::ast::ConstantBlock, nmodl::ast::InitialBlock, nmodl::ast::EigenLinearSolverBlock, nmodl::ast::LagStatement, nmodl::ast::ConductanceHint, nmodl::ast::Useion, nmodl::ast::FunctionBlock, nmodl::ast::IndependentBlock, nmodl::ast::ProcedureBlock, nmodl::ast::ReactionStatement, nmodl::ast::TableStatement, nmodl::ast::BbcorePointer, nmodl::ast::CvodeBlock, nmodl::ast::FromStatement, nmodl::ast::RandomVarList, nmodl::ast::FunctionTableBlock, nmodl::ast::IfStatement, nmodl::ast::KineticBlock, nmodl::ast::LongitudinalDiffusionBlock, nmodl::ast::SolveBlock, nmodl::ast::Compartment, nmodl::ast::ForNetcon, nmodl::ast::LonDiffuse, nmodl::ast::NetReceiveBlock, nmodl::ast::BinaryExpression, nmodl::ast::DiscreteBlock, nmodl::ast::Include, nmodl::ast::BeforeBlock, nmodl::ast::Conserve, nmodl::ast::Define, nmodl::ast::ElseIfStatement, nmodl::ast::LinEquation, nmodl::ast::NonLinEquation, nmodl::ast::NrnStateBlock, nmodl::ast::StatementBlock, nmodl::ast::UnitBlock, nmodl::ast::WhileStatement, nmodl::ast::Double, nmodl::ast::BlockComment, nmodl::ast::ElectrodeCurrent, nmodl::ast::ElseStatement, nmodl::ast::External, nmodl::ast::Global, nmodl::ast::Integer, nmodl::ast::LocalListStatement, nmodl::ast::Model, nmodl::ast::Nonspecific, nmodl::ast::OntologyStatement, nmodl::ast::Pointer, nmodl::ast::ProtectStatement, nmodl::ast::Range, nmodl::ast::String, nmodl::ast::UpdateDt, nmodl::ast::Verbatim, nmodl::ast::WatchStatement, nmodl::ast::PrimeName, nmodl::ast::Argument, nmodl::ast::AssignedDefinition, nmodl::ast::IndexedName, nmodl::ast::FactorDef, nmodl::ast::MutexLock, nmodl::ast::MutexUnlock, nmodl::ast::ThreadSafe, nmodl::ast::VarName, nmodl::ast::Name, nmodl::ast::BABlock, nmodl::ast::ParamAssign, nmodl::ast::Float, nmodl::ast::Program, nmodl::ast::ConstantVar, nmodl::ast::BABlockType, nmodl::ast::Boolean, nmodl::ast::UnaryExpression, nmodl::ast::ConstantStatement, nmodl::ast::DoubleUnit, nmodl::ast::FunctionCall, nmodl::ast::Limits, nmodl::ast::NumberRange, nmodl::ast::ReactVarName, nmodl::ast::SolutionExpression, nmodl::ast::Suffix, nmodl::ast::UnitDef, nmodl::ast::Valence, nmodl::ast::Watch, nmodl::ast::BbcorePointerVar, nmodl::ast::BinaryOperator, nmodl::ast::Block, nmodl::ast::DerivimplicitCallback, nmodl::ast::DiffEqExpression, nmodl::ast::ElectrodeCurVar, nmodl::ast::ExpressionStatement, nmodl::ast::ExternVar, nmodl::ast::GlobalVar, nmodl::ast::LineComment, nmodl::ast::LocalVar, nmodl::ast::NonspecificCurVar, nmodl::ast::ParenExpression, nmodl::ast::PointerVar, nmodl::ast::RandomVar, nmodl::ast::RangeVar, nmodl::ast::ReactionOperator, nmodl::ast::ReadIonVar, nmodl::ast::UnaryOperator, nmodl::ast::Unit, nmodl::ast::WrappedExpression, nmodl::ast::WriteIonVar, nmodl::ast::UnitState, nmodl::ast::Number, nmodl::ast::Expression, nmodl::ast::Identifier, nmodl::ast::Node, and nmodl::ast::Statement.

Definition at line 52 of file ast.cpp.

◆ get_shared_ptr() [2/2]

virtual std::shared_ptr<const Ast> nmodl::ast::Ast::get_shared_ptr ( ) const
virtual

get std::shared_ptr from this pointer of the AST node

Reimplemented in nmodl::ast::LinearBlock, nmodl::ast::NonLinearBlock, nmodl::ast::AssignedBlock, nmodl::ast::BreakpointBlock, nmodl::ast::DestructorBlock, nmodl::ast::NeuronBlock, nmodl::ast::ParamBlock, nmodl::ast::AfterBlock, nmodl::ast::ConstructorBlock, nmodl::ast::DerivativeBlock, nmodl::ast::StateBlock, nmodl::ast::EigenNewtonSolverBlock, nmodl::ast::ConstantBlock, nmodl::ast::InitialBlock, nmodl::ast::EigenLinearSolverBlock, nmodl::ast::LagStatement, nmodl::ast::ConductanceHint, nmodl::ast::Useion, nmodl::ast::FunctionBlock, nmodl::ast::IndependentBlock, nmodl::ast::ProcedureBlock, nmodl::ast::ReactionStatement, nmodl::ast::TableStatement, nmodl::ast::BbcorePointer, nmodl::ast::CvodeBlock, nmodl::ast::FromStatement, nmodl::ast::RandomVarList, nmodl::ast::FunctionTableBlock, nmodl::ast::IfStatement, nmodl::ast::KineticBlock, nmodl::ast::LongitudinalDiffusionBlock, nmodl::ast::SolveBlock, nmodl::ast::Compartment, nmodl::ast::ForNetcon, nmodl::ast::LonDiffuse, nmodl::ast::NetReceiveBlock, nmodl::ast::BinaryExpression, nmodl::ast::DiscreteBlock, nmodl::ast::Include, nmodl::ast::BeforeBlock, nmodl::ast::Conserve, nmodl::ast::Define, nmodl::ast::ElseIfStatement, nmodl::ast::LinEquation, nmodl::ast::NonLinEquation, nmodl::ast::NrnStateBlock, nmodl::ast::StatementBlock, nmodl::ast::UnitBlock, nmodl::ast::WhileStatement, nmodl::ast::Double, nmodl::ast::BlockComment, nmodl::ast::ElectrodeCurrent, nmodl::ast::ElseStatement, nmodl::ast::External, nmodl::ast::Global, nmodl::ast::Integer, nmodl::ast::LocalListStatement, nmodl::ast::Model, nmodl::ast::Nonspecific, nmodl::ast::OntologyStatement, nmodl::ast::Pointer, nmodl::ast::ProtectStatement, nmodl::ast::Range, nmodl::ast::String, nmodl::ast::UpdateDt, nmodl::ast::Verbatim, nmodl::ast::WatchStatement, nmodl::ast::PrimeName, nmodl::ast::Argument, nmodl::ast::AssignedDefinition, nmodl::ast::IndexedName, nmodl::ast::FactorDef, nmodl::ast::MutexLock, nmodl::ast::MutexUnlock, nmodl::ast::ThreadSafe, nmodl::ast::VarName, nmodl::ast::Name, nmodl::ast::BABlock, nmodl::ast::ParamAssign, nmodl::ast::Float, nmodl::ast::Program, nmodl::ast::ConstantVar, nmodl::ast::BABlockType, nmodl::ast::Boolean, nmodl::ast::UnaryExpression, nmodl::ast::ConstantStatement, nmodl::ast::DoubleUnit, nmodl::ast::FunctionCall, nmodl::ast::Limits, nmodl::ast::NumberRange, nmodl::ast::ReactVarName, nmodl::ast::SolutionExpression, nmodl::ast::Suffix, nmodl::ast::UnitDef, nmodl::ast::Valence, nmodl::ast::Watch, nmodl::ast::BbcorePointerVar, nmodl::ast::BinaryOperator, nmodl::ast::Block, nmodl::ast::DerivimplicitCallback, nmodl::ast::DiffEqExpression, nmodl::ast::ElectrodeCurVar, nmodl::ast::ExpressionStatement, nmodl::ast::ExternVar, nmodl::ast::GlobalVar, nmodl::ast::LineComment, nmodl::ast::LocalVar, nmodl::ast::NonspecificCurVar, nmodl::ast::ParenExpression, nmodl::ast::PointerVar, nmodl::ast::RandomVar, nmodl::ast::RangeVar, nmodl::ast::ReactionOperator, nmodl::ast::ReadIonVar, nmodl::ast::UnaryOperator, nmodl::ast::Unit, nmodl::ast::WrappedExpression, nmodl::ast::WriteIonVar, nmodl::ast::UnitState, nmodl::ast::Number, nmodl::ast::Expression, nmodl::ast::Identifier, nmodl::ast::Node, and nmodl::ast::Statement.

◆ get_statement_block()

std::shared_ptr< StatementBlock > nmodl::ast::Ast::get_statement_block ( ) const
virtual

Return associated statement block for the AST node.

Top level block nodes encloses all statements in the ast::StatementBlock. For example, ast::BreakpointBlock has all statements in curly brace ({ }) stored in ast::StatementBlock :

BREAKPOINT {
SOLVE states METHOD cnexp
gNaTs2_t = gNaTs2_tbar*m*m*m*h
ina = gNaTs2_t*(v-ena)
}

This method return enclosing statement block.

Returns
pointer to the statement block if exist
See also
ast::StatementBlock

Reimplemented in nmodl::ast::LinearBlock, nmodl::ast::FunctionBlock, nmodl::ast::NonLinearBlock, nmodl::ast::ProcedureBlock, nmodl::ast::FromStatement, nmodl::ast::KineticBlock, nmodl::ast::DerivativeBlock, nmodl::ast::DiscreteBlock, nmodl::ast::BreakpointBlock, nmodl::ast::DestructorBlock, nmodl::ast::NeuronBlock, nmodl::ast::ConstructorBlock, nmodl::ast::ForNetcon, nmodl::ast::NetReceiveBlock, nmodl::ast::InitialBlock, nmodl::ast::IfStatement, nmodl::ast::BABlock, nmodl::ast::ElseIfStatement, nmodl::ast::WhileStatement, and nmodl::ast::ElseStatement.

Definition at line 32 of file ast.cpp.

◆ get_symbol_table()

◆ get_token()

const ModToken * nmodl::ast::Ast::get_token ( ) const
virtual

Return associated token for the AST node.

Not all ast nodes have token information. For example, nmodl::visitor::NeuronSolveVisitor can insert new nodes in the ast as a solution of ODEs. In this case, we return nullptr to store in the nmodl::symtab::SymbolTable.

Returns
pointer to token if exist otherwise nullptr

Reimplemented in nmodl::ast::LinearBlock, nmodl::ast::NonLinearBlock, nmodl::ast::AssignedBlock, nmodl::ast::BreakpointBlock, nmodl::ast::DestructorBlock, nmodl::ast::NeuronBlock, nmodl::ast::ParamBlock, nmodl::ast::AfterBlock, nmodl::ast::ConstructorBlock, nmodl::ast::DerivativeBlock, nmodl::ast::StateBlock, nmodl::ast::EigenNewtonSolverBlock, nmodl::ast::ConstantBlock, nmodl::ast::InitialBlock, nmodl::ast::EigenLinearSolverBlock, nmodl::ast::LagStatement, nmodl::ast::ConductanceHint, nmodl::ast::Useion, nmodl::ast::FunctionBlock, nmodl::ast::IndependentBlock, nmodl::ast::ProcedureBlock, nmodl::ast::ReactionStatement, nmodl::ast::TableStatement, nmodl::ast::BbcorePointer, nmodl::ast::CvodeBlock, nmodl::ast::FromStatement, nmodl::ast::RandomVarList, nmodl::ast::FunctionTableBlock, nmodl::ast::IfStatement, nmodl::ast::KineticBlock, nmodl::ast::LongitudinalDiffusionBlock, nmodl::ast::SolveBlock, nmodl::ast::Compartment, nmodl::ast::ForNetcon, nmodl::ast::LonDiffuse, nmodl::ast::NetReceiveBlock, nmodl::ast::BinaryExpression, nmodl::ast::DiscreteBlock, nmodl::ast::Include, nmodl::ast::BeforeBlock, nmodl::ast::Conserve, nmodl::ast::Define, nmodl::ast::ElseIfStatement, nmodl::ast::LinEquation, nmodl::ast::NonLinEquation, nmodl::ast::NrnStateBlock, nmodl::ast::StatementBlock, nmodl::ast::UnitBlock, nmodl::ast::WhileStatement, nmodl::ast::Double, nmodl::ast::BlockComment, nmodl::ast::ElectrodeCurrent, nmodl::ast::ElseStatement, nmodl::ast::External, nmodl::ast::Global, nmodl::ast::Integer, nmodl::ast::LocalListStatement, nmodl::ast::Model, nmodl::ast::Nonspecific, nmodl::ast::OntologyStatement, nmodl::ast::Pointer, nmodl::ast::ProtectStatement, nmodl::ast::Range, nmodl::ast::String, nmodl::ast::UpdateDt, nmodl::ast::Verbatim, nmodl::ast::WatchStatement, nmodl::ast::PrimeName, nmodl::ast::Argument, nmodl::ast::AssignedDefinition, nmodl::ast::IndexedName, nmodl::ast::FactorDef, nmodl::ast::MutexLock, nmodl::ast::MutexUnlock, nmodl::ast::ThreadSafe, nmodl::ast::VarName, nmodl::ast::Name, nmodl::ast::BABlock, nmodl::ast::ParamAssign, nmodl::ast::Float, nmodl::ast::Program, nmodl::ast::ConstantVar, nmodl::ast::BABlockType, nmodl::ast::Boolean, nmodl::ast::UnaryExpression, nmodl::ast::ConstantStatement, nmodl::ast::DoubleUnit, nmodl::ast::FunctionCall, nmodl::ast::Limits, nmodl::ast::NumberRange, nmodl::ast::ReactVarName, nmodl::ast::SolutionExpression, nmodl::ast::Suffix, nmodl::ast::UnitDef, nmodl::ast::Valence, nmodl::ast::Watch, nmodl::ast::BbcorePointerVar, nmodl::ast::BinaryOperator, nmodl::ast::DerivimplicitCallback, nmodl::ast::DiffEqExpression, nmodl::ast::ElectrodeCurVar, nmodl::ast::ExpressionStatement, nmodl::ast::ExternVar, nmodl::ast::GlobalVar, nmodl::ast::LineComment, nmodl::ast::LocalVar, nmodl::ast::NonspecificCurVar, nmodl::ast::ParenExpression, nmodl::ast::PointerVar, nmodl::ast::RandomVar, nmodl::ast::RangeVar, nmodl::ast::ReactionOperator, nmodl::ast::ReadIonVar, nmodl::ast::UnaryOperator, nmodl::ast::Unit, nmodl::ast::WrappedExpression, nmodl::ast::WriteIonVar, and nmodl::ast::UnitState.

Definition at line 36 of file ast.cpp.

◆ is_after_block()

bool nmodl::ast::Ast::is_after_block ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::AfterBlock.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::AfterBlock.

Definition at line 154 of file ast.cpp.

◆ is_argument()

bool nmodl::ast::Ast::is_argument ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::Argument.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::Argument.

Definition at line 92 of file ast.cpp.

◆ is_assigned_block()

bool nmodl::ast::Ast::is_assigned_block ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::AssignedBlock.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::AssignedBlock.

Definition at line 120 of file ast.cpp.

◆ is_assigned_definition()

bool nmodl::ast::Ast::is_assigned_definition ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::AssignedDefinition.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::AssignedDefinition.

Definition at line 222 of file ast.cpp.

◆ is_ast()

bool nmodl::ast::Ast::is_ast ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::Ast.

Returns
true if object of type ast::Ast

Definition at line 60 of file ast.cpp.

◆ is_ba_block()

bool nmodl::ast::Ast::is_ba_block ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::BABlock.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::BABlock.

Definition at line 156 of file ast.cpp.

◆ is_ba_block_type()

bool nmodl::ast::Ast::is_ba_block_type ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::BABlockType.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::BABlockType.

Definition at line 202 of file ast.cpp.

◆ is_bbcore_pointer()

bool nmodl::ast::Ast::is_bbcore_pointer ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::BbcorePointer.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::BbcorePointer.

Definition at line 276 of file ast.cpp.

◆ is_bbcore_pointer_var()

bool nmodl::ast::Ast::is_bbcore_pointer_var ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::BbcorePointerVar.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::BbcorePointerVar.

Definition at line 112 of file ast.cpp.

◆ is_before_block()

bool nmodl::ast::Ast::is_before_block ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::BeforeBlock.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::BeforeBlock.

Definition at line 152 of file ast.cpp.

◆ is_binary_expression()

bool nmodl::ast::Ast::is_binary_expression ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::BinaryExpression.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::BinaryExpression.

Definition at line 188 of file ast.cpp.

◆ is_binary_operator()

bool nmodl::ast::Ast::is_binary_operator ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::BinaryOperator.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::BinaryOperator.

Definition at line 180 of file ast.cpp.

◆ is_block()

bool nmodl::ast::Ast::is_block ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::Block.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::Block.

Definition at line 68 of file ast.cpp.

◆ is_block_comment()

bool nmodl::ast::Ast::is_block_comment ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::BlockComment.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::BlockComment.

Definition at line 286 of file ast.cpp.

◆ is_boolean()

bool nmodl::ast::Ast::is_boolean ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::Boolean.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::Boolean.

Definition at line 82 of file ast.cpp.

◆ is_breakpoint_block()

bool nmodl::ast::Ast::is_breakpoint_block ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::BreakpointBlock.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::BreakpointBlock.

Definition at line 150 of file ast.cpp.

◆ is_compartment()

bool nmodl::ast::Ast::is_compartment ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::Compartment.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::Compartment.

Definition at line 248 of file ast.cpp.

◆ is_conductance_hint()

bool nmodl::ast::Ast::is_conductance_hint ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::ConductanceHint.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::ConductanceHint.

Definition at line 224 of file ast.cpp.

◆ is_conserve()

bool nmodl::ast::Ast::is_conserve ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::Conserve.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::Conserve.

Definition at line 246 of file ast.cpp.

◆ is_constant_block()

bool nmodl::ast::Ast::is_constant_block ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::ConstantBlock.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::ConstantBlock.

Definition at line 164 of file ast.cpp.

◆ is_constant_statement()

bool nmodl::ast::Ast::is_constant_statement ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::ConstantStatement.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::ConstantStatement.

Definition at line 256 of file ast.cpp.

◆ is_constant_var()

bool nmodl::ast::Ast::is_constant_var ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::ConstantVar.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::ConstantVar.

Definition at line 178 of file ast.cpp.

◆ is_constructor_block()

bool nmodl::ast::Ast::is_constructor_block ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::ConstructorBlock.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::ConstructorBlock.

Definition at line 126 of file ast.cpp.

◆ is_cvode_block()

bool nmodl::ast::Ast::is_cvode_block ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::CvodeBlock.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::CvodeBlock.

Definition at line 298 of file ast.cpp.

◆ is_define()

bool nmodl::ast::Ast::is_define ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::Define.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::Define.

Definition at line 216 of file ast.cpp.

◆ is_derivative_block()

bool nmodl::ast::Ast::is_derivative_block ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::DerivativeBlock.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::DerivativeBlock.

Definition at line 132 of file ast.cpp.

◆ is_derivimplicit_callback()

bool nmodl::ast::Ast::is_derivimplicit_callback ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::DerivimplicitCallback.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::DerivimplicitCallback.

Definition at line 304 of file ast.cpp.

◆ is_destructor_block()

bool nmodl::ast::Ast::is_destructor_block ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::DestructorBlock.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::DestructorBlock.

Definition at line 128 of file ast.cpp.

◆ is_diff_eq_expression()

bool nmodl::ast::Ast::is_diff_eq_expression ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::DiffEqExpression.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::DiffEqExpression.

Definition at line 190 of file ast.cpp.

◆ is_discrete_block()

bool nmodl::ast::Ast::is_discrete_block ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::DiscreteBlock.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::DiscreteBlock.

Definition at line 138 of file ast.cpp.

◆ is_double()

bool nmodl::ast::Ast::is_double ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::Double.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::Double.

Definition at line 80 of file ast.cpp.

◆ is_double_unit()

bool nmodl::ast::Ast::is_double_unit ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::DoubleUnit.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::DoubleUnit.

Definition at line 170 of file ast.cpp.

◆ is_eigen_linear_solver_block()

bool nmodl::ast::Ast::is_eigen_linear_solver_block ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::EigenLinearSolverBlock.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::EigenLinearSolverBlock.

Definition at line 296 of file ast.cpp.

◆ is_eigen_newton_solver_block()

bool nmodl::ast::Ast::is_eigen_newton_solver_block ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::EigenNewtonSolverBlock.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::EigenNewtonSolverBlock.

Definition at line 294 of file ast.cpp.

◆ is_electrode_cur_var()

bool nmodl::ast::Ast::is_electrode_cur_var ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::ElectrodeCurVar.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::ElectrodeCurVar.

Definition at line 102 of file ast.cpp.

◆ is_electrode_current()

bool nmodl::ast::Ast::is_electrode_current ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::ElectrodeCurrent.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::ElectrodeCurrent.

Definition at line 266 of file ast.cpp.

◆ is_else_if_statement()

bool nmodl::ast::Ast::is_else_if_statement ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::ElseIfStatement.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::ElseIfStatement.

Definition at line 236 of file ast.cpp.

◆ is_else_statement()

bool nmodl::ast::Ast::is_else_statement ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::ElseStatement.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::ElseStatement.

Definition at line 238 of file ast.cpp.

◆ is_expression()

bool nmodl::ast::Ast::is_expression ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::Expression.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::Expression.

Definition at line 66 of file ast.cpp.

◆ is_expression_statement()

bool nmodl::ast::Ast::is_expression_statement ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::ExpressionStatement.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::ExpressionStatement.

Definition at line 226 of file ast.cpp.

◆ is_extern_var()

bool nmodl::ast::Ast::is_extern_var ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::ExternVar.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::ExternVar.

Definition at line 114 of file ast.cpp.

◆ is_external()

bool nmodl::ast::Ast::is_external ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::External.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::External.

Definition at line 278 of file ast.cpp.

◆ is_factor_def()

bool nmodl::ast::Ast::is_factor_def ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::FactorDef.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::FactorDef.

Definition at line 206 of file ast.cpp.

◆ is_float()

bool nmodl::ast::Ast::is_float ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::Float.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::Float.

Definition at line 78 of file ast.cpp.

◆ is_for_netcon()

bool nmodl::ast::Ast::is_for_netcon ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::ForNetcon.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::ForNetcon.

Definition at line 158 of file ast.cpp.

◆ is_from_statement()

bool nmodl::ast::Ast::is_from_statement ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::FromStatement.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::FromStatement.

Definition at line 230 of file ast.cpp.

◆ is_function_block()

bool nmodl::ast::Ast::is_function_block ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::FunctionBlock.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::FunctionBlock.

Definition at line 142 of file ast.cpp.

◆ is_function_call()

bool nmodl::ast::Ast::is_function_call ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::FunctionCall.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::FunctionCall.

Definition at line 198 of file ast.cpp.

◆ is_function_table_block()

bool nmodl::ast::Ast::is_function_table_block ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::FunctionTableBlock.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::FunctionTableBlock.

Definition at line 140 of file ast.cpp.

◆ is_global()

bool nmodl::ast::Ast::is_global ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::Global.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::Global.

Definition at line 270 of file ast.cpp.

◆ is_global_var()

bool nmodl::ast::Ast::is_global_var ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::GlobalVar.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::GlobalVar.

Definition at line 106 of file ast.cpp.

◆ is_identifier()

bool nmodl::ast::Ast::is_identifier ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::Identifier.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::Identifier.

Definition at line 70 of file ast.cpp.

◆ is_if_statement()

bool nmodl::ast::Ast::is_if_statement ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::IfStatement.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::IfStatement.

Definition at line 234 of file ast.cpp.

◆ is_include()

bool nmodl::ast::Ast::is_include ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::Include.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::Include.

Definition at line 218 of file ast.cpp.

◆ is_independent_block()

bool nmodl::ast::Ast::is_independent_block ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::IndependentBlock.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::IndependentBlock.

Definition at line 118 of file ast.cpp.

◆ is_indexed_name()

bool nmodl::ast::Ast::is_indexed_name ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::IndexedName.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::IndexedName.

Definition at line 88 of file ast.cpp.

◆ is_initial_block()

bool nmodl::ast::Ast::is_initial_block ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::InitialBlock.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::InitialBlock.

Definition at line 124 of file ast.cpp.

◆ is_integer()

bool nmodl::ast::Ast::is_integer ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::Integer.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::Integer.

Definition at line 76 of file ast.cpp.

◆ is_kinetic_block()

bool nmodl::ast::Ast::is_kinetic_block ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::KineticBlock.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::KineticBlock.

Definition at line 160 of file ast.cpp.

◆ is_lag_statement()

bool nmodl::ast::Ast::is_lag_statement ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::LagStatement.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::LagStatement.

Definition at line 254 of file ast.cpp.

◆ is_limits()

bool nmodl::ast::Ast::is_limits ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::Limits.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::Limits.

Definition at line 174 of file ast.cpp.

◆ is_lin_equation()

bool nmodl::ast::Ast::is_lin_equation ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::LinEquation.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::LinEquation.

Definition at line 196 of file ast.cpp.

◆ is_line_comment()

bool nmodl::ast::Ast::is_line_comment ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::LineComment.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::LineComment.

Definition at line 284 of file ast.cpp.

◆ is_linear_block()

bool nmodl::ast::Ast::is_linear_block ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::LinearBlock.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::LinearBlock.

Definition at line 134 of file ast.cpp.

◆ is_local_list_statement()

bool nmodl::ast::Ast::is_local_list_statement ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::LocalListStatement.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::LocalListStatement.

Definition at line 212 of file ast.cpp.

◆ is_local_var()

bool nmodl::ast::Ast::is_local_var ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::LocalVar.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::LocalVar.

Definition at line 172 of file ast.cpp.

◆ is_lon_diffuse()

bool nmodl::ast::Ast::is_lon_diffuse ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::LonDiffuse.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::LonDiffuse.

Definition at line 250 of file ast.cpp.

◆ is_longitudinal_diffusion_block()

bool nmodl::ast::Ast::is_longitudinal_diffusion_block ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::LongitudinalDiffusionBlock.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::LongitudinalDiffusionBlock.

Definition at line 300 of file ast.cpp.

◆ is_model()

bool nmodl::ast::Ast::is_model ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::Model.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::Model.

Definition at line 214 of file ast.cpp.

◆ is_mutex_lock()

bool nmodl::ast::Ast::is_mutex_lock ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::MutexLock.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::MutexLock.

Definition at line 242 of file ast.cpp.

◆ is_mutex_unlock()

bool nmodl::ast::Ast::is_mutex_unlock ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::MutexUnlock.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::MutexUnlock.

Definition at line 244 of file ast.cpp.

◆ is_name()

bool nmodl::ast::Ast::is_name ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::Name.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::Name.

Definition at line 84 of file ast.cpp.

◆ is_net_receive_block()

bool nmodl::ast::Ast::is_net_receive_block ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::NetReceiveBlock.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::NetReceiveBlock.

Definition at line 146 of file ast.cpp.

◆ is_neuron_block()

bool nmodl::ast::Ast::is_neuron_block ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::NeuronBlock.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::NeuronBlock.

Definition at line 166 of file ast.cpp.

◆ is_node()

bool nmodl::ast::Ast::is_node ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::Node.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::Node.

Definition at line 62 of file ast.cpp.

◆ is_non_lin_equation()

bool nmodl::ast::Ast::is_non_lin_equation ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::NonLinEquation.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::NonLinEquation.

Definition at line 194 of file ast.cpp.

◆ is_non_linear_block()

bool nmodl::ast::Ast::is_non_linear_block ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::NonLinearBlock.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::NonLinearBlock.

Definition at line 136 of file ast.cpp.

◆ is_nonspecific()

bool nmodl::ast::Ast::is_nonspecific ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::Nonspecific.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::Nonspecific.

Definition at line 264 of file ast.cpp.

◆ is_nonspecific_cur_var()

bool nmodl::ast::Ast::is_nonspecific_cur_var ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::NonspecificCurVar.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::NonspecificCurVar.

Definition at line 100 of file ast.cpp.

◆ is_nrn_state_block()

bool nmodl::ast::Ast::is_nrn_state_block ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::NrnStateBlock.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::NrnStateBlock.

Definition at line 292 of file ast.cpp.

◆ is_number()

bool nmodl::ast::Ast::is_number ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::Number.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::Number.

Definition at line 72 of file ast.cpp.

◆ is_number_range()

bool nmodl::ast::Ast::is_number_range ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::NumberRange.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::NumberRange.

Definition at line 176 of file ast.cpp.

◆ is_ontology_statement()

bool nmodl::ast::Ast::is_ontology_statement ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::OntologyStatement.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::OntologyStatement.

Definition at line 288 of file ast.cpp.

◆ is_param_assign()

bool nmodl::ast::Ast::is_param_assign ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::ParamAssign.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::ParamAssign.

Definition at line 220 of file ast.cpp.

◆ is_param_block()

bool nmodl::ast::Ast::is_param_block ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::ParamBlock.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::ParamBlock.

Definition at line 116 of file ast.cpp.

◆ is_paren_expression()

bool nmodl::ast::Ast::is_paren_expression ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::ParenExpression.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::ParenExpression.

Definition at line 186 of file ast.cpp.

◆ is_pointer()

bool nmodl::ast::Ast::is_pointer ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::Pointer.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::Pointer.

Definition at line 274 of file ast.cpp.

◆ is_pointer_var()

bool nmodl::ast::Ast::is_pointer_var ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::PointerVar.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::PointerVar.

Definition at line 108 of file ast.cpp.

◆ is_prime_name()

bool nmodl::ast::Ast::is_prime_name ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::PrimeName.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::PrimeName.

Definition at line 86 of file ast.cpp.

◆ is_procedure_block()

bool nmodl::ast::Ast::is_procedure_block ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::ProcedureBlock.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::ProcedureBlock.

Definition at line 144 of file ast.cpp.

◆ is_program()

bool nmodl::ast::Ast::is_program ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::Program.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::Program.

Definition at line 290 of file ast.cpp.

◆ is_protect_statement()

bool nmodl::ast::Ast::is_protect_statement ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::ProtectStatement.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::ProtectStatement.

Definition at line 228 of file ast.cpp.

◆ is_random_var()

bool nmodl::ast::Ast::is_random_var ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::RandomVar.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::RandomVar.

Definition at line 110 of file ast.cpp.

◆ is_random_var_list()

bool nmodl::ast::Ast::is_random_var_list ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::RandomVarList.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::RandomVarList.

Definition at line 272 of file ast.cpp.

◆ is_range()

bool nmodl::ast::Ast::is_range ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::Range.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::Range.

Definition at line 268 of file ast.cpp.

◆ is_range_var()

bool nmodl::ast::Ast::is_range_var ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::RangeVar.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::RangeVar.

Definition at line 104 of file ast.cpp.

◆ is_react_var_name()

bool nmodl::ast::Ast::is_react_var_name ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::ReactVarName.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::ReactVarName.

Definition at line 94 of file ast.cpp.

◆ is_reaction_operator()

bool nmodl::ast::Ast::is_reaction_operator ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::ReactionOperator.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::ReactionOperator.

Definition at line 184 of file ast.cpp.

◆ is_reaction_statement()

bool nmodl::ast::Ast::is_reaction_statement ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::ReactionStatement.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::ReactionStatement.

Definition at line 252 of file ast.cpp.

◆ is_read_ion_var()

bool nmodl::ast::Ast::is_read_ion_var ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::ReadIonVar.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::ReadIonVar.

Definition at line 96 of file ast.cpp.

◆ is_solution_expression()

bool nmodl::ast::Ast::is_solution_expression ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::SolutionExpression.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::SolutionExpression.

Definition at line 306 of file ast.cpp.

◆ is_solve_block()

bool nmodl::ast::Ast::is_solve_block ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::SolveBlock.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::SolveBlock.

Definition at line 148 of file ast.cpp.

◆ is_state_block()

bool nmodl::ast::Ast::is_state_block ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::StateBlock.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::StateBlock.

Definition at line 122 of file ast.cpp.

◆ is_statement()

bool nmodl::ast::Ast::is_statement ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::Statement.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::Statement.

Definition at line 64 of file ast.cpp.

◆ is_statement_block()

bool nmodl::ast::Ast::is_statement_block ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::StatementBlock.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::StatementBlock.

Definition at line 130 of file ast.cpp.

◆ is_string()

bool nmodl::ast::Ast::is_string ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::String.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::String.

Definition at line 74 of file ast.cpp.

◆ is_suffix()

bool nmodl::ast::Ast::is_suffix ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::Suffix.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::Suffix.

Definition at line 260 of file ast.cpp.

◆ is_table_statement()

bool nmodl::ast::Ast::is_table_statement ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::TableStatement.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::TableStatement.

Definition at line 258 of file ast.cpp.

◆ is_thread_safe()

bool nmodl::ast::Ast::is_thread_safe ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::ThreadSafe.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::ThreadSafe.

Definition at line 280 of file ast.cpp.

◆ is_unary_expression()

bool nmodl::ast::Ast::is_unary_expression ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::UnaryExpression.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::UnaryExpression.

Definition at line 192 of file ast.cpp.

◆ is_unary_operator()

bool nmodl::ast::Ast::is_unary_operator ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::UnaryOperator.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::UnaryOperator.

Definition at line 182 of file ast.cpp.

◆ is_unit()

bool nmodl::ast::Ast::is_unit ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::Unit.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::Unit.

Definition at line 168 of file ast.cpp.

◆ is_unit_block()

bool nmodl::ast::Ast::is_unit_block ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::UnitBlock.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::UnitBlock.

Definition at line 162 of file ast.cpp.

◆ is_unit_def()

bool nmodl::ast::Ast::is_unit_def ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::UnitDef.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::UnitDef.

Definition at line 204 of file ast.cpp.

◆ is_unit_state()

bool nmodl::ast::Ast::is_unit_state ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::UnitState.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::UnitState.

Definition at line 210 of file ast.cpp.

◆ is_update_dt()

bool nmodl::ast::Ast::is_update_dt ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::UpdateDt.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::UpdateDt.

Definition at line 308 of file ast.cpp.

◆ is_useion()

bool nmodl::ast::Ast::is_useion ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::Useion.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::Useion.

Definition at line 262 of file ast.cpp.

◆ is_valence()

bool nmodl::ast::Ast::is_valence ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::Valence.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::Valence.

Definition at line 208 of file ast.cpp.

◆ is_var_name()

bool nmodl::ast::Ast::is_var_name ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::VarName.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::VarName.

Definition at line 90 of file ast.cpp.

◆ is_verbatim()

bool nmodl::ast::Ast::is_verbatim ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::Verbatim.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::Verbatim.

Definition at line 282 of file ast.cpp.

◆ is_watch()

bool nmodl::ast::Ast::is_watch ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::Watch.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::Watch.

Definition at line 200 of file ast.cpp.

◆ is_watch_statement()

bool nmodl::ast::Ast::is_watch_statement ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::WatchStatement.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::WatchStatement.

Definition at line 240 of file ast.cpp.

◆ is_while_statement()

bool nmodl::ast::Ast::is_while_statement ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::WhileStatement.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::WhileStatement.

Definition at line 232 of file ast.cpp.

◆ is_wrapped_expression()

bool nmodl::ast::Ast::is_wrapped_expression ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::WrappedExpression.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::WrappedExpression.

Definition at line 302 of file ast.cpp.

◆ is_write_ion_var()

bool nmodl::ast::Ast::is_write_ion_var ( ) const
virtualnoexcept

Check if the ast node is an instance of ast::WriteIonVar.

Returns
true if object of type ast::OntologyStatement

Reimplemented in nmodl::ast::WriteIonVar.

Definition at line 98 of file ast.cpp.

◆ negate()

void nmodl::ast::Ast::negate ( )
virtual

Negate the value of AST node.

Parser parse -x in two parts : x and then -. Once second token - is encountered, the corresponding value of ast node needs to be multiplied by -1 for ast::Number node types or apply ! operator for the nodes of type ast::Boolean.

Reimplemented in nmodl::ast::Integer, nmodl::ast::Double, nmodl::ast::Float, and nmodl::ast::Boolean.

Definition at line 50 of file ast.cpp.

◆ set_name()

void nmodl::ast::Ast::set_name ( const std::string &  name)
virtual

Set name for the AST node.

Some ast nodes have a member marked designated as node name (e.g. nodes derived from ast::Identifier). This method is used to set new name for those nodes. This useful for passes like nmodl::visitor::RenameVisitor.

See also
Ast::get_node_type_name Ast::get_node_name

Reimplemented in nmodl::ast::Name.

Definition at line 46 of file ast.cpp.

◆ set_parent()

void nmodl::ast::Ast::set_parent ( Ast p)
virtual

Parent setter.

Usually, the parent pointer cannot be set in the constructor because children are generally build BEFORE the parent. Conversely, we set children parents directly in the parent constructor using set_parent_in_children()

Check Ast::parent for more information

Definition at line 315 of file ast.cpp.

◆ set_symbol_table()

◆ visit_children() [1/2]

virtual void nmodl::ast::Ast::visit_children ( visitor::ConstVisitor v) const
pure virtual

Visit children i.e.

member of AST node using provided visitor

Different nodes in the AST have different members (i.e. children). This method recursively visits children using provided concrete visitor.

Parameters
vConcrete visitor that will be used to recursively visit node
Note
Below is an example of visit_children method implementation which shows ast::IndexedName node children are visited instead of node itself.
void IndexedName::visit_children(visitor::Visitor& v) {
name->accept(v);
length->accept(v);
}

Implemented in nmodl::ast::EigenNewtonSolverBlock, nmodl::ast::EigenLinearSolverBlock, nmodl::ast::AssignedDefinition, nmodl::ast::FunctionBlock, nmodl::ast::ProcedureBlock, nmodl::ast::CvodeBlock, nmodl::ast::Useion, nmodl::ast::FromStatement, nmodl::ast::LinearBlock, nmodl::ast::NonLinearBlock, nmodl::ast::AssignedBlock, nmodl::ast::ReactionStatement, nmodl::ast::TableStatement, nmodl::ast::FactorDef, nmodl::ast::FunctionTableBlock, nmodl::ast::KineticBlock, nmodl::ast::LongitudinalDiffusionBlock, nmodl::ast::StatementBlock, nmodl::ast::DerivativeBlock, nmodl::ast::SolveBlock, nmodl::ast::Program, nmodl::ast::IfStatement, nmodl::ast::ParamAssign, nmodl::ast::DiscreteBlock, nmodl::ast::ForNetcon, nmodl::ast::NetReceiveBlock, nmodl::ast::Global, nmodl::ast::LocalListStatement, nmodl::ast::Pointer, nmodl::ast::WatchStatement, nmodl::ast::VarName, nmodl::ast::Compartment, nmodl::ast::LonDiffuse, nmodl::ast::BinaryExpression, nmodl::ast::BreakpointBlock, nmodl::ast::DestructorBlock, nmodl::ast::NeuronBlock, nmodl::ast::ConstantVar, nmodl::ast::ParamBlock, nmodl::ast::AfterBlock, nmodl::ast::ConstructorBlock, nmodl::ast::StateBlock, nmodl::ast::ConstantBlock, nmodl::ast::InitialBlock, nmodl::ast::BABlock, nmodl::ast::IndependentBlock, nmodl::ast::Define, nmodl::ast::LagStatement, nmodl::ast::PrimeName, nmodl::ast::Argument, nmodl::ast::ConductanceHint, nmodl::ast::IndexedName, nmodl::ast::BeforeBlock, nmodl::ast::NrnStateBlock, nmodl::ast::UnitBlock, nmodl::ast::Include, nmodl::ast::Conserve, nmodl::ast::ElseIfStatement, nmodl::ast::Integer, nmodl::ast::LinEquation, nmodl::ast::NonLinEquation, nmodl::ast::WhileStatement, nmodl::ast::FunctionCall, nmodl::ast::ReactVarName, nmodl::ast::Suffix, nmodl::ast::UnitDef, nmodl::ast::Name, nmodl::ast::UnaryExpression, nmodl::ast::BbcorePointer, nmodl::ast::DoubleUnit, nmodl::ast::Limits, nmodl::ast::NumberRange, nmodl::ast::RandomVarList, nmodl::ast::SolutionExpression, nmodl::ast::Valence, nmodl::ast::Watch, nmodl::ast::Double, nmodl::ast::String, nmodl::ast::BlockComment, nmodl::ast::ElectrodeCurrent, nmodl::ast::ElseStatement, nmodl::ast::External, nmodl::ast::Model, nmodl::ast::Nonspecific, nmodl::ast::OntologyStatement, nmodl::ast::ProtectStatement, nmodl::ast::Range, nmodl::ast::UpdateDt, nmodl::ast::Verbatim, nmodl::ast::BbcorePointerVar, nmodl::ast::ElectrodeCurVar, nmodl::ast::ExternVar, nmodl::ast::GlobalVar, nmodl::ast::LocalVar, nmodl::ast::NonspecificCurVar, nmodl::ast::PointerVar, nmodl::ast::RandomVar, nmodl::ast::RangeVar, nmodl::ast::ReadIonVar, nmodl::ast::Unit, nmodl::ast::WriteIonVar, nmodl::ast::Float, nmodl::ast::Boolean, nmodl::ast::ConstantStatement, nmodl::ast::DerivimplicitCallback, nmodl::ast::DiffEqExpression, nmodl::ast::ExpressionStatement, nmodl::ast::LineComment, nmodl::ast::ParenExpression, nmodl::ast::WrappedExpression, nmodl::ast::BABlockType, nmodl::ast::BinaryOperator, nmodl::ast::ReactionOperator, nmodl::ast::UnaryOperator, nmodl::ast::UnitState, nmodl::ast::MutexLock, nmodl::ast::MutexUnlock, nmodl::ast::ThreadSafe, nmodl::ast::Block, nmodl::ast::Number, nmodl::ast::Expression, nmodl::ast::Identifier, nmodl::ast::Node, and nmodl::ast::Statement.

◆ visit_children() [2/2]

virtual void nmodl::ast::Ast::visit_children ( visitor::Visitor v)
pure virtual

Visit children i.e.

member of AST node using provided visitor

Different nodes in the AST have different members (i.e. children). This method recursively visits children using provided concrete visitor.

Parameters
vConcrete visitor that will be used to recursively visit node
Note
Below is an example of visit_children method implementation which shows ast::IndexedName node children are visited instead of node itself.
void IndexedName::visit_children(visitor::Visitor& v) {
name->accept(v);
length->accept(v);
}

Implemented in nmodl::ast::EigenNewtonSolverBlock, nmodl::ast::EigenLinearSolverBlock, nmodl::ast::AssignedDefinition, nmodl::ast::FunctionBlock, nmodl::ast::ProcedureBlock, nmodl::ast::CvodeBlock, nmodl::ast::Useion, nmodl::ast::FromStatement, nmodl::ast::LinearBlock, nmodl::ast::NonLinearBlock, nmodl::ast::AssignedBlock, nmodl::ast::ReactionStatement, nmodl::ast::TableStatement, nmodl::ast::FactorDef, nmodl::ast::FunctionTableBlock, nmodl::ast::KineticBlock, nmodl::ast::LongitudinalDiffusionBlock, nmodl::ast::StatementBlock, nmodl::ast::DerivativeBlock, nmodl::ast::SolveBlock, nmodl::ast::Program, nmodl::ast::IfStatement, nmodl::ast::ParamAssign, nmodl::ast::DiscreteBlock, nmodl::ast::ForNetcon, nmodl::ast::NetReceiveBlock, nmodl::ast::Global, nmodl::ast::LocalListStatement, nmodl::ast::Pointer, nmodl::ast::WatchStatement, nmodl::ast::VarName, nmodl::ast::Compartment, nmodl::ast::LonDiffuse, nmodl::ast::BinaryExpression, nmodl::ast::BreakpointBlock, nmodl::ast::DestructorBlock, nmodl::ast::NeuronBlock, nmodl::ast::ConstantVar, nmodl::ast::ParamBlock, nmodl::ast::AfterBlock, nmodl::ast::ConstructorBlock, nmodl::ast::StateBlock, nmodl::ast::ConstantBlock, nmodl::ast::InitialBlock, nmodl::ast::BABlock, nmodl::ast::IndependentBlock, nmodl::ast::Define, nmodl::ast::LagStatement, nmodl::ast::PrimeName, nmodl::ast::Argument, nmodl::ast::ConductanceHint, nmodl::ast::IndexedName, nmodl::ast::BeforeBlock, nmodl::ast::NrnStateBlock, nmodl::ast::UnitBlock, nmodl::ast::Include, nmodl::ast::Conserve, nmodl::ast::ElseIfStatement, nmodl::ast::Integer, nmodl::ast::LinEquation, nmodl::ast::NonLinEquation, nmodl::ast::WhileStatement, nmodl::ast::FunctionCall, nmodl::ast::ReactVarName, nmodl::ast::Suffix, nmodl::ast::UnitDef, nmodl::ast::Name, nmodl::ast::UnaryExpression, nmodl::ast::BbcorePointer, nmodl::ast::DoubleUnit, nmodl::ast::Limits, nmodl::ast::NumberRange, nmodl::ast::RandomVarList, nmodl::ast::SolutionExpression, nmodl::ast::Valence, nmodl::ast::Watch, nmodl::ast::Double, nmodl::ast::String, nmodl::ast::BlockComment, nmodl::ast::ElectrodeCurrent, nmodl::ast::ElseStatement, nmodl::ast::External, nmodl::ast::Model, nmodl::ast::Nonspecific, nmodl::ast::OntologyStatement, nmodl::ast::ProtectStatement, nmodl::ast::Range, nmodl::ast::UpdateDt, nmodl::ast::Verbatim, nmodl::ast::BbcorePointerVar, nmodl::ast::ElectrodeCurVar, nmodl::ast::ExternVar, nmodl::ast::GlobalVar, nmodl::ast::LocalVar, nmodl::ast::NonspecificCurVar, nmodl::ast::PointerVar, nmodl::ast::RandomVar, nmodl::ast::RangeVar, nmodl::ast::ReadIonVar, nmodl::ast::Unit, nmodl::ast::WriteIonVar, nmodl::ast::Float, nmodl::ast::Boolean, nmodl::ast::ConstantStatement, nmodl::ast::DerivimplicitCallback, nmodl::ast::DiffEqExpression, nmodl::ast::ExpressionStatement, nmodl::ast::LineComment, nmodl::ast::ParenExpression, nmodl::ast::WrappedExpression, nmodl::ast::BABlockType, nmodl::ast::BinaryOperator, nmodl::ast::ReactionOperator, nmodl::ast::UnaryOperator, nmodl::ast::UnitState, nmodl::ast::MutexLock, nmodl::ast::MutexUnlock, nmodl::ast::ThreadSafe, nmodl::ast::Block, nmodl::ast::Number, nmodl::ast::Expression, nmodl::ast::Identifier, nmodl::ast::Node, and nmodl::ast::Statement.

◆ ~Ast()

virtual nmodl::ast::Ast::~Ast ( )
virtualdefault

Variable Documentation

◆ parent

Ast* nmodl::ast::Ast::parent = nullptr
private

Generic pointer to the parent.

Children types can be known at compile time. Conversely, many parents can have the same children type. Thus, this is just a pointer to the base class. The pointer to the parent cannot have ownership (circular ownership problem). weak_ptr you say? Yes, however weak_ptr can be instantiated from shared_ptr (not this). Whys is this a problem? In bison things must be passed around as raw pointers (because it uses unions etc.) and there are cases where the shared_ptr to the parent was not yet created while the child is added (throwing a bad_weak_ptr exception).

i.e. in bison the lines:

ast::WatchStatement* a = new ast::WatchStatement(); yylhs.value.as< ast::WatchStatement* > ()->add_watch(a);

would throw a bad_weak_ptr exception because when you call add_watch the shared_ptr_from_this to "a" is not yet created.

Definition at line 92 of file ast.hpp.

nmodl::ast::IndexedName::accept
void accept(visitor::Visitor &v) override
accept (or visit) the current AST node using provided visitor
Definition: ast.cpp:1029
nmodl::ast::IndexedName::visit_children
void visit_children(visitor::Visitor &v) override
visit children i.e.
Definition: ast.cpp:1011