Commit Graph

31 Commits

Author SHA1 Message Date
Akim Demaille
f6b561d9f9 Merge branch 'maint'
* origin/maint:
  tests: check %no-lines
  tests: minor simplification
  graphs: stylistic changes.
  graphs: minor style changes
  graphs: show reductions
  graphs: style: prefix state number with "state"
  graphs: style: use left justification for states
  graphs: style: prefix rules and change shapes
  obstack: import obstack_finish0 from master
  c++: api.location.type
  muscles: a function for backward compatibility
  maint: more macros

Conflicts:
	data/glr.cc
	data/java.m4
	data/lalr1.cc
	doc/bison.texi
	src/muscle-tab.c
	src/system.h
	tests/calc.at
2012-10-12 12:49:57 +02:00
Akim Demaille
6cf3716c31 Merge remote-tracking branch 'origin/maint'
* origin/maint:
  tests: more uniformity.
  tests: handle locations in a more generic way.
  tests: handle locations in the generic yyerror functions.
  tests: fix AT_CHECK_CALC.
  tests: improve infrastructure
  tests: factor.
  skeletons: minor style changes
  tests: AT_LANG.
  c skeletons: factor the declaration of yylloc and yylval.
  news: condemn YYPARSE_PARAM and YYLEX_PARAM.
  maint: regen.

Conflicts:
	tests/calc.at
	tests/local.at
	tests/regression.at
2012-06-25 09:46:34 +02:00
Akim Demaille
6d55954743 tests: handle locations in a more generic way.
* tests/local.at (AT_YYERROR_PROTOTYPE): New.
Use it.
* tests/cxx-type.at: Extensive revamp to use a more traditional
quotation scheme, and to use the generic yyerror implementation.
Prefer Autotest macros to CPP macros.
* tests/java.at: .
2012-06-22 11:34:37 +02:00
Akim Demaille
3e75a2c92b Merge remote-tracking branch 'origin/maint'
* origin/maint:
  bump to 2012 in skeletons.
  build: remove ancient Autoconf tests.
  doc: c++: complete the location documentation.
  c++: locations: provide convenience constructors.
  c++: locations: remove useless "inline".
  glr: do not use locations when they are not requested
  c++: use nullptr for C++11.
  build: simplify and improve the compiler warnings for tests.
  gnulib: update.
  maint: formatting changes.
  NEWS: update.
  Java: Fix syntax error handling without error token.
  tests: beware of -pedantic on large #line numbers.
  tests: when using the C++ compiler, use its flags too.

Conflicts:
	data/glr.c
	data/glr.cc
	data/lalr1.cc
	data/location.cc
	data/yacc.c
	tests/Makefile.am
2012-04-01 13:14:34 +02:00
Tim Landscheidt
e34e97bcd7 Java: Fix syntax error handling without error token.
* data/lalr1.java (YYParser::parse): Here.
* tests/java.at: Add test case.
2012-03-27 15:21:28 +02:00
Akim Demaille
e0e2b93355 maint: address some syntax-issues remaining after cherry-picking from master.
* cfg.mk: Skip bison generated files, 2.5 is generating trailing
	blanks.  This is already fixed in master.
	* tests/conflicts.at, tests/java.at: Fix white space issues.
