bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bison-1.28: Doc Typo, Misc Bugs


From: Akim Demaille
Subject: Re: Bison-1.28: Doc Typo, Misc Bugs
Date: 02 Oct 2000 11:24:26 +0200
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)

>>>>> "Hans" == Hans Aberg <address@hidden> writes:

Hans> -- Bison-1.28 Doc, Sec 9.1 at prefix -b: Says: The names are
Hans> chosen as if the input file were named `prefix.c'.  Should be:
Hans> The names are chosen as if the input file was named `prefix.y'.

Thanks.

Hans> -- Also, the docs seem to not mention the semantic parser
Hans> (Bison.hairy) feature.

I consider it dead.  Nobody seems to be willing to explain it, and the
code is... hairy :)

Hans> -- Under MacOS, Metrowerks CW Pro 5, I had to put the following
Hans> into the skeleton file bison.simple: #if __MWERKS__ && macintosh
Hans> #define YYSTACK_USE_ALLOCA #include <alloca.h> #include
Hans> <stdlib.h> #endif as under Standard C, free() is the header
Hans> <stdlib.h>.

We will probably include this.  But this self configuring soup makes
me mad.

Hans> -- I think that the skeleton file bison.simple could have some
Hans> prototypes like int yyerror(char* errstr); int yylex(); typedef
Hans> struct yyltype yyltype; so that one can put the definition of
Hans> those functions at the final segment of the .y file without
Hans> having to put the prototypes in the first segment.

Nope, there are portability issues (KnR vs ISO for instance), and in
addition nothing forbids your yylex to be static etc.

Hans> -- As a plugin, I had trouble with Bison's style of exit()'ing
Hans> as a replacement of a "return", as then the whole CW IDE
Hans> maintaining the plugin is picked down. Therefore I had to
Hans> implement a longjump construction, which diverts to a regular
Hans> "return".

I don't understand what you mean.  You mean a pluggin shall never
exit?  Well, we are not interested in MacOS, and we will not clutter
the sources to address such limitations.

But you can certainly solve this using some `main' and `exit' of your
own.  Just add `#define main my_main' in config.h (likewise with
exit), and voila, you can have you own main which implement the
longjump stuff.

        Akim



reply via email to

[Prev in Thread] Current Thread [Next in Thread]