[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
The problem with Mid-Rule Action
From: |
praveen thakur |
Subject: |
The problem with Mid-Rule Action |
Date: |
Fri, 20 Jun 2003 10:19:16 +0100 (BST) |
Hi,
I am giving the mid-rule action in my parser which
is like this...
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;}
< The Parser has lot many rules... I just wanted to be
specific about the problem, that's why instead of real
code I wrote like the above..>
What is the reason behind this ?? How the value in
"yyvsp" changes and used by $ values ??
More specific, how can I get the desired result ??
I am using Flex++2.3.8 -7 and Bison++ 1.218 from GNU.
Thanking you all,
praveen
__________________________________________________
Yahoo! Plus
For a better Internet experience
http://www.yahoo.co.uk/btoffer
- The problem with Mid-Rule Action,
praveen thakur <=