1 From cf936efb8ae99dd297b6afb9c6a06beb81f5b0fb Mon Sep 17 00:00:00 2001
2 From: Heiko Becker <heirecka@exherbo.org>
3 Date: Thu, 19 Nov 2015 12:00:54 +0100
4 Subject: [PATCH] Support flex-2.6.0
6 The version checks only considered YY_FLEX_SUBMINOR_VERSION and did not
7 take YY_FLEX_MINOR_VERSION into account, which made them fail with
11 src/commentscan.l | 4 ++--
12 src/fortrancode.l | 2 +-
16 6 files changed, 7 insertions(+), 7 deletions(-)
18 diff --git a/src/code.l b/src/code.l
19 index 332358010..25719af2f 100644
22 @@ -3700,7 +3700,7 @@ void codeFreeScanner()
23 extern "C" { // some bogus code to keep the compiler happy
24 void codeYYdummy() { yy_flex_realloc(0,0); }
26 -#elif YY_FLEX_SUBMINOR_VERSION<33
27 +#elif YY_FLEX_MINOR_VERSION<6 && YY_FLEX_SUBMINOR_VERSION<33
28 #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!"
31 diff --git a/src/commentscan.l b/src/commentscan.l
32 index cf892a067..26298576e 100644
33 --- a/src/commentscan.l
34 +++ b/src/commentscan.l
35 @@ -1128,7 +1128,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
36 // but we need to know the position in the input buffer where this
38 // for flex 2.5.33+ we should use YY_CURRENT_BUFFER_LVALUE
39 -#if YY_FLEX_MINOR_VERSION>=5 && YY_FLEX_SUBMINOR_VERSION>=33
40 +#if YY_FLEX_MINOR_VERSION>5 || YY_FLEX_MINOR_VERSION>=5 && YY_FLEX_SUBMINOR_VERSION>=33
41 inputPosition=prevPosition + (int)(yy_bp - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf);
43 inputPosition=prevPosition + (int)(yy_bp - yy_current_buffer->yy_ch_buf);
44 @@ -1190,7 +1190,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
45 g_memberGroupHeader.resize(0);
48 -#if YY_FLEX_MINOR_VERSION>=5 && YY_FLEX_SUBMINOR_VERSION>=33
49 +#if YY_FLEX_MINOR_VERSION>5 || YY_FLEX_MINOR_VERSION>=5 && YY_FLEX_SUBMINOR_VERSION>=33
50 inputPosition=prevPosition + (int)(yy_bp - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) + strlen(yytext);
52 inputPosition=prevPosition + (int)(yy_bp - yy_current_buffer->yy_ch_buf) + strlen(yytext);
53 diff --git a/src/fortrancode.l b/src/fortrancode.l
54 index fb91a8300..352912b71 100644
55 --- a/src/fortrancode.l
56 +++ b/src/fortrancode.l
57 @@ -1306,7 +1306,7 @@ void parseFortranCode(CodeOutputInterface &od,const char *className,const QCStri
58 extern "C" { // some bogus code to keep the compiler happy
59 void fortrancodeYYdummy() { yy_flex_realloc(0,0); }
61 -#elif YY_FLEX_SUBMINOR_VERSION<33
62 +#elif YY_FLEX_MINOR_VERSION<6 && YY_FLEX_SUBMINOR_VERSION<33
63 #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!"
65 extern "C" { // some bogus code to keep the compiler happy
66 diff --git a/src/pycode.l b/src/pycode.l
67 index 3c41a69ec..f58f7c139 100644
70 @@ -1503,7 +1503,7 @@ void parsePythonCode(CodeOutputInterface &od,const char * /*className*/,
71 extern "C" { // some bogus code to keep the compiler happy
72 void pycodeYYdummy() { yy_flex_realloc(0,0); }
74 -#elif YY_FLEX_SUBMINOR_VERSION<33
75 +#elif YY_FLEX_MINOR_VERSION<6 && YY_FLEX_SUBMINOR_VERSION<33
76 #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)."
79 diff --git a/src/vhdlcode.l b/src/vhdlcode.l
80 index 369ae4881..695704844 100644
83 @@ -1613,7 +1613,7 @@ void codeFreeVhdlScanner()
84 extern "C" { // some bogus code to keep the compiler happy
85 void vhdlcodeYYdummy() { yy_flex_realloc(0,0); }
87 -#elif YY_FLEX_SUBMINOR_VERSION<33
88 +#elif YY_FLEX_MINOR_VERSION<6 && YY_FLEX_SUBMINOR_VERSION<33
89 #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!"
92 From 8c51120ad55b440b738ef0b96f8169d84a7ae88a Mon Sep 17 00:00:00 2001
93 From: Dimitri van Heesch <dimitri@stack.nl>
94 Date: Sun, 22 Nov 2015 13:58:59 +0100
95 Subject: [PATCH] Support flex-2.6.0
99 src/commentscan.l | 4 ++--
100 src/fortrancode.l | 6 +++---
102 src/vhdlcode.l | 2 +-
104 6 files changed, 10 insertions(+), 10 deletions(-)
106 diff --git a/src/code.l b/src/code.l
107 index 25719af2f..f014924a0 100644
110 @@ -3700,7 +3700,7 @@ void codeFreeScanner()
111 extern "C" { // some bogus code to keep the compiler happy
112 void codeYYdummy() { yy_flex_realloc(0,0); }
114 -#elif YY_FLEX_MINOR_VERSION<6 && YY_FLEX_SUBMINOR_VERSION<33
115 -#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!"
116 +#elif YY_FLEX_MAJOR_VERISON<=2 && YY_FLEX_MINOR_VERSION<=5 && YY_FLEX_SUBMINOR_VERSION<33
117 +#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)."
120 diff --git a/src/commentscan.l b/src/commentscan.l
121 index 26298576e..ffed075b0 100644
122 --- a/src/commentscan.l
123 +++ b/src/commentscan.l
124 @@ -1128,7 +1128,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
125 // but we need to know the position in the input buffer where this
127 // for flex 2.5.33+ we should use YY_CURRENT_BUFFER_LVALUE
128 -#if YY_FLEX_MINOR_VERSION>5 || YY_FLEX_MINOR_VERSION>=5 && YY_FLEX_SUBMINOR_VERSION>=33
129 +#if YY_FLEX_MAJOR_VERSION>=2 && (YY_FLEX_MINOR_VERSION>5 || (YY_FLEX_MINOR_VERSION==5 && YY_FLEX_SUBMINOR_VERSION>=33))
130 inputPosition=prevPosition + (int)(yy_bp - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf);
132 inputPosition=prevPosition + (int)(yy_bp - yy_current_buffer->yy_ch_buf);
133 @@ -1190,7 +1190,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
134 g_memberGroupHeader.resize(0);
137 -#if YY_FLEX_MINOR_VERSION>5 || YY_FLEX_MINOR_VERSION>=5 && YY_FLEX_SUBMINOR_VERSION>=33
138 +#if YY_FLEX_MAJOR_VERSION>=2 && (YY_FLEX_MINOR_VERSION>5 || (YY_FLEX_MINOR_VERSION==5 && YY_FLEX_SUBMINOR_VERSION>=33))
139 inputPosition=prevPosition + (int)(yy_bp - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) + strlen(yytext);
141 inputPosition=prevPosition + (int)(yy_bp - yy_current_buffer->yy_ch_buf) + strlen(yytext);
142 diff --git a/src/fortrancode.l b/src/fortrancode.l
143 index 352912b71..82e78c184 100644
144 --- a/src/fortrancode.l
145 +++ b/src/fortrancode.l
146 @@ -1302,11 +1302,11 @@ void parseFortranCode(CodeOutputInterface &od,const char *className,const QCStri
150 -#if !defined(YY_FLEX_SUBMINOR_VERSION)
151 +#if !defined(YY_FLEX_SUBMINOR_VERSION)
152 extern "C" { // some bogus code to keep the compiler happy
153 - void fortrancodeYYdummy() { yy_flex_realloc(0,0); }
154 + void fortrancodeYYdummy() { yy_flex_realloc(0,0); }
156 -#elif YY_FLEX_MINOR_VERSION<6 && YY_FLEX_SUBMINOR_VERSION<33
157 +#elif YY_FLEX_MAJOR_VERSION<=2 && YY_FLEX_MINOR_VERSION<=5 && YY_FLEX_SUBMINOR_VERSION<33
158 #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!"
160 extern "C" { // some bogus code to keep the compiler happy
161 diff --git a/src/pycode.l b/src/pycode.l
162 index f58f7c139..2b2a6684e 100644
165 @@ -1503,7 +1503,7 @@ void parsePythonCode(CodeOutputInterface &od,const char * /*className*/,
166 extern "C" { // some bogus code to keep the compiler happy
167 void pycodeYYdummy() { yy_flex_realloc(0,0); }
169 -#elif YY_FLEX_MINOR_VERSION<6 && YY_FLEX_SUBMINOR_VERSION<33
170 +#elif YY_FLEX_MAJOR_VERISON<=2 && YY_FLEX_MINOR_VERSION<=5 && YY_FLEX_SUBMINOR_VERSION<33
171 #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)."
174 diff --git a/src/vhdlcode.l b/src/vhdlcode.l
175 index 695704844..e4ae0e7ff 100644
178 @@ -1613,7 +1613,7 @@ void codeFreeVhdlScanner()
179 extern "C" { // some bogus code to keep the compiler happy
180 void vhdlcodeYYdummy() { yy_flex_realloc(0,0); }
182 -#elif YY_FLEX_MINOR_VERSION<6 && YY_FLEX_SUBMINOR_VERSION<33
183 +#elif YY_FLEX_MAJOR_VERSION<=2 && YY_FLEX_MINOR_VERSION<=5 && YY_FLEX_SUBMINOR_VERSION<33
184 #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!"
187 --- doxygen-1.8.10/src/xmlcode.l.orig 2021-04-24 18:28:51.986367667 +0200
188 +++ doxygen-1.8.10/src/xmlcode.l 2021-04-24 18:28:55.833013495 +0200
189 @@ -407,7 +407,7 @@ void resetXmlCodeParserState()
190 extern "C" { // some bogus code to keep the compiler happy
191 void xmlcodeYYdummy() { yy_flex_realloc(0,0); }
193 -#elif YY_FLEX_SUBMINOR_VERSION<33
194 +#elif YY_FLEX_MAJOR_VERSION<=2 && YY_FLEX_MINOR_VERSION<=5 && YY_FLEX_SUBMINOR_VERSION<33
195 #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)."