help-bison
[Top][All Lists]
Advanced

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

Recovering token values


From: tindlp00
Subject: Recovering token values
Date: Mon, 30 Apr 2001 12:35:33 MET

Hello!!
I try to get the token values using the $n variables. I am working with 
strings, but when I need to get the value of a token , bison return something 
completely different. I.e:

I have a rule  like this:

TK_LT NAME ATTRIBUTES TK_GT
This rule is to recognize a start tag in a xml document. When the rule is 
matched and the action is executed, I use something like this:

STag_Name = $2

but bison returns, not only the value of name, but all the token values until 
the end of the rule. I.e:

If the start tag is <Ingredients number = "12" price = "$12">, and I use
       STag_Name = $2
to recover the name of the tag, I only recover a surprise when I notice that 
what I have in the varible STag_Name is 'Ingredients number = "12" price 
= "$12"> '

Can anybody suggest something to find out a solution?

Thanks very much. Daniel López





reply via email to

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