in the .y file,
|
ZERO T_SECTION
{ SyntaxNode t; t.ystype=0; t.enum_ystype=STRVAL;
t.datum.strval=_strdup($2); deque_put_back(t); }
|
| T__CELTYPE code6
{ SyntaxNode t; t.ystype=9; t.enum_ystype=STRVAL;
t.datum.strval=_strdup($1); deque_put_back(&t); }
| T__CELWEIGHT code370
{ SyntaxNode t; t.ystype=9; t.enum_ystype=STRVAL;
t.datum.strval=_strdup($1); deque_put_back(&t); }
| T__CEPSNID code390
{ SyntaxNode t; t.ystype=9; t.enum_ystype=STRVAL;
t.datum.strval=_strdup($1); deque_put_back(&t); }
I have tried this with yylval and with $2. I get the same results. I am using
bison 2.1 (sorry, it's the latest version available for my platform).
apparently what gets put in as a datum is a null the first time (here).
the rest of the times I use $2 I get an empty string or a crash when I try to
print the string. it works until the 10th item.
what I want is the string value from flex.
help
Jim Michaels
[EMAIL PROTECTED]
http://JesusnJim.com
_______________________________________________
[email protected] http://lists.gnu.org/mailman/listinfo/help-bison