2012-02-19 10:29:24 +01:00
Akim Demaille
c932d6135c maint: run "make update-copyright". 2012-01-13 11:48:14 +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
6771a463cd java: test and document previous bug fix.
* NEWS (2.5): Document it.
* tests/java.at (_AT_DATA_JAVA_CALC_Y): To one of the yyerror
invocations, pass a location that spans multiple tokens.  Change
yyerror to report all of a location rather than just the begin
position.  Extend yylex and Position to count tokens on a line.
Remove getHashCode as it's unused.  Update all expected output.
(cherry picked from commit 7776816565)
2011-02-19 19:57:44 -05:00
Joel E. Denny
7776816565 java: test and document previous bug fix.
* NEWS (2.5): Document it.
* tests/java.at (_AT_DATA_JAVA_CALC_Y): To one of the yyerror
invocations, pass a location that spans multiple tokens.  Change
yyerror to report all of a location rather than just the begin
position.  Extend yylex and Position to count tokens on a line.
Remove getHashCode as it's unused.  Update all expected output.
2011-02-19 19:47:17 -05:00
Joel E. Denny
575619af5e maint: run "make update-copyright". 2011-01-02 10:02:43 -05:00
Joel E. Denny
ea0a767697 maint: run "make update-copyright". 2011-01-02 09:56:16 -05:00
Joel E. Denny
095a1d11ca yysyntax_error: fix for consistent error with lookahead.
* NEWS (2.5): Document.
* data/yacc.c (yysyntax_error): In a verbose syntax error
message while in a consistent state with a default action (which
must be an error action given that yysyntax_error is being
invoked), continue to drop the expected token list, but don't
drop the unexpected token unless there actually is no lookahead.
Moreover, handle that internally instead of returning 1 to tell
the caller to do it.  With that meaning of 1 gone, renumber
return codes more usefully.
(yyparse, yypush_parse): Update yysyntax_error usage.  Most
importantly, set yytoken to YYEMPTY when there's no lookahead.
* data/glr.c (yyreportSyntaxError): As in yacc.c, don't drop the
unexpected token unless there actually is no lookahead.
* data/lalr1.cc (yy::parser::parse): If there's no lookahead,
set yytoken to yyempty_ before invoking yysyntax_error_.
(yy::parser::yysyntax_error_): Again, don't drop the unexpected
token unless there actually is no lookahead.
* data/lalr1.java (YYParser::parse): If there's no lookahead,
set yytoken to yyempty_ before invoking yysyntax_error.
(YYParser::yysyntax_error): Again, don't drop the unexpected
token unless there actually is no lookahead.
* tests/conflicts.at (%error-verbose and consistent
errors): Extend test group to further reveal how the previous
use of the simple "syntax error" message was too general.  Test
yacc.c, glr.c, lalr1.cc, and lalr1.java.  No longer an expected
failure.
* tests/java.at (AT_JAVA_COMPILE, AT_JAVA_PARSER_CHECK): Move
to...
* tests/local.at: ... here.
(_AT_BISON_OPTION_PUSHDEFS): Push AT_SKEL_JAVA_IF definition.
(AT_BISON_OPTION_POPDEFS): Pop it.
(AT_FULL_COMPILE): Extend to handle Java.
(cherry picked from commit d2060f0634)

Conflicts:

	data/lalr1.cc
	data/lalr1.java
	src/parse-gram.c
	src/parse-gram.h
	tests/java.at
2010-11-07 16:07:42 -05:00
Joel E. Denny
d2060f0634 yysyntax_error: fix for consistent error with lookahead.
* NEWS (2.5): Document.
* data/yacc.c (yysyntax_error): In a verbose syntax error
message while in a consistent state with a default action (which
must be an error action given that yysyntax_error is being
invoked), continue to drop the expected token list, but don't
drop the unexpected token unless there actually is no lookahead.
Moreover, handle that internally instead of returning 1 to tell
the caller to do it.  With that meaning of 1 gone, renumber
return codes more usefully.
(yyparse, yypush_parse): Update yysyntax_error usage.  Most
importantly, set yytoken to YYEMPTY when there's no lookahead.
* data/glr.c (yyreportSyntaxError): As in yacc.c, don't drop the
unexpected token unless there actually is no lookahead.
* data/lalr1.cc (yy::parser::parse): If there's no lookahead,
pass yyempty_ not yyla.type to yysyntax_error_.
(yy::parser::yysyntax_error_): Again, don't drop the unexpected
token unless there actually is no lookahead.
* data/lalr1.java (YYParser::parse): If there's no lookahead,
set yytoken to yyempty_ before invoking yysyntax_error.
(YYParser::yysyntax_error): Again, don't drop the unexpected
token unless there actually is no lookahead.
* tests/conflicts.at (parse.error=verbose and consistent
errors): Extend test group to further reveal how the previous
use of the simple "syntax error" message was too general.  Test
yacc.c, glr.c, lalr1.cc, and lalr1.java.  No longer an expected
failure.
* tests/java.at (AT_JAVA_COMPILE, AT_JAVA_PARSER_CHECK): Move
to...
* tests/local.at: ... here.
(_AT_BISON_OPTION_PUSHDEFS): Push AT_SKEL_JAVA_IF definition.
(AT_BISON_OPTION_POPDEFS): Pop it.
(AT_FULL_COMPILE): Extend to handle Java.
2010-11-07 16:01:56 -05:00
Paul Eggert
6e30ede87a 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/location.cc:
* 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/subpipe.c, djgpp/subpipe.h:
* djgpp/testsuite.sed, doc/bison.texinfo:
* doc/refcard.tex, etc/README, etc/bench.pl.in:
* examples/calc++/Makefile.am, examples/extexi:
* 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/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/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/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:
* data/Makefile.am, data/location.cc, doc/Makefile.am, src/Makefile.am:
* tests/Makefile.am, lib/Makefile.am, examples/Makefile.am:
* etc/Makefile.am:
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-23 13:07:29 -07: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
e141f4d4bb maint: run "make update-copyright" 2010-01-04 13:47:36 -05:00
Joel E. Denny
1462fcee1e maint: run "make update-copyright" 2010-01-04 13:46:45 -05:00
Akim Demaille
4c6622c2dd Rename token.prefix as api.tokens.prefix.
Discussed here.
http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.

	* NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
	* tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
	(token.prefix): Rename as...
	(api.tokens.prefix): this.
