Commit Graph

2194 Commits

Author SHA1 Message Date
Paul Eggert
1452af69b4 Add support for hex token numbers. 2004-03-08 20:49:34 +00:00
Paul Eggert
006d217ddd (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from compilers. 2004-02-25 21:13:00 +00:00
Paul Eggert
6a60c4cf45 Add a marker for when 1.875c was published. 2004-02-25 20:23:33 +00:00
Alexandre Duret-Lutz
c2729758f2 Support %destructor and merge error locations in lalr1.cc.
* data/lalr1.cc (b4_cxx_destruct_def): New macro.
(Parser::stos_): Define unconditionally.
(Parser::destruct_): New method.  Generate its body with
b4_yydestruct_generate.
(Parser::error_start_): New attribute.
(Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
token which are discarded.
(Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
error_start_ when erroneous token are discarded.
(Parser::parse) <yyerrlab1>: Compute the location of the error
token so that it covers all the discarded tokens.
* tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
it can be called with `%skeleton "lalr1.cc"', and do that.
2004-02-09 21:31:42 +00:00
Paul Eggert
0b31edd3e1 Regenerate. 2004-02-02 22:52:54 +00:00
Paul Eggert
dd0e0635ec Replace INCLUDES with AM_CPPFLAGS, fixing a bug in src/Makefile.am
reported by Paul Hilfinger.
2004-02-02 22:36:49 +00:00
Paul Eggert
d0d5aa6425 (yytokenName): Bullet-proof against YYEMPTY token.
(yyreportSyntaxError): Handle case where lookahead token is
YYEMPTY.
2004-02-02 22:35:53 +00:00
Paul Hilfinger
be16239bf7 data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
resulting parsers are compilable with C++.
2004-01-14 01:40:12 +00:00
Paul Eggert
5fa908329c Log today's changes. 2003-12-24 08:33:39 +00:00
Paul Eggert
0ced3098fd Add Makevars.template, stamp-po.
Remove stamp-cat-id.
2003-12-24 08:32:43 +00:00
Paul Eggert
dc8a217381 ($(TESTSUITE)): Remove warning about ignoring
multiple inclusion warnings.
2003-12-24 08:30:45 +00:00
Paul Eggert
ce05140d9d Require Autoconf 2.59, and don't include local.at twice since
Autoconf 2.59 yells about it for some reason.
2003-12-24 08:26:02 +00:00
Paul Eggert
3dc4c5faa9 (Torturing the Scanner): Don't use \x0 or \0 in
Bison tokens, as this runs afoul of the 2003-10-07 change that
disallowed NUL bytes in character constants or string literals.
2003-12-24 08:17:05 +00:00
Paul Eggert
eecf08fe94 (output_skeleton): Rename local var. 2003-12-24 07:55:25 +00:00
Paul Eggert
28f57d2ae3 Sync with Automake 1.8. 2003-12-24 07:52:17 +00:00
Akim Demaille
b165c324a3 * doc/bison.texinfo (How Can I Reset the Parser): More about start
conditions.
From Bruno Haible.
2003-12-02 17:08:31 +00:00
Alexandre Duret-Lutz
26e06a2157 * doc/bison.texinfo (Bison Options): Escape @' in $@'. 2003-11-18 19:14:05 +00:00
Paul Eggert
eda429346a a -> an (minor typo fix) 2003-10-21 17:42:48 +00:00
Paul Eggert
6a5ecb38fc Don't run 'testsuite --clean' if testsuite doesn't exist. 2003-10-07 23:34:20 +00:00
Paul Eggert
92ac370570 Do not allow NUL bytes in string literals or character constants. 2003-10-07 07:32:57 +00:00
Paul Eggert
91d2c560a8 Don't document %no-default-prec for now. 2003-10-05 07:34:36 +00:00
Paul Eggert
0cc3da3a4e In GLR grammars, $N and @N now yield non-modifiable lvalues. 2003-10-05 06:46:53 +00:00
Paul Eggert
66ef8b9d65 Regenerate. 2003-10-01 22:00:13 +00:00
Paul Eggert
22fccf958f Use "%no-default-prec" instead of "%default-prec 0". 2003-10-01 21:33:24 +00:00
Akim Demaille
fc8f296538 VCG no longer supports long_straight_phase.
* src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
* src/print_graph.c (print_graph): Adjust.
2003-10-01 07:46:41 +00:00
Akim Demaille
92f5e991da Update. 2003-10-01 07:46:02 +00:00
Paul Eggert
42db4e2b74 Describe %default-prec. 2003-09-30 20:20:25 +00:00
Paul Eggert
39a06c251a Add %default-prec. 2003-09-30 20:11:29 +00:00
Paul Eggert
7f41b88821 Include local.at, not input.at, fixing a typo in the 2003-08-25 patch. 2003-09-30 16:45:13 +00:00
Akim Demaille
62b6aef925 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
GCC warnings.
2003-08-27 07:00:10 +00:00
Akim Demaille
89e1cc61b7 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
"<#" to avoid magic from Gnus when posting parts of this script.
2003-08-26 07:13:52 +00:00
Akim Demaille
a08460b08c * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
(Parser::parse): here.
Adjust: nerrs and errstatus is now replaced by...
(Parser::nerrs_, Parser::errstatus_): New.
2003-08-26 05:21:41 +00:00
Akim Demaille
603f1cfdc5 * config/announce-gen, Makefile.cfg: New.
* Makefile.am: Adjust.
* GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
keeping local WGET and WGETFLAGS modifications from Paul Eggert.
2003-08-25 18:47:36 +00:00
Akim Demaille
cd3684cfa8 When reducing initial empty rules, Bison parser read an initial
location that is not defined.  This results in garbage, and that
affects Bison's own parser.  Therefore we need (i) to extend Bison
to support a means to initialize this location, and (ii) to use
this CVS Bison to fix CVS Bison's parser.
* src/reader.h, reader.c (epilogue_augment): Remove, replace
with...
* src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
* src/parse-gram.y: Adjust.
(%initial-action): New.
(%error-verbose): Since we require CVS Bison, there is no reason
not to use it.
* src/scan-gram.l: Adjust.
* src/Makefile.am (YACC): New, to make sure we use our own parser.
* data/yacc.c (yyparse): Use b4_initial_action.
2003-08-25 15:16:25 +00:00
Akim Demaille
388f8b197d Update. 2003-08-25 15:15:32 +00:00
Akim Demaille
4e03e2015c * doc/bison.texinfo: Don't promote stdout for error messages. 2003-08-25 10:35:38 +00:00
Akim Demaille
8c182d0592 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
From Alexandre Duret-Lutz.
2003-08-25 09:54:57 +00:00
Akim Demaille
25f66e1a6a * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
Use them.
2003-08-25 08:39:34 +00:00
Akim Demaille
5348bfbe29 * data/lalr1.cc (Parser::reduce_print_): New.
Use it.
2003-08-25 08:29:27 +00:00
Akim Demaille
473013144d Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
error recovery loops.  This patch is based on
<http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
Also, augment the similarity between lalr1.cc and yacc.c.
Note: the locations of error recovery rules are not correct yet.
* data/lalr1.cc: Comment changes to augment the similarity between
lalr1.cc and yacc.c.
(YYERROR): Goto to yyerrorlab, not yyerrlab1.
(yyerrlab1): Remove, but where it used to be (now the bottom part of
yyerrlab), when hitting EOF, pop the whole stack here instead of
merely falling thru the default error handling mechanism.
(yyerrorlab): New label, with the old contents of YYERROR,
plus the following change: pop the stack of rhs corresponding
to the production that invoked YYERROR.  That is how Yacc
behaves (required by POSIX).
* tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
fail.
2003-08-25 08:06:17 +00:00
Akim Demaille
1f7a61ff99 Tune local.at so that people can "autom4te -l autotest calc.at -o
calc" for instance, to extract a sub test suite.
* tests/testsuite.at: Move the initialization, Autotest version
requirement, and AT_TESTED invocation into...
* tests/local.at: here.
* tests/testsuite.at: Include it for compatibility with Autoconf
2.57.
* tests/Makefile.am ($(TESTSUITE)): Report that the warning should
be ignore.
2003-08-25 07:15:49 +00:00
Akim Demaille
750a5211c0 Update. 2003-08-25 07:15:07 +00:00
Paul Eggert
327b5b5675 Rework glr.c slightly to avoid gcc -Wtraditional warnings. 2003-08-04 19:09:58 +00:00
Paul Eggert
7b98f503de (yyuserMerge): Return void, not YYSTYPE.
The returned value is now stored in *YY0.  All callers changed.
2003-08-04 19:09:15 +00:00
Paul Eggert
16caa4f431 (merge_output): Adjust to the change to ../data/glr.c. 2003-08-04 19:08:38 +00:00
Paul Eggert
0051e3edb0 * data/glr.c (YYASSERT): New macro. 2003-07-26 14:14:15 +00:00
Paul Eggert
64c4fd521a (YYASSERT): New macro.
(yyfillin, yydoAction, yyglrReduce, yysplitStack,
yyresolveStates, yyprocessOneStack):
Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
2003-07-26 14:12:28 +00:00
Paul Eggert
5b620e069d * data/glr.c (yyglrReduce): Don't use C89 string concatenation. 2003-07-25 07:42:57 +00:00
Paul Eggert
dfc8a22010 (yyglrReduce): Don't use C89 string concatenation. 2003-07-25 07:42:25 +00:00
Paul Eggert
137437c6db Let the user specify how to allocate and free memory. 2003-07-25 07:12:11 +00:00