Commit Graph

4671 Commits

Author SHA1 Message Date
Akim Demaille
d507251c81 space changes.
* data/bison.m4 (b4_symbol_action): Remove spurious eol in the output.
2012-07-22 21:17:06 +02:00
Akim Demaille
585a791ef0 parser: fix %printer usage.
* src/parse-gram.y: Instead of stderr, using yyo.
2012-07-22 21:17:06 +02:00
Akim Demaille
4919604766 parser: factor the handling of code_props
* src/parse-gram.y: Now that %printer and %destructor are treated
equally, let...
(code_props_type): handle them.
2012-07-22 21:16:56 +02:00
Akim Demaille
a82cbb63b6 parser: factor handling of type tags
* src/parse-gram.y: Now that <*> and <> are processed like regular
tags, let...
(tag): handle them.
2012-07-22 21:16:36 +02:00
Akim Demaille
e501ea04e7 regen. 2012-07-22 20:19:51 +02:00
Akim Demaille
9534d2be80 simplify the handling of <> and <*>'s code_props.
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.
2012-07-22 20:19:51 +02:00
Akim Demaille
70946cff5e allow modification on retrieved code_props.
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.
2012-07-22 20:19:51 +02:00
Akim Demaille
a943967010 maint: regen. 2012-07-22 20:19:51 +02:00
Akim Demaille
afa4ec917b maint: fix bison's own header guards.
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.
2012-07-22 20:19:51 +02:00
Akim Demaille
c5289832f2 maint: add missing const.
* src/symtab.h, src/symtab.c (symbol_print): here.
2012-07-22 20:19:51 +02:00
Akim Demaille
0560fa24d6 style changes.
* src/parse-gram.y, src/symtab.c: Space changes.
* src/symtab.h: Comment changes.
2012-07-22 20:19:41 +02:00
Akim Demaille
4c0f554348 autoconf: update.
* submodules/autoconf: here.
No significant changes for our use of m4sugar.m4.
2012-07-22 17:01:15 +02:00
Akim Demaille
6687da3425 output: no longer use b4_tokens.
* 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.
2012-07-22 17:01:15 +02:00
Akim Demaille
e3990e3c99 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.
2012-07-22 17:01:15 +02:00
Akim Demaille
b611359d90 tests: fix VPATH issue
* examples/test: With an absolute VPATH build, "../" is incorrect.
2012-07-20 18:23:44 +02:00
Akim Demaille
3eb4f1a3e6 Merge remote-tracking branch 'origin/maint'
* 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

Conflicts:
	build-aux/Makefile.am
	cfg.mk
	tests/Makefile.am
2012-07-19 17:39:13 +02:00
Akim Demaille
d0d3313d10 maint: update gnu-web-doc-update.
* gnulib: here.
2012-07-19 16:24:33 +02:00
Akim Demaille
a4107f24bc maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2012-07-19 15:38:29 +02:00
Akim Demaille
1505e8bb78 version 2.6
* NEWS: Record release date.
v2.6
2012-07-19 15:24:23 +02:00
Akim Demaille
58c7e5ee2c maint: prepare for release 2.6
* NEWS: here.
2012-07-19 15:21:32 +02:00
Akim Demaille
ad6b775fc5 maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2012-07-18 18:33:25 +02:00
Akim Demaille
5d614dfa8c version 2.5.91
* NEWS: Record release date.
2012-07-18 18:19:32 +02:00
Akim Demaille
858c700fc0 maint: prepare NEWS. 2012-07-18 18:19:12 +02:00
Akim Demaille
c30717cafa maint: fix spaces.
* build-aux/Makefile.am: here.
2012-07-18 17:56:30 +02:00
Akim Demaille
0e98a81e00 tests: adjust to case where the C compiler is actually a C++ compiler
* tests/atlocal.in (CC_IS_CXX): New.
* tests/headers.at (Several parsers): Use it.
2012-07-18 09:17:31 +02:00
Akim Demaille
d5c20d1a36 tests: fix dependencies
* tests/Makefile.am: we need atconfig and atlocal to be up to date
when calling testsuite.
2012-07-18 09:17:31 +02:00
Akim Demaille
e6ae99fe75 doc: fix Texinfo command
* doc/bison.texi: In parens, use @pxref.
2012-07-18 09:17:31 +02:00
Akim Demaille
bcbbf65486 maint: Valgrind on OS X.
* 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.
2012-07-18 09:17:15 +02:00
Akim Demaille
1aa9fa823b tests: be sure that backups are safe.
* tests/local.at (at_save_special_files): here.
2012-07-17 14:47:35 +02:00
Akim Demaille
321b8117a6 maint: dead comment.
* etc/README: here.
2012-07-17 14:47:35 +02:00
Akim Demaille
e4828e2384 tests: refactor for legibility.
* tests/local.at (AT_BISON_CHECK_WARNINGS, AT_BISON_CHECK_WARNINGS_):
New.
2012-07-17 14:47:34 +02:00
Akim Demaille
a122efad8a tests: refactor the bison invocations.
* tests/local.at (m4_null_if, AT_BISON_CHECK_): New.
2012-07-17 14:47:34 +02:00
Akim Demaille
15ffba51b0 maint: fix syntax-check ignore patterns.
* cfg.mk: here.
2012-07-17 12:14:55 +02:00
Akim Demaille
ea6a2d96db gnulib: update 2012-07-17 09:49:57 +02:00
Akim Demaille
ae63f0e8e2 gnulib: update.
* gnulib: Update so that gitlog-to-changelog support --srcdir.
* Makefile.am: Use it.
2012-07-16 20:40:18 +02:00
Akim Demaille
41c11ce484 gnulib: update
* bootstrap, build-aux/.gitignore, gnulib, m4/.gitignore: update.
2012-07-10 16:07:32 +02:00
Akim Demaille
9553083c72 maint: minor fixes
* NEWS: restore missing entry.
* cfg.mk: Adjust to *.texinfo -> *.texi.
* src/symtab.c: Spaces fixes.
2012-07-06 11:16:08 +02:00
Akim Demaille
8f064948c5 tests: address g++-4.8 warnings.
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;
                             ^

