| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
* tests/calc.at: here.
* doc/bison.texi: Avoid uninitialized variables.
|
|
|
|
|
|
|
| |
Reported by Frank Heckenbach.
http://lists.gnu.org/archive/html/bug-bison/2019-02/msg00006.html
* doc/bison.texi (Complete Symbols): Here.
|
|
|
|
|
|
|
|
|
|
| |
Reported by Bruno Haible.
http://lists.gnu.org/archive/html/bug-bison/2019-05/msg00024.html
Fixed by Karl Berry.
http://lists.gnu.org/archive/html/bug-bison/2019-05/msg00034.html
* doc/bison.texi: Don't specify the langage, rely on the default.
Avoid blank pages.
|
|
|
|
|
|
|
| |
Reported by Frank Heckenbach.
http://lists.gnu.org/archive/html/bug-bison/2019-05/msg00020.html
* data/skeletons/lalr1.cc, doc/bison.texi: here.
|
|
|
|
|
|
|
| |
Reported by Hans Åberg.
http://lists.gnu.org/archive/html/bug-bison/2019-05/msg00017.html
* data/skeletons/lalr1.cc, doc/bison.texi: here.
|
|
|
|
|
|
|
|
|
|
|
| |
Reported by Uxio Prego.
http://lists.gnu.org/archive/html/bug-bison/2018-12/msg00029.html
* src/scan-gram.l, src/parse-gram.y (PERCENT_PURE_PARSER)
(handle_pure_parser): New.
Issue a deprecation/update notice for %pure-parser.
* doc/bison.texi (Java Bison Interface): Don't mention %pure-parser.
* tests/actions.at, tests/input.at: Adjust.
|
|
|
|
|
|
|
|
|
| |
Thanks to Gavin Smith and Patrice Dumas.
http://lists.gnu.org/archive/html/help-texinfo/2019-04/msg00015.html
* doc/bison.texi (@colorWarning, @colorError, @colorNotice)
(@colorOff): Define for TeX and HTML.
(@dwarning, @derror, @dnotice): Use them.
|
|
|
|
| |
* doc/bison.texi, doc/local.mk: here.
|
|
|
|
|
|
| |
* doc/bison.texi (dwarning, derror, dnotice): New.
Use them in the diagnostics.
* doc/local.mk (AM_MAKEINFOFLAGS): Pass customization variables.
|
|
|
|
| |
* NEWS, doc/bison.texi: here.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reported by Balázs Scheidler.
* data/skeletons/c.m4 (b4_location_type_define): Use api.location.type
if defined.
* doc/bison.texi: Document it.
* tests/local.at (AT_C_IF, AT_LANG_CASE): New.
Support Span in C.
* tests/calc.at (Span): Convert it to be usable in C and C++.
Check api.location.type with yacc.c and glr.c.
|
|
|
|
|
|
| |
* doc/bison.texiL Adjust output.
Also, Graphviz has no uppercsae V.
* NEWS: Explain the format change.
|
|
|
|
| |
* doc/bison.texi, src/getargs.c: here.
|
|
|
|
|
|
| |
* doc/bison.texi: Use consistently $ and @kbd in shell examples.
Prefer sticking to English words: output and file instead of outfile
and infile.
|
|
|
|
|
|
|
|
|
|
|
| |
Reported by Hans Åberg.
https://lists.gnu.org/archive/html/help-bison/2019-02/msg00064.html
* src/files.c (spec_graph_file): Use `*.gv` when 3.4 or better,
otherwise `*.dot`.
* src/parse-gram.y (handle_require): Pretend we are already 3.4.
* doc/bison.texi: Adjust.
* tests/local.at, tests/output.at: Exercise this.
|
|
|
|
|
|
|
|
|
| |
Currently, we have errors:
./doc/bison.texi:13005: node `History' lacks menu item for `Yacc' despite being its Up target
* doc/bison.texi (History): Add the local menu.
While at it, add a few index entries.
|
|
|
|
|
|
|
| |
* doc/bison.texi (Bibliography): Add [Corbett 1984] and [Johnson
1978].
(History): Use them.
And other minor changes.
|
|
|
|
| |
* bison.texi (A Brief History of the Greater Ungulates): New section.
|
|
|
|
|
|
|
| |
Regression introduced in 05a80977798abf472bfc11c477751303ad604733.
* doc/local.mk (bison.help): Don't depend on the path of the bison
executable.
|
|
|
|
|
|
| |
* doc/local.mk: Don't run src/bison, as it expects to find all its
files installed. Instead, run tests/bison which is ready to run in
builddir.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I don't think this style:
/* If buffer is full, make it bigger. */
if (i == length)
{
length *= 2;
symbuf = (char *) realloc (symbuf, length + 1);
}
/* Add this character to the buffer. */
symbuf[i++] = c;
/* Get another character. */
c = getchar ();
or more readable than
/* If buffer is full, make it bigger. */
if (i == length)
{
length *= 2;
symbuf = (char *) realloc (symbuf, length + 1);
}
/* Add this character to the buffer. */
symbuf[i++] = c;
/* Get another character. */
c = getchar ();
Actually, I think the latter is more readable, and helps with width
issues in the PDF. As a matter of fact, I would happily move to //
only for single line comments.
* doc/bison.texi: A single space before closing comments.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/bison.texi: Prefer 'fun' to 'fnct'.
Reduce local variable scopes.
Prefer strdup to malloc + strcpy.
Avoid gratuitous casts.
Use simpler names (e.g., 'name' instead of 'fname').
Avoid uses of 0 for NULL.
Avoid using NULL when possible (e.g., 'p' instead of 'p != NULL').
Prefer union names to casts (e.g. 'yylval.VAR = s' instead of
'*((symrec**) &yylval) = s').
Give arguments a name in fun declarations.
Use our typedefs instead of duplicating them (func_t).
Stop promoting an explicit $$ = $1;, it should be implicit (Bison
might be able to eliminate useless chain rules).
Help a bit Texinfo by making smaller groups.
Rely on the C compiler to call function pointers (prefer
'$1->value.fun ($3)' to (*($1->value.fnctptr))($3)').
|
|
|
|
|
|
|
|
|
|
| |
When debugging Bison itself, this is very handy, especially when
tweaking the frontend badly enough to break the backends. It can also
be used to check a grammar.
* src/getargs.h, src/getargs.c (feature_syntax_only): New.
(feature_args, feature_types): Adjust.
* src/main.c (main): Use it.
|
|
|
|
|
|
|
|
|
| |
Reported by Kiyoshi Kanazawa.
http://lists.gnu.org/archive/html/bug-bison/2019-01/msg00029.html
* src/getargs.c (getargs): Let --yacc imply -Wyacc, not -Werror=yacc.
* tests/input.at: Adjust.
* doc/bison.tex (Bison Options): Document.
|
|
|
|
|
|
|
|
|
|
|
| |
It is inconvenient that we also generate the output files when we
update the grammar file, and it's somewhat unexpected. Let's not do
that.
* src/main.c (main): Skip generation when --update is passed.
* src/getargs.c (usage): Update the help message.
* doc/bison.texi (Bison Options): Likewise.
* tests/input.at: Check that we don't generate the output.
|
|
|
|
| |
* doc/bison.texi (Bison Options): here.
|
|
|
|
|
|
| |
* doc/bison.texi: Use @kbd where appropriate.
Update ^~~~ marks for caret-errors.
* build-aux/cross-options.pl: Do not add quotes to %define's argument.
|
|
|
|
|
|
|
|
|
|
|
| |
Reported by Derek Clegg.
http://lists.gnu.org/archive/html/bug-bison/2019-01/msg00004.html
* configure.ac (warn_common): Add -Wimplicit-fallthrough.
This does trigger failures in the test suite.
* data/skeletons/glr.c, data/skeletons/lalr1.cc,
* data/skeletons/yacc.c, tests/c++.at:
Make fall-throws explicit.
|
|
|
|
| |
* doc/bison.texi: Use @option, not @code, for options.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See 890ee8a1fd288b3cc1c21c49ea0ece696ef40565 and
https://lists.gnu.org/archive/html/bison-patches/2019-01/msg00024.html.
* data/skeletons/d.m4, data/skeletons/java.m4
(abstract, annotations, extends, final, implements, public, strictfp):
Rename as...
(api.parser.abstract, api.parser.annotations, api.parser.extends)
(api.parser.final, api.parser.implements, api.parser.public)
(api.parser.strictfp):
these.
* src/muscle-tab.c (muscle_percent_variable_update): Ensure backward
compatibility.
* doc/bison.texi, examples/d/calc.y, examples/java/Calc.y,
tests/input.at: Adjust.
|
|
|
|
|
|
|
|
|
|
|
| |
* src/scan-gram.l (%name-prefix): Issue a deprecation warning.
* tests/calc.at, tests/headers.at, tests/input.at, tests/java.at,
* tests/javapush.at, tests/local.at: Adjust expectations.
Or disable -Wdeprecated.
* doc/bison.texi: Document that %name-prefix is replaced by %define
api.prefix.
|
|
|
|
| |
* doc/bison.texi: here.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous name was historical and inconsistent.
* src/muscle-tab.c (define_directive): Use the proper value passing
syntax, based on the muscle kind.
(muscle_percent_variable_update): Use the right value passing syntax.
Migrate from parser_class_name to api.parser.class.
* data/skeletons: Migrate from parser_class_name to api.parser.class.
* doc/bison.texi (%define Summary): Document both parser_class_name
and api.parser.class.
Promote the latter over the former.
|
|
|
|
| |
* doc/bison.texi: here.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Suggested by David Barto
https://lists.gnu.org/archive/html/help-bison/2015-02/msg00004.html
and Victor Zverovich.
https://lists.gnu.org/archive/html/bison-patches/2018-10/msg00121.html
This is very easy to do, thanks to work by Bruno Haible in gnulib.
See "Supporting Relocation" in gnulib's documentation.
* bootstrap.conf: We need relocatable-prog and relocatable-script (for yacc).
* src/yacc.in: New.
* configure.ac, src/local.mk: Instantiate it.
* src/main.c, src/output.c (main, pkgdatadir): Use relocatable2.
* doc/bison.texi (FAQ): Document it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of introducing make_symbol (whose name, btw, somewhat
infringes on the user's "name space", if she defines a token named
"symbol"), let's make the construction of symbol_type safer, using
assertions.
For instance with:
%token ':' <std::string> ID <int> INT;
generate:
symbol_type (int token, const std::string&);
symbol_type (int token, const int&);
symbol_type (int token);
It does mean that now named token constructors (make_ID, make_INT,
etc.) go through a useless assert, but I think we can ignore this: I
assume any decent compiler will inline the symbol_type ctor inside the
make_TOKEN functions, which will show that the assert is trivially
verified, hence I expect no code will be emitted for it. And anyway,
that's an assert, NDEBUG controls it.
* data/c++.m4 (symbol_type): Turn into a subclass of
basic_symbol<by_type>.
Declare symbol constructors when variants are enabled.
* data/variant.hh (_b4_type_constructor_declare)
(_b4_type_constructor_define): Replace with...
(_b4_symbol_constructor_declare, _b4_symbol_constructor_def): these.
Generate symbol_type constructors.
* doc/bison.texi (Complete Symbols): Document.
* tests/types.at: Check.
|
|
|
|
| |
* doc/bison.texi (Symbol Decls): New.
|
|
|
|
|
|
|
|
| |
I personally prefer 'non terminal', or 'non-terminal', but
'nonterminal' is the common spelling.
* data/glr.c, src/parse-gram.y, src/symtab.c, src/symtab.h,
* tests/input.at, doc/refcard.tex: here.
|
|
|
|
|
|
|
|
|
| |
Suggested by Askar Safin.
http://lists.gnu.org/archive/html/bug-bison/2018-12/msg00006.html
* data/variant.hh: Implement.
* tests/types.at: Check.
* doc/bison.texi: Document.
|
|
|
|
| |
* doc/bison.texi: here.
|
|
|
|
| |
* doc/bison.texi: Here.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change allows one to document (and check) which rules participate
in shift/reduce and reduce/reduce conflicts. This is particularly
important GLR parsers, where conflicts are a normal occurrence. For
example,
%glr-parser
%expect 1
%%
...
argument_list:
arguments %expect 1
| arguments ','
| %empty
;
arguments:
expression
| argument_list ',' expression
;
...
Looking at the output from -v, one can see that the shift-reduce
conflict here is due to the fact that the parser does not know whether
to reduce arguments to argument_list until it sees the token AFTER the
following ','. By marking the rule with %expect 1 (because there is a
conflict in one state), we document the source of the 1 overall shift-
reduce conflict.
In GLR parsers, we can use %expect-rr in a rule for reduce/reduce
conflicts. In this case, we mark each of the conflicting rules. For
example,
%glr-parser
%expect-rr 1
%%
stmt:
target_list '=' expr ';'
| expr_list ';'
;
target_list:
target
| target ',' target_list
;
target:
ID %expect-rr 1
;
expr_list:
expr
| expr ',' expr_list
;
expr:
ID %expect-rr 1
| ...
;
In a statement such as
x, y = 3, 4;
the parser must reduce x to a target or an expr, but does not know
which until it sees the '='. So we notate the two possible reductions
to indicate that each conflicts in one rule.
See https://lists.gnu.org/archive/html/bison-patches/2013-02/msg00105.html.
* doc/bison.texi (Suppressing Conflict Warnings): Document %expect,
%expect-rr in grammar rules.
* src/conflicts.c (count_state_rr_conflicts): Adjust comment.
(rule_has_state_sr_conflicts): New static function.
(count_rule_sr_conflicts): New static function.
(rule_nast_state_rr_conflicts): New static function.
(count_rule_rr_conflicts): New static function.
(rule_conflicts_print): New static function.
(conflicts_print): Also use rule_conflicts_print to report on individual
rules.
* src/gram.h (struct rule): Add new fields expected_sr_conflicts,
expected_rr_conflicts.
* src/reader.c (grammar_midrule_action): Transfer expected_sr_conflicts,
expected_rr_conflicts to new rule, and turn off in current_rule.
(grammar_current_rule_expect_sr): New function.
(grammar_current_rule_expect_rr): New function.
(packgram): Transfer expected_sr_conflicts, expected_rr_conflicts
to new rule.
* src/reader.h (grammar_current_rule_expect_sr): New function.
(grammar_current_rule_expect_rr): New function.
* src/symlist.c (symbol_list_sym_new): Initialize expected_sr_conflicts,
expected_rr_conflicts.
* src/symlist.h (struct symbol_list): Add new fields expected_sr_conflicts,
expected_rr_conflicts.
* tests/conflicts.at: Add tests "%expect in grammar rule not enough",
"%expect in grammar rule right.", "%expect in grammar rule too much."
|
|
|
|
| |
* doc/bison.texi (Calc++ Scanner): Remove fix for Flex 2.5.31-2.5.33.
|
|
|
|
| |
* doc/bison.texi (Calc++ Scanner): Ignore \r.
|
|
|
|
|
| |
* doc/local.mk: Consistently use *.tmp for temporary files.
Fix comments.
|
|
|
|
|
|
|
|
| |
It is not supported by previous versions.
See https://www.gnu.org/software/gcc/gcc-4.7/changes.html
Reported by Nelson H. F. Beebe.
* doc/bison.texi (Calc++ Scanner): here.
|
|
|
|
|
| |
strerror is defined by <string.h>, and recent versions of GNU libstdc++
no longer include this automatically from <string>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The "Report translation bugs to..." part of --help is issued only on
glibc systems. So if the tarball is not wrapped on such a system, and
used on such a system (or the converse), then bison.help will differ
on the user's system, and help2man will be called to update bison.1.
But help2man should not be a requirement.
Reported by Alexandre Duret-Lutz.
* doc/local.mk (doc/bison.help): Remove the possible doc about
translation bugs.
Pass LC_ALL=C, as reported in src/getargs.c's usage().
(doc/cross-options.texi): Use bison.help instead of calling bison
--help.
|
|
|
|
|
|
|
| |
The extracted example, simple.yy, does not use %require "3.2", so it
generates a stack.hh, which breaks distcheck.
* doc/bison.texi: Fix it.
|