The constexp.l
File Reference
Included Headers
#include <stdint.h>
#include "constexp_p.h"
#include "constexp.h"
#include "cppvalue.h"
#include "ce_parse.hpp"
#include "message.h"
#include "debug.h"
#include "doxygen_lex.h"
#include "constexp.l.h"
Classes Index
struct | Private |
Functions Index
static const char * | stateToString (int state) |
static int | yyread (char *buf, int max_size, yyscan_t yyscanner) |
static const char * | getLexerFILE () |
int | yylex (YYSTYPE *yylval_param, yyscan_t yyscanner) |
int | constexpYYwrap (yyscan_t) |
Macro Definitions Index
#define | YY_NO_INPUT 1 |
#define | YY_NO_UNISTD_H 1 |
#define | YY_INPUT(buf, result, max_size) result=yyread(buf,max_size,yyscanner); |
#define | LEX_NO_INPUT_FILENAME |
Functions
constexpYYwrap()
|
Definition at line 166 of file constexp.l.
166 int constexpYYwrap(yyscan_t /* yyscanner */) { return 1; }
getLexerFILE()
| inline static |
Definition at line 48 of file constexp.l.
48static inline const char *getLexerFILE() {return __FILE__;}
stateToString()
| static |
Definition at line 40 of file constexp.l.
yylex()
Definition at line 57 of file constexp.l.
57%%
58
59"?" { return TOK_QUESTIONMARK; }
60":" { return TOK_COLON; }
61"||" { return TOK_OR; }
62"&&" { return TOK_AND; }
63"|" { return TOK_BITWISEOR; }
64"^" { return TOK_BITWISEXOR; }
65"&" { return TOK_AMPERSAND; }
66"!=" { return TOK_NOTEQUAL; }
67"==" { return TOK_EQUAL; }
68"<" { return TOK_LESSTHAN; }
69">" { return TOK_GREATERTHAN; }
70"<=" { return TOK_LESSTHANOREQUALTO; }
71">=" { return TOK_GREATERTHANOREQUALTO; }
72"<<" { return TOK_SHIFTLEFT; }
73">>" { return TOK_SHIFTRIGHT; }
74"+" { return TOK_PLUS; }
75"-" { return TOK_MINUS; }
76"*" { return TOK_STAR; }
77"/" { return TOK_DIVIDE; }
78"%" { return TOK_MOD; }
79"~" { return TOK_TILDE; }
80"!" { return TOK_NOT; }
81"(" { return TOK_LPAREN; }
82")" { return TOK_RPAREN; }
83"'"(([^\'\n\r\\]+)|(\\(([ntvbrfa\\?'\"])|([0-9]+)|([xX][0-9a-fA-F]+))))"'" {
84 yyextra->strToken=yytext;
85 return TOK_CHARACTER;
86 }
870[0-7]*{CONSTSUFFIX}? { yyextra->strToken=yytext;
88 return TOK_OCTALINT;
89 }
90[1-9][0-9]*{CONSTSUFFIX}? { yyextra->strToken=yytext;
91 return TOK_DECIMALINT;
92 }
93(0x|0X)[0-9a-fA-F]+{CONSTSUFFIX}? { yyextra->strToken=yytext+2;
94 return TOK_HEXADECIMALINT;
95 }
96(0b|0B)[01]+{CONSTSUFFIX}? { yyextra->strToken=yytext+2;
97 return TOK_BINARYINT;
98 }
99(([0-9]+\.[0-9]*)|([0-9]*\.[0-9]+))([eE]([\-\+])?[0-9]+)?([fFlL])? {
100 yyextra->strToken=yytext; return TOK_FLOAT;
101 }
102([0-9]+[eE])([\-\+])?[0-9]+([fFlL])? {
103 yyextra->strToken=yytext; return TOK_FLOAT;
104 }
105.
106\n
107
108%%
yyread()
| static |
Definition at line 110 of file constexp.l.
111{
112 struct yyguts_t *yyg = static_cast<struct yyguts_t*>(yyscanner);
113 int c=0;
114 while( c < max_size && yyextra->inputString[yyextra->inputPosition] )
115 {
116 *buf = yyextra->inputString[yyextra->inputPosition++] ;
117 c++; buf++;
118 }
119 return c;
120}
Macro Definitions
LEX_NO_INPUT_FILENAME
|
Definition at line 49 of file constexp.l.
49#define LEX_NO_INPUT_FILENAME
YY_INPUT
|
Definition at line 45 of file constexp.l.
45#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size,yyscanner);
YY_NO_INPUT
|
Definition at line 37 of file constexp.l.
37#define YY_NO_INPUT 1
YY_NO_UNISTD_H
|
Definition at line 38 of file constexp.l.
38#define YY_NO_UNISTD_H 1
Generated via doxygen2docusaurus by Doxygen 1.14.0.