User Guide
AST Properties

Properties and types used with of AST classes. More...

Detailed Description

Properties and types used with of AST classes.

Enumerations

enum  nmodl::ast::BinaryOp {
  nmodl::ast::BOP_ADDITION, nmodl::ast::BOP_SUBTRACTION, nmodl::ast::BOP_MULTIPLICATION, nmodl::ast::BOP_DIVISION,
  nmodl::ast::BOP_POWER, nmodl::ast::BOP_AND, nmodl::ast::BOP_OR, nmodl::ast::BOP_GREATER,
  nmodl::ast::BOP_LESS, nmodl::ast::BOP_GREATER_EQUAL, nmodl::ast::BOP_LESS_EQUAL, nmodl::ast::BOP_ASSIGN,
  nmodl::ast::BOP_NOT_EQUAL, nmodl::ast::BOP_EXACT_EQUAL
}
 enum Type for binary operators in NMODL More...
 
enum  nmodl::ast::UnaryOp { nmodl::ast::UOP_NOT, nmodl::ast::UOP_NEGATION }
 enum type for unary operators More...
 
enum  nmodl::ast::BAType { nmodl::ast::BATYPE_BREAKPOINT, nmodl::ast::BATYPE_SOLVE, nmodl::ast::BATYPE_INITIAL, nmodl::ast::BATYPE_STEP }
 enum type to distinguish BEFORE or AFTER blocks More...
 
enum  nmodl::ast::UnitStateType { nmodl::ast::UNIT_ON, nmodl::ast::UNIT_OFF }
 enum type used for UNIT_ON or UNIT_OFF state More...
 
enum  nmodl::ast::ReactionOp { nmodl::ast::LTMINUSGT, nmodl::ast::LTLT, nmodl::ast::MINUSGT }
 enum type used for Reaction statement More...
 

Variables

static const std::string nmodl::ast::BinaryOpNames []
 string representation of ast::BinaryOp More...
 
static const std::string nmodl::ast::UnaryOpNames [] = {"!", "-"}
 string representation of ast::UnaryOp More...
 
static const std::string nmodl::ast::BATypeNames [] = {"BREAKPOINT", "SOLVE", "INITIAL", "STEP"}
 string representation of ast::BAType More...
 
static const std::string nmodl::ast::UnitStateTypeNames [] = {"UNITSON", "UNITSOFF"}
 string representation of ast::UnitStateType More...
 
static const std::string nmodl::ast::ReactionOpNames [] = {"<->", "<<", "->"}
 string representation of ast::ReactionOp More...
 

Enumeration Type Documentation

◆ BAType

enum type to distinguish BEFORE or AFTER blocks

Enumerator
BATYPE_BREAKPOINT 
BATYPE_SOLVE 
BATYPE_INITIAL 
BATYPE_STEP 

Definition at line 80 of file ast_common.hpp.

◆ BinaryOp

enum Type for binary operators in NMODL

NMODL support different binary operators and this type is used to store their value in the AST.

Enumerator
BOP_ADDITION 

+

BOP_SUBTRACTION 

BOP_MULTIPLICATION 

*

BOP_DIVISION 

\/

BOP_POWER 

^

BOP_AND 

&&

BOP_OR 

||

BOP_GREATER 

BOP_LESS 

<

BOP_GREATER_EQUAL 

>=

BOP_LESS_EQUAL 

<=

BOP_ASSIGN 

=

BOP_NOT_EQUAL 

!=

BOP_EXACT_EQUAL 

==

Definition at line 47 of file ast_common.hpp.

◆ ReactionOp

enum type used for Reaction statement

Enumerator
LTMINUSGT 
LTLT 
MINUSGT 

Definition at line 92 of file ast_common.hpp.

◆ UnaryOp

enum type for unary operators

Enumerator
UOP_NOT 
UOP_NEGATION 

Definition at line 74 of file ast_common.hpp.

◆ UnitStateType

enum type used for UNIT_ON or UNIT_OFF state

Enumerator
UNIT_ON 
UNIT_OFF 

Definition at line 86 of file ast_common.hpp.

Variable Documentation

◆ BATypeNames

const std::string nmodl::ast::BATypeNames[] = {"BREAKPOINT", "SOLVE", "INITIAL", "STEP"}
static

string representation of ast::BAType

Definition at line 83 of file ast_common.hpp.

◆ BinaryOpNames

const std::string nmodl::ast::BinaryOpNames[]
static
Initial value:
=
{"+", "-", "*", "/", "^", "&&", "||", ">", "<", ">=", "<=", "=", "!=", "=="}

string representation of ast::BinaryOp

When AST is converted back to NMODL or C code, ast::BinaryOpNames is used to lookup the corresponding symbol for the operator.

Definition at line 70 of file ast_common.hpp.

◆ ReactionOpNames

const std::string nmodl::ast::ReactionOpNames[] = {"<->", "<<", "->"}
static

string representation of ast::ReactionOp

Definition at line 95 of file ast_common.hpp.

◆ UnaryOpNames

const std::string nmodl::ast::UnaryOpNames[] = {"!", "-"}
static

string representation of ast::UnaryOp

Definition at line 77 of file ast_common.hpp.

◆ UnitStateTypeNames

const std::string nmodl::ast::UnitStateTypeNames[] = {"UNITSON", "UNITSOFF"}
static

string representation of ast::UnitStateType

Definition at line 89 of file ast_common.hpp.