User Guide
parser.cpp File Reference
#include <string>
#include <utility>
#include <catch2/catch_test_macros.hpp>
#include <catch2/matchers/catch_matchers_string.hpp>
#include "ast/program.hpp"
#include "lexer/modtoken.hpp"
#include "parser/diffeq_driver.hpp"
#include "parser/nmodl_driver.hpp"
#include "test/unit/utils/nmodl_constructs.hpp"
#include "test/unit/utils/test_utils.hpp"
#include "utils/common_utils.hpp"
#include "visitors/checkparent_visitor.hpp"
#include "visitors/visitor_utils.hpp"

Go to the source code of this file.

Functions

bool is_valid_construct (const std::string &construct)
 
 SCENARIO ("NMODL can accept CR as return char for one line comment", "[parser]")
 
 SCENARIO ("NMODL can define macros using DEFINE keyword", "[parser]")
 
 SCENARIO ("Macros can be used anywhere in the mod file")
 
 SCENARIO ("NMODL parser accepts empty unit specification")
 
 SCENARIO ("NMODL parser running number of valid NMODL constructs")
 
 SCENARIO ("NMODL parser running number of invalid NMODL constructs")
 
 SCENARIO ("Check that the parser doesn't crash when passing invalid INCLUDE constructs")
 
 SCENARIO ("NEURON block can add CURIE information", "[parser][represents]")
 
 SCENARIO ("Check parents in valid NMODL constructs")
 
std::string solve_construct (const std::string &equation, std::string method)
 
 SCENARIO ("Legacy differential equation solver")
 
void parse_neuron_block_string (const std::string &name, nmodl::ModToken &value)
 
 SCENARIO ("Check if a NEURON block is parsed with correct location info in its token")
 

Function Documentation

◆ is_valid_construct()

bool is_valid_construct ( const std::string &  construct)

Definition at line 30 of file parser.cpp.

◆ parse_neuron_block_string()

void parse_neuron_block_string ( const std::string &  name,
nmodl::ModToken value 
)

Definition at line 243 of file parser.cpp.

◆ SCENARIO() [1/11]

SCENARIO ( "Check if a NEURON block is parsed with correct location info in its token"  )

Definition at line 253 of file parser.cpp.

◆ SCENARIO() [2/11]

SCENARIO ( "Check parents in valid NMODL constructs"  )

Definition at line 198 of file parser.cpp.

◆ SCENARIO() [3/11]

SCENARIO ( "Check that the parser doesn't crash when passing invalid INCLUDE constructs"  )

Definition at line 161 of file parser.cpp.

◆ SCENARIO() [4/11]

SCENARIO ( "Legacy differential equation solver"  )

Definition at line 221 of file parser.cpp.

◆ SCENARIO() [5/11]

SCENARIO ( "Macros can be used anywhere in the mod file"  )

Definition at line 108 of file parser.cpp.

◆ SCENARIO() [6/11]

SCENARIO ( "NEURON block can add CURIE information"  ,
""  [parser][represents] 
)

Definition at line 179 of file parser.cpp.

◆ SCENARIO() [7/11]

SCENARIO ( "NMODL can accept CR as return char for one line comment"  ,
""  [parser] 
)

Definition at line 36 of file parser.cpp.

◆ SCENARIO() [8/11]

SCENARIO ( "NMODL can define macros using DEFINE keyword"  ,
""  [parser] 
)

Definition at line 48 of file parser.cpp.

◆ SCENARIO() [9/11]

SCENARIO ( "NMODL parser accepts empty unit specification"  )

Definition at line 122 of file parser.cpp.

◆ SCENARIO() [10/11]

SCENARIO ( "NMODL parser running number of invalid NMODL constructs"  )

Definition at line 146 of file parser.cpp.

◆ SCENARIO() [11/11]

SCENARIO ( "NMODL parser running number of valid NMODL constructs"  )

Definition at line 135 of file parser.cpp.

◆ solve_construct()

std::string solve_construct ( const std::string &  equation,
std::string  method 
)

Definition at line 216 of file parser.cpp.