Re: Design of Bison generated code

"Hans Aberg" <>
31 May 2002 23:02:31 -0400

          From comp.compilers

Related articles
Design of Bison generated code (Siddharth) (2002-05-27)
Re: Design of Bison generated code (Hans Aberg) (2002-05-31)
| List of all articles for this month |

From: "Hans Aberg" <>
Newsgroups: comp.compilers
Date: 31 May 2002 23:02:31 -0400
Organization: Mathematics
References: 02-05-145
Keywords: yacc
Posted-Date: 31 May 2002 23:02:31 EDT

"Siddharth" <> wrote:
>I want to change the code generated by Bison. Are there any documents
>( other than the Bison manual ) which give the detailed design of the
>code generated by Bison.

I suggest you contact one of the groups

The later versions of Bison has undergone a series of changes in order
to facilitate altered output (like in other languages, like C++). I
think that current Bison beta calls the macro program M4 when called
for, which should simplify more radical changes in output.

If you want to merely alter the skeleton file for your private
program, write to Help-bison. If you want to do something bigger, like
implementing a new parsing algorithm, write to Bug-Bison.

>[Bison is derived from Bob Corbett's Berkeley Yacc, which he wrote as
>part of his thesis project. His thesis is available online. -John]

The original idea of Corbett was to implement semantic dependant error
recovery, but his conclusion, and that of others at Berkeley, was that
essentially, it was not worth the effort. He therefore removed that
"semantic parser" part a decade ago from the Berkeley version. In
Bison, the "semantic parser" part has since long been broken, and now
finally been removed altogether (or so the current maintainer Akim
Demaille says).

Therefore, I suspect Corbett's thesis will not give much hints on what
is in current Bison, but it is better to rely on inputs from the
current maintainers and users.

    Hans Aberg * Anti-spam: remove "remove." from email address.
                                    * Email: Hans Aberg <>
                                    * Home Page: <>
                                    * AMS member listing: <>

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.