shithub: rgbds

Download patch

ref: 5ef8e0a1f6907ba33bf2a56e8911454f3a5b5569
parent: eb4952c188fddf486adbdb98a82ea9e6123eaff1
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Sun Jan 10 14:29:47 EST 2021

Use an IELR parser if available

--- a/Makefile
+++ b/Makefile
@@ -133,6 +133,7 @@
 	add_flag 3 6 parse.error=detailed; \
 	add_flag 3 0 parse.error=verbose; \
 	add_flag 3 0 parse.lac=full; \
+	add_flag 3 0 lr.type=ielr; \
 	echo "DEFS=$$DEFS"; \
 	${BISON} $$DEFS -d ${YFLAGS} -o $@ $<
 
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -33,6 +33,7 @@
 endif()
 if(BISON_VERSION VERSION_GREATER_EQUAL "3.0")
   set(BISON_FLAGS "${BISON_FLAGS} -Dparse.lac=full")
+  set(BISON_FLAGS "${BISON_FLAGS} -Dlr.type=ielr")
 endif()
 BISON_TARGET(PARSER "asm/parser.y"
              "${PROJECT_SOURCE_DIR}/src/asm/parser.c"