Convert bison.sh to posix shell (#1369)

* Convert bison.sh to posix shell

* Refactor bison.sh to be more like CMakeLists.txt

No current warnings with shellcheck.net.
This commit is contained in:
orbea
2024-03-21 13:06:36 -07:00
committed by GitHub
parent 0300971a17
commit 0f772932a5
2 changed files with 25 additions and 20 deletions

View File

@@ -9,7 +9,7 @@ set(common_src
)
find_package(BISON 3.0.0 REQUIRED)
set(BISON_FLAGS "-Wall")
set(BISON_FLAGS "-Wall -Dparse.lac=full -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")
@@ -19,8 +19,6 @@ if(BISON_VERSION VERSION_GREATER_EQUAL "3.6")
else()
set(BISON_FLAGS "${BISON_FLAGS} -Dparse.error=verbose")
endif()
set(BISON_FLAGS "${BISON_FLAGS} -Dparse.lac=full")
set(BISON_FLAGS "${BISON_FLAGS} -Dlr.type=ielr")
BISON_TARGET(ASM_PARSER "asm/parser.y"
"${PROJECT_SOURCE_DIR}/src/asm/parser.cpp"