bug-bison
[Top][All Lists]
Advanced

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

Bison-1.28: Doc Typo, Misc Bugs


From: Hans Aberg
Subject: Bison-1.28: Doc Typo, Misc Bugs
Date: Sun, 1 Oct 2000 23:43:06 +0200

I made the Bison-1.28 (together with Flex 2.5.4.1) into a plugin for the
Metrowerks MacOS CW Pro 5 C/C++-compiler. Some comments:

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

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

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

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

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

  Hans Aberg
                  * Email: Hans Aberg <mailto:address@hidden>
                  * Home Page: <http://www.matematik.su.se/~haberg/>
                  * AMS member listing: <http://www.ams.org/cml/>





reply via email to

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