* tests/c++.at (AT_CHECK_VARIANTS): here.
2012-07-06 11:11:28 +02:00
Akim Demaille
60aa04a236 Merge remote-tracking branch 'origin/maint'
* origin/maint:
  maint: update release instructions
  maint: post-release administrivia
  version 2.5.90
  build: fix gen-ChangeLog call.
  gnulib: update.
  tests: fix SKIP_IF for Java.
  api.prefix: incompatible with %name-prefix.
  api.prefix: strengthen the tests and fix push-parsers.
  skeletons: style changes.
  NEWS: minor changes.
  api.prefix: improve the documentation for YYDEBUG.
  gnulib: update.

Conflicts:
	NEWS
	cfg.mk
	data/bison.m4
	doc/bison.texi
	m4/.gitignore
	tests/calc.at
	tests/headers.at
2012-07-06 11:00:57 +02:00
Akim Demaille
a59a6ddef4 maint: update release instructions
* README-hacking: here.
2012-07-06 10:21:39 +02:00
Akim Demaille
aca4ddc75d maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2012-07-05 16:29:06 +02:00
Akim Demaille
47977a7e74 version 2.5.90
* NEWS: Record release date.
2012-07-05 16:20:44 +02:00
Akim Demaille
813f7d3482 build: fix gen-ChangeLog call.
* Makefile.am: Be sure to catch errors, and fix option name
2012-07-05 16:16:10 +02:00
Akim Demaille
7a9e6d65ea gnulib: update.
* gnulib/build-aux/do-release-commit-and-tag: Fix.
2012-07-05 15:24:34 +02:00
Akim Demaille
916f26b65a tests: fix SKIP_IF for Java.
* tests/local.at (AT_JAVA_COMPILE): here.
2012-07-05 14:27:09 +02:00
Akim Demaille
32ae07efde api.prefix: incompatible with %name-prefix.
* data/bison.m4: Make it incompatible.
* tests/input.at: Check that it is.
2012-07-05 12:41:16 +02:00
Akim Demaille
ad60e80f3d api.prefix: strengthen the tests and fix push-parsers.
* tests/calc.at: Check api.prefix in addition to %name-prefix.
* tests/headers.at: Check push parsers and pure interface.
* tests/local.at: Use YYLTYPE renamed.
* data/yacc.c (b4_declare_yyparse_push_): Handle api.prefix.
* doc/bison.texi: Style changes.
2012-07-05 12:41:15 +02:00
Akim Demaille
2a824fae30 skeletons: style changes.
* data/bison.m4: Define default values after having defined
the support macros.
Kill a dead comment.
2012-07-05 12:41:09 +02:00
Akim Demaille
c242519127 NEWS: minor changes.
* NEWS: style changes.
2012-07-05 12:41:09 +02:00
Akim Demaille
e358222ba8 api.prefix: improve the documentation for YYDEBUG.
* doc/bison.texi: Explain how api.prefix is applied to YYDEBUG.
2012-07-05 12:41:08 +02:00