Re: prefix for yacc/bison

From: Erik de Castro Lopo (nospam_at_mega-nerd.com)
Date: 07/12/05


Date: Tue, 12 Jul 2005 12:57:19 +1000


"Peter T. Breuer" wrote:
>
> That's because it's (a) silly,

Its not silly. Its the most obvious and best way to include
two grammars in one program.

>(b) meaningless. Yacc and bison are
> work-alikes.

Actually no. The grammars that yacc accepts are a subset
of what bison accepts.

> Write code that both can parse. Don't write code that only
> one or the other can grok.

Nice idea in theory, not in practice. For instance Bison
now has a GLR parser as well as an LALR(1) parser. Yacc
only has the later.

To the original poster, the best advice you are going to get
is to just dump yacc and only support bison.

Erik

PS : comp.os.linux.development.apps might have been a more
     appropriate place than this. Also comp.unix.programmer.

-- 
+-----------------------------------------------------------+
  Erik de Castro Lopo  nospam@mega-nerd.com (Yes it's valid)
+-----------------------------------------------------------+
`If you want a vision of the future, it is a wireless broadband
 network feeding requests for foreign money-laundering assistance
 into a human temporal lobe, forever. With banner ads.'
 -- John M. Ford


Relevant Pages

  • Re: prefix for yacc/bison
    ... Christian Christmann wrote: ... > yacc). ... > Is there a way to change the prefix which work for both yacc and bison? ... Erik de Castro Lopo nospam@mega-nerd.com ...
    (comp.os.linux.development.apps)
  • Re: Csup cvsmode build discussion
    ... lex and yacc files that I would like to discuss. ... I implemented the RCS parser required to operate on RCS files ... I've been compiling the parser and tokenizer with the help of bison ... Now, the base system already have flex, but the flex version in base is heavily ...
    (freebsd-hackers)
  • Re: prefix for yacc/bison
    ... The grammars that yacc accepts are a subset ... the parser mechanisms to their hearts content. ... means a bounded lookahead bottom-up machine. ...
    (alt.os.linux)
  • Csup cvsmode build discussion
    ... lex and yacc files that I would like to discuss. ... I implemented the RCS parser required to operate on RCS files ... I've been compiling the parser and tokenizer with the help of bison ... Now, the base system already have flex, but the flex version in base is heavily ...
    (freebsd-hackers)
  • Re: LR(k) parser generator for k>1?
    ... I agree with your opinion on the segmentation issue of the parser ... generators. ... interface with Yacc and Bison, ...
    (comp.compilers)