LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-26-2005, 12:17 AM   #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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 11:19 AM
thunderbird and bison? bkz81 Linux - Newbie 3 08-11-2005 01:41 PM
Installing Bison lectraplayer Linux - Newbie 2 09-25-2003 08:43 PM
need to find bison bicjoe Linux - Newbie 3 07-11-2003 07:35 PM
yacc, Bison Config Linux - General 6 02-21-2002 03:18 PM

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

All times are GMT -5. The time now is 09:28 AM.

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