turner@unc.cs.unc.edu (Douglass Turner) (03/18/88)
Anyone out there using Gnu's Bison? I'd like to use it in place of yacc but don't know how to make the substitution. Can I still use lex with it or what? Help or pointers to help would be great. Thanks in advance -Doug [I've taken a brief look at bison and it appears that by and large you can feed it the same input language that you would give to yacc. It uses the same interfaces, so lex should work as well there as it does with yacc. -John] -- Send compilers articles to ima!compilers or, in a pinch, to Levine@YALE.EDU Plausible paths are { ihnp4 | decvax | cbosgd | harvard | yale | bbn}!ima Please send responses to the originator of the message -- I cannot forward mail accidentally sent back to compilers. Meta-mail to ima!compilers-request
ejp@ausmelb.oz.au (Esmond Pitt) (03/22/88)
In article <1145@thorin.cs.unc.edu> turner@unc.cs.unc.edu (Douglass Turner) writes: >Anyone out there using Gnu's Bison? ... 1. To get yacc's default output names (y.output, y.tab.c and y.tab.h) instead of Bison's output names, you need to use the -y switch. 2. Bison's generated parser uses the Vax alloca() function, which you may not have. 3. Despite claims in the code, Bison's generated parser was for me slightly slower than yacc's, not that this is a genuine concern. 4. Bison itself runs about 7 times as fast as yacc. This is insignificant on normal grammars, but, on the large (Cobol-85) grammar I am using, it goes from 15 minutes to 2-1/2 - an obvious boon. 5. Bison's generated parser has a copyright notice in it which prevents you from embeddding the result in a proprietary product. 6. Apart from the above issues, Bison plugs straight in. -- Esmond Pitt, Austec International Ltd ...!uunet.UU.NET!munnari!ausmelb!ejp,ejp@ausmelb.oz.au -- Send compilers articles to ima!compilers or, in a pinch, to Levine@YALE.EDU Plausible paths are { ihnp4 | decvax | cbosgd | harvard | yale | bbn}!ima Please send responses to the originator of the message -- I cannot forward mail accidentally sent back to compilers. Meta-mail to ima!compilers-request
ejp@ausmelb.oz.au (Esmond Pitt) (03/25/88)
In article <918@ima.ISC.COM> ejp@ausmelb.oz.au (me) wrote about Bison.
I forgot to mention that in the version I got, bison failed to place the
%union declaration for the yacc stack in y.tab.h, which yacc does.
This is annoying but simple to fix in the source.
--
Esmond Pitt, Austec International Ltd
...!uunet.UU.NET!munnari!ausmelb!ejp,ejp@ausmelb.oz.au
--
Send compilers articles to ima!compilers or, in a pinch, to Levine@YALE.EDU
Plausible paths are { ihnp4 | decvax | cbosgd | harvard | yale | bbn}!ima
Please send responses to the originator of the message -- I cannot forward
mail accidentally sent back to compilers. Meta-mail to ima!compilers-request