Only define parse.lac for Bison 3.5 or greater (#1702)

This commit is contained in:
Rangi
2025-06-14 17:01:16 -04:00
committed by GitHub
parent 612cf3b7dd
commit 37bf9fae01
2 changed files with 4 additions and 4 deletions

View File

@@ -9,10 +9,10 @@ set(common_src
)
find_package(BISON 3.0.0 REQUIRED)
set(BISON_FLAGS "-Wall -Dparse.lac=full -Dlr.type=ielr")
set(BISON_FLAGS "-Wall -Dlr.type=ielr")
# Set some optimization flags on versions that support them
if(BISON_VERSION VERSION_GREATER_EQUAL "3.5")
set(BISON_FLAGS "${BISON_FLAGS} -Dapi.token.raw=true")
set(BISON_FLAGS "${BISON_FLAGS} -Dparse.lac=full -Dapi.token.raw=true")
endif()
if(BISON_VERSION VERSION_GREATER_EQUAL "3.6")
set(BISON_FLAGS "${BISON_FLAGS} -Dparse.error=detailed")