-* Using enums instead of int for tokens.
-Paul suggests:
-
- #ifndef YYTOKENTYPE
- # if defined (__STDC__) || defined (__cplusplus)
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- FOO = 256,
- BAR,
- ...
- };
- /* POSIX requires `int' for tokens in interfaces. */
- # define YYTOKENTYPE int
- # endif
- #endif
- #define FOO 256
- #define BAR 257
- ...
-
-> I'm in favor of
->
-> %token FOO 256
-> %token BAR 257
->
-> and Bison moves error into 258.
-
-Yes, I think that's a valid extension too, if the user doesn't define
-the token number for error.
-
-* Output directory
-Akim:
-
-| I consider this to be a bug in bison:
-|
-| /tmp % mkdir src
-| /tmp % cp ~/src/bison/tests/calc.y src
-| /tmp % mkdir build && cd build
-| /tmp/build % bison ../src/calc.y
-| /tmp/build % cd ..
-| /tmp % ls -l build src
-| build:
-| total 0
-|
-| src:
-| total 32
-| -rw-r--r-- 1 akim lrde 27553 oct 2 16:31 calc.tab.c
-| -rw-r--r-- 1 akim lrde 3335 oct 2 16:31 calc.y
-|
-|
-| Would it be safe to change this behavior to something more reasonable?
-| Do you think some people depend upon this?
-
-Jim:
-
-Is it that behavior documented?
-If so, then it's probably not reasonable to change it.
-I've Cc'd the automake list, because some of automake's
-rules use bison through $(YACC) -- though I'll bet they
-all use it in yacc-compatible mode.
-
-Pavel:
-
-Hello, Jim and others!
-
-> Is it that behavior documented?
-> If so, then it's probably not reasonable to change it.
-> I've Cc'd the automake list, because some of automake's
-> rules use bison through $(YACC) -- though I'll bet they
-> all use it in yacc-compatible mode.
-
-Yes, Automake currently used bison in Automake-compatible mode, but it
-would be fair for Automake to switch to the native mode as long as the
-processed files are distributed and "missing" emulates bison.
-
-In any case, the makefiles should specify the output file explicitly
-instead of relying on weird defaults.
-
-> | src:
-> | total 32
-> | -rw-r--r-- 1 akim lrde 27553 oct 2 16:31 calc.tab.c
-> | -rw-r--r-- 1 akim lrde 3335 oct 2 16:31 calc.y
-
-This is not _that_ ugly as it seems - with Automake you want to put
-sources where they belong - to the source directory.
-
-> | This is not _that_ ugly as it seems - with Automake you want to put
-> | sources where they belong - to the source directory.
->
-> The difference source/build you are referring to is based on Automake
-> concepts. They have no sense at all for tools such as bison or gcc
-> etc. They have input and output. I do not want them to try to grasp
-> source/build. I want them to behave uniformly: output *here*.
-
-I realize that.
-
-It's unfortunate that the native mode of Bison behaves in a less uniform
-way than the yacc mode. I agree with your point. Bison maintainters may
-want to fix it along with the documentation.
-
-
-* Unit rules
-Maybe we could expand unit rules, i.e., transform
-
- exp: arith | bool;
- arith: exp '+' exp;
- bool: exp '&' exp;
-
-into
-
- exp: exp '+' exp | exp '&' exp;
-
-when there are no actions. This can significantly speed up some
-grammars.
-
-* Stupid error messages
-An example shows it easily:
-
-src/bison/tests % ./testsuite -k calc,location,error-verbose -l
-GNU Bison 1.49a test suite test groups:
-
- NUM: FILENAME:LINE TEST-GROUP-NAME
- KEYWORDS
-
- 51: calc.at:440 Calculator --locations --yyerror-verbose
- 52: calc.at:442 Calculator --defines --locations --name-prefix=calc --verbose --yacc --yyerror-verbose
- 54: calc.at:445 Calculator --debug --defines --locations --name-prefix=calc --verbose --yacc --yyerror-verbose
-src/bison/tests % ./testsuite 51 -d
-## --------------------------- ##
-## GNU Bison 1.49a test suite. ##
-## --------------------------- ##
- 51: calc.at:440 ok
-## ---------------------------- ##
-## All 1 tests were successful. ##
-## ---------------------------- ##
-src/bison/tests % cd ./testsuite.dir/51
-tests/testsuite.dir/51 % echo "()" | ./calc
-1.2-1.3: parse error, unexpected ')', expecting error or "number" or '-' or '('
-
-* yyerror, yyprint interface
-It should be improved, in particular when using Bison features such as
-locations, and YYPARSE_PARAMS. For the time being, it is recommended
-to #define yyerror and yyprint to steal internal variables...
-
-* read_pipe.c
-This is not portable to DOS for instance. Implement a more portable
-scheme. Sources of inspiration include GNU diff, and Free Recode.
-
-* Memory leaks in the generator
-A round of memory leak clean ups would be most welcome. Dmalloc,
-Checker GCC, Electric Fence, or Valgrind: you chose your tool.
-
-* Memory leaks in the parser
-The same applies to the generated parsers. In particular, this is
-critical for user data: when aborting a parsing, when handling the
-error token etc., we often throw away yylval without giving a chance
-of cleaning it up to the user.