2009-05-15 16:10:52 +02:00
Akim Demaille
74553c98a2 Fix grep portability issues.
Grep on Solaris does not support -q.
Reported by Summum Bonum.

	* NEWS: Add a stub for 2.4.2.
	* THANKS: Add Summum Bonum.
	* tests/atlocal.in (EGREP): New.
	(CC, CXX, XSLTPROC): Make it possible to override them via
	envvars.
	* tests/java.at: Use $EGREP instead of egrep.
	Use AT_CHECK's ignore instead of grep's -q.
2009-01-28 15:29:47 +01:00
Akim Demaille
8defe11bfa Fix grep portability issues.
Grep on Solaris does not support -q.
Reported by Summum Bonum.

	* NEWS: Add a stub for 2.4.2.
	* THANKS: Add Summum Bonum.
	* tests/atlocal.in (EGREP): New.
	(CC, CXX, XSLTPROC): Make it possible to override them via
	envvars.
	* tests/java.at: Use $EGREP instead of egrep.
	Use AT_CHECK's ignore instead of grep's -q.
2009-01-08 09:46:40 +01:00
Akim Demaille
417e31d2c3 Test token.prefix in all the skeletons.
* data/java.m4 (b4_token_enum): Use the token.prefix.
	* tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
	* tests/calc.at (_AT_DATA_CALC_Y): Use it.
	Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
	* tests/java.at: Comment changes.
	(AT_CHECK_JAVA_MINIMAL): Define the END token.
	(Java parser class and package names): Add token.prefix check.
2008-12-08 09:47:26 +01:00
Akim Demaille
11707b2b48 Get rid of tabulations in the Java output.
Test 214 was failing: it greps with a pattern containing [    ]* which
obviously meant to catch spaces and tabs, but contained only tabs.
Tabulations in sources are a nuisance, so to simplify the matter, get rid
of all the tabulations in the Java sources.  The other skeletons will be
treated equally later.

	* data/java.m4, data/lalr1.java: Untabify.
	* tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
	tabulations are no longer generated.
2008-11-11 14:42:35 +01:00
Di-an Jan
1979121c96 Various Java skeleton improvements.
* NEWS: Document them.

