aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2012-04-25 10:40:36 +0000
committerDimitri Sokolyuk <demon@dim13.org>2012-04-25 10:40:36 +0000
commit42c9563d835bca6ccdfe9633ea8ca73b85f85a2d (patch)
treea0b1ad732c46796d700b7624524cab168d0e1f21
parentca511cbb7d47b9af3a52c5f3113527a3c9a8298f (diff)
fix commas by DAT, comma errors are catched by generic error handling
-rw-r--r--gramar.y10
1 files changed, 3 insertions, 7 deletions
diff --git a/gramar.y b/gramar.y
index 64d348b..921e7c8 100644
--- a/gramar.y
+++ b/gramar.y
@@ -83,7 +83,7 @@ prog
;
statement
- : opcode operand comma operand
+ : opcode operand COMMA operand
{
if ($1 == 0x05 && $4 == 0x20)
yyerror("division by zero");
@@ -104,12 +104,8 @@ statement
data
: /* empty */
- | data comma block
- ;
-
-comma
- : /* empty */ { yyerror("missing comma"); }
- | COMMA
+ | data block
+ | data COMMA block
;
block