From: nishi Date: Tue, 4 Jun 2024 03:34:42 +0000 (+0000) Subject: i love yacc X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=05c070907b0b301617db651b18a154f2fcf61249;p=dataworks.git i love yacc git-svn-id: file:///raid/svn-main/nishi-dataworks/trunk@144 d4a5a174-5a4a-5b4b-b672-37683c10d7d5 --- diff --git a/Grammar/dw.y b/Grammar/dw.y index b68dd1e..864d2f9 100644 --- a/Grammar/dw.y +++ b/Grammar/dw.y @@ -79,7 +79,7 @@ arguments for(i = 0; old_nodes[i] != NULL; i++) $$.nodes[i] = old_nodes[i]; $$.nodes[i] = &$3; $$.nodes[i + 1] = NULL; - free(old_nodes); + free(old_nodes); } | SPACE | ; @@ -87,10 +87,10 @@ arguments command : IDENTIFIER SPACE '(' arguments ')' { - printf("%s %p\n", $1.ident, $1.nodes); + printf("%s %p\n", $1.ident, $4.nodes); } | IDENTIFIER '(' arguments ')' { - printf("%s %p\n", $1.ident, $1.nodes); + printf("%s %p\n", $1.ident, $3.nodes); } ;