help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

string token


From: Nosnos
Subject: string token
Date: Tue, 2 Dec 2003 12:02:24 +0000

Hi,

I have a newbies problem, but could not find the solution.

My bison file has something like that :

%token <string> STR1
%token <string> STR2

example : STR1 STR2            { printf(STR1); printf(STR2);}
;

my flex has something like that :

[...]
"toto"    ncpy(yylval.string, yytext, yyleng); return STR1;
"tata"    ncpy(yylval.string, yytext, yyleng); return STR2;
[...]


Even the contains of STR1 and STR2 are different, my printf return me the same 
string for STR1 and STR2.....


What's wrong ?

thx




reply via email to

[Prev in Thread] Current Thread [Next in Thread]