Commit Graph

64 Commits

Author SHA1 Message Date
Paul Hilfinger
676385e29c Initial check-in introducing experimental GLR parsing. See entry in
ChangeLog dated 2002-06-27 from Paul Hilfinger for details.
2002-06-28 02:26:44 +00:00
Akim Demaille
60491a948b * data/bison.simple, data/bison.c++: Rename as...
* data/yacc.c, data/lalr1.cc: these.
* doc/bison.texinfo (Environment Variables): Remove.
2002-06-27 12:08:20 +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
ec3bc3961d * doc/bison.texinfo (Debugging): Split into...
(Tracing): this new section, its former contents, and...
(Understanding): this new section.
* src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
by...
(report_flag): this.
Adjust all dependencies.
(report_args, report_types, report_argmatch): New.
(usage, getargs): Report/support -r, --report.
* src/options.h
(struct option_table_struct): Rename as..,
(struct option_table_s): this.
Rename the `set_flag' member to `flag' to match with getopt_long's
struct.
* src/options.c (option_table): Split verbose into an entry for
%verbose, and another for --verbose.
Support --report/-r, so remove -r from the obsolete --raw.
* src/print.c: Attach full item sets and lookaheads reports to
report_flag instead of trace_flag.
* lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
2002-05-25 16:12:40 +00:00
Akim Demaille
b2d52318fa * data/bison.simple (yyparse): Do not implement @$ = @1.
(YYLLOC_DEFAULT): Adjust to do it.
* doc/bison.texinfo (Location Default Action): Fix.
2002-05-02 16:40:54 +00:00
Akim Demaille
fdbcd8e289 Remove the so called hairy (semantic) parsers.
* src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
* src/gram.h, src/gram.c (semantic_parser): Remove.
(rule_t): Remove the guard and guard_line members.
* src/lex.h (token_t): remove tok_guard.
* src/options.c (option_table): Remove %guard and %semantic_parser
support.
* src/output.c, src/output.h (guards_output): Remove.
(prepare): Adjust.
(token_definitions_output): Don't output the `T'
tokens (???).
(output_skeleton): Don't output the guards.
* src/files.c, src/files.c (attrsfile): Remove.
* src/reader.c (symbol_list): Remove the guard and guard_line
members.
Adjust dependencies.
(parse_guard): Remove.
* data/bison.hairy: Remove.
* doc/bison.texinfo (Environment Variables): Remove occurrences of
BISON_HAIRY.
2002-05-02 15:06:46 +00:00
Paul Eggert
08e49d20f0 Replace @var{...(...}} with something else, as Texinfo 4.2 warns
about that construct.
2002-04-22 22:10:22 +00:00
Akim Demaille
23c5a17453 * src/reader.c (token_translations_init): 256 is now the default
value for the error token, i.e., it will be assigned another
number if the user assigned 256 to one of her tokens.
(reader): Don't force 256 to error.
* doc/bison.texinfo (Symbols): Adjust.
* tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
(AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
etc. instead of 10, 20, 30 (which was used to `jump' over error
(256) and undefined (2)).
2002-04-22 08:22:11 +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
Akim Demaille
e0c471a9e6 * doc/bison.texinfo: Remove the uses of the obsolete @refill. 2002-04-19 13:35:08 +00:00
Paul Eggert
e966383bf4 * doc/bison.texinfo: Update copyright date.
(Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
(Symbols): Warn about running Bison in one character set,
but compiling and/or running in an incompatible one.
Warn about character code 256, too.
2002-04-04 21:34:34 +00:00
Paul Eggert
e4e1a4dcb4 (Bison Parser, Debugging): Remove special mention of C++, as it's
treated like C now.
2002-02-14 20:26:54 +00:00
Paul Eggert
e2742e46ba (Debugging): Remove YYSTDERR; it's no longer defined or used.
Also, s/cstdio.h/cstdio/.
2002-01-05 01:25:38 +00:00
Akim Demaille
b5b61c616b %name-prefix is broken.
* src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
Adjust all dependencies.
* tests/headers.at (export YYLTYPE): Strengthen this test: use
%name-prefix.
Renaming yylval but not yylloc is not consistent.  Now we do.
* src/bison.simple: Prefix yylloc if used.
* doc/bison.texinfo (Decl Summary): Document that.
2001-12-29 14:27:45 +00:00
Akim Demaille
8c9a50bee1 * doc/bison.texinfo: Promote `%long-directive' over
`%long_directive'.
Remove all references to fixed-output-files, yacc is enough.
2001-12-29 14:27:20 +00:00
Akim Demaille
704a47c475 * doc/bison.texinfo: Formatting changes. 2001-12-29 14:25:45 +00:00
Paul Eggert
4947ebdb4c Document that YYDEBUG must be defined to a nonzero value. 2001-12-17 19:43:23 +00:00
Paul Eggert
02a81e05f9 Document YYFPRINTF, YYSTDERR. 2001-12-14 01:51:33 +00:00
Akim Demaille
7093d0f541 Name space cleanup in generated parser.
* doc/bison.texinfo (Bison Parser): Discuss system headers
and their effect on the user name space.
* src/bison.simple:
(YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
(YYSIZE_T): New macro.  Use it instead of size_t, to avoid infringing
on user names when possible.
(YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
Simplify test for whather <alloca.h> exists.
(<stdlib.h>): Include if we will use malloc, and if standard C or C++.
(<stdio.h>): Include if YYDEBUG.
(yymemcpy): Renamed from __yy_memcpy.  Do not define unless
! defined (yyoverflow) && ! defined (yymemcpy).
(yymemcpy, yyparse): Rename local variables as needed so that
they all begin with 'yy'.
(yystrlen, yystpcpy): New functions.
(YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
All uses changed.
(yyparse): size_t -> YYSIZE_T.  Use yystrlen and yystpcpy
instead of relying on string.h functions.  Use YYSTACK_ALLOC
and YYSTACK_FREE instead of malloc and free.
2001-11-30 14:00:14 +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
9edcd89542 * doc/bison.texinfo: Use $' as shell prompt, not %'.
Use @kbd to denote user input.
(Language and Grammar): ANSIfy the example.
Adjust its layout for info/notinfo.
(Location Tracking Calc): Output error messages to stderr.
Output locations in a more GNUtically correct way.
Fix a couple of Englishos.
Adjust @group/@end group pairs.
2001-11-12 09:36:31 +00:00
Akim Demaille
7da99edea7 %expext was not functioning at all.
* src/conflicts.c (expected_conflicts): Set to -1.
(conflict_report): Use ngettext.
(conflicts_print): Check %expect and make its violation an error.
* doc/bison.texinfo (Expect Decl): Adjust.
* configure.in (AM_GNU_GETTEXT): Ask for ngettext.
* tests/regression.at (%expect not enough, %expect right)
(%expect too much): New.
2001-11-12 09:33:38 +00:00
Akim Demaille
1964ad8c34 Formatting changes. 2001-11-05 09:14:55 +00:00
Akim Demaille
d8988b2fff * doc/bison.texinfo (Decl Summary): Split the list into
`directives for grammars' and `directives for bison'.
Sort'em.
Add description of `%name-prefix', `file-prefix', and `output'.
Promote `-' over `_' in directive names.
(Bison Options): s/%locactions/%locations/.  Nice Freudian slip.
Simplify the description of `--name-prefix'.
Promote `-' over `_' in directive names.
Promote `--output' over `--output-file'.
Fix the description of `--defines'.
* tests/output.at: Exercise %file-prefix and %output.
2001-11-05 08:50:46 +00:00
Akim Demaille
342b8b6e21 Merge in branch-1_29. 2001-10-04 14:55:21 +00:00
Marc Autret
75f5aaea27 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
sections of Bison.
2001-09-20 18:24:27 +00:00
Akim Demaille
f9a8293a3f * doc/bison.texinfo (Table of Symbols): Document
YYSTACK_USE_ALLOCA.
2001-08-15 08:25:10 +00:00
Pascal Bart
f2b5126e47 Apply GNU Free Documentation License to manual. 2001-08-14 14:13:16 +00:00
Akim Demaille
79282c6c57 alloca.c, alloca.h and allocate.c are really to be removed. 2001-08-13 14:54:50 +00:00
Pascal Bart
c67a198d15 Add GPL in an include file 2001-08-10 17:21:49 +00:00
Marc Autret
3e259915e1 * doc/bison.texinfo (Locations): Update @$ stuff. 2001-08-09 22:35:26 +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
8416323152 * configure.in: Bump to 1.28c.
* doc/bison.texinfo: Texinfo thingies.
2001-08-06 08:35:21 +00:00
Akim Demaille
234a3be303 * doc/bison.texinfo: Update.
* doc/bison.1 (mandoc): Update.
* src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
* src/files.c: Support output files extensions computing.
(src_extension): New static variable.
(header_extension): New static variable.
(tr): New function.
(get_extension_index): New function, gets the index of an extension
filename in a string.
(compute_exts_from_gf): New function, computes extensions from the
grammar file extension.
(compute_exts_from_src): New functions, computes extensions from the
C source file extension, file given by ``-o'' option.
(compute_base_names): Update.
(output_files): Update.
2001-08-01 18:08:48 +00:00
Akim Demaille
847bf1f538 * doc/autoconf.texi: Document @$.
(Locations): New section.
2001-08-01 17:49:14 +00:00
Akim Demaille
62ab6972e8 * src/getargs.h (raw_flag): Remove.
* src/getargs.c: Die on `-r'/`--raw'.
* src/lex.c (parse_percent_token): Die on `%raw'.
* src/reader.c (output_token_defines): Suppress call to `raw_flag'.
* tests/calc.at: Suppress test with option `--raw'.
2001-07-18 09:52:35 +00:00
Akim Demaille
32dfccf8f8 * doc/bison.texinfo: ANSIfy the examples. 2001-03-16 15:32:48 +00:00
Akim Demaille
cd5bd6ac4f * getargs.c (skeleton): New variable.
(longopts): --skeleton is a new option.
(shortopts, getargs): -S is a new option.
* getargs.h: Declare skeleton.
* output.c (output_parser): Use it.
2001-03-16 15:16:08 +00:00
Akim Demaille
6deb44470e Since we now use obstacks, more % directives can be enabled.
* src/lex.c (percent_table): Also accept `%yacc',
`%fixed_output_files', `%defines', `%no_parser', `%verbose', and
`%debug'.
Handle the actions for `%semantic_parser' and `%pure_parser' here,
instead of returning a token.
* src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
* src/reader.c (read_declarations): Adjust.
* src/files.c (open_files): Don't call `compute_base_names', don't
compute `attrsfile' since they depend upon data which might be
*in* the input file now.
(output_files): Do it here.
* src/output.c (output_headers): Document the fact that this patch
introduces a guaranteed SEGV for semantic parsers.
* doc/bison.texinfo: Document them.
* tests/suite.at: Exercise these %options.
2001-01-18 14:47:09 +00:00
Akim Demaille
14ded68250 * doc/bison.texinfo: Various typos spotted by Neil Booth. 2000-10-04 12:52:25 +00:00
Akim Demaille
89cab50df1 The location tracking mechanism is precious for parse error
messages.  Nevertheless, it is enabled only when `@n' is used in
the grammar, which is a different issue (you can use it in error
message, but not in the grammar per se).  Therefore, there should
be another means to enable it.
* src/getargs.c (getargs): Support `--locations'.
(usage): Report it.
* src/getargs.h (locationsflag): Export it.
* src/lex.c (percent_table): Support `%locations'.
* src/reader.c (yylsp_needed): Remove this variable, now replaced
with `locationsflag'.
* doc/bison.texinfo: Document `--locations' and `%locations'.
Sort the options.
* tests/calc.m4: Test it.
For regularity of the names, replace each
(nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
(no_lineflag, token_tableflag, rawflag, no_parserflag): this.
In addition replace each `flag' with `_flag'.
2000-10-02 10:20:59 +00:00
Jesse Thilo
d5796688b1 Print contents near beginning, not at the end. 2000-09-27 23:59:22 +00:00
Akim Demaille
ceed8467b7 * src/output.c: Formatting changes.
* src/machine.h: Remove, leaving its contents in...
* src/system.h: here.
Include stdio.h.
Adjust all dependencies on stdio.h and machine.h.
* src/getargs.h: New file.
Let all `extern' declarations about getargs.c be replaced with
inclusion of `getargs.h'.
* src/Makefile.am (noinst_HEADERS): Adjust.

* tests/calc.m4 (yyin): Be initialized in main, not on the global
scope.
(yyerror): Returns void, not int.
* doc/bison.texinfo: Formatting changes.
2000-09-19 18:10:41 +00:00
Akim Demaille
1386333308 * doc/bison.texinfo: Update the copyright.
ANSIfy and GNUify the examples.
Remove the old menu.
2000-09-18 13:24:27 +00:00
Jesse Thilo
9ecbd1257c Tweaked spelling and grammar.
Updated ISBN.
Removed reference to price of printed copy.
Mention BISON_SIMPLE and BISON_HAIRY.
1999-12-13 07:38:05 +00:00
Jesse Thilo
2d97f5ccb7 Fix formatting glitch. 1999-01-14 15:08:17 +00:00
Jesse Thilo
c49a8e71ce Update FSF address. 1999-01-14 14:58:38 +00:00
Jesse Thilo
0308924772 Delete comment "consider using @set for edition number, etc..." since
we now are doing so.
1998-12-30 05:24:00 +00:00
Jesse Thilo
bd773d7399 Add info dir entry. 1998-11-28 21:44:16 +00:00