help-bison
[Top][All Lists]
Advanced

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

bison puts too many tokens in the semantic value


From: Richard Garand
Subject: bison puts too many tokens in the semantic value
Date: Sat, 3 Mar 2001 08:46:46 -0600

I have a rule in a bison file(name:   '"' NAME '"', where name is
alphanumeric characters), but when I try to use $2 (when NAME="abc") it
gives me abc". Why does it add the " at the end, even if it's another token?
I have another rules, package_info: package_open name pkdoc;, and when name
is "abc" (semantic value: abc) and pkdoc is 'documentation "def"\n'
(semantic value: def), it says $2 is 'abc" documentation "def"\n". Why does
it go to the end of the line in one token? Are the token numbers just
pointers into the input string? they should be null-terminated copies of the
input.

Richard Garand
address@hidden
ICQ: 12190132
"The original, complete, and unadulterated Descent! Play the game that
turned 3D action on its head and made it puke!" - CGW




reply via email to

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