["][^"]*["] {
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);
}
[\(\),] {
struct Node {
char* string;
char* ident;
+ struct Node* nodes;
} node;
}
;
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