LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-25-2005, 11:17 PM   #1
dogbird
Member
 
Registered: Nov 2004
Location: oklahoma
Distribution: slackware 9.0
Posts: 98

Rep: Reputation: 15
Unhappy Having problems with BISON


I am trying to build a compiler (from scratch). The problem is I have a mature SLR grammar that works a llittle occasionally. It is not clear what makes it work or not work. If I trim the grammar for debugging purposes., the part that works quits working. That is truely wierd.


prog : program
;
progarm : BLOCK
;
BLOCK : BEGIN_SYM declist semililist stamtlist END_SYM
;
declist : declare
| declist semilist declare
;
declare : storage dectype id_list
| dectype id_list


storage : OWN
| EXTERN
;

dectype : INTEGER
| REAL
| string
| INTEGER ARRAY
| REAL ARRAY
| STRING ARRAY
;
id_list : id_list COMMA ID
| ID


infact I get the following

BEGIN
OWN
INTGER
i COMMA
j COMMA
k COMMA
l COMMA
m COMMA
n
1 1 syntax error SEMICOLON


All I can figure is that BISON opmizies the internal state and clips something
If if remove something to simplify the grammar . It quits doing this even.

If I look at the try.output it looks lke the state values are correct and the tokken selection should work. But it doesnt.

I have an SLR table generaror and it doesn not optimize and it does not make hidden changes.
josephus


 
  


Reply



Posting 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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bison / flex zaman Programming 1 08-16-2005 10:19 AM
thunderbird and bison? bkz81 Linux - Newbie 3 08-11-2005 12:41 PM
Installing Bison lectraplayer Linux - Newbie 2 09-25-2003 07:43 PM
need to find bison bicjoe Linux - Newbie 3 07-11-2003 06:35 PM
yacc, Bison Config Linux - General 6 02-21-2002 02:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration