Commit Graph

409 Commits

Author SHA1 Message Date
Joel E. Denny
303834ccb0 doc: clean up references to `Tracking Locations'.
* doc/bison.texinfo (Locations): Rename node to...
(Tracking Locations): ... this, which is its section name, and
update all cross references.  The trouble is that there is another
node about locations.  Its section name is `Locations', which was
easily confused with the node name of this node.  Moreover, its
node name is `Locations Overview', which was mistakenly used to
label some cross references to this node.
(cherry picked from commit 7404cdf3a1)

Conflicts:

	doc/bison.texinfo
2011-06-11 12:25:21 -04:00
Joel E. Denny
a7b15ab99c doc: clean up `Named References' a little.
* doc/bison.texinfo (Named References): Rename section to match
the node name, and update all cross references.  Don't use the
acronyms RHS and LHS given that we don't expand them anywhere in
the manual.  Try to use @samp and @code properly.  Mention that
named references are experimental as we've already stated in NEWS.
(Destructor Decl): Expand the only remaining use of RHS or LHS.
(cherry picked from commit ce24f7f59b)
2011-06-11 12:18:25 -04:00
Joel E. Denny
a40e77ebf6 doc: motivate named references.
Suggested by Hans Aberg at
<http://lists.gnu.org/archive/html/bug-bison/2011-05/msg00008.html>.
* doc/bison.texinfo (Named References): Explain briefly how
they're better than the traditional positional references.
(cherry picked from commit 7d31f09289)
2011-06-11 12:18:07 -04:00
Joel E. Denny
378e917c55 doc: discuss named references after locations.
Reported by Hans Aberg at
<http://lists.gnu.org/archive/html/bug-bison/2011-05/msg00008.html>.
* NEWS (2.5.1): Document.
* doc/bison.texinfo (Named References): Because it discusses
locations in addition to semantic values, move this subsection out
of the section `Defining Language Semantics', where locations have
not yet been introduced, to be a new section after the following
section, `Tracking Locations'.
(cherry picked from commit 908c8647de)
2011-06-11 12:17:35 -04:00
Joel E. Denny
a801089ca3 gnulib, autoconf: update.
* README-hacking (Updating a submodule): Give advice on how to
determine the versions of gnulib and autoconf to which we should
update.
(Release Procedure): Note that submodules should be updated.
* bootstrap.conf (gnulib_modules): Rename pipe to spawn-pipe as
suggested in updated gnulib NEWS.
* gnulib: Choose a stable snapshot according to advice in Bison's
README-hacking.
* po/POTFILES.in (lib/pipe.c): Rename to...
(lib/spawn-pipe.c): ... this.
* src/output.c: Update to include spawn-pipe.h.
* submodules/autoconf: Update to latest for improvement in m4.m4
that excludes M4 with buggy strstr.  The only other changes to
files that we use are copyright updates.
(cherry picked from commit a898435b25)

Conflicts:

	build-aux/.gitignore
