* data/glr.cc: Use b4_locations_if where appropriate.
* data/lalr1.cc: M4 quotation changes to highlight code duplication
with glr.cc.
* tests/calc.at: Check glr.cc with and without %location.
While at it, fuse multiple %parse-params into one.
* tests/actions.at: Simplify.
* NEWS: Doc this.
Some other wording changes.
* origin/maint: (29 commits)
regen
synclines: remove spurious empty line
also support $<foo>$ in the %initial-action
skeletons: b4_dollar_pushdef and popdef to simpify complex definitions
regen
printer/destructor: translate only once
factor the handling of m4 escaping
news: schedule the removal of the ";" hack
style changes in the scanners
regen
support $<tag>$ in printers and destructors
scan-code: factor the handling of the type in $<TYPE>$
muscles: fix another occurrence of unescaped type name
glr.cc: fix the handling of yydebug
gnulib: update
formatting changes
tests: fix an assertion
tests: adjust to GCC 4.8, which displays caret errors
be sure to properly escape type names
obstack_quote: escape and quote for M4
muscles: shuffle responsabilities
muscles: make private functions static
muscles: rename private functions/macros
obstack_escape: escape M4 characters
remove dead macro
maint: style changes
doc: avoid problems with case insensitive file systems
configure: fix botched quoting
news: fix typo.
scan-code.l is already passing argument to b4_dollar_dollar for the
initial acton, but its definition (of b4_dollar_dollar) does not use
this argument.
Generalize this definition, and use it for the %initial-action too.
* data/c.m4 (b4_dollar_dollar_, b4_dollar_pushdef, b4_dollar_popdef):
Instead of expecting a pointer, require a value, and use ".".
Since they are now generic enough, move to...
* data/c-like.m4: this new file.
* data/c.m4, data/java.m4: Load it.
* data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Use
b4_dollar_pushdef for the %initial-action.
* tests/actions.at: Check that.
* data/Makefile.am: Adjust.
* NEWS, doc/bison.texi: Document.
Currently "%printer {...} a b c d e f" translates the {...} six times.
Not only is this bad for time and space, it also issues six times the
same warnings.
* src/symlist.h, src/symlist.c (symbol_list_destructor_set)
(symbol_list_printer_set): Take the action as code_props instead of
const char *.
* src/parse-gram.y: Translate these actions here.
* src/scan-code.h: Comment change.
* tests/input.at: Check that warnings are issued only once.
The conversion from @ to @@ and so forth is coded is too many
different places. Factor, a bit.
* src/scan-code.l: Instead of duplicating the logic of obstack_escape,
use it.
It sure is less efficient, but the cost is negligible.
This allows to factor rules that are alike.
And to factor some start-condition clauses.
* tests/input.at (Stray $ or @): New.
* NEWS: Document it.
* src/scan-code.l, src/scan-skel.l: Use a more traditional indentation
style for start-conditions.
Prefer "continue" to a comment, for empty actions.
Strip useless {}.
Remove useless start-condition clauses.
* src/scan-code.l (SC_SYMBOL_ACTION): Accept $<tag>$, not just $$.
* data/c.m4 (b4_dollar_dollar_): New.
(b4_symbol_actions): Let b4_dollar_dollar use b4_dollar_dollar_.
* NEWS, doc/bison.texi: Document it.
* tests/actions.at: Check this for C and C++.
muscles: fix another occurrence of unescaped type name
* src/output.c (quoted_output): Split into...
(quoted_output, string_output): these.
Use the former when outputting a type_name.
* tests/input.at: Check this case.
* src/symtab.h: Comment changes.
* src/scan-code.l: Use obstack_quote when passing type_name to m4.
* tests/input.at (Code injection): New.
* NEWS: Document it.
Thanks to Paul Eggert for the wording.
* src/system.h (obstack_quote): New.
* src/muscle-tab.c: Use it instead of obstack_escape where applicable.
* src/scan-code.l: Since obstack_quote supports NULL, leave type_name
as NULL instead of defaulting to "".
* src/muscle-tab.c (MUSCLE_COMMON_DECODE, muscle_string_decode)
(muscle_location_decode): Not related to muscles, rename as...
(COMMON_DECODE, string_decode, location_decode): these.
* src/muscle-tab.h (MUSCLE_OBSTACK_SGROW): This is not related to
muscles, so move to, and rename as...
* src/system.h (obstack_escape): this.
Adjust dependencies.
doc: avoid problems with case insensitive file systems
makeinfo --html generates index.html, and the node "Index" will result
in Index.html. On case insensitive file systems, such as on Mac OS X
by default, this results in a single, invalid, file (Texinfo 4.13).
See http://lists.gnu.org/archive/html/bug-texinfo/2012-07/msg00032.html
* doc/bison.texi (Index): Rename as...
(Index of Terms): this.
* configure.ac: In the AC_SUBST call on 'VALGRIND_PREBISON'. Without
this change, when running ./configure, I see:
...
checking for valgrind... valgrind
./configure: line 35221: -q: command not found
checking for Java compiler... gcj -C -fsource=1.3 -ftarget=1.4
...
Currently they are treated in separated variables, contrary to other
<TYPE> code_props. This duplicates code (and messages for translators)
uselessly, as demonstrated by the fact that thanks to this patch, now
useless <*> and <> code_props are reported like the others.
* src/parse-gram.y (generic_symlist_item): Treat "<*>" and "<>" as regular
type tags.
* src/symlist.h, src/symlist.c (symbol_list_default_tagged_new)
(symbol_list_default_tagless_new,SYMLIST_DEFAULT_TAGGED)
(SYMLIST_DEFAULT_TAGLESS): Remove.
* src/symtab.h, src/symtab.c (default_tagged_code_props)
(default_tagless_code_props, default_tagged_code_props_set)
(default_tagless_code_props_set): Remove.
(symbol_code_props_get): Default to <*> or <>'s code_props.
* tests/actions.at: Complete expected errors: there are new warnings.
* tests/input.at: Likewise.
(Useless printers or destructors): Extend.
The logic to compute the %printer or %destructor to used (i.e., a
code_props) is implemented twice: one, of course, in
symbol_code_props_get, and another time in symbol_check_defined to
record the fact that a code_props is used (so that we can reported
unused ones). Let the former use the latter.
I would probably use "mutable" in C++ and keep these guys const,
but this is C. And casting away constness triggers warnings.
* src/scan-code.h, src/scan-code.l (code_props_none): Is not const.
* src/symtab.h, src/symtab.c (symbol_code_props_get): The symbol
is not const.
(symbol_check_defined): Use it.
Because I'm using a VPATH build with an absolute srcdir, I have
GRAM__USERS_AKIM_SRC_GNU_BISON_SRC_PARSE_GRAM_H. Before, I was using
a relative srcdir, and had GRAM_______SRC_PARSE_GRAM_H (coming from
../../). Let it be GRAM_SRC_PARSE_GRAM_H.
* tests/bison.in: Do not depend on the value of $top_srcdir for
Bison itself.
If we were to use relative paths from .c to .y, we would not have
this problem.
* data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java, data/yacc.c:
Since the previous commit, b4_tokens_define and the like no longer need
b4_tokens.
* src/output.c (token_definitions_output): Remove.
output: use the token list to define the yytokentype
There are currently two systems used to pass information about tokens to
m4: the original one, and another, which is used for instance for
printers and destructors, variants etc. Move to using only the latter.
* data/bison.m4 (b4_symbol_map, b4_token_visible_if)
(b4_token_has_definition, b4_any_token_visible_if, b4_token_format): New.
* data/c++.m4, data/c.m4, data/glr.c, data/java.m4: Adjust to use them.
* origin/maint:
maint: update gnu-web-doc-update.
maint: post-release administrivia
version 2.6
maint: prepare for release 2.6
maint: post-release administrivia
version 2.5.91
maint: prepare NEWS.
maint: fix spaces.
tests: adjust to case where the C compiler is actually a C++ compiler
tests: fix dependencies
doc: fix Texinfo command
maint: Valgrind on OS X.
tests: be sure that backups are safe.
maint: dead comment.
tests: refactor for legibility.
tests: refactor the bison invocations.
maint: fix syntax-check ignore patterns.
gnulib: update
gnulib: update.
gnulib: update
* configure.ac (VALGRIND_PREBISON): New.
* tests/Makefile.am (maintainer-check-valgrind): Use it.
* etc/darwin11.4.0.supp: New.
* configure.ac, etc/Makefile.am: Use it.
* configure.ac: Disable Valgrind on Mac OS X.
* README-hacking: Explain why.
list.yy: In function 'yy::parser::symbol_type yylex()':
list.yy:107:29: error: typedef 'token' locally defined but not used
[-Werror=unused-local-typedefs]
typedef yy::parser::token token;
^
* origin/maint:
tests: headers.at: strengthen.
glr.cc: do not override C++ definitions by C macros.
YYLLOC_DEFAULT: factor, and don't export it in headers.
api.prefix: do not use #define to handle YYSTYPE_IS_TRIVIAL etc.
tests: portability fixes.
c++: fewer #includes in the headers.
glr.cc: formatting changes.
tests: more logs.
api.prefix: also rename YYDEBUG.
YYLLOC_DEFAULT: factor, and don't export it in headers.
* data/c++.m4, data/c.m4 (b4_yylloc_default_define): New.
* data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c: Use it.
* data/glr.cc: Do not define YYLLOC_DEFAULT in the header file,
but in the implementation one.
since, of course YYSTYPE_IS_TRIVIAL is defined. Instead we could
define YYSTYPE_IS_TRIVIAL as PREFIX_STYPE_IS_TRIVIAL only when the
later is defined, but let's avoid stacking CPP on top of M4: rather, use
* data/glr.c, data/yacc.c: Use YYSTYPE_IS_TRIVIAL, YYSTYPE_IS_DECLARED,
YYLTYPE_IS_TRIVIAL and YYLTYPE_IS_DECLARED under their api.prefix-renamed
name.