Compare commits

..
16 Commits
Author SHA1 Message Date
Yijun Yu 1d8565537b b4_yaxx macro enables saving parsing trees into XML, tested on 1.875-3.0.4, see https://github.com/yijunyu/yaxx 2017-03-11 17:33:40 +00:00
Akim Demaille d6445ec10b Merge remote-tracking branch 'origin/maint'
* origin/maint:
  maint: post-release administrivia
  version 3.0.4
  gnulib: update
  build: re-enable compiler warnings, and fix them
  tests: c++: fix a C++03 conformance issue
  tests: fix a title
  c++: reserve 200 slots in the parser's stack
  tests: be more robust to unrecognized synclines, and try to recognize xlc
  tests: fix C++ conformance
  build: fix some warnings
  build: avoid infinite recursions on include_next
2015-01-23 15:17:35 +01:00
Akim Demaille eabb3df7aa Merge remote-tracking branch 'origin/maint' into origin/master
* origin/maint:
  doc: minor fixes
  gnulib: strtoul is considered obsolete and now useless
  c++: avoid warnings when destructors don't use $$
  maint: post-release administrivia
  version 3.0.3
  gnulib: update
2015-01-16 15:14:41 +01:00
Akim Demaille 875ef1b90c symbol: use the first occurrence as an LHS as defining location
Currently on the following grammar:

    %type <foo> foo
    %%
    start: foo | bar | "baz"
    foo: foo
    bar: bar

bison reports:

    warning: 2 nonterminals useless in grammar [-Wother]
    warning: 4 rules useless in grammar [-Wother]
    1.13-15: warning: nonterminal useless in grammar: foo [-Wother]
     %type <foo> foo
                 ^^^
    3.14-16: warning: nonterminal useless in grammar: bar [-Wother]
     start: foo | bar | "baz"
                  ^^^
    [...]

i.e., the location of the first occurrence of a symbol is taken as its
definition point.  In the case of nonterminals, the first occurrence
as a left-hand side of a rule makes more sense:

    warning: 2 nonterminals useless in grammar [-Wother]
    warning: 4 rules useless in grammar [-Wother]
    4.1-3: warning: nonterminal useless in grammar: foo [-Wother]
     foo: foo
     ^^^
    5.1-3: warning: nonterminal useless in grammar: bar [-Wother]
     bar: bar
     ^^^
    [...]

* src/symtab.h, src/symtab.c (symbol::location_of_lhs): New.
(symbol_location_as_lhs_set): New.
* src/parse-gram.y (current_lhs): Use it.
* tests/reduce.at: Update locations.
2015-01-14 17:05:35 +01:00
Akim Demaille 650af77812 reduce: don't complain about rules whose lhs is useless
In the following grammar, the 'exp' nonterminal is trivially useless.
So, of course, its rules are useless too.

    %%
    input: '0' | exp
    exp: exp '+' exp | exp '-' exp | '(' exp ')'

Previously all the useless rules were reported, including those whose
left-hand side is the 'exp' nonterminal:

    warning: 1 nonterminal useless in grammar [-Wother]
    warning: 4 rules useless in grammar [-Wother]
    2.14-16: warning: nonterminal useless in grammar: exp [-Wother]
     input: '0' | exp
                  ^^^
    2.14-16: warning: rule useless in grammar [-Wother]
     input: '0' | exp
                  ^^^
  ! 3.6-16: warning: rule useless in grammar [-Wother]
  !  exp: exp '+' exp | exp '-' exp | '(' exp ')'
  !       ^^^^^^^^^^^
  ! 3.20-30: warning: rule useless in grammar [-Wother]
  !  exp: exp '+' exp | exp '-' exp | '(' exp ')'
  !                     ^^^^^^^^^^^
  ! 3.34-44: warning: rule useless in grammar [-Wother]
  !  exp: exp '+' exp | exp '-' exp | '(' exp ')'
  !                                   ^^^^^^^^^^^

The interest of being so verbose is dubious.  I suspect most of the
time nonterminals are not expected to be useless, so the user wants to
fix the nonterminal, not remove its rules.  And even if the user
wanted to get rid of its rules, the position of these rules probably
does not help more that just having the name of the nonterminal.

This commit discard these messages, marked with '!', and keep the
others.  In particular, we still report:

    2.14-16: warning: rule useless in grammar [-Wother]
     input: '0' | exp
                  ^^^

All the useless rules (including the '!' ones) are still reported in
the reports (xml, text, etc.); only the diagnostics on stderr change.

* src/gram.c (grammar_rules_useless_report): Don't complain about
useless rules whose lhs is useless.
* src/reduce.h, src/reduce.c (reduce_nonterminal_useless_in_grammar):
Take a sym_content as argument.
Adjust callers.
* tests/reduce.at (Useless Rules, Underivable Rules, Reduced Automaton):
Adjust.
2015-01-14 13:59:53 +01:00
Akim Demaille c03a8db0cc style: reduce: use unsigned to count a number of objects
* src/reduce.h, src/reduce.c (nuseful_productions, nuseless_productions)
(nuseful_nonterminals, nuseless_nonterminals): Declare as unsigned.
Simplify "0 <" tests into non-zero tests.
2015-01-14 10:13:49 +01:00
Akim Demaille 8b06c6b871 style: reduce: introduce and use a swap for bitset
* src/reduce.c (bitset_swap): New.
Use it.
2015-01-14 10:13:49 +01:00
Akim Demaille c5da1a2adc style: reduce: reduce scopes and other stylistic changes
* src/reduce.c: Various stylistic changes:
Reduce scopes.
Prefer ++i to i++.
Prefer < to >.
2015-01-14 10:13:30 +01:00
Akim Demaille dfd5b89d01 Merge remote-tracking branch 'origin/maint'
* origin/maint:
  tests: split a large test case into several smaller ones
  package: a bit of trouble shooting indications
  doc: liby's main arms the internationalization
  bison: avoid warnings from static code analysis
  c++: fix the use of destructors when variants are enabled
  style: tests: simplify the handling of some C++ tests
  c++: symbols can be empty, so use it
  c++: variants: don't leak the lookahead in error recovery
  c++: provide a means to clear symbols
  c++: clean up the handling of empty symbols
  c++: comment and style changes
  c++: variants: comparing addresses of typeid.name() is undefined
  c++: locations: complete the API and fix comments
  build: do not clean figure sources in make clean
2015-01-13 14:45:15 +01:00
Akim Demaille 13e294ee55 Merge remote-tracking branch 'origin/maint'
* origin/maint:
  build: don't try to generate docs when cross-compiling
  package: fix a reporter's name
  %union: fix the support for named %union
  package: bump to 2015
  flex: don't trust YY_USER_INIT
  yacc.c: fix broken union when api.value.type=union and %defines are used
  doc: fix missing xref
  gnulib: update
  location: remove some ugly debugging code traces
  build: use abort to pacify compiler errors
  package: bump to 2014
  doc: specify documentation encoding
2015-01-05 13:51:30 +01:00
Akim Demaille 8044fda634 symbols: properly fuse the properties of two symbol aliases
This completes and fixes a728075710.
Reported by Valentin Tolmer.

Before it Bison used to put the properties of the symbols
(associativity, printer, etc.) in the 'symbol' structure.  An
identifier-named token (FOO) and its string-named alias ("foo")
duplicated these properties, and symbol_check_alias_consistency()
checked that both had compatible properties and fused them, at the end
of the parsing of the grammar.

The commit a728075710 introduces a
sym_content structure that keeps all these properties, and ensures
that both aliases point to the same sym_content (instead of
duplicating).  However, it removed symbol_check_alias_consistency,
which resulted in the non-fusion of *existing* properties:

  %token FOO "foo"
  %left FOO %left "foo"

was properly diagnosed as a redeclaration, but

  %left FOO %left "foo"
  %token FOO "foo"

was not, as the properties of FOO and "foo" were not checked before
fusion.  It certainly also means that

  %left "foo"
  %token FOO "foo"

did not transfer properly the associativity to FOO.

The fix is simple: reintroduce symbol_check_alias_consistency (under a
better name, symbol_merge_properties) and call it where appropriate.

Also, that commit made USER_NUMBER_HAS_STRING_ALIAS useless, but left
it.

* src/symtab.h (USER_NUMBER_HAS_STRING_ALIAS): Remove, unused.
Adjust dependencies.
* src/symtab.c (symbol_merge_properties): New, based on the former
symbol_check_alias_consistency.
* tests/input.at: Re-enable tests that we now pass.
2013-12-10 09:43:33 +01:00
Akim Demaille b7d4c48e55 Merge remote-tracking branch 'origin/maint'
* origin/maint:
  package: install the examples
  package: install README and the like in docdir
  diagnostics: fix the order of multiple declarations reports
  symbol: provide an easy means to compare them in source order

Conflicts:
  src/symtab.c
  tests/input.at

* tests/input.at: Comment out a test that master currently does not
pass (because of a728075710).
2013-12-10 08:53:07 +01:00
Akim Demaille fc6c85664a Merge remote-tracking branch 'origin/maint'
* origin/maint: (43 commits)
  maint: post-release administrivia
  version 3.0.2
  gnulib: update
  output: do not generate source files when late errors are caught
  output: record what generated files are source or report files
  output: do not generate source files when early errors are caught
  xml: also use "%empty" with html output
  style: formatting changes
  xml: also display %empty for empty right-hand sides
  reports: display %empty in the generated pointed-rules
  news: YYERROR vs variants
  style: scope reduction in lalr.cc
  lalr1.cc: formatting changes
  lalr1.cc: fix the support of YYERROR with variants
  tests: check $$'s destruction with variant, YYERROR, and no error recovery
  tests: simplify useless obfuscation
  skeletons: use better names when computing a "goto"
  maint: post-release administrivia
  version 3.0.1
  aver: it is no longer "protected against NDEBUG"
  ...

Conflicts:
  data/glr.c
2013-12-09 10:43:37 +01:00
Akim Demaille 4f3cc9c21b Merge remote-tracking branch 'origin/maint'
* origin/maint:
  glr: more assertions
  glr: shorten scopes
  glr: formatting changes
  glr: better use of tracing macros
  examples: improve the output of the "variant" example
  variant: remove useless assertion
  tests: remove stray debugging traces
  tests: do not use grep -q
  build: don't require flex for ordinary builds
  maint: update .gitignore
  build: port to pre-5.8.7 perl
  tests: minor change to make it easier to test other skeletons
  uniqstr: fix assertion
2013-09-19 16:33:20 +02:00
Akim Demaille 55a2063005 glr: simplify the invocation of YYLLOC_DEFAULT
The commit which introduces yyresolveLocations (commit
8710fc41aa) saves and restores the
look-ahead (type, value and location) for no clear reason.  This
appears to be useless.

* data/glr.c (yyresolveLocations): Don't save/restore the current
look-ahead to call YYLLOC_DEFAULT.
Minor style changes.
2013-09-19 16:14:07 +02:00
Valentin TolmerandAkim Demaille a728075710 symbols: improve symbol aliasing
Rather than having duplicate info in the symbol and the alias that has
to be resolved later on, both the symbol and the alias have a common
pointer to a separate structure containing this info.

* src/symtab.h (sym_content): New structure.
* src/symtab.c (sym_content_new, sym_content_free, symbol_free): New

* src/AnnotationList.c, src/conflicts.c, src/gram.c, src/gram.h,
* src/graphviz.c, src/ielr.c, src/output.c, src/parse-gram.y, src/print.c
* src/print-xml.c, src/print_graph.c, src/reader.c, src/reduce.c,
* src/state.h, src/symlist.c, src/symtab.c, src/symtab.h, src/tables.c:
Adjust.

