User Guide
nmodl_utils.hpp File Reference

Utility functions for NMODL lexer. More...

Detailed Description

Utility functions for NMODL lexer.

From nmodl lexer we return different symbols to parser. Instead of writing those functions in the flex implementation file, those commonly used routines are defined here. Some of these tasks were implemented in list.c file in the original mod2c implementation.

Definition in file nmodl_utils.hpp.

#include "parser/nmodl/location.hh"
#include "parser/nmodl/nmodl_parser.hpp"

Go to the source code of this file.

Namespaces

 nmodl
 encapsulates code generation backend implementations
 

Typedefs

using nmodl::PositionType = parser::location
 

Functions

SymbolType nmodl::double_symbol (const std::string &value, PositionType &pos)
 Create a symbol for ast::Double AST class. More...
 
SymbolType nmodl::integer_symbol (int value, PositionType &pos, const char *text)
 Create a symbol for ast::Integer AST. More...
 
SymbolType nmodl::name_symbol (const std::string &text, PositionType &pos, TokenType type)
 Create symbol for ast::Name AST class. More...
 
SymbolType nmodl::prime_symbol (std::string text, PositionType &pos)
 Create symbol for ast::Prime AST class. More...
 
SymbolType nmodl::string_symbol (const std::string &text, PositionType &pos)
 Create symbol for ast::String AST class. More...
 
SymbolType nmodl::token_symbol (const std::string &key, PositionType &pos, TokenType type)
 Create symbol for AST class. More...