2011-04-16 15:35:02 -04:00
Joel E. Denny
786743d5eb Add -Wconflicts-sr and -Wconflicts-rr.
Thus, conflict reports are now affected by -Werror and -Wnone
(unless %expect or %expect-rr is specified).  Reported by George
Neuner at
<http://lists.gnu.org/archive/html/bug-bison/2010-08/msg00002.html>.
* NEWS (2.5): Document.
* doc/bison.texinfo (Bison Options): Document.
* src/complain.c, src/complain.h (set_warning_issued): Export
function.
* src/conflicts.c (conflicts_print): Suppress conflict report
based on -Wno-conflicts-sr and -Wno-conflicts-rr, and treat
conflicts as errors if -Werror.
* src/getargs.c (warnings_flag): Initialize with
warnings_conflicts_sr and warnings_conflicts_rr as well.
(warnings_args, warnings_types): Add entries for
warnings_conflicts_sr and warnings_conflicts_rr.
(usage): Update.
* src/getargs.h (enum warnings): Add entries for
warnings_conflicts_sr and warnings_conflicts_rr.
* tests/conflicts.at (-W versus %expect and %expect-rr): New test
group.
* tests/local.at (AT_BISON_CHECK_NO_XML): Update now that the
conflict report can produce a "warnings being treated as errors"
message.  Also, check that stderr is now fully scrubbed by -Wnone
when the exit status is 0.
(cherry picked from commit 6f8bdce25d)
2011-04-09 13:01:41 -04:00
Joel E. Denny
c39014ae2b Add -Wother so -Wnone suppresses all warnings.
Reported by George Neuner at
<http://lists.gnu.org/archive/html/bug-bison/2010-08/msg00002.html>.
* NEWS (2.5): Document.
* THANKS (George Neuner): Add.
* doc/bison.texinfo (Bison Options): Document.
* src/complain.c, src/complain.h
(warn_at, warn_at_indent, warn): Suppress warning if -Wno-other.
(midrule_value_at): New warning function, similar to yacc_at in
that it's controlled by its own warning category.
* src/getargs.c (warnings_flag): Initialize to warnings_other.
(warnings_args, warnings_types): Add entry for warnings_other.
(usage): Update.
* src/getargs.h (enum warnings): Add entry for warnings_other.
* src/gram.c (grammar_rules_useless_report): If -Wno-other, then
don't print useless rules.
* src/reader.c (symbol_should_be_used): Rather than adjusting the
return value based on whether midrule value warnings are enabled,
accept a new parameter for telling the caller whether true is
being returned for a potential midrule warning.
(grammar_rule_check): Use midrule_value_at for midrule value
warnings, and continue to use warn_at for all other warnings.  Let
them check whether the warnings are enabled.
* tests/local.at (AT_BISON_CHECK): Update documentation.
(AT_BISON_CHECK_NO_XML): Check that -Wnone and --warnings=none
disable all warnings exercised in the test suite.
(cherry picked from commit 8ffd7912e3)
2011-04-09 13:00:35 -04:00
Joel E. Denny
709c7d1148 doc: fix confusing citation of LAC publication.
Suggested by Akim Demaille.
* doc/bison.texinfo (LAC): Here.
(cherry picked from commit 56706c6167)
2011-03-20 17:42:59 -04:00
Joel E. Denny
f0ad1b2fb2 lr.default-reductions: rename "full" value to "most".
Unlike "consistent" and "accepting", "full" doesn't answer the
question of "which states".
* doc/bison.texinfo (%define Summary): Update.
(Default Reductions): Update.
* src/print.c (print_reductions): Update.
* src/reader.c (prepare_percent_define_front_end_variables):
Update.
* src/tables.c (action_row): Update.
* tests/input.at (%define enum variables): Update.
* tests/reduce.at (%define lr.default-reductions): Update.
(cherry picked from commit a6e5a28079)
2011-03-20 17:42:58 -04:00
Joel E. Denny
15e46f2df4 doc: cite publication for LAC.
* doc/bison.texinfo (LAC): Here.
(cherry picked from commit 121c498280)
2011-03-06 17:13:19 -05:00
Joel E. Denny
cc09e5beb9 doc: clean up terminology for mysterious conflicts.
* doc/bison.texinfo (Mystery Conflicts): Rename node to...
(Mysterious Conflicts): ... this, which is already the section
title and the name used in the index.  Update all cross-references
to this node.  Also, don't imply that R/R conflicts are the only
kind of mysterious conflict.
(cherry picked from commit 5da0355aff)
2011-03-06 16:43:23 -05:00
Joel E. Denny
32493bc84d lr.default-reductions: rename "all" value to "full".
States that shift the error token do not have default reductions,
and GLR disables some default reductions, so "all" was a misnomer.
* doc/bison.texinfo (%define Summary): Update.
(Default Reductions): Update.
* src/print.c (print_reductions): Update.
* src/reader.c (prepare_percent_define_front_end_variables):
Update.
* src/tables.c (action_row): Update.
* tests/input.at (%define enum variables): Update.
* tests/reduce.at (%define lr.default-reductions): Update.
(cherry picked from commit d815ec4a62)
2011-03-06 16:42:39 -05:00
Joel E. Denny
7fceb615a5 doc: create a new Tuning LR section in the manual.
And clean up all other documentation of the features described
there.
* NEWS (2.5): Tweak wording of lr.type and parse.lac entries a
bit, update the cross-references to the manual, and point out that
LAC has caveats.  Don't be so adamant that IELR+LAC=canonical LR.
That is, as the referenced section in the manual documents, LAC
does not fix infinite parsing loops on syntax errors.
* doc/bison.texinfo: Consistently drop the "(1)" suffix from LALR,
IELR, and LR in @cindex.
(%define Summary): Condense the entries for lr.default-reductions,
lr.keep-unreachable-states, lr.type, and parse.lac into brief
summaries, and cross-reference the appropriate subsections of
Tuning LR.  For parse.lac, mention that it's only implemented for
deterministic parsers in C.  In parse.error entry, mention LAC,
and add cross-reference to the LAC section.
(Error Reporting): When mentioning parse.error, mention LAC, and
add cross-reference to the LAC section.
(Tuning LR): New section with an extended version of the
documentation removed from %define Summary.  Change all
cross-references in the manual to point here instead of there.
(Calc++ Parser): When mentioning parse.error, mention LAC, and add
cross-reference to the LAC section.
(Table of Symbols): In %error-verbose entry, add cross-reference
to Error Reporting.
(Glossary): Capitalize entry titles consistently.  Add definitions
for "defaulted state" and "unreachable state".  Expand IELR
acronym in IELR's entry.
(cherry picked from commit 6f04ee6c78)

