diff options
Diffstat (limited to 'src/constexp.l')
-rw-r--r-- | src/constexp.l | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/constexp.l b/src/constexp.l index eae8a3b..0f053bd 100644 --- a/src/constexp.l +++ b/src/constexp.l @@ -20,6 +20,9 @@ %option nounput %option reentrant bison-bridge %option extra-type="struct constexpYY_state *" +%top{ +#include <stdint.h> +} %{ @@ -32,8 +35,13 @@ #define YY_NO_INPUT 1 #define YY_NO_UNISTD_H 1 +#define USE_STATE2STRING 0 + +#if USE_STATE2STRING static const char *stateToString(int state); -static int yyread(char *buf,int max_size,yyscan_t yyscanner); +#endif + +static yy_size_t yyread(char *buf,yy_size_t max_size,yyscan_t yyscanner); #undef YY_INPUT #define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size,yyscanner); @@ -93,10 +101,10 @@ CONSTSUFFIX ([uU][lL]?[lL]?)|([lL][lL]?[uU]?) %% -static int yyread(char *buf,int max_size,yyscan_t yyscanner) +static yy_size_t yyread(char *buf,yy_size_t max_size,yyscan_t yyscanner) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; - int c=0; + yy_size_t c=0; while( c < max_size && yyextra->inputString[yyextra->inputPosition] ) { *buf = yyextra->inputString[yyextra->inputPosition++] ; @@ -129,7 +137,7 @@ bool ConstExpressionParser::parse(const char *fileName,int lineNr,const QCString struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner; #ifdef FLEX_DEBUG - yyset_debug(1,yyscanner); + constexpYYset_debug(1,p->yyscanner); #endif yyextra->constExpFileName = fileName; @@ -153,4 +161,7 @@ bool ConstExpressionParser::parse(const char *fileName,int lineNr,const QCString extern "C" { int constexpYYwrap(yyscan_t yyscanner) { return 1; } } + +#if USE_STATE2STRING #include "constexp.l.h" +#endif |