LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-18-2016, 03:57 PM   #16
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_12{.0|.1}
Posts: 5,583
Blog Entries: 11

Rep: Reputation: 3602Reputation: 3602Reputation: 3602Reputation: 3602Reputation: 3602Reputation: 3602Reputation: 3602Reputation: 3602Reputation: 3602Reputation: 3602Reputation: 3602

One further note on the bison warning: It does appear that the warning message threshold and options have changed since the book was written. For this example the grammar is written as intended and relies on the default bison behavior to resolve the harmless conflict and enforce the desired precedence/associative behavior (changing exp to factor as discussed in some posts may remove the conflict, but change the precedence).

If you really want to silence the message for this examaple, add this to the bison command:

Code:
bison -d fb1-5.y --warnings=no-conflicts-sr
I leave reading of the man page for the full explanation of this option, it was a new one to me as well, probably to compensate for the change in other behavior.

You could also silence it using the %expect directive as mentioned above...

Code:
%expect 3
Hope this helps!

Last edited by astrogeek; 08-18-2016 at 04:03 PM.
 
Old 08-30-2016, 10:38 AM   #17
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,120

Original Poster
Rep: Reputation: 38
Quote:
Originally Posted by astrogeek View Post
One further note on the bison warning: It does appear that the warning message threshold and options have changed since the book was written. For this example the grammar is written as intended and relies on the default bison behavior to resolve the harmless conflict and enforce the desired precedence/associative behavior (changing exp to factor as discussed in some posts may remove the conflict, but change the precedence).

If you really want to silence the message for this examaple, add this to the bison command:

Code:
bison -d fb1-5.y --warnings=no-conflicts-sr
I leave reading of the man page for the full explanation of this option, it was a new one to me as well, probably to compensate for the change in other behavior.

You could also silence it using the %expect directive as mentioned above...

Code:
%expect 3
Hope this helps!
I am using the Flex and Bison versions that the book mentions in its first pages. I was convinced that there is a problem with the grammar, as showed in these previous posts, and we fixed it. It does not seems correct that Bison's default behaviour would be to ignore that conflict. My Bison installation was done from scratch (so everything was as default as possible).

To solve this conflict with a directive "%expect" or that command line option does not seems good for me. Further, it may imply on changes in the grammar that are not so clear (also for me).

Me and a few other people that have started reading this book (at least started) think that it missed more tests in its code.
 
  


Reply

Tags
bison


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
problem with installing bison dharm_sk Linux - Software 1 08-07-2014 01:01 AM
Problem with bison 2.4.1 savio84 Programming 1 03-25-2011 07:55 PM
Is there any support for bison-bridge and bison-locations in flex on windows systems? rami alkhateeb Linux - Software 0 12-29-2010 09:10 AM
Problem installing Bison 2.4.1 on Suse 11.1 Takuan Linux - Newbie 1 10-13-2009 10:59 AM
bison, flex and make problem ChimpFace9000 Programming 4 05-19-2002 07:49 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:58 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