Skip to content

Commit 3c3a867

Browse files
committed
issue #10989 bison: error: '%name-prefix' and '%define api.prefix' cannot be used together
- remove the deprecated `-p` option of bison - updating the minumum version of flex - removing old test for flex against version >= 2.5.33
1 parent 05ef427 commit 3c3a867

File tree

3 files changed

+3
-15
lines changed

3 files changed

+3
-15
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ endif ()
189189
find_program(DOT NAMES dot)
190190
find_package(Python REQUIRED)
191191
find_package(FLEX REQUIRED)
192-
if (FLEX_VERSION VERSION_LESS 2.5.37)
193-
message(SEND_ERROR "Doxygen requires at least flex version 2.5.37 (installed: ${FLEX_VERSION})")
192+
if (FLEX_VERSION VERSION_LESS 2.6.3)
193+
message(SEND_ERROR "Doxygen requires at least flex version 2.6.3 (installed: ${FLEX_VERSION})")
194194
endif()
195195
find_package(BISON REQUIRED)
196196
if (BISON_VERSION VERSION_LESS 2.7)

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ set_source_files_properties(${GENERATED_SRC}/configoptions.cpp PROPERTIES GENERA
7272

7373
# ce_parse.h
7474
add_custom_command(
75-
COMMAND ${BISON_EXECUTABLE} -l -d -p ce_parsexpYY ${CMAKE_CURRENT_LIST_DIR}/constexp.y -o ce_parse.c
75+
COMMAND ${BISON_EXECUTABLE} -l -d ${CMAKE_CURRENT_LIST_DIR}/constexp.y -o ce_parse.c
7676
DEPENDS ${CMAKE_CURRENT_LIST_DIR}/constexp.y
7777
OUTPUT ${GENERATED_SRC}/ce_parse.h
7878
WORKING_DIRECTORY ${GENERATED_SRC}

src/commentscan.l

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -943,15 +943,7 @@ STopt [^\n@\\]*
943943
// of this command.
944944
yyextra->parseMore=TRUE;
945945

946-
// yuk, this is probably not very portable across lex implementations,
947-
// but we need to know the position in the input buffer where this
948-
// rule matched.
949-
// for flex 2.5.33+ we should use YY_CURRENT_BUFFER_LVALUE
950-
#if YY_FLEX_MAJOR_VERSION>=2 && (YY_FLEX_MINOR_VERSION>5 || (YY_FLEX_MINOR_VERSION==5 && YY_FLEX_SUBMINOR_VERSION>=33))
951946
yyextra->inputPosition=yyextra->prevPosition + (int)(yy_bp - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf);
952-
#else
953-
yyextra->inputPosition=yyextra->prevPosition + (int)(yy_bp - yy_current_buffer->yy_ch_buf);
954-
#endif
955947
yyterminate();
956948
}
957949
else if (it->second.handler==nullptr)
@@ -1021,11 +1013,7 @@ STopt [^\n@\\]*
10211013
yyextra->docGroup.clearHeader();
10221014
yyextra->parseMore=TRUE;
10231015
yyextra->needNewEntry = TRUE;
1024-
#if YY_FLEX_MAJOR_VERSION>=2 && (YY_FLEX_MINOR_VERSION>5 || (YY_FLEX_MINOR_VERSION==5 && YY_FLEX_SUBMINOR_VERSION>=33))
10251016
yyextra->inputPosition=yyextra->prevPosition + (int)(yy_bp - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) + (int)strlen(yytext);
1026-
#else
1027-
yyextra->inputPosition=yyextra->prevPosition + (int)(yy_bp - yy_current_buffer->yy_ch_buf) + (int)strlen(yytext);
1028-
#endif
10291017
yyterminate();
10301018
}
10311019
<Comment>{B}*{CMD}[$@\\&~<>#%] { // escaped character

0 commit comments

Comments
 (0)