Units handling implementation details.
More...
Units handling implementation details.
◆ is_verbose()
| bool nmodl::parser::UnitDriver::is_verbose |
( |
| ) |
const |
|
inline |
◆ next_token()
Function for lexer to scan token (replacement for yylex())
This is main lexing function generated by flex according to the macro declaration YY_DECL. The generated bison parser then calls this virtual function to fetch new tokens. Note that yylex() has different declaration and hence can't be used for new lexer.
- Returns
- Symbol encapsulating parsed token
◆ parse_file()
| bool nmodl::parser::UnitDriver::parse_file |
( |
const std::string & |
filename | ) |
|
◆ parse_stream()
| bool nmodl::parser::UnitDriver::parse_stream |
( |
std::istream & |
in | ) |
|
◆ parse_string()
| bool nmodl::parser::UnitDriver::parse_string |
( |
const std::string & |
input | ) |
|
parser Units provided as string (used for testing)
Definition at line 40 of file unit_driver.cpp.
◆ set_verbose()
| void nmodl::parser::UnitDriver::set_verbose |
( |
bool |
b | ) |
|
|
inline |
◆ UnitDriver() [1/2]
| nmodl::parser::UnitDriver::UnitDriver |
( |
| ) |
|
|
default |
◆ UnitDriver() [2/2]
| nmodl::parser::UnitDriver::UnitDriver |
( |
bool |
strace, |
|
|
bool |
ptrace |
|
) |
| |
◆ UnitLexer()
| nmodl::parser::UnitLexer::UnitLexer |
( |
UnitDriver & |
, |
|
|
std::istream * |
in = nullptr, |
|
|
std::ostream * |
out = nullptr |
|
) |
| |
|
inlineexplicit |
UnitLexer constructor.
- Parameters
-
| driver | UnitDriver where this lexer resides |
| in | Input stream from where tokens will be read |
| out | Output stream where output will be sent |
Definition at line 64 of file unit_lexer.hpp.
◆ ~UnitLexer()
| nmodl::parser::UnitLexer::~UnitLexer |
( |
| ) |
|
|
overridedefault |
◆ lexer
| UnitLexer* nmodl::parser::UnitDriver::lexer = nullptr |
|
private |
pointer to the lexer instance being used
Definition at line 42 of file unit_driver.hpp.
◆ loc
| location nmodl::parser::UnitLexer::loc |
◆ MAX_DIMS
| constexpr int nmodl::units::MAX_DIMS = 10 |
|
staticconstexpr |
Maximum number of dimensions of units (maximum number of base units)
Definition at line 42 of file units.hpp.
◆ parser
| UnitParser* nmodl::parser::UnitDriver::parser = nullptr |
|
private |
pointer to the parser instance being used
Definition at line 45 of file unit_driver.hpp.
◆ stream_name
| std::string nmodl::parser::UnitDriver::stream_name |
file or input stream name (used by scanner for position), see todo
Definition at line 55 of file unit_driver.hpp.
◆ table
shared pointer to the UnitTable that stores all the unit definitions
Definition at line 52 of file unit_driver.hpp.
◆ verbose
| bool nmodl::parser::UnitDriver::verbose = false |
|
private |