Conflicts:

	doc/bison.texinfo
2011-03-06 16:29:52 -05:00
Joel E. Denny
5e528941f4 doc: add bibliography to manual.
* doc/bison.texinfo (Mystery Conflicts): Cross-reference
bibliography instead of citing publications directly.
(Generalized LR Parsing): Likewise.
(Bibliography): New section.  Not all entries are cross-referenced
yet, but that will come in future patches.
(cherry picked from commit 71caec0661)
2011-02-20 16:59:32 -05:00
Joel E. Denny
8407249529 doc: fix some minor inconsistencies.
* doc/bison.texinfo (%define Summary): Fix mislabeled entry for
lex_symbol.
(%code Summary): For consistency with the variable list in the
%define Summary, enclose the list of %code qualifiers in a table
instead of an itemize.
2011-02-13 12:02:31 -05:00
Joel E. Denny
51151d9171 doc: clean up new subsections in manual.
* doc/bison.texinfo (%define Summary): Reword so it reads well as
a separate section.  For example, add an intro, and move most of
the text outside of the @deffn so it is not indented so far.
(%code Summary): Likewise.
(Table of Symbols): Reword %code entry to match the %code entry in
Decl Summary.
(cherry picked from commit 406dec8286)

Conflicts:

	doc/bison.texinfo
2011-02-13 11:48:28 -05:00
Joel E. Denny
35c1e5f0cd doc: finish splitting apart the manual's Decl Summary section.
Suggested by Akim Demaille at
<http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00013.html>.
* doc/bison.texinfo (Decl Summary): Extract most of the %define
entry into...
(%define Summary): ... this new subsection, and update all
cross-references.  For readability of the patches, rewriting of
the text so it makes sense as a separate subsection will come in a
later patch.  Moreover, the majority of the text describing the
various new LR features should likely move to another new section
somewhere.
(cherry picked from commit 2f4518a126)

Conflicts:

	doc/bison.texinfo
2011-02-13 11:14:10 -05:00
Joel E. Denny
e0c072223c doc: begin to split apart the manual's Decl Summary section.
Discussed in thread starting at
<http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00013.html>.
* doc/bison.texinfo (Decl Summary): Extract most of the %code
entry into...
(%code Summary): ... this new subsection, and update all
cross-references.  For readability of the patches, rewriting of
the text so it makes sense as a separate subsection will come in a
later patch.
(cherry picked from commit 8e6f226630)

Conflicts:

	doc/bison.texinfo
2011-02-13 10:28:46 -05:00
Joel E. Denny
ff7571c04d doc: clean up naming of various Bison files.
The Bison manual's names for various files associated with a Bison
parser has devolved into inconsistency.  This patch makes the
naming consistent for the most important files.  First, it chooses
"grammar file" over "input file".  The former appears to be more
traditional in the Bison manual, and Bison has other input
files (skeletons).  Second, it chooses "parser implementation
file" over names like "parser file", "parser source file", "parser
source code file", and "parser output file".  The new name makes
it clearer where Bison generates the main parser implementation,
and it is easily distinguishable from "parser header file".
* doc/bison.texinfo: Implement throughout.
(cherry picked from commit 9913d6e45a)

Conflicts:

	doc/bison.texinfo
