]> Nishi Git Mirror - dataworks.git/commitdiff
i love yacc
authornishi <nishi@d4a5a174-5a4a-5b4b-b672-37683c10d7d5>
Tue, 4 Jun 2024 03:34:42 +0000 (03:34 +0000)
committernishi <nishi@d4a5a174-5a4a-5b4b-b672-37683c10d7d5>
Tue, 4 Jun 2024 03:34:42 +0000 (03:34 +0000)
git-svn-id: file:///raid/svn-main/nishi-dataworks/trunk@144 d4a5a174-5a4a-5b4b-b672-37683c10d7d5

Grammar/dw.y

index b68dd1e2f8c83f0ce6dfaf520c4cfbe7b44ed7b4..864d2f9d272f6eb2ea7398227c14b6f491beadc6 100644 (file)
@@ -79,7 +79,7 @@ arguments
                for(i = 0; old_nodes[i] != NULL; i++) $<node>$.nodes[i] = old_nodes[i];
                $<node>$.nodes[i] = &$<node>3;
                $<node>$.nodes[i + 1] = NULL;
-               free(old_nodes);
+               free(old_nodes);        
        }
        | SPACE
        | ;
@@ -87,10 +87,10 @@ arguments
 
 command
        : IDENTIFIER SPACE '(' arguments ')' {
-               printf("%s %p\n", $<node>1.ident, $<node>1.nodes);
+               printf("%s %p\n", $<node>1.ident, $<node>4.nodes);
        }
        | IDENTIFIER '(' arguments ')' {
-               printf("%s %p\n", $<node>1.ident, $<node>1.nodes);
+               printf("%s %p\n", $<node>1.ident, $<node>3.nodes);
        }
        ;