summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* tests: do not use grep -qAkim Demaille2013-09-043-4/+13
| | | | | | | Reported by Daniel Galloway. http://lists.gnu.org/archive/html/bug-bison/2013-08/msg00020.html * tests/java.at: Ignore grep's output instead.
* build: don't require flex for ordinary buildsPaul Eggert2013-08-241-1/+4
| | | | | | | * configure.ac (LEX): Don't fail if this is lex, as flex is not required for ordinary builds. Instead, issue a warning and substitute a no-op LEX. Reported by Michael Felt in <http://lists.gnu.org/archive/html/bug-bison/2013-08/msg00009.html>.
* maint: update .gitignorePaul Eggert2013-08-241-1/+8
| | | | | | * .gitignore: Add *.eps, *.o, *.pdf, *.png, *.stamp, *~, .deps, .dirstamp. Needed to suppress unwanted chatter from 'git status' after a bootstrap build.
* build: port to pre-5.8.7 perlPaul Eggert2013-08-241-1/+1
| | | | | | | | * examples/local.mk (extract): Omit -f from perl options. This doesn't work with perl versions before 5.8.7 that are configured without USE_SITECUSTOMIZE. Reported by Michael Felt in <http://lists.gnu.org/archive/html/bug-bison/2013-08/msg00006.html>.
* tests: minor change to make it easier to test other skeletonsAkim Demaille2013-08-011-9/+8
| | | | * tests/c++.at (Variants): Pass the skeleton as argument.
* uniqstr: fix assertionValentin Tolmer2013-08-011-1/+2
| | | | | * src/uniqstr.c (uniqstr_assert): Really make sure str is a uniqstr, not just whether some uniqstr with the same content was registered.
* build: ship the ASCII art figuresAkim Demaille2013-08-013-1/+5
| | | | | | | | | | We don't ship the *.txt files that are used to build the info file. Reported by Colin Daley. * doc/figs/example.txt: New. * doc/local.mk (bison.info): Depend on the txt files. And ship them.
* doc: prefer the ".gv" extension to ".dot"Akim Demaille2013-08-014-14/+14
| | | | | | | | | | | | | See http://marc.info/?l=graphviz-devel&m=129418103126092 for the motivation (basically, some word processor now uses *.dot). * doc/figs/example-reduce.dot: Rename as... * doc/figs/example-reduce.gv: this. * doc/figs/example-shift.dot: Rename as... * doc/figs/example-shift.gv: this. * doc/figs/example.dot: Rename as... * doc/figs/example.gv: this. * doc/local.mk: Adjust.
* maint: post-release administriviaAkim Demaille2013-07-252-1/+4
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 3.0v3.0Akim Demaille2013-07-251-1/+1
| | | | * NEWS: Record release date.
* regenAkim Demaille2013-07-252-298/+299
|
* news: prepare 3.0Akim Demaille2013-07-251-10/+3
| | | | * NEWS (3.0): Reorder.
* tests: fix invalid assignment when using variants in C++11Akim Demaille2013-07-251-3/+3
| | | | | | | * tests/c++.at (Exception safety): In variant mode $$ is an instance of Object. Assigning YY_NULL in C++98 is incorrect, but behaves ok, as it assigns YY_NULL=0 using Object::operator= (char v). It is wrong in C++11 as there is operator for "$$ = nullptr".
* yacc: beware of "uninitialized uses" warningsAkim Demaille2013-07-252-29/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | Again some issues with the fact that yylval is reported by GCC as possibly not initialized in some cases. Here, the case at hand is the %destructor. I am still not convinced that it is worth going all the trouble of using pragmas to disable temporarily some warnings, instead of just initializing the looking symbol once for all, but that's what Paul voted for, see <http://lists.gnu.org/archive/html/bison-patches/2012-10/msg00050.html>. * data/c.m4 (b4_attribute_define): Define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN, YY_IGNORE_MAYBE_UNINITIALIZED_END, YY_INITIAL_VALUE here, as we will need them in the generation of the destructor function, which is defined in yacc.c before yyparse, which was in charge of defining these macros. * data/yacc.c (b4_declare_scanner_communication_variables): Simplify: trying to factor the definitions of the case pure and impure is too complex. Actually, it is not even clear that this macro should really exist, as even the calls are complex. Be careful not to issue a lone ";", as this is a statement, and C90 forbids declarations after statements ; so write "YY_INITIAL_VALUE(Decl;)", not "YY_INITIAL_VALUE(Decl);".
* gnulib: updateAkim Demaille2013-07-252-13/+20
|
* tests: skip C++ tests if we can't compile a simple programAkim Demaille2013-07-032-3/+35
| | | | | | | | | | | | | | There are possible conflicts between gnulib replacement functions (in <stdio.h>) and their C++ wrappers (in <stream>). Trying to address these in configure seems too hard, and I don't know how to fix the issue in gnulib. Cowardly avoid the problem by skipping C++ tests when this happens. Reported by Stefano Lattarini. http://lists.gnu.org/archive/html/bug-bison/2013-06/msg00001.html * tests/atlocal.in (BISON_CXX_WORKS): Also set it to "skip" if we can't compile a simple program using <stream>. * tests/local.at: Comment changes.
* tests: fix 'find' portability issuesAkim Demaille2013-07-031-4/+5
| | | | | | | Reported by Stefano Lattarini. http://lists.gnu.org/archive/html/bug-bison/2013-06/msg00000.html * tests/output.at (AT_CHECK_OUTPUT): Use Perl instead.
* maint: post-release administriviaAkim Demaille2013-06-242-1/+4
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 2.7.91v2.7.91Akim Demaille2013-06-241-1/+1
| | | | * NEWS: Record release date.
* NEWS: prepare for 2.7.91Akim Demaille2013-06-241-3/+4
| | | | * NEWS (2.7.91): Java push parsers.
* java: rename YYMORE as YYPUSH_MORE for consistency with CAkim Demaille2013-06-243-15/+15
| | | | | | | http://lists.gnu.org/archive/html/bison-patches/2013-06/msg00008.html * data/lalr1.java, doc/bison.texi, tests/javapush.at: s/YYMORE/YYPUSH_MORE.
* tests: fix Java push failure when running with BISON_USE_PUSH_FOR_PULLAkim Demaille2013-06-211-3/+18
| | | | | * tests/javapush.at (Trivial Push Parser with api.push-pull verification): When push for pull is enabled, there is one such function generated.
* style: minor changes in the Java testsAkim Demaille2013-06-212-15/+13
| | | | | | | | * 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.
* java: push: do not reset the error counterAkim Demaille2013-06-211-1/+0
| | | | | | | * data/lalr1.java (parse): here, when in push-pull is in "both" mode. This breaks the test suite, for instance make check TESTSUITEFLAGS='-d 388 BISON_USE_PUSH_FOR_PULL=1'. More generally make maintainer-push-check.
* build: add Valgrind suppression file for GNU/LinuxAkim Demaille2013-06-143-2/+25
| | | | | | * build-aux/linux-gnu.valgrind: New. * build-aux/local.mk: Ship it. * configure.ac: Use it.
* java: add push-parser supportDennis Heimbigner2013-06-136-54/+1142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* build: ship all the files, even if the C++ compiler is brokenAkim Demaille2013-06-111-0/+2
| | | | | * examples/calc++/local.mk: Be sure to ship calc++.test even if the current C++ compiler is not sufficient to run the tests.
* style: comment changes in Java skeletonDennis Heimbigner2013-06-051-23/+47
| | | | * data/lalr1.java: Here.
* tests: fix a G++ warningAkim Demaille2013-06-031-7/+7
| | | | | * tests/c++.at: Use YY_NULL instead of 0 for the null pointer. And formatting changes.
* build: fix a warning from clangAkim Demaille2013-06-031-0/+1
| | | | * src/muscle-tab.c: Declare local functions static.
* maint: post-release administriviaAkim Demaille2013-05-302-1/+4
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 2.7.90v2.7.90Akim Demaille2013-05-301-1/+1
| | | | * NEWS: Record release date.
* style: syntax-check fixesAkim Demaille2013-05-3013-46/+46
| | | | | | | * data/yacc.c, src/Sbitset.c, src/Sbitset.h, src/muscle-tab.h, * src/output.c, src/parse-gram.y, src/reader.c, src/symtab.c, * src/uniqstr.c, src/uniqstr.h: Fix space before parens. * cfg.mk (_space_before_paren_exempt): Add needed exceptions.
* xml: use %empty in the text outputAkim Demaille2013-05-301-1/+1
| | | | * data/xslt/xml2text.xsl: here.
* build: locally disable new GCC warnings that fail on Flex generated codeAkim Demaille2013-05-301-1/+3
| | | | * configure.ac: here.
* fix a memory leakAkim Demaille2013-05-301-6/+12
| | | | | * src/print-xml.c (num_escape_bufs): New. (print_xml): Be sure to release all the escape_bufs.
* regenAkim Demaille2013-05-302-277/+283
|
* build: be sure to include config.h first in the generated parserAkim Demaille2013-05-301-1/+6
| | | | | | | | | Using %code for config.h is wrong, as some headers will already have been included by Bison. In some cases, e.g., glibc's string.h, this results in some declaration not being made for lack of definition of _GNU_SOURCE, which is performed by config.h. * src/parse-gram.y: here.
* Merge remote-tracking branch 'origin/maint'Akim Demaille2013-05-292-2/+2
|\ | | | | | | | | | | | | * origin/maint: maint: post-release administrivia version 2.7.1 regen
| * maint: post-release administriviaAkim Demaille2013-04-152-1/+4
| | | | | | | | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
| * version 2.7.1v2.7.1Akim Demaille2013-04-151-1/+1
| | | | | | | | * NEWS: Record release date.
| * regenAkim Demaille2013-04-152-232/+273
| |
* | drop unused options --raw, -n, -e, --include and -IPetr Machata2013-05-292-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * --raw appears to be ignored. It was marked as obsolete in the commit ec3bc39, and documented as no longer supported as of 1.29 (2001-09-07). Support for %raw appears to have been dropped in e9955c83 on 2002-06-11, but --raw was kept around. Maybe it's time to drop it as well? * Commit e9955c83 dropped support for %no-parser as well, and converted it to option. --no-parser was later dropped in 728c4be2 on 2007-08-12, but -n was kept around, probably as an omission. All three are documented as removed since 2.3b (2008-05-27). * -e existed for a single day in 2001. It was introduced in eeeb962b on 2001-11-27. The handling was removed in c7925b99 on 2001-11-28, but "e" was kept in the list of short options. Probably an omission. * --include appears to be dead code. The option sets a variable, but that variable is not used anywhere. It was added in f6bd5427 on 2001-11-26 as a %-directive, with comments that it's not yet implemented. It was converted to a command-line option later, but doesn't seem to ever have been actually implemented. Signed-off-by: Petr Machata <pmachata@redhat.com> Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
* | gnulib: updateAkim Demaille2013-05-282-9/+10
| |
* | diagnostics: always point to the first directiveAkim Demaille2013-04-222-16/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some directives cannot be used several times (e.g., a given symbol may only have a single printer). In case of repeated definitions, an error is issued for the second definition, yet it is not discarded, and becomes the definition used for the rest of the file. This is not consistent with the idea that multiple definitions are not allowed: discard any repeated directive. * src/symtab.c (symbol_type_set, symbol_code_props_set) (semantic_type_code_props_set, symbol_class_set, symbol_translation): Discard repeated directives. * tests/input.at (Default %printer and %destructor redeclared) (Per-type %printer and %destructor redeclared): Update expectations.
* | tests: factor test for printer/desctructor redefinedAkim Demaille2013-04-221-64/+27
| | | | | | | | | | * tests/input.at (Default %printer and %destructor redeclared): Introduce AT_TEST to factor.
* | diagnostics: use appropriate location for useless precedence/associativityAkim Demaille2013-04-224-134/+138
| | | | | | | | | | | | | | | | | | * src/symtab.c (symbol_precedence_set): Use prec_location, not location (which is the first occurrence of the symbol, possibly just %token). Also, as redefinitions are not allowed, keep the first values, not the subsequent ones. * tests/conflicts.at, tests/existing.at, tests/regression.at: Adjust.
* | tests: factor duplicate expected warningsAkim Demaille2013-04-221-66/+10
| | | | | | | | * tests/existing.at: Instead of "t ? abc : aBc", write "a(t?b:B)c".
* | tests: enable -Wsign-compare and fix corresponding warningsAkim Demaille2013-04-194-14/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -Wsign-compare was disabled for bison's own code, following gnulib's approach. However, the generated parsers should not trigger such warnings. Reported by Efi Fogel. http://lists.gnu.org/archive/html/help-bison/2013-04/msg00018.html See also http://stackoverflow.com/questions/16101062 for the weird "-(unsigned)i" piece of code. * configure.ac (warn_tests): Enable -Wsign-compare. * data/location.cc (position::add_): New. (position::lines, position::columns): Use it. * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): Fix signedness issues.
* | muscle: check more cases of %define variables with code valuesAkim Demaille2013-04-189-97/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.