![]() |
User Guide
|
Class to bridge C++ NmodlDriver with Python world using pybind11. More...
Class to bridge C++ NmodlDriver with Python world using pybind11.
Definition at line 116 of file pynmodl.cpp.
Public Member Functions | |
std::shared_ptr< nmodl::ast::Program > | parse_stream (py::object const &object) |
![]() | |
NmodlDriver ()=default | |
NmodlDriver (bool strace, bool ptrace) | |
void | add_defined_var (const std::string &name, int value) |
add macro definition and it's value (DEFINE keyword of nmodl) More... | |
bool | is_defined_var (const std::string &name) const |
check if particular text is defined as macro More... | |
int | get_defined_var_value (const std::string &name) const |
return variable's value defined as macro (always an integer) More... | |
std::shared_ptr< ast::Program > | parse_stream (std::istream &in) |
parse nmodl file provided as istream More... | |
std::shared_ptr< ast::Program > | parse_string (const std::string &input) |
parser nmodl provided as string (used for testing) More... | |
std::shared_ptr< ast::Program > | parse_file (const std::filesystem::path &filename, const location *loc=nullptr) |
parse NMODL file More... | |
std::shared_ptr< ast::Include > | parse_include (const std::filesystem::path &filename, const location &loc) |
void | set_verbose (bool b) |
bool | is_verbose () const noexcept |
const std::shared_ptr< ast::Program > & | get_ast () const noexcept |
return previously parsed AST otherwise nullptr More... | |
void | set_ast (ast::Program *node) noexcept |
set new ast root More... | |
void | parse_error (const location &location, const std::string &message) |
Emit a parsing error. More... | |
void | parse_error (const NmodlLexer &scanner, const location &location, const std::string &message) |
Emit a parsing error. More... | |
std::string | check_include_argument (const location &location, const std::string &filename) |
Ensure file argument given to the INCLUDE directive is valid: More... | |
Additional Inherited Members | |
![]() | |
std::string | stream_name |
file or input stream name (used by scanner for position), see todo More... | |
|
inline |
Definition at line 118 of file pynmodl.cpp.