* tests/input.at: Fix expectations (order changes).
2013-08-01 12:49:51 +02:00
209 changed files with 1849 additions and 1683 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ and nasty bugs.
-----
Copyright (C) 1998-2015, 2018 Free Software Foundation, Inc.
Copyright (C) 1998-2015 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
+2 -2
View File
@@ -26733,8 +26733,8 @@
-----
Copyright (C) 1987-1988, 1991-2015, 2018 Free Software
Foundation, Inc.
Copyright (C) 1987-1988, 1991-2015 Free Software Foundation,
Inc.
Copying and distribution of this file, with or without
modification, are permitted provided the copyright notice and this
+1 -1
View File
@@ -1,6 +1,6 @@
## Process this file with automake to produce Makefile.in.
# Copyright (C) 2001-2015, 2018 Free Software Foundation, Inc.
# Copyright (C) 2001-2015 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
+39 -24
View File
@@ -1,34 +1,49 @@
GNU Bison NEWS
* Noteworthy changes in release 3.0.5 (2018-05-27) [stable]
* Noteworthy changes in release ?.? (????-??-??) [?]
** Bug fixes
** Diagnostics about useless rules
*** C++: Fix support of 'syntax_error'
In the following grammar, the 'exp' nonterminal is trivially useless. So,
of course, its rules are useless too.
One incorrect 'inline' resulted in linking errors about the constructor of
the syntax_error exception.
%%
input: '0' | exp
exp: exp '+' exp | exp '-' exp | '(' exp ')'
*** C++: Fix warnings
Previously all the useless rules were reported, including those whose
left-hand side is the 'exp' nonterminal:
GCC 7.3 (with -O1 or -O2 but not -O0 or -O3) issued null-dereference
warnings about yyformat being possibly null. It also warned about the
deprecated implicit definition of copy constructors when there's a
user-defined (copy) assignment operator.
warning: 1 nonterminal useless in grammar [-Wother]
warning: 4 rules useless in grammar [-Wother]
2.14-16: warning: nonterminal useless in grammar: exp [-Wother]
input: '0' | exp
^^^
2.14-16: warning: rule useless in grammar [-Wother]
input: '0' | exp
^^^
3.6-16: warning: rule useless in grammar [-Wother]
exp: exp '+' exp | exp '-' exp | '(' exp ')'
^^^^^^^^^^^
3.20-30: warning: rule useless in grammar [-Wother]
exp: exp '+' exp | exp '-' exp | '(' exp ')'
^^^^^^^^^^^
3.34-44: warning: rule useless in grammar [-Wother]
exp: exp '+' exp | exp '-' exp | '(' exp ')'
^^^^^^^^^^^
*** Location of errors
Now, rules whose left-hand side symbol is useless are no longer reported
as useless. The locations of the errors have also been adjusted to point
to the first use of the nonterminal as a left-hand side of a rule:
In C++ parsers, out-of-bounds errors can happen when a rule with an empty
ride-hand side raises a syntax error. The behavior of the default parser
(yacc.c) in such a condition was undefined.
Now all the parsers match the behavior of glr.c: @$ is used as the
location of the error. This handles gracefully rules with and without
rhs.
*** Portability fixes in the test suite
On some platforms, some Java and/or C++ tests were failing.
warning: 1 nonterminal useless in grammar [-Wother]
warning: 4 rules useless in grammar [-Wother]
3.1-3: warning: nonterminal useless in grammar: exp [-Wother]
exp: exp '+' exp | exp '-' exp | '(' exp ')'
^^^
2.14-16: warning: rule useless in grammar [-Wother]
input: '0' | exp
^^^
* Noteworthy changes in release 3.0.4 (2015-01-23) [stable]
@@ -91,7 +106,7 @@ GNU Bison NEWS
extracted from the documentation:
- rpcalc
Reverse Polish Calculator, a simple introductory example.
Reverse polish calculator, a simple introductory example.
- mfcalc
Multi-function Calc, a calculator with memory and functions and located
error messages.
@@ -2778,7 +2793,7 @@ Output file does not redefine const for C++.
-----
Copyright (C) 1995-2015, 2018 Free Software Foundation, Inc.
Copyright (C) 1995-2015 Free Software Foundation, Inc.
This file is part of Bison, the GNU Parser Generator.
+1 -1
View File
@@ -36,7 +36,7 @@ to the bison package.
-----
Copyright (C) 2002, 2005, 2009-2015, 2018 Free Software Foundation, Inc.
Copyright (C) 2002, 2005, 2009-2015 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -44,7 +44,7 @@ End:
-----
Copyright (C) 1992, 1998-1999, 2003-2005, 2008-2015, 2018 Free Software
Copyright (C) 1992, 1998-1999, 2003-2005, 2008-2015 Free Software
Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -12,7 +12,7 @@ the problems you encounter.
-----
Copyright (C) 2002, 2004, 2009-2015, 2018 Free Software Foundation, Inc.
Copyright (C) 2002, 2004, 2009-2015 Free Software Foundation, Inc.
This file is part of GNU Bison.
+97 -94
View File
@@ -9,19 +9,19 @@ Everything related to the development of Bison is on Savannah:
* Administrivia
** If you incorporate a change from somebody on the net:
First, if it is a large change, you must make sure they have signed the
appropriate paperwork. Second, be sure to add their name and email address
to THANKS.
First, if it is a large change, you must make sure they have signed
the appropriate paperwork. Second, be sure to add their name and
email address to THANKS.
** If a change fixes a test, mention the test in the commit message.
** Bug reports
If somebody reports a new bug, mention his name in the commit message and in
the test case you write. Put him into THANKS.
If somebody reports a new bug, mention his name in the commit message
and in the test case you write. Put him into THANKS.
The correct response to most actual bugs is to write a new test case which
demonstrates the bug. Then fix the bug, re-run the test suite, and check
everything in.
The correct response to most actual bugs is to write a new test case
which demonstrates the bug. Then fix the bug, re-run the test suite,
and check everything in.
* Hacking
@@ -30,17 +30,17 @@ everything in.
Which include serious bug fixes, must be mentioned in NEWS.
** Translations
Only user visible strings are to be translated: error messages, bits of the
.output file etc. This excludes impossible error messages (comparable to
assert/abort), and all the --trace output which is meant for the maintainers
only.
Only user visible strings are to be translated: error messages, bits
of the .output file etc. This excludes impossible error messages
(comparable to assert/abort), and all the --trace output which is
meant for the maintainers only.
** Horizontal tabs
Do not add horizontal tab characters to any file in Bison's repository
except where required. For example, do not use tabs to format C code.
However, make files, ChangeLog, and some regular expressions require tabs.
Also, test cases might need to contain tabs to check that Bison properly
processes tabs in its input.
However, make files, ChangeLog, and some regular expressions require
tabs. Also, test cases might need to contain tabs to check that Bison
properly processes tabs in its input.
* Working from the repository
@@ -103,16 +103,14 @@ to perform the first checkout of the submodules, run
$ git submodule update --init
Git submodule support is weak before versions 1.6 and later, upgrade Git if
your version is older.
The next step is to get other files needed to build, which are
extracted from other source packages:
$ ./bootstrap
Bootstrapping updates the submodules to the versions registered in the
top-level directory. To change gnulib, first check out the version you want
in `gnulib`, then commit this change in Bison's repository, and finally run
bootstrap.
If it fails with missing symbols (e.g., "error: possibly undefined macro:
AC_PROG_GNU_M4"), you are likely to have forgotten the submodule
initialization part. Otherwise, there you are! Just
@@ -139,12 +137,13 @@ explicitly by the user.
*** Updating Bison
If you pull a newer version of a branch, say via "git pull", you might
import requests for updated submodules. A simple "git diff" will reveal if
the current version of the submodule (i.e., the actual contents of the
gnulib directory) and the current request from the subscriber (i.e., the
reference of the version of gnulib that the Bison repository requests)
differ. To upgrade the submodules (i.e., to check out the version that is
actually requested by the subscriber, run "git submodule update".
import requests for updated submodules. A simple "git diff" will
reveal if the current version of the submodule (i.e., the actual
contents of the gnulib directory) and the current request from the
subscriber (i.e., the reference of the version of gnulib that the
Bison repository requests) differ. To upgrade the submodules (i.e.,
to check out the version that is actually requested by the subscriber,
run "git submodule update".
$ git pull
$ git submodule update
@@ -168,8 +167,8 @@ Register your changes.
$ git checkin ...
For a suggestion of what gnulib commit might be stable enough for a formal
release, see the ChangeLog in the latest gnulib snapshot at:
For a suggestion of what gnulib commit might be stable enough for a
formal release, see the ChangeLog in the latest gnulib snapshot at:
http://erislabs.net/ianb/projects/gnulib/
@@ -179,9 +178,9 @@ The Autoconf files we use are currently:
lib/m4sugar/m4sugar.m4
lib/m4sugar/foreach.m4
These files don't change very often in Autoconf, so it should be relatively
straight-forward to examine the differences in order to decide whether to
update.
These files don't change very often in Autoconf, so it should be
relatively straight-forward to examine the differences in order to
decide whether to update.
* Test suite
@@ -244,99 +243,102 @@ suite. So currently, do not try to run valgrind on Mac OS X.
Try to run the test suite with more severe conditions before a
release:
- Configure the package with --enable-gcc-warnings, so that one checks that
1. Bison compiles cleanly, 2. the parsers it produces compile cleanly too.
- Configure the package with --enable-gcc-warnings, so that one checks
that 1. Bison compiles cleanly, 2. the parsers it produces compile
cleanly too.
- Maybe build with -DGNULIB_POSIXCHECK, which suggests gnulib modules that
can fix portability issues. See if you really want to pay attention to
its warnings; there's no need to obey blindly to it
- Maybe build with -DGNULIB_POSIXCHECK, which suggests gnulib modules
that can fix portability issues. See if you really want to pay
attention to its warnings; there's no need to obey blindly to it
(<http://lists.gnu.org/archive/html/bison-patches/2012-05/msg00057.html>).
- Check with "make syntax-check" if there are issues diagnosed by gnulib.
- Check with "make syntax-check" if there are issues diagnosed by
gnulib.
- run "make maintainer-check" which:
- runs "valgrind -q bison" to run Bison under Valgrind.
- runs the parsers under Valgrind.
- runs the test suite with G++ as C compiler...
- run "make maintainer-push-check", which runs "make maintainer-check" while
activating the push implementation and its pull interface wrappers in many
test cases that were originally written to exercise only the pull
implementation. This makes certain the push implementation can perform
every task the pull implementation can.
- run "make maintainer-push-check", which runs "make maintainer-check"
while activating the push implementation and its pull interface wrappers
in many test cases that were originally written to exercise only the
pull implementation. This makes certain the push implementation can
perform every task the pull implementation can.
- run "make maintainer-xml-check", which runs "make maintainer-check" while
checking Bison's XML automaton report for every working grammar passed to
Bison in the test suite. The check just diffs the output of Bison's
included XSLT style sheets with the output of --report=all and --graph.
- run "make maintainer-xml-check", which runs "make maintainer-check"
while checking Bison's XML automaton report for every working grammar
passed to Bison in the test suite. The check just diffs the output of
Bison's included XSLT style sheets with the output of --report=all and
--graph.
- running "make maintainer-release-check" takes care of running
maintainer-check, maintainer-push-check and maintainer-xml-check.
- Change tests/atlocal/CFLAGS to add your preferred options. For instance,
"-traditional" to check that the parsers are K&R. Note that it does not
make sense for glr.c, which should be ANSI, but currently is actually GNU
C, nor for lalr1.cc.
- Change tests/atlocal/CFLAGS to add your preferred options. For
instance, "-traditional" to check that the parsers are K&R. Note
that it does not make sense for glr.c, which should be ANSI, but
currently is actually GNU C, nor for lalr1.cc.
- Test with a very recent version of GCC for both C and C++. Testing with
older versions that are still in use is nice too.
- Test with a very recent version of GCC for both C and C++. Testing
with older versions that are still in use is nice too.
* Release Procedure
This section needs to be updated to take into account features from gnulib.
In particular, be sure to read README-release.
This section needs to be updated to take into account features from
gnulib. In particular, be sure to read README-release.
** Update the submodules. See above.
** Update maintainer tools, such as Autoconf. See above.
** Try to get the *.pot files to the Translation Project at least one
week before a stable release, to give them time to translate them. Before
generating the *.pot files, make sure that po/POTFILES.in and
runtime-po/POTFILES.in list all files with translatable strings. This
helps: grep -l '\<_(' *
week before a stable release, to give them time to translate them.
Before generating the *.pot files, make sure that po/POTFILES.in and
runtime-po/POTFILES.in list all files with translatable strings.
This helps: grep -l '\<_(' *
** Tests
See above.
** Update the foreign files
Running "./bootstrap" in the top level should update them all for you. This
covers PO files too. Sometimes a PO file contains problems that causes it
to be rejected by recent Gettext releases; please report these to the
Translation Project.
Running "./bootstrap" in the top level should update them all for you.
This covers PO files too. Sometimes a PO file contains problems that
causes it to be rejected by recent Gettext releases; please report
these to the Translation Project.
** Update README
Make sure the information in README is current. Most notably, make sure it
recommends a version of GNU M4 that is compatible with the latest Bison
sources.
Make sure the information in README is current. Most notably, make sure
it recommends a version of GNU M4 that is compatible with the latest
Bison sources.
** Check copyright years.
We update years in copyright statements throughout Bison once at the start
of every year by running "make update-copyright". However, before a
release, it's good to verify that it's actually been run. Besides the
copyright statement for each Bison file, check the copyright statements that
the skeletons insert into generated parsers, and check all occurrences of
PACKAGE_COPYRIGHT_YEAR in configure.ac.
We update years in copyright statements throughout Bison once at the
start of every year by running "make update-copyright". However, before
a release, it's good to verify that it's actually been run. Besides the
copyright statement for each Bison file, check the copyright statements
that the skeletons insert into generated parsers, and check all
occurrences of PACKAGE_COPYRIGHT_YEAR in configure.ac.
** Update NEWS, commit and tag.
See do-release-commit-and-tag in README-release. For a while, we used beta
names such as "2.6_rc1". Now that we use gnulib in the release procedure,
we must use "2.5.90", which has the additional benefit of being properly
sorted in "git tag -l".
See do-release-commit-and-tag in README-release. For a while, we used
beta names such as "2.6_rc1". Now that we use gnulib in the release
procedure, we must use "2.5.90", which has the additional benefit of
being properly sorted in "git tag -l".
** make alpha, beta, or stable
See README-release.
** Upload
There are two ways to upload the tarballs to the GNU servers: using gnupload
(from gnulib), or by hand. Obviously prefer the former. But in either
case, be sure to read the following paragraph.
There are two ways to upload the tarballs to the GNU servers: using
gnupload (from gnulib), or by hand. Obviously prefer the former. But
in either case, be sure to read the following paragraph.
*** Setup
You need "gnupg".
Make sure your public key has been uploaded at least to keys.gnupg.net. You
can upload it with:
Make sure your public key has been uploaded at least to
keys.gnupg.net. You can upload it with:
gpg --keyserver keys.gnupg.net --send-keys F125BDF3
@@ -345,8 +347,8 @@ where F125BDF3 should be replaced with your key ID.
*** Using gnupload
You need "ncftp".
At the end "make stable" (or alpha/beta) will display the procedure to run.
Just copy and paste it in your shell.
At the end "make stable" (or alpha/beta) will display the procedure to
run. Just copy and paste it in your shell.
*** By hand
@@ -408,9 +410,9 @@ sections that have been removed or renamed):
$ ls -lt
Remove these files and commit their removal to CVS. For each of these
files, add a line to the file .symlinks. This will ensure that hyperlinks
to the removed files will redirect to the entire manual; this is better than
a 404 error.
files, add a line to the file .symlinks. This will ensure that
hyperlinks to the removed files will redirect to the entire manual; this
is better than a 404 error.
There is a problem with 'index.html' being written twice (once for POSIX
function 'index', once for the table of contents); you can ignore this
@@ -429,18 +431,19 @@ Complete/fix the announcement file. The generated list of recipients
([email protected], [email protected], [email protected],
[email protected], and [email protected]) is
appropriate for a stable release or a "serious beta". For any other
release, drop at least [email protected]. For an example of how to fill out
the rest of the template, search the mailing list archives for the most
recent release announcement.
release, drop at least [email protected]. For an example of how to
fill out the rest of the template, search the mailing list archives
for the most recent release announcement.
For a stable release, send the same announcement on the comp.compilers
newsgroup by sending email to [email protected]. Do not make any Cc as the
moderator will throw away anything cross-posted or Cc'ed. It really needs
to be a separate message.
newsgroup by sending email to [email protected]. Do not make any Cc as
the moderator will throw away anything cross-posted or Cc'ed. It really
needs to be a separate message.
** Prepare NEWS
So that developers don't accidentally add new items to the old NEWS entry,
create a new empty entry in line 3 (without the two leading spaces):
So that developers don't accidentally add new items to the old NEWS
entry, create a new empty entry in line 3 (without the two leading
spaces):
* Noteworthy changes in release ?.? (????-??-??) [?]
@@ -448,7 +451,7 @@ Push these changes.
-----
Copyright (C) 2002-2005, 2007-2015, 2018 Free Software Foundation, Inc.
Copyright (C) 2002-2005, 2007-2015 Free Software Foundation, Inc.
This file is part of GNU Bison.
+1 -5
View File
@@ -15,7 +15,6 @@ Anthony Heading [email protected]
Antonio Silva Correia [email protected]
Arnold Robbins [email protected]
Art Haas [email protected]
Askar Safin [email protected]
Baron Schwartz [email protected]
Ben Pfaff [email protected]
Benoit Perrot [email protected]
@@ -40,7 +39,6 @@ Daniel Hagerty [email protected]
David J. MacKenzie [email protected]
David Kastrup [email protected]
Dennis Clarke [email protected]
Derek Clegg [email protected]
Derek M. Jones [email protected]
Di-an Jan [email protected]
Dick Streefland [email protected]
@@ -50,7 +48,6 @@ Enrico Scholz [email protected]
Eric Blake [email protected]
Evgeny Stambulchik [email protected]
Fabrice Bauzac [email protected]
Ferdinand Thiessen [email protected]
Florian Krohm [email protected]
Frank Heckenbach [email protected]
Frans Englich [email protected]
@@ -96,7 +93,6 @@ Michiel De Wilde [email protected]
Mickael Labau [email protected]
Mike Castle [email protected]
Mike Sullivan [email protected]
Nate Guerin [email protected]
Neil Booth [email protected]
Nelson H. F. Beebe [email protected]
Nick Bowler [email protected]
@@ -176,7 +172,7 @@ End:
-----
Copyright (C) 2000-2015, 2018 Free Software Foundation, Inc.
Copyright (C) 2000-2015 Free Software Foundation, Inc.
This file is part of Bison, the GNU Parser Generator.
+1 -2
View File
@@ -369,8 +369,7 @@ End:
-----
Copyright (C) 2001-2004, 2006, 2008-2015, 2018 Free Software Foundation,
Inc.
Copyright (C) 2001-2004, 2006, 2008-2015 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
+139 -144
View File
@@ -1,10 +1,10 @@
#! /bin/sh
# Print a version string.
scriptversion=2018-04-28.14; # UTC
scriptversion=2014-12-08.12; # UTC
# Bootstrap this package from checked-out sources.
# Copyright (C) 2003-2018 Free Software Foundation, Inc.
# Copyright (C) 2003-2015 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@ scriptversion=2018-04-28.14; # UTC
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Originally written by Paul Eggert. The canonical version of this
# script is maintained as build-aux/bootstrap in gnulib, however, to
@@ -42,7 +42,7 @@ export LC_ALL
local_gl_dir=gl
# Honor $PERL, but work even if there is none.
# Honour $PERL, but work even if there is none
PERL="${PERL-perl}"
me=$0
@@ -109,6 +109,9 @@ die() { warn_ "$@"; exit 1; }
# Configuration.
# Name of the Makefile.am
gnulib_mk=gnulib.mk
# List of gnulib modules needed.
gnulib_modules=
@@ -138,7 +141,7 @@ po_download_command_format=\
# Fallback for downloading .po files (if rsync fails).
po_download_command_format2=\
"wget --mirror -nd -q -np -A.po -P '%s' \
https://translationproject.org/latest/%s/"
http://translationproject.org/latest/%s/"
# Prefer a non-empty tarname (4th argument of AC_INIT if given), else
# fall back to the package name (1st argument with munging)
@@ -167,15 +170,7 @@ source_base=lib
m4_base=m4
doc_base=doc
tests_base=tests
gnulib_extra_files="
build-aux/install-sh
build-aux/mdate-sh
build-aux/texinfo.tex
build-aux/depcomp
build-aux/config.guess
build-aux/config.sub
doc/INSTALL
"
gnulib_extra_files=''
# Additional gnulib-tool options to use. Use "\newline" to break lines.
gnulib_tool_option_extras=
@@ -269,18 +264,24 @@ case "$0" in
*) test -r "$0.conf" && . ./"$0.conf" ;;
esac
# Extra files from gnulib, which override files from other sources.
test -z "${gnulib_extra_files}" && \
gnulib_extra_files="
build-aux/install-sh
build-aux/mdate-sh
build-aux/texinfo.tex
build-aux/depcomp
build-aux/config.guess
build-aux/config.sub
doc/INSTALL
"
if test "$vc_ignore" = auto; then
vc_ignore=
test -d .git && vc_ignore=.gitignore
test -d CVS && vc_ignore="$vc_ignore .cvsignore"
fi
if test x"$gnulib_modules$gnulib_files$gnulib_extra_files" = x; then
use_gnulib=false
else
use_gnulib=true
fi
# Translate configuration into internal form.
# Parse options.
@@ -417,30 +418,28 @@ sort_ver() { # sort -V is not generally available
done
}
get_version_sed='
# Move version to start of line.
s/.*[v ]\([0-9]\)/\1/
# Skip lines that do not start with version.
/^[0-9]/!d
# Remove characters after the version.
s/[^.a-z0-9-].*//
# The first component must be digits only.
s/^\([0-9]*\)[a-z-].*/\1/
#the following essentially does s/5.005/5.5/
s/\.0*\([1-9]\)/.\1/g
p
q'
get_version() {
app=$1
$app --version >/dev/null 2>&1 || { $app --version; return 1; }
$app --version 2>&1 | sed -n "$get_version_sed"
$app --version 2>&1 |
sed -n '# Move version to start of line.
s/.*[v ]\([0-9]\)/\1/
# Skip lines that do not start with version.
/^[0-9]/!d
# Remove characters after the version.
s/[^.a-z0-9-].*//
# The first component must be digits only.
s/^\([0-9]*\)[a-z-].*/\1/
#the following essentially does s/5.005/5.5/
s/\.0*\([1-9]\)/.\1/g
p
q'
}
check_versions() {
@@ -611,87 +610,85 @@ git_modules_config () {
test -f .gitmodules && git config --file .gitmodules "$@"
}
if $use_gnulib; then
if $use_git; then
gnulib_path=$(git_modules_config submodule.gnulib.path)
test -z "$gnulib_path" && gnulib_path=gnulib
if $use_git; then
gnulib_path=$(git_modules_config submodule.gnulib.path)
test -z "$gnulib_path" && gnulib_path=gnulib
fi
# Get gnulib files. Populate $GNULIB_SRCDIR, possibly updating a
# submodule, for use in the rest of the script.
case ${GNULIB_SRCDIR--} in
-)
# Note that $use_git is necessarily true in this case.
if git_modules_config submodule.gnulib.url >/dev/null; then
echo "$0: getting gnulib files..."
git submodule init -- "$gnulib_path" || exit $?
git submodule update -- "$gnulib_path" || exit $?
elif [ ! -d "$gnulib_path" ]; then
echo "$0: getting gnulib files..."
trap cleanup_gnulib 1 2 13 15
shallow=
git clone -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2'
git clone $shallow git://git.sv.gnu.org/gnulib "$gnulib_path" ||
cleanup_gnulib
trap - 1 2 13 15
fi
# Get gnulib files. Populate $GNULIB_SRCDIR, possibly updating a
# submodule, for use in the rest of the script.
case ${GNULIB_SRCDIR--} in
-)
# Note that $use_git is necessarily true in this case.
if git_modules_config submodule.gnulib.url >/dev/null; then
echo "$0: getting gnulib files..."
git submodule init -- "$gnulib_path" || exit $?
git submodule update -- "$gnulib_path" || exit $?
elif [ ! -d "$gnulib_path" ]; then
echo "$0: getting gnulib files..."
trap cleanup_gnulib 1 2 13 15
shallow=
git clone -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2'
git clone $shallow git://git.sv.gnu.org/gnulib "$gnulib_path" ||
cleanup_gnulib
trap - 1 2 13 15
GNULIB_SRCDIR=$gnulib_path
;;
*)
# Use GNULIB_SRCDIR directly or as a reference.
if $use_git && test -d "$GNULIB_SRCDIR"/.git && \
git_modules_config submodule.gnulib.url >/dev/null; then
echo "$0: getting gnulib files..."
if git submodule -h|grep -- --reference > /dev/null; then
# Prefer the one-liner available in git 1.6.4 or newer.
git submodule update --init --reference "$GNULIB_SRCDIR" \
"$gnulib_path" || exit $?
else
# This fallback allows at least git 1.5.5.
if test -f "$gnulib_path"/gnulib-tool; then
# Since file already exists, assume submodule init already complete.
git submodule update -- "$gnulib_path" || exit $?
else
# Older git can't clone into an empty directory.
rmdir "$gnulib_path" 2>/dev/null
git clone --reference "$GNULIB_SRCDIR" \
"$(git_modules_config submodule.gnulib.url)" "$gnulib_path" \
&& git submodule init -- "$gnulib_path" \
&& git submodule update -- "$gnulib_path" \
|| exit $?
fi
fi
GNULIB_SRCDIR=$gnulib_path
;;
*)
# Use GNULIB_SRCDIR directly or as a reference.
if $use_git && test -d "$GNULIB_SRCDIR"/.git && \
git_modules_config submodule.gnulib.url >/dev/null; then
echo "$0: getting gnulib files..."
if git submodule -h|grep -- --reference > /dev/null; then
# Prefer the one-liner available in git 1.6.4 or newer.
git submodule update --init --reference "$GNULIB_SRCDIR" \
"$gnulib_path" || exit $?
else
# This fallback allows at least git 1.5.5.
if test -f "$gnulib_path"/gnulib-tool; then
# Since file already exists, assume submodule init already complete.
git submodule update -- "$gnulib_path" || exit $?
else
# Older git can't clone into an empty directory.
rmdir "$gnulib_path" 2>/dev/null
git clone --reference "$GNULIB_SRCDIR" \
"$(git_modules_config submodule.gnulib.url)" "$gnulib_path" \
&& git submodule init -- "$gnulib_path" \
&& git submodule update -- "$gnulib_path" \
|| exit $?
fi
fi
GNULIB_SRCDIR=$gnulib_path
fi
;;
esac
# $GNULIB_SRCDIR now points to the version of gnulib to use, and
# we no longer need to use git or $gnulib_path below here.
if $bootstrap_sync; then
cmp -s "$0" "$GNULIB_SRCDIR/build-aux/bootstrap" || {
echo "$0: updating bootstrap and restarting..."
case $(sh -c 'echo "$1"' -- a) in
a) ignored=--;;
*) ignored=ignored;;
esac
exec sh -c \
'cp "$1" "$2" && shift && exec "${CONFIG_SHELL-/bin/sh}" "$@"' \
$ignored "$GNULIB_SRCDIR/build-aux/bootstrap" \
"$0" "$@" --no-bootstrap-sync
}
fi
;;
esac
gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
<$gnulib_tool || exit $?
# $GNULIB_SRCDIR now points to the version of gnulib to use, and
# we no longer need to use git or $gnulib_path below here.
if $bootstrap_sync; then
cmp -s "$0" "$GNULIB_SRCDIR/build-aux/bootstrap" || {
echo "$0: updating bootstrap and restarting..."
case $(sh -c 'echo "$1"' -- a) in
a) ignored=--;;
*) ignored=ignored;;
esac
exec sh -c \
'cp "$1" "$2" && shift && exec "${CONFIG_SHELL-/bin/sh}" "$@"' \
$ignored "$GNULIB_SRCDIR/build-aux/bootstrap" \
"$0" "$@" --no-bootstrap-sync
}
fi
gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
<$gnulib_tool || exit $?
# Get translations.
download_po_files() {
@@ -700,7 +697,7 @@ download_po_files() {
echo "$me: getting translations into $subdir for $domain..."
cmd=$(printf "$po_download_command_format" "$domain" "$subdir")
eval "$cmd" && return
# Fallback to HTTPS.
# Fallback to HTTP.
cmd=$(printf "$po_download_command_format2" "$subdir" "$domain")
eval "$cmd"
}
@@ -791,9 +788,9 @@ symlink_to_dir()
# Leave any existing symlink alone, if it already points to the source,
# so that broken build tools that care about symlink times
# aren't confused into doing unnecessary builds. Conversely, if the
# existing symlink's timestamp is older than the source, make it afresh,
# existing symlink's time stamp is older than the source, make it afresh,
# so that broken tools aren't confused into skipping needed builds. See
# <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00326.html>.
# <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00326.html>.
test -h "$dst" &&
src_ls=$(ls -diL "$src" 2>/dev/null) && set $src_ls && src_i=$1 &&
dst_ls=$(ls -diL "$dst" 2>/dev/null) && set $dst_ls && dst_i=$1 &&
@@ -899,33 +896,31 @@ fi
# Import from gnulib.
if $use_gnulib; then
gnulib_tool_options="\
--no-changelog\
--aux-dir $build_aux\
--doc-base $doc_base\
--lib $gnulib_name\
--m4-base $m4_base/\
--source-base $source_base/\
--tests-base $tests_base\
--local-dir $local_gl_dir\
$gnulib_tool_option_extras\
"
if test $use_libtool = 1; then
case "$gnulib_tool_options " in
*' --libtool '*) ;;
*) gnulib_tool_options="$gnulib_tool_options --libtool" ;;
esac
fi
echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
$gnulib_tool $gnulib_tool_options --import $gnulib_modules \
|| die "gnulib-tool failed"
for file in $gnulib_files; do
symlink_to_dir "$GNULIB_SRCDIR" $file \
|| die "failed to symlink $file"
done
gnulib_tool_options="\
--import\
--no-changelog\
--aux-dir $build_aux\
--doc-base $doc_base\
--lib $gnulib_name\
--m4-base $m4_base/\
--source-base $source_base/\
--tests-base $tests_base\
--local-dir $local_gl_dir\
$gnulib_tool_option_extras\
"
if test $use_libtool = 1; then
case "$gnulib_tool_options " in
*' --libtool '*) ;;
*) gnulib_tool_options="$gnulib_tool_options --libtool" ;;
esac
fi
echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
$gnulib_tool $gnulib_tool_options --import $gnulib_modules &&
for file in $gnulib_files; do
symlink_to_dir "$GNULIB_SRCDIR" $file \
|| die "failed to symlink $file"
done
bootstrap_post_import_hook \
|| die "bootstrap_post_import_hook failed"
@@ -1022,9 +1017,9 @@ bootstrap_epilogue
echo "$0: done. Now you can run './configure'."
# Local variables:
# eval: (add-hook 'before-save-hook 'time-stamp)
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
+2 -2
View File
@@ -1,6 +1,6 @@
# Bootstrap configuration.
# Copyright (C) 2006-2015, 2018 Free Software Foundation, Inc.
# Copyright (C) 2006-2015 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -81,7 +81,7 @@ gnulib_tool_option_extras='--symlink --makefile-name=gnulib.mk'
bootstrap_post_import_hook()
{
# Massage lib/gnulib.mk before using it later in the bootstrapping process.
build-aux/prefix-gnulib-mk --lib-name=$gnulib_name lib/gnulib.mk
build-aux/prefix-gnulib-mk --lib-name=$gnulib_name lib/$gnulib_mk
# Ensure that ChangeLog exists, for automake.
test -f ChangeLog || touch ChangeLog
+5 -1
View File
@@ -1,4 +1,6 @@
/announce-gen
/arg-nonnull.h
/c++defs.h
/compile
/config.guess
/config.rpath
@@ -14,12 +16,14 @@
/install-sh
/javacomp.sh.in
/javaexec.sh.in
/link-warning.h
/mdate-sh
/missing
/prefix-gnulib-mk
/test-driver
/texinfo.tex
/update-copyright
/useless-if-before-free
/vc-list-files
/warn-on-use.h
/ylwrap
/prefix-gnulib-mk
-48
View File
@@ -1,48 +0,0 @@
# Copyright (C) 2012-2015, 2018 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Valgrind suppression file for Bison.
# Linux prague 4.1.2-2-ARCH #1 SMP PREEMPT Wed Jul 15 08:30:32 UTC 2015
# x86_64 GNU/Linux
{
Probably exception handling from G++ 5.1.
Memcheck:Leak
match-leak-kinds: reachable
fun:malloc
fun:pool
fun:__static_initialization_and_destruction_0
fun:_GLOBAL__sub_I_eh_alloc.cc
fun:call_init.part.0
fun:_dl_init
obj:/usr/lib/ld-2.21.so
}
# Linux seattle 2.6.32-5-amd64 #1 SMP Thu Mar 22 17:26:33 UTC 2012
# x86_64 GNU/Linux
{
index
Memcheck:Cond
fun:index
fun:expand_dynamic_string_token
fun:_dl_map_object
fun:map_doit
fun:_dl_catch_error
fun:do_preload
fun:dl_main
fun:_dl_sysdep_start
fun:_dl_start
obj:/lib/ld-2.11.3.so
}
@@ -1,4 +1,4 @@
# Copyright (C) 2012-2015, 2018 Free Software Foundation, Inc.
# Copyright (C) 2012-2015 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
+16
View File
@@ -0,0 +1,16 @@
# Linux seattle 2.6.32-5-amd64 #1 SMP Thu Mar 22 17:26:33 UTC 2012
# x86_64 GNU/Linux
{
index
Memcheck:Cond
fun:index
fun:expand_dynamic_string_token
fun:_dl_map_object
fun:map_doit
fun:_dl_catch_error
fun:do_preload
fun:dl_main
fun:_dl_sysdep_start
fun:_dl_start
obj:/lib/ld-2.11.3.so
}
+7 -7
View File
@@ -1,4 +1,4 @@
# Copyright (C) 2000-2015, 2018 Free Software Foundation, Inc.
# Copyright (C) 2000-2015 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -13,10 +13,10 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
EXTRA_DIST += \
build-aux/Darwin.valgrind \
build-aux/Linux.valgrind \
build-aux/cross-options.pl \
build-aux/move-if-change \
build-aux/prev-version.txt \
EXTRA_DIST += \
build-aux/cross-options.pl \
build-aux/darwin11.4.0.valgrind \
build-aux/linux-gnu.valgrind \
build-aux/move-if-change \
build-aux/prev-version.txt \
build-aux/update-b4-copyright
+4
View File
@@ -0,0 +1,4 @@
/_Noreturn.h
/arg-nonnull.h
/c++defs.h
/warn-on-use.h
+1 -1
View File
@@ -3,7 +3,7 @@
# Update b4_copyright invocations or b4_copyright_years definitions to
# include the current year.
# Copyright (C) 2009-2015, 2018 Free Software Foundation, Inc.
# Copyright (C) 2009-2015 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -2,7 +2,7 @@
# In configure.ac, update PACKAGE_COPYRIGHT_YEAR to the current year.
# Copyright (C) 2010-2015, 2018 Free Software Foundation, Inc.
# Copyright (C) 2010-2015 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
+18 -19
View File
@@ -1,5 +1,5 @@
# Customize maint.mk -*- makefile -*-
# Copyright (C) 2008-2015, 2018 Free Software Foundation, Inc.
# Copyright (C) 2008-2015 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -158,24 +158,23 @@ sc_space_before_open_paren:
exclude = \
$(foreach a,$(1),$(eval $(subst $$,$$$$,exclude_file_name_regexp--sc_$(a))))
$(call exclude, \
bindtextdomain=^lib/main.c$$ \
preprocessor_indentation=^data/|^lib/|^src/parse-gram.[ch]$$ \
program_name=^lib/main.c$$ \
prohibit_always-defined_macros=^data/yacc.c$$|^djgpp/ \
prohibit_always-defined_macros+=?|^lib/timevar.c$$ \
prohibit_always-defined_macros+=?|^src/(parse-gram.c|system.h)$$ \
prohibit_always-defined_macros+=?|^tests/regression.at$$ \
prohibit_always_true_header_tests=^djgpp/subpipe.h$$|^lib/timevar.c$$ \
prohibit_always_true_header_tests+=?|^m4/timevar.m4$$ \
prohibit_defined_have_decl_tests=?|^lib/timevar.c$$ \
$(call exclude, \
bindtextdomain=^lib/main.c$$ \
preprocessor_indentation=^data/|^lib/|^src/parse-gram.[ch]$$ \
program_name=^lib/main.c$$ \
prohibit_always-defined_macros=^data/yacc.c$$|^djgpp/ \
prohibit_always-defined_macros+=?|^lib/timevar.c$$ \
prohibit_always-defined_macros+=?|^src/(parse-gram.c|system.h)$$ \
prohibit_always-defined_macros+=?|^tests/regression.at$$ \
prohibit_always_true_header_tests=^djgpp/subpipe.h$$|^lib/timevar.c$$ \
prohibit_always_true_header_tests+=?|^m4/timevar.m4$$ \
prohibit_defined_have_decl_tests=?|^lib/timevar.c$$ \
prohibit_doubled_word=^tests/named-refs.at$$ \
prohibit_magic_number_exit=^doc/bison.texi$$ \
prohibit_magic_number_exit+=?|^tests/(conflicts|regression).at$$ \
prohibit_strcmp=^doc/bison\.texi|tests/local\.at$$ \
prohibit_tab_based_indentation=\.(am|mk)$$|^djgpp/|^\.git \
require_config_h_first=^(lib/yyerror|data/(glr|yacc))\.c$$ \
prohibit_magic_number_exit=^doc/bison.texi$$ \
prohibit_magic_number_exit+=?|^tests/(conflicts|regression).at$$ \
prohibit_strcmp=^doc/bison\.texi|tests/local\.at$$ \
prohibit_tab_based_indentation=\.(am|mk)$$|^djgpp/|^\.git \
require_config_h_first=^(lib/yyerror|data/(glr|yacc))\.c$$ \
space_before_open_paren=^(data/|djgpp/) \
two_space_separator_in_usage=^(bootstrap) \
unmarked_diagnostics=^(djgpp/|doc/bison.texi$$|tests/c\+\+\.at$$) \
unmarked_diagnostics=^(djgpp/|doc/bison.texi$$|tests/c\+\+\.at$$) \
)
+11 -17
View File
@@ -1,6 +1,6 @@
# Configure template for GNU Bison. -*-Autoconf-*-
#
# Copyright (C) 2001-2015, 2018 Free Software Foundation, Inc.
# Copyright (C) 2001-2015 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@ m4_pattern_forbid([^gl_[A-Z]])
AC_INIT([GNU Bison],
m4_esyscmd([build-aux/git-version-gen .tarball-version]),
[[email protected]])
AC_SUBST([PACKAGE_COPYRIGHT_YEAR], [2018])
AC_SUBST([PACKAGE_COPYRIGHT_YEAR], [2015])
AC_DEFINE_UNQUOTED([PACKAGE_COPYRIGHT_YEAR], [$PACKAGE_COPYRIGHT_YEAR],
[The copyright year for this package])
@@ -82,7 +82,7 @@ AC_ARG_ENABLE([gcc-warnings],
AM_CONDITIONAL([ENABLE_GCC_WARNINGS], [test "$enable_gcc_warnings" = yes])
if test "$enable_gcc_warnings" = yes; then
warn_common='-Wall -Wextra -Wno-sign-compare -Wcast-align -Wdocumentation
-Wformat -Wnull-dereference -Wpointer-arith -Wwrite-strings'
-Wformat -Wpointer-arith -Wwrite-strings'
warn_c='-Wbad-function-cast -Wshadow -Wstrict-prototypes'
warn_cxx='-Wnoexcept'
# Warnings for the test suite only.
@@ -90,12 +90,7 @@ if test "$enable_gcc_warnings" = yes; then
# -fno-color-diagnostics: Clang's use of colors in the error
# messages is confusing the tests looking at the compiler's output
# (e.g., synclines.at).
#
# -Wno-keyword-macro: We use the "#define private public" dirty
# trick in the test suite to check some private implementation
# details for lalr1.cc.
warn_tests='-Wundef -pedantic -Wdeprecated -Wsign-compare -fno-color-diagnostics
-Wno-keyword-macro'
warn_tests='-Wundef -pedantic -Wsign-compare -fno-color-diagnostics'
AC_LANG_PUSH([C])
# Clang supports many of GCC's -W options, but only issues warnings
@@ -225,21 +220,20 @@ AC_CONFIG_FILES([etc/bench.pl], [chmod +x etc/bench.pl])
AC_CONFIG_TESTDIR(tests)
AC_CONFIG_FILES([tests/atlocal])
AC_CONFIG_FILES([tests/bison], [chmod +x tests/bison])
AC_CHECK_PROGS([VALGRIND], [valgrind])
# Use something simpler that $host_os to select our suppression file.
uname=`uname`
case $VALGRIND:$uname in
case $VALGRIND:$host_os in
'':*) ;;
*:Darwin)
*:darwin*)
# See README-hacking.
# VALGRIND+='-q --suppressions=$(abs_top_srcdir)/build-aux/darwin11.4.0.valgrind'
VALGRIND=;;
*:*)
suppfile=build-aux/$uname.valgrind
suppfile=build-aux/$host_os.valgrind
if test -f "$srcdir/$suppfile"; then
AC_SUBST([VALGRIND_OPTS_SUPPRESSION],
["--suppressions=\$(abs_top_srcdir)/$suppfile"])
VALGRIND="$VALGRIND --gen-suppressions=all"
VALGRIND="$VALGRIND --suppressions=\$(abs_top_srcdir)/$suppfile"
fi
AC_SUBST([VALGRIND_PREBISON], ["$VALGRIND -q"])
;;
esac
+1 -1
View File
@@ -52,7 +52,7 @@ into various formats.
-----
Copyright (C) 2002, 2008-2015, 2018 Free Software Foundation, Inc.
Copyright (C) 2002, 2008-2015 Free Software Foundation, Inc.
This file is part of GNU Bison.
+1 -1
View File
@@ -2,7 +2,7 @@
# Language-independent M4 Macros for Bison.
# Copyright (C) 2002, 2004-2015, 2018 Free Software Foundation, Inc.
# Copyright (C) 2002, 2004-2015 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
+1 -2
View File
@@ -2,8 +2,7 @@
# C++ skeleton dispatching for Bison.
# Copyright (C) 2006-2007, 2009-2015, 2018 Free Software Foundation,
# Inc.
# Copyright (C) 2006-2007, 2009-2015 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
+37 -29
View File
@@ -2,7 +2,7 @@
# C++ skeleton for Bison
# Copyright (C) 2002-2018 Free Software Foundation, Inc.
# Copyright (C) 2002-2015 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -30,16 +30,6 @@ m4_include(b4_pkgdatadir/[c.m4])
m4_define([b4_comment],
[b4_comment_([$1], [$2// ], [$2// ])])
# b4_inline(hh|cc)
# ----------------
# Expand to `inline\n ` if $1 is hh.
m4_define([b4_inline],
[m4_case([$1],
[cc], [],
[hh], [[inline
]],
[m4_fatal([$0: invalid argument: $1])])])
## -------- ##
## Checks. ##
## -------- ##
@@ -285,22 +275,25 @@ m4_define([b4_public_types_declare],
]b4_symbol_constructor_declare])
# b4_public_types_define(hh|cc)
# -----------------------------
# b4_public_types_define
# ----------------------
# Provide the implementation needed by the public types.
m4_define([b4_public_types_define],
[ b4_inline([$1])b4_parser_class_name[::syntax_error::syntax_error (]b4_locations_if([const location_type& l, ])[const std::string& m)
[[ inline
]b4_parser_class_name[::syntax_error::syntax_error (]b4_locations_if([const location_type& l, ])[const std::string& m)
: std::runtime_error (m)]b4_locations_if([
, location (l)])[
{}
// basic_symbol.
template <typename Base>
inline
]b4_parser_class_name[::basic_symbol<Base>::basic_symbol ()
: value ()
{}
template <typename Base>
inline
]b4_parser_class_name[::basic_symbol<Base>::basic_symbol (const basic_symbol& other)
: Base (other)
, value ()]b4_locations_if([
@@ -311,7 +304,9 @@ m4_define([b4_public_types_define],
[value = other.value;])[
}
template <typename Base>
inline
]b4_parser_class_name[::basic_symbol<Base>::basic_symbol (]b4_join(
[typename Base::kind_type t],
[const semantic_type& v],
@@ -328,6 +323,7 @@ m4_define([b4_public_types_define],
]b4_type_foreach([b4_basic_symbol_constructor_define])], [[
/// Constructor for valueless symbols.
template <typename Base>
inline
]b4_parser_class_name[::basic_symbol<Base>::basic_symbol (]b4_join(
[typename Base::kind_type t],
b4_locations_if([const location_type& l]))[)
@@ -337,12 +333,14 @@ m4_define([b4_public_types_define],
{}]])[
template <typename Base>
inline
]b4_parser_class_name[::basic_symbol<Base>::~basic_symbol ()
{
clear ();
}
template <typename Base>
inline
void
]b4_parser_class_name[::basic_symbol<Base>::clear ()
{]b4_variant_if([[
@@ -363,6 +361,7 @@ m4_define([b4_public_types_define],
}
template <typename Base>
inline
bool
]b4_parser_class_name[::basic_symbol<Base>::empty () const
{
@@ -370,10 +369,11 @@ m4_define([b4_public_types_define],
}
template <typename Base>
inline
void
]b4_parser_class_name[::basic_symbol<Base>::move (basic_symbol& s)
{
super_type::move (s);
super_type::move(s);
]b4_variant_if([b4_symbol_variant([this->type_get ()], [value], [move],
[s.value])],
[value = s.value;])[]b4_locations_if([
@@ -381,38 +381,45 @@ m4_define([b4_public_types_define],
}
// by_type.
]b4_inline([$1])b4_parser_class_name[::by_type::by_type ()
inline
]b4_parser_class_name[::by_type::by_type ()
: type (empty_symbol)
{}
]b4_inline([$1])b4_parser_class_name[::by_type::by_type (const by_type& other)
inline
]b4_parser_class_name[::by_type::by_type (const by_type& other)
: type (other.type)
{}
]b4_inline([$1])b4_parser_class_name[::by_type::by_type (token_type t)
inline
]b4_parser_class_name[::by_type::by_type (token_type t)
: type (yytranslate_ (t))
{}
]b4_inline([$1])[void
inline
void
]b4_parser_class_name[::by_type::clear ()
{
type = empty_symbol;
}
]b4_inline([$1])[void
inline
void
]b4_parser_class_name[::by_type::move (by_type& that)
{
type = that.type;
that.clear ();
}
]b4_inline([$1])[int
inline
int
]b4_parser_class_name[::by_type::type_get () const
{
return type;
}
]b4_token_ctor_if([[
]b4_inline([$1])b4_parser_class_name[::token_type
inline
]b4_parser_class_name[::token_type
]b4_parser_class_name[::by_type::token () const
{
// YYTOKNUM[NUM] -- (External) token number corresponding to the
@@ -438,13 +445,14 @@ m4_define([b4_symbol_constructor_declare], [])
m4_define([b4_symbol_constructor_define], [])
# b4_yytranslate_define(cc|hh)
# ----------------------------
# Define yytranslate_. Sometimes used in the header file ($1=hh),
# b4_yytranslate_define
# ---------------------
# Define yytranslate_. Sometimes used in the header file,
# sometimes in the cc file.
m4_define([b4_yytranslate_define],
[[ // Symbol number corresponding to token number t.
]b4_inline([$1])b4_parser_class_name[::token_number_type
inline
]b4_parser_class_name[::token_number_type
]b4_parser_class_name[::yytranslate_ (]b4_token_ctor_if([token_type],
[int])[ t)
{
@@ -454,12 +462,12 @@ m4_define([b4_yytranslate_define],
{
]b4_translate[
};
const unsigned user_token_number_max_ = ]b4_user_token_number_max[;
const unsigned int user_token_number_max_ = ]b4_user_token_number_max[;
const token_number_type undef_token_ = ]b4_undef_token_number[;
if (static_cast<int> (t) <= yyeof_)
if (static_cast<int>(t) <= yyeof_)
return yyeof_;
else if (static_cast<unsigned> (t) <= user_token_number_max_)
else if (static_cast<unsigned int> (t) <= user_token_number_max_)
return translate_table[t];
else
return undef_token_;
+1 -1
View File
@@ -2,7 +2,7 @@
# Common code for C-like languages (C, C++, Java, etc.)
# Copyright (C) 2012-2015, 2018 Free Software Foundation, Inc.
# Copyright (C) 2012-2015 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
+1 -2
View File
@@ -2,8 +2,7 @@
# C skeleton dispatching for Bison.
# Copyright (C) 2006-2007, 2009-2015, 2018 Free Software Foundation,
# Inc.
# Copyright (C) 2006-2007, 2009-2015 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -2,7 +2,7 @@
# C M4 Macros for Bison.
# Copyright (C) 2002, 2004-2015, 2018 Free Software Foundation, Inc.
# Copyright (C) 2002, 2004-2015 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
+16 -29
View File
@@ -2,7 +2,7 @@
# GLR skeleton for Bison
# Copyright (C) 2002-2015, 2018 Free Software Foundation, Inc.
# Copyright (C) 2002-2015 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -198,7 +198,7 @@ m4_if(b4_skeleton, ["glr.c"],
[b4_defines_if(
[b4_output_begin([b4_spec_defines_file])
b4_copyright([Skeleton interface for Bison GLR parsers in C],
[2002-2015, 2018])[
[2002-2015])[
]b4_cpp_guard_open([b4_spec_defines_file])[
]b4_shared_declarations[
@@ -213,7 +213,7 @@ b4_copyright([Skeleton interface for Bison GLR parsers in C],
b4_output_begin([b4_parser_file_name])
b4_copyright([Skeleton implementation for Bison GLR parsers in C],
[2002-2015, 2018])[
[2002-2015])[
/* C GLR parser skeleton written by Paul Hilfinger. */
@@ -808,7 +808,6 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp,
*yyvalp = yyval_default;
else
*yyvalp = yyvsp[YYFILL (1-yyrhslen)].yystate.yysemantics.yysval;]b4_locations_if([[
/* Default location. */
YYLLOC_DEFAULT ((*yylocp), (yyvsp - yyrhslen), yyrhslen);
yystackp->yyerror_range[1].yystate.yyloc = *yylocp;
]])[
@@ -1693,7 +1692,7 @@ yyreportAmbiguity (yySemanticOption* yyx0,
* ending at YYS1. Has no effect on previously resolved states.
* The first semantic option of a state is always chosen. */
static void
yyresolveLocations (yyGLRState* yys1, int yyn1,
yyresolveLocations (yyGLRState *yys1, int yyn1,
yyGLRStack *yystackp]b4_user_formals[)
{
if (0 < yyn1)
@@ -1704,9 +1703,9 @@ yyresolveLocations (yyGLRState* yys1, int yyn1,
yyGLRStackItem yyrhsloc[1 + YYMAXRHS];
int yynrhs;
yySemanticOption *yyoption = yys1->yysemantics.yyfirstVal;
YYASSERT (yyoption != YY_NULLPTR);
YYASSERT (yyoption);
yynrhs = yyrhsLength (yyoption->yyrule);
if (yynrhs > 0)
if (0 < yynrhs)
{
yyGLRState *yys;
int yyn;
@@ -1729,18 +1728,7 @@ yyresolveLocations (yyGLRState* yys1, int yyn1,
yyGLRState *yyprevious = yyoption->yystate;
yyrhsloc[0].yystate.yyloc = yyprevious->yyloc;
}
{
int yychar_current = yychar;
YYSTYPE yylval_current = yylval;
YYLTYPE yylloc_current = yylloc;
yychar = yyoption->yyrawchar;
yylval = yyoption->yyval;
yylloc = yyoption->yyloc;
YYLLOC_DEFAULT ((yys1->yyloc), yyrhsloc, yynrhs);
yychar = yychar_current;
yylval = yylval_current;
yylloc = yylloc_current;
}
YYLLOC_DEFAULT ((yys1->yyloc), yyrhsloc, yynrhs);
}
}
}]])[
@@ -2086,7 +2074,6 @@ yyreportSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
case N: \
yyformat = S; \
break
default: /* Avoid compiler warnings. */
YYCASE_(0, YY_("syntax error"));
YYCASE_(1, YY_("syntax error, unexpected %s"));
YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
@@ -2307,8 +2294,8 @@ b4_dollar_popdef])[]dnl
{
yyrule = yydefaultAction (yystate);
if (yyrule == 0)
{]b4_locations_if([[
yystack.yyerror_range[1].yystate.yyloc = yylloc;]])[
{
]b4_locations_if([[ yystack.yyerror_range[1].yystate.yyloc = yylloc;]])[
yyreportSyntaxError (&yystack]b4_user_args[);
goto yyuser_error;
}
@@ -2347,8 +2334,8 @@ b4_dollar_popdef])[]dnl
yystack.yyerrState -= 1;
}
else if (yyisErrorAction (yyaction))
{]b4_locations_if([[
yystack.yyerror_range[1].yystate.yyloc = yylloc;]])[
{
]b4_locations_if([[ yystack.yyerror_range[1].yystate.yyloc = yylloc;]])[
yyreportSyntaxError (&yystack]b4_user_args[);
goto yyuser_error;
}
@@ -2393,8 +2380,8 @@ b4_dollar_popdef])[]dnl
if (yystack.yytops.yysize == 0)
yyFail (&yystack][]b4_lpure_args[, YY_("syntax error"));
YYCHK1 (yyresolveStack (&yystack]b4_user_args[));
YYDPRINTF ((stderr, "Returning to deterministic operation.\n"));]b4_locations_if([[
yystack.yyerror_range[1].yystate.yyloc = yylloc;]])[
YYDPRINTF ((stderr, "Returning to deterministic operation.\n"));
]b4_locations_if([[ yystack.yyerror_range[1].yystate.yyloc = yylloc;]])[
yyreportSyntaxError (&yystack]b4_user_args[);
goto yyuser_error;
}
@@ -2475,9 +2462,9 @@ b4_dollar_popdef])[]dnl
{
while (yystates[yyk])
{
yyGLRState *yys = yystates[yyk];]b4_locations_if([[
yystack.yyerror_range[1].yystate.yyloc = yys->yyloc;]])[
if (yys->yypred != YY_NULLPTR)
yyGLRState *yys = yystates[yyk];
]b4_locations_if([[ yystack.yyerror_range[1].yystate.yyloc = yys->yyloc;]]
)[ if (yys->yypred != YY_NULLPTR)
yydestroyGLRState ("Cleanup: popping", yys]b4_user_args[);
yystates[yyk] = yys->yypred;
yystack.yynextFree -= 1;
+3 -3
View File
@@ -1,6 +1,6 @@
# C++ GLR skeleton for Bison
# Copyright (C) 2002-2015, 2018 Free Software Foundation, Inc.
# Copyright (C) 2002-2015 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -177,7 +177,7 @@ m4_pushdef([b4_parse_param], m4_defn([b4_parse_param_orig]))dnl
| Print this symbol. |
`--------------------*/
void
inline void
]b4_parser_class_name[::yy_symbol_value_print_ (int yytype,
const semantic_type* yyvaluep]b4_locations_if([[,
const location_type* yylocationp]])[)
@@ -329,7 +329,7 @@ b4_percent_define_flag_if([[global_tokens_and_yystype]],
b4_defines_if(
[b4_output_begin([b4_spec_defines_file])
b4_copyright([Skeleton interface for Bison GLR parsers in C++],
[2002-2015, 2018])[
[2002-2015])[
// C++ GLR parser skeleton written by Akim Demaille.
+1 -1
View File
@@ -2,7 +2,7 @@
# Java skeleton dispatching for Bison.
# Copyright (C) 2007, 2009-2015, 2018 Free Software Foundation, Inc.
# Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -2,7 +2,7 @@
# Java language support for Bison
# Copyright (C) 2007-2015, 2018 Free Software Foundation, Inc.
# Copyright (C) 2007-2015 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
+51 -47
View File
@@ -1,6 +1,6 @@
# C++ skeleton for Bison
# Copyright (C) 2002-2015, 2018 Free Software Foundation, Inc.
# Copyright (C) 2002-2015 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -131,7 +131,7 @@ m4_ifdef([b4_lex_param], [, ]b4_lex_param))])])
m4_pushdef([b4_copyright_years],
[2002-2015, 2018])
[2002-2015])
m4_define([b4_parser_class_name],
[b4_percent_define_get([[parser_class_name]])])
@@ -142,9 +142,9 @@ b4_bison_locations_if([# Backward compatibility.
m4_include(b4_pkgdatadir/[stack.hh])
b4_variant_if([m4_include(b4_pkgdatadir/[variant.hh])])
# b4_shared_declarations(hh|cc)
# -----------------------------
# Declaration that might either go into the header (if --defines, $1 = hh)
# b4_shared_declarations
# ----------------------
# Declaration that might either go into the header (if --defines)
# or open coded in the parser body.
m4_define([b4_shared_declarations],
[b4_percent_code_get([[requires]])[
@@ -314,8 +314,6 @@ b4_location_define])])[
typedef basic_symbol<by_state> super_type;
/// Construct an empty symbol.
stack_symbol_type ();
/// Copy construct.
stack_symbol_type (const stack_symbol_type& that);
/// Steal the contents from \a sym to build this.
stack_symbol_type (state_type s, symbol_type& sym);
/// Assignment, needed by push_back.
@@ -344,7 +342,7 @@ b4_location_define])])[
void yypush_ (const char* m, state_type s, symbol_type& sym);
/// Pop \a n symbols the three stacks.
void yypop_ (unsigned n = 1);
void yypop_ (unsigned int n = 1);
/// Constants.
enum
@@ -361,8 +359,8 @@ b4_location_define])])[
]b4_parse_param_vars[
};
]b4_token_ctor_if([b4_yytranslate_define([$1])[
]b4_public_types_define([$1])])[
]b4_token_ctor_if([b4_yytranslate_define
b4_public_types_define])[
]b4_namespace_close[
]b4_percent_define_flag_if([[global_tokens_and_yystype]],
@@ -388,7 +386,7 @@ b4_copyright([Skeleton interface for Bison LALR(1) parsers in C++])
// C++ LALR(1) parser skeleton written by Akim Demaille.
]b4_cpp_guard_open([b4_spec_defines_file])[
]b4_shared_declarations(hh)[
]b4_shared_declarations[
]b4_cpp_guard_close([b4_spec_defines_file])
b4_output_end()
])
@@ -408,7 +406,7 @@ m4_if(b4_prefix, [yy], [],
]b4_null_define[
]b4_defines_if([[#include "@basename(]b4_spec_defines_file[@)"]],
[b4_shared_declarations([cc])])[
[b4_shared_declarations])[
// User implementation prologue.
]b4_user_post_prologue[
@@ -445,7 +443,7 @@ m4_if(b4_prefix, [yy], [],
{ \
*yycdebug_ << Title << ' '; \
yy_print_ (*yycdebug_, Symbol); \
*yycdebug_ << '\n'; \
*yycdebug_ << std::endl; \
} \
} while (false)
@@ -464,9 +462,9 @@ m4_if(b4_prefix, [yy], [],
#else // !]b4_api_PREFIX[DEBUG
# define YYCDEBUG if (false) std::cerr
# define YY_SYMBOL_PRINT(Title, Symbol) YYUSE (Symbol)
# define YY_REDUCE_PRINT(Rule) static_cast<void> (0)
# define YY_STACK_PRINT() static_cast<void> (0)
# define YY_SYMBOL_PRINT(Title, Symbol) YYUSE(Symbol)
# define YY_REDUCE_PRINT(Rule) static_cast<void>(0)
# define YY_STACK_PRINT() static_cast<void>(0)
#endif // !]b4_api_PREFIX[DEBUG
@@ -535,23 +533,27 @@ m4_if(b4_prefix, [yy], [],
| Symbol types. |
`---------------*/
]b4_token_ctor_if([], [b4_public_types_define([cc])])[
]b4_token_ctor_if([], [b4_public_types_define])[
// by_state.
inline
]b4_parser_class_name[::by_state::by_state ()
: state (empty_state)
{}
inline
]b4_parser_class_name[::by_state::by_state (const by_state& other)
: state (other.state)
{}
inline
void
]b4_parser_class_name[::by_state::clear ()
{
state = empty_state;
}
inline
void
]b4_parser_class_name[::by_state::move (by_state& that)
{
@@ -559,10 +561,12 @@ m4_if(b4_prefix, [yy], [],
that.clear ();
}
inline
]b4_parser_class_name[::by_state::by_state (state_type s)
: state (s)
{}
inline
]b4_parser_class_name[::symbol_number_type
]b4_parser_class_name[::by_state::type_get () const
{
@@ -572,17 +576,12 @@ m4_if(b4_prefix, [yy], [],
return yystos_[state];
}
inline
]b4_parser_class_name[::stack_symbol_type::stack_symbol_type ()
{}
]b4_parser_class_name[::stack_symbol_type::stack_symbol_type (const stack_symbol_type& that)
: super_type (that.state]b4_locations_if([, that.location])[)
{
]b4_variant_if([b4_symbol_variant([that.type_get ()],
[value], [copy], [that.value])],
[[value = that.value;]])[
}
inline
]b4_parser_class_name[::stack_symbol_type::stack_symbol_type (state_type s, symbol_type& that)
: super_type (s]b4_locations_if([, that.location])[)
{
@@ -593,6 +592,7 @@ m4_if(b4_prefix, [yy], [],
that.type = empty_symbol;
}
inline
]b4_parser_class_name[::stack_symbol_type&
]b4_parser_class_name[::stack_symbol_type::operator= (const stack_symbol_type& that)
{
@@ -606,6 +606,7 @@ m4_if(b4_prefix, [yy], [],
template <typename Base>
inline
void
]b4_parser_class_name[::yy_destroy_ (const char* yymsg, basic_symbol<Base>& yysym) const
{
@@ -637,6 +638,7 @@ m4_if(b4_prefix, [yy], [],
}
#endif
inline
void
]b4_parser_class_name[::yypush_ (const char* m, state_type s, symbol_type& sym)
{
@@ -644,6 +646,7 @@ m4_if(b4_prefix, [yy], [],
yypush_ (m, t);
}
inline
void
]b4_parser_class_name[::yypush_ (const char* m, stack_symbol_type& s)
{
@@ -652,8 +655,9 @@ m4_if(b4_prefix, [yy], [],
yystack_.push (s);
}
inline
void
]b4_parser_class_name[::yypop_ (unsigned n)
]b4_parser_class_name[::yypop_ (unsigned int n)
{
yystack_.pop (n);
}
@@ -685,7 +689,7 @@ m4_if(b4_prefix, [yy], [],
}
#endif // ]b4_api_PREFIX[DEBUG
]b4_parser_class_name[::state_type
inline ]b4_parser_class_name[::state_type
]b4_parser_class_name[::yy_lr_goto_state_ (state_type yystate, int yysym)
{
int yyr = yypgoto_[yysym - yyntokens_] + yystate;
@@ -695,13 +699,13 @@ m4_if(b4_prefix, [yy], [],
return yydefgoto_[yysym - yyntokens_];
}
bool
inline bool
]b4_parser_class_name[::yy_pact_value_is_default_ (int yyvalue)
{
return yyvalue == yypact_ninf_;
}
bool
inline bool
]b4_parser_class_name[::yy_table_value_is_error_ (int yyvalue)
{
return yyvalue == yytable_ninf_;
@@ -732,7 +736,7 @@ m4_if(b4_prefix, [yy], [],
// avoid gratuitous conflicts when merging into the master branch.
try
{
YYCDEBUG << "Starting parse\n";
YYCDEBUG << "Starting parse" << std::endl;
]m4_ifdef([b4_initial_action], [
b4_dollar_pushdef([yyla.value], [], [yyla.location])dnl
@@ -749,7 +753,7 @@ b4_dollar_popdef])[]dnl
// A new symbol was pushed on the stack.
yynewstate:
YYCDEBUG << "Entering state " << yystack_[0].state << '\n';
YYCDEBUG << "Entering state " << yystack_[0].state << std::endl;
// Accept?
if (yystack_[0].state == yyfinal_)
@@ -823,7 +827,7 @@ b4_dollar_popdef])[]dnl
yylen = yyr2_[yyn];
{
stack_symbol_type yylhs;
yylhs.state = yy_lr_goto_state_ (yystack_[yylen].state, yyr1_[yyn]);]b4_variant_if([
yylhs.state = yy_lr_goto_state_(yystack_[yylen].state, yyr1_[yyn]);]b4_variant_if([
/* Variants are always initialized to an empty instance of the
correct type. The default '$$ = $1' action is NOT applied
when using variants. */
@@ -840,11 +844,10 @@ b4_dollar_popdef])[]dnl
yylhs.value = yystack_@{0@}.value;])[
]b4_locations_if([dnl
[
// Default location.
// Compute the default @@$.
{
slice<stack_symbol_type, stack_type> slice (yystack_, yylen);
YYLLOC_DEFAULT (yylhs.location, slice, yylen);
yyerror_range[1].location = yylhs.location;
}]])[
// Perform the reduction.
@@ -915,7 +918,8 @@ b4_dollar_popdef])[]dnl
YYERROR and the label yyerrorlab therefore never appears in user
code. */
if (false)
goto yyerrorlab;
goto yyerrorlab;]b4_locations_if([[
yyerror_range[1].location = yystack_[yylen - 1].location;]])[
/* Do not reclaim the symbols of the rule whose action triggered
this YYERROR. */
yypop_ (yylen);
@@ -989,7 +993,8 @@ b4_dollar_popdef])[]dnl
}
catch (...)
{
YYCDEBUG << "Exception caught: cleaning lookahead and stack\n";
YYCDEBUG << "Exception caught: cleaning lookahead and stack"
<< std::endl;
// Do not try to display the values of the reclaimed symbols,
// as their printer might throw an exception.
if (!yyla.empty ())
@@ -1008,7 +1013,7 @@ b4_dollar_popdef])[]dnl
]b4_parser_class_name[::error (const syntax_error& yyexc)
{
error (]b4_join(b4_locations_if([yyexc.location]),
[[yyexc.what ()]])[);
[[yyexc.what()]])[);
}
// Generate an error message.
@@ -1086,13 +1091,12 @@ b4_error_verbose_if([state_type yystate, const symbol_type& yyla],
case N: \
yyformat = S; \
break
default: // Avoid compiler warnings.
YYCASE_ (0, YY_("syntax error"));
YYCASE_ (1, YY_("syntax error, unexpected %s"));
YYCASE_ (2, YY_("syntax error, unexpected %s, expecting %s"));
YYCASE_ (3, YY_("syntax error, unexpected %s, expecting %s or %s"));
YYCASE_ (4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
YYCASE_ (5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
YYCASE_(0, YY_("syntax error"));
YYCASE_(1, YY_("syntax error, unexpected %s"));
YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
#undef YYCASE_
}
@@ -1140,18 +1144,18 @@ b4_error_verbose_if([state_type yystate, const symbol_type& yyla],
i_end = yystack_.end ();
i != i_end; ++i)
*yycdebug_ << ' ' << i->state;
*yycdebug_ << '\n';
*yycdebug_ << std::endl;
}
// Report on the debug stream that the rule \a yyrule is going to be reduced.
void
]b4_parser_class_name[::yy_reduce_print_ (int yyrule)
{
unsigned yylno = yyrline_[yyrule];
unsigned int yylno = yyrline_[yyrule];
int yynrhs = yyr2_[yyrule];
// Print the symbols being reduced, and their result.
*yycdebug_ << "Reducing stack by rule " << yyrule - 1
<< " (line " << yylno << "):\n";
<< " (line " << yylno << "):" << std::endl;
// The symbols being reduced.
for (int yyi = 0; yyi < yynrhs; yyi++)
YY_SYMBOL_PRINT (" $" << yyi + 1 << " =",
@@ -1159,7 +1163,7 @@ b4_error_verbose_if([state_type yystate, const symbol_type& yyla],
}
#endif // ]b4_api_PREFIX[DEBUG
]b4_token_ctor_if([], [b4_yytranslate_define([cc])])[
]b4_token_ctor_if([], [b4_yytranslate_define])[
]b4_namespace_close[
]b4_epilogue[]dnl
b4_output_end()
+2 -2
View File
@@ -1,6 +1,6 @@
# Java skeleton for Bison -*- autoconf -*-
# Copyright (C) 2007-2015, 2018 Free Software Foundation, Inc.
# Copyright (C) 2007-2015 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -84,7 +84,7 @@ m4_define([b4_define_state],[[
b4_output_begin([b4_parser_file_name])
b4_copyright([Skeleton implementation for Bison LALR(1) parsers in Java],
[2007-2015, 2018])
[2007-2015])
b4_percent_define_ifdef([package], [package b4_percent_define_get([package]);
])[/* First part of user declarations. */
+1 -1
View File
@@ -1,4 +1,4 @@
## Copyright (C) 2002, 2005-2015, 2018 Free Software Foundation, Inc.
## Copyright (C) 2002, 2005-2015 Free Software Foundation, Inc.
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
+23 -19
View File
@@ -1,6 +1,6 @@
# C++ skeleton for Bison
# Copyright (C) 2002-2015, 2018 Free Software Foundation, Inc.
# Copyright (C) 2002-2015 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
m4_pushdef([b4_copyright_years],
[2002-2015, 2018])
[2002-2015])
# b4_position_define
# ------------------
@@ -28,18 +28,19 @@ m4_define([b4_position_define],
public:]m4_ifdef([b4_location_constructors], [[
/// Construct a position.
explicit position (]b4_percent_define_get([[filename_type]])[* f = YY_NULLPTR,
unsigned l = ]b4_location_initial_line[u,
unsigned c = ]b4_location_initial_column[u)
unsigned int l = ]b4_location_initial_line[u,
unsigned int c = ]b4_location_initial_column[u)
: filename (f)
, line (l)
, column (c)
{}
{
}
]])[
/// Initialization.
void initialize (]b4_percent_define_get([[filename_type]])[* fn = YY_NULLPTR,
unsigned l = ]b4_location_initial_line[u,
unsigned c = ]b4_location_initial_column[u)
unsigned int l = ]b4_location_initial_line[u,
unsigned int c = ]b4_location_initial_column[u)
{
filename = fn;
line = l;
@@ -68,15 +69,15 @@ m4_define([b4_position_define],
/// File name to which this position refers.
]b4_percent_define_get([[filename_type]])[* filename;
/// Current line number.
unsigned line;
unsigned int line;
/// Current column number.
unsigned column;
unsigned int column;
private:
/// Compute max(min, lhs+rhs) (provided min <= lhs).
static unsigned add_ (unsigned lhs, int rhs, unsigned min)
static unsigned int add_ (unsigned int lhs, int rhs, unsigned int min)
{
return (0 < rhs || -static_cast<unsigned>(rhs) < lhs
return (0 < rhs || -static_cast<unsigned int>(rhs) < lhs
? rhs + lhs
: min);
}
@@ -156,27 +157,30 @@ m4_define([b4_location_define],
location (const position& b, const position& e)
: begin (b)
, end (e)
{}
{
}
/// Construct a 0-width location in \a p.
explicit location (const position& p = position ())
: begin (p)
, end (p)
{}
{
}
/// Construct a 0-width location in \a f, \a l, \a c.
explicit location (]b4_percent_define_get([[filename_type]])[* f,
unsigned l = ]b4_location_initial_line[u,
unsigned c = ]b4_location_initial_column[u)
unsigned int l = ]b4_location_initial_line[u,
unsigned int c = ]b4_location_initial_column[u)
: begin (f, l, c)
, end (f, l, c)
{}
{
}
])[
/// Initialization.
void initialize (]b4_percent_define_get([[filename_type]])[* f = YY_NULLPTR,
unsigned l = ]b4_location_initial_line[u,
unsigned c = ]b4_location_initial_column[u)
unsigned int l = ]b4_location_initial_line[u,
unsigned int c = ]b4_location_initial_column[u)
{
begin.initialize (f, l, c);
end = begin;
@@ -274,7 +278,7 @@ m4_define([b4_location_define],
inline std::basic_ostream<YYChar>&
operator<< (std::basic_ostream<YYChar>& ostr, const location& loc)
{
unsigned end_col = 0 < loc.end.column ? loc.end.column - 1 : 0;
unsigned int end_col = 0 < loc.end.column ? loc.end.column - 1 : 0;
ostr << loc.begin;
if (loc.end.filename
&& (!loc.begin.filename
+18 -17
View File
@@ -1,6 +1,6 @@
# C++ skeleton for Bison
# Copyright (C) 2002-2015, 2018 Free Software Foundation, Inc.
# Copyright (C) 2002-2015 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,13 +16,12 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
m4_pushdef([b4_copyright_years],
[2002-2015, 2018])
[2002-2015])
# b4_stack_define
# ---------------
m4_define([b4_stack_define],
[[ /// A stack with random access from its top.
template <class T, class S = std::vector<T> >
[[ template <class T, class S = std::vector<T> >
class stack
{
public:
@@ -36,24 +35,20 @@ m4_define([b4_stack_define],
seq_.reserve (200);
}
stack (unsigned n)
stack (unsigned int n)
: seq_ (n)
{}
/// Random access.
///
/// Index 0 returns the topmost element.
inline
T&
operator[] (unsigned i)
operator[] (unsigned int i)
{
return seq_[seq_.size () - 1 - i];
}
/// Random access.
///
/// Index 0 returns the topmost element.
inline
const T&
operator[] (unsigned i) const
operator[] (unsigned int i) const
{
return seq_[seq_.size () - 1 - i];
}
@@ -61,6 +56,7 @@ m4_define([b4_stack_define],
/// Steal the contents of \a t.
///
/// Close to move-semantics.
inline
void
push (T& t)
{
@@ -68,8 +64,9 @@ m4_define([b4_stack_define],
operator[](0).move (t);
}
inline
void
pop (unsigned n = 1)
pop (unsigned int n = 1)
{
for (; n; --n)
seq_.pop_back ();
@@ -81,18 +78,21 @@ m4_define([b4_stack_define],
seq_.clear ();
}
inline
typename S::size_type
size () const
{
return seq_.size ();
}
inline
const_iterator
begin () const
{
return seq_.rbegin ();
}
inline
const_iterator
end () const
{
@@ -111,20 +111,21 @@ m4_define([b4_stack_define],
class slice
{
public:
slice (const S& stack, unsigned range)
slice (const S& stack, unsigned int range)
: stack_ (stack)
, range_ (range)
{}
inline
const T&
operator [] (unsigned i) const
operator [] (unsigned int i) const
{
return stack_[range_ - i];
}
private:
const S& stack_;
unsigned range_;
unsigned int range_;
};
]])
+2 -2
View File
@@ -1,6 +1,6 @@
# C++ skeleton for Bison
# Copyright (C) 2002-2015, 2018 Free Software Foundation, Inc.
# Copyright (C) 2002-2015 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@
m4_define([b4_symbol_variant],
[m4_pushdef([b4_dollar_dollar],
[$2.$3< $][3 > (m4_shift3($@))])dnl
switch ($1)
switch ($1)
{
b4_type_foreach([b4_type_action_])[]dnl
default:
+1 -1
View File
@@ -3,7 +3,7 @@
<!--
bison.xsl - common templates for Bison XSLT.
Copyright (C) 2007-2015, 2018 Free Software Foundation, Inc.
Copyright (C) 2007-2015 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -3,7 +3,7 @@
<!--
xml2dot.xsl - transform Bison XML Report into DOT.
Copyright (C) 2007-2015, 2018 Free Software Foundation, Inc.
Copyright (C) 2007-2015 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -3,7 +3,7 @@
<!--
xml2text.xsl - transform Bison XML Report into plain text.
Copyright (C) 2007-2015, 2018 Free Software Foundation, Inc.
Copyright (C) 2007-2015 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -3,7 +3,7 @@
<!--
xml2html.xsl - transform Bison XML Report into XHTML.
Copyright (C) 2007-2015, 2018 Free Software Foundation, Inc.
Copyright (C) 2007-2015 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
+326 -20
View File
@@ -1,11 +1,11 @@
-*- C -*-
# Yacc compatible skeleton for Bison
# Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software
# Foundation, Inc.
# Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation,
# Inc.
m4_pushdef([b4_copyright_years],
[1984, 1989-1990, 2000-2015, 2018])
[1984, 1989-1990, 2000-2015])
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -52,6 +52,8 @@ m4_define([b4_lac_flag],
[none], [[0]], [[1]])])
m4_include(b4_pkgdatadir/[c.m4])
m4_define([b4_yaxx],[$1])
m4_define([b4_not_yaxx],[])
## ---------------- ##
## Default values. ##
@@ -331,7 +333,11 @@ m4_if(b4_api_prefix, [yy], [],
#define yydebug ]b4_prefix[debug
#define yynerrs ]b4_prefix[nerrs
]]b4_pure_if([], [[
#define yylval ]b4_prefix[lval
#define yylval ]b4_prefix[lval]b4_yaxx([
#define yytext ]b4_prefix[text
#define YYYAXX_XML "b4_prefix[]yaxx.xml"
#define YYYAXX_DTD "b4_prefix[]yaxx.dtd"
])[
#define yychar ]b4_prefix[char]b4_locations_if([[
#define yylloc ]b4_prefix[lloc]])]))[
@@ -420,6 +426,10 @@ typedef short int yytype_int16;
/* The parser invokes alloca or malloc; define the necessary symbols. */]dnl
b4_push_if([], [b4_lac_if([], [[
]b4_yaxx([
#define XML_ALLOC(X) malloc(X)
#define XML_FREE(X) free(X)
])[
# ifdef YYSTACK_USE_ALLOCA
# if YYSTACK_USE_ALLOCA
# ifdef __GNUC__
@@ -494,7 +504,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
union yyalloc
{
yytype_int16 yyss_alloc;
YYSTYPE yyvs_alloc;]b4_locations_if([
YYSTYPE yyvs_alloc;]b4_yaxx([char *yyxs_alloc;])[]b4_locations_if([
YYLTYPE yyls_alloc;])[
};
@@ -505,10 +515,10 @@ union yyalloc
N elements. */
]b4_locations_if(
[# define YYSTACK_BYTES(N) \
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE) ]b4_yaxx([+ sizeof(char*) ])[) \
+ 2 * YYSTACK_GAP_MAXIMUM)],
[# define YYSTACK_BYTES(N) \
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) ]b4_yaxx([+ sizeof(char*) ])[) \
+ YYSTACK_GAP_MAXIMUM)])[
# define YYCOPY_NEEDED 1
@@ -580,19 +590,27 @@ static const ]b4_int_type_for([b4_translate])[ yytranslate[] =
]b4_translate[
};
]b4_not_yaxx([
#if ]b4_api_PREFIX[DEBUG
])[
]b4_integral_parser_table_define([rline], [b4_rline],
[[YYRLINE[YYN] -- Source line where rule number YYN was defined.]])[
]b4_not_yaxx([
#endif
])[
]b4_not_yaxx([
#if ]b4_api_PREFIX[DEBUG || YYERROR_VERBOSE || ]b4_token_table_flag[
])[
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
]b4_tname[
};
]b4_not_yaxx([
#endif
])
# ifdef YYPRINT
/* YYTOKNUM[NUM] -- (External) token number corresponding to the
@@ -1207,7 +1225,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
case N: \
yyformat = S; \
break
default: /* Avoid compiler warnings. */
YYCASE_(0, YY_("syntax error"));
YYCASE_(1, YY_("syntax error, unexpected %s"));
YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
@@ -1367,7 +1384,194 @@ b4_function_define([[yyparse]], [[int]], b4_parse_param)[
[[[YYSTYPE const *yypushed_val]], [[yypushed_val]]]b4_locations_if([,
[[[YYLTYPE *yypushed_loc]], [[yypushed_loc]]]])])m4_ifset([b4_parse_param], [,
b4_parse_param]))], [[
]b4_yaxx([
extern char *b4_prefix[]text;
// Yijun Yu: utility functions -----------------------------------------------
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stddef.h>
/// replace character terminals into symbolic terminals
static char *YYTNAME(int r)
{
static char yytname_buf[[8]];
if (strlen(yytname[[r]])==3 && yytname[[r]][[0]] == '\'' && yytname[[r]][[2]] == '\'')
{
sprintf(yytname_buf, "CHAR%d", (int)yytname[[r]][[1]]);
return yytname_buf;
}
else if (strlen(yytname[[r]])>=2 && yytname[[r]][[0]] == 64 )
{
strcpy(yytname_buf,"ACTION");
strcat(yytname_buf,&(yytname[[r]][[1]]));
return yytname_buf;
}
return (char *)yytname[[r]];
}
#include <stdio.h>
#include <stddef.h>
static char *yytext_buf = NULL;
/// replace a special character in the text into an entity
static
void replace_entity(char c, char *s)
{
char *buf;
char *i;
int len, l;
i = yytext_buf;
do {
i = (char *)index(i, c);
if (i) {
l = i - yytext_buf;
len = strlen(yytext_buf) + strlen(s) - 1;
//buf = (char*)YYSTACK_ALLOC(1000000);
buf = (char*)YYSTACK_ALLOC(len + 1); // Myo M Thein
if (l>0) {
#if 1 // Myo M Thein
strncpy(buf, yytext_buf, l);
#else
int t = 0;
while (t < l) {
buf[t] = yytext_buf[t];
t++;
}
buf[t] = 0;
#endif
} else {
buf[[0]] = 0;
}
strcat(buf, s);
strncat(buf, yytext_buf + l + 1, strlen(yytext_buf) - l);
buf[[len]] = 0;
YYSTACK_FREE(yytext_buf);
//yytext_buf = buf;
memcpy(yytext_buf,buf,len+1);
i++;
if (*i=='\0')
i=NULL;
}
} while (i);
}
/// replace the special characters in the text into entities
static
char* xml_encode( char ch)
{
static char text[[2]];
switch(ch)
{
case '&':
return ( "&amp;");
break;
case '>':
return ( "&gt;");
break;
case '<' :
return ( "&lt;" );
break;
case '\"':
return ( "&quot;");
break;
case '\'':
return ( "&apos;");
break;
default:
text[[0]]=ch;
text[[1]]=0;
return text;
break;
}
}
static
void replace_special_entities(char *text,char *text_out)
{
int i,lg;
if (!text) { strcpy(text_out,"??");return ; }
lg = strlen(text);
strcpy(text_out,"");
for (i=0;i<lg;i++)
{
strcat(text_out,xml_encode(text[[i]]));
}
}
static
void generate_xml_output(char **yyxsp,char **yyxs)
{
#ifndef YYYAXX_XML
#define YYYAXX_XML "yaxx.xml"
#endif
#ifndef YYYAXX_DTD
#define YYYAXX_DTD "yaxx.dtd"
#endif
int r, i, j;
char buf[[2000]];
int old_rule = 0;
FILE *stdout = fopen(YYYAXX_XML, "w");
char *p = *yyxsp + 6;
#if 0
char *v = strsep(&p, ">");
strcpy(buf, v);
#else
i = 0;
while (p[[i]]!='>') {
buf[[i]] = p[[i]];
i++;
}
buf[[i]] = 0;
#endif
/// Generating the XML document
/// version
fprintf(stdout,"<?xml version=\"1.0\"?>\n");
/// DTD reference
fprintf(stdout,"<?xml-stylesheet type=\"text/xsl\" href=\"yaxx.xsl\"?>");
fprintf(stdout,"<!DOCTYPE %s SYSTEM \"" YYYAXX_DTD "\">\n", buf);
/// inserting name space before the XML data
fprintf(stdout,"<yaxx:%s xmlns:yaxx=\"urn:YAcc-Xml-eXtension\"%s\n", buf,
yyxs[[1]]+i+6); //ffprintf(stdout,f, "%s\n", yyxs[[1]]);
/// Generating the document type definition (DTD)
stdout = fopen(YYYAXX_DTD , "w");
/// DTD for non-terminals
for (r = 2; r < sizeof(yyr1)/sizeof(unsigned short); r++)
{
j = yyr1[[r]];
if (j != old_rule) {
if (old_rule!=0)
fprintf(stdout,")>\n");
fprintf(stdout,"<!ELEMENT %s (", YYTNAME(yyr1[[r]]));
} else
fprintf(stdout," | ");
if (yyr2[[r]]==0)
fprintf(stdout,"EMPTY");
else {
/*
int multiple = 0;
for (i = yyprhs[[r]]; yyrhs[[i]] > 0 ; i++)
if (i!=yyprhs[[r]]) {
multiple = 1; break;
}
if (multiple) fprintf(stdout,"(");
for (i = yyprhs[[r]]; yyrhs[[i]] > 0 ; i++) {
if (i!=yyprhs[[r]])
fprintf(stdout,",");
fprintf(stdout,"%s", YYTNAME(yyrhs[[i]]));
}
if (multiple) fprintf(stdout,")");
*/
}
old_rule = j;
}
fprintf(stdout,")>\n");
/// DTD for terminals
for (r = 3; r < YYNTOKENS; r++)
{
fprintf(stdout,"<!ELEMENT %s (#PCDATA)>\n", YYTNAME(r));
}
}
])[
/*----------.
| yyparse. |
@@ -1399,7 +1603,26 @@ b4_function_define([[yyparse]], [[int]], b4_parse_param)[
YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
#endif
]b4_yaxx([
/* The tags stack. */
char *yyxsa[[YYINITDEPTH]];
char **yyxs = yyxsa;
char **yyxsp;
])[
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)]b4_locations_if([, yylsp -= (N)])[)
]b4_yaxx([
#include <stdio.h>
#include <string.h>
#undef __GNUC_PREREQ
#define __GNUC_PREREQ(maj, min) (maj < 4)
#include <stdlib.h>
#include <stddef.h>
static char * yyxml_str=NULL; // for XML
// for id attribute generation (by William Candillon)
int _id = 0;
char str[[256]];
])[
/* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */
@@ -1411,7 +1634,9 @@ b4_function_define([[yyparse]], [[int]], b4_parse_param)[
goto yyread_pushed_token;
}]])[
yyssp = yyss = yyssa;
yyssp = yyss = yyssa;]b4_yaxx([
yyxsp = yyxs = yyxsa;
])[
yyvsp = yyvs = yyvsa;]b4_locations_if([[
yylsp = yyls = yylsa;]])[
yystacksize = YYINITDEPTH;]b4_lac_if([[
@@ -1461,7 +1686,7 @@ b4_locations_if([[ yylsp[0] = ]b4_push_if([b4_pure_if([*])yypushed_loc], [yyllo
these so that the &'s don't force the real ones into
memory. */
YYSTYPE *yyvs1 = yyvs;
yytype_int16 *yyss1 = yyss;]b4_locations_if([
yytype_int16 *yyss1 = yyss;]b4_yaxx([ char **yyxs1 = yyxs;])[]b4_locations_if([
YYLTYPE *yyls1 = yyls;])[
/* Each stack pointer address is followed by the size of the
@@ -1470,9 +1695,9 @@ b4_locations_if([[ yylsp[0] = ]b4_push_if([b4_pure_if([*])yypushed_loc], [yyllo
be undefined if yyoverflow is a macro. */
yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),]b4_locations_if([
&yyvs1, yysize * sizeof (*yyvsp),]b4_yaxx([&yyxs1, yysize * sizeof (*yyxsp),])[]b4_locations_if([
&yyls1, yysize * sizeof (*yylsp),])[
&yystacksize);
&yystacksize);]b4_yaxx([yyxs = yyxs1;])[
]b4_locations_if([
yyls = yyls1;])[
yyss = yyss1;
@@ -1496,7 +1721,7 @@ b4_locations_if([[ yylsp[0] = ]b4_push_if([b4_pure_if([*])yypushed_loc], [yyllo
if (! yyptr)
goto yyexhaustedlab;
YYSTACK_RELOCATE (yyss_alloc, yyss);
YYSTACK_RELOCATE (yyvs_alloc, yyvs);]b4_locations_if([
YYSTACK_RELOCATE (yyvs_alloc, yyvs);]b4_yaxx([YYSTACK_RELOCATE (yyxs_alloc, yyxs);])[]b4_locations_if([
YYSTACK_RELOCATE (yyls_alloc, yyls);])[
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
@@ -1506,7 +1731,7 @@ b4_locations_if([[ yylsp[0] = ]b4_push_if([b4_pure_if([*])yypushed_loc], [yyllo
#endif /* no yyoverflow */
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;]b4_locations_if([
yyvsp = yyvs + yysize - 1;]b4_yaxx([yyxsp = yyxs + yysize - 1;])[]b4_locations_if([
yylsp = yyls + yysize - 1;])[
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
@@ -1571,7 +1796,33 @@ yyread_pushed_token:]])[
}
else
{
yytoken = YYTRANSLATE (yychar);
yytoken = YYTRANSLATE (yychar);]b4_yaxx([
{ // Yijun Yu: process the terminal
yyxml_str = (char *) XML_ALLOC(200);
strcpy(yyxml_str, "<yaxx:");
strcat(yyxml_str, YYTNAME(yytoken));
#if 1 //William Candillon
strcat(yyxml_str, " id=\"");
sprintf(str, "%x", _id);
strcat(yyxml_str, str);
strcat(yyxml_str, "\"");
_id++;
#endif
strcat(yyxml_str, ">");
if (yytoken < YYNTOKENS) {
if (yytext) {
char *tmp;
tmp=(char *)YYSTACK_ALLOC(6*strlen(yytext)+1);
replace_special_entities(yytext,tmp);
strcat(yyxml_str, tmp);
YYSTACK_FREE(tmp);
}
}
strcat(yyxml_str, "</yaxx:");
strcat(yyxml_str, YYTNAME(yytoken));
strcat(yyxml_str, ">\n");
}
])[
YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
}
@@ -1608,6 +1859,10 @@ yyread_pushed_token:]])[
yystate = yyn;
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
]b4_yaxx([
*++yyxsp = yyxml_str;
yyxml_str = 0;
])[
*++yyvsp = yylval;
YY_IGNORE_MAYBE_UNINITIALIZED_END
]b4_locations_if([ *++yylsp = yylloc;])[
@@ -1642,9 +1897,8 @@ yyreduce:
yyval = yyvsp[1-yylen];
]b4_locations_if(
[[ /* Default location. */
YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
yyerror_range[1] = yyloc;]])[
[[ /* Default location. */
YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);]])[
YY_REDUCE_PRINT (yyn);]b4_lac_if([[
{
int yychar_backup = yychar;
@@ -1656,6 +1910,53 @@ yyreduce:
if (yychar_backup != yychar)
YY_LAC_DISCARD ("yychar change");
}]], [[
]b4_yaxx([
{
int len = 0;
int alloc_len=0;
int n = 0;
int yyi;
for (yyi = 0; yyi < yylen; yyi++)
{
int l;
char * yyxml_str = yyxsp[[yyi+1-yylen]];
if (yyxml_str==NULL) {
l = 0;
} else
l = strlen(yyxml_str);
len += l;
n++;
}
alloc_len =len+100+2*strlen(YYTNAME(yyr1[[yyn]]));
yyxml_str = (char *) XML_ALLOC(alloc_len);
strcpy(yyxml_str, "<yaxx:");
strcat(yyxml_str, YYTNAME(yyr1[[yyn]]));
#if 1 //William Candillon
strcat(yyxml_str, " id=\"");
sprintf(str, "%x", _id);
strcat(yyxml_str, str);
strcat(yyxml_str, "\"");
_id++;
#endif
strcat(yyxml_str, ">\n");
for (yyi = 0; yyi < yylen; yyi++)
{
char * xml_str = yyxsp[[yyi+1-yylen]];
if (xml_str) {
strcat(yyxml_str, xml_str);
XML_FREE(xml_str);
yyxsp[[yyi+1-yylen]] = NULL;
} else {
fprintf(stderr, "Warning! the %d-th argument is empty", yyi+1);
}
}
strcat(yyxml_str, "</yaxx:");
strcat(yyxml_str, YYTNAME(yyr1[[yyn]]));
strcat(yyxml_str, ">\n");
yyxsp -= n;
*++yyxsp = yyxml_str;
yyxml_str = NULL;
}])[
switch (yyn)
{
]b4_user_actions[
@@ -1784,7 +2085,8 @@ yyerrorlab:
if (/*CONSTCOND*/ 0)
goto yyerrorlab;
/* Do not reclaim the symbols of the rule whose action triggered
]b4_locations_if([[ yyerror_range[1] = yylsp[1-yylen];
]])[ /* Do not reclaim the symbols of the rule whose action triggered
this YYERROR. */
YYPOPSTACK (yylen);
yylen = 0;
@@ -1830,6 +2132,10 @@ yyerrlab1:
YY_LAC_DISCARD ("error recovery");]])[
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
]b4_yaxx([
*++yyxsp = yyxml_str;
yyxml_str = 0;
])[
*++yyvsp = yylval;
YY_IGNORE_MAYBE_UNINITIALIZED_END
]b4_locations_if([[
@@ -1849,7 +2155,7 @@ yyerrlab1:
/*-------------------------------------.
| yyacceptlab -- YYACCEPT comes here. |
`-------------------------------------*/
yyacceptlab:
yyacceptlab:]b4_yaxx([generate_xml_output(--yyxsp,yyxs);])[
yyresult = 0;
goto yyreturn;
+1 -1
View File
@@ -1,7 +1,7 @@
# DJGPP Maintainer's Makefile -*-Makefile-*-
# Requires GNU sed
## Copyright (C) 2005-2015, 2018 Free Software Foundation, Inc.
## Copyright (C) 2005-2015 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,6 +1,6 @@
This is a port of GNU Bison @VERSION@ to MSDOS/DJGPP.
Copyright (C) 2005-2015, 2018 Free Software Foundation, Inc.
Copyright (C) 2005-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -4,7 +4,7 @@ Rem Configure Bison for DJGPP.
Rem WARNING WARNING WARNING: This file needs to have DOS CRLF end-of-line
Rem format, or else stock DOS/Windows shells will refuse to run it.
Rem Copyright (C) 2005-2015, 2018 Free Software Foundation, Inc.
Rem Copyright (C) 2005-2015 Free Software Foundation, Inc.
Rem This program is free software: you can redistribute it and/or modify
Rem it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -2,7 +2,7 @@
# Sed script for additional DJGPP specific editing
# of the configure script generated by autoconf 2.62.
# Copyright (C) 2005-2015, 2018 Free Software Foundation, Inc.
# Copyright (C) 2005-2015 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -3,7 +3,7 @@
# This is the config.site file for configuring GNU packages
# which are to be built with DJGPP tools.
# Copyright (C) 2005-2015, 2018 Free Software Foundation, Inc.
# Copyright (C) 2005-2015 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,6 +1,6 @@
# sed script for DJGPP specific editing of config.hin
# Copyright (C) 2005-2015, 2018 Free Software Foundation, Inc.
# Copyright (C) 2005-2015 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -7,7 +7,7 @@ Rem This batch file unpacks the Bison distribution while simultaneously
Rem renaming some of the files whose names are invalid on DOS or conflict
Rem with other file names after truncation to DOS 8+3 namespace.
Rem
Rem Copyright (C) 2005-2015, 2018 Free Software Foundation, Inc.
Rem Copyright (C) 2005-2015 Free Software Foundation, Inc.
Rem
Rem This program is free software: you can redistribute it and/or modify
Rem it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,4 +1,4 @@
## Copyright (C) 2008-2015, 2018 Free Software Foundation, Inc.
## Copyright (C) 2008-2015 Free Software Foundation, Inc.
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,6 +1,6 @@
/* Subprocesses with pipes.
Copyright (C) 2005-2015, 2018 Free Software Foundation, Inc.
Copyright (C) 2005-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,6 +1,6 @@
/* Subprocesses with pipes.
Copyright (C) 2005-2015, 2018 Free Software Foundation, Inc.
Copyright (C) 2005-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -2,7 +2,7 @@
# Sed script for additional DJGPP specific editing
# of the testsuite script generated by autoconf 2.61.
# Copyright (C) 2007-2015, 2018 Free Software Foundation, Inc.
# Copyright (C) 2007-2015 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
+48 -45
View File
@@ -35,7 +35,7 @@
This manual (@value{UPDATED}) is for GNU Bison (version
@value{VERSION}), the GNU parser generator.
Copyright @copyright{} 1988-1993, 1995, 1998-2015, 2018 Free Software
Copyright @copyright{} 1988-1993, 1995, 1998-2015 Free Software
Foundation, Inc.
@quotation
@@ -143,7 +143,7 @@ Writing GLR Parsers
Examples
* RPN Calc:: Reverse Polish Notation Calculator;
* RPN Calc:: Reverse polish notation calculator;
a first example with no operator precedence.
* Infix Calc:: Infix (algebraic) notation calculator.
Operator precedence is introduced.
@@ -1493,7 +1493,7 @@ simple program, all the rest of the program can go here.
@cindex examples, simple
Now we show and explain several sample programs written using Bison: a
Reverse Polish Notation calculator, an algebraic (infix) notation
reverse polish notation calculator, an algebraic (infix) notation
calculator --- later extended to track ``locations'' ---
and a multi-function calculator. All
produce usable, though limited, interactive desk-top calculators.
@@ -1503,7 +1503,7 @@ languages are written the same way. You can copy these examples into a
source file to try them.
@menu
* RPN Calc:: Reverse Polish Notation Calculator;
* RPN Calc:: Reverse polish notation calculator;
a first example with no operator precedence.
* Infix Calc:: Infix (algebraic) notation calculator.
Operator precedence is introduced.
@@ -1516,12 +1516,13 @@ source file to try them.
@node RPN Calc
@section Reverse Polish Notation Calculator
@cindex Reverse Polish Notation
@cindex reverse polish notation
@cindex polish notation calculator
@cindex @code{rpcalc}
@cindex calculator, simple
The first example is that of a simple double-precision @dfn{Reverse Polish
Notation} calculator (a calculator using postfix operators). This example
The first example is that of a simple double-precision @dfn{reverse polish
notation} calculator (a calculator using postfix operators). This example
provides a good starting point, since operator precedence is not an issue.
The second example will illustrate how operator precedence is handled.
@@ -1541,12 +1542,12 @@ The source code for this calculator is named @file{rpcalc.y}. The
@node Rpcalc Declarations
@subsection Declarations for @code{rpcalc}
Here are the C and Bison declarations for the Reverse Polish Notation
Here are the C and Bison declarations for the reverse polish notation
calculator. As in C, comments are placed between @samp{/*@dots{}*/}.
@comment file: rpcalc.y
@example
/* Reverse Polish Notation calculator. */
/* Reverse polish notation calculator. */
@group
%@{
@@ -1597,7 +1598,7 @@ declared is @code{NUM}, the token type for numeric constants.
@node Rpcalc Rules
@subsection Grammar Rules for @code{rpcalc}
Here are the grammar rules for the Reverse Polish Notation calculator.
Here are the grammar rules for the reverse polish notation calculator.
@comment file: rpcalc.y
@example
@@ -8932,7 +8933,7 @@ clear the flag.
Developing a parser can be a challenge, especially if you don't understand
the algorithm (@pxref{Algorithm, ,The Bison Parser Algorithm}). This
chapter explains how to understand and debug a parser.
chapter explains how understand and debug a parser.
The first sections focus on the static part of the parser: its structure.
They explain how to generate and read the detailed description of the
@@ -10900,12 +10901,12 @@ Regular union-based code in Lex scanner typically look like:
@example
[0-9]+ @{
yylval->ival = text_to_int (yytext);
return yy::parser::token::INTEGER;
yylval.ival = text_to_int (yytext);
return yy::parser::INTEGER;
@}
[a-z]+ @{
yylval->sval = new std::string (yytext);
return yy::parser::token::IDENTIFIER;
yylval.sval = new std::string (yytext);
return yy::parser::IDENTIFIER;
@}
@end example
@@ -10914,12 +10915,12 @@ initialized. So the code would look like:
@example
[0-9]+ @{
yylval->build<int> () = text_to_int (yytext);
return yy::parser::token::INTEGER;
yylval.build<int>() = text_to_int (yytext);
return yy::parser::INTEGER;
@}
[a-z]+ @{
yylval->build<std::string> () = yytext;
return yy::parser::token::IDENTIFIER;
yylval.build<std::string> = yytext;
return yy::parser::IDENTIFIER;
@}
@end example
@@ -10928,12 +10929,12 @@ or
@example
[0-9]+ @{
yylval->build (text_to_int (yytext));
return yy::parser::token::INTEGER;
yylval.build(text_to_int (yytext));
return yy::parser::INTEGER;
@}
[a-z]+ @{
yylval->build (yytext);
return yy::parser::token::IDENTIFIER;
yylval.build(yytext);
return yy::parser::IDENTIFIER;
@}
@end example
@@ -10961,8 +10962,8 @@ it is still possible to give an integer as semantic value for a string.
So for each token type, Bison generates named constructors as follows.
@deftypemethod {symbol_type} {} {make_@var{token}} (const @var{value_type}& @var{value}, const location_type& @var{location})
@deftypemethodx {symbol_type} {} {make_@var{token}} (const location_type& @var{location})
@deftypemethod {symbol_type} {} make_@var{token} (const @var{value_type}& @var{value}, const location_type& @var{location})
@deftypemethodx {symbol_type} {} make_@var{token} (const location_type& @var{location})
Build a complete terminal symbol for the token type @var{token} (not
including the @code{api.token.prefix}) whose possible semantic value is
@var{value} of adequate @var{value_type}. If location tracking is enabled,
@@ -10982,18 +10983,20 @@ For instance, given the following declarations:
Bison generates the following functions:
@example
symbol_type make_IDENTIFIER (const std::string&, const location_type&);
symbol_type make_INTEGER (const int&, const location_type&);
symbol_type make_COLON (const location_type&);
symbol_type make_IDENTIFIER(const std::string& v,
const location_type& l);
symbol_type make_INTEGER(const int& v,
const location_type& loc);
symbol_type make_COLON(const location_type& loc);
@end example
@noindent
which should be used in a Lex-scanner as follows.
@example
[0-9]+ return yy::parser::make_INTEGER (text_to_int (yytext), loc);
[a-z]+ return yy::parser::make_IDENTIFIER (yytext, loc);
":" return yy::parser::make_COLON (loc);
[0-9]+ return yy::parser::make_INTEGER(text_to_int (yytext), loc);
[a-z]+ return yy::parser::make_IDENTIFIER(yytext, loc);
":" return yy::parser::make_COLON(loc);
@end example
Tokens that do not have an identifier are not accessible: you cannot simply
@@ -11174,13 +11177,13 @@ calcxx_driver::parse (const std::string &f)
void
calcxx_driver::error (const yy::location& l, const std::string& m)
@{
std::cerr << l << ": " << m << '\n';
std::cerr << l << ": " << m << std::endl;
@}
void
calcxx_driver::error (const std::string& m)
@{
std::cerr << m << '\n';
std::cerr << m << std::endl;
@}
@end example
@@ -11458,13 +11461,13 @@ The rules are simple. The driver is used to report errors.
@comment file: calc++-scanner.ll
@example
"-" return yy::calcxx_parser::make_MINUS (loc);
"+" return yy::calcxx_parser::make_PLUS (loc);
"*" return yy::calcxx_parser::make_STAR (loc);
"/" return yy::calcxx_parser::make_SLASH (loc);
"(" return yy::calcxx_parser::make_LPAREN (loc);
")" return yy::calcxx_parser::make_RPAREN (loc);
":=" return yy::calcxx_parser::make_ASSIGN (loc);
"-" return yy::calcxx_parser::make_MINUS(loc);
"+" return yy::calcxx_parser::make_PLUS(loc);
"*" return yy::calcxx_parser::make_STAR(loc);
"/" return yy::calcxx_parser::make_SLASH(loc);
"(" return yy::calcxx_parser::make_LPAREN(loc);
")" return yy::calcxx_parser::make_RPAREN(loc);
":=" return yy::calcxx_parser::make_ASSIGN(loc);
@group
@{int@} @{
@@ -11472,12 +11475,12 @@ The rules are simple. The driver is used to report errors.
long n = strtol (yytext, NULL, 10);
if (! (INT_MIN <= n && n <= INT_MAX && errno != ERANGE))
driver.error (loc, "integer is out of range");
return yy::calcxx_parser::make_NUMBER (n, loc);
return yy::calcxx_parser::make_NUMBER(n, loc);
@}
@end group
@{id@} return yy::calcxx_parser::make_IDENTIFIER (yytext, loc);
@{id@} return yy::calcxx_parser::make_IDENTIFIER(yytext, loc);
. driver.error (loc, "invalid character");
<<EOF>> return yy::calcxx_parser::make_END (loc);
<<EOF>> return yy::calcxx_parser::make_END(loc);
%%
@end example
@@ -11533,7 +11536,7 @@ main (int argc, char *argv[])
else if (argv[i] == std::string ("-s"))
driver.trace_scanning = true;
else if (!driver.parse (argv[i]))
std::cout << driver.result << '\n';
std::cout << driver.result << std::endl;
else
res = 1;
return res;
@@ -13345,7 +13348,7 @@ A reentrant subprogram is a subprogram which can be in invoked any
number of times in parallel, without interference between the various
invocations. @xref{Pure Decl, ,A Pure (Reentrant) Parser}.
@item Reverse Polish Notation
@item Reverse polish notation
A language in which all operators are postfix operators.
@item Right recursion
+1 -2
View File
@@ -1,5 +1,4 @@
## Copyright (C) 2001-2003, 2005-2015, 2018 Free Software Foundation,
## Inc.
## Copyright (C) 2001-2003, 2005-2015 Free Software Foundation, Inc.
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
+1 -2
View File
@@ -19,8 +19,7 @@
\def\finalout{\overfullrule=0pt}
%\finalout
% Copyright (c) 1998, 2001, 2009-2015, 2018 Free Software Foundation,
% Inc.
% Copyright (c) 1998, 2001, 2009-2015 Free Software Foundation, Inc.
%
% This file is part of Bison.
%
+1 -1
View File
@@ -16,7 +16,7 @@ straightforward use of _build/src/bison would.)
--
Copyright (C) 2006, 2009-2015, 2018 Free Software Foundation, Inc.
Copyright (C) 2006, 2009-2015 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
+2 -2
View File
@@ -1,6 +1,6 @@
#! /usr/bin/perl -w
# Copyright (C) 2006, 2008-2015, 2018 Free Software Foundation, Inc.
# Copyright (C) 2006, 2008-2015 Free Software Foundation, Inc.
#
# This file is part of Bison, the GNU Compiler Compiler.
#
@@ -738,7 +738,7 @@ yy::parser::token_type yylex(yy::parser::semantic_type* yylvalp,
void
yy::parser::error(const yy::parser::location_type& loc, const std::string& msg)
{
std::cerr << loc << ": " << msg << '\n';
std::cerr << loc << ": " << msg << std::endl;
}
int main(int argc, char *argv[])
+1 -1
View File
@@ -1,4 +1,4 @@
## Copyright (C) 2006, 2008-2015, 2018 Free Software Foundation, Inc.
## Copyright (C) 2006, 2008-2015 Free Software Foundation, Inc.
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,6 +1,6 @@
#! /bin/sh
# Copyright (C) 2005-2015, 2018 Free Software Foundation, Inc.
# Copyright (C) 2005-2015 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
+1 -2
View File
@@ -1,5 +1,4 @@
# Copyright (C) 2005-2006, 2008-2015, 2018 Free Software Foundation,
# Inc.
# Copyright (C) 2005-2006, 2008-2015 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
+2 -2
View File
@@ -3,8 +3,8 @@
# This file is part of GNU Bison
# Copyright (C) 1992, 2000-2001, 2005-2006, 2009-2015, 2018 Free
# Software Foundation, Inc.
# Copyright (C) 1992, 2000-2001, 2005-2006, 2009-2015 Free Software
# Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (C) 2005, 2008-2015, 2018 Free Software Foundation, Inc.
# Copyright (C) 2005, 2008-2015 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
+1 -2
View File
@@ -1,5 +1,4 @@
# Copyright (C) 2005-2006, 2008-2015, 2018 Free Software Foundation,
# Inc.
# Copyright (C) 2005-2006, 2008-2015 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,6 +1,6 @@
#! /bin/sh
# Copyright (C) 2005-2015, 2018 Free Software Foundation, Inc.
# Copyright (C) 2005-2015 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
+1 -2
View File
@@ -1,5 +1,4 @@
# Copyright (C) 2005-2006, 2008-2015, 2018 Free Software Foundation,
# Inc.
# Copyright (C) 2005-2006, 2008-2015 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,6 +1,6 @@
#! /bin/sh
# Copyright (C) 2005-2015, 2018 Free Software Foundation, Inc.
# Copyright (C) 2005-2015 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,6 +1,6 @@
#! /bin/sh
# Copyright (C) 2005-2015, 2018 Free Software Foundation, Inc.
# Copyright (C) 2005-2015 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
+11 -10
View File
@@ -1,5 +1,5 @@
/*
Copyright (C) 2008-2015, 2018 Free Software Foundation, Inc.
Copyright (C) 2008-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -25,9 +25,9 @@
%code requires // *.hh
{
#include <list>
#include <string>
#include <vector>
typedef std::vector<std::string> strings_type;
typedef std::list<std::string> strings_type;
}
%code // *.cc
@@ -43,14 +43,14 @@ typedef std::vector<std::string> strings_type;
static parser::symbol_type yylex ();
}
// Printing a vector of strings.
// Koening look up will look into std, since that's an std::vector.
// Printing a list of strings.
// Koening look up will look into std, since that's an std::list.
namespace std
{
std::ostream&
operator<< (std::ostream& o, const strings_type& ss)
{
o << '(' << &ss << ") {";
o << "(" << &ss << ") {";
const char *sep = "";
for (strings_type::const_iterator i = ss.begin(), end = ss.end();
i != end; ++i)
@@ -58,12 +58,13 @@ typedef std::vector<std::string> strings_type;
o << sep << *i;
sep = ", ";
}
return o << '}';
return o << "}";
}
}
// Conversion to string.
template <typename T>
inline
std::string
string_cast (const T& t)
{
@@ -79,12 +80,12 @@ typedef std::vector<std::string> strings_type;
%token END_OF_FILE 0;
%type <::std::string> item;
%type <::std::vector<std::string>> list;
%type <::std::list<std::string>> list;
%%
result:
list { std::cout << $1 << '\n'; }
list { std::cout << $1 << std::endl; }
;
list:
@@ -134,7 +135,7 @@ namespace yy
void
parser::error (const parser::location_type& loc, const std::string& msg)
{
std::cerr << loc << ": " << msg << '\n';
std::cerr << loc << ": " << msg << std::endl;
}
}
+1 -1
Submodule gnulib updated: 0d10473be6...ea6cb044ca
+26 -28
View File
@@ -4,7 +4,8 @@
/*~
/.deps
/.dirstamp
/_Noreturn.h
/Makefile
/Makefile.in
/alignof.h
/alloca.h
/alloca.in.h
@@ -14,9 +15,7 @@
/asnprintf.c
/basename-lgpl.c
/basename.c
/binary-io.c
/binary-io.h
/bitrotate.c
/bitrotate.h
/c++defs.h
/c-ctype.c
@@ -29,6 +28,8 @@
/charset.alias
/cloexec.c
/cloexec.h
/close-hook.c
/close-hook.h
/close-stream.c
/close-stream.h
/close.c
@@ -55,6 +56,7 @@
/exitfail.h
/fatal-signal.c
/fatal-signal.h
/fclose.c
/fcntl.c
/fcntl.h
/fcntl.in.h
@@ -79,27 +81,19 @@
/fseterr.h
/fstat.c
/getdtablesize.c
/getopt-cdefs.in.h
/getopt-core.h
/getopt-ext.h
/getopt-pfx-core.h
/getopt-pfx-ext.h
/getopt.c
/getopt.h
/getopt.in.h
/getopt1.c
/getopt_int.h
/getprogname.c
/getprogname.h
/gettext.h
/gnulib.mk
/hard-locale.c
/hard-locale.h
/hash.c
/hash.h
/intprops.h
/inttypes.h
/inttypes.in.h
/ioctl.c
/isnan.c
/isnand-nolibm.h
/isnand.c
@@ -109,15 +103,9 @@
/isnanl.c
/itold.c
/ldexpl.c
/limits.h
/limits.in.h
/localcharset.c
/localcharset.h
/lstat.c
/malloc.c
/malloca.c
/malloca.h
/math.c
/math.h
/math.in.h
/mbrtowc.c
@@ -126,11 +114,12 @@
/mbswidth.h
/memchr.c
/memchr.valgrind
/minmax.h
/msvc-inval.c
/msvc-inval.h
/msvc-nothrow.c
/msvc-nothrow.h
/nonblocking.c
/nonblocking.h
/obstack.c
/obstack.h
/obstack_printf.c
@@ -151,6 +140,7 @@
/printf.c
/progname.c
/progname.h
/quote.c
/quote.h
/quotearg.c
/quotearg.h
@@ -164,7 +154,6 @@
/ref-del.sin
/sched.h
/sched.in.h
/sig-handler.c
/sig-handler.h
/sigaction.c
/signal.h
@@ -193,8 +182,6 @@
/spawnp.c
/sprintf.c
/stamp-h1
/stat-w32.c
/stat-w32.h
/stat.c
/stdbool.h
/stdbool.in.h
@@ -205,6 +192,7 @@
/stdio--.h
/stdio-impl.h
/stdio-safer.h
/stdio-write.c
/stdio.h
/stdio.in.h
/stdlib.h
@@ -225,17 +213,20 @@
/strnlen.c
/strverscmp.c
/sys
/sys_ioctl.h
/sys_ioctl.in.h
/sys_socket.h
/sys_socket.in.h
/sys_stat.h
/sys_stat.in.h
/sys_types.in.h
/sys_wait.h
/sys_wait.in.h
/sysexits.in.h
/time.h
/time.in.h
/unistd--.h
/unistd-safer.h
/unistd.c
/unistd.h
/unistd.in.h
/unitypes.h
@@ -243,7 +234,6 @@
/uniwidth
/uniwidth.h
/uniwidth.in.h
/unlink.c
/unlocked-io.h
/unsetenv.c
/vasnprintf.c
@@ -252,6 +242,7 @@
/vfprintf.c
/vsnprintf.c
/vsprintf.c
/w32sock.h
/w32spawn.h
/wait-process.c
/wait-process.h
@@ -259,7 +250,6 @@
/warn-on-use.h
/wchar.h
/wchar.in.h
/wctype-h.c
/wctype.h
/wctype.in.h
/wcwidth.c
@@ -270,9 +260,17 @@
/xmalloc.c
/xmemdup0.c
/xmemdup0.h
/xsize.c
/xsize.h
/xstrndup.c
/xstrndup.h
/stat-time.c
/stat-time.h
/binary-io.c
/xsize.c
/bitrotate.c
/math.c
/sig-handler.c
/unistd.c
/wctype-h.c
/lstat.c
/unlink.c
/gettimeofday.c
/sys_time.in.h
+2 -2
View File
@@ -1,7 +1,7 @@
/* Array bitsets.
Copyright (C) 2002-2003, 2006, 2009-2015, 2018 Free Software
Foundation, Inc.
Copyright (C) 2002-2003, 2006, 2009-2015 Free Software Foundation,
Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
+1 -2
View File
@@ -1,7 +1,6 @@
/* Functions to support abitsets.
Copyright (C) 2002, 2004, 2009-2015, 2018 Free Software Foundation,
Inc.
Copyright (C) 2002, 2004, 2009-2015 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
+2 -2
View File
@@ -1,7 +1,7 @@
/* Base bitset stuff.
Copyright (C) 2002-2004, 2006, 2009-2015, 2018 Free Software
Foundation, Inc.
Copyright (C) 2002-2004, 2006, 2009-2015 Free Software Foundation,
Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
+1 -2
View File
@@ -1,7 +1,6 @@
/* General bitsets.
Copyright (C) 2002-2006, 2009-2015, 2018 Free Software Foundation,
Inc.
Copyright (C) 2002-2006, 2009-2015 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
+1 -2
View File
@@ -1,7 +1,6 @@
/* Generic bitsets.
Copyright (C) 2002-2004, 2009-2015, 2018 Free Software Foundation,
Inc.
Copyright (C) 2002-2004, 2009-2015 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
+1 -2
View File
@@ -1,7 +1,6 @@
/* Bitset statistics.
Copyright (C) 2002-2006, 2009-2015, 2018 Free Software Foundation,
Inc.
Copyright (C) 2002-2006, 2009-2015 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
+1 -2
View File
@@ -1,7 +1,6 @@
/* Functions to support bitset statistics.
Copyright (C) 2002-2004, 2009-2015, 2018 Free Software Foundation,
Inc.
Copyright (C) 2002-2004, 2009-2015 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
+1 -1
View File
@@ -1,6 +1,6 @@
/* Bitset vectors.
Copyright (C) 2001-2002, 2004, 2006, 2009-2015, 2018 Free Software
Copyright (C) 2001-2002, 2004, 2006, 2009-2015 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
+1 -2
View File
@@ -1,7 +1,6 @@
/* Bitset vectors.
Copyright (C) 2002, 2004, 2009-2015, 2018 Free Software Foundation,
Inc.
Copyright (C) 2002, 2004, 2009-2015 Free Software Foundation, Inc.
Contributed by Akim Demaille (akim@freefriends.org).
+1 -1
View File
@@ -1,6 +1,6 @@
/* Bitset vectors.
Copyright (C) 2001-2002, 2004-2006, 2009-2015, 2018 Free Software
Copyright (C) 2001-2002, 2004-2006, 2009-2015 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
+1 -2
View File
@@ -1,7 +1,6 @@
/* Bitset vectors.
Copyright (C) 2002, 2004, 2009-2015, 2018 Free Software Foundation,
Inc.
Copyright (C) 2002, 2004, 2009-2015 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
+1 -2
View File
@@ -1,7 +1,6 @@
/* Functions to support expandable bitsets.
Copyright (C) 2002-2006, 2009-2015, 2018 Free Software Foundation,
Inc.
Copyright (C) 2002-2006, 2009-2015 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
+1 -2
View File
@@ -1,7 +1,6 @@
/* Functions to support ebitsets.
Copyright (C) 2002, 2004, 2009-2015, 2018 Free Software Foundation,
Inc.
Copyright (C) 2002, 2004, 2009-2015 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
+1 -2
View File
@@ -1,7 +1,6 @@
/* get-errno.c - get and set errno.
Copyright (C) 2002, 2006, 2009-2015, 2018 Free Software Foundation,
Inc.
Copyright (C) 2002, 2006, 2009-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,6 +1,6 @@
/* get-errno.h - get and set errno.
Copyright (C) 2002, 2009-2015, 2018 Free Software Foundation, Inc.
Copyright (C) 2002, 2009-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
+2 -2
View File
@@ -1,7 +1,7 @@
/* Functions to support link list bitsets.
Copyright (C) 2002-2004, 2006, 2009-2015, 2018 Free Software
Foundation, Inc.
Copyright (C) 2002-2004, 2006, 2009-2015 Free Software Foundation,
Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
+1 -2
View File
@@ -1,7 +1,6 @@
/* Functions to support lbitsets.
Copyright (C) 2002, 2004, 2009-2015, 2018 Free Software Foundation,
Inc.
Copyright (C) 2002, 2004, 2009-2015 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
+1 -2
View File
@@ -1,7 +1,6 @@
/* Fake libiberty.h for Bison.
Copyright (C) 2002-2004, 2009-2015, 2018 Free Software Foundation,
Inc.
Copyright (C) 2002-2004, 2009-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (C) 2001-2015, 2018 Free Software Foundation, Inc.
# Copyright (C) 2001-2015 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
+1 -1
View File
@@ -1,6 +1,6 @@
/* Yacc library main function.
Copyright (C) 2002, 2009-2015, 2018 Free Software Foundation, Inc.
Copyright (C) 2002, 2009-2015 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
+1 -1
View File
@@ -1,6 +1,6 @@
/* Timing variables for measuring compiler performance.
Copyright (C) 2000, 2002, 2004, 2006, 2009-2015, 2018 Free Software
Copyright (C) 2000, 2002, 2004, 2006, 2009-2015 Free Software
Foundation, Inc.
Contributed by Alex Samuel <samuel@codesourcery.com>
+1 -2
View File
@@ -1,8 +1,7 @@
/* This file contains the definitions for timing variables used to -*- C -*-
measure run-time performance of the compiler.
Copyright (C) 2002, 2007, 2009-2015, 2018 Free Software Foundation,
Inc.
Copyright (C) 2002, 2007, 2009-2015 Free Software Foundation, Inc.
Contributed by Akim Demaille <akim@freefriends.org>.
+2 -2
View File
@@ -1,7 +1,7 @@
/* Timing variables for measuring compiler performance.
Copyright (C) 2000, 2002, 2004, 2009-2015, 2018 Free Software
Foundation, Inc.
Copyright (C) 2000, 2002, 2004, 2009-2015 Free Software Foundation,
Inc.
Contributed by Alex Samuel <samuel@codesourcery.com>
+1 -2
View File
@@ -1,7 +1,6 @@
/* Variable array bitsets.
Copyright (C) 2002-2006, 2009-2015, 2018 Free Software Foundation,
Inc.
Copyright (C) 2002-2006, 2009-2015 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
+1 -2
View File
@@ -1,7 +1,6 @@
/* Functions to support vbitsets.
Copyright (C) 2002, 2004, 2009-2015, 2018 Free Software Foundation,
Inc.
Copyright (C) 2002, 2004, 2009-2015 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
+1 -1
View File
@@ -1,6 +1,6 @@
/* Yacc library error-printing function.
Copyright (C) 2002, 2009-2015, 2018 Free Software Foundation, Inc.
Copyright (C) 2002, 2009-2015 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
+22 -18
View File
@@ -1,10 +1,10 @@
/*~
/00gnulib.m4
/absolute-header.m4
/alloca.m4
/argmatch.m4
/asm-underscore.m4
/assert.m4
/calloc.m4
/cloexec.m4
/close-stream.m4
/close.m4
/closeout.m4
@@ -12,9 +12,9 @@
/config-h.m4
/configmake.m4
/dirname.m4
/dos.m4
/double-slash-root.m4
/dup2.m4
/eealloc.m4
/environ.m4
/errno_h.m4
/error.m4
@@ -22,8 +22,8 @@
/exponentf.m4
/exponentl.m4
/extensions.m4
/extern-inline.m4
/fatal-signal.m4
/fclose.m4
/fcntl-o.m4
/fcntl.m4
/fcntl_h.m4
@@ -38,7 +38,6 @@
/fstat.m4
/getdtablesize.m4
/getopt.m4
/getprogname.m4
/gettext.m4
/glibc2.m4
/glibc21.m4
@@ -46,11 +45,12 @@
/gnulib-common.m4
/gnulib-comp.m4
/gnulib-tool.m4
/hard-locale.m4
/hash.m4
/iconv.m4
/include_next.m4
/intdiv0.m4
/intl.m4
/intl.m4~
/intldir.m4
/intlmacosx.m4
/intmax.m4
@@ -58,6 +58,7 @@
/inttypes-pri.m4
/inttypes.m4
/inttypes_h.m4
/ioctl.m4
/isnan.m4
/isnand.m4
/isnanf.m4
@@ -72,23 +73,19 @@
/lib-link.m4
/lib-prefix.m4
/libunistring-base.m4
/limits-h.m4
/localcharset.m4
/locale-fr.m4
/locale-ja.m4
/locale-zh.m4
/lock.m4
/longlong.m4
/lstat.m4
/malloc.m4
/malloca.m4
/math_h.m4
/mbrtowc.m4
/mbsinit.m4
/mbstate_t.m4
/mbswidth.m4
/memchr.m4
/minmax.m4
/mmap-anon.m4
/mode_t.m4
/msvc-inval.m4
@@ -96,16 +93,13 @@
/multiarch.m4
/nls.m4
/nocrash.m4
/non-recursive-gnulib-prefix-hack.m4
/obstack-printf.m4
/obstack.m4
/off_t.m4
/open-cloexec.m4
/open.m4
/pathmax.m4
/perror.m4
/pipe2.m4
/po.m4
/po.m4~
/posix_spawn.m4
/printf-frexp.m4
/printf-frexpl.m4
@@ -113,7 +107,6 @@
/printf-posix.m4
/printf.m4
/progtest.m4
/pthread_rwlock_rdlock.m4
/quote.m4
/quotearg.m4
/raise.m4
@@ -129,6 +122,8 @@
/size_max.m4
/snprintf-posix.m4
/snprintf.m4
/socklen.m4
/sockpfaf.m4
/spawn-pipe.m4
/spawn_h.m4
/sprintf-posix.m4
@@ -138,6 +133,7 @@
/stddef_h.m4
/stdint.m4
/stdint_h.m4
/stdio-safer.m4
/stdio_h.m4
/stdlib_h.m4
/stpcpy.m4
@@ -149,16 +145,17 @@
/strndup.m4
/strnlen.m4
/strverscmp.m4
/sys_ioctl_h.m4
/sys_socket_h.m4
/sys_stat_h.m4
/sys_types_h.m4
/sys_wait_h.m4
/sysexits.m4
/threadlib.m4
/time_h.m4
/uintmax_t.m4
/unistd-safer.m4
/unistd_h.m4
/unlink.m4
/unlocked-io.m4
/vasnprintf.m4
/vfprintf-posix.m4
@@ -178,5 +175,12 @@
/xalloc.m4
/xsize.m4
/xstrndup.m4
/host-cpu-c-abi.m4
/stat-time.m4
/obstack-printf.m4
/extern-inline.m4
/non-recursive-gnulib-prefix-hack.m4
/absolute-header.m4
/lstat.m4
/unlink.m4
/gettimeofday.m4
/obstack.m4
/sys_time_h.m4

Some files were not shown because too many files have changed in this diff Show More