Commit Graph

188 Commits

Author SHA1 Message Date
Akim Demaille
828c373b6d Bind examples/calc++ to the package.
* examples/calc++/Makefile: Remove, replaced by...
* examples/calc++/Makefile.am: ... this new file.
* examples/calc++/test: Remove input.
* examples/calc++/compile: Remove.
* examples/Makefile.am: New.
* configure.ac, Makefile.am: Adjust.
* doc/Makefile.am (clean-local): New, for more recent texi2dvis.
2005-07-06 07:49:25 +00:00
Akim Demaille
1c59e0a121 Extract calc++ from the documentation.
* doc/bison.texinfo (Calc++): Add the extraction marks.
* examples/extexi: New, from the aborted GNU Programming 2E.
Separate the different paragraph of a file with empty lines.
* examples/Makefile: Use it to extract the whole calc++ example.
2005-07-05 07:21:30 +00:00
Akim Demaille
8a0adb0183 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
class typedefs.
2005-06-24 14:56:11 +00:00
Akim Demaille
12545799f9 * doc/bison.texinfo (C++ Language Interface): First stab.
(C++ Parsers): Remove.
2005-06-22 16:49:19 +00:00
Paul Eggert
0fb669f9d6 Update FSF postal mail address. 2005-05-14 06:49:48 +00:00
Paul Eggert
1ce590705a * NEWS: Bison-generated C parsers now use the _ macro to
translate strings.
* data/yacc.c (_) [!defined _]: New macro.
All English strings wrapped inside this macro.
* doc/bison.texinfo (Bison Parser): Document _.
* po/POTFILES.in: Include src/parse-gram.c, since it now
includes translateable strings that parse-gram.y doesn't.
2005-04-14 00:08:56 +00:00
Paul Eggert
3a4f411faa (Semantic Tokens): Fix scoping problem in
example, reported by Derek M Jones.  Also, make the example even
more outrageous, to better illustrate how bad the problem is.
2005-03-01 00:41:33 +00:00
Paul Eggert
a730d142be (Mfcalc Symtab): Correct the prototype for putsym. 2005-02-24 17:23:57 +00:00
Paul Eggert
e4f85c39b2 (Language and Grammar): some -> same
(Epilogue): int he -> in the
2005-02-23 09:15:09 +00:00
Paul Eggert
e62f1a8991 Change @dircategory from "GNU programming tools" to "Software development". 2005-01-24 23:26:17 +00:00
Paul Eggert
592fde9564 Update FDL license revision to 1.2. 2004-12-26 07:25:05 +00:00
Paul Eggert
d7e14fc000 * NEWS: Bison-generated parsers no longer default to using the
alloca function (when available) to extend the parser stack, due
to widespread problems in unchecked stack-overflow detection.
* data/glr.c (YYMAXDEPTH): Remove undef when zero.  It's the user's
responsibility to set it to a positive value.  This lets the user
specify a value that is not a preprocessor constant.
* data/yacc.c (YYMAXDEPTH): Likewise.
(YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
* doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
to be a compile-time constant.  However, explain the constraints on it.
Also, explain the constraints on YYINITDEPTH.
(Table of Symbols): Explain that alloca is no longer the default.
Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
to 1.
2004-12-22 21:19:47 +00:00
Paul Eggert
f28ac696ee (Location Default Action): Mention that n must be zero when k is zero. 2004-12-22 18:26:37 +00:00
Paul Eggert
766de5eb7c (Location Default Action): Don't claim that
we have an array of locations.  Use the same macro for both glr
and lalr parsers.  Mention YYRHSLOC.  Mention what happens when
the index is 0.
2004-12-12 09:24:56 +00:00
Paul Eggert
14d4662b83 (Language and Grammar): In example, "int" is a keyword, not an identifier. 2004-10-22 18:10:59 +00:00
Akim Demaille
dd8d90221a * doc/bison.texinfo (Table of Symbols): Sort. 2004-09-24 11:55:40 +00:00
Akim Demaille
451364edb1 Let the initial-action act on the look-ahead, and use it for the
"initial push" (corresponding to an hypothetical beginning-of-file).
And let lalr1.cc honor %initial-action.
* doc/bison.texinfo (Initial Action Decl): Clarify, and add an
example.
* data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
(Parser::Parser): Remove the ctor that used to initialize it.
(Parser::parse): Like in the other skeletons, issue the "starting
parse" message before any action.
Honor %initial-action.
Initialize the stacks with the lookahead.
* data/yacc.c: Let $$ and @$ in %initial-action designate the
look-ahead.
Push them in the stacks.
* tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
2004-09-20 15:25:25 +00:00
Akim Demaille
18d192f0ea * doc/bison.texinfo (Initial Action Decl): New. 2004-09-20 14:29:31 +00:00
Akim Demaille
e757bb10bc * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
invoked, yydestruct the lookahead.
* tests/calc.at (Calculator $1): Update the expected lengths of
traces: there is an added line for the discarded lookahead.
* doc/bison.texinfo (Destructor Decl): Some rewording.
Define "discarded" symbols.
2004-09-06 07:48:20 +00:00
Akim Demaille
2fa09258b1 * doc/bison.texinfo (Implementing Loops): Rename as...
(Implementing Gotos/Loops): this.
2004-08-26 13:05:41 +00:00
Paul Eggert
fa7e68c397 Reorganize GLR section a bit. 2004-06-22 06:50:29 +00:00
Paul Eggert
0817d1eccb One more "lookahead" -> "look-ahead" change. 2004-06-21 21:01:42 +00:00
Paul Eggert
99a9344e77 New section "Simple GLR Parsers". 2004-06-21 20:55:20 +00:00
Paul Eggert
8dd162d3ff Use "look-ahead" instead of "lookahead", consistently. 2004-06-21 20:20:31 +00:00
Paul Eggert
5c9be03d6d Also mention that %union can depend on prerequisite types. 2004-05-26 17:45:45 +00:00
Paul Eggert
4bfd5e4e53 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's put into
the -d output file.
2004-05-25 19:09:01 +00:00
Paul Eggert
779e7ceb93 Use 'short int' rather than 'short', and similarly for 'long', 'unsigned', etc. 2004-03-31 00:37:21 +00:00
Paul Hilfinger
d63282419d * src/parse-gram.y: Define PERCENT_EXPECT_RR.
(declaration): Replace expected_conflicts with expected_sr_conflicts.
Add %expect-rr rule.

* src/scan-gram.l: Recognize %expect-rr.

* src/conflicts.h (expected_sr_conflicts): Rename from
expected_conflicts.
(expected_rr_conflicts): Declare.

* src/conflicts.c (expected_sr_conflicts): Rename from
expected_conflicts.
(expected_rr_conflicts): Define.
(conflicts_print): Check r/r conflicts against expected_rr_conflicts
for GLR parsers.
Use expected_sr_conflicts in place of expected_conflicts.
Warn if expected_rr_conflicts used in non-GLR parser.

* doc/bison.texinfo: Add documentation for %expect-rr.
2004-03-26 22:41:16 +00:00
Paul Eggert
1452af69b4 Add support for hex token numbers. 2004-03-08 20:49:34 +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
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
22fccf958f Use "%no-default-prec" instead of "%default-prec 0". 2003-10-01 21:33:24 +00:00
Paul Eggert
39a06c251a Add %default-prec. 2003-09-30 20:11:29 +00:00
Akim Demaille
4e03e2015c * doc/bison.texinfo: Don't promote stdout for error messages. 2003-08-25 10:35:38 +00:00
Paul Eggert
0ae99356d5 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
and return properly parenthesized result.
* data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
* data/yacc.c (YYLLOC_DEFAULT): Likewise.
Remove unnecessary parentheses from uses.
* doc/bison.texinfo (Location Default Action): Describe the
conventions for parentheses.
2003-06-20 22:52:12 +00:00
Paul Eggert
e64fec0a0f (How Can I Reset the Parser): Renamed from `How Can I Reset
@code{yyparse}', since texinfo does not allow arbitrary @ in node
names.
2003-06-17 05:15:49 +00:00
Paul Eggert
0e14ad772f (How Can I Reset @code{yyparse}): Reword the
English a bit.  Fix fclose typo.  Change "const char" to "char
const", and use ANSI C rather than K&R for "main".  Suggest
YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
and suggest yy_switch_to_buffer.
2003-05-12 19:34:21 +00:00
Paul Eggert
a1c84f4523 Omit spaces around "---". 2003-04-29 18:53:33 +00:00
Akim Demaille
a06ea4aa98 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New. 2003-04-29 09:57:34 +00:00
Akim Demaille
b8be913233 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file. 2003-03-31 09:46:21 +00:00
Akim Demaille
c7e441b49c * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
From Paul Hilfinger.
2003-03-31 07:10:44 +00:00
Akim Demaille
5b06606339 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New. 2003-03-29 13:29:41 +00:00
Akim Demaille
fef4cb511e * .cvsignore: Add configure.lineno.
* src/.cvsignore: Add yacc.
* tests/.cvsignore: Add testsuite.log.
* doc/fdl.texi: Sync with latest FSF version.
2003-03-29 11:26:46 +00:00
Paul Eggert
ab8fe29d0c Sync with latest FSF version. 2003-03-13 19:34:42 +00:00
Akim Demaille
052826fdd1 * doc/bison.texinfo (Table of Symbols): Reactivate the
documentation for %lex-param, and %parse-param.
2003-03-02 15:11:43 +00:00
Akim Demaille
95923bd6a6 * doc/bison.texinfo: Use "location" consistently to refer to @n,
to avoid confusions with lalr1.cc's notion of Position.
Suggested by Paul Eggert.
2003-02-21 08:07:57 +00:00