summaryrefslogtreecommitdiff
path: root/tests/cxx-type.at
Commit message (Collapse)AuthorAgeFilesLines
* tests: simplify AT_PARSER_CHECK usageAkim Demaille2019-02-211-9/+9
| | | | | | | | | Currently the caller must specify the ./ prefix to its command. Let's avoid that: it will be nicer to read, make it easier to have a version that works for Java and C/C++. * tests/local.at (AT_PARSER_CHECK): Prefix the command with ./. Adjust callers.
* package: bump copyrights to 2019Akim Demaille2019-01-051-1/+1
|
* tests: migrate from %error-verbose to %define parse.error verboseAkim Demaille2018-11-121-1/+1
| | | | | | | | | * tests/actions.at, tests/c++.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/javapush.at, * tests/local.at, tests/regression.at, tests/skeletons.at, * tests/torture.at: Here.
* tests: be strict about typesAkim Demaille2018-10-221-5/+4
| | | | | | | * tests/actions.at, tests/c++.at, tests/cxx-type.at, * tests/glr-regression.at, tests/local.at, tests/torture.at, * tests/types.at: Pay stricter attention to types to avoid warnings.
* style: tests: remove useless reference to 'int' in integral typesAkim Demaille2018-08-141-1/+1
| | | | | * tests/actions.at, tests/cxx-type.at: Prefer 'unsigned' to 'unsigned int'. Likewise for long and short.
* Update copyright yearsAkim Demaille2018-05-121-1/+1
| | | | Run `make update-copyright`.
* build: re-enable compiler warnings, and fix themAkim Demaille2015-01-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | There are warnings (-Wextra) in generated C++ code: ltlparse.cc: In member function 'ltlyy::parser::symbol_number_type ltlyy::parser::by_state::type_get() const': ltlparse.cc:452:33: warning: enumeral and non-enumeral type in conditional expression return state == empty_state ? empty_symbol : yystos_[state]; Reported by Alexandre Duret-Lutz. It turns out that -Wall and -Wextra were disabled because of a stupid typo. * configure.ac: Fix the stupid typo. * data/lalr1.cc, src/AnnotationList.c, src/InadequacyList.c, * src/ielr.c, src/print.c, src/scan-code.l, src/symlist.c, * src/symlist.h, src/symtab.c, src/tables.c, tests/actions.at, * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at, * tests/named-refs.at, tests/torture.at: Fix warnings, mostly issues about variables used only with assertions, which are disabled with -DNDEBUG.
* package: bump to 2015Akim Demaille2015-01-041-1/+1
| | | | | | Which also requires: * gnulib: Update.
* package: bump to 2014Akim Demaille2014-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * AUTHORS, ChangeLog-2012, Makefile.am, NEWS, PACKAGING, README, * README-alpha, README-hacking, THANKS, TODO, bootstrap.conf, * build-aux/darwin11.4.0.valgrind, build-aux/local.mk, * build-aux/update-b4-copyright, * build-aux/update-package-copyright-year, cfg.mk, configure.ac, * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4, * data/c-like.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.texi, doc/local.mk, doc/refcard.tex, * etc/README, etc/bench.pl.in, etc/local.mk, * examples/calc++/calc++.test, examples/calc++/local.mk, * examples/extexi, examples/local.mk, examples/mfcalc/local.mk, * examples/mfcalc/mfcalc.test, examples/rpcalc/local.mk, * examples/rpcalc/rpcalc.test, examples/test, examples/variant.yy, * 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/flex.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/graphviz.h, 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.c, 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/bison.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/javapush.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, tests/types.at: here.
* parsers: rename YY_NULL as YY_NULLPTR to avoid conflicts with FlexAkim Demaille2013-11-081-7/+7
| | | | | | | | | | | | Flex also defines YY_NULL (to 0). Avoid gratuitous conflicts. * data/c.m4 (b4_null_define): Rename YY_NULL as YY_NULLPTR. * data/glr.c, data/lalr1.cc, data/location.cc, data/variant.hh, * data/yacc.c, src/parse-gram.c, tests/actions.at, tests/c++.at, * tests/cxx-type.at, tests/glr-regression.at, tests/headers.at, * tests/push.at, tests/regression.at: Adjust.
* maint: update copyright yearsAkim Demaille2013-01-121-1/+1
| | | | | Suggested by Stefano Lattarini. Run "make update-copyright".
* tests: fix locations in CAkim Demaille2012-11-051-2/+2
| | | | | | * tests/local.at (AT_YYERROR_DEFINE): Don't display the end of the location if it is not after its beginning. * tests/actions.at, tests/cxx-type.at: Adjust the expected output.
* tests: use assert instead of plain abort.Akim Demaille2012-06-261-6/+4
| | | | | | | | * tests/actions.at, tests/calc.at, tests/conflicts.at, * tests/cxx-type.at, tests/glr-regression.at, tests/input.at, * tests/named-refs.at, tests/regression.at, tests/torture.at, * tests/local.at: Prefer assert to abort.
* tests: more uniformity.Akim Demaille2012-06-221-2/+1
| | | | | | | | | | | | * tests/local.at (AT_LEX_FORMALS, AT_LEX_ARGS, AT_LEX_PRE_FORMALS) (AT_LEX_PRE_ARGS): Rename as... (AT_YYLEX_FORMALS, AT_YYLEX_ARGS, AT_YYLEX_PRE_FORMALS) (AT_YYLEX_PRE_ARGS): these, for consistency. (AT_API_PREFIX): Take %name-prefix into account. (AT_YYLEX_PROTOTYPE): New. Use it. * tests/actions.at, tests/calc.at, tests/cxx-type.at: Adjust to use them.
* tests: handle locations in a more generic way.Akim Demaille2012-06-221-63/+47
| | | | | | | | | * 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: .
* c++: more YY_NULLAkim Demaille2012-04-011-85/+85
| | | | | | | | | | | | | | | Caught by maintainer-check-g++. * data/glr.c, data/lalr1.cc, data/yacc.c, tests/cxx-type.at, * tests/glr-regression.at, tests/push.at: When simple to do, avoid expliciting the null ptr. Otherwise use YY_NULL. (cherry picked from commit eeaf1dc646048e464d97f6a572b8894632e6e47a) Conflicts: data/glr.c data/lalr1.cc tests/cxx-type.at
* maint: run "make update-copyright".Akim Demaille2012-01-131-1/+1
|
* maint: run "make update-copyright".Joel E. Denny2011-01-021-2/+1
|
* Do not use date ranges in copyright notices.Paul Eggert2010-06-231-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* maint: run "make update-copyright"Joel E. Denny2010-01-041-2/+1
|
* maint: run "make update-copyright"Joel E. Denny2009-08-061-2/+2
|
* Build testsuite with newer autoconf.Eric Blake2008-12-051-14/+14
| | | | | | | | | | | | * tests/output.at (m4_expand): Don't override in newer autoconf, where the underlying implementation changed. * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT) (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT) (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR) (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings, since some of them contain unbalanced ')'. Signed-off-by: Eric Blake <ebb9@byu.net>
* Automate regression testing of the XML/XSLT implementation. DiscussedJoel E. Denny2007-12-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Deprecate %pure-parser and add `%define api.pure'. Discussed startingJoel E. Denny2007-10-291-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | at <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>. * NEWS (2.3a+): Mention. * data/bison.m4 (b4_pure_if): Don't define it here. * data/c.m4 (b4_identification): Depend on individual skeletons to define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the values of the %define variables api.pure or api.push_pull. Define YYPURE, YYPUSH, and YYPULL accordingly. * data/glr.c: Define b4_pure_if based on `%define api.pure' unless glr.cc has already defined b4_pure_flag. * data/push.c: Define b4_pure_if based on `%define api.pure'. Remove YYPUSH and YYPULL since they're back in b4_identification again. * data/yacc.c Define b4_pure_if based on `%define api.pure'. * doc/bison.texinfo (Pure Decl): Update. (Push Decl): Update. (Decl Summary): Add api.pure to %define entry. In %pure-parser entry, say it's deprecated and reference %define. (Pure Calling): Update. (Error Reporting): Update. (C++ Scanner Interface): Update. (How Can I Reset the Parser): Update. (Table of Symbols): In %pure-parser entry, say it's deprecated and reference %define. * src/getargs.c (pure_parser): Remove global variable. * src/getargs.h (pure_parser): Remove extern. * src/output.c (prepare): Don't define pure_flag muscle. * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a wrapper around `%define api.pure'. * tests/calc.at (Simple LALR Calculator): Update. (Simple GLR Calculator): Update. * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations): Update. (GLR: Resolve ambiguity, pure, locations): Update. (GLR: Merge conflicting parses, pure, no locations): Update. (GLR: Merge conflicting parses, pure, locations): Update. * tests/glr-regression.at (Uninitialized location when reporting ambiguity): Update * tests/input.at (Unused %define api.pure): New test case. * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for AT_PURE_IF and AT_PURE_AND_LOC_IF. * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
* Update to GPLv3.Paul Eggert2007-08-151-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Fix test failure reported by Tom Lane inPaul Eggert2006-10-061-0/+2
| | | | | | | | | | | | | | | | <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html> and try to make such failures easier to catch in the future. * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg; that's now the caller's responsibility. (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Set yychar = YYEOF if it's negative. * tests/actions.at (yylex): Abort if asked to read past EOF. * tests/conflicts.at (yylex): Likewise. * tests/cxx-type.at (yylex): Likewise. * tests/glr-regression.at (yylex): Likewise. * tests/input.at (yylex): Likewise. * tests/regression.at (yylex): Likewise. * tests/torture.at (yylex): Likewise.
* Fix white space glitches.Paul Eggert2006-01-221-1/+1
|
* Minor fixups to get 'make maintainer-check' to work.Paul Eggert2006-01-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Don't use -Wnested-externs, as it's incompatible with the new verify.h implementation. * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput). * data/glr.c (YYUSE): Depend on __GNUC__ as well. * data/yacc.c (YYUSE): Likewise. * data/lalr1.cc (yysyntax_error_): YYUSE (yystate). * lib/subpipe.c (end_of_output_subpipe): The args are unused. * src/parse-gram.y (declaration): Don't pass a string constant to a function that expects char *, since GCC might complain about the constant value. * src/reader.c (symbol_typed_p): Add parens to pacify GCC. * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval before #defining them. * tests/glr-regression.at (Incorrectly initialized location for empty right-hand side in GLR): In yyerror, use the msg arg. (Corrupted semantic options if user action cuts parse): (Incorrect lookahead during deterministic GLR): (Incorrect lookahead during nondeterministic GLR): Don't name a local var 'index'; it shadows string.h's 'index'.
* Update copyright year to 2006.Paul Eggert2006-01-031-1/+1
|
* * data/glr.c: Reformat whitespace with tabs.Akim Demaille2006-01-021-43/+43
| | | | | | | (b4_lpure_formals): Remove this unused m4 macro. * tests/cxx-type.at: Reformat whitespace with tabs. (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo since it's a member. Rename type to isNterm for clarity.
* * NEWS: Reword %destructor vs YYABORT etc.Paul Eggert2005-12-221-5/+5
| | | | | | | | | | | | * data/glr.c: Use American spacing, for consistency. * data/glr.cc: Likewise. * data/lalr1.cc: Likewise. * data/yacc.c: Likewise. * data/yacc.c: Reformat comments slightly. * doc/bison.texinfo: Replace "non-" with "non" when that makes sense, for consistency. Fix some spelling errors and reword recently-included text slightly. * tests/cxx-type.at: Cast results of malloc, for C++.
* * tests/cxx-type.at: Construct a tree, count the parents of sharedAkim Demaille2005-12-211-22/+113
| | | | | nodes, and free each node once and only once. Previously, the memory for semantic values was leaked instead.
* * NEWS: Version 2.0b.Paul Eggert2005-07-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on the user's name space. All uses changed to __attribute__ ((__unused__)). (yyFail, yyMemoryExhausted, yyreportAmbiguity): Add __attribute__ ((__noreturn__)). * etc/clcommit: Remove. We weren't using it, and it failed "make maintainer-distcheck". * Makefile.maint: Merge from coreutils. (CVS_LIST, CVS_LIST_EXCEPT): New macros. (syntax-check-rules): Change list of rules as described below. (sc_cast_of_alloca_return_value, sc_dd_max_sym_length): (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof): (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope): (sc_trailing_space): New rules. (sc_xalloc_h_in_src): Remove. (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value): (sc_space_tab, sc_error_exit_success, sc_changelog): (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics): (makefile-check, po-check, author_mark_check): (makefile_path_separator_check, copyright-check): Use grep -n, to make it easier to find violations. Use CVS_LIST and CVS_LIST_EXCEPT. (header_regexp, h_re): Remove. (dd_c): New macro. (sc_dd_max_sym_length, .re-list, news-date-check): New rules. (my-distcheck): Use more-modern GCC flags. (signatures, %.asc): Remove. (rel-files, announcement): Remove signatures. Restore old updating code, even though we don't use it, so that we're the same as coreutils. (alpha, beta, major): Depend on news-date-check. Make the upload commands. * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space. * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise. * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise. * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise. * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise. * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise. * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise. * tests/sets.at: Likewise. * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that we comment out the Autoconf version number. * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as it's error-prone and "make maintainer-distcheck" rejects it. * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H. Indent calls to "error" to pacify "make maintainer-distcheck", when the calls are not intended to be translated. * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h. * src/Makefile.am (DEFS): Use +=, to pacify "make maintainer-distcheck". (bison_SOURCES): Add scan-skel.h. (sc_tight_scope): New rule, from coreutils. * src/files.c (src_extension, header_extension): Now static, not extern. * src/getargs.c (short_options): Likewise. * src/muscle_tab.c (muscle_table): Likewise. * src/parse-gram.y (current_class, current_type, current_prec): Likewise. * src/reader.c (grammar_end, previous_rule_end): Likewise. * src/getargs.h: Redo comments to pacify "make maintainer-distcheck". * src/main.c (main): Cast bindtextdomain and textdomain calls to void, to avoid warning when NLS is disabled. * src/output.c: Include scan-skel.h. (scan_skel): Remove decl, since scan-skel.h does this. (output_skeleton): Indent calls to "error" to pacify "make maintainer-distcheck". * src/print_graph.c: Don't include <obstack.h>, as system.h does this. * src/reader.h (gram_end, gram_lineno): New decls to pacify "make maintainer-distcheck". * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in): (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno): (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug): (skel_lex_destroy, scan_skel): Move these decls to... * src/scan-skel.h: New file. * src/uniqstr.c (uniqstr_assert): Indent calls to "error" to pacify "make maintainer-distcheck". * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR), not @VAR@. * tests/torture.at: Revamp to avoid misuse of atoi that "make maintainer-distcheck" complained about.
* Don't pipe output of ./types through sed toPaul Eggert2005-07-201-9/+9
| | | | | | remove trailing spaces. This loses the exit status of ./types, and isn't needed since ./types shouldn't be emitting trailing spaces.
* (_AT_TEST_GLR_CXXTYPES): Work even withPaul Eggert2005-07-201-2/+3
| | | | overly-picky compilers that reject 'char *foo = "bar";'.
* (_AT_TEST_GLR_CXXTYPES): Don't try to have yyerror return 0, now thatPaul Eggert2005-07-191-1/+0
| | | | it returns void.
* Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.Paul Eggert2005-07-181-2/+2
| | | | | | | | | * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return void, not int. * tests/glr-regression.at (Badly Collapsed GLR States): Likewise. (Improper handling of embedded actions and dollar(-N) in GLR parsers): yylex should return 0 at EOF rather than aborting.
* Improve tests for stack overflow in GLR parser.Paul Eggert2005-07-181-2/+2
| | | | | | | | | | | | | | | | | | | | | Problem reported by twlevo@xs4all.nl. * data/glr.c (struct yyGLRStack): Remove yyerrflag member. All uses removed. (yyStackOverflow): Just longjmp, but with value 2 so that caller can handle the problem. (YYCHK1): Use goto (a la yacc.c) rather than setting a flag. (yyparse): New local variable yyresult to record the result. Use result of setjmp to set it, rather than storing itinto struct. (yyDone): Remove label. (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels, to mimic yacc.c. Do not discard lookahead if it's EOF (possible if YYABORT is used). * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with yyparse status; put status > 1 into diagnostic. Check that status==2 works. * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at: Use exit status 3 for failure to open (which shouldn't happen).
* * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.Paul Eggert2005-07-141-0/+1
| | | | | | | | (yyuserMerge): Provide a default case if b4_mergers is empty. * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE. * tests/glr-regression.at (Improper handling of embedded actions and dollar(-N) in GLR parsers): YYSTYPE is char *, not char const *, so that strcpy ($$, ...) works.
* * tests/Makefile.am (maintainer-check-g++): Remove bogusPaul Eggert2005-07-141-4/+6
| | | | | | | | | test for valgrind; valgrind is independent of g++. (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check for compatibility with POSIX 1003.1-2001 (if running coreutils). * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++. Use a destructor, so that we can expand the stack. Change YYSTYPE to char * so that we can free it. Cast result of malloc.
* Update FSF postal mail address.Paul Eggert2005-05-141-2/+2
|
* * data/glr.c (YYRHSLOC): Move its definition next to its uses.Akim Demaille2004-10-251-23/+22
| | | | | | | | | | | | | | | | Introduce another definition to address simple location arrays. (yyGLRStack): New member: yyerror_range. (yyrecoverSyntaxError, yyparse): Update it. (yyrecoverSyntaxError): Use it when shifting the error token to have an accurate range, equivalent to the one computed by both yacc.c and lalr1.cc. * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so that column numbers start at column 0, as per GNU Coding Standards, the others tests, and the doc. (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC): Adjust to the above change (first column is 0). And adjust the location of the "<error>", now covering the whole line.
* Minor white space issues, e.g. trailing white space at end of line.Paul Eggert2003-06-161-10/+10
|
* (_AT_TEST_GLR_CXXTYPES): Ensure yylex andPaul Eggert2003-06-161-12/+23
| | | | yyerror are declared before use; C99 requires this.
* * data/glr.c (YYERROR): Update definition.Paul Hilfinger2003-06-101-87/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (yyrecoverSyntaxError): Correct yyerrState logic. Correct comment. Allow states with only a default reduction. Fixes to avoid problem that $-N rules in GLR parsers can cause buffer overruns, corrupting state. * src/output.c (prepare_rules): Output max_left_semantic_context. * src/reader.h (max_left_semantic_context): New * src/scan-gram.l (max_left_semantic_context): Define. (handle_action_dollar): Update max_left_semantic_context. * data/glr.c (YYMAXLEFT): New. (yydoAction): Increase yyrhsVals size. (yyresolveAction): Ditto. Fixes to problems with location handling in GLR parsers reported by Frank Heckenbach (2003/06/05). * data/glr.c (YYLTYPE): Make trivial if locations not used. (YYRHSLOC): Add parentheses, make depend on whether locations used. (YYLLOC_DEFAULT): Ditto. (yyuserAction): Use YYLLOC_DEFAULT. (yydoAction): Remove redundant code. * tests/cxx-type.at: Exercise location information. (yylex): Track locations. (stmtMerge): Return value rather than printing.
* Update copyright date to 2003.Paul Eggert2003-02-011-1/+1
|
* Rename tests/glr-regr1.at to tests/glr-regression.at.Paul Hilfinger2003-01-291-1/+1
| | | | | | | | tests/glr-regression.at: Add new regression test for the problems reported by S. Eken with semantic values for embedded rules. Update copyright notice. tests/testsuite.at, tests/Makefile.am: Rename glr-regr1.at to glr-regression.at.
* (_AT_TEST_GLR_CXXTYPES): Do not include <assert.h>.Paul Eggert2002-11-211-2/+2
| | | | Replace all instances of assert with abort.
* * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,Paul Eggert2002-11-151-2/+2
| | | | | | | | | src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h, tests/action.at, tests/calc.at, tests/conflicts.at, tests/cxx-type.at, tests/regression.at: "parse error" -> "syntax error" for POSIX compatibility. "parsing stack overflow..." -> "parser stack overflow" so that code matches Bison documentation.
* * tests/atlocal.in (CPPFLAGS): We have config.h.Akim Demaille2002-11-141-16/+21
| | | | | | | | | | | | * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR): New. * tests/actions.at, tests/calc.at, tests/conflicts.at, * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at, * tests/regression.at, tests/torture.at: Use them for all the grammars that are to be compiled. * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as... * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this. * doc/bison.texinfo (GLR Parsers): Document `inline'.