User Guide
unit_lexer.hpp File Reference
#include "parser/unit/unit_parser.hpp"
#include "FlexLexer.h"

Go to the source code of this file.

Classes

class  nmodl::parser::UnitLexer
 Represent Lexer/Scanner class for Units parsing. More...
 

Namespaces

 nmodl
 encapsulates code generation backend implementations
 
 nmodl::parser
 encapsulate lexer and parsers implementations
 

Macros

#define YY_DECL   nmodl::parser::UnitParser::symbol_type nmodl::parser::UnitLexer::next_token()
 Flex expects the declaration of yylex to be defined in the macro YY_DECL and Unit parser class expects it to be declared. More...
 
#define yyFlexLexer   UnitFlexLexer
 For creating multiple (different) lexer classes, we can use -P flag (or prefix option) to rename each yyFlexLexer to some other name like xxFlexLexer. More...
 

Macro Definition Documentation

◆ YY_DECL

Flex expects the declaration of yylex to be defined in the macro YY_DECL and Unit parser class expects it to be declared.

Definition at line 17 of file unit_lexer.hpp.

◆ yyFlexLexer

#define yyFlexLexer   UnitFlexLexer

For creating multiple (different) lexer classes, we can use -P flag (or prefix option) to rename each yyFlexLexer to some other name like xxFlexLexer.

And then include <FlexLexer.h> in other sources once per lexer class, first renaming yyFlexLexer as shown below.

Definition at line 27 of file unit_lexer.hpp.