Commit Graph

27 Commits

Author SHA1 Message Date
Akim Demaille
afc4457605 build: use Automake 1.14's non-recursive Makefile features
* configure.ac: Require Automake 1.14.
* examples/calc++/local.mk, examples/local.mk, examples/mfcalc/local.mk,
* examples/rpcalc/local.mk, tests/local.mk: Use %D% and %C%.
2013-11-05 14:32:20 +01:00
Akim Demaille
60dcc936ce build: restore maintainer-push-check
* tests/local.mk: here.
2013-11-05 14:15:15 +01:00
Dennis Heimbigner
aa94def12d java: add push-parser support
* data/lalr1.java: Capture the declarations as m4 macros to avoid
duplication.  When push parsing, the declarations occur at the class
instance level rather than within the parse() function.

Change the way that the parser state is initialized.  For
push-parsing, the parse state declarations are moved to
"push_parse_initialize()", which is called on the first invocation of
"push_parse()". The %initial-action code is also inserted after the
invocation of "push_parse_initialize()".

The body of the parse loop is modified to return values at appropriate
points when doing push parsing.  In order to make push parsing work,
it is necessary to divide YYNEWSTATE into two states: YYNEWSTATE and
YYGETTOKEN. On the first call to push_parse(), the state is
YYNEWSTATE. On all later entries, the state is set to YYGETTOKEN. The
YYNEWSTATE switch arm falls through into YYGETTOKEN. YYGETTOKEN
indicates that a new token is potentially needed.  Normally, with a
pull parser, this new token would be obtained by calling "yylex()". In
the push parser, the value YYMORE is returned to the caller. On the
next call to push_parse(), the parser will return to the YYGETTOKEN
state and continue operation.

* tests/javapush.at: New test file for java push parsing.
* tests/testsuite.at: Use it.
* tests/local.mk: Adjust.
* doc/bison.texi (Java Push Parser Interface): New.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
2013-06-13 10:38:14 +02:00
Akim Demaille
6574576cfb api.value.type: implement proper support, check, and document
* data/c.m4 (b4_symbol_type_register, b4_type_define_tag)
(b4_symbol_value_union, b4_value_type_setup_union)
(b4_value_type_setup_variant, b4_value_type_setup):
New.
(b4_value_type_define): Use it to set up properly the type.
Handle the various possible values of api.value.type.
* data/c++.m4 (b4_value_type_declare): Likewise.
* data/lalr1.cc (b4_value_type_setup_variant): Redefine.

* tests/types.at: New.
Exercise all the C/C++ skeletons with different types of
api.value.type values.
* tests/local.mk, tests/testsuite.at: Use it.

* doc/bison.texi (%define Summary): Document api.value.type.
* NEWS: Advertise it, together with api.token.constructor.
2013-04-09 14:07:51 +02:00
Akim Demaille
bb1c50d88b maint: fix syntax-check issues
* cfg.mk: Ignore strcmp in local.at.
* tests/conflicts.at: Use AT_PARSER_CHECK.
* tests/regression.at: Preserve the exit status of the generated parsers.

* tests/local.mk ($(TESTSUITE)): Map @tb@ to a tabulation.
* tests/c++.at, tests/input.at, tests/regression.at: Use @tb@.
* cfg.mk: (space-tab): There are no longer exceptions.
2013-01-28 17:46:13 +01:00
Akim Demaille
7d6bad1959 maint: update copyright years
Suggested by Stefano Lattarini.
Run "make update-copyright".
2013-01-12 16:14:16 +01: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
da83f83821 build: don't rely on $< in non-pattern rules.
* doc/local.mk, tests/local.mk: here.
Reported by Stefano Lattarini.
2012-04-01 15:09:09 +02:00
Akim Demaille
24d84dd26c tests: style changes in the Makefile.
* tests/local.mk: Prefer passing variable assignment by
the command line, instead of the environment, so that it
is reported in the logs.
Prefer single quotes for shell literal strings.
2012-03-24 14:26:24 +01:00
Akim Demaille
ac3f2e33b4 tests: when using the C++ compiler, use its flags too.
* tests/local.at: Go for colors.
(--compile-c-with-cxx): New option.
We used to pass "CC=$CXX" as command line argument,
but it was not possible to adjust CFLAGS accordingly
in atlocal, since it is loaded before assignments on
the command line are honored (so that the command line
takes precedence).
* tests/atlocal.in: Implement it.
* tests/local.mk: Use it.
2012-03-24 14:19:38 +01:00
Akim Demaille
ff9684b720 tests: fix dependencies.
* tests/local.mk (check_SCRIPTS): Add atlocal and atconfig so
that they are properly updated before running tests.
(RUN_TESTSUITE_deps): New.
Use it to factor the dependencies of "*-check" targets,
especially those that don't bounce to the regular
"check-local" target, since then they don't benefit from the
proper dependencies (such as atlocal).
2012-03-24 14:19:38 +01:00
Akim Demaille
2a55930762 build: comment changes.
* Makefile.am, examples/calc++/local.mk, examples/local.mk,
	* examples/mfcalc/local.mk, examples/rpcalc/local.mk,
	* lib/local.mk, src/local.mk, tests/local.mk:
	Make the copyright licenses more uniform.
