shithub: rgbds

Download patch

ref: af6f62701c5ab36fa674ef430981003f5498432a
parent: 299574221ebbc7a214dbc169e01e59732c78c7f1
author: ISSOtm <eldredhabert0@gmail.com>
date: Sun Feb 9 17:02:47 EST 2020

Remove ambiguous charmap syntax

The syntax was `charmap "anything", "string"`; the second string was
already handled by `const`, but to the same effect... the ambiguous
declaration has been removed, leaving us at "only" two reduce/reduce
conflicts.

--- a/src/asm/asmy.y
+++ b/src/asm/asmy.y
@@ -997,14 +997,7 @@
 		}
 ;
 
-charmap		: T_POP_CHARMAP string comma string
-		{
-			if (charmap_Add($2, $4[0] & 0xFF) == -1) {
-				fprintf(stderr, "Error parsing charmap. Either you've added too many (%i), or the input character length is too long (%i)' : %s\n", MAXCHARMAPS, CHARMAPLENGTH, strerror(errno));
-				yyerror("Error parsing charmap.");
-			}
-		}
-		| T_POP_CHARMAP string comma const
+charmap		: T_POP_CHARMAP string comma const
 		{
 			if (charmap_Add($2, constexpr_GetConstantValue(&$4) & 0xFF) == -1) {
 				fprintf(stderr, "Error parsing charmap. Either you've added too many (%i), or the input character length is too long (%i)' : %s\n", MAXCHARMAPS, CHARMAPLENGTH, strerror(errno));