Skip to content

Commit 37bf9fa

Browse files
authored
Only define parse.lac for Bison 3.5 or greater (#1702)
1 parent 612cf3b commit 37bf9fa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ set(common_src
99
)
1010

1111
find_package(BISON 3.0.0 REQUIRED)
12-
set(BISON_FLAGS "-Wall -Dparse.lac=full -Dlr.type=ielr")
12+
set(BISON_FLAGS "-Wall -Dlr.type=ielr")
1313
# Set some optimization flags on versions that support them
1414
if(BISON_VERSION VERSION_GREATER_EQUAL "3.5")
15-
set(BISON_FLAGS "${BISON_FLAGS} -Dapi.token.raw=true")
15+
set(BISON_FLAGS "${BISON_FLAGS} -Dparse.lac=full -Dapi.token.raw=true")
1616
endif()
1717
if(BISON_VERSION VERSION_GREATER_EQUAL "3.6")
1818
set(BISON_FLAGS "${BISON_FLAGS} -Dparse.error=detailed")

src/bison.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ if [ "$BISON_MAJOR" -lt 3 ]; then
1212
exit 1
1313
fi
1414

15-
BISON_FLAGS="-Wall -Dparse.lac=full -Dlr.type=ielr"
15+
BISON_FLAGS="-Wall -Dlr.type=ielr"
1616

1717
# Set some optimization flags on versions that support them
1818
if [ "$BISON_MAJOR" -ge 4 ] || [ "$BISON_MAJOR" -eq 3 ] && [ "$BISON_MINOR" -ge 5 ]; then
19-
BISON_FLAGS="$BISON_FLAGS -Dapi.token.raw=true"
19+
BISON_FLAGS="$BISON_FLAGS -Dparse.lac=full -Dapi.token.raw=true"
2020
fi
2121
if [ "$BISON_MAJOR" -ge 4 ] || [ "$BISON_MAJOR" -eq 3 ] && [ "$BISON_MINOR" -ge 6 ]; then
2222
BISON_FLAGS="$BISON_FLAGS -Dparse.error=detailed"

0 commit comments

Comments
 (0)