General Java skeleton improvements.
* configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
using gcj < 4.3 in the testsuite, according to comments in
gnulib/m4/javacomp.m4.
* data/java.m4 (stype, parser_class_name, lex_throws, throws,
location_type, position_type): Remove extraneous brackets from
b4_percent_define_default.
(b4_lex_param, b4_parse_param): Remove extraneous brackets from
m4_define and m4_define_default.
* data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
which marks the end of user code with appropriate syncline, like all
the other skeletons.
(b4_user_post_prologue): Add.  Don't silently drop.
(yylex): Remove.
(parse): Inline yylex.
* doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
(%{...%}): Fix typo of %code imports.
* tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
Support annotations on parser class with %define annotations.
* data/lalr1.java (annotations): Add to parser class modifier.
* doc/bison.texinfo (Java Parser Interface): Document
%define annotations.
(Java Declarations Summary): Document %define annotations.
* tests/java.at (Java parser class modifiers): Test annotations.
Do not generate code for %error-verbose unless requested.
* data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
Make private.  Make conditional on %error-verbose.
(getErrorVerbose, setErrorVerbose): New.
(yytnamerr_): Make conditional on %error-verbose.
(yysyntax_error): Make some code conditional on %error-verbose.
* doc/bison.texinfo (Java Bison Interface): Remove the parts
about %error-verbose having no effect.
(getErrorVerbose, setErrorVerbose): Document.
Move constants for token names to Lexer interface.
* data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
* data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
(parse): Qualify EOF to Lexer.EOF.
* doc/bison.texinfo (Java Parser Interface): Move documentation of
EOF and token names to Java Lexer Interface.
* tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
Make yyerror public.
* data/lalr1.java (Lexer.yyerror): Use longer parameter name.
(yyerror): Change to public.  Add Javadoc comments.  Use longer
parameter names.  Make the body rather than the declarator
conditional on %locations.
* doc/bison.texinfo (yyerror): Document.  Don't mark as protected.
Allow user to add code to the constructor with %code init.
* data/java.m4 (b4_init_throws): New, for %define init_throws.
* data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
Add %code init to the front of the constructor body.
* doc/bison.texinfo (YYParser.YYParser): Document %code init
and %define init_throws.
(Java Declarations Summary): Document %code init and
%define init_throws.
* tests/java.at (Java %parse-param and %lex-param): Adjust grep.
(Java constructor init and init_throws): Add tests.
2008-11-10 14:34:52 +01:00
Di-an Jan
e254a580b5 Java parser improvements
2008-11-01  Di-an Jan  <dianj@freeshell.org>
	    Paolo Bonzini  <bonzini@gnu.org>

	Support all Java parser class modifiers.
	* data/java.m4 (b4_percent_define_get3): New.
	(b4_final_if, b4_strictfp_if): New.
	* data/lalr1.java (final, strictfp, extends, implements): Support.
	* doc/bison.texinfo (final, strictfp, extends, implements): Add
	documentation.
	* tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
	(AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
	(AT_CHECK_JAVA_GREP): New.
	(Java parser class modifiers): New test.
	(Java parser class extends and implements): New test.

	Model exception propagation better with throws and lex_throws.
	* data/java.m4 (b4_list2): New.
	(throws): Change default.
	* data/lalr1.java (yyaction): Add throws.
	(parse): Add lex_throws in addition to throws.
	* doc/bison.texinfo (throws, lex_throws): Add documentation.
	* tests/java.at (Java throws specifications): New test.

	Improve documentation for Java parsers.
	* doc/bison.texinfo (Java Parsers): Add subsections.
	Don't quote first argument of %define.
	(Java Bison Interface): Document output files.  Move documentation
	of parser class and merge into Java Parser Interface.  Document
	features that error out.  Document directives with no effect.
	Move note about Javadoc higher.
	(Java Semantic Values): Explicitly mention stype.
	Document that generic types cannot be used.
	(Java Location Values): Use @deftypeivar.  Document constructors.
	Correct return value for toString.
	(Java Parser Interface): List undocumented constants/fields.
	Move documentation of fields added by %parse-param closer to list
	of members.  Document that token names are added as fields.
	Document constructors accurately.  Remove error method.
	(Java Scanner Interface): Move note on %pure-parser to Java Bison
	Interface.  Describe %code lexer and yylex accutately.
	Remove documentation that does not match the code.
	(Java Action Features): New.
	(Java Differences): Add reference.  Add item on semantic values.
	Add note about @{ ... @}.  Clarify %% epilogue placement.
	(Java Declarations Summary): New.

	Fix Java skeleton.
	* data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
	(b4_remove_comma): Quote test argument.
	* tests/java.at (Java parser class and package names): New test.
	(Java %parse-param and %lex-param): New test.
	(Java stype, position_class and location_class): New test.
2008-11-01 20:00:01 +01:00
Joel E. Denny
da730230ce Automate regression testing of the XML/XSLT implementation. Discussed
starting at
<http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
* configure.ac (XSLTPROC): New substitution.
* Makefile.am (maintainer-xml-check): New phony target invoking...
* tests/Makefile.am (maintainer-xml-check): ... this new phony target
invoking make maintainer-check with BISON_TEST_XML=1.
* tests/atlocal.in (XSLTPROC): New.
* tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
not to report reachable memory when Bison is expected to have a
non-zero exit status and (2) to compare XML/XSLT output with --graph
and --report=all output for every working grammar when
BISON_TEST_XML=1.
(AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
(AT_BISON_CHECK_XML): New.
(AT_QUELL_VALGRIND): New.
* tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
(AT_CHECK): ... don't redefine this since this was the old way to
quell Valgrind.
* tests/actions.at: Rewrite all AT_CHECK invocations for bison as
AT_BISON_CHECK invocations.
* tests/c++.at: Likewise.
* tests/calc.at: Likewise.
* tests/conflicts.at: Likewise.
* tests/cxx-type.at: Likewise.
* tests/existing.at: Likewise.
* tests/glr-regression.at: Likewise.
* tests/headers.at: Likewise.
* tests/input.at: Likewise.
* tests/java.at: Likewise.
* tests/output.at: Likewise.
* tests/push.at: Likewise.
* tests/reduce.at: Likewise.
* tests/regression.at: Likewise.
* tests/sets.at: Likewise.
* tests/skeletons.at: Likewise.
* tests/synclines.at: Likewise.
* tests/torture.at: Likewise.
(Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
tends to hang xsltproc.
(Big horizontal): Likewise.
2007-12-22 18:35:03 +00:00
Paul Eggert
f16b08196c Update to GPLv3.
* doc/gpl-3.0.texi: New file.
* doc/gpl.texi: Remove.
* COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
* Makefile.maint, NEWS, PACKAGING, README, README-alpha:
* README-hacking, TODO, bootstrap, bootstrap.conf:
* configure.ac, data/Makefile.am, 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/location.cc:
* data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
* djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
* djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
* djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
* djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
* doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
* etc/bench.pl.in, examples/Makefile.am, examples/extexi:
* examples/calc++/Makefile.am, lib/Makefile.am, 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/main.c, lib/subpipe.c, lib/subpipe.h:
* lib/timevar.c, lib/timevar.def, lib/timevar.h:
* lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
* m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
* m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
* 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/lalr.c, src/lalr.h, src/location.c, src/location.h:
* src/main.c, src/muscle_tab.c, src/muscle_tab.h:
* src/nullable.c, src/nullable.h, src/output.c, src/output.h:
* src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
* 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/revision.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/Makefile.am, tests/actions.at, 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/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:
Update to GPLv3.
2007-08-15 20:21:33 +00:00
Paolo Bonzini
01b477c6b6 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
* data/java.m4 (b4_single_class_if): Remove.
        (b4_abstract_if): Look at "%define abstract".
        (b4_lexer_if): New.
        (b4_union_name): Rename...
        (b4_yystype): ... to this.  Map to "%define stype".
        (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
        b4_maybe_throws): Fix quoting.
        (b4_lex_param_call): Move below to keep b4_*_param_decl close.
        * data/lalr1.java (Lexer interface): Always define.
        (Lexer interface within parser class): Remove.
        (YYLexer class): New, used when "%code lexer" is present.
        (constructor): When "%code lexer" is used, pass %lex-param
        to the lexer constructor.
        (yylex, yyparse): Remove %lex-param from method invocations
        (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.

        * doc/bison.texinfo (Java Bison Interface): Mention "%define
        abstract".  Rename "%define union_name" to "%define stype".
        Rename method names according to previous patch.
        (Java Scanner Interface): Describe "%code lexer" instead of
        "%pure-parser" and "%define single_class".
        (Java Differences): Mention "%code lexer".

        * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
        Include scanner here, using macros from tests/local.at.
        (AT_DATA_CALC_Y): Remove final argument.
        (_AT_CHECK_JAVA_CALC): Likewise.
        (AT_CHECK_JAVA_CALC): Likewise.  Test all four combinations
        of %locations and %error-verbose.
        (main): Test with and without %lex-param.
        * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
        (AT_BISON_OPTION_POPDEFS): Pop it.
2007-03-09 09:13:43 +00:00
Paolo Bonzini
0049ec8628 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
* tests/java.at: Skip tests if only one of javac/java is present.
	Reported by Joel E. Denny.
        * tests/atlocal.in: Adjust copyright years.
2007-02-07 17:03:10 +00:00
Paolo Bonzini
8405b70c05 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
* NEWS: Mention java.
	* TODO: Remove things that are done.
	* bootstrap.conf: Add javacomp-script and javaexec-script.
	* configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.

	* data/Makefile.am: Add new files.
	* data/java-skel.m4: New.
	* data/java.m4: New.
	* data/lalr1.java: New.

	* doc/bison.texinfo: Put "A Complete C++ Example" under
	C++ Parsers.  Add Java Parsers.  Put C++ Parsers and Java Parsers
	under Other Languages.

	* src/getargs.c (valid_languages): Add Java.
	* src/getargs.h (struct bison_language): Update size of string fields.

	* tests/Makefile.am: Add java.at.
	* tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
	* tests/java.at: New.
	* tests/testsuite.at: Include it.
2007-01-29 10:54:42 +00:00