User Guide
nmodl::docstring Namespace Reference

docstring of Python exposed API More...

Detailed Description

docstring of Python exposed API

Functions

constexpr const char * binary_op_enum ()
 
constexpr const char * ast_nodetype_enum ()
 
constexpr const char * ast_class ()
 
constexpr const char * accept_method ()
 
constexpr const char * visit_children_method ()
 
constexpr const char * get_node_type_method ()
 
constexpr const char * get_node_type_name_method ()
 
constexpr const char * get_node_name_method ()
 
constexpr const char * get_nmodl_name_method ()
 
constexpr const char * clone_method ()
 
constexpr const char * get_token_method ()
 
constexpr const char * get_symbol_table_method ()
 
constexpr const char * get_statement_block_method ()
 
constexpr const char * negate_method ()
 
constexpr const char * set_name_method ()
 
constexpr const char * is_ast_method ()
 
constexpr const char * eval_method ()
 
constexpr const char * parent_property ()
 

Variables

static const char *const driver
 
static const char *const driver_ast
 
static const char *const driver_parse_string
 
static const char *const driver_parse_file
 
static const char *const driver_parse_stream
 
static const char *const to_nmodl
 
static const char *const to_json
 

Function Documentation

◆ accept_method()

constexpr const char* nmodl::docstring::accept_method ( )
constexpr

Definition at line 43 of file docstrings.hpp.

◆ ast_class()

constexpr const char* nmodl::docstring::ast_class ( )
constexpr

Definition at line 33 of file docstrings.hpp.

◆ ast_nodetype_enum()

constexpr const char* nmodl::docstring::ast_nodetype_enum ( )
constexpr

Definition at line 23 of file docstrings.hpp.

◆ binary_op_enum()

constexpr const char* nmodl::docstring::binary_op_enum ( )
constexpr

Definition at line 13 of file docstrings.hpp.

◆ clone_method()

constexpr const char* nmodl::docstring::clone_method ( )
constexpr

Definition at line 103 of file docstrings.hpp.

◆ eval_method()

constexpr const char* nmodl::docstring::eval_method ( )
constexpr

Definition at line 161 of file docstrings.hpp.

◆ get_nmodl_name_method()

constexpr const char* nmodl::docstring::get_nmodl_name_method ( )
constexpr

Definition at line 91 of file docstrings.hpp.

◆ get_node_name_method()

constexpr const char* nmodl::docstring::get_node_name_method ( )
constexpr

Definition at line 80 of file docstrings.hpp.

◆ get_node_type_method()

constexpr const char* nmodl::docstring::get_node_type_method ( )
constexpr

Definition at line 68 of file docstrings.hpp.

◆ get_node_type_name_method()

constexpr const char* nmodl::docstring::get_node_type_name_method ( )
constexpr

Definition at line 74 of file docstrings.hpp.

◆ get_statement_block_method()

constexpr const char* nmodl::docstring::get_statement_block_method ( )
constexpr

Definition at line 125 of file docstrings.hpp.

◆ get_symbol_table_method()

constexpr const char* nmodl::docstring::get_symbol_table_method ( )
constexpr

Definition at line 115 of file docstrings.hpp.

◆ get_token_method()

constexpr const char* nmodl::docstring::get_token_method ( )
constexpr

Definition at line 109 of file docstrings.hpp.

◆ is_ast_method()

constexpr const char* nmodl::docstring::is_ast_method ( )
constexpr

Definition at line 155 of file docstrings.hpp.

◆ negate_method()

constexpr const char* nmodl::docstring::negate_method ( )
constexpr

Definition at line 143 of file docstrings.hpp.

◆ parent_property()

constexpr const char* nmodl::docstring::parent_property ( )
constexpr

Definition at line 167 of file docstrings.hpp.

◆ set_name_method()

constexpr const char* nmodl::docstring::set_name_method ( )
constexpr

Definition at line 149 of file docstrings.hpp.

◆ visit_children_method()

constexpr const char* nmodl::docstring::visit_children_method ( )
constexpr

Definition at line 56 of file docstrings.hpp.

Variable Documentation

◆ driver

const char* const nmodl::docstring::driver
static
Initial value:
= R"(
This is the NmodlDriver class documentation
)"

Definition at line 37 of file pynmodl.cpp.

◆ driver_ast

const char* const nmodl::docstring::driver_ast
static
Initial value:
= R"(
Get ast
Returns:
Instance of :py:class:`Program`
)"

Definition at line 41 of file pynmodl.cpp.

◆ driver_parse_file

const char* const nmodl::docstring::driver_parse_file
static
Initial value:
= R"(
Parse NMODL provided as a file
Args:
filename (str): name of the C file
Returns:
AST: ast root node if success, throws an exception otherwise
)"

Definition at line 59 of file pynmodl.cpp.

◆ driver_parse_stream

const char* const nmodl::docstring::driver_parse_stream
static
Initial value:
= R"(
Parse NMODL file provided as istream
Args:
in (file): ifstream object
Returns:
AST: ast root node if success, throws an exception otherwise
)"

Definition at line 69 of file pynmodl.cpp.

◆ driver_parse_string

const char* const nmodl::docstring::driver_parse_string
static
Initial value:
= R"(
Parse NMODL provided as a string
Args:
input (str): C code as string
Returns:
AST: ast root node if success, throws an exception otherwise
>>> ast = driver.parse_string("DEFINE NSTEP 6")
)"

Definition at line 48 of file pynmodl.cpp.

◆ to_json

const char* const nmodl::docstring::to_json
static
Initial value:
= R"(
Given AST node, return the JSON string representation
Args:
node (AST): AST node
compact (bool): Compact node
expand (bool): Expand node
Returns:
str: JSON string representation
>>> ast = driver.parse_string("NEURON{}")
>>> nmodl.to_json(ast, True)
'{"Program":[{"NeuronBlock":[{"StatementBlock":[]}]}]}'
)"

Definition at line 94 of file pynmodl.cpp.

◆ to_nmodl

const char* const nmodl::docstring::to_nmodl
static
Initial value:
= R"(
Given AST node, return the NMODL string representation
Args:
node (AST): AST node
excludeTypes (set of AstNodeType): Excluded node types
Returns:
str: NMODL string representation
>>> ast = driver.parse_string("NEURON{}")
>>> nmodl.to_nmodl(ast)
'NEURON {\n}\n'
)"

Definition at line 79 of file pynmodl.cpp.