Commit Graph

55 Commits

Author SHA1 Message Date
Akim Demaille
d3c4e709ff * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
space.
From Tim Van Holder.
2002-11-18 09:33:22 +00:00
Akim Demaille
3d9a71d28a Typo. 2002-11-06 15:35:03 +00:00
Akim Demaille
437c2d8000 Restore --no-lines.
Reported by Jim Kent.
* data/c.m4 (b4_syncline): New.
* data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
* src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
* src/output.c (user_actions_output): Likewise.
(prepare): Define 'b4_synclines_flag'.
2002-11-06 14:11:47 +00:00
Akim Demaille
f1886bb280 * data/yacc.c (m4_int_type): New.
* data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
char' as only yacc.c wants K&R portability.
* data/glr.c (yysigned_char): Remove.
* data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
Reported by Quoc Peyrot.
2002-10-24 10:01:52 +00:00
Akim Demaille
27b0ffea3e * src/system.h: Include sys/types.
Reported by Bert Deknuydt.
2002-10-23 16:30:50 +00:00
Akim Demaille
05846dae07 * src/tables.c (table_ninf_remap): base -> tab.
Reported by Matt Rosing.
2002-10-14 11:38:21 +00:00
Akim Demaille
f50adbbdb0 GLR parsers sometimes raise parse errors instead of performing the
default reduction.
Reported by Charles-Henry de Boysson.
* tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
check the length of the	traces when %glr.
(_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
GLR's traces.
(AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
Test GLR parsers.
* data/glr.c (YYLEFTMOST_STATE): Fix its value.
(yyltype): Remove the yy prefix from the member names.
(yytable): Complete its comment.
(yygetLRActions): Map error action number from YYTABLE from
YYTABLE_NINF to 0.
(yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
(which was a bug: it should have been YYTABEL_NINF, and yet it was
not satisfying as we could compare an YYACTION computed from
YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
only value for error actions.
(yyreportParseError): In verbose parse error messages, don't issue
`error' in the list of expected tokens.
* data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
next action to perform to match glr.c's decoding.
(yytable): Complete its comment.
2002-10-13 14:25:14 +00:00
Akim Demaille
eb71459201 * tests/regression.at Characters Escapes): New.
* src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept ' in strings and
characters.
Reported by Jan Nieuwenhuizen.
2002-10-11 11:23:19 +00:00
Akim Demaille
927f781708 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
invocations.
* tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
defined.
2002-09-30 12:27:31 +00:00
Akim Demaille
d862b1be60 * m4/prereq.m4: Update, from Fileutils 4.1.5.
* configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
Reported by Martin Mokrejs.
2002-09-12 16:11:55 +00:00
Akim Demaille
c0ad8bf3c2 * data/yacc.c: Guard the declaration of yytoknum also with
`#ifdef YYPRINT', so it is declared only when used.
2002-09-04 12:03:01 +00:00
Paul Eggert
93a1e33a1d Add Paul Hilfinger. 2002-08-12 15:03:15 +00:00
Akim Demaille
865b9df14c * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
(AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
Reported by R Blake <blakers@mac.com>.
2002-07-09 10:06:20 +00:00
Akim Demaille
9be0c25bf0 * src/getargs.c (report_argmatch): Initialize strtok(). 2002-06-25 12:05:38 +00:00
Akim Demaille
c732d2c6dc * doc/bison.texinfo: Document ability to have multiple
prologue sections.
2002-06-19 07:46:11 +00:00
Akim Demaille
0bfb02fff7 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
there are no `label `yyoverflowlab' defined but not used' warnings
when yyoverflow is defined.
2002-06-18 10:00:36 +00:00
Akim Demaille
5719c1092f and Akim Demaille <akim@epita.fr>
* data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
what's left on the stack when the error recovery hits EOF.
* tests/actions.at (Destructors): Complete to exercise this case.
2002-06-18 09:12:58 +00:00
Akim Demaille
8a9566d401 * src/skeleton.h: Fix the #endif.
Reported by Magnus Fromreide.
2002-05-01 10:28:05 +00:00
Akim Demaille
3ded9a63e3 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
as Lex/Flex'.
(Debugging): More details about enabling the debugging features.
(Table of Symbols): Describe $$, $n, @$, and @n.
Suggested by Tim Josling.
2002-04-19 14:04:31 +00:00
Robert Anisko
bcae0fce72 THANKS 2002-03-06 16:08:18 +00:00
Akim Demaille
345cea780a * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
* lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
Update.
From Michael Hayes.
2002-03-04 14:15:01 +00:00
Akim Demaille
550245801e * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
before returning.
Reported by Benoit Perrot.
2002-03-04 12:06:07 +00:00
Akim Demaille
dc2546ac9f Sync. 2002-02-25 17:56:15 +00:00
Akim Demaille
4bda3f10ca * src/output.c (output_rule_data): Don't output NULL, it might
not be defined yet.
2002-02-13 18:35:03 +00:00
Akim Demaille
616429b508 Fix the previous test. 2002-02-07 17:22:50 +00:00
Akim Demaille
29ae55f112 Bison dumps core when trying to complain about broken input files.
Reported by Cris van Pelt.
* src/lex.c (parse_percent_token): Be sure to set token_buffer.
* tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
into...
(Invalid inputs): Strengthen: exercise parse_percent_token.
2002-01-24 17:09:34 +00:00
Akim Demaille
bec30531f7 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition. 2002-01-21 15:50:39 +00:00
Marc Autret
5e5d541531 * tests/output.at: New test.
* src/files.c (compute_base_names): Don't map extensions when
the YACC flag is set, use defaults.
Reported by Evgeny Stambulchik.
2002-01-20 15:46:19 +00:00
Akim Demaille
d9e9746c06 More thanks. 2002-01-11 13:37:39 +00:00
Akim Demaille
1fa140687e * src/output.c (output_table_data): Change the prototype to use
`int' for array ranges: some invocations do pass an int, not a
short.
Reported by Wayne Green.
2001-12-22 15:16:41 +00:00
Akim Demaille
776209d6c7 Reductions in web2c.y are improperly reported.
Reported by Mike Castle.
* src/conflicts.c (print_reductions): Fix.
* tests/regression.at (Web2c): New.
2001-12-22 14:42:36 +00:00
Akim Demaille
dee049eb91 Typo. 2001-12-18 09:59:24 +00:00
Akim Demaille
275fc3ad0f Some host fail on `assert (!"foo")', which expands to
((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
Reported by Nelson Beebee.
* src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
`#define it_succeeded 0' and `assert (it_succeeded)'.
2001-12-18 09:33:44 +00:00
Akim Demaille
51576fb3c6 * src/reader.c (copy_action): When --yacc, don't append a `;'
to the user action: let it fail if lacking.
Suggested by Aharon Robbins and Tom Tromey.
2001-12-15 11:09:05 +00:00
Akim Demaille
07708e1946 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
its argument.
Reported by Peter Hmorsk.
2001-12-05 10:59:35 +00:00
Akim Demaille
cb4956ee99 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
* src/reduce.c (reduce_grammar_tables): Do not free useless tags,
as all tags are free'ed afterwards.
From Enrico Scholz.
2001-11-28 11:43:24 +00:00
Marc Autret
a220f55509 Revert doc patch. 2001-11-26 19:13:40 +00:00
Marc Autret
b83f0407c6 * doc/bison.texinfo (Mystery Conflicts): Hint '-v' use.
From Golubev I. N.
2001-11-25 13:02:55 +00:00
Akim Demaille
d803322e27 * tests/calc.at, tests/output.at, tests/regression.at,
* tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
now the tests are run in private dirs, therefore AC_CLEANUP and
family can be simplified to 0-ary.
* tests/atlocal.in: Now that we run `elsewhere' than in tests/,
use abs. path to find config.h.
* tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
stderr, there can be way too much random noise.
Instead pass -Werror to GCC and rely on the exit status.
Reported by Wolfram Wagner.
2001-11-14 15:20:47 +00:00
Akim Demaille
0df87bb609 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
the result instead of using...
(src_total, rrc_total, src_count, rrc_count): Remove.
(any_conflicts): Remove.
(print_conflicts): Split into...
(conflicts_print, conflicts_output): New.
* src/conflicts.h: Adjust.
* src/main.c (main): Invoke both conflicts_output and conflicts_print.
* src/print.c (print_grammar): Issue `n' between to rule outputs.
* tests/regression.at (Conflicts): New.
Reported by Tom Lane.
2001-11-12 09:31:40 +00:00
Akim Demaille
e9e4c32114 * src/bison.simple (YYSTACK_REALLOC): New.
(yyparse) [!yyoverflow]: Use it and free the old stack.
Reported by FIXME: Who.
2001-11-12 09:24:50 +00:00
Akim Demaille
037ca2f14c * src/reader.c (parse_thong_decl): Formatting changes.
(token_translations_init): New, extracted from...
(packsymbols): Here.
Adjust.
2001-11-02 14:04:54 +00:00
Akim Demaille
561f9a30af * tests/regression.at (Invalid input: 2): New.
* src/lex.c (unlexed_token_buffer): New.
(lex, unlex): Adjust: when unlexing, be sure to save token_buffer
too.
Reported by Wwp.
2001-11-01 18:05:22 +00:00
Akim Demaille
631aa1d3dc * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA. 2001-10-10 14:58:26 +00:00
Akim Demaille
342b8b6e21 Merge in branch-1_29. 2001-10-04 14:55:21 +00:00
Marc Autret
08a161353c Update. 2001-08-08 23:16:44 +00:00
Marc Autret
fdc6758b79 doc/bison.texinfo: Change @samp{$<@dots{}>} to @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule. 2001-08-08 21:55:36 +00:00
Akim Demaille
8303fc422a * tests/atconfig.in (CPPFLAGS): Add.
* tests/calc.at (AT_CHECK): Use CPPFLAGS.
2001-08-04 14:00:09 +00:00
Akim Demaille
53b74c0c4c * lib/strspn.c: New. 2001-08-03 08:09:03 +00:00
Akim Demaille
847bf1f538 * doc/autoconf.texi: Document @$.
(Locations): New section.
2001-08-01 17:49:14 +00:00