| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/location.h: (location_print): Add return value.
* src/location.c: (location_print): Return number of printed
characters.
* src/complain.h: Two new functions (complain_at_indent,
warn_at_indent).
* src/complain.cpp: Implement the alignment mechanism. Add new
static variable (indent_ptr). Use and update it (error_message,
complain_at_indent, warn_at_indent).
* src/scan-code.l: Fix strings for translations. Use new *_indent
functions (parse_ref, show_sub_messages).
* tests/named-ref.at: Adjust testcases.
* NEWS (2.5): Add an announcement about named references.
|
|
|
|
|
|
| |
* tests/push.at: Remove "Push Parsing: " from test group titles
because these are already under the banner "Push Parsing Tests".
(cherry picked from commit 00d80a9cedbffda49212c0cdb90e90c27a561bb2)
|
|
|
|
|
|
|
|
|
| |
Add "symbol not found in production" error message when
an "invalid reference" is detected in named references
resolution.
* src/scan-code.l: Update "invalid reference" case.
* tests/named-ref.at: Adjust test-cases.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* data/yacc.c: Clean up M4 for readability, and make output
whitespace more consistent. For the main parse function
comment, instead of saying "yyparse or yypush_parse", say either
"yyparse" or "yypush_parse" depending on which it actually is.
(cherry picked from commit bb31eb56abd67c0ccf92244d160855ff06a336ac)
Conflicts:
src/parse-gram.c
src/parse-gram.h
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
(cherry picked from commit c6abeab182fed54a2068fd75978a97f9c09d9da7)
Conflicts:
ChangeLog
|
|
|
|
|
|
|
|
| |
* src/output.c: Don't include assert.h.
(output_skeleton): Use aver not assert.
* src/system.h (aver): In documentation of why, add links to
Paul Eggert's explanations in the mailing lists.
(cherry picked from commit 9789acf09124eb5ffbe5f0737261aec91b32ebd4)
|
|
|
|
|
|
|
|
|
| |
in a symbolic reference resolution. Remove .expr and -expr from
the shown reference when the reference is unresolved.
* src/scan-code.l: Change the error message, adjust location columns,
rename variable "exact_mode" to "explicit_bracketing".
* tests/named-ref.at: Adjust existing tests and add a new one.
|
|
|
|
|
| |
* NEWS (2.4.2): Add "Internationalization" item.
(cherry picked from commit 2755de8fec58b581faed33f76a23eeb681e2edc5)
|
|
|
|
|
|
| |
* bootstrap (find_tool): Improve error messages.
Fix typo about find_tool_names.
(cherry-picked from 1deef26d0ca3df3d1c845a8cf41fc0cdef009d79).
|
|
|
|
|
|
|
|
|
|
| |
See
<http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
* src/scan-code.h (code_props_rule_action_init): Rename
named_ref arg to name so it doesn't shadow named_ref type. This
makes it consistent with the function definition in scan-code.l
anyway.
(cherry picked from commit 2646cd540bfdd35f457e0e0a1bcc5f9b26a96849)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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/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.
(cherry picked from commit cf499cff31eabd04e37107484647bdd453137d1d)
Conflicts:
doc/bison.texinfo
src/parse-gram.c
src/parse-gram.h
tests/actions.at
tests/calc.at
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
(cherry picked from commit 6ba9640406758718fdcfb7a1154e58ce4d9b196c)
|
|
|
|
|
|
|
|
| |
* src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
Avoid compiler warning.
Signed-off-by: Eric Blake <ebb9@byu.net>
(cherry picked from commit bbbbe221d7c2ff2fff88f7a0c8dbfee73f2e8a58)
|
|
|
|
|
|
|
|
|
|
| |
And skip tests if perl is not available. This is better than
playing tricks with shell portability. Suggested by Akim
Demaille.
* tests/input.at (Bad character literals): Use it here for
omitting final newlines.
(Bad escapes in literals): Use it here for special characters.
(cherry picked from commit b70c7fb4e1db54e78d4f3d4a0f110a81118ffc60)
|
|
|
|
|
|
| |
* tests/conflicts.at (%nonassoc and eof): Extend to test that it
prevents the omission of expected tokens for %error-verbose.
(cherry picked from commit d1cc31c5f04b81a3620fa291020ce23490f3f9e7)
|
|
|
|
|
|
| |
* tests/input.at (Bad escapes in literals): Don't expect "echo
'\0'" to output \ then 0.
(cherry picked from commit 3bed3a757fef03bb063e210ed74918bb875fe2e1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Don't
mention zero values in the YYTABLE comments.
* data/glr.c (yytable_value_is_error): Don't check for zero
value.
* data/lalr1.cc (yy_table_value_is_error_): Likewise.
* data/yacc.c (yytable_value_is_error): Likewise.
* data/lalr1.java (yy_table_value_is_error_): Likewise.
(yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
* src/tables.h: In header comments, explain why it's useless to
check for a zero value in yytable.
(cherry picked from commit aa0cb40d61cda5bfa9d325a45735439cbbd06327)
Conflicts:
data/bison.m4
data/lalr1.java
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* data/c.m4 (b4_table_value_equals): Comment that YYID must be
defined.
* data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Fix
yytable comments: zero indicates syntax error not default
action.
* data/glr.c (yyis_pact_ninf): Rename to...
(yypact_value_is_default): ... this.
(yyisDefaultedState): Update for rename.
(yyis_table_ninf): Rename to...
(yytable_value_is_error): ... this, and check for value zero
besides just YYTABLE_NINF.
(yygetLRActions): Check for default value from yypact. It
appears that this check is always performed before this function
is invoked, and so adding the check here is probably redundant.
However, the code may evolve after this subtlety is forgotten.
Also, update for rename to yytable_value_is_error. Because that
macro now checks for zero, a different but equivalent branch of
the if-then-else here is evaluated.
(yyreportSyntaxError): Update for rename to
yytable_value_is_error. The zero condition was mishandled
before.
(yyrecoverSyntaxError): Update for renames. No behavioral
changes.
* data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
New function.
(yy_table_value_is_error_): New function.
(parse): Use new functions where possible. No behavioral
changes.
(yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
The zero condition was mishandled before.
* data/yacc.c (yyis_pact_ninf): Rename to...
(yypact_value_is_default): ... this.
(yyis_table_ninf): Rename to...
(yytable_value_is_error): ... this, and check for value zero
besides just YYTABLE_NINF.
(yysyntax_error): Update for rename to yytable_value_is_error.
The zero condition was mishandled before.
(yyparse): Update for renames. No behavioral changes.
* src/tables.h: Improve comments about yypact, yytable, etc.
more. Most importantly, say yytable value of zero means syntax
error not default action.
(cherry picked from commit f2b30bdf3713e6fa9fafd0fc6caed68e38248ebc)
Conflicts:
data/bison.m4
data/lalr1.cc
data/lalr1.java
data/yacc.c
src/parse-gram.c
src/parse-gram.h
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* NEWS (2.5): Document.
* data/glr.c (yyreportSyntaxError): Fix this by checking
yyis_table_ninf.
* data/yacc.c (yysyntax_error): Likewise.
* data/lalr1.cc (yysyntax_error_): Fix this by checking
yytable_ninf_.
* data/lalr1.java (yysyntax_error): Likewise.
* tests/conflicts.at (%nonassoc and eof): Update expected output
and remove FIXME.
(cherry picked from commit 53f036ce027289d3f5e70c88735b88aa6725381d)
Conflicts:
data/lalr1.cc
data/lalr1.java
src/parse-gram.c
src/parse-gram.h
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* data/c.m4 (b4_table_value_equals): New macro to capture
some repeated code.
* data/glr.c (yyis_pact_ninf): Use it here.
(yyis_table_ninf): Likewise.
(yyreportSyntaxError): Improve internal comments.
* data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
Use it everywhere possible.
(yyis_table_ninf): Likewise.
(yysyntax_error): Improve internal comments.
* data/lalr1.cc (yysyntax_error_): Likewise.
* data/lalr1.java (yysyntax_error): Likewise.
* src/tables.h: Improve comments about yypact, yytable, etc.
(cherry picked from commit 87412882128fc3ae807f47db23884552f5841e74)
Conflicts:
data/lalr1.java
data/yacc.c
|
|
|
|
|
|
| |
* src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
quote rather than implementing quoting here.
(cherry picked from commit e6c849d82a95be8a595c254cc3046cfae725f064)
|
|
|
|
|
|
|
|
|
|
| |
* src/output.c (ARRAY_CARDINALITY): New macro, copied from
argmatch.h.
(output_skeleton): Use it.
Suggested by Akim Demaille.
Signed-off-by: Eric Blake <ebb9@byu.net>
(cherry picked from commit 1266b636740f0c6719d8cc11a5d569084fa37009)
|
|
|
|
|
|
|
|
|
|
| |
* submodules/autoconf: Update to autoconf 2.64.
* configure.ac (M4_GNU_OPTION): New define.
* src/output.c (output_skeleton): Use it to resolve FIXME.
* NEWS: Mention this.
Signed-off-by: Eric Blake <ebb9@byu.net>
(cherry picked from commit b9ad39c1fb2482e1513cdf9800b31e71b7986b39)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Discussed starting at
<http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
* src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
For a \0 and similar escape sequences meaning the null
character, report an invalid escape sequence instead of an
invalid null character because the latter does not actually
appear in the user's input.
In all escape sequence complaints, don't escape the initial
backslash, and don't quote when the sequence appears at the end
of the complaint line unless there's whitespace that quotearg
won't escape.
Consistently say "invalid" not "unrecognized".
Consistently prefer "empty character literal" over "extra
characters in character literal" warning for invalid escape
sequences; that is, consistently discard those sequences.
* tests/input.at (Bad escapes in literals): New.
(cherry picked from commit c2724603c9d87e816dbdf1a9bfd7d70ffc1bd137)
|
|
|
|
|
| |
* doc/bison.texinfo: Fix minor Texinfo errors.
(cherry picked from commit 17aed602c6780058fe591e871c97f19d6a14d57a)
|
|
|
|
|
|
|
|
|
| |
Reported by Bill Allombert.
* doc/bison.texinfo: Set fill-column to 76.
(Location Type): Document the use of %initial-action to initialize
yylloc.
(cherry picked from commit d59e456dbf5d9747e2fe0c0539f2ec670ce6f9c4)
|
|
|
|
|
|
|
|
|
| |
* gnulib: Update.
* .x-update-copyright (COPYING): Add as it's no longer implied
when .x-update-copyright is present.
* cfg.mk (update-copyright-local): Remove, now ignored.
(update-copyright): Declare update-b4-copyright as a dependency.
(cherry picked from commit c67e466f9d4f63d360d82dc23b9bfffb4d846209)
|
|
|
|
|
|
|
|
|
| |
Suggested by Bruno Haible.
http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
* configure.ac: require gettext 0.17 to ensure compatibility with
gnulib.
(cherry picked from commit af6d23584362436f19baadc311987b65849ce024)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bison was uselessly requiring the formatstring macros from
gettext, which resulted in mo files not being installed on systems
that perfectly supported Bison mo files. Lower the requirement.
http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
* configure.ac: Require need-ngettext instead of
need-formatstring-macros.
Reported by Martin Jabocs.
Suggested by Bruno Haible.
* INSTALL: Restructure.
(Internationalization): New.
(cherry picked from commit b9e42bb439643b6b193ba44696c370bbb35d2ec0)
|
|
|
|
|
|
|
|
|
| |
* gnulib: Update.
* bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
as now recommended in gnulib/NEWS.
* build-aux/update-b4-copyright: Fix.
* cfg.mk (update-copyright-env): Configure update-copyright.
(cherry picked from commit 75ac158b82be1fab5157b140287368165a50ec82)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Continues Akim's work from his 2009-06-10 commits.
* src/reader.c (check_and_convert_grammar): Don't add any
symbols after the first symbols_do invocation.
* src/symtab.c (symbols_sorted): New static global.
(user_token_number_redeclaration): Update comments.
(symbol_from_uniqstr): If a new symbol is being created, assert
that symbols_sorted hasn't been allocated yet.
(symbols_free): Free symbols_sorted.
(symbols_cmp, symbols_cmp_qsort): New functions.
(symbols_do): Sort symbol_table into symbols_sorted on first
invocation.
* tests/input.at (Numbered tokens): Recombine tests now that the
output should be deterministic across multiple numbers.
(cherry picked from commit 83b60c97ee1f98bb1f15ffa38acdc4cc765515f5)
|
|
|
|
|
| |
* examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
(cherry picked from commit 67af719840616ed07ca120b8255a998f4533ce17)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/reader.c (reader): Move %define front-end variable
defaults and checking into...
(prepare_percent_define_front_end_variables): ... this new
function.
* src/scan-gram.l (INITIAL): For consistency with string
literals, don't store open quote on character literal. It's
discarded before returning anyway.
(SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
Make length test more readable, and make the character stored
for an empty literal more obvious while consistent with the
previous behavior.
* src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
USER_NUMBER_HAS_STRING_ALIAS throughout.
* src/symtab.c (symbol_make_alias): Remove comment from symtab.c
that is repeated in symtab.h. Improve argument names to make it
clear which side of the symbol-string alias pair is which.
(symbol_check_alias_consistency): Improve local variable names
for the same purpose.
* src/symtab.h (struct symbol): Make comments about aliases
clearer.
(symbol_make_alias): Improve comments and argument name.
* src/output.c (token_definitions_output): Update for rename to
USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
(cherry picked from commit dfaa48602d4e6d329e3ae9063f44929490928b3d)
Conflicts:
src/symtab.c
src/symtab.h
|
|
|
|
|
|
| |
* src/scan-code.l: New function 'show_sub_messages', more
factoring.
* tests/named-ref.at: Adjust tests.
|
| |
|
|
|
|
|
|
|
|
|
| |
* build-aux/update-b4-copyright: In warnings, report line
numbers rather than character positions.
* cfg.mk (update-copyright-local): Set to update-b4-copyright so
that update-copyright runs it.
* gnulib: Update.
(cherry picked from commit a1a9422d4a2f70ff89e06318ba154851c3700f60)
|
|
|
|
|
|
|
|
|
| |
* build-aux/update-b4-copyright: Do not accept 2-digit
UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
Don't accept a `[' in a b4_copyright argument.
Format code more consistently.
Don't assume b4*copyright never occurs.
(cherry picked from commit 0b61a8ec1842bfbd6130714d06b758165b32ead4)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile.am (update-b4-copyright): New target rule.
* build-aux/Makefile.am (EXTRA_DIST): Add update-b4-copyright.
* build-aux/update-b4-copyright: New.
* data/yacc.c: Remove stray characters around b4_copyright
invocations.
(cherry picked from commit 269e222e24b03ccc4ab7881d960750ddeb131b05)
Conflicts:
build-aux/local.mk
data/yacc.c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* .x-update-copyright: New.
* Makefile.am (EXTRA_DIST): Remove maint.mk.
* bootstrap.conf (gnulib_modules): Add maintainer-makefile and
update-copyright. Remove gnumakefile, which is implied by
maintainer-makefile.
* cfg.mk (bootstrap-tools): Copy from old maint.mk.
* gnulib: Update.
* maint.mk: Remove, now copied from gnulib.
* examples/extexi: Add missing "(C)" in copyright statement so
update-copyright can recognize it.
* src/LR0.h: Likewise.
* src/print.h: Likewise.
* src/print_graph.h: Likewise.
* src/named-ref.c: Likewise.
* src/named-ref.h: Likewise.
* src/gram.c: Add missing comma in copyright statement.
* src/gram.h: Likewise.
(cherry picked from commit 50bcb22c4cda30353f44930b0a29519609527408)
Conflicts:
gnulib
src/gram.c
|
|
|
|
|
|
| |
* examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
of just calc.stamp.
(cherry picked from commit cfc9e431c31f7f7291dd16a4a505d6a41e662d0c)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
and later.
* src/scan-code.l: Add "%option noinput", which I cannot find in
the Flex manual, but which Flex has supported since at least as
far back as 2.5.4. However, if any of our developers still use
Flex 2.5.4, they'll need to stop configuring with
--enable-gcc-warnings because "%option noinput" didn't work
correctly until Flex 2.5.6.
* src/scan-gram.l: Likewise.
* src/scan-skel.l: Likewise.
(cherry picked from commit 42f8609bbd033edf6cca102ca080eade94ed08ef)
|
| |
|
|
|
|
|
|
| |
* src/reader.c: Adjust variable names.
* src/scan-code.l: Fix prototypes and adjust names.
* src/named-ref.c: Remove redundant "if".
|
|
|
|
|
| |
* src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
variable.
|
|
|
|
|
|
|
| |
* src/named-ref.c: Add a pointer check (named_ref_free).
* src/scan-code.l: New function (variant_table_free). Called in
code_scanner_free.
* src/symlist.c: Call to named_ref_free (symbol_list_free).
|
|
|
|
|
|
|
|
| |
* NEWS (2.5): Document.
* src/scan-gram.l (INITIAL): Remove comment that we don't check
the length.
(SC_ESCAPED_CHARACTER): Warn if length is wrong.
* tests/input.at (Bad character literals): New test group.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Suggested by Eric Blake at
<http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
* tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
complicate the code by distinguishing between a missing value
and an empty string value for an optional argument. This fix is
allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
* tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
(AT_TEST_TABLES_AND_PARSE): ... this now that the special
arguments are not needed because of the following changes.
Fix stale comments.
Bison developers should use GNU M4 and should not use
POSIXLY_CORRECT when building the test suite, so do not
complicate the code by avoiding $10 and above.
Do not quote an empty string value for an optional argument, and
do not distinguish between a missing value and an empty string
value.
|