2012-02-24 14:01:13 +01:00
Akim Demaille
360ae94ebc maint: de-recurse the handling of examples
The directory was still using a local Makefile.am because it provides
"scoped" Make variables: these examples are not meant to use the same
CPPFLAGS etc.  If we were to use the same -I set, we'd pick up
gnulib's stdio.h for instance, which we do not want for these simple
examples.

Yet, as a result, the dependencies are less accurate, there is code
duplication, etc.  This is especially perceptible when trying to
extract more examples from the documentation, as will be done in
forthcoming changes.

In order to make the tuning of CPPFLAGS easier, discard the predefined
-I from Automake.

	* examples/calc++/Makefile.am: Rename as...
	* examples/calc++/local.mk: this.
	Adjust the paths which are now rooted in top_srcdir/top_builddir.
	Handle BISON_CXX_WORKS here, instead of the too crude previous
	approach that completely discarded the whole directory.
	($(BISON)): Remove now useless bouncing recipe.
	(calc___CPPFLAGS): New.
	Stay away from -Ilib.
	* Makefile.am, configure.ac, examples/local.mk,
	* examples/calc++/test: Adjust.

	* configure.ac: Pass nostdinc to Automake.
	* src/local.mk, lib/local.mk (AM_CPPFLAGS): Move to...
	* Makefile.am: here.

	* src/local.mk, examples/calc++/Makefile.am (BISON, BISON_IN): Factor
	to...
	* Makefile.am: here.
	* tests/local.mk: Use it.
2012-02-14 21:00:59 +01:00
Akim Demaille
9bfbf75bdf maint: more silent rules.
* tests/local.mk (TESTSUITE_AT): Include plackage.m4.
	Adjust dependencies.
	Make testsuite.at its first argument.
	(package.m4): Be silent.
	(testsuite): Be silent.
	Use $<.
2012-02-10 09:17:45 +01:00
Jim Meyering
34136e65fc maint: run "make update-copyright". 2012-01-13 10:09:44 +01:00
Joel E. Denny
e969014232 global: remove unnecessary horizontal tabs.
This change was made by applying emacs' untabify function to
nearly all files in Bison's repository.  Required tabs in make
files, ChangeLog, regexps, and test code were manually skipped.
Other notable exceptions and changes are listed below.
* bootstrap: Skip because we sync this with gnulib.
* data/m4sugar/foreach.m4
* data/m4sugar/m4sugar.m4: Skip because we sync these with
Autoconf.
* djgpp: Skip because I don't know how to test djgpp properly, and
this code appears to be unmaintained anyway.
* README-hacking (Hacking): Specify that tabs should be avoided
where not required.
2011-07-24 18:13:05 -04:00
Joel E. Denny
575619af5e maint: run "make update-copyright". 2011-01-02 10:02:43 -05: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
Joel E. Denny
b867584028 portability: fix for BSD make.
Reported by Johan van Selst at
<http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
* tests/local.mk ($(TESTSUITE)): Qualify package.m4 in
this dependency list as in package.m4's target rule.
(cherry picked from commit cf80e9c386)

Conflicts:

	tests/Makefile.am
2010-03-23 20:37:17 -04:00
Joel E. Denny
e141f4d4bb maint: run "make update-copyright" 2010-01-04 13:47:36 -05:00
Joel E. Denny
c467dc420d * tests/local.mk (TESTSUITE_AT): Add named-refs.at.
(cherry picked from commit 36dfe4662e)

Conflicts:

	tests/Makefile.am
2009-08-10 23:44:07 -04:00
Akim Demaille
a887366955 tests: honor TESTSUITEFLAGS in every check target.
* tests/local.mk (RUN_TESTSUITE): New.
	(check-local, installcheck-local, maintainer-check-g++)
	(maintainer-check-posix, maintainer-check-valgrind): Use it.
2009-06-11 14:36:57 +02:00
Akim Demaille
2cd1af957a Use testsuite -C.
* tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
	Solves problems when top_srcdir is an absolute path.
	Suggested by Eric Blake.
	* configure.ac: Require Autoconf 2.62.
2008-12-11 10:46:25 +01:00
Akim Demaille
97abf54412 Fix regeneration of atconfig.
* tests/local.mk (tests/atconfig): The rule was incorrect, but
	remove it: now that there is no tests/Makefile.am, the top-level
	Makefile properly updates atconfig when needed.
2008-12-08 09:44:38 +01:00
Akim Demaille
56ddee7f8d s/_FLAGS/FLAGS/.
* tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
	(TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
	Reported by Eric Blake.
2008-11-26 10:31:53 +01:00
Akim Demaille
95a7b1c934 Prefer TESTSUITE_FLAGS.
TESTSUITEFLAGS is barely readable.

	* tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
	for backward compatibility.
	Use the former instead of the latter.
2008-11-25 23:01:23 +01:00
Akim Demaille
d4977ce3e7 Remove tests/Makefile.am.
* tests/Makefile.am: Rename as...
	* tests/local.mk: this.
	* Makefile.am, configure.ac: Adjust.
	* Makefile.am (DISTCLEANFILES): Define.
	(maintainer-check, maintainer-xml-check, maintainer-push-check):
	Remove, we no longer need to bounce to the real targets.
2008-11-15 11:20:20 +01:00