[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The problem with Mid-Rule Action
From: |
wim delvaux |
Subject: |
Re: The problem with Mid-Rule Action |
Date: |
Fri, 20 Jun 2003 12:31:46 +0200 |
User-agent: |
KMail/1.5.1 |
On Friday 20 June 2003 12:21, Vincent Zweije wrote:
> Praveen Thakur wrote:
> || Non-term1 : TOKEN1 {// some code to create objects}
> || Non-term2 {//using the value of $3 and it
> || gives correct value of Non-term2}
> || TOKEN2 {// Now when I use $3(for Non-term2)
> ||
> || here, it's not
> || giving the correct value...
> || rather it gives the value of Non-
> || term2 as well as of TOKEN2.. I want
> || to access the value of
> || Non-term2 here.}
> ||
> || Non-term2 : STRING {$$=$1;}
>
> Maybe your tokens are being clobbered by the scanner when it scans
> the next token. Flex only maintains one token at any time. If you
> want to save its contents, you must copy it explicitly.
>
> Ciao,
> Vincent.
I had a similar problem and Indeed it was my error ... check the archives for
yylval and wim delvaux and you will find it ...
W