User Guide
nmodl::PyNmodlDriver Class Reference

Class to bridge C++ NmodlDriver with Python world using pybind11. More...

Detailed Description

Class to bridge C++ NmodlDriver with Python world using pybind11.

Definition at line 116 of file pynmodl.cpp.

Inheritance diagram for nmodl::PyNmodlDriver:
nmodl::parser::NmodlDriver

Public Member Functions

std::shared_ptr< nmodl::ast::Programparse_stream (py::object const &object)
 
- Public Member Functions inherited from nmodl::parser::NmodlDriver
 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::Programparse_stream (std::istream &in)
 parse nmodl file provided as istream More...
 
std::shared_ptr< ast::Programparse_string (const std::string &input)
 parser nmodl provided as string (used for testing) More...
 
std::shared_ptr< ast::Programparse_file (const std::filesystem::path &filename, const location *loc=nullptr)
 parse NMODL file More...
 
std::shared_ptr< ast::Includeparse_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...
 

Additional Inherited Members

- Static Public Member Functions inherited from nmodl::parser::NmodlDriver
static void parse_error (const location &location, const std::string &message)
 Emit a parsing error. More...
 
static void parse_error (const NmodlLexer &scanner, const location &location, const std::string &message)
 Emit a parsing error. More...
 
static std::string check_include_argument (const location &location, const std::string &filename)
 Ensure file argument given to the INCLUDE directive is valid: More...
 
- Public Attributes inherited from nmodl::parser::NmodlDriver
std::string stream_name
 file or input stream name (used by scanner for position), see todo More...
 

Member Function Documentation

◆ parse_stream()

std::shared_ptr<nmodl::ast::Program> nmodl::PyNmodlDriver::parse_stream ( py::object const &  object)
inline

Definition at line 118 of file pynmodl.cpp.


The documentation for this class was generated from the following file: