Commit Graph

1682 Commits

Author SHA1 Message Date
Paul Eggert
76ae81983c * data/glr.c (yygetLRActions): Replace `yyindex' with
`yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
This fixes the regression with Sun ONE Studio 7 cc that I reported in
<http://mail.gnu.org/pipermail/bug-bison/2002-November/001892.html>.
2002-11-19 09:33:21 +00:00
Paul Eggert
df38312ab0 (yygetLRActions): Replace `yyindex' with
`yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
This fixes the regression with Sun ONE Studio 7 cc that I reported in
<http://mail.gnu.org/pipermail/bug-bison/2002-November/001892.html>.
2002-11-19 07:35:29 +00:00
Paul Eggert
8d8a7238ee Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
to "SyntaxError" for consistency with my 2002-11-15 change.
2002-11-18 20:08:57 +00:00
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
Paul Eggert
4e8c79eb7f (_AT_DATA_CALC_Y): Make vars static instead of
extern when possible.  Remove unused initializations.
2002-11-18 07:52:13 +00:00
Paul Eggert
ee16363fd2 (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do not define to
{}, since this breaks the common use of `YYDPRINTF ((...));' if a
single statement is desired (e.g. before `else').  Work around GCC
warnings by surrounding corresponding calls with {} if needed.
(yyhasResolvedValue): Remove unused function.
(yymergeOptionSets, yyresolvStack): Use `continue;' for empty
loop body.
(yyreportSyntaxError): Renamed from yyreportParseError.
(yyrecoverSyntaxError): Renamed from yyrecoverParseError.
All uses changed.
2002-11-18 07:51:47 +00:00
Akim Demaille
60a3dcf956 Really remove it. 2002-11-16 12:36:30 +00:00
Akim Demaille
b0937b2259 Augment the similarity between GLR and LALR traces.
* data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
(YY_REDUCE_PRINT): New.
(yyparse): Use them.
* data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
YYDPRINT here.
(yyglrReduce, yyrecoverParseError, yyparse): Don't report the
state reached after the reduction/recovery, since...
(yyparse, yyprocessOneStack): Report the state we are entering in.
2002-11-16 12:32:27 +00:00
Akim Demaille
c5e3e51055 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
Add support for --trace=skeleton.
* src/scan-skel.l: %option debug.
Scan strings of non-@ or n instead of character by character.
(scan_skel): Handle trace_skeleton.
(QPUTS): New.
(@output_parser_name@, @output_header_name@): ``Restore'' their
support (used to be M4 macros).
* data/yacc.c: Quote larger chunks, a la glr.c.
* data/lalr1.cc: Likewise.
The header guards are no longer available, so use some other
string than `YYLSP_NEEDED'.
2002-11-16 12:31:36 +00:00
Akim Demaille
4c6cc1db75 Make the ``Printers and Destructors'' test more verbose, taking
`yacc.c''s behavior as (possibly wrong) reference.
* tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
instead of fprint on stdout.
Set and report the last_line of the symbols.
Consistently display values and locations.
2002-11-16 12:30:23 +00:00
Paul Eggert
6d9e8019e1 * data/yacc.c: Avoid over-quoting of __line__ and __file__. 2002-11-16 08:14:23 +00:00
Paul Eggert
ee41006f01 Avoid over-quoting of __line__ and __file. 2002-11-16 08:13:40 +00:00
Paul Eggert
b25d88f6d2 * tests/actions.at (Actions after errors): New test case. 2002-11-16 07:32:09 +00:00
Paul Eggert
5dac0025f6 (Actions after errors): New test case. 2002-11-16 07:31:35 +00:00
Paul Eggert
f0616f0b5c Regenerate. 2002-11-15 20:58:07 +00:00
Paul Eggert
6e649e659e * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
tests/action.at, tests/calc.at, tests/conflicts.at,
tests/cxx-type.at, tests/regression.at:
"parse error" -> "syntax error" for POSIX compatibility.
"parsing stack overflow..." -> "parser stack overflow" so
that code matches Bison documentation.
2002-11-15 20:32:21 +00:00
Akim Demaille
0f39aab92a * src/parse-gram.y (declaration): Have %parse-param and %lex-param
take two BRACED_CODE, not two string_content.
Free the scanner's obstack when we are done.
(code_content): New.
* tests/calc.at: Adjust.
* doc/bison.texinfo: Adjust.
Also, make sure to include the `,' for these declarations.
2002-11-15 16:42:16 +00:00
Akim Demaille
761c1926a1 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
definition; avoids potential autoreconf problems.
2002-11-15 16:30:37 +00:00
Akim Demaille
0258d1661c 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
* src/.cvsignore: Add src-gram.c.
* tests/.cvsignore: Add atlocal.
* config/.cvsignore, m4/.cvsignore, po/.cvsignore:
Add several files that autoreconf may bring in during
bootstrap.
2002-11-15 09:04:37 +00:00
Akim Demaille
b0f98b1016 Always check the value returned by yyparse.
* tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
returned by yyparse.
(_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
Adjust calls.
* tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
returned by yyparse.
2002-11-15 08:56:40 +00:00
Paul Eggert
edbc04c709 (AT_TEST_CPP_GUARD_H): Compile with -I., as Forte 7 C requires it,
and it shouldn't hurt on other compilers.
2002-11-15 01:57:23 +00:00
Paul Eggert
7ec1b48eb8 * src/output.c (output_skeleton): Call xfopen instead of
duplicating xfopen's body.
2002-11-15 01:29:53 +00:00
Paul Eggert
93ba6bf344 (output_skeleton): Call xfopen instead of duplicating xfopen's body. 2002-11-15 01:28:40 +00:00
Paul Hilfinger
970785f1a0 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
on input.at test.
2002-11-14 23:18:55 +00:00
Paul Eggert
cfff7583d2 Mention the bugs fixed by the latest change. 2002-11-14 23:11:11 +00:00
Paul Eggert
8fcc7db138 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
"$CC -E foo.h" is allowed, as this doesn't work with the Portland
Group compiler.  Instead, use "$CC -E bar.c".  Include the .h
file twice in the grammar, as an extra check.

* tests/input.at (Torturing the Scanner): Surround the
backslash-newline tests with "#if 0", to make it less likely that
we'll run into compiler bugs.  Bring back solitary \ inside
comment, but add a closing comment to work around HP C bug.  Don't
test backslash-newline in C character constant.  This should fix
the input.at bug reported by Nelson H. F. Beebe in
<http://mail.gnu.org/pipermail/bug-bison/2002-November/001893.html>.
2002-11-14 23:08:27 +00:00
Paul Eggert
1d39f854cf (AT_TEST_CPP_GUARD_H): Don't assume that "$CC -E foo.h" is allowed, as
this doesn't work with the Portland Group compiler.  Instead, use "$CC
-E bar.c".  Include the .h file twice in the grammar, as an extra
check.
2002-11-14 23:08:01 +00:00
Paul Eggert
dda7a53e4d (Torturing the Scanner): Surround the backslash-newline tests with
"#if 0", to make it less likely that we'll run into compiler bugs.
Bring back solitary \ inside comment, but add a closing comment to
work around HP C bug.  Don't test backslash-newline in C character
constant.  This should fix the input.at bug reported by Nelson
H. F. Beebe in
<http://mail.gnu.org/pipermail/bug-bison/2002-November/001893.html>.
2002-11-14 22:53:47 +00:00
Akim Demaille
f32b346d84 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
status of the compiler.
Calling `exit 1' is no longer needed.
Reported by Nelson H. F. Beebe.
2002-11-14 11:09:51 +00:00
Akim Demaille
4e8d992c7d * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
status of the compiler.
Reported by Nelson H. F. Beebe.
2002-11-14 11:07:00 +00:00
Akim Demaille
9501dc6e69 * tests/atlocal.in (CPPFLAGS): We have config.h.
* tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
New.
* tests/actions.at, tests/calc.at, tests/conflicts.at,
* tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
* tests/regression.at, tests/torture.at: Use them for all the
grammars that are to be compiled.
* tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
* tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
* doc/bison.texinfo (GLR Parsers): Document `inline'.
2002-11-14 09:58:01 +00:00
Akim Demaille
18b519c0d6 * doc/bison.texinfo: Various formatting changes (alignments in
samples, additional @group/@end group, GCS in samples.
Use @deffn instead of simple @table to define the directives,
macros, variables etc.
2002-11-14 08:32:10 +00:00
Paul Eggert
daa33def28 Fix some bugs reported by Albert Chin-A-Young in
<http://mail.gnu.org/pipermail/bug-bison/2002-November/001881.html>.
2002-11-14 01:24:12 +00:00
Paul Eggert
2b42986e75 (export YYLTYPE): Don't invoke "cc a.c b.c -o c"; the HP-UX 11i C
compiler chatters during compilation.  Instead, invoke "cc -c a.c -o
a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
2002-11-14 00:36:03 +00:00
Paul Eggert
efc6bf1b94 (Torturing the Scanner): Don't invoke "cc a.c b.c
-o c"; the HP-UX 11i C compiler chatters during compilation.
Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
2002-11-14 00:35:27 +00:00
Paul Eggert
149365be01 (Torturing the Scanner): Remove lines containing
solitary backslashes, as they tickle a bug in the HP-UX 11i C
compiler.
2002-11-14 00:26:45 +00:00
Paul Eggert
9a86cdb99b * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
comments, since they're not portable.  Use GNU coding style.
2002-11-14 00:04:57 +00:00
Paul Eggert
c240826c06 (Badly Collapsed GLR States): Avoid //
comments, since they're not portable.  Use GNU coding style.
2002-11-13 23:20:52 +00:00
Akim Demaille
caf52fdfab Bump to 1.75c. 2002-11-13 15:17:35 +00:00
Akim Demaille
9c1e26bd3b * data/yacc.c: Leave bigger chunks of quoted text.
(YYDSYMPRINTF): New.
Use it to report symbol activities.
* data/glr.c (YYDSYMPRINTF): New.
Use it.
2002-11-13 09:49:49 +00:00
Paul Eggert
f7e096fee3 (AC_INIT): Bump version to 1.75c. 2002-11-13 09:06:47 +00:00
Paul Eggert
73dbb6420e Regenerate. 2002-11-13 08:34:23 +00:00
Paul Eggert
87f721cc87 Version 1.75b. 2002-11-13 08:32:08 +00:00
Paul Eggert
ff03259279 (yydoAction): Return YYRESULTTAG, not int.
(yyglrReduce): Return yyok, not 0.
This should avoid the enumerated-type warnings reported
by Nelson H. F. Beebe in
<http://mail.gnu.org/pipermail/bug-bison/2002-November/001872.html>.
2002-11-13 07:46:19 +00:00
Paul Eggert
dbba6a3be7 [! BITSET_INLINE]: Remove.
(bitset_set, bitset_reset, bitset_test): Rename local vars
to avoid shadowing warnings by GCC.
2002-11-13 07:02:51 +00:00
Paul Eggert
e84e65da40 (BITSET_INLINE): Remove. 2002-11-13 07:02:13 +00:00
Paul Eggert
53b7799056 (inline): Remove #define. It's the user's responsibility to #define
it away, just like 'const'.  This fixes one of the bugs reported by
Nelson H.F. Beebe in
<http://mail.gnu.org/pipermail/bug-bison/2002-November/001873.html>.
2002-11-13 06:48:18 +00:00
Paul Eggert
412f8a5975 Revamp regular expressions so that " and '
do not confuse xgettext.
2002-11-13 06:40:35 +00:00
Paul Eggert
322c501d89 Remove src/parse-gram.c, src/scan-gram.c,
src/system.h.  Add src/parsegram.y, src/scan-gram.l.
2002-11-13 06:40:06 +00:00
Paul Eggert
8a1dd2fe05 (po-check): Scan .l and .y files instead
of the .c and the .h files that they generate.  Look for N_
as well as for _.  Try to avoid matching #define for N_ and _.
2002-11-13 06:39:26 +00:00