summaryrefslogtreecommitdiff
path: root/tests/java.at
Commit message (Collapse)AuthorAgeFilesLines
* package: bump copyrights to 2022Paul Eggert2022-01-151-1/+1
| | | | Run "make update-copyright".
* Update URLs to prefer https: to http:Paul Eggert2021-01-291-1/+1
| | | | Also, fix a few http: URLs that were no longer working.
* package: bump copyrights to 2021Akim Demaille2021-01-161-1/+1
| | | | Run 'make update-copyright'.
* style: java: more style fixesAkim Demaille2020-11-031-20/+20
| | | | | * data/skeletons/lalr1.java, tests/java.at: Avoid space before paren. And use braces as is customary in the Java.
* deprecate %defines in favor of %headerAkim Demaille2020-09-191-1/+16
| | | | | | | | | | | | | | | | | This is consistent with --defines being deprecated in favor of --header. The directive %defines is also too similar to %define. And %header matches nicely with api.header.name. * src/scan-gram.l (%defines): Deprecate to %header. (%header): Scan it. * src/parse-gram.y (PERCENT_DEFINES): Replace with... (PERCENT_HEADER): this. * data/skeletons/lalr1.java * doc/bison.texi * tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at, * tests/input.at, tests/java.at, tests/local.at, tests/output.at, * tests/synclines.at, tests/types.at: Convert most tests to check %header instead of %defines.
* java: rename package as api.packageAkim Demaille2020-06-281-0/+10
| | | | | | | * data/skeletons/lalr1.java: here. * doc/bison.texi: Update. * src/muscle-tab.c: Ensure backward compat. * tests/java.at: Check it.
* java: fix coding styleAkim Demaille2020-05-021-4/+4
| | | | | | | | I don't plan to fix everything in one go. But this was in the way of the next commit. * data/skeletons/lalr1.java: Avoid space before parens. * tests/java.at: Adjust.
* style: comment changesAkim Demaille2020-05-021-33/+33
| | | | * tests/java.at: here.
* java: don't expose the Context's membersAkim Demaille2020-02-111-4/+4
| | | | | | * data/skeletons/lalr1.java (Context): Make data members private. (Context.getLocation): New. * examples/java/calc/Calc.y, tests/java.at, tests/local.at: Adjust.
* java: tests: remove now redundant testsAkim Demaille2020-02-051-300/+1
| | | | * tests/java.at: Calculator tests are now in calc.at.
* java: tests: prepare the replacement of calculator testsAkim Demaille2020-02-051-1/+42
| | | | | | | | | | Soon calculator tests for Java will move from java.at to calc.at. Which implies improving the Java testing infrastructure in local.at (for instance really tracking columns in positions, not just token number). Detach java.at from local.at. * tests/java.at (AT_JAVA_POSITION_DEFINE_OLD): New. Use it.
* java: example: rely on autoboxingAkim Demaille2020-02-021-15/+13
| | | | | | | | | | | | AFAICT, autoboxing/unboxing was added in Java 5 (September 30, 2004). I think we can afford to use it. It should help us merge some Java tests with the main ones. However, beware that != does not unbox: it compares the object addresses. * examples/java/Calc.y, tests/java.at: Simplify. * examples/java/Calc.test, tests/java.at: Improve tests.
* skeletons: add support for %code epilogueAkim Demaille2020-02-021-10/+4
| | | | | | | | | | | | | | When building the test cases, emitting code in the epilogue is very constraining. Let's make it simpler thanks to %code epilogue. However, I don't want to document this: it is bad style to use it (we should avoid having too many ways to write the same thing, TI!MTOWTDI), just put your code in the true epilogue section. * data/skeletons/glr.c, data/skeletons/lalr1.d, data/skeletons/lalr1.java, * data/skeletons/yacc.c: Implement support for %code epilogue. Remove useless comments. * tests/calc.at, tests/java.at: Simplify.
* tests: fix AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS pairsAkim Demaille2020-01-151-4/+2
| | | | | | * tests/glr-regression.at, tests/java.at, tests/javapush.at: Close properly what is opened. Do not nest.
* package: bump copyrights to 2020Akim Demaille2020-01-051-1/+1
| | | | Run 'make update-copyright'.
* java: fix support for api.prefixAkim Demaille2019-06-191-1/+4
| | | | | * data/skeletons/java.m4: here. * tests/java.at: Check it.
* java: style changesAkim Demaille2019-06-191-11/+10
| | | | | | | | | | | | | | * data/skeletons/lalr1.java: Use more conventional function names for Java. Prefer < and <= to => and >. Use the same approach for m4 quotation as in the other skeletons. Fix indentation issues. * tests/calc.at, tests/java.at, tests/javapush.at: Fix quotation style. (main): Use 'args', not 'argv', the former seems more conventional and is used elsewhere in Bison. Prefer character literals to integers to denote characters. * examples/java/Calc.y: Likewise.
* diagnostics: copy GCC9's formatAkim Demaille2019-04-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Currently, when we quote the source file, we indent it with one space, and preserve tabulations, so there is a discrepancy and the visual rendering is bad. One way out is to indent with a tab instead of a space, but then this space can be used for more information. This is what GCC9 does. Let's play copy cats. See https://lists.gnu.org/archive/html/bison-patches/2019-04/msg00025.html https://developers.redhat.com/blog/2019/03/08/usability-improvements-in-gcc-9/ https://gcc.gnu.org/onlinedocs/gccint/Guidelines-for-Diagnostics.html#Guidelines-for-Diagnostics * src/location.c (location_caret): Prefix quoted lines with the line number and a pipe, fitting 8 columns. * tests/actions.at, tests/c++.at, tests/conflicts.at, * tests/diagnostics.at, tests/input.at, tests/java.at, * tests/named-refs.at, tests/reduce.at, tests/regression.at, * tests/sets.at: Adjust expectations. Partly by "./build-aux/update-test tests/testsuite.dir/*/testsuite.log" repeatedly, and partly by hand.
* java: use full locations for diagnostics about destructorsAkim Demaille2019-04-031-2/+4
| | | | | | | | | | | | | | | | | | | Currently we use the syncline to report errors about a symbol's destructor/printer. This is not accurate (only file and line), and this is incorrect: the file name is double quotes (a recent change, needed to make sure we escape properly double quotes in it). And worst of all: with --no-line, b4_syncline expands to nothing. Rather, push the locations into the backend, and use them. * src/muscle-tab.h, src/muscle-tab.c (muscle_location_grow): Make it public. * src/output.c (prepare_symbol_definitions): Use it to pubish the location of the printer and destructor. * data/skeletons/lalr1.java: Use complain_at instead of complain. * tests/java.at (Java invalid directives): Adjust expectations. * data/skeletons/bison.m4 (b4_symbol_action_location): Remove. We should not use b4_syncline this way.
* java: prefer errors to fatal errorsAkim Demaille2019-04-031-0/+22
| | | | | | | | | | Fatal errors are inconvenient, and should be reserved to cases where we cannot continue. Here, it could even be warnings actually: these directives will simply be ignored. * data/skeletons/lalr1.java: Prefer error (b4_complain) to fatal errors (b4_fatal). * tests/java.at (Java invalid directives): New.
* tests: java: factor the definition of PositionAkim Demaille2019-02-211-37/+1
| | | | | * tests/local.at (AT_JAVA_POSITION_DEFINE): New. * tests/java.at, tests/javapush.at: Use it.
* tests: dispatch per lang on AT_DATA_GRAMMARAkim Demaille2019-02-211-1/+1
| | | | | | | | | * tests/java.at: Do that. * tests/conflicts.at: Simplify. * tests/actions.at, tests/c++.at, tests/input.at, tests/local.at, * tests/named-refs.at: Use AT_BISON_OPTION_PUSHDEFS/AT_BISON_OPTION_POPDEFS.
* tests: dispatch per lang on the definition of yylexAkim Demaille2019-02-211-5/+2
| | | | | | * tests/local.at (AT_YYLEX_DEFINE): Dispatch on the language. (AT_YYLEX_DEFINE(java)): New. * tests/conflicts.at, tests/java.at: Use it.
* package: bump copyrights to 2019Akim Demaille2019-01-051-1/+1
|
* clearly deprecate %name-prefixAkim Demaille2019-01-031-2/+2
| | | | | | | | | | | * src/scan-gram.l (%name-prefix): Issue a deprecation warning. * tests/calc.at, tests/headers.at, tests/input.at, tests/java.at, * tests/javapush.at, tests/local.at: Adjust expectations. Or disable -Wdeprecated. * doc/bison.texi: Document that %name-prefix is replaced by %define api.prefix.
* rename parser_class_name as api.parser.classAkim Demaille2019-01-021-2/+2
| | | | | | | | | | | | | | | The previous name was historical and inconsistent. * src/muscle-tab.c (define_directive): Use the proper value passing syntax, based on the muscle kind. (muscle_percent_variable_update): Use the right value passing syntax. Migrate from parser_class_name to api.parser.class. * data/skeletons: Migrate from parser_class_name to api.parser.class. * doc/bison.texi (%define Summary): Document both parser_class_name and api.parser.class. Promote the latter over the former.
* tests: migrate from %error-verbose to %define parse.error verboseAkim Demaille2018-11-121-5/+5
| | | | | | | | | * 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.
* spelling: suppressJosh Soref2018-10-051-2/+2
|
* spelling: minimalJosh Soref2018-10-051-2/+2
|
* Update copyright yearsAkim Demaille2018-05-121-1/+1
| | | | Run `make update-copyright`.
* 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.
* tests: do not use grep -qAkim Demaille2013-09-041-4/+9
| | | | | | | Reported by Daniel Galloway. http://lists.gnu.org/archive/html/bug-bison/2013-08/msg00020.html * tests/java.at: Ignore grep's output instead.
* style: minor changes in the Java testsAkim Demaille2013-06-211-3/+2
| | | | | | | | * tests/java.at (AT_CHECK_JAVA_GREP): Ignore the exit status. * tests/javapush.at (AT_CHECK_JAVA_GREP): Be more alike the previous one. Formating changes. Remove stray debugging "jj" file.
* muscle: check more cases of %define variables with code valuesAkim Demaille2013-04-181-24/+24
| | | | | | | | | | | | | | * data/bison.m4 (b4_percent_define_check_kind): Fix overquotation. (api.location.type, api.position.type): Check they have code values here. * data/c++.m4 (api.location.type): No longer checked here. (parser_class_name): Check it here. * data/java.m4 (api.value.type, init_throws, lex_throws, parser_class_name) (throws, annotations, extends, implements): Check they have code values. * doc/bison.texi: Fix every incorrect occurrence of %define. Document the additional syntax for %define: code values. Document the additional syntax for -D/-F: string and code values. * tests/calc.at, tests/headers.at, tests/input.at, tests/java.at, * tests/local.at: Fix dependencies.
* api.token.prefix: use code valuesAkim Demaille2013-04-111-1/+1
| | | | | | | | | * data/bison.m4: Remove useless (and incorrect: m4_* instead of b4_*) default assignment to api.token.prefix. Check that api.token.prefix is assigned code. * tests/input.at (%define code variables): New test. * NEWS, doc/bison.texi, tests/c++.at, tests/calc.at, * tests/java.at, tests/local.at: Adjust to use braces.
* style: no longer use backquotesAkim Demaille2013-02-181-8/+8
| | | | | | | | * tests/actions.at, tests/atlocal.in, tests/c++.at, tests/calc.at, * tests/conflicts.at, tests/existing.at, tests/glr-regression.at, * tests/input.at, tests/java.at, tests/local.at, tests/sets.at, * tests/synclines.at, doc/bison.texi, lib/libiberty.h, lib/timevar.h: Use single quotes.
* grammar: record used associativity and print useless onesValentin Tolmer2013-01-301-3/+3
| | | | | | | | | | | | | | | | | | | Record which symbol associativity is used, and display useless ones. * src/symtab.h, src/symtab.c (register_assoc, print_assoc_warnings): New * src/symtab.c (init_assoc, is_assoc_used): New * src/main.c: Use print_assoc_warnings * src/conflicts.c: Use register_assoc * tests/conflicts.at (Useless associativity warning): New. Due to the new warning, many tests had to be updated. * tests/conflicts.at tests/existing.at tests/regression.at: Add the associativity warning in the expected results. * tests/java.at: Fix the java calculator's grammar to remove a useless associativity. * doc/bison.texi (mfcalc example): Fix associativity to remove warning.
* maint: update copyright yearsAkim Demaille2013-01-121-1/+1
| | | | | Suggested by Stefano Lattarini. Run "make update-copyright".
* java: stype is obsoleted by api.value.typeAkim Demaille2012-12-311-7/+7
| | | | | | | | | | This is consistent with the other %define variable names. * data/java.m4: Use api.value.type instead of stype. * doc/bison.texi, NEWS: Document that change. * src/muscle-tab.c (muscle_percent_variable_update): Provide backward compatibility. * tests/java.at: Adjust.
* Merge branch 'maint'Akim Demaille2012-10-161-2/+2
|\ | | | | | | | | | | | | | | | | | | | | * origin/maint: java: use api.location.type and api.position.type Conflicts: NEWS data/java.m4 doc/bison.texi tests/java.at
| * java: use api.location.type and api.position.typeAkim Demaille2012-10-121-4/+4
| | | | | | | | | | * data/java.m4: here. * NEWS, doc/bison.texi, tests/java.at: Adjust.
* | api.tokens.prefix -> api.token.prefixAkim Demaille2012-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | See http://lists.gnu.org/archive/html/bison-patches/2012-02/msg00045.html Note that api.tokens.prefix has not been released, yet. * NEWS, data/bison.m4, doc/bison.texi, tests/c++.at, * tests/calc.at, tests/java.at, tests/local.at: Do it. * src/muscle-tab.c (muscle_percent_variable_update): Ensure backward compatibility.
* | Merge branch 'maint'Akim Demaille2012-10-121-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | Merge remote-tracking branch 'origin/maint'Akim Demaille2012-06-251-14/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * tests: handle locations in a more generic way.Akim Demaille2012-06-221-15/+5
| | | | | | | | | | | | | | | | | | * 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: .
* | Merge remote-tracking branch 'origin/maint'Akim Demaille2012-04-011-0/+66
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * Java: Fix syntax error handling without error token.Tim Landscheidt2012-03-271-0/+66
| | | | | | | | | | * data/lalr1.java (YYParser::parse): Here. * tests/java.at: Add test case.
| * maint: address some syntax-issues remaining after cherry-picking from master.Akim Demaille2012-02-191-10/+10
| | | | | | | | | | | | * 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.
| * maint: run "make update-copyright".Akim Demaille2012-01-131-1/+1
| |