]> Nishi Git Mirror - dataworks.git/commitdiff
will fix soon
authornishi <nishi@d4a5a174-5a4a-5b4b-b672-37683c10d7d5>
Tue, 4 Jun 2024 03:21:27 +0000 (03:21 +0000)
committernishi <nishi@d4a5a174-5a4a-5b4b-b672-37683c10d7d5>
Tue, 4 Jun 2024 03:21:27 +0000 (03:21 +0000)
git-svn-id: file:///raid/svn-main/nishi-dataworks/trunk@142 d4a5a174-5a4a-5b4b-b672-37683c10d7d5

Grammar/dw.l
Grammar/dw.y

index fb8cebd79a3d821cb225ce139b4bcd59daa2784b..c8f22c2d75ebec03f168d11ca364d1577c69b0be 100644 (file)
@@ -38,15 +38,18 @@ extern YYSTYPE yylval;
 ["][^"]*["]            {
        yylval.node.string = strdup(yytext + 1);
        yylval.node.string[strlen(yylval.node.string) - 1] = 0;
+       yylval.node.nodes = NULL;
        return (STRING);
 }
 ['][^']*[']            {
        yylval.node.string = strdup(yytext + 1);
        yylval.node.string[strlen(yylval.node.string) - 1] = 0;
+       yylval.node.nodes = NULL;
        return (STRING);
 }
 [a-zA-Z0-9_\-]+                {
        yylval.node.ident = strdup(yytext);
+       yylval.node.nodes = NULL;
        return (IDENTIFIER);
 }
 [\(\),]                        {
index 7f48ad5dd52e9b534e2da12105d0c72691eebcd6..16785fe08e344ee594f8323a8a33b3d963ab27e9 100644 (file)
@@ -38,6 +38,7 @@
        struct Node {
                char* string;
                char* ident;
+               struct Node* nodes;
        } node;
 }
 
@@ -50,10 +51,18 @@ argument
        ;
 
 single_argument
-       : SPACE argument SPACE
-       | SPACE argument
-       | argument SPACE
-       | argument
+       : SPACE argument SPACE {
+               $<node>$ = $<node>2;
+       }
+       | SPACE argument {
+               $<node>$ = $<node>2;
+       }
+       | argument SPACE {
+               $<node>$ = $<node>1;
+       }
+       | argument {
+               $<node>$ = $<node>1;
+       }
        ;
 
 arguments