2011-02-13 10:17:00 -05:00
Joel E. Denny
679e9935fd doc: give credit to more of Bison's developers.
* doc/bison.texinfo (Introduction): Don't imply that only Robert
Corbett, Richard Stallman, and Wilfred Hansen have contributed to
Bison.  However, I don't have time to write a full history, so
just point readers to THANKS and ChangeLog.
(cherry picked from commit 840341d67d)
2011-02-13 09:48:02 -05:00
Joel E. Denny
af28d414f3 doc: document experimental features better.
* doc/bison.texinfo (Introduction): Say that IELR(1) and canonical
LR(1) are experimental.  Mention Java.  Normally experimental
features probably shouldn't be mentioned in the introduction.
However, if Bison's limitations to LALR(1), C, and C++ are so
important that they should be mentioned here, then it's important
to point out that Bison is beginning to escape those limitations.
Moreover, these particular experimental features have very little
chance of being removed.
* src/getargs.c (usage): Say that IELR(1) and canonical LR(1) are
experimental.
(cherry picked from commit d89e48b3c9)
2011-02-13 09:45:17 -05:00
Joel E. Denny
82f3355eaf Do not allow identifiers that start with a dash.
This cleans up our previous fixes for a bug whereby Bison
discarded `.field' in `$-1.field'.  The previous fixes were less
restrictive about where a dash could appear in an identifier, but
the restrictions were hard to explain.  That bug was reported and
this final fix was originally suggested by Paul Hilfinger.  This
also fixes a remaining bug reported by Paul Eggert whereby Bison
parses `%token ID -123' as `%token ID - 123' and handles `-' as an
identifier.  Now, `-' cannot be an identifier.  Discussed in
threads beginning at
<http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>,
<http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00004.html>.
* NEWS (2.5): Update entry describing the dash extension to
grammar symbol names.  Also, move that entry before the named
references entry because the latter mentions the former.
* doc/bison.texinfo (Symbol): Update documentation for symbol
names.  As suggested by Paul Eggert, mention the effect of periods
and dashes on named references.
(Decl Summary): Update documentation for unquoted %define values,
which, as a side effect, can no longer start with dashes either.
* src/scan-code.l (id): Implement.
* src/scan-gram.l (id): Implement.
* tests/actions.at (Exotic Dollars): Extend test group to exercise
bug reported by Paul Hilfinger.
* tests/input.at (Symbols): Update test group, and extend to
exercise bug reported by Paul Eggert.
* tests/named-refs.at (Stray symbols in brackets): Update test
group.
($ or @ followed by . or -): Likewise.
* tests/regression.at (Invalid inputs): Likewise.
2011-01-29 14:57:53 -05:00
Joel E. Denny
676997e53b Revert "Simplify handling of '.' and '-' after unbracketed named references."
This reverts commit bf3e44fe46.

See discussion following
<http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00030.html>.
2011-01-29 10:58:03 -05:00
Paul Eggert
bf3e44fe46 Simplify handling of '.' and '-' after unbracketed named references.
* doc/bison.texinfo (Mid-Rule Actions): Mention that periods and
dashes make symbol names less convenient for named references.
* src/scan-code.l:
(handle_action_dollar): New arg textlen.  All callers changed.
(handle_action_at): Likewise.  Also, args are pointers to const.
(ref_tail_fields): Remove; no longer used.
(letter): Now includes '-' and '.', since this is for Bison
identifiers.
(id): Now the simpler traditional defn, since letters now include
'-' and '.'.
(c_letter, c_id): New defns.
(ref): Use c_id for unbracketed IDs.
(<SC_RULE_ACTION>): Simplify, now that the distinction between
Bison and unbracketed IDs are now in the regular expressions.
(VARIANT_BAD_BRACKETING): Remove.
(VARIANT_NOT_VISIBLE_FROM_MIDRULE): Renumber.
(find_prefix_end): Remove, replacing with ....
(identifier_matches): New function.
(variant_add): Use it.  Omit EXPLICIT_BRACKETING arg; no longer
needed.  CP arg is pointer to constant.  All callers changed.
(show_sub_messages): Remove args CP, EXPLICIT_BRACKETING, DOLLAR_OR_AT.
New arg TEXT.  All callers changed.  Do not worry about showing
trailing context.
(parse_ref): Args CP, RULE, TEXT are now pointers to const.  New
arg TEXTLEN.  Remove arg DOLLAR_OR_AT.  All callers changed.
Simplify code now that the regular expressions capture the
restrictions.
* src/scan-gram.l (letter, id): Adjust to match scan-code.l.
* src/symlist.c (symbol_list_null): Arg is now pointer to const.
* src/symlist.h: Likewise.
* tests/named-refs.at (Misleading references): These are now caught
by the C compiler, not by Bison; that's good enough.  Adjust test
to reflect this.
(Many kinds of errors, Unresolved references): Adjust expected
diagnostics to match new behavior.  The same errors are caught,
though the diagnostics are not quite as fancy.
($ or @ followed by . or -): Likewise.  Also, Make the grammar
unambiguous, so that diagnostics are not complicated by ambiguity
warnings.
2011-01-09 23:26:26 -08:00
Joel E. Denny
8a4281b987 doc: don't use @acronym.
Lately, many GNU packages are dropping it.  See
<http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00003.html>.
* doc/bison.texinfo: Remove all uses.
2011-01-08 13:55:38 -05:00
Joel E. Denny
575619af5e maint: run "make update-copyright". 2011-01-02 10:02:43 -05:00
Joel E. Denny
f1b238df18 doc: cleanup.
* NEWS (2.5): Make some minor improvements to wording, and format
entries more consistently.
* doc/bison.texinfo (Language and Grammar): Point out that IELR
and canonical LR are experimental features.
(Decl Summary): In list of %define variables, make wording more
consistent.  Improve discussion of using LALR for GLR.
2010-12-19 22:17:07 -05:00
Joel E. Denny
fcf834f9ec parse.lac: document.
* NEWS (2.5): Add entry for LAC, and mention LAC in entry for
other corrections to verbose syntax error messages.
* doc/bison.texinfo (Decl Summary): Rewrite entries for
lr.default-reductions and lr.type to be clearer, to mention
%nonassoc's effect on canonical LR, and to mention LAC.  Add entry
for parse.lac.
(Glossary): Add entry for LAC.
2010-12-19 22:12:32 -05:00
Joel E. Denny
e503b9cbbe maint: re-anchor all .gitignore entries.
* bootstrap: Copy from gnulib's latest for the fix to
automatically anchor entries it constructs.
* gnulib: Update to latest just so it has the same bootstrap.
* .gitignore, build-aux/.gitignore, doc/.gitignore:
* lib/.gitignore, m4/.gitignore, po/.gitignore:
* runtime-po/.gitignore: Re-anchor all entries.
2010-10-17 10:18:26 -04:00
Paul Eggert
95aed8db15 Adjust to recent changes to gnulib bootstrap.
* .cvsignore, build-aux/.cvsignore, doc/.cvsignore, etc/.cvsignore:
* examples/calc++/.cvsignore, lib/.cvsignore, m4/.cvsignore:
* po/.cvsignore, runtime-po/.cvsignore, src/.cvsignore:
* tests/.cvsignore: Remove; I don't use CVS to maintain Bison
anymore and don't know of anybody else who does.  If someone needs
these files, they can resurrect them.
* .gitignore, build-aux/.gitignore, doc/.gitignore, lib/.gitignore:
* m4/.gitignore, po/.gitignore, runtime-po/.gitignore:
Omit leading '/', since bootstrap omits it.
Adjust file names to match current contents better.
* bootstrap: Sync from gnulib: this contains the new gnulib_mk_hook
installed just for us.
* bootstrap.conf (excluded_files): Don't exclude codeset.m4,
glibc21.m4, inttypes_h.m4, size_max.m4, xsize.m4, as they are now
needed somehow.  Don't have time to look into why.
(gnulib_modules): Change malloc to malloc-gnu.  Do we really assume
the GNU malloc behavior, where malloc (0) != NULL unless we're
out of storage?  If not, we can omit malloc-gnu; but for now I left
it in to be safe.
(vc_ignore): Remove.
(gnulib_mk_hook): New function.
* README-hacking: Renamed from HACKING, since gnulib bootstrap now
uses that convention.
2010-10-08 11:11:51 -07:00
Joel E. Denny
93d7dde97a doc: fix -W and %expect documentation some.
* NEWS (2.4.3): Mention that there are documentation fixes.
* doc/bison.texinfo (Expect Decl): Make it clear that %expect
turns conflicts into errors not warnings.
(Shift/Reduce): Likewise.
(Bison Options): Don't mention -Wsyntax.  It doesn't exist.
(cherry picked from commit 3ffdd5f125)
2010-08-04 20:18:26 -04:00
Paul Hilfinger
20be2f9227 Remove restrictions on expanding GLR stacks in C++.
* data/glr.c:  Remove tests for __cplusplus related to definition of
    YYSTACKEXPANDABLE.
    * doc/bison.texinfo: Rewrite paragraph saying C++ stacks are not
    expandable to instead indicate conditions that prevent their expansion
    in C++.  Reorganize section on GLR semantic values a bit. Remove
    discussion of YYLLOC_DEFAULT. Mention restrictions to POD data.
2010-08-03 19:52:23 -07:00
Paul Hilfinger
ca2a6d1587 Allow specification of semantic predicates.
These changes allow users to prefix an action with %? to indicate that it
is a semantic predicate---an expression that is evaluated immediately (not
deferred, even in GLR nondeterministic mode) and causes a syntax error if
false.  In GLR parsers, this has the effect of killing one of a set of
split-off parses, just as would an ordinary syntax error.

Changelog:

    * NEWS: Describe new semantic-predicate feature.
    * data/c.m4 (b4_predicate_case): New definition.
    * data/java.m4 (b4_predicate_case): New definition.
    * data/glr.c (yyimmediate): Add definition.
    (yydoAction): Remove comment, now obsolete.
    Do YY_REDUCE_PRINT here.
    (yyglrReduce): Alter comment to indicate that semantic values
    need not be deferred.
    Remove YY_REDUCE_PRINT from here; done in yydoAction.
    (yyprocessOneStack): Pass immediate flag.
    Delete stacks rejected by predicates in newly split-off parsers.
    Change handling of yyerr so that only current stack gets deleted
    when semantic predicate fails.
    (yyfillin): Don't crash if a semantic value is unresolved (as may
    happen in predicate rules).
    Copy lr state as well in debugging mode.
    Update comment on setting of yysval to include yyloc as well.
    (yy_reduce_print): Add yynormal argument.  Perform fillin properly.
    Report unresolved RHS values.
    (yyimmediate): New table.
    * src/gram.h (struct rule): Add is_predicate field.
    * src/output.c (user_actions_output): Use b4_predicate_case for
    predicates.
    (prepare_symbols): Output yyimmediate.
    * src/scan-gram.l: Add %? token, SC_PREDICATE state.
    * src/scan-code.l (code_props_rule_action_init): Add is_predicate
    argument.
    * src/scan-code.h (struct code_props): Add is_predicate field.
    (code_props_rule_action_init): New interface.
    * src/parse-gram.y (%?{...}): New token.
    (rhs): Add %?{...} rule.
    * src/parse-gram.c: Regenerate.
    * src/parse-gram.h: Regenerate.
    * src/reader.c (grammar_current_rule_action_append): Add
    immediate argument.
    (grammar_midrule_action): Use new interface for
    code_props_rule_action_init.
    (grammar_current_rule_action_append): Ditto.
    (packgram): Transfer is_predicate value.
    * src/reader.h (grammar_current_rule_action_append): New interface.
    * doc/bison.texinfo: Document semantic predicates (%?).

    * data/glr.c (yylhsNonterm, yyisDefaultedState,yyDefaultAction)
    (yygetLRActions,yynewGLRStackItem,yyaddDeferredAction,yyinitStateSet)
    (yyinitGLRStack,yyexpandGLRStack,yyupdateSplit,yymarkStackDeleted)
    (yyundeleteLastStack,yyglrShift,yyglrShiftDefer,yydoAction,yyglrReduce)
    (yyidenticalOptions,yymergeOptionSets,yyresolveStates,yyresolveAction)
    (yyresolveLocations,yyresolveValue,yyreducePrint): Update parameter
    names in comments and mention all parameters.
    (struct yyGLRState): Fix description of yyposn field.
    (yyresolveLocations): Correct comment so as not to imply action when
    yyn1==0.
2010-07-23 19:06:09 -07:00
Paul Eggert
804e83b26d Update from GFDL GFDL 1.2 to 1.3.
* doc/bison.texinfo: Update GFDL version number.
* doc/fdl.texi: Update to version 1.3, taken from:
http://www.gnu.org/licenses/fdl.texi
2010-06-17 23:53:50 -07:00
Paul Eggert
7d424de14c Do not use date ranges in copyright notices.
See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices

* HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha:
* TODO, bootstrap, bootstrap.conf:
* build-aux/update-b4-copyright, cfg.mk, configure.ac:
* data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4:
* data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc:
* data/java-skel.m4, data/java.m4, data/lalr1.cc:
* data/lalr1.java, data/local.mk, data/location.cc:
* data/stack.hh, data/variant.hh, data/xslt/bison.xsl:
* data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl:
* data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint:
* djgpp/README.in, djgpp/config.bat, djgpp/config.sed:
* djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat:
* djgpp/local.mk, djgpp/subpipe.c, djgpp/subpipe.h:
* djgpp/testsuite.sed, doc/bison.texinfo, doc/local.mk:
* doc/refcard.tex, etc/README, etc/bench.pl.in, etc/local.mk:
* examples/calc++/Makefile.am, examples/extexi:
* examples/local.mk, lib/abitset.c, lib/abitset.h:
* lib/bbitset.h, lib/bitset.c, lib/bitset.h:
* lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
* lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
* lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
* lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
* lib/libiberty.h, lib/local.mk, lib/main.c, lib/timevar.c:
* lib/timevar.def, lib/timevar.h, lib/vbitset.c:
* lib/vbitset.h, lib/yyerror.c, m4/bison-i18n.m4:
* m4/c-working.m4, m4/cxx.m4, m4/subpipe.m4, m4/timevar.m4:
* src/AnnotationList.c, src/AnnotationList.h:
* src/InadequacyList.c, src/InadequacyList.h, src/LR0.c:
* src/LR0.h, src/Sbitset.c, src/Sbitset.h, src/assoc.c:
* src/assoc.h, src/closure.c, src/closure.h, src/complain.c:
* src/complain.h, src/conflicts.c, src/conflicts.h:
* src/derives.c, src/derives.h, src/files.c, src/files.h:
* src/flex-scanner.h, src/getargs.c, src/getargs.h:
* src/gram.c, src/gram.h, src/graphviz.c, src/ielr.c:
* src/ielr.h, src/lalr.c, src/lalr.h, src/local.mk:
* src/location.c, src/location.h, src/main.c:
* src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c:
* src/named-ref.h, src/nullable.c, src/nullable.h:
* src/output.c, src/output.h, src/parse-gram.y:
* src/print-xml.c, src/print-xml.h, src/print.c, src/print.h:
* src/print_graph.c, src/print_graph.h, src/reader.c:
* src/reader.h, src/reduce.c, src/reduce.h, src/relation.c:
* src/relation.h, src/scan-code.h, src/scan-code.l:
* src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
* src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
* src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
* src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
* tests/actions.at, tests/atlocal.in, tests/c++.at:
* tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
* tests/existing.at, tests/glr-regression.at:
* tests/headers.at, tests/input.at, tests/java.at:
* tests/local.at, tests/local.mk, tests/named-refs.at:
* tests/output.at, tests/push.at, tests/reduce.at:
* tests/regression.at, tests/sets.at, tests/skeletons.at:
* tests/synclines.at, tests/testsuite.at, tests/torture.at:
Don't use date ranges in copyright notices.

Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
2008, 2009, 2010 Free Software Foundation, Inc.
2010-06-17 23:16:36 -07:00
Akim Demaille
e944aaff36 doc: please Emacs.
* doc/bison.texinfo (Local Variables): Move this after the
	LocalWords, since the latter are looked for in the whole document,
	while the former are looked for only at its end.
	Require american spell checking.
2010-05-11 21:31:31 +02:00
Akim Demaille
86e5b4402f doc: fix lalr1.cc documentation.
* doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
	(C++ Bison Interface): Fix lalr1.cc skeleton name.
	(C++ Parser Interface): Fix semantic_type and location_type names.
	Document yy::parser::token.
	Reported by Jerry Quinn.

(cherry picked from commit 0100cd629d)

Conflicts:

	ChangeLog
	doc/bison.texinfo
2010-05-10 10:41:21 +02:00
Joel E. Denny
e141f4d4bb maint: run "make update-copyright" 2010-01-04 13:47:36 -05:00
Joel E. Denny
1625df5b18 YYFAIL: deprecate.
* NEWS (2.4.2): Document deprecation and the phase-out plan.
* data/lalr1.java (parser::YYStack::YYFAIL): Add comment about
deprecation.
* data/yacc.c (YYFAIL): Likewise, and suppress warnings about
YYFAIL from GCC cpp's -Wunused-macros.
* doc/bison.texinfo (Java Action Features): Remove YYFAIL
documentation.
(LocalWords): Remove YYFAIL.
2009-12-21 16:40:33 -05:00
Joel E. Denny
9dc3ee6d54 Expand GLR acronym in summary of Bison.
Based on discussion with Akim Demaille starting at
<http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
* doc/bison.texinfo (Introduction): Here.
* src/getargs.c (usage): Here.
(cherry picked from commit 51c7ca01e2)
2009-12-14 16:09:52 -05:00
Alex Rozenman
d013372c3f Document named references.
* doc/bison.texinfo (Actions): Add new example and xref to
	Using Named References node.
	(Using Named References): New node.
2009-11-26 23:24:53 +02:00
Akim Demaille
298e8ad91a Formatting changes.
* doc/bison.texinfo: here.
2009-09-23 15:07:29 +02:00
Akim Demaille
a6ca4ce229 doc: fixes.
* doc/bison.texinfo: here.
	Reported by Alex Rozenman.
2009-09-17 09:42:30 +02:00
Akim Demaille
3cdc21cfd7 doc: lalr1.cc and variants.
* doc/bison.texinfo (Decl Summary): Document the "lex_symbol" and
	"variant" %define variables.
	(C++ Semantic Values): Split into...
	(C++ Unions, C++ Variants): these.
	The latter is new.
	(C++ Parser Interface): Fix type names.
	Document parser::syntax_error.
	Document the fact that locations are not mandatory.
	(C++ Scanner Interface): Split into...
	(Split Symbols, Complete Symbols): these.
	The later is new.
	(Calc++ Parsing Driver): Use variants.
	Add more comments.
	Adjust style.
	(Calc++ Parser): Declare all the tokens, no
	longer accept raw characters.
	Remove %union.
	Adjust types and printers.
	Remove destructors.
	(Calc++ Scanner): Use make_<SYMBOL> functions.
	Use strerror in error message.
2009-09-16 22:56:41 +02:00
Akim Demaille
f50bfcd6a1 doc: spell checking.
* doc/bison.texinfo: here.
2009-09-16 22:56:37 +02:00
Akim Demaille
6b5a0de960 doc: comment changes.
* doc/bison.texinfo: Comment changes.
2009-09-16 22:56:24 +02:00
Akim Demaille
2055a44ed2 %param: documentation.
* NEWS (2.6): Document %param, %lex-param, and %parse-param
	changes.
	* doc/bison.texinfo: Document that %lex-param and %parse-param
	are n-ary.
	Changes some examples to demonstrate it.
	(Calc++ Parser): Use %param.
2009-09-09 16:26:27 +02:00
Joel E. Denny
c6abeab182 Complain about unused %define variables and %code qualifiers.
* NEWS (2.5): Document.
* data/bison.m4 (b4_check_user_names): Complain instead of warn.
* doc/bison.texinfo (Decl Summary): Document complaint, and
improve %define documentation a little otherwise.
* tests/input.at (Reject unused %code qualifiers): Update.
(%define errors): Update.
(%define, --define, --force-define): Update.
(%define backward compatibility): Update.
(Unused %define api.pure): Update.
* tests/push.at (Push Parsing: Unsupported Skeletons): Update.
2009-09-05 17:33:41 -04:00
Joel E. Denny
cf499cff31 %define: accept unquoted values.
* NEWS (2.5): Group all %define changes together, and document
this one.  Remove quotes in IELR and canonical LR entry.
* doc/bison.texinfo: Remove quotes in most examples throughout.
(Decl Summary): Update %define documentation.
(Table of Symbols): Likewise.
* src/ielr.c (LrType): Update documentation.
* src/parse-gram.y (content.opt): Add production for ID.
* tests/actions.at: Remove quotes in most tests.
* tests/calc.at: Likewise.
* tests/existing.at: Likewise.
* tests/input.at: Likewise.
* tests/local.at: Likewise.
* tests/push.at: Likewise.
* tests/reduce.at: Likewise.
* tests/torture.at: Likewise.
2009-08-28 07:10:28 -04:00
Joel E. Denny
6ba9640406 %define lr.type: make values lowercase IDs.
That is, "LALR" => "lalr", "IELR" => "ielr", and
"canonical LR" => "canonical-lr".
* NEWS (2.5): Update documentation.
* doc/bison.texinfo (Decl Summary): Likewise.
* src/ielr.c (ielr): Use new values.
* src/ielr.h (ielr): Update documentation.
* src/reader.c (prepare_percent_define_front_end_variables): Use
and validate new values.
* tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
grammars.
* tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
2009-08-28 07:10:27 -04:00