Skip to content

Commit

Permalink
Support flex-2.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimitri van Heesch committed Nov 22, 2015
1 parent cf936ef commit 8c51120
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/code.l
Expand Up @@ -3700,7 +3700,7 @@ void codeFreeScanner()
extern "C" { // some bogus code to keep the compiler happy
void codeYYdummy() { yy_flex_realloc(0,0); }
}
#elif YY_FLEX_MINOR_VERSION<6 && YY_FLEX_SUBMINOR_VERSION<33
#error "You seem to be using a version of flex newer than 2.5.4 but older than 2.5.33. These versions do NOT work with doxygen! Please use version <=2.5.4 or >=2.5.33 or expect things to be parsed wrongly!"
#elif YY_FLEX_MAJOR_VERISON<=2 && YY_FLEX_MINOR_VERSION<=5 && YY_FLEX_SUBMINOR_VERSION<33
#error "You seem to be using a version of flex newer than 2.5.4. These are currently incompatible with 2.5.4, and do NOT work with doxygen! Please use version 2.5.4 or expect things to be parsed wrongly! A bug report has been submitted (#732132)."
#endif

4 changes: 2 additions & 2 deletions src/commentscan.l
Expand Up @@ -1128,7 +1128,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
// but we need to know the position in the input buffer where this
// rule matched.
// for flex 2.5.33+ we should use YY_CURRENT_BUFFER_LVALUE
#if YY_FLEX_MINOR_VERSION>5 || YY_FLEX_MINOR_VERSION>=5 && YY_FLEX_SUBMINOR_VERSION>=33
#if YY_FLEX_MAJOR_VERSION>=2 && (YY_FLEX_MINOR_VERSION>5 || (YY_FLEX_MINOR_VERSION==5 && YY_FLEX_SUBMINOR_VERSION>=33))
inputPosition=prevPosition + (int)(yy_bp - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf);
#else
inputPosition=prevPosition + (int)(yy_bp - yy_current_buffer->yy_ch_buf);
Expand Down Expand Up @@ -1190,7 +1190,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
g_memberGroupHeader.resize(0);
parseMore=TRUE;
needNewEntry = TRUE;
#if YY_FLEX_MINOR_VERSION>5 || YY_FLEX_MINOR_VERSION>=5 && YY_FLEX_SUBMINOR_VERSION>=33
#if YY_FLEX_MAJOR_VERSION>=2 && (YY_FLEX_MINOR_VERSION>5 || (YY_FLEX_MINOR_VERSION==5 && YY_FLEX_SUBMINOR_VERSION>=33))
inputPosition=prevPosition + (int)(yy_bp - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) + strlen(yytext);
#else
inputPosition=prevPosition + (int)(yy_bp - yy_current_buffer->yy_ch_buf) + strlen(yytext);
Expand Down
6 changes: 3 additions & 3 deletions src/fortrancode.l
Expand Up @@ -1302,11 +1302,11 @@ void parseFortranCode(CodeOutputInterface &od,const char *className,const QCStri
return;
}

#if !defined(YY_FLEX_SUBMINOR_VERSION)
#if !defined(YY_FLEX_SUBMINOR_VERSION)
extern "C" { // some bogus code to keep the compiler happy
void fortrancodeYYdummy() { yy_flex_realloc(0,0); }
void fortrancodeYYdummy() { yy_flex_realloc(0,0); }
}
#elif YY_FLEX_MINOR_VERSION<6 && YY_FLEX_SUBMINOR_VERSION<33
#elif YY_FLEX_MAJOR_VERSION<=2 && YY_FLEX_MINOR_VERSION<=5 && YY_FLEX_SUBMINOR_VERSION<33
#error "You seem to be using a version of flex newer than 2.5.4 but older than 2.5.33. These versions do NOT work with doxygen! Please use version <=2.5.4 or >=2.5.33 or expect things to be parsed wrongly!"
#else
extern "C" { // some bogus code to keep the compiler happy
Expand Down
2 changes: 1 addition & 1 deletion src/pycode.l
Expand Up @@ -1503,7 +1503,7 @@ void parsePythonCode(CodeOutputInterface &od,const char * /*className*/,
extern "C" { // some bogus code to keep the compiler happy
void pycodeYYdummy() { yy_flex_realloc(0,0); }
}
#elif YY_FLEX_MINOR_VERSION<6 && YY_FLEX_SUBMINOR_VERSION<33
#elif YY_FLEX_MAJOR_VERISON<=2 && YY_FLEX_MINOR_VERSION<=5 && YY_FLEX_SUBMINOR_VERSION<33
#error "You seem to be using a version of flex newer than 2.5.4. These are currently incompatible with 2.5.4, and do NOT work with doxygen! Please use version 2.5.4 or expect things to be parsed wrongly! A bug report has been submitted (#732132)."
#endif

2 changes: 1 addition & 1 deletion src/vhdlcode.l
Expand Up @@ -1613,7 +1613,7 @@ void codeFreeVhdlScanner()
extern "C" { // some bogus code to keep the compiler happy
void vhdlcodeYYdummy() { yy_flex_realloc(0,0); }
}
#elif YY_FLEX_MINOR_VERSION<6 && YY_FLEX_SUBMINOR_VERSION<33
#elif YY_FLEX_MAJOR_VERSION<=2 && YY_FLEX_MINOR_VERSION<=5 && YY_FLEX_SUBMINOR_VERSION<33
#error "You seem to be using a version of flex newer than 2.5.4 but older than 2.5.33. These versions do NOT work with doxygen! Please use version <=2.5.4 or >=2.5.33 or expect things to be parsed wrongly!"
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/xmlcode.l
Expand Up @@ -407,7 +407,7 @@ void resetXmlCodeParserState()
extern "C" { // some bogus code to keep the compiler happy
void xmlcodeYYdummy() { yy_flex_realloc(0,0); }
}
#elif YY_FLEX_MINOR_VERSION<6 && YY_FLEX_SUBMINOR_VERSION<33
#elif YY_FLEX_MAJOR_VERSION<=2 && YY_FLEX_MINOR_VERSION<=5 && YY_FLEX_SUBMINOR_VERSION<33
#error "You seem to be using a version of flex newer than 2.5.4. These are currently incompatible with 2.5.4, and do NOT work with doxygen! Please use version 2.5.4 or expect things to be parsed wrongly! A bug report has been submitted (#732132)."
#endif

1 comment on commit 8c51120

@MalcolmBoura
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code does not correspond to the error message in multiple places.

Please sign in to comment.