Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > bison trouble

bison trouble
Thread Tools
Dedicated MacNNer
Join Date: Jan 2001
Location: Boulder, CO, USA
Status: Offline
Reply With Quote
Dec 21, 2001, 01:35 PM
 
you know what i mean. the stampedes, the constant grazing. sigh.



anyone tried the version of bison that comes with OSX or know anything about it? i'm getting some odd behavior.

to test, i made a very simple grammar which generates/accepts the language consisting of the string "hi there. how are you?" and the parser chokes. is says it expected the token "hi". this is, of course, in fact the first token of the input i feed it.

asking the parser to generate debug strings, i find out that, while my yylex function is correctly identifying the token and returning the index (5) of that token in the generated token table (i used the %token_table declaration), somehow the parser thinks it was passed the index 2, which points to "$undefined".

anyone follow this? have any thoughts? thanks in advance

(oh, i also couldn't get %pure_parser to work correctly, but that's something else.)

[ 12-21-2001: Message edited by: aleph_null ]
     
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status: Offline
Reply With Quote
Dec 25, 2001, 03:21 PM
 
Can you paste your grammar and lex files?
"Against stupidity, the gods themselves contend in vain" (Schiller)
     
Dedicated MacNNer
Join Date: Jan 2001
Location: Boulder, CO, USA
Status: Offline
Reply With Quote
Dec 28, 2001, 11:10 AM
 
Thanks parallax. Been away from work for a bit... I'll post some code when I get back to it.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:09 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2