Skip to content

Commit

Permalink
enable debug for re-entrant lexers
Browse files Browse the repository at this point in the history
  • Loading branch information
groleo committed May 22, 2019
1 parent 5c9d812 commit 2c8eec1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/constexp.l
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ bool parseconstexp(const char *fileName,int lineNr,const QCString &s)
constexpYYlex_init_extra(&constexpYY_extra, &yyscanner);
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
#ifdef FLEX_DEBUG
yyset_debug(1,yyscanner);
#endif
yyextra->g_constExpFileName = fileName;
yyextra->g_constExpLineNr = lineNr;
yyextra->g_inputString = s;
Expand Down
4 changes: 4 additions & 0 deletions src/declinfo.l
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,10 @@ void parseFuncDecl(const QCString &decl,bool objC,QCString &cl,QCString &t,
declinfoYYlex_init_extra(&g_declinfo_extra, &g_yyscanner);
struct yyguts_t *yyg = (struct yyguts_t*)g_yyscanner;

#ifdef FLEX_DEBUG
yyset_debug(1,g_yyscanner);
#endif

printlex(yy_flex_debug, TRUE, __FILE__, NULL);
yyextra->inputString = decl;
//printf("Input=`%s'\n",yyextra->inputString);
Expand Down
5 changes: 5 additions & 0 deletions src/sqlcode.l
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,11 @@ void parseSqlCode(

sqlcodeYYlex_init_extra(&sqlcode_extra, &yyscanner);
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;

#ifdef FLEX_DEBUG
yyset_debug(1,yyscanner);
#endif

printlex(yy_flex_debug, TRUE, __FILE__, fd ? fd->fileName().data(): NULL);

yyextra->code = &od;
Expand Down

0 comments on commit 2c8eec1

Please sign in to comment.