On 6 Nov 2008, at 01:21, Angelika Kratochwil wrote:
it works when i have in one row just one signal, but if i have a
sequence,
it didn't.
...
asig: asig COMMA STRING ™ ™ ™ { printf("signal: %s",$3);}
™ ™ ™ | STRING™ ™ ™ ™ ™ ™ { printf("signal: %s",$1);}
™ ™ ™ ;
...
has anyone an idea how i can merge a sequence? the problem is the
"asig"
rule in the rule "fullSignal". Please help me, I have no idea how I
can
solve that.
Suppose one would want to create a list containing the string
components; them, in C++ pseudocode using a std::list like container,
one could write
asig:
STRING { $$ = list($1); }
| asig COMMA STRING { $$ = $1.append($3); }
;
Then en semantic type needs to be able to hold such a type.
Hans
_______________________________________________
help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison