shithub: rgbds

Download patch

ref: 81675bc4c71faaa00f037018c8eee4c1cf66183c
parent: 37b615f070a2859b71e1a6a4f12a398c9a6dd467
author: Christophe Staïesse <[email protected]>
date: Sat Jul 25 21:50:56 EDT 2015

Fix yacc conflict (asmfile/lastline/lines/line rules)

--- a/src/asm/asmy.y
+++ b/src/asm/asmy.y
@@ -497,14 +497,9 @@
 
 %%
 
-asmfile : lines lastline;
+asmfile : lines;
 
-lastline : /* empty */
-	| line {
-		nLineNo += 1;
-		nTotalLines += 1;
-	};
-
+/* Note: The lexer add '\n' at the end of the input */
 lines : /* empty */
 	| lines line '\n' {
 		nLineNo += 1;
@@ -511,8 +506,7 @@
 		nTotalLines += 1;
 	};
 
-line : /* empty */
-	| label
+line : label
 	| label cpu_command
 	| label macro
 	| label simple_pseudoop