[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: The problem with Mid-Rule Action
From: |
Vincent Zweije |
Subject: |
RE: The problem with Mid-Rule Action |
Date: |
Fri, 20 Jun 2003 12:21:29 +0200 |
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.
--
Answer: no.
Question: should I reply before the quote?