From 42c9563d835bca6ccdfe9633ea8ca73b85f85a2d Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Wed, 25 Apr 2012 10:40:36 +0000 Subject: fix commas by DAT, comma errors are catched by generic error handling --- gramar.y | 10 +++------- 1 file 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 -- cgit v1.2.3