From a02fa349ce459fcb6d710d4c97a86cb05995cb44 Mon Sep 17 00:00:00 2001 From: jpekkila Date: Thu, 3 Oct 2019 01:52:56 +0300 Subject: [PATCH] Commented out a grammar rule that was ambiguous --- acc/src/acc.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acc/src/acc.y b/acc/src/acc.y index 24c0774..bbf9139 100644 --- a/acc/src/acc.y +++ b/acc/src/acc.y @@ -66,7 +66,7 @@ compound_statement: '{' '}' statement: selection_statement { $$ = astnode_create(NODE_UNKNOWN, $1, NULL); } | iteration_statement { $$ = astnode_create(NODE_UNKNOWN, $1, NULL); } | exec_statement ';' { $$ = astnode_create(NODE_UNKNOWN, $1, NULL); $$->postfix = ';'; } - | compound_statement { $$ = astnode_create(NODE_UNKNOWN, $1, NULL); } + //| compound_statement { $$ = astnode_create(NODE_UNKNOWN, $1, NULL); } // shift-reduce conflict, would be needed only for nested compound statements. TODO remove ; selection_statement: IF expression else_selection_statement { $$ = astnode_create(NODE_UNKNOWN, $2, $3); $$->prefix = IF; }