mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-08-14 21:25:14 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b2bc8a1ba0 | ||
|
|
77bb73e7af | ||
|
|
9d6af15318 | ||
|
|
441735026b | ||
|
|
1e811aacd7 | ||
|
|
d143e9c33f | ||
|
|
723206df6f | ||
|
|
ac3297d501 | ||
|
|
c9e2da4f20 | ||
|
|
55dd356336 | ||
|
|
a898435b25 | ||
|
|
fea2d6b097 | ||
|
|
6f8bdce25d | ||
|
|
fc7ce9970f | ||
|
|
8ffd7912e3 | ||
|
|
dab9663283 | ||
|
|
248dba53cb | ||
|
|
20cc714980 | ||
|
|
56706c6167 | ||
|
|
a6e5a28079 | ||
|
|
49e8e901fb | ||
|
|
8f462efe92 | ||
|
|
686e83e396 | ||
|
|
f0e2c228a0 | ||
|
|
4c2a6e42ba | ||
|
|
6f75992be5 | ||
|
|
121c498280 | ||
|
|
5da0355aff | ||
|
|
d815ec4a62 | ||
|
|
6f04ee6c78 | ||
|
|
71caec0661 | ||
|
|
7776816565 | ||
|
|
8db68289d1 | ||
|
|
f3103c5b4f | ||
|
|
406dec8286 | ||
|
|
2f4518a126 | ||
|
|
8e6f226630 | ||
|
|
9913d6e45a | ||
|
|
840341d67d | ||
|
|
d89e48b3c9 | ||
|
|
eb8c66bbda | ||
|
|
448dc38bc4 | ||
|
|
7e5ef70679 | ||
|
|
8cbbf1786f | ||
|
|
354303787c | ||
|
|
d236ad946b | ||
|
|
9a4292e580 | ||
|
|
17300e83f0 | ||
|
|
ea0a767697 | ||
|
|
f52e1e5e44 | ||
|
|
210c1eef22 | ||
|
|
6ee881f6a2 | ||
|
|
3b1977eab5 | ||
|
|
4c38b19e26 | ||
|
|
723fe7d18a | ||
|
|
ea13bea8ab | ||
|
|
dcd39f1d4a | ||
|
|
3b8378825e | ||
|
|
095a1d11ca | ||
|
|
678094a2f5 | ||
|
|
f953cb20cf | ||
|
|
0e0f066b76 | ||
|
|
5f1485d8e1 | ||
|
|
2f3fd8f986 | ||
|
|
ea6046b9f6 | ||
|
|
86996fca10 | ||
|
|
32dc877a20 | ||
|
|
7527c744c0 | ||
|
|
d034d52066 | ||
|
|
cf22447c62 | ||
|
|
4631c34fb7 | ||
|
|
3e948170f7 | ||
|
|
82df2d6dd6 | ||
|
|
6e0ecb9a7d | ||
|
|
83e34842c1 | ||
|
|
0162a44c31 | ||
|
|
6e30ede87a | ||
|
|
241ac701ba | ||
|
|
3d4a0cad56 | ||
|
|
e7bab2df96 | ||
|
|
baacae4971 | ||
|
|
95a2de5695 | ||
|
|
38f9fd6439 | ||
|
|
0f404a0af0 | ||
|
|
bdc360ae58 | ||
|
|
ca7a59e838 | ||
|
|
ad6f84e550 | ||
|
|
212792959e | ||
|
|
43fdc9fd8e | ||
|
|
e02df72c2d | ||
|
|
ba3063f613 | ||
|
|
e0fda26c8d | ||
|
|
ecbca7db4b | ||
|
|
ed228e60b2 | ||
|
|
cacfdef716 | ||
|
|
2f61c4a2d0 | ||
|
|
16d9244df6 | ||
|
|
3e4a253ba9 | ||
|
|
df5df58d91 | ||
|
|
88bb35d6ac | ||
|
|
585ef2eb20 | ||
|
|
a005dbcbe3 | ||
|
|
8a8b33e8d2 | ||
|
|
a02797656e | ||
|
|
132247cd94 | ||
|
|
c0259969d7 | ||
|
|
23761f428a | ||
|
|
9097fda06c | ||
|
|
7a9c3cb3a7 | ||
|
|
5a3c69f103 | ||
|
|
ea66d039b4 | ||
|
|
c50befe615 | ||
|
|
47fa574761 | ||
|
|
d67e37a74b | ||
|
|
0ee1af2ed5 | ||
|
|
2655c7cd13 | ||
|
|
8ebc7dca63 | ||
|
|
f0a43dd1bb | ||
|
|
e4ca7a85cc | ||
|
|
8d830047ec | ||
|
|
e592664788 | ||
|
|
5a2f6eb4af | ||
|
|
1c4ad777cb | ||
|
|
1462fcee1e | ||
|
|
510df9519e | ||
|
|
2c2035282c | ||
|
|
a93cdd3d67 | ||
|
|
bb57985c2e | ||
|
|
70afaf2603 | ||
|
|
8200219a2a | ||
|
|
39f6a8d142 | ||
|
|
e657f3698e | ||
|
|
1e05521d4f | ||
|
|
2728ac7ecd | ||
|
|
abcc7c03cc | ||
|
|
62efdd2a85 | ||
|
|
41d35e54d5 | ||
|
|
692d04cb6a | ||
|
|
3473147172 | ||
|
|
3bba2dadae | ||
|
|
af2ffe5c23 | ||
|
|
874ac415b9 | ||
|
|
06caf0e144 | ||
|
|
687f011aa9 | ||
|
|
fb9a3976c2 | ||
|
|
f1fb412cf3 | ||
|
|
51c7ca01e2 | ||
|
|
1f68dca514 | ||
|
|
aa01d1934c | ||
|
|
61747047da | ||
|
|
a70596de95 | ||
|
|
51f255a530 | ||
|
|
23ec25b7c6 | ||
|
|
0ab402b48b | ||
|
|
42ec0ae176 | ||
|
|
9637e0ed1c | ||
|
|
69a2ab11cf | ||
|
|
d88cf11791 | ||
|
|
9da640eaa8 | ||
|
|
d3d3628bde | ||
|
|
4c6b13f37e | ||
|
|
f840c05ad4 | ||
|
|
17a407dc51 | ||
|
|
4b7a4c1b1c | ||
|
|
873ac263c8 | ||
|
|
232be91a83 | ||
|
|
c781580d07 | ||
|
|
348f560883 | ||
|
|
d93b5f50cf | ||
|
|
4c56b1319d | ||
|
|
93d0103dd4 | ||
|
|
628be6c97d | ||
|
|
c842365a01 | ||
|
|
14e568d744 | ||
|
|
dac8cc0d14 | ||
|
|
3710dd02e2 | ||
|
|
9852b61c2b | ||
|
|
5bf2bf7a6d | ||
|
|
f37495f601 | ||
|
|
3a414bbfa0 | ||
|
|
4bb975e1ad | ||
|
|
74baf5c966 | ||
|
|
d63e12792a | ||
|
|
833d1720f8 | ||
|
|
e4bcae3c5a | ||
|
|
d5eb0826af | ||
|
|
1fa303077d | ||
|
|
77373efad2 | ||
|
|
890ab17c84 | ||
|
|
aa50ba7bff | ||
|
|
c519609864 | ||
|
|
39fb7e6239 | ||
|
|
c33bc80009 | ||
|
|
8fbbeba2a4 | ||
|
|
1874a474b9 | ||
|
|
f4bfd5a96f | ||
|
|
2509eba631 | ||
|
|
314542f905 | ||
|
|
2498596474 | ||
|
|
47076da5b6 | ||
|
|
36dfe4662e | ||
|
|
07c0db18b4 | ||
|
|
1a323c2f71 | ||
|
|
38609c3455 | ||
|
|
642f240e22 | ||
|
|
d0caad01ab | ||
|
|
ac2def5602 | ||
|
|
dbbb64f091 | ||
|
|
bfa018d447 | ||
|
|
4521fcdf02 | ||
|
|
cbc6a70e9d | ||
|
|
992e874a7c | ||
|
|
a1ed2b71fa | ||
|
|
1e20ad112f | ||
|
|
ac9b0e954b | ||
|
|
2de160e12e | ||
|
|
cba975069a | ||
|
|
62eb2d1bd9 | ||
|
|
620b2e3691 | ||
|
|
dad6544d4a | ||
|
|
8bea3dbd84 | ||
|
|
d5e8574bf6 | ||
|
|
ae09ec8577 | ||
|
|
80d653fd30 | ||
|
|
0210a4bf5e | ||
|
|
7685e2f7ba | ||
|
|
67f8cf51c3 | ||
|
|
83b66dddb6 | ||
|
|
517cb0ad9c | ||
|
|
75c7a52a31 | ||
|
|
cc96d8ff98 | ||
|
|
66ed97537a | ||
|
|
95d176ffd9 | ||
|
|
ed15d907c5 | ||
|
|
e3a33f7c23 | ||
|
|
34d4193815 | ||
|
|
246c4efafe | ||
|
|
531683e74b | ||
|
|
e7bfa8b721 | ||
|
|
8c221795af | ||
|
|
c8bf65f07e | ||
|
|
7ac45a4687 | ||
|
|
b10dd689b6 | ||
|
|
601bdfabe2 | ||
|
|
d19123e612 | ||
|
|
ecdfea9a12 | ||
|
|
43e6aea526 | ||
|
|
c046698e6e | ||
|
|
966aba6583 | ||
|
|
812775a039 | ||
|
|
1c4aa81df1 | ||
|
|
1d0f55cc84 | ||
|
|
0b59345789 | ||
|
|
0939aa2d3c | ||
|
|
ae618dcca5 | ||
|
|
6789b8bd7b | ||
|
|
663ce7bb3e | ||
|
|
379261b3fd | ||
|
|
25029e164a | ||
|
|
620b572773 | ||
|
|
34a6c2d19b | ||
|
|
f805dfcb3f | ||
|
|
166366b28f | ||
|
|
03c07b0394 | ||
|
|
44c124a389 | ||
|
|
4266073618 | ||
|
|
a2d0567444 | ||
|
|
c4fae1ef48 | ||
|
|
42f4393a72 | ||
|
|
bd5df716a3 | ||
|
|
7ba0d59da0 | ||
|
|
b4d71a9664 | ||
|
|
4ecd368199 | ||
|
|
c65e529237 | ||
|
|
96002de2e1 | ||
|
|
fadb13b5b3 | ||
|
|
72183df4da | ||
|
|
e80b068ce1 | ||
|
|
54d8d31419 | ||
|
|
e3ee30b88f | ||
|
|
c4eb1e841e | ||
|
|
10fa0146e2 | ||
|
|
6f5be1abf7 | ||
|
|
11c4e57daf | ||
|
|
e186a28486 | ||
|
|
e14c68313b | ||
|
|
75c21b618d | ||
|
|
33d2a86079 | ||
|
|
006faedfd3 | ||
|
|
ecd1b61cd4 | ||
|
|
f67c40374e | ||
|
|
0213d65176 | ||
|
|
c19178bfaf | ||
|
|
0d2b2ab033 | ||
|
|
8ba62e3e10 | ||
|
|
f490771b4b | ||
|
|
5bc993d947 | ||
|
|
580c075d7f | ||
|
|
5d3a1ecbbe | ||
|
|
015e86a7b2 | ||
|
|
c1455babda | ||
|
|
2075a82a18 | ||
|
|
26fccd4d7b | ||
|
|
6469c4d72b | ||
|
|
b328890a9e | ||
|
|
f307943941 | ||
|
|
5339158d01 | ||
|
|
8defe11bfa | ||
|
|
41930e7ad8 | ||
|
|
d07932ef3d | ||
|
|
0364b3344f | ||
|
|
876fd8357a | ||
|
|
1eb0b14659 | ||
|
|
bee1df15b2 | ||
|
|
7e6d1e2296 | ||
|
|
a957d06cef | ||
|
|
462503f825 | ||
|
|
bf151b75ff | ||
|
|
f56274a8f9 | ||
|
|
b5775a81c1 | ||
|
|
7ed73f82ad | ||
|
|
4b1ebc495b | ||
|
|
738cde3e93 | ||
|
|
d6fb461dd8 | ||
|
|
14da0cdd07 | ||
|
|
c9ba9e5978 | ||
|
|
bfb40910e3 | ||
|
|
241fda7a8d | ||
|
|
ed4d67dcbe | ||
|
|
e254a580b5 | ||
|
|
f259e4e63c | ||
|
|
74d6c0fe17 | ||
|
|
cae5057f47 | ||
|
|
4af432ba25 | ||
|
|
e26d4e4314 | ||
|
|
c0ee9e2115 | ||
|
|
482dc52fb7 | ||
|
|
52cbbe845a | ||
|
|
0925d5bfd4 | ||
|
|
cf98343c1d | ||
|
|
9f467b7d84 | ||
|
|
0f0e1ace60 | ||
|
|
548e2104e2 | ||
|
|
ddf17a6e0e | ||
|
|
e1145ad8bd | ||
|
|
0df72d78ff | ||
|
|
9a90b6bbc6 | ||
|
|
6501566813 | ||
|
|
98e26a9201 | ||
|
|
86c0e78460 | ||
|
|
8851116612 | ||
|
|
d67c52e852 | ||
|
|
6bbb2ed5ef | ||
|
|
8dce3875bc | ||
|
|
a3764451d3 | ||
|
|
882a1fbf72 | ||
|
|
dfcc595944 | ||
|
|
a30e920d17 | ||
|
|
445b74704f | ||
|
|
a1e50014a0 | ||
|
|
d43f77e7ee | ||
|
|
fee2ed87aa | ||
|
|
fdd2c97c0b | ||
|
|
78029cd561 | ||
|
|
c53d18b157 | ||
|
|
5523ac79a0 | ||
|
|
8fa369111f | ||
|
|
bcf07cb707 | ||
|
|
9aacab9ae9 | ||
|
|
a9fc7990fa | ||
|
|
0f1d6f10d7 | ||
|
|
7bd1665a86 |
-28
@@ -1,28 +0,0 @@
|
|||||||
*.cache
|
|
||||||
*.flc
|
|
||||||
*.patch *.log log patches applied
|
|
||||||
*.prj
|
|
||||||
.version
|
|
||||||
ABOUT-NLS
|
|
||||||
COPYING
|
|
||||||
INSTALL
|
|
||||||
Makefile
|
|
||||||
Makefile.in
|
|
||||||
_*
|
|
||||||
a.exe
|
|
||||||
a.out
|
|
||||||
aclocal.m4
|
|
||||||
b.out
|
|
||||||
bison-*
|
|
||||||
conf[0-9]*
|
|
||||||
confdefs*
|
|
||||||
config.log
|
|
||||||
config.status
|
|
||||||
configure
|
|
||||||
configure.lineno
|
|
||||||
conftest*
|
|
||||||
javacomp.sh
|
|
||||||
javaexec.sh
|
|
||||||
patches
|
|
||||||
releases
|
|
||||||
stamp-h*
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
ChangeLog merge=merge-changelog
|
||||||
+34
@@ -0,0 +1,34 @@
|
|||||||
|
|
||||||
|
/*.cache
|
||||||
|
/*.flc
|
||||||
|
/*.prj
|
||||||
|
/*~
|
||||||
|
/.tarball-version
|
||||||
|
/.version
|
||||||
|
/ABOUT-NLS
|
||||||
|
/COPYING
|
||||||
|
/GNUmakefile
|
||||||
|
/INSTALL
|
||||||
|
/Makefile
|
||||||
|
/Makefile.in
|
||||||
|
/_*
|
||||||
|
/a.exe
|
||||||
|
/a.out
|
||||||
|
/aclocal.m4
|
||||||
|
/b.out
|
||||||
|
/bison-*
|
||||||
|
/conf[0-9]*
|
||||||
|
/confdefs*
|
||||||
|
/config.log
|
||||||
|
/config.status
|
||||||
|
/configure
|
||||||
|
/configure.lineno
|
||||||
|
/conftest*
|
||||||
|
/gnulib
|
||||||
|
/javacomp.sh
|
||||||
|
/javaexec.sh
|
||||||
|
/maint.mk
|
||||||
|
/patches
|
||||||
|
/releases
|
||||||
|
/stamp-h*
|
||||||
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
[submodule "gnulib"]
|
||||||
|
path = gnulib
|
||||||
|
url = git://git.savannah.gnu.org/gnulib.git
|
||||||
|
[submodule "submodules/autoconf"]
|
||||||
|
path = submodules/autoconf
|
||||||
|
url = git://git.sv.gnu.org/autoconf.git
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
2.3b
|
||||||
@@ -1 +0,0 @@
|
|||||||
@VERSION@
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
COPYING
|
||||||
|
^bootstrap$
|
||||||
|
^doc/fdl\.texi$
|
||||||
|
^doc/gpl-3\.0\.texi$
|
||||||
|
^doc/yacc\.1\.in$
|
||||||
|
^src/parse-gram\.h$
|
||||||
-71
@@ -1,71 +0,0 @@
|
|||||||
# Having a separate GNUmakefile lets me `include' the dynamically
|
|
||||||
# generated rules created via Makefile.maint as well as Makefile.maint itself.
|
|
||||||
# This makefile is used only if you run GNU Make.
|
|
||||||
# It is necessary if you want to build targets usually of interest
|
|
||||||
# only to the maintainer.
|
|
||||||
|
|
||||||
# Copyright (C) 2001, 2003, 2006-2007, 2008 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/>.
|
|
||||||
|
|
||||||
# Systems where /bin/sh is not the default shell need this. The $(shell)
|
|
||||||
# command below won't work with e.g. stock DOS/Windows shells.
|
|
||||||
ifeq ($(wildcard /bin/s[h]),/bin/sh)
|
|
||||||
SHELL = /bin/sh
|
|
||||||
else
|
|
||||||
# will be used only with the next shell-test line, then overwritten
|
|
||||||
# by a configured-in value
|
|
||||||
SHELL = sh
|
|
||||||
endif
|
|
||||||
|
|
||||||
have-Makefile := $(shell test -f Makefile && echo yes)
|
|
||||||
|
|
||||||
# If the user runs GNU make but has not yet run ./configure,
|
|
||||||
# give them a diagnostic.
|
|
||||||
ifeq ($(have-Makefile),yes)
|
|
||||||
|
|
||||||
# Make tar archive easier to reproduce.
|
|
||||||
export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner
|
|
||||||
|
|
||||||
include Makefile
|
|
||||||
|
|
||||||
# Ensure that $(VERSION) is up to date for dist-related targets, but not
|
|
||||||
# for others: rerunning autoconf and recompiling everything isn't cheap.
|
|
||||||
ifeq (0,$(MAKELEVEL))
|
|
||||||
_is-dist-target = $(filter dist% alpha beta major,$(MAKECMDGOALS))
|
|
||||||
ifneq (,$(_is-dist-target))
|
|
||||||
_curr-ver := $(shell build-aux/git-version-gen .version)
|
|
||||||
ifneq ($(_curr-ver),$(VERSION))
|
|
||||||
$(info INFO: rerunning autoconf for new version string: $(_curr-ver))
|
|
||||||
dummy := $(shell rm -rf autom4te.cache; $(AUTOCONF))
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
include $(srcdir)/Makefile.cfg
|
|
||||||
include $(srcdir)/Makefile.maint
|
|
||||||
|
|
||||||
else
|
|
||||||
|
|
||||||
all:
|
|
||||||
@echo There seems to be no Makefile in this directory. 1>&2
|
|
||||||
@echo "You must run ./configure before running \`make'." 1>&2
|
|
||||||
@exit 1
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Tell version 3.79 and up of GNU make to not build goals in this
|
|
||||||
# directory in parallel. This is necessary in case someone tries to
|
|
||||||
# build multiple targets on one command line.
|
|
||||||
.NOTPARALLEL:
|
|
||||||
@@ -1,149 +0,0 @@
|
|||||||
-*- outline -*-
|
|
||||||
|
|
||||||
This file attempts to describe the rules to use when hacking Bison.
|
|
||||||
Don't put this file into the distribution.
|
|
||||||
|
|
||||||
Everything related to the development of Bison is on Savannah:
|
|
||||||
|
|
||||||
http://savannah.gnu.org/projects/bison/
|
|
||||||
|
|
||||||
|
|
||||||
* 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.
|
|
||||||
|
|
||||||
** If a change fixes a test, mention the test in the ChangeLog entry.
|
|
||||||
|
|
||||||
** Bug reports
|
|
||||||
If somebody reports a new bug, mention his name in the ChangeLog entry
|
|
||||||
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.
|
|
||||||
|
|
||||||
|
|
||||||
* Hacking
|
|
||||||
|
|
||||||
** Visible changes
|
|
||||||
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.
|
|
||||||
|
|
||||||
|
|
||||||
* Test suite
|
|
||||||
|
|
||||||
** make check
|
|
||||||
Use liberally.
|
|
||||||
|
|
||||||
** Release checks
|
|
||||||
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.
|
|
||||||
|
|
||||||
- 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-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.
|
|
||||||
|
|
||||||
- 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, which anyway is
|
|
||||||
not exercised yet in the test suite.
|
|
||||||
|
|
||||||
|
|
||||||
* Release Procedure
|
|
||||||
|
|
||||||
** 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.
|
|
||||||
|
|
||||||
** 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.
|
|
||||||
|
|
||||||
** Update NEWS
|
|
||||||
The version number, *and* the date of the release (including for
|
|
||||||
betas).
|
|
||||||
|
|
||||||
** Update ChangeLog
|
|
||||||
Should have an entry similar to `Version 1.49b.'.
|
|
||||||
Check all this in once `make distcheck' passes.
|
|
||||||
|
|
||||||
** make alpha
|
|
||||||
Running `make alpha' is absolutely perfect for beta releases: it makes
|
|
||||||
the tarballs, the xdeltas, and prepares (in /tmp/) a proto
|
|
||||||
announcement. It is so neat, that that's what I use anyway for
|
|
||||||
genuine releases, but adjusting things by hand (e.g., the urls in the
|
|
||||||
announcement file, the ChangeLog which is not needed etc.).
|
|
||||||
FIXME: `make alpha' is not maintained and is broken. These
|
|
||||||
instructions need to be replaced or removed.
|
|
||||||
|
|
||||||
If it fails, you're on your own...
|
|
||||||
|
|
||||||
It requires GNU Make.
|
|
||||||
|
|
||||||
** Upload
|
|
||||||
Put the tarballs/xdeltas where they should be. Or put it somewhere,
|
|
||||||
and send the URL to [email protected].
|
|
||||||
|
|
||||||
** Bump the version number
|
|
||||||
In configure.ac. Run `make', check this in.
|
|
||||||
|
|
||||||
** Announce
|
|
||||||
Complete/fix the announcement file, and send it at least to
|
|
||||||
[email protected] (if a real release, or a ``serious beta''),
|
|
||||||
[email protected], [email protected], [email protected],
|
|
||||||
and [email protected].
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
|
|
||||||
-----
|
|
||||||
|
|
||||||
Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This file is part of GNU Bison.
|
|
||||||
|
|
||||||
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/>.
|
|
||||||
+27
-3
@@ -1,6 +1,6 @@
|
|||||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||||
## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software
|
|
||||||
## Foundation, Inc.
|
## Copyright (C) 2001-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -23,7 +23,7 @@ SUBDIRS = build-aux po runtime-po lib data src doc examples tests etc
|
|||||||
aclocaldir = @aclocaldir@
|
aclocaldir = @aclocaldir@
|
||||||
aclocal_DATA = m4/bison-i18n.m4
|
aclocal_DATA = m4/bison-i18n.m4
|
||||||
|
|
||||||
EXTRA_DIST = GNUmakefile Makefile.cfg Makefile.maint \
|
EXTRA_DIST = .prev-version .version cfg.mk \
|
||||||
OChangeLog PACKAGING \
|
OChangeLog PACKAGING \
|
||||||
djgpp/Makefile.maint djgpp/README.in djgpp/config.bat \
|
djgpp/Makefile.maint djgpp/README.in djgpp/config.bat \
|
||||||
djgpp/config.sed djgpp/config.site djgpp/config_h.sed \
|
djgpp/config.sed djgpp/config.site djgpp/config_h.sed \
|
||||||
@@ -42,3 +42,27 @@ maintainer-push-check:
|
|||||||
.PHONY: maintainer-xml-check
|
.PHONY: maintainer-xml-check
|
||||||
maintainer-xml-check:
|
maintainer-xml-check:
|
||||||
cd tests && $(MAKE) $(AM_MAKEFLAGS) $@
|
cd tests && $(MAKE) $(AM_MAKEFLAGS) $@
|
||||||
|
|
||||||
|
# See comments in build-aux/git-version-gen. However, we make .version depend
|
||||||
|
# on configure so that .version and VERSION/PACKAGE_VERSION stay in sync in the
|
||||||
|
# working copy (for example, when you run autoreconf && make). Allowing these
|
||||||
|
# to fall out of sync appears to have little potential to improve Bison build
|
||||||
|
# efficiency (even if we were to replace VERSION/PACKAGE_VERSION with .version
|
||||||
|
# everywhere possible). On the other hand, it could be harmful. For example,
|
||||||
|
# a developer might naively reference .version in a test case while the bison
|
||||||
|
# executable still compiles with VERSION, and so the test case might fail or
|
||||||
|
# pass incorrectly.
|
||||||
|
BUILT_SOURCES = $(top_srcdir)/.version
|
||||||
|
$(top_srcdir)/.version: configure
|
||||||
|
echo $(VERSION) > $@-t && mv $@-t $@
|
||||||
|
dist-hook:
|
||||||
|
echo $(VERSION) > $(distdir)/.tarball-version
|
||||||
|
|
||||||
|
.PHONY: update-b4-copyright update-package-copyright-year
|
||||||
|
update-b4-copyright:
|
||||||
|
find data -type f \
|
||||||
|
| grep -v -E '^data/bison.m4$$' \
|
||||||
|
| xargs $(build_aux)/$@
|
||||||
|
@echo 'warning: src/parse-gram.[hc] may need to be regenerated.'
|
||||||
|
update-package-copyright-year:
|
||||||
|
$(build_aux)/$@ configure.ac
|
||||||
|
|||||||
-637
@@ -1,637 +0,0 @@
|
|||||||
# -*-Makefile-*-
|
|
||||||
# This Makefile fragment is shared between the coreutils,
|
|
||||||
# CPPI, Bison, and Autoconf.
|
|
||||||
|
|
||||||
## Copyright (C) 2001-2006 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/>.
|
|
||||||
|
|
||||||
# This is reported not to work with make-3.79.1
|
|
||||||
# ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
|
|
||||||
ME := Makefile.maint
|
|
||||||
|
|
||||||
# Do not save the original name or timestamp in the .tar.gz file.
|
|
||||||
# Use --rsyncable if available.
|
|
||||||
gzip_rsyncable = \
|
|
||||||
(gzip --help|grep rsyncable) >/dev/null 2>&1 && echo --rsyncable
|
|
||||||
GZIP_ENV = "--no-name --best `$(gzip_rsyncable)`"
|
|
||||||
|
|
||||||
CVS = cvs
|
|
||||||
|
|
||||||
# cvsu is part of the cvsutils package: http://www.red-bean.com/cvsutils/
|
|
||||||
CVS_LIST = sh -c ' \
|
|
||||||
if test -x $(srcdir)/build-aux/cvsu; then \
|
|
||||||
$(srcdir)/build-aux/cvsu --find --types=AFGM $$*; \
|
|
||||||
else \
|
|
||||||
awk -F/ '\''{ \
|
|
||||||
if (!$$1 && $$3 !~ /^-/) { \
|
|
||||||
f=FILENAME; \
|
|
||||||
sub(/CVS\/Entries/, "", f); \
|
|
||||||
print f $$2; \
|
|
||||||
}}'\'' \
|
|
||||||
$$(find $${*-*} -name Entries -print) /dev/null; \
|
|
||||||
fi \
|
|
||||||
' dummy
|
|
||||||
|
|
||||||
CVS_LIST_EXCEPT = \
|
|
||||||
$(CVS_LIST) | if test -f .x-$@; then grep -vEf .x-$@; else grep -v ChangeLog; fi
|
|
||||||
|
|
||||||
ifeq ($(origin prev_version_file), undefined)
|
|
||||||
prev_version_file = .prev-version
|
|
||||||
endif
|
|
||||||
|
|
||||||
PREV_VERSION := $(shell cat $(prev_version_file))
|
|
||||||
VERSION_REGEXP = $(subst .,\.,$(VERSION))
|
|
||||||
|
|
||||||
tag-package = $(shell echo "$(PACKAGE)" | tr '[:lower:]' '[:upper:]')
|
|
||||||
tag-this-version = $(subst .,_,$(VERSION))
|
|
||||||
this-cvs-tag = $(tag-package)-$(tag-this-version)
|
|
||||||
my_distdir = $(PACKAGE)-$(VERSION)
|
|
||||||
|
|
||||||
# Old releases are stored here.
|
|
||||||
# Used for diffs and xdeltas.
|
|
||||||
release_archive_dir ?= ../release
|
|
||||||
|
|
||||||
# Prevent programs like 'sort' from considering distinct strings to be equal.
|
|
||||||
# Doing it here saves us from having to set LC_ALL elsewhere in this file.
|
|
||||||
export LC_ALL = C
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## --------------- ##
|
|
||||||
## Sanity checks. ##
|
|
||||||
## --------------- ##
|
|
||||||
|
|
||||||
# FIXME: add a check to prohibit definition in src/*.c of symbols defined
|
|
||||||
# in system.h. E.g. today I removed from tail.c a useless definition of
|
|
||||||
# ENOSYS. It was useless because system.h ensures it's defined.
|
|
||||||
|
|
||||||
# Checks that don't require cvs.
|
|
||||||
# Run `changelog-check' last, as previous test may reveal problems requiring
|
|
||||||
# new ChangeLog entries.
|
|
||||||
local-checks-available = \
|
|
||||||
po-check copyright-check writable-files m4-check author_mark_check \
|
|
||||||
changelog-check strftime-check $(syntax-check-rules) \
|
|
||||||
makefile_path_separator_check \
|
|
||||||
makefile-check
|
|
||||||
.PHONY: $(local-checks-available)
|
|
||||||
|
|
||||||
local-check = $(filter-out $(local-checks-to-skip), $(local-checks-available))
|
|
||||||
|
|
||||||
.PHONY: $(syntax-check-rules)
|
|
||||||
syntax-check-rules = \
|
|
||||||
sc_cast_of_argument_to_free \
|
|
||||||
sc_cast_of_x_alloc_return_value \
|
|
||||||
sc_cast_of_alloca_return_value \
|
|
||||||
sc_changelog \
|
|
||||||
sc_dd_max_sym_length \
|
|
||||||
sc_error_exit_success \
|
|
||||||
sc_file_system \
|
|
||||||
sc_no_if_have_config_h \
|
|
||||||
sc_obsolete_symbols \
|
|
||||||
sc_prohibit_atoi_atof \
|
|
||||||
sc_prohibit_jm_in_m4 \
|
|
||||||
sc_prohibit_assert_without_use \
|
|
||||||
sc_require_config_h \
|
|
||||||
sc_root_tests \
|
|
||||||
sc_space_tab \
|
|
||||||
sc_sun_os_names \
|
|
||||||
sc_system_h_headers \
|
|
||||||
sc_tight_scope \
|
|
||||||
sc_trailing_blank \
|
|
||||||
sc_two_space_separator_in_usage \
|
|
||||||
sc_unmarked_diagnostics \
|
|
||||||
sc_useless_cpp_parens
|
|
||||||
|
|
||||||
syntax-check: $(syntax-check-rules)
|
|
||||||
# @grep -nE '# *include <(limits|std(def|arg|bool))\.h>' \
|
|
||||||
# $$(find -type f -name '*.[chly]') && \
|
|
||||||
# { echo '$(ME): found conditional include' 1>&2; \
|
|
||||||
# exit 1; } || :
|
|
||||||
|
|
||||||
# grep -nE '^# *include <(string|stdlib)\.h>' \
|
|
||||||
# $(srcdir)/{lib,src}/*.[chy] && \
|
|
||||||
# { echo '$(ME): FIXME' 1>&2; \
|
|
||||||
# exit 1; } || :
|
|
||||||
# FIXME: don't allow `#include .strings\.h' anywhere
|
|
||||||
|
|
||||||
sc_cast_of_argument_to_free:
|
|
||||||
@grep -nE '\<free \(\(' $(srcdir)/{lib,src}/*.[chly] && \
|
|
||||||
{ echo '$(ME): don'\''t cast free argument' 1>&2; \
|
|
||||||
exit 1; } || :
|
|
||||||
|
|
||||||
sc_cast_of_x_alloc_return_value:
|
|
||||||
@grep -nE --exclude=$(srcdir)/lib/regex.c \
|
|
||||||
'\*\) *x(m|c|re)alloc\>' \
|
|
||||||
$(srcdir)/{lib,src}/*.[chy] && \
|
|
||||||
{ echo '$(ME): don'\''t cast x*alloc return value' 1>&2; \
|
|
||||||
exit 1; } || :
|
|
||||||
|
|
||||||
sc_cast_of_alloca_return_value:
|
|
||||||
@grep -nE '\*\) *alloca\>' \
|
|
||||||
$(srcdir)/src/*.[chy] && \
|
|
||||||
{ echo '$(ME): don'\''t cast alloca return value' 1>&2; \
|
|
||||||
exit 1; } || :
|
|
||||||
|
|
||||||
sc_space_tab:
|
|
||||||
@grep -n '[ ] ' $$($(CVS_LIST_EXCEPT)) && \
|
|
||||||
{ echo '$(ME): found SPACE-TAB sequence; remove the SPACE' \
|
|
||||||
1>&2; exit 1; } || :
|
|
||||||
|
|
||||||
# Don't use the old ato* functions in `real' code.
|
|
||||||
# They provide no error checking mechanism.
|
|
||||||
# Instead, use strto* functions.
|
|
||||||
sc_prohibit_atoi_atof:
|
|
||||||
@grep -nE '\<ato([filq]|ll)\>' $$($(CVS_LIST_EXCEPT)) && \
|
|
||||||
{ echo '$(ME): do not use ato''f, ato''i, ato''l, ato''ll, or ato''q' \
|
|
||||||
1>&2; exit 1; } || :
|
|
||||||
|
|
||||||
# Using EXIT_SUCCESS as the first argument to error is misleading,
|
|
||||||
# since when that parameter is 0, error does not exit. Use `0' instead.
|
|
||||||
sc_error_exit_success:
|
|
||||||
@grep -nF 'error (EXIT_SUCCESS,' \
|
|
||||||
$$(find -type f -name '*.[chly]') && \
|
|
||||||
{ echo '$(ME): found error (EXIT_SUCCESS' 1>&2; \
|
|
||||||
exit 1; } || :
|
|
||||||
|
|
||||||
sc_file_system:
|
|
||||||
@grep -ni 'file''system' $$($(CVS_LIST_EXCEPT)) && \
|
|
||||||
{ echo '$(ME): found use of "file''system";' \
|
|
||||||
'rewrite to use "file system"' 1>&2; \
|
|
||||||
exit 1; } || :
|
|
||||||
|
|
||||||
sc_no_if_have_config_h:
|
|
||||||
@grep -n '^# *if HAVE_CONFIG_H' $$($(CVS_LIST_EXCEPT)) && \
|
|
||||||
{ echo '$(ME): found use of #if HAVE_CONFIG_H; use #ifdef' \
|
|
||||||
1>&2; exit 1; } || :
|
|
||||||
|
|
||||||
# Nearly all .c files must include <config.h>.
|
|
||||||
sc_require_config_h:
|
|
||||||
@grep -L '^# *include <config\.h>' \
|
|
||||||
$$($(CVS_LIST_EXCEPT) | grep '\.c$$') \
|
|
||||||
| grep . && \
|
|
||||||
{ echo '$(ME): the above files do not include <config.h>' \
|
|
||||||
1>&2; exit 1; } || :
|
|
||||||
|
|
||||||
# Prohibit the inclusion of assert.h without an actual use of assert.
|
|
||||||
sc_prohibit_assert_without_use:
|
|
||||||
@files=$$(grep -l '# *include <assert\.h>' \
|
|
||||||
$$($(CVS_LIST_EXCEPT) | grep '\.c$$')) && \
|
|
||||||
grep -L '\<assert (' $$files \
|
|
||||||
| grep . && \
|
|
||||||
{ echo "$(ME): the above files include <assert.h> but don't use it" \
|
|
||||||
1>&2; exit 1; } || :
|
|
||||||
|
|
||||||
sc_obsolete_symbols:
|
|
||||||
@grep -nE '\<(HAVE''_FCNTL_H|O''_NDELAY)\>' \
|
|
||||||
$$($(CVS_LIST_EXCEPT)) && \
|
|
||||||
{ echo '$(ME): do not use HAVE''_FCNTL_H or O''_NDELAY' \
|
|
||||||
1>&2; exit 1; } || :
|
|
||||||
|
|
||||||
# FIXME: warn about definitions of EXIT_FAILURE, EXIT_SUCCESS, STREQ
|
|
||||||
|
|
||||||
# Each nonempty line must start with a year number, or a TAB.
|
|
||||||
sc_changelog:
|
|
||||||
@grep -n '^[^12 ]' $$(find . -maxdepth 2 -name ChangeLog) && \
|
|
||||||
{ echo '$(ME): found unexpected prefix in a ChangeLog' 1>&2; \
|
|
||||||
exit 1; } || :
|
|
||||||
|
|
||||||
# Ensure that dd's definition of LONGEST_SYMBOL stays in sync
|
|
||||||
# with the strings from the two affected variables.
|
|
||||||
dd_c = $(srcdir)/src/dd.c
|
|
||||||
sc_dd_max_sym_length:
|
|
||||||
ifneq ($(wildcard $(dd_c)),)
|
|
||||||
@len=$$( (sed -n '/conversions\[\] =$$/,/^};/p' $(dd_c);\
|
|
||||||
sed -n '/flags\[\] =$$/,/^};/p' $(dd_c) ) \
|
|
||||||
|sed -n '/"/s/^[^"]*"\([^"]*\)".*/\1/p' \
|
|
||||||
| wc --max-line-length); \
|
|
||||||
max=$$(sed -n '/^#define LONGEST_SYMBOL /s///p' $(dd_c) \
|
|
||||||
|tr -d '"' | wc --max-line-length); \
|
|
||||||
if test "$$len" = "$$max"; then :; else \
|
|
||||||
echo 'dd.c: LONGEST_SYMBOL is not longest' 1>&2; \
|
|
||||||
exit 1; \
|
|
||||||
fi
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Many m4 macros names once began with `jm_'.
|
|
||||||
# On 2004-04-13, they were all changed to start with gl_ instead.
|
|
||||||
# Make sure that none are inadvertently reintroduced.
|
|
||||||
sc_prohibit_jm_in_m4:
|
|
||||||
@grep -nE 'jm_[A-Z]' \
|
|
||||||
$$($(CVS_LIST) $(srcdir)/m4 |grep '\.m4$$') && \
|
|
||||||
{ echo '$(ME): do not use jm_ in m4 macro names' \
|
|
||||||
1>&2; exit 1; } || :
|
|
||||||
|
|
||||||
sc_root_tests:
|
|
||||||
@t1=sc-root.expected; t2=sc-root.actual; \
|
|
||||||
grep -nl '^PRIV_CHECK_ARG=require-root' \
|
|
||||||
$$($(CVS_LIST) tests) |sed s,tests,., |sort > $$t1; \
|
|
||||||
sed -n 's, cd \([^ ]*\) .*MAKE..check TESTS=\(.*\),./\1/\2,p' \
|
|
||||||
$(srcdir)/tests/Makefile.am |sort > $$t2; \
|
|
||||||
diff -u $$t1 $$t2 || diff=1; \
|
|
||||||
rm -f $$t1 $$t2; \
|
|
||||||
test "$$diff" \
|
|
||||||
&& { echo 'tests/Makefile.am: missing check-root action'>&2; \
|
|
||||||
exit 1; } || :
|
|
||||||
|
|
||||||
# Create a list of regular expressions matching the names
|
|
||||||
# of files included from system.h. Exclude a couple.
|
|
||||||
.re-list:
|
|
||||||
@sed -n '/^# *include /s///p' $(srcdir)/src/system.h \
|
|
||||||
| grep -Ev 'sys/(param|file)\.h' \
|
|
||||||
| sed 's/ .*//;;s/^["<]/^# *include [<"]/;s/\.h[">]$$/\\.h[">]/' \
|
|
||||||
> $@-t
|
|
||||||
@mv $@-t $@
|
|
||||||
|
|
||||||
# Files in src/ should not include directly any of
|
|
||||||
# the headers already included via system.h.
|
|
||||||
sc_system_h_headers: .re-list
|
|
||||||
@if test -f $(srcdir)/src/system.h; then \
|
|
||||||
trap 'rc=$$?; rm -f .re-list; exit $$rc' 0 1 2 3 15; \
|
|
||||||
grep -nE -f .re-list \
|
|
||||||
$$($(CVS_LIST) src | \
|
|
||||||
grep -Ev '((copy|system)\.h|parse-gram\.c)$$') \
|
|
||||||
&& { echo '$(ME): the above are already included via system.h'\
|
|
||||||
1>&2; exit 1; } || :; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
sc_sun_os_names:
|
|
||||||
@grep -nEi \
|
|
||||||
'solaris[^[:alnum:]]*2\.(7|8|9|[1-9][0-9])|sunos[^[:alnum:]][6-9]' \
|
|
||||||
$$($(CVS_LIST_EXCEPT)) && \
|
|
||||||
{ echo '$(ME): found misuse of Sun OS version numbers' 1>&2; \
|
|
||||||
exit 1; } || :
|
|
||||||
|
|
||||||
sc_tight_scope:
|
|
||||||
$(MAKE) -C src $@
|
|
||||||
|
|
||||||
sc_trailing_blank:
|
|
||||||
@grep -n '[ ]$$' $$($(CVS_LIST_EXCEPT)) && \
|
|
||||||
{ echo '$(ME): found trailing blank(s)' \
|
|
||||||
1>&2; exit 1; } || :
|
|
||||||
|
|
||||||
sc_two_space_separator_in_usage:
|
|
||||||
@grep -n '^ *--[a-z][0-9A-Za-z-]* [^ ].*\\$$' \
|
|
||||||
$$($(CVS_LIST_EXCEPT)) && \
|
|
||||||
{ echo "$(ME): help2man requires at least two spaces between"; \
|
|
||||||
echo "$(ME): an option and its description"; \
|
|
||||||
1>&2; exit 1; } || :
|
|
||||||
|
|
||||||
# Look for diagnostics that aren't marked for translation.
|
|
||||||
# This won't find any for which error's format string is on a separate line.
|
|
||||||
sc_unmarked_diagnostics:
|
|
||||||
@grep -nE \
|
|
||||||
'\<error \([^"]*"[^"]*[a-z]{3}' $$($(CVS_LIST_EXCEPT)) \
|
|
||||||
| grep -v '_''(' && \
|
|
||||||
{ echo '$(ME): found unmarked diagnostic(s)' 1>&2; \
|
|
||||||
exit 1; } || :
|
|
||||||
|
|
||||||
# Avoid useless parentheses like those in this example:
|
|
||||||
# #if defined (SYMBOL) || defined (SYM2)
|
|
||||||
sc_useless_cpp_parens:
|
|
||||||
@grep -n '^# *if .*defined *(' $$($(CVS_LIST_EXCEPT)) && \
|
|
||||||
{ echo '$(ME): found useless parentheses in cpp directive' \
|
|
||||||
1>&2; exit 1; } || :
|
|
||||||
|
|
||||||
# Ensure that date's --help output stays in sync with the info
|
|
||||||
# documentation for GNU strftime. The only exception is %N,
|
|
||||||
# which date accepts but GNU strftime does not.
|
|
||||||
extract_char = sed 's/^[^%][^%]*%\(.\).*/\1/'
|
|
||||||
strftime-check:
|
|
||||||
if test -f $(srcdir)/src/date.c; then \
|
|
||||||
grep '^ %. ' $(srcdir)/src/date.c | sort \
|
|
||||||
| $(extract_char) > $@-src; \
|
|
||||||
{ echo N; \
|
|
||||||
info libc date calendar format | grep '^ `%.'\' \
|
|
||||||
| $(extract_char); } | sort > $@-info; \
|
|
||||||
diff -u $@-src $@-info || exit 1; \
|
|
||||||
rm -f $@-src $@-info; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Ensure that we use only the standard $(VAR) notation,
|
|
||||||
# not @...@ in Makefile.am, now that we can rely on automake
|
|
||||||
# to emit a definition for each substituted variable.
|
|
||||||
makefile-check:
|
|
||||||
grep -nE '@[A-Z_0-9]+@' `find . -name Makefile.am` \
|
|
||||||
&& { echo 'Makefile.maint: use $$(...), not @...@' 1>&2; exit 1; } || :
|
|
||||||
|
|
||||||
news-date-check: NEWS
|
|
||||||
today=`date +%Y-%m-%d`; \
|
|
||||||
if head NEWS | grep '^\*.* $(VERSION_REGEXP) ('$$today')' \
|
|
||||||
>/dev/null; then \
|
|
||||||
:; \
|
|
||||||
else \
|
|
||||||
echo "version or today's date is not in NEWS" 1>&2; \
|
|
||||||
exit 1; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
changelog-check:
|
|
||||||
if head ChangeLog | grep 'Version $(VERSION_REGEXP)\.$$' \
|
|
||||||
>/dev/null; then \
|
|
||||||
:; \
|
|
||||||
else \
|
|
||||||
echo "$(VERSION) not in ChangeLog" 1>&2; \
|
|
||||||
exit 1; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
m4-check:
|
|
||||||
@grep -n 'AC_DEFUN([^[]' m4/*.m4 \
|
|
||||||
&& { echo 'Makefile.maint: quote the first arg to AC_DEFUN' 1>&2; \
|
|
||||||
exit 1; } || :
|
|
||||||
|
|
||||||
# Verify that all source files using _() are listed in po/POTFILES.in.
|
|
||||||
# FIXME: don't hard-code file names below; use a more general mechanism.
|
|
||||||
po-check:
|
|
||||||
if test -f po/POTFILES.in; then \
|
|
||||||
grep -E -v '^(#|$$)' po/POTFILES.in \
|
|
||||||
| grep -v '^src/false\.c$$' | sort > $@-1; \
|
|
||||||
files=; \
|
|
||||||
for file in $$($(CVS_LIST_EXCEPT)) lib/*.[ch]; do \
|
|
||||||
case $$file in \
|
|
||||||
djgpp/* | man/*) continue;; \
|
|
||||||
esac; \
|
|
||||||
case $$file in \
|
|
||||||
*.[ch]) \
|
|
||||||
base=`expr " $$file" : ' \(.*\)\..'`; \
|
|
||||||
{ test -f $$base.l || test -f $$base.y; } && continue;; \
|
|
||||||
esac; \
|
|
||||||
files="$$files $$file"; \
|
|
||||||
done; \
|
|
||||||
grep -E -l '\bN?_\([^)"]*("|$$)' $$files | sort -u > $@-2; \
|
|
||||||
diff -u $@-1 $@-2 || exit 1; \
|
|
||||||
rm -f $@-1 $@-2; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
# In a definition of #define AUTHORS "... and ..." where the RHS contains
|
|
||||||
# the English word `and', the string must be marked with `N_ (...)' so that
|
|
||||||
# gettext recognizes it as a string requiring translation.
|
|
||||||
author_mark_check:
|
|
||||||
@grep -n '^# *define AUTHORS "[^"]* and ' src/*.c |grep -v ' N_ (' && \
|
|
||||||
{ echo 'Makefile.maint: enclose the above strings in N_ (...)' 1>&2; \
|
|
||||||
exit 1; } || :
|
|
||||||
|
|
||||||
# Sometimes it is useful to change the PATH environment variable
|
|
||||||
# in Makefiles. When doing so, it's better not to use the Unix-centric
|
|
||||||
# path separator of `:', but rather the automake-provided `@PATH_SEPARATOR@'.
|
|
||||||
# It'd be better to use `find -print0 ...|xargs -0 ...', but less portable,
|
|
||||||
# and there probably aren't many projects with so many Makefile.am files
|
|
||||||
# that we'd have to worry about limits on command line length.
|
|
||||||
msg = 'Makefile.maint: Do not use `:'\'' above; use @PATH_SEPARATOR@ instead'
|
|
||||||
makefile_path_separator_check:
|
|
||||||
@grep -n 'PATH=.*:' `find $(srcdir) -name Makefile.am` \
|
|
||||||
&& { echo $(msg) 1>&2; exit 1; } || :
|
|
||||||
|
|
||||||
# Check that `make alpha' will not fail at the end of the process.
|
|
||||||
writable-files:
|
|
||||||
if test -d $(release_archive_dir); then :; else \
|
|
||||||
mkdir $(release_archive_dir); \
|
|
||||||
fi
|
|
||||||
for file in $(distdir).tar.gz $(xd-delta) \
|
|
||||||
$(release_archive_dir)/$(distdir).tar.gz \
|
|
||||||
$(release_archive_dir)/$(xd-delta); do \
|
|
||||||
test -e $$file || continue; \
|
|
||||||
test -w $$file \
|
|
||||||
|| { echo ERROR: $$file is not writable; fail=1; }; \
|
|
||||||
done; \
|
|
||||||
test "$$fail" && exit 1 || :
|
|
||||||
|
|
||||||
v_etc_file = lib/version-etc.c
|
|
||||||
# Make sure that the copyright date in $(v_etc_file) is up to date.
|
|
||||||
copyright-check:
|
|
||||||
@if test -f $(v_etc_file); then \
|
|
||||||
grep 'enum { COPYRIGHT_YEAR = '$$(date +%Y)' };' $(v_etc_file) \
|
|
||||||
>/dev/null \
|
|
||||||
|| { echo 'out of date copyright in $(v_etc_file); update it' 1>&2; \
|
|
||||||
exit 1; }; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Sanity checks with the CVS repository.
|
|
||||||
cvs-tag-check:
|
|
||||||
echo $(this-cvs-tag); \
|
|
||||||
if $(CVS) -n log -h README | grep -e $(this-cvs-tag): >/dev/null; then \
|
|
||||||
echo "$(this-cvs-tag) as already been used; not tagging" 1>&2; \
|
|
||||||
exit 1; \
|
|
||||||
else :; fi
|
|
||||||
|
|
||||||
cvs-diff-check:
|
|
||||||
if $(CVS) diff >cvs-diffs; then \
|
|
||||||
rm cvs-diffs; \
|
|
||||||
else \
|
|
||||||
echo "Some files are locally modified:" 1>&2; \
|
|
||||||
cat cvs-diffs; \
|
|
||||||
exit 1; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
cvs-check: cvs-diff-check cvs-tag-check
|
|
||||||
|
|
||||||
maintainer-distcheck: changelog-check
|
|
||||||
$(MAKE) distcheck
|
|
||||||
$(MAKE) my-distcheck
|
|
||||||
|
|
||||||
|
|
||||||
# Tag before making distribution. Also, don't make a distribution if
|
|
||||||
# checks fail. Also, make sure the NEWS file is up-to-date.
|
|
||||||
# FIXME: use dist-hook/my-dist like distcheck-hook/my-distcheck.
|
|
||||||
cvs-dist: $(local-check) cvs-check maintainer-distcheck
|
|
||||||
$(CVS) update po
|
|
||||||
$(CVS) tag -c $(this-cvs-tag)
|
|
||||||
$(MAKE) dist
|
|
||||||
|
|
||||||
# Use this to make sure we don't run these programs when building
|
|
||||||
# from a virgin tgz file, below.
|
|
||||||
null_AM_MAKEFLAGS = \
|
|
||||||
ACLOCAL=false \
|
|
||||||
AUTOCONF=false \
|
|
||||||
AUTOMAKE=false \
|
|
||||||
AUTOHEADER=false \
|
|
||||||
MAKEINFO=false
|
|
||||||
|
|
||||||
# Detect format-string/arg-list mismatches that would normally be obscured
|
|
||||||
# by the use of _(). The --disable-nls effectively defines away that macro,
|
|
||||||
# and building with CFLAGS='-Wformat -Werror' causes any format warning to be
|
|
||||||
# treated as a failure. Also, check for shadowing problems with -Wshadow.
|
|
||||||
# These CFLAGS are pretty strict. If you build this target, you probably
|
|
||||||
# have to have a recent version of gcc and glibc headers.
|
|
||||||
TMPDIR ?= /tmp
|
|
||||||
t=$(TMPDIR)/$(PACKAGE)/test
|
|
||||||
my-distcheck: $(local-check) $(release_archive_dir)/$(prev-tgz)
|
|
||||||
-rm -rf $(t)
|
|
||||||
mkdir -p $(t)
|
|
||||||
GZIP=$(GZIP_ENV) $(AMTAR) -C $(t) -zxf $(distdir).tar.gz
|
|
||||||
cd $(t)/$(distdir) \
|
|
||||||
&& ./configure --disable-nls \
|
|
||||||
&& $(MAKE) CFLAGS='-Werror -Wall -Wformat -Wshadow' \
|
|
||||||
AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)' \
|
|
||||||
&& $(MAKE) dvi \
|
|
||||||
&& $(MAKE) check \
|
|
||||||
&& $(MAKE) distclean
|
|
||||||
(cd $(t) && mv $(distdir) $(distdir).old \
|
|
||||||
&& $(AMTAR) -zxf - ) < $(distdir).tar.gz
|
|
||||||
diff -ur $(t)/$(distdir).old $(t)/$(distdir)
|
|
||||||
-rm -rf $(t)
|
|
||||||
@echo "========================"; \
|
|
||||||
echo "$(distdir).tar.gz is ready for distribution"; \
|
|
||||||
echo "========================"
|
|
||||||
|
|
||||||
WGET = wget
|
|
||||||
WGETFLAGS = -C off
|
|
||||||
|
|
||||||
rel-check:
|
|
||||||
tarz=/tmp/rel-check-tarz-$$$$; \
|
|
||||||
md5_tmp=/tmp/rel-check-md5-$$$$; \
|
|
||||||
set -e; \
|
|
||||||
trap 'status=$$?; rm -f $$tarz $$md5_tmp; exit $$status' 0 1 2 3 15; \
|
|
||||||
$(WGET) $(WGETFLAGS) -q --output-document=$$tarz $(url); \
|
|
||||||
echo "$(md5) -" > $$md5_tmp; \
|
|
||||||
md5sum -c $$md5_tmp < $$tarz
|
|
||||||
|
|
||||||
prev-tgz = $(PACKAGE)-$(PREV_VERSION).tar.gz
|
|
||||||
xd-delta = $(PACKAGE)-$(PREV_VERSION)-$(VERSION).xdelta
|
|
||||||
|
|
||||||
rel-files = $(xd-delta) $(DIST_ARCHIVES)
|
|
||||||
announcement: NEWS ChangeLog $(rel-files)
|
|
||||||
@./announce-gen \
|
|
||||||
--release-type=$(RELEASE_TYPE) \
|
|
||||||
--package=$(PACKAGE) \
|
|
||||||
--prev=$(PREV_VERSION) \
|
|
||||||
--curr=$(VERSION) \
|
|
||||||
--release-archive-directory=$(release_archive_dir) \
|
|
||||||
--gpg-key-id=$(gpg_key_ID) \
|
|
||||||
--news=NEWS \
|
|
||||||
$(addprefix --url-dir=, $(url_dir_list)) \
|
|
||||||
|
|
||||||
|
|
||||||
## ---------------- ##
|
|
||||||
## Updating files. ##
|
|
||||||
## ---------------- ##
|
|
||||||
|
|
||||||
ftp-gnu = ftp://ftp.gnu.org/gnu
|
|
||||||
www-gnu = http://www.gnu.org
|
|
||||||
|
|
||||||
# Use mv, if you don't have/want move-if-change.
|
|
||||||
move_if_change ?= move-if-change
|
|
||||||
|
|
||||||
|
|
||||||
# --------------------- #
|
|
||||||
# Updating everything. #
|
|
||||||
# --------------------- #
|
|
||||||
|
|
||||||
.PHONY: update
|
|
||||||
local_updates ?= wget-update cvs-update po-update
|
|
||||||
update: $(local_updates)
|
|
||||||
|
|
||||||
|
|
||||||
# ------------------- #
|
|
||||||
# Updating PO files. #
|
|
||||||
# ------------------- #
|
|
||||||
|
|
||||||
po_repo = http://www.iro.umontreal.ca/contrib/po/maint/$(PACKAGE)
|
|
||||||
.PHONY: do-po-update po-update
|
|
||||||
do-po-update:
|
|
||||||
tmppo=/tmp/$(PACKAGE)-$(VERSION)-po &&\
|
|
||||||
rm -rf $$tmppo && \
|
|
||||||
mkdir $$tmppo && \
|
|
||||||
(cd $$tmppo && \
|
|
||||||
$(WGET) $(WGETFLAGS) -r -l1 -nd --no-parent -A '*.po' $(po_repo)) &&\
|
|
||||||
cp $$tmppo/*.po po
|
|
||||||
cd po && $(MAKE) update-po
|
|
||||||
$(MAKE) po-check
|
|
||||||
|
|
||||||
po-update:
|
|
||||||
if test -d "po"; then \
|
|
||||||
$(MAKE) do-po-update; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
# -------------------------- #
|
|
||||||
# Updating GNU build tools. #
|
|
||||||
# -------------------------- #
|
|
||||||
|
|
||||||
# The following pseudo table associates a local directory and a URL
|
|
||||||
# with each of the files that belongs to some other package and is
|
|
||||||
# regularly updated from the specified URL.
|
|
||||||
wget_files ?= \
|
|
||||||
$(srcdir)/build-aux/config.guess \
|
|
||||||
$(srcdir)/build-aux/config.sub \
|
|
||||||
$(srcdir)/build-aux/texinfo.tex \
|
|
||||||
$(srcdir)/src/ansi2knr.c
|
|
||||||
|
|
||||||
get-targets = $(patsubst %, get-%, $(wget_files))
|
|
||||||
|
|
||||||
config.guess-url_prefix = $(ftp-gnu)/build-aux/
|
|
||||||
config.sub-url_prefix = $(ftp-gnu)/build-aux/
|
|
||||||
|
|
||||||
ansi2knr.c-url_prefix = ftp://ftp.cs.wisc.edu/ghost/
|
|
||||||
|
|
||||||
texinfo.tex-url_prefix = $(ftp-gnu)/texinfo/
|
|
||||||
|
|
||||||
standards.texi-url_prefix = $(www-gnu)/prep/
|
|
||||||
make-stds.texi-url_prefix = $(standards.texi-url_prefix)
|
|
||||||
|
|
||||||
target = $(patsubst get-%, %, $@)
|
|
||||||
url = $($(notdir $(target))-url_prefix)$(notdir $(target))
|
|
||||||
|
|
||||||
.PHONY: $(get-targets)
|
|
||||||
$(get-targets):
|
|
||||||
$(WGET) $(WGETFLAGS) $(url) -O $(target).t \
|
|
||||||
&& $(move_if_change) $(target).t $(target)
|
|
||||||
|
|
||||||
cvs_files ?= \
|
|
||||||
$(srcdir)/build-aux/depcomp \
|
|
||||||
$(srcdir)/build-aux/install-sh \
|
|
||||||
$(srcdir)/build-aux/missing \
|
|
||||||
$(srcdir)/build-aux/mkinstalldirs \
|
|
||||||
$(srcdir)/src/ansi2knr.c
|
|
||||||
automake_repo=:pserver:anoncvs:[email protected]:/cvs/automake
|
|
||||||
.PHONY: wget-update
|
|
||||||
wget-update: $(get-targets)
|
|
||||||
|
|
||||||
.PHONY: cvs-update
|
|
||||||
cvs-update:
|
|
||||||
fail=; \
|
|
||||||
for f in $(cvs_files); do \
|
|
||||||
test -f $$f || { echo "*** skipping $$f" 1>&2; continue; }; \
|
|
||||||
cvs diff $$f > /dev/null \
|
|
||||||
|| { echo "*** $$f is locally modified; skipping it" 1>&2; \
|
|
||||||
fail=yes; continue; }; \
|
|
||||||
file=$$(basename $$f); \
|
|
||||||
echo checking out $$file...; \
|
|
||||||
$(CVS) -d $(automake_repo) co -p automake/lib/$$file> $$f.t \
|
|
||||||
&& $(move_if_change) $$f.t $$f; \
|
|
||||||
done; \
|
|
||||||
test "$$fail" && exit 1
|
|
||||||
|
|
||||||
emit_upload_commands:
|
|
||||||
@echo =====================================
|
|
||||||
@echo =====================================
|
|
||||||
@echo "$(srcdir)/gnupload $(GNUPLOADFLAGS) \\"
|
|
||||||
@echo " --to $(gnu_rel_host):coreutils \\"
|
|
||||||
@echo " $(rel-files)"
|
|
||||||
@echo '# send the /tmp/announcement e-mail'
|
|
||||||
@echo =====================================
|
|
||||||
@echo =====================================
|
|
||||||
|
|
||||||
$(xd-delta): $(release_archive_dir)/$(prev-tgz) $(distdir).tar.gz
|
|
||||||
xdelta delta -9 $^ $@ || :
|
|
||||||
|
|
||||||
.PHONY: alpha beta major
|
|
||||||
alpha beta major: news-date-check $(local-check)
|
|
||||||
$(MAKE) cvs-dist
|
|
||||||
$(MAKE) $(xd-delta)
|
|
||||||
$(MAKE) -s announcement RELEASE_TYPE=$@ > /tmp/announce-$(my_distdir)
|
|
||||||
ln $(rel-files) $(release_archive_dir)
|
|
||||||
chmod a-w $(rel-files)
|
|
||||||
$(MAKE) -s emit_upload_commands RELEASE_TYPE=$@
|
|
||||||
echo $(VERSION) > $(prev_version_file)
|
|
||||||
$(CVS) ci -m. $(prev_version_file)
|
|
||||||
@@ -36,7 +36,7 @@ to the bison package.
|
|||||||
|
|
||||||
-----
|
-----
|
||||||
|
|
||||||
Copyright (C) 2002, 2005 Free Software Foundation, Inc.
|
Copyright (C) 2002, 2005, 2009-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of Bison, the GNU Compiler Compiler.
|
This file is part of Bison, the GNU Compiler Compiler.
|
||||||
|
|
||||||
|
|||||||
@@ -1,27 +1,51 @@
|
|||||||
This directory contains the Bison parser generator.
|
This package contains the GNU Bison parser generator.
|
||||||
|
|
||||||
See the file INSTALL for generic compilation and installation instructions.
|
* Installation
|
||||||
See the file doc/FAQ for frequently asked questions.
|
** Build
|
||||||
|
See the file INSTALL for generic compilation and installation
|
||||||
|
instructions.
|
||||||
|
|
||||||
Bison requires GNU m4 1.4.3 or later. See:
|
Bison requires GNU m4 1.4.6 or later. See:
|
||||||
|
|
||||||
ftp://ftp.gnu.org/gnu/m4/m4-1.4.3.tar.gz
|
ftp://ftp.gnu.org/gnu/m4/m4-1.4.6.tar.gz
|
||||||
|
|
||||||
Bison can work with pre-1.4.3 distributions of GNU m4 if they are
|
** Internationalization
|
||||||
sufficiently patched, but if you encounter a bug with an older
|
Bison supports two catalogues: one for Bison itself (i.e., for the
|
||||||
distribution and report a bug we will probably suggest that you
|
maintainer-side parser generation), and one for the generated parsers
|
||||||
upgrade to 1.4.3 as the first step in trying to fix it.
|
(i.e., for the user-side parser execution). The requirements between
|
||||||
|
both differ: bison needs ngettext, the generated parsers do not. To
|
||||||
|
simplify the build system, neither are installed if ngettext is not
|
||||||
|
supported, even if generated parsers could have been localized. See
|
||||||
|
http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html for
|
||||||
|
more details.
|
||||||
|
|
||||||
Please send bug reports to <[email protected]>. Please include the
|
* Questions
|
||||||
version number from `bison --version', and a complete, self-contained
|
See the section FAQ in the documentation (doc/bison.info) for
|
||||||
test case in each bug report.
|
frequently asked questions. The documentation is also available in
|
||||||
|
PDF and HTML, provided you have a recent version of Texinfo installed:
|
||||||
|
run "make pdf" or "make html".
|
||||||
|
|
||||||
If you have questions about using Bison and the documentation does
|
If you have questions about using Bison and the documentation does
|
||||||
not answer them, please send mail to <[email protected]>.
|
not answer them, please send mail to <[email protected]>.
|
||||||
|
|
||||||
|
* Bug reports
|
||||||
|
Please send bug reports to <[email protected]>. Please include the
|
||||||
|
version number from `bison --version', and a complete, self-contained
|
||||||
|
test case in each bug report.
|
||||||
|
|
||||||
|
* Copyright statements
|
||||||
|
For any copyright year range specified as YYYY-ZZZZ in this package,
|
||||||
|
note that the range specifies every single year in that closed interval.
|
||||||
|
|
||||||
|
|
||||||
|
Local Variables:
|
||||||
|
mode: outline
|
||||||
|
End:
|
||||||
|
|
||||||
-----
|
-----
|
||||||
|
|
||||||
Copyright (C) 1992, 1998, 1999, 2003, 2004, 2005 Free Software Foundation, Inc.
|
Copyright (C) 1992, 1998-1999, 2003-2005, 2008-2011 Free Software
|
||||||
|
Foundation, Inc.
|
||||||
|
|
||||||
This file is part of Bison, the GNU Compiler Compiler.
|
This file is part of Bison, the GNU Compiler Compiler.
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ the problems you encounter.
|
|||||||
|
|
||||||
-----
|
-----
|
||||||
|
|
||||||
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
Copyright (C) 2002, 2004, 2009-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Bison.
|
This file is part of GNU Bison.
|
||||||
|
|
||||||
|
|||||||
+331
-10
@@ -1,9 +1,58 @@
|
|||||||
-*- outline -*-
|
-*- outline -*-
|
||||||
|
|
||||||
|
This file attempts to describe the rules to use when hacking Bison.
|
||||||
|
Don't put this file into the distribution.
|
||||||
|
|
||||||
|
Everything related to the development of Bison is on Savannah:
|
||||||
|
|
||||||
|
http://savannah.gnu.org/projects/bison/
|
||||||
|
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
|
** If a change fixes a test, mention the test in the ChangeLog entry.
|
||||||
|
|
||||||
|
** Bug reports
|
||||||
|
If somebody reports a new bug, mention his name in the ChangeLog entry
|
||||||
|
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.
|
||||||
|
|
||||||
|
** You may find it useful to install the git-merge-changelog merge driver:
|
||||||
|
|
||||||
|
http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/git-merge-changelog.c
|
||||||
|
|
||||||
|
When following the generic installation instructions there, keep in mind that
|
||||||
|
your clone of Bison's git repository already contains appropriate
|
||||||
|
.gitattributes files, and running Bison's bootstrap script will make the
|
||||||
|
necessary changes to .git/config.
|
||||||
|
|
||||||
|
|
||||||
|
* Hacking
|
||||||
|
|
||||||
|
** Visible changes
|
||||||
|
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.
|
||||||
|
|
||||||
|
|
||||||
|
* Working from the repository
|
||||||
|
|
||||||
These notes intend to help people working on the checked-out sources.
|
These notes intend to help people working on the checked-out sources.
|
||||||
These requirements do not apply when building from a distribution tarball.
|
These requirements do not apply when building from a distribution tarball.
|
||||||
|
|
||||||
* Requirements
|
** Requirements
|
||||||
|
|
||||||
We've opted to keep only the highest-level sources in the repository.
|
We've opted to keep only the highest-level sources in the repository.
|
||||||
This eases our maintenance burden, (fewer merges etc.), but imposes more
|
This eases our maintenance burden, (fewer merges etc.), but imposes more
|
||||||
@@ -33,38 +82,310 @@ Only building the initial full source tree will be a bit painful.
|
|||||||
Later, after synchronizing from the repository a plain `make' should
|
Later, after synchronizing from the repository a plain `make' should
|
||||||
be sufficient.
|
be sufficient.
|
||||||
|
|
||||||
* First checkout
|
** First checkout
|
||||||
|
|
||||||
Obviously, if you are reading these notes, you did manage to check out
|
Obviously, if you are reading these notes, you did manage to check out
|
||||||
this package from the repository. For the record, you will find all the
|
this package from the repository. For the record, you will find all the
|
||||||
relevant information on:
|
relevant information on:
|
||||||
|
|
||||||
http://savannah.gnu.org/cvs/?group_id=56
|
http://savannah.gnu.org/git/?group=bison
|
||||||
|
|
||||||
|
Bison uses Git submodules: subscriptions to other Git repositories.
|
||||||
|
In particular it uses gnulib, the GNU portability library. To ask Git
|
||||||
|
to perform the first checkout of the submodules, run
|
||||||
|
|
||||||
|
$ git submodule update --init
|
||||||
|
|
||||||
|
Git submodule support is weak before versions 1.6 and later, you
|
||||||
|
should probably upgrade Git if your version is older.
|
||||||
|
|
||||||
The next step is to get other files needed to build, which are
|
The next step is to get other files needed to build, which are
|
||||||
extracted from other source packages:
|
extracted from other source packages:
|
||||||
|
|
||||||
$ ./bootstrap
|
$ ./bootstrap
|
||||||
|
|
||||||
And there you are! Just
|
And there you are! Just
|
||||||
|
|
||||||
$ ./configure
|
$ ./configure
|
||||||
$ make
|
$ make
|
||||||
$ make check
|
$ make check
|
||||||
|
|
||||||
At this point, there should be no difference between your local copy,
|
At this point, there should be no difference between your local copy,
|
||||||
and the master copy:
|
and the master copy:
|
||||||
|
|
||||||
$ cvs diff
|
$ git diff
|
||||||
|
|
||||||
should output no difference.
|
should output no difference.
|
||||||
|
|
||||||
Enjoy!
|
Enjoy!
|
||||||
|
|
||||||
|
** Updating
|
||||||
|
|
||||||
|
The use of submodules make things somewhat different because git does
|
||||||
|
not support recursive operations: submodules must be taken care of
|
||||||
|
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 reporitory 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
|
||||||
|
|
||||||
|
*** Updating a submodule
|
||||||
|
To update a submodule, say gnulib, do as follows:
|
||||||
|
|
||||||
|
Get the most recent version of the master branch from git.
|
||||||
|
|
||||||
|
$ cd gnulib
|
||||||
|
$ git fetch
|
||||||
|
$ git checkout -b master --track origin/master
|
||||||
|
|
||||||
|
Make sure Bison can live with that version of gnulib.
|
||||||
|
|
||||||
|
$ cd ..
|
||||||
|
$ ./bootstrap
|
||||||
|
$ make distcheck
|
||||||
|
|
||||||
|
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:
|
||||||
|
|
||||||
|
http://erislabs.net/ianb/projects/gnulib/
|
||||||
|
|
||||||
|
The autoconf files we use are currently:
|
||||||
|
|
||||||
|
m4/m4.m4
|
||||||
|
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.
|
||||||
|
|
||||||
|
* Test suite
|
||||||
|
|
||||||
|
** make check
|
||||||
|
Use liberally.
|
||||||
|
|
||||||
|
** Release checks
|
||||||
|
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.
|
||||||
|
|
||||||
|
- Build with -DGNULIB_POSIXCHECK. It suggests gnulib modules that can
|
||||||
|
fix portability issues.
|
||||||
|
|
||||||
|
- 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-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.
|
||||||
|
|
||||||
|
- 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.
|
||||||
|
|
||||||
|
|
||||||
|
* Release Procedure
|
||||||
|
|
||||||
|
** Update the submodules. 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 '\<_(' *
|
||||||
|
|
||||||
|
** 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.
|
||||||
|
|
||||||
|
** 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.
|
||||||
|
|
||||||
|
** 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.
|
||||||
|
|
||||||
|
** Update NEWS
|
||||||
|
The version number, *and* the date of the release (including for
|
||||||
|
betas).
|
||||||
|
|
||||||
|
** Update ChangeLog
|
||||||
|
Should have an entry similar to `Version 1.49b.'.
|
||||||
|
|
||||||
|
** Tag the release
|
||||||
|
Before Bison will build with the right version number, you must tag the release
|
||||||
|
in git. Do this after all other changes. The command is similar to:
|
||||||
|
|
||||||
|
git tag -a v2.3b
|
||||||
|
|
||||||
|
The log message can be simply:
|
||||||
|
|
||||||
|
Bison 2.3b
|
||||||
|
|
||||||
|
** Push
|
||||||
|
Once `make distcheck' passes, push your changes and the tag.
|
||||||
|
`git push' without arguments will not push the tag.
|
||||||
|
|
||||||
|
** make alpha
|
||||||
|
FIXME: `make alpha' is not maintained and is broken. These
|
||||||
|
instructions need to be replaced or removed.
|
||||||
|
|
||||||
|
Running `make alpha' is absolutely perfect for beta releases: it makes
|
||||||
|
the tarballs, the xdeltas, and prepares (in /tmp/) a proto
|
||||||
|
announcement. It is so neat, that that's what I use anyway for
|
||||||
|
genuine releases, but adjusting things by hand (e.g., the urls in the
|
||||||
|
announcement file, the ChangeLog which is not needed etc.).
|
||||||
|
|
||||||
|
If it fails, you're on your own...
|
||||||
|
|
||||||
|
It requires GNU Make.
|
||||||
|
|
||||||
|
** Upload
|
||||||
|
The generic GNU upload procedure is at:
|
||||||
|
|
||||||
|
http://www.gnu.org/prep/maintain/maintain.html#Automated-FTP-Uploads
|
||||||
|
|
||||||
|
Follow the instructions there to register your information so you're permitted
|
||||||
|
to upload. 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
|
||||||
|
|
||||||
|
where F125BDF3 should be replaced with your key ID.
|
||||||
|
|
||||||
|
Here's a brief reminder of how to roll the tarballs and upload them:
|
||||||
|
|
||||||
|
*** make distcheck
|
||||||
|
*** gpg -b bison-2.3b.tar.gz
|
||||||
|
*** In a file named `bison-2.3b.tar.gz.directive', type:
|
||||||
|
|
||||||
|
version: 1.1
|
||||||
|
directory: bison
|
||||||
|
filename: bison-2.3b.tar.gz
|
||||||
|
|
||||||
|
*** gpg --clearsign bison-2.3b.tar.gz.directive
|
||||||
|
*** ftp ftp-upload.gnu.org # Log in as anonymous.
|
||||||
|
*** cd /incoming/alpha # cd /incoming/ftp for full release.
|
||||||
|
*** put bison-2.3b.tar.gz # This can take a while.
|
||||||
|
*** put bison-2.3b.tar.gz.sig
|
||||||
|
*** put bison-2.3b.tar.gz.directive.asc
|
||||||
|
*** Repeat all these steps for bison-2.3b.tar.bz2.
|
||||||
|
|
||||||
|
** Update Bison manual on www.gnu.org.
|
||||||
|
|
||||||
|
*** You need a non-anonymous checkout of the web pages directory.
|
||||||
|
|
||||||
|
$ cvs -d [email protected]:/web/bison checkout bison
|
||||||
|
|
||||||
|
*** Get familiar with the instructions for web page maintainers.
|
||||||
|
http://www.gnu.org/server/standards/readme_index.html
|
||||||
|
http://www.gnu.org/server/standards/README.software.html
|
||||||
|
especially the note about symlinks.
|
||||||
|
|
||||||
|
*** Build the web pages.
|
||||||
|
Assuming BISON_CHECKOUT refers to a checkout of the Bison dir, and
|
||||||
|
BISON_WWW_CHECKOUT refers to the web directory created above, do:
|
||||||
|
|
||||||
|
$ cd $BISON_CHECKOUT/doc
|
||||||
|
$ make stamp-vti
|
||||||
|
$ ../build-aux/gendocs.sh -o "$BISON_WWW_CHECKOUT/manual" \
|
||||||
|
bison "Bison - GNU parser generator"
|
||||||
|
$ cd $BISON_WWW_CHECKOUT
|
||||||
|
|
||||||
|
Verify that the result looks sane.
|
||||||
|
|
||||||
|
*** Commit the modified and the new files.
|
||||||
|
|
||||||
|
*** Remove old files.
|
||||||
|
Find the files which have not been overwritten (because they belonged to
|
||||||
|
sections that have been removed or renamed):
|
||||||
|
|
||||||
|
$ cd manual/html_node
|
||||||
|
$ 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.
|
||||||
|
|
||||||
|
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
|
||||||
|
issue.
|
||||||
|
|
||||||
|
** Announce
|
||||||
|
To generate a template announcement file:
|
||||||
|
|
||||||
|
make RELEASE_TYPE=alpha gpg_key_ID=F125BDF3 announcement
|
||||||
|
|
||||||
|
where alpha can be replaced by beta or stable and F125BDF3 should be
|
||||||
|
replaced with your key ID.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
** Bump the version number
|
||||||
|
In configure.ac. Run `make'. So that developers don't accidentally add new
|
||||||
|
items to the old NEWS entry, create a new empty NEWS entry something like:
|
||||||
|
|
||||||
|
Changes in version ?.? (????-??-??):
|
||||||
|
|
||||||
|
Push these changes.
|
||||||
|
|
||||||
|
|
||||||
-----
|
-----
|
||||||
|
|
||||||
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software
|
Copyright (C) 2002-2005, 2007-2011 Free Software Foundation, Inc.
|
||||||
Foundation, Inc.
|
|
||||||
|
This file is part of GNU Bison.
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -22,9 +22,6 @@ parser") refers to the current `output' format.
|
|||||||
** vector
|
** vector
|
||||||
Move to using vector, drop stack.hh.
|
Move to using vector, drop stack.hh.
|
||||||
|
|
||||||
** I18n
|
|
||||||
Catch up with yacc.c.
|
|
||||||
|
|
||||||
* Report
|
* Report
|
||||||
|
|
||||||
** GLR
|
** GLR
|
||||||
@@ -290,8 +287,7 @@ Equip the parser with a means to create the (visual) parse tree.
|
|||||||
|
|
||||||
-----
|
-----
|
||||||
|
|
||||||
Copyright (C) 2001, 2002, 2003, 2004, 2006 Free Software Foundation,
|
Copyright (C) 2001-2004, 2006, 2008-2011 Free Software Foundation, Inc.
|
||||||
Inc.
|
|
||||||
|
|
||||||
This file is part of Bison, the GNU Compiler Compiler.
|
This file is part of Bison, the GNU Compiler Compiler.
|
||||||
|
|
||||||
|
|||||||
+25
-17
@@ -1,6 +1,6 @@
|
|||||||
# Bootstrap configuration.
|
# Bootstrap configuration.
|
||||||
|
|
||||||
# Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
|
# Copyright (C) 2006-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -17,17 +17,17 @@
|
|||||||
|
|
||||||
# gnulib modules used by this package.
|
# gnulib modules used by this package.
|
||||||
gnulib_modules='
|
gnulib_modules='
|
||||||
argmatch config-h c-strcase configmake
|
announce-gen argmatch assert calloc-posix close config-h c-strcase
|
||||||
dirname error extensions fopen-safer git-version-gen
|
configmake dirname error extensions fopen-safer gendocs getopt-gnu
|
||||||
getopt gettext hash inttypes javacomp-script javaexec-script malloc
|
gettext git-version-gen hash inttypes isnan javacomp-script
|
||||||
mbswidth obstack quote quotearg stdbool stpcpy strerror strtoul
|
javaexec-script ldexpl maintainer-makefile malloc-gnu mbschr mbsrchr
|
||||||
strverscmp unistd unistd-safer unlocked-io verify xalloc xalloc-die
|
mbswidth obstack perror pipe-posix quote quotearg realloc-posix
|
||||||
xstrndup
|
spawn-pipe stdbool stpcpy strdup-posix strerror strtoul strverscmp
|
||||||
'
|
unistd unistd-safer unlocked-io update-copyright unsetenv verify
|
||||||
|
warnings xalloc xalloc-die xstrndup
|
||||||
|
|
||||||
# Any gnulib files needed that are not in modules.
|
fprintf-posix printf-posix snprintf-posix sprintf-posix
|
||||||
gnulib_files='
|
vsnprintf-posix vsprintf-posix
|
||||||
m4/warning.m4
|
|
||||||
'
|
'
|
||||||
|
|
||||||
# Additional xgettext options to use. Use "\\\newline" to break lines.
|
# Additional xgettext options to use. Use "\\\newline" to break lines.
|
||||||
@@ -46,22 +46,30 @@ XGETTEXT_OPTIONS_RUNTIME=$XGETTEXT_OPTIONS'\\\
|
|||||||
# Gettext supplies these files, but we don't need them since
|
# Gettext supplies these files, but we don't need them since
|
||||||
# we don't have an intl subdirectory.
|
# we don't have an intl subdirectory.
|
||||||
excluded_files='
|
excluded_files='
|
||||||
m4/codeset.m4
|
|
||||||
m4/glibc2.m4
|
m4/glibc2.m4
|
||||||
m4/glibc21.m4
|
|
||||||
m4/intdiv0.m4
|
m4/intdiv0.m4
|
||||||
m4/intl.m4
|
m4/intl.m4
|
||||||
m4/intldir.m4
|
m4/intldir.m4
|
||||||
m4/intmax.m4
|
m4/intmax.m4
|
||||||
m4/inttypes_h.m4
|
|
||||||
m4/lcmessage.m4
|
m4/lcmessage.m4
|
||||||
m4/lock.m4
|
m4/lock.m4
|
||||||
m4/longdouble.m4
|
m4/longdouble.m4
|
||||||
m4/printf-posix.m4
|
|
||||||
m4/signed.m4
|
m4/signed.m4
|
||||||
m4/size_max.m4
|
|
||||||
m4/uintmax_t.m4
|
m4/uintmax_t.m4
|
||||||
m4/ulonglong.m4
|
m4/ulonglong.m4
|
||||||
m4/visibility.m4
|
m4/visibility.m4
|
||||||
m4/xsize.m4
|
|
||||||
'
|
'
|
||||||
|
|
||||||
|
bootstrap_epilogue()
|
||||||
|
{
|
||||||
|
# Make sure we don't need src/bison, which usually doesn't exist at
|
||||||
|
# the time of a bootstrap.
|
||||||
|
touch src/parse-gram.[ch]
|
||||||
|
}
|
||||||
|
|
||||||
|
# Keep our bootstrap script in sync with gnulib's. If we ever need to
|
||||||
|
# maintain our own bootstrap script again, set this to false, remove
|
||||||
|
# the bootstrap entry from the file .x-update-copyright, and add any
|
||||||
|
# needed copyright years to the copyright statement in the bootstrap
|
||||||
|
# script.
|
||||||
|
bootstrap_sync=true
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
Makefile
|
|
||||||
Makefile.in
|
|
||||||
compile
|
|
||||||
config.guess
|
|
||||||
config.rpath
|
|
||||||
config.sub
|
|
||||||
depcomp
|
|
||||||
git-version-gen
|
|
||||||
install-sh
|
|
||||||
javacomp.sh.in
|
|
||||||
javaexec.sh.in
|
|
||||||
link-warning.h
|
|
||||||
mdate-sh
|
|
||||||
missing
|
|
||||||
texinfo.tex
|
|
||||||
ylwrap
|
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
|
||||||
|
/Makefile
|
||||||
|
/Makefile.in
|
||||||
|
/announce-gen
|
||||||
|
/arg-nonnull.h
|
||||||
|
/c++defs.h
|
||||||
|
/compile
|
||||||
|
/config.guess
|
||||||
|
/config.rpath
|
||||||
|
/config.sub
|
||||||
|
/depcomp
|
||||||
|
/gendocs.sh
|
||||||
|
/git-version-gen
|
||||||
|
/install-sh
|
||||||
|
/javacomp.sh.in
|
||||||
|
/javaexec.sh.in
|
||||||
|
/link-warning.h
|
||||||
|
/mdate-sh
|
||||||
|
/missing
|
||||||
|
/texinfo.tex
|
||||||
|
/update-copyright
|
||||||
|
/useless-if-before-free
|
||||||
|
/vc-list-files
|
||||||
|
/warn-on-use.h
|
||||||
|
/ylwrap
|
||||||
|
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||||
EXTRA_DIST = prev-version.txt cross-options.pl
|
EXTRA_DIST = prev-version.txt cross-options.pl update-b4-copyright
|
||||||
|
|||||||
+58
-16
@@ -5,33 +5,75 @@ use 5.005;
|
|||||||
use strict;
|
use strict;
|
||||||
|
|
||||||
my %option;
|
my %option;
|
||||||
while (<>)
|
my %directive;
|
||||||
|
my $scanner = `grep -i '"%[a-z]' $ARGV[0]`;
|
||||||
|
$scanner =~ s/"\[-_\]"/-/g;
|
||||||
|
while (<STDIN>)
|
||||||
{
|
{
|
||||||
if (/^\s* # Initial spaces.
|
if (/^\s* # Initial spaces.
|
||||||
(?:(-\w),\s+)? # $1: Possible short option.
|
(?:(-\w),\s+)? # $1: $short: Possible short option.
|
||||||
(--[-\w]+) # $2: Long option.
|
(--[-\w]+) # $2: $long: Long option.
|
||||||
(\[?) # $3: '[' iff the argument is optional.
|
(\[?) # $3: $opt: '[' iff the argument is optional.
|
||||||
(?:=([-\w]+))? # $4: Possible argument name.
|
(?:=(\S+))? # $4: $arg: Possible argument name.
|
||||||
|
\s # Spaces.
|
||||||
/x)
|
/x)
|
||||||
{
|
{
|
||||||
my ($short, $long, $opt, $arg) = ($1, $2, $3, $4);
|
my ($short, $long, $opt, $arg) = ($1, $2, $3, $4);
|
||||||
$short = defined $short ? '@option{' . $short . '}' : '';
|
$short = '' if ! defined $short;
|
||||||
|
$short = '-d' if $long eq '--defines' && ! $short;
|
||||||
|
my $dir = '%' . substr($long, 2);
|
||||||
|
if (index ($scanner, "\"$dir\"") < 0)
|
||||||
|
{
|
||||||
|
if ($long eq '--force-define') { $dir = '%define'; }
|
||||||
|
else { $dir = ''; }
|
||||||
|
}
|
||||||
if ($arg)
|
if ($arg)
|
||||||
{
|
{
|
||||||
|
# if $opt, $arg contains the closing ].
|
||||||
|
substr ($arg, -1) = ''
|
||||||
|
if $opt eq '[';
|
||||||
$arg =~ s/^=//;
|
$arg =~ s/^=//;
|
||||||
$arg = '@var{' . lc ($arg) . '}';
|
$arg = lc ($arg);
|
||||||
$arg = '[' . $arg . ']'
|
my $dir_arg = $arg;
|
||||||
if $opt eq '[';
|
# If the argument is compite (e.g., for --define[=NAME[=VALUE]]),
|
||||||
$option{"$long=$arg"} = $short ? "$short $arg" : '';
|
# put each word in @var, to build @var{name}[=@var{value}], not
|
||||||
}
|
# @var{name[=value]}].
|
||||||
else
|
$arg =~ s/(\w+)/\@var{$1}/g;
|
||||||
{
|
my $long_arg = "=$arg";
|
||||||
$option{"$long"} = "$short";
|
if ($opt eq '[') {
|
||||||
|
$long_arg = "[$long_arg]";
|
||||||
|
$arg = "[$arg]";
|
||||||
|
}
|
||||||
|
# For arguments of directives: this only works if all arguments
|
||||||
|
# are strings and have the same syntax as on the command line.
|
||||||
|
if ($dir_arg eq 'name[=value]')
|
||||||
|
{
|
||||||
|
$dir_arg = '@var{name} ["@var{value}"]';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$dir_arg =~ s/(\w+)/\@var{"$1"}/g;
|
||||||
|
$dir_arg = '[' . $dir_arg . ']'
|
||||||
|
if $opt eq '[';
|
||||||
|
}
|
||||||
|
$long = "$long$long_arg";
|
||||||
|
$short = "$short $arg" if $short && $short ne '-d';
|
||||||
|
$dir = "$dir $dir_arg" if $dir;
|
||||||
}
|
}
|
||||||
|
$option{$long} = $short;
|
||||||
|
$directive{$long} = $dir;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $sep = '';
|
||||||
foreach my $long (sort keys %option)
|
foreach my $long (sort keys %option)
|
||||||
{
|
{
|
||||||
printf "\@item %-40s \@tab %s\n", '@option{' . $long . '}', $option{$long};
|
# Avoid trailing spaces.
|
||||||
|
print $sep;
|
||||||
|
$sep = "\n";
|
||||||
|
print '@item @option{', $long, "}\n\@tab";
|
||||||
|
print ' @option{', $option{$long}, '}' if $option{$long};
|
||||||
|
print "\n\@tab";
|
||||||
|
print ' @code{', $directive{$long}, '}' if $directive{$long};
|
||||||
|
print "\n";
|
||||||
}
|
}
|
||||||
|
|||||||
Executable
+152
@@ -0,0 +1,152 @@
|
|||||||
|
#!/usr/bin/perl -0777 -pi
|
||||||
|
|
||||||
|
# Update b4_copyright invocations or b4_copyright_years definitions to
|
||||||
|
# include the current year.
|
||||||
|
|
||||||
|
# Copyright (C) 2009-2011 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, 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/>.
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
my $margin = 72;
|
||||||
|
|
||||||
|
my $this_year = $ENV{UPDATE_COPYRIGHT_YEAR};
|
||||||
|
if (!$this_year || $this_year !~ m/^\d{4}$/)
|
||||||
|
{
|
||||||
|
my ($sec, $min, $hour, $mday, $month, $year) = localtime (time ());
|
||||||
|
$this_year = $year + 1900;
|
||||||
|
}
|
||||||
|
my $old_re = <<'EOF'
|
||||||
|
(
|
||||||
|
(?:^|\n)
|
||||||
|
#BEFORE
|
||||||
|
(?:
|
||||||
|
b4_copyright\(\[[^][]*]
|
||||||
|
| m4_(?:push|pop)def\(\[b4_copyright_years]
|
||||||
|
)
|
||||||
|
#AFTER
|
||||||
|
)
|
||||||
|
(?:
|
||||||
|
,\s*
|
||||||
|
(
|
||||||
|
\[\s* (?:\d{4}(?:,\s*|-))* (\d{4}) \s*]
|
||||||
|
)
|
||||||
|
)?
|
||||||
|
\)
|
||||||
|
EOF
|
||||||
|
;
|
||||||
|
|
||||||
|
while (/($old_re)/gx)
|
||||||
|
{
|
||||||
|
my $start = pos() - length ($1);
|
||||||
|
my $b4_copyright_line = $2;
|
||||||
|
my $year_lines = $3;
|
||||||
|
my $final_year = $4;
|
||||||
|
$year_lines .= ')';
|
||||||
|
|
||||||
|
# If there was a second argument, it contains years, so update them.
|
||||||
|
if ($final_year)
|
||||||
|
{
|
||||||
|
$b4_copyright_line .= ',';
|
||||||
|
if ($final_year != $this_year)
|
||||||
|
{
|
||||||
|
# Update the year.
|
||||||
|
$year_lines =~ s/$final_year/$final_year, $this_year/;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Normalize all whitespace.
|
||||||
|
$year_lines =~ s/\s+/ /g;
|
||||||
|
|
||||||
|
# Put spaces after commas.
|
||||||
|
$year_lines =~ s/, ?/, /g;
|
||||||
|
|
||||||
|
# Compress to intervals.
|
||||||
|
$year_lines =~
|
||||||
|
s/
|
||||||
|
(\d{4})
|
||||||
|
(?:
|
||||||
|
(,\ |-)
|
||||||
|
((??{
|
||||||
|
if ($2 eq '-') { '\d{4}'; }
|
||||||
|
elsif (!$3) { $1 + 1; }
|
||||||
|
else { $3 + 1; }
|
||||||
|
}))
|
||||||
|
)+
|
||||||
|
/$1-$3/gx;
|
||||||
|
|
||||||
|
# Format within margin.
|
||||||
|
my $year_lines_new;
|
||||||
|
my $indent = index ($b4_copyright_line, '[');
|
||||||
|
--$indent if ($b4_copyright_line =~ m/^\n/);
|
||||||
|
while (length $year_lines)
|
||||||
|
{
|
||||||
|
my $text_margin = $margin - $indent;
|
||||||
|
if (($year_lines =~ s/^(.{1,$text_margin})(?: |$)//)
|
||||||
|
|| ($year_lines =~ s/^([\S]+)(?: |$)//))
|
||||||
|
{
|
||||||
|
my $line = "\n" . (' 'x$indent) . $1;
|
||||||
|
++$indent if (!$year_lines_new);
|
||||||
|
$year_lines_new .= $line;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
# Should be unreachable, but we don't want an infinite
|
||||||
|
# loop if it can be reached.
|
||||||
|
die;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Replace the old invocation. Should never die.
|
||||||
|
die if (!s/$old_re\G/$b4_copyright_line$year_lines_new/x);
|
||||||
|
|
||||||
|
# Prepare for the next search.
|
||||||
|
pos () = $start + length ("$b4_copyright_line$year_lines_new");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
while (/(\bb4_copyright\()/g)
|
||||||
|
{
|
||||||
|
my $start = pos () - length ($1);
|
||||||
|
my $end = pos ();
|
||||||
|
my $re = $old_re;
|
||||||
|
pos () = $start;
|
||||||
|
$re =~ s/\#BEFORE/\\G/;
|
||||||
|
if (!/$re/x)
|
||||||
|
{
|
||||||
|
my $line = (substr ($_, 0, $start) =~ s/\n/\n/g) + 1;
|
||||||
|
print STDERR
|
||||||
|
"$ARGV:$line: warning: failed to update a b4_copyright\n";
|
||||||
|
}
|
||||||
|
pos () = $end;
|
||||||
|
}
|
||||||
|
|
||||||
|
while (/(\[b4_copyright_years])/g)
|
||||||
|
{
|
||||||
|
my $start = pos () - length ($1);
|
||||||
|
my $end = pos ();
|
||||||
|
my $re = $old_re;
|
||||||
|
$re =~ s/\#AFTER/\\G/;
|
||||||
|
if (!/$re/x)
|
||||||
|
{
|
||||||
|
# The substr operation blows away pos (), so restoring pos ()
|
||||||
|
# at the end is necessary.
|
||||||
|
my $line = (substr ($_, 0, $start) =~ s/\n/\n/g) + 1;
|
||||||
|
print STDERR
|
||||||
|
"$ARGV:$line: warning: failed to update a"
|
||||||
|
. " b4_copyright_years\n";
|
||||||
|
}
|
||||||
|
pos () = $end;
|
||||||
|
}
|
||||||
Executable
+49
@@ -0,0 +1,49 @@
|
|||||||
|
#!/usr/bin/perl -0777 -pi
|
||||||
|
|
||||||
|
# In configure.ac, update PACKAGE_COPYRIGHT_YEAR to the current year.
|
||||||
|
|
||||||
|
# Copyright (C) 2010-2011 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, 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/>.
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
my $this_year = $ENV{UPDATE_COPYRIGHT_YEAR};
|
||||||
|
if (!$this_year || $this_year !~ m/^\d{4}$/)
|
||||||
|
{
|
||||||
|
my ($sec, $min, $hour, $mday, $month, $year) = localtime (time ());
|
||||||
|
$this_year = $year + 1900;
|
||||||
|
}
|
||||||
|
my $old_re = <<'EOF'
|
||||||
|
(
|
||||||
|
MACRO\(
|
||||||
|
\[PACKAGE_COPYRIGHT_YEAR],
|
||||||
|
\s*\[
|
||||||
|
)
|
||||||
|
(\d{4})
|
||||||
|
(?=])
|
||||||
|
EOF
|
||||||
|
;
|
||||||
|
foreach my $macro ("AC_DEFINE", "AC_SUBST")
|
||||||
|
{
|
||||||
|
my $this_old_re = $old_re;
|
||||||
|
$this_old_re =~ s/MACRO/$macro/;
|
||||||
|
if (!s/$this_old_re/$1$this_year/x)
|
||||||
|
{
|
||||||
|
print STDERR
|
||||||
|
"$ARGV: warning: failed to update PACKAGE_COPYRIGHT_YEAR in"
|
||||||
|
. " $macro.\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
+23
-5
@@ -1,19 +1,27 @@
|
|||||||
# Customize Makefile.maint. -*- makefile -*-
|
# Customize maint.mk -*- makefile -*-
|
||||||
# Copyright (C) 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
|
|
||||||
|
# Copyright (C) 2008-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
# (at your option) any later version.
|
# (at your option) any later version.
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
# This program is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# It's useful to run maintainer-*check* targets during development, but we
|
||||||
|
# don't want to wait on a recompile because of an update to $(VERSION). Thus,
|
||||||
|
# override the _is-dist-target from GNUmakefile so that maintainer-*check*
|
||||||
|
# targets are filtered out.
|
||||||
|
_is-dist-target = $(filter-out %clean maintainer-check% maintainer-%-check, \
|
||||||
|
$(filter maintainer-% dist% alpha beta major,$(MAKECMDGOALS)))
|
||||||
|
|
||||||
# Use alpha.gnu.org for alpha and beta releases.
|
# Use alpha.gnu.org for alpha and beta releases.
|
||||||
# Use ftp.gnu.org for major releases.
|
# Use ftp.gnu.org for major releases.
|
||||||
gnu_ftp_host-alpha = alpha.gnu.org
|
gnu_ftp_host-alpha = alpha.gnu.org
|
||||||
@@ -32,4 +40,14 @@ local-checks-to-skip = changelog-check
|
|||||||
|
|
||||||
# The local directory containing the checked-out copy of gnulib used in
|
# The local directory containing the checked-out copy of gnulib used in
|
||||||
# this release. Used solely to get a date for the "announcement" target.
|
# this release. Used solely to get a date for the "announcement" target.
|
||||||
gnulib_dir = /gnulib
|
gnulib_dir = $(srcdir)/gnulib
|
||||||
|
|
||||||
|
bootstrap-tools = autoconf,automake,flex,gettext,gnulib
|
||||||
|
|
||||||
|
announcement_Cc_ = \
|
||||||
|
[email protected], [email protected], [email protected], \
|
||||||
|
[email protected]
|
||||||
|
|
||||||
|
update-copyright: update-b4-copyright update-package-copyright-year
|
||||||
|
update-copyright-env = \
|
||||||
|
UPDATE_COPYRIGHT_FORCE=1 UPDATE_COPYRIGHT_USE_INTERVALS=1
|
||||||
+55
-35
@@ -1,7 +1,6 @@
|
|||||||
# Configure template for GNU Bison. -*-Autoconf-*-
|
# Configure template for GNU Bison. -*-Autoconf-*-
|
||||||
#
|
#
|
||||||
# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software
|
# Copyright (C) 2001-2011 Free Software Foundation, Inc.
|
||||||
# Foundation, Inc.
|
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -16,19 +15,36 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# We have strange test case titles, so we need Autoconf 2.61 or better.
|
# In order for some versions of Sun Studio to compile our C++ test cases
|
||||||
AC_PREREQ(2.61)
|
# correctly, we need Autoconf 2.64 or better to handle the restrict
|
||||||
|
# keyword in at least string.h from gnulib.
|
||||||
|
AC_PREREQ(2.64)
|
||||||
|
|
||||||
AC_INIT([GNU Bison], [2.3b], [[email protected]])
|
AC_INIT([GNU Bison],
|
||||||
AC_DEFINE([PACKAGE_COPYRIGHT_YEAR], [2008],
|
m4_esyscmd([build-aux/git-version-gen .tarball-version]),
|
||||||
|
[[email protected]])
|
||||||
|
AC_DEFINE([PACKAGE_COPYRIGHT_YEAR], [2011],
|
||||||
[The copyright year for this package])
|
[The copyright year for this package])
|
||||||
AC_SUBST([PACKAGE_COPYRIGHT_YEAR], [2008])
|
AC_SUBST([PACKAGE_COPYRIGHT_YEAR], [2011])
|
||||||
|
|
||||||
AC_CONFIG_AUX_DIR([build-aux])
|
AC_CONFIG_AUX_DIR([build-aux])
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
|
|
||||||
# We don't have a file m4/Makefile.am, so we need Automake 1.8 or later.
|
# Automake 1.10.3 and 1.11.1 fix a security flaw discussed here:
|
||||||
AM_INIT_AUTOMAKE([1.8 check-news readme-alpha dist-bzip2])
|
#
|
||||||
|
# http://thread.gmane.org/gmane.comp.sysutils.autotools.announce/131
|
||||||
|
#
|
||||||
|
# To avoid 1.11, we make 1.11.1 the minimum version.
|
||||||
|
#
|
||||||
|
# We want gnits strictness only when rolling a stable release. For
|
||||||
|
# release candidates, we use version strings like 2.4.3_rc1, but gnits
|
||||||
|
# doesn't like that, so we let the underscore disable gnits. Between
|
||||||
|
# releases, we want to be able run make dist without being required to
|
||||||
|
# add a bogus NEWS entry. In that case, the version string
|
||||||
|
# automatically contains a dash, which we also let disable gnits.
|
||||||
|
AM_INIT_AUTOMAKE([1.11.1 dist-bzip2]
|
||||||
|
m4_bmatch(m4_defn([AC_PACKAGE_VERSION]), [[-_]],
|
||||||
|
[gnu], [gnits]))
|
||||||
AC_CONFIG_HEADERS([lib/config.h:lib/config.hin])
|
AC_CONFIG_HEADERS([lib/config.h:lib/config.hin])
|
||||||
|
|
||||||
# Checks for the compiler.
|
# Checks for the compiler.
|
||||||
@@ -45,24 +61,29 @@ AC_ARG_ENABLE(gcc-warnings,
|
|||||||
esac],
|
esac],
|
||||||
[enableval=no])
|
[enableval=no])
|
||||||
if test "${enableval}" = yes; then
|
if test "${enableval}" = yes; then
|
||||||
gl_WARNING_CFLAGS([-Werror])
|
gl_WARN_ADD([-Werror], [WERROR_CFLAGS])
|
||||||
AC_SUBST([WERROR_CFLAGS], [$WARNING_CFLAGS])
|
AC_SUBST([WERROR_CFLAGS])
|
||||||
WARNING_CFLAGS=
|
gl_WARN_ADD([-Wall])
|
||||||
gl_WARNING_CFLAGS([-Wall])
|
gl_WARN_ADD([-Wextra -Wno-sign-compare])
|
||||||
gl_WARNING_CFLAGS([-Wextra -Wno-sign-compare])
|
gl_WARN_ADD([-Wcast-align])
|
||||||
gl_WARNING_CFLAGS([-Wcast-align])
|
gl_WARN_ADD([-Wcast-qual])
|
||||||
gl_WARNING_CFLAGS([-Wcast-qual])
|
gl_WARN_ADD([-Wformat])
|
||||||
gl_WARNING_CFLAGS([-Wformat])
|
gl_WARN_ADD([-Wpointer-arith])
|
||||||
gl_WARNING_CFLAGS([-Wpointer-arith])
|
gl_WARN_ADD([-Wwrite-strings])
|
||||||
gl_WARNING_CFLAGS([-Wwrite-strings])
|
AC_SUBST([WARN_CXXFLAGS], [$WARN_CFLAGS])
|
||||||
AC_SUBST([WARNING_CXXFLAGS], [$WARNING_CFLAGS])
|
|
||||||
# The following warnings are not suitable for C++.
|
# The following warnings are not suitable for C++.
|
||||||
gl_WARNING_CFLAGS([-Wbad-function-cast])
|
gl_WARN_ADD([-Wbad-function-cast])
|
||||||
gl_WARNING_CFLAGS([-Wmissing-declarations])
|
gl_WARN_ADD([-Wmissing-declarations])
|
||||||
gl_WARNING_CFLAGS([-Wmissing-prototypes])
|
gl_WARN_ADD([-Wmissing-prototypes])
|
||||||
gl_WARNING_CFLAGS([-Wshadow])
|
gl_WARN_ADD([-Wshadow])
|
||||||
gl_WARNING_CFLAGS([-Wstrict-prototypes])
|
gl_WARN_ADD([-Wstrict-prototypes])
|
||||||
AC_DEFINE([lint], 1, [Define to 1 if the compiler is checking for lint.])
|
AC_SUBST([WARN_CFLAGS])
|
||||||
|
# Warnings for the test suite only.
|
||||||
|
gl_WARN_ADD([-Wundef], [WARN_CFLAGS_TEST])
|
||||||
|
WARN_CXXFLAGS_TEST="$WARN_CXXFLAGS $WARN_CFLAGS_TEST"
|
||||||
|
WARN_CFLAGS_TEST="$WARN_CFLAGS $WARN_CFLAGS_TEST"
|
||||||
|
AC_SUBST([WARN_CXXFLAGS_TEST])
|
||||||
|
AC_SUBST([WARN_CFLAGS_TEST])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
BISON_TEST_FOR_WORKING_C_COMPILER
|
BISON_TEST_FOR_WORKING_C_COMPILER
|
||||||
@@ -86,11 +107,10 @@ AC_SUBST([YACC_LIBRARY])
|
|||||||
AC_PROG_LEX
|
AC_PROG_LEX
|
||||||
AC_PROG_YACC
|
AC_PROG_YACC
|
||||||
AC_PROG_RANLIB
|
AC_PROG_RANLIB
|
||||||
BISON_PROG_GNU_M4
|
AC_PROG_GNU_M4
|
||||||
if test x"$ac_cv_prog_gnu_m4" != xyes; then
|
|
||||||
AC_MSG_ERROR([GNU M4 1.4 is required])
|
|
||||||
fi
|
|
||||||
AC_DEFINE_UNQUOTED([M4], ["$M4"], [Define to the GNU M4 executable name.])
|
AC_DEFINE_UNQUOTED([M4], ["$M4"], [Define to the GNU M4 executable name.])
|
||||||
|
AC_DEFINE_UNQUOTED([M4_GNU_OPTION], ["$M4_GNU"], [Define to "-g" if GNU M4
|
||||||
|
supports -g, otherwise to "".])
|
||||||
AM_MISSING_PROG([HELP2MAN], [help2man])
|
AM_MISSING_PROG([HELP2MAN], [help2man])
|
||||||
AC_PATH_PROG([XSLTPROC], [xsltproc])
|
AC_PATH_PROG([XSLTPROC], [xsltproc])
|
||||||
AC_SUBST([XSLTPROC])
|
AC_SUBST([XSLTPROC])
|
||||||
@@ -112,9 +132,10 @@ BISON_PREREQ_SUBPIPE
|
|||||||
BISON_PREREQ_TIMEVAR
|
BISON_PREREQ_TIMEVAR
|
||||||
|
|
||||||
# Gettext.
|
# Gettext.
|
||||||
# We've never tested with gettext versions before 0.15, so play it safe.
|
# We use gnulib, which is only guaranteed to work properly with the
|
||||||
AM_GNU_GETTEXT([external], [need-formatstring-macros])
|
# latest Gettext.
|
||||||
AM_GNU_GETTEXT_VERSION([0.15])
|
AM_GNU_GETTEXT([external], [need-ngettext])
|
||||||
|
AM_GNU_GETTEXT_VERSION([0.18])
|
||||||
BISON_I18N
|
BISON_I18N
|
||||||
|
|
||||||
# Internationalized parsers.
|
# Internationalized parsers.
|
||||||
@@ -142,8 +163,7 @@ AC_SUBST([O0CXXFLAGS], [`echo $CXXFLAGS | sed 's/-O[[0-9]] *//'`])
|
|||||||
gt_JAVACOMP([1.3])
|
gt_JAVACOMP([1.3])
|
||||||
gt_JAVAEXEC
|
gt_JAVAEXEC
|
||||||
|
|
||||||
AC_CONFIG_FILES([.version
|
AC_CONFIG_FILES([Makefile
|
||||||
Makefile
|
|
||||||
build-aux/Makefile
|
build-aux/Makefile
|
||||||
po/Makefile.in
|
po/Makefile.in
|
||||||
data/Makefile
|
data/Makefile
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
/Makefile.in
|
||||||
|
/Makefile
|
||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
## Copyright (C) 2002, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
## Copyright (C) 2002, 2005-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -19,7 +19,7 @@ dist_pkgdata_DATA = README bison.m4 \
|
|||||||
java-skel.m4 java.m4 lalr1.java
|
java-skel.m4 java.m4 lalr1.java
|
||||||
|
|
||||||
m4sugardir = $(pkgdatadir)/m4sugar
|
m4sugardir = $(pkgdatadir)/m4sugar
|
||||||
dist_m4sugar_DATA = m4sugar/m4sugar.m4
|
dist_m4sugar_DATA = m4sugar/m4sugar.m4 m4sugar/foreach.m4
|
||||||
|
|
||||||
xsltdir = $(pkgdatadir)/xslt
|
xsltdir = $(pkgdatadir)/xslt
|
||||||
dist_xslt_DATA = \
|
dist_xslt_DATA = \
|
||||||
|
|||||||
+34
-7
@@ -1,31 +1,58 @@
|
|||||||
-*- outline -*-
|
-*- outline -*-
|
||||||
|
|
||||||
This directory contains Bison skeletons: the general shapes of the
|
This directory contains data needed by Bison.
|
||||||
different parser kinds, that are specialized for specific grammars by
|
|
||||||
the bison program.
|
|
||||||
|
|
||||||
Currently, there are only three supported skeletons:
|
* Skeletons
|
||||||
|
Bison skeletons: the general shapes of the different parser kinds,
|
||||||
|
that are specialized for specific grammars by the bison program.
|
||||||
|
|
||||||
|
Currently, the supported skeletons are:
|
||||||
|
|
||||||
- yacc.c
|
- yacc.c
|
||||||
It used to be named bison.simple: it corresponds to C Yacc
|
It used to be named bison.simple: it corresponds to C Yacc
|
||||||
compatible LALR(1) parsers.
|
compatible LALR(1) parsers.
|
||||||
|
|
||||||
- lalr1.cc
|
- lalr1.cc
|
||||||
Produces a C++ parser class. It is still very experimental, and not
|
Produces a C++ parser class.
|
||||||
yet supported. Please, subscribe to [email protected].
|
|
||||||
|
- lalr1.java
|
||||||
|
Produces a Java parser class.
|
||||||
|
|
||||||
- glr.c
|
- glr.c
|
||||||
A Generalized LR C parser based on Bison's LALR(1) tables.
|
A Generalized LR C parser based on Bison's LALR(1) tables.
|
||||||
|
|
||||||
|
- glr.cc
|
||||||
|
A Generalized LR C++ parser. Actually a C++ wrapper around glr.c.
|
||||||
|
|
||||||
These skeletons are the only ones supported by the Bison team.
|
These skeletons are the only ones supported by the Bison team.
|
||||||
Because the interface between skeletons and the bison program is not
|
Because the interface between skeletons and the bison program is not
|
||||||
finished, *we are not bound to it*. In particular, Bison is not
|
finished, *we are not bound to it*. In particular, Bison is not
|
||||||
mature enough for us to consider that ``foreign skeletons'' are
|
mature enough for us to consider that ``foreign skeletons'' are
|
||||||
supported.
|
supported.
|
||||||
|
|
||||||
|
* m4sugar
|
||||||
|
This directory contains M4sugar, sort of an extended library for M4,
|
||||||
|
which is used by Bison to instantiate the skeletons.
|
||||||
|
|
||||||
|
* xslt
|
||||||
|
This directory contains XSLT programs that transform Bison's XML output
|
||||||
|
into various formats.
|
||||||
|
|
||||||
|
- bison.xsl
|
||||||
|
A library of routines used by the other XSLT programs.
|
||||||
|
|
||||||
|
- xml2dot.xsl
|
||||||
|
Conversion into GraphViz's dot format.
|
||||||
|
|
||||||
|
- xml2text.xsl
|
||||||
|
Conversion into text.
|
||||||
|
|
||||||
|
- xml2xhtml.xsl
|
||||||
|
Conversion into XHTML.
|
||||||
|
|
||||||
-----
|
-----
|
||||||
|
|
||||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
Copyright (C) 2002, 2008-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Bison.
|
This file is part of GNU Bison.
|
||||||
|
|
||||||
|
|||||||
+50
-28
@@ -1,8 +1,8 @@
|
|||||||
-*- Autoconf -*-
|
-*- Autoconf -*-
|
||||||
|
|
||||||
# Language-independent M4 Macros for Bison.
|
# Language-independent M4 Macros for Bison.
|
||||||
# Copyright (C) 2002, 2004, 2005, 2006, 2007, 2008 Free Software Foundation,
|
|
||||||
# Inc.
|
# Copyright (C) 2002, 2004-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -312,13 +312,13 @@ b4_define_user_code([stype])
|
|||||||
|
|
||||||
|
|
||||||
# b4_check_user_names(WHAT, USER-LIST, BISON-NAMESPACE)
|
# b4_check_user_names(WHAT, USER-LIST, BISON-NAMESPACE)
|
||||||
# --------------------------------------------------------
|
# -----------------------------------------------------
|
||||||
# Warn if any name of type WHAT is used by the user (as recorded in USER-LIST)
|
# Complain if any name of type WHAT is used by the user (as recorded in
|
||||||
# but is not used by Bison (as recorded by macros in the namespace
|
# USER-LIST) but is not used by Bison (as recorded by macros in the
|
||||||
# BISON-NAMESPACE).
|
# namespace BISON-NAMESPACE).
|
||||||
#
|
#
|
||||||
# USER-LIST must expand to a list specifying all grammar occurrences of all
|
# USER-LIST must expand to a list specifying all user occurrences of all names
|
||||||
# names of type WHAT. Each item in the list must be a triplet specifying one
|
# of type WHAT. Each item in the list must be a triplet specifying one
|
||||||
# occurrence: name, start boundary, and end boundary. Empty string names are
|
# occurrence: name, start boundary, and end boundary. Empty string names are
|
||||||
# fine. An empty list is fine.
|
# fine. An empty list is fine.
|
||||||
#
|
#
|
||||||
@@ -353,19 +353,35 @@ m4_pushdef([b4_user_name], m4_car(b4_occurrence))dnl
|
|||||||
m4_pushdef([b4_start], m4_car(m4_shift(b4_occurrence)))dnl
|
m4_pushdef([b4_start], m4_car(m4_shift(b4_occurrence)))dnl
|
||||||
m4_pushdef([b4_end], m4_shift(m4_shift(b4_occurrence)))dnl
|
m4_pushdef([b4_end], m4_shift(m4_shift(b4_occurrence)))dnl
|
||||||
m4_ifndef($3[(]m4_quote(b4_user_name)[)],
|
m4_ifndef($3[(]m4_quote(b4_user_name)[)],
|
||||||
[b4_warn_at([b4_start], [b4_end],
|
[b4_complain_at([b4_start], [b4_end],
|
||||||
[[%s `%s' is not used]],
|
[[%s `%s' is not used]],
|
||||||
[$1], [b4_user_name])])[]dnl
|
[$1], [b4_user_name])])[]dnl
|
||||||
m4_popdef([b4_occurrence])dnl
|
m4_popdef([b4_occurrence])dnl
|
||||||
m4_popdef([b4_user_name])dnl
|
m4_popdef([b4_user_name])dnl
|
||||||
m4_popdef([b4_start])dnl
|
m4_popdef([b4_start])dnl
|
||||||
m4_popdef([b4_end])dnl
|
m4_popdef([b4_end])dnl
|
||||||
])])
|
])])
|
||||||
|
|
||||||
# b4_percent_define_get(VARIABLE)
|
|
||||||
|
|
||||||
|
|
||||||
|
## --------------------- ##
|
||||||
|
## b4_percent_define_*. ##
|
||||||
|
## --------------------- ##
|
||||||
|
|
||||||
|
|
||||||
|
# b4_percent_define_use(VARIABLE)
|
||||||
# -------------------------------
|
# -------------------------------
|
||||||
# Mimic muscle_percent_define_get in ../src/muscle_tab.h exactly. That is, if
|
# Declare that VARIABLE was used.
|
||||||
# the %define variable VARIABLE is defined, emit its value. Also, record
|
m4_define([b4_percent_define_use],
|
||||||
|
[m4_define([b4_percent_define_bison_variables(]$1[)])dnl
|
||||||
|
])
|
||||||
|
|
||||||
|
# b4_percent_define_get(VARIABLE, [DEFAULT])
|
||||||
|
# ------------------------------------------
|
||||||
|
# Mimic muscle_percent_define_get in ../src/muscle-tab.h. That is, if
|
||||||
|
# the %define variable VARIABLE is defined, emit its value. Contrary
|
||||||
|
# to its C counterpart, return DEFAULT otherwise. Also, record
|
||||||
# Bison's usage of VARIABLE by defining
|
# Bison's usage of VARIABLE by defining
|
||||||
# b4_percent_define_bison_variables(VARIABLE).
|
# b4_percent_define_bison_variables(VARIABLE).
|
||||||
#
|
#
|
||||||
@@ -373,12 +389,15 @@ m4_popdef([b4_end])dnl
|
|||||||
#
|
#
|
||||||
# b4_percent_define_get([[foo]])
|
# b4_percent_define_get([[foo]])
|
||||||
m4_define([b4_percent_define_get],
|
m4_define([b4_percent_define_get],
|
||||||
[m4_define([b4_percent_define_bison_variables(]$1[)])dnl
|
[b4_percent_define_use([$1])dnl
|
||||||
m4_ifdef([b4_percent_define(]$1[)], [m4_indir([b4_percent_define(]$1[)])])])
|
m4_ifdef([b4_percent_define(]$1[)],
|
||||||
|
[m4_indir([b4_percent_define(]$1[)])],
|
||||||
|
[$2])])
|
||||||
|
|
||||||
|
|
||||||
# b4_percent_define_get_loc(VARIABLE)
|
# b4_percent_define_get_loc(VARIABLE)
|
||||||
# -----------------------------------
|
# -----------------------------------
|
||||||
# Mimic muscle_percent_define_get_loc in ../src/muscle_tab.h exactly. That is,
|
# Mimic muscle_percent_define_get_loc in ../src/muscle-tab.h exactly. That is,
|
||||||
# if the %define variable VARIABLE is undefined, complain fatally since that's
|
# if the %define variable VARIABLE is undefined, complain fatally since that's
|
||||||
# a Bison or skeleton error. Otherwise, return its definition location in a
|
# a Bison or skeleton error. Otherwise, return its definition location in a
|
||||||
# form approriate for the first two arguments of b4_warn_at, b4_complain_at, or
|
# form approriate for the first two arguments of b4_warn_at, b4_complain_at, or
|
||||||
@@ -397,7 +416,7 @@ m4_popdef([b4_loc])],
|
|||||||
|
|
||||||
# b4_percent_define_get_syncline(VARIABLE)
|
# b4_percent_define_get_syncline(VARIABLE)
|
||||||
# ----------------------------------------
|
# ----------------------------------------
|
||||||
# Mimic muscle_percent_define_get_syncline in ../src/muscle_tab.h exactly.
|
# Mimic muscle_percent_define_get_syncline in ../src/muscle-tab.h exactly.
|
||||||
# That is, if the %define variable VARIABLE is undefined, complain fatally
|
# That is, if the %define variable VARIABLE is undefined, complain fatally
|
||||||
# since that's a Bison or skeleton error. Otherwise, return its definition
|
# since that's a Bison or skeleton error. Otherwise, return its definition
|
||||||
# location as a b4_syncline invocation. Don't record this as a Bison usage of
|
# location as a b4_syncline invocation. Don't record this as a Bison usage of
|
||||||
@@ -414,7 +433,7 @@ m4_define([b4_percent_define_get_syncline],
|
|||||||
|
|
||||||
# b4_percent_define_ifdef(VARIABLE, IF-TRUE, [IF-FALSE])
|
# b4_percent_define_ifdef(VARIABLE, IF-TRUE, [IF-FALSE])
|
||||||
# ------------------------------------------------------
|
# ------------------------------------------------------
|
||||||
# Mimic muscle_percent_define_ifdef in ../src/muscle_tab.h exactly. That is,
|
# Mimic muscle_percent_define_ifdef in ../src/muscle-tab.h exactly. That is,
|
||||||
# if the %define variable VARIABLE is defined, expand IF-TRUE, else expand
|
# if the %define variable VARIABLE is defined, expand IF-TRUE, else expand
|
||||||
# IF-FALSE. Also, record Bison's usage of VARIABLE by defining
|
# IF-FALSE. Also, record Bison's usage of VARIABLE by defining
|
||||||
# b4_percent_define_bison_variables(VARIABLE).
|
# b4_percent_define_bison_variables(VARIABLE).
|
||||||
@@ -429,7 +448,7 @@ m4_define([b4_percent_define_ifdef],
|
|||||||
|
|
||||||
# b4_percent_define_flag_if(VARIABLE, IF-TRUE, [IF-FALSE])
|
# b4_percent_define_flag_if(VARIABLE, IF-TRUE, [IF-FALSE])
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
# Mimic muscle_percent_define_flag_if in ../src/muscle_tab.h exactly. That is,
|
# Mimic muscle_percent_define_flag_if in ../src/muscle-tab.h exactly. That is,
|
||||||
# if the %define variable VARIABLE is defined to "" or "true", expand IF-TRUE.
|
# if the %define variable VARIABLE is defined to "" or "true", expand IF-TRUE.
|
||||||
# If it is defined to "false", expand IF-FALSE. Complain if it is undefined
|
# If it is defined to "false", expand IF-FALSE. Complain if it is undefined
|
||||||
# (a Bison or skeleton error since the default value should have been set
|
# (a Bison or skeleton error since the default value should have been set
|
||||||
@@ -452,7 +471,7 @@ m4_define([b4_percent_define_flag_if],
|
|||||||
|
|
||||||
# b4_percent_define_default(VARIABLE, DEFAULT)
|
# b4_percent_define_default(VARIABLE, DEFAULT)
|
||||||
# --------------------------------------------
|
# --------------------------------------------
|
||||||
# Mimic muscle_percent_define_default in ../src/muscle_tab.h exactly. That is,
|
# Mimic muscle_percent_define_default in ../src/muscle-tab.h exactly. That is,
|
||||||
# if the %define variable VARIABLE is undefined, set its value to DEFAULT.
|
# if the %define variable VARIABLE is undefined, set its value to DEFAULT.
|
||||||
# Don't record this as a Bison usage of VARIABLE as there's no reason to
|
# Don't record this as a Bison usage of VARIABLE as there's no reason to
|
||||||
# suspect that the value has yet influenced the output.
|
# suspect that the value has yet influenced the output.
|
||||||
@@ -464,14 +483,13 @@ m4_define([b4_percent_define_default],
|
|||||||
[m4_ifndef([b4_percent_define(]$1[)],
|
[m4_ifndef([b4_percent_define(]$1[)],
|
||||||
[m4_define([b4_percent_define(]$1[)], [$2])dnl
|
[m4_define([b4_percent_define(]$1[)], [$2])dnl
|
||||||
m4_define([b4_percent_define_loc(]$1[)],
|
m4_define([b4_percent_define_loc(]$1[)],
|
||||||
[[[[[Bison:b4_percent_define_default]:1.0]], [[[Bison:b4_percent_define_default]:1.0]]]])dnl
|
[[[[<skeleton default value>:-1.-1]],
|
||||||
m4_define([b4_percent_define_syncline(]$1[)],
|
[[<skeleton default value>:-1.-1]]]])dnl
|
||||||
[[]b4_syncline(1, [["[Bison:b4_percent_define_default]"]])[
|
m4_define([b4_percent_define_syncline(]$1[)], [[]])])])
|
||||||
]])])])
|
|
||||||
|
|
||||||
# b4_percent_define_check_values(VALUES)
|
# b4_percent_define_check_values(VALUES)
|
||||||
# --------------------------------------
|
# --------------------------------------
|
||||||
# Mimic muscle_percent_define_check_values in ../src/muscle_tab.h exactly
|
# Mimic muscle_percent_define_check_values in ../src/muscle-tab.h exactly
|
||||||
# except that the VALUES structure is more appropriate for M4. That is, VALUES
|
# except that the VALUES structure is more appropriate for M4. That is, VALUES
|
||||||
# is a list of sublists of strings. For each sublist, the first string is the
|
# is a list of sublists of strings. For each sublist, the first string is the
|
||||||
# name of a %define variable, and all remaining strings in that sublist are the
|
# name of a %define variable, and all remaining strings in that sublist are the
|
||||||
@@ -500,7 +518,11 @@ m4_define([_b4_percent_define_check_values],
|
|||||||
[b4_complain_at(b4_percent_define_get_loc([$1]),
|
[b4_complain_at(b4_percent_define_get_loc([$1]),
|
||||||
[[invalid value for %%define variable `%s': `%s']],
|
[[invalid value for %%define variable `%s': `%s']],
|
||||||
[$1],
|
[$1],
|
||||||
m4_dquote(m4_indir([b4_percent_define(]$1[)])))])dnl
|
m4_dquote(m4_indir([b4_percent_define(]$1[)])))
|
||||||
|
m4_foreach([b4_value], m4_dquote(m4_shift($@)),
|
||||||
|
[b4_complain_at(b4_percent_define_get_loc([$1]),
|
||||||
|
[[accepted value: `%s']],
|
||||||
|
m4_dquote(b4_value))])])dnl
|
||||||
m4_popdef([b4_good_value])],
|
m4_popdef([b4_good_value])],
|
||||||
[b4_fatal([[undefined %%define variable `%s' passed to b4_percent_define_check_values]], [$1])])])
|
[b4_fatal([[undefined %%define variable `%s' passed to b4_percent_define_check_values]], [$1])])])
|
||||||
|
|
||||||
@@ -550,7 +572,7 @@ m4_define([b4_check_user_names_wrap],
|
|||||||
[b4_percent_]$1[_user_]$2[s],
|
[b4_percent_]$1[_user_]$2[s],
|
||||||
[[b4_percent_]$1[_bison_]$2[s]])])])
|
[[b4_percent_]$1[_bison_]$2[s]])])])
|
||||||
|
|
||||||
m4_wrap([
|
m4_wrap_lifo([
|
||||||
b4_check_user_names_wrap([[define]], [[variable]])
|
b4_check_user_names_wrap([[define]], [[variable]])
|
||||||
b4_check_user_names_wrap([[code]], [[qualifier]])
|
b4_check_user_names_wrap([[code]], [[qualifier]])
|
||||||
])
|
])
|
||||||
|
|||||||
+2
-1
@@ -1,7 +1,8 @@
|
|||||||
-*- Autoconf -*-
|
-*- Autoconf -*-
|
||||||
|
|
||||||
# C++ skeleton dispatching for Bison.
|
# C++ skeleton dispatching for Bison.
|
||||||
# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
|
|
||||||
|
# Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+10
-6
@@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
# C++ skeleton for Bison
|
# C++ skeleton for Bison
|
||||||
|
|
||||||
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation,
|
# Copyright (C) 2002-2011 Free Software Foundation, Inc.
|
||||||
# Inc.
|
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -26,7 +25,12 @@ m4_include(b4_pkgdatadir/[c.m4])
|
|||||||
|
|
||||||
# Default parser class name.
|
# Default parser class name.
|
||||||
b4_percent_define_default([[parser_class_name]], [[parser]])
|
b4_percent_define_default([[parser_class_name]], [[parser]])
|
||||||
b4_percent_define_default([[location_type]], [[location]])
|
|
||||||
|
# Don't do that so that we remember whether we're using a user
|
||||||
|
# request, or the default value.
|
||||||
|
#
|
||||||
|
# b4_percent_define_default([[location_type]], [[location]])
|
||||||
|
|
||||||
b4_percent_define_default([[filename_type]], [[std::string]])
|
b4_percent_define_default([[filename_type]], [[std::string]])
|
||||||
b4_percent_define_default([[namespace]], m4_defn([b4_prefix]))
|
b4_percent_define_default([[namespace]], m4_defn([b4_prefix]))
|
||||||
b4_percent_define_default([[global_tokens_and_yystype]], [[false]])
|
b4_percent_define_default([[global_tokens_and_yystype]], [[false]])
|
||||||
@@ -74,10 +78,10 @@ m4_define([b4_namespace_open],
|
|||||||
|
|
||||||
m4_define([b4_namespace_close],
|
m4_define([b4_namespace_close],
|
||||||
[b4_user_code([b4_percent_define_get_syncline([[namespace]])
|
[b4_user_code([b4_percent_define_get_syncline([[namespace]])
|
||||||
m4_bpatsubst(m4_dquote(m4_bpatsubst(m4_dquote(b4_namespace_ref),
|
m4_bpatsubst(m4_dquote(m4_bpatsubst(m4_dquote(b4_namespace_ref[ ]),
|
||||||
[^\(.\)[ ]*\(::\)?\([^][:]\|:[^][:]\)*],
|
[^\(.\)[ ]*\(::\)?\([^][:]\|:[^:]\)*],
|
||||||
[\1])),
|
[\1])),
|
||||||
[::\([^][:]\|:[^][:]\)*], [} ])[} // ]b4_namespace_ref])])
|
[::\([^][:]\|:[^:]\)*], [} ])[} // ]b4_namespace_ref])])
|
||||||
|
|
||||||
|
|
||||||
# b4_token_enums(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)
|
# b4_token_enums(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)
|
||||||
|
|||||||
+2
-1
@@ -1,7 +1,8 @@
|
|||||||
-*- Autoconf -*-
|
-*- Autoconf -*-
|
||||||
|
|
||||||
# C skeleton dispatching for Bison.
|
# C skeleton dispatching for Bison.
|
||||||
# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
|
|
||||||
|
# Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
-*- Autoconf -*-
|
-*- Autoconf -*-
|
||||||
|
|
||||||
# C M4 Macros for Bison.
|
# C M4 Macros for Bison.
|
||||||
# Copyright (C) 2002, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
|
||||||
|
# Copyright (C) 2002, 2004-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -30,7 +31,7 @@ m4_define([b4_comment], [/* m4_bpatsubst([$1], [
|
|||||||
# -----------------
|
# -----------------
|
||||||
# Depends on individual skeletons to define b4_pure_flag, b4_push_flag, or
|
# Depends on individual skeletons to define b4_pure_flag, b4_push_flag, or
|
||||||
# b4_pull_flag if they use the values of the %define variables api.pure or
|
# b4_pull_flag if they use the values of the %define variables api.pure or
|
||||||
# api.push_pull.
|
# api.push-pull.
|
||||||
m4_define([b4_identification],
|
m4_define([b4_identification],
|
||||||
[[/* Identify Bison output. */
|
[[/* Identify Bison output. */
|
||||||
#define YYBISON 1
|
#define YYBISON 1
|
||||||
@@ -89,7 +90,7 @@ b4_parse_param)
|
|||||||
# the formal name to FORMAL, and evaluating the BODY.
|
# the formal name to FORMAL, and evaluating the BODY.
|
||||||
m4_define([b4_parse_param_for],
|
m4_define([b4_parse_param_for],
|
||||||
[m4_foreach([$1_$2], m4_defn([b4_parse_param]),
|
[m4_foreach([$1_$2], m4_defn([b4_parse_param]),
|
||||||
[m4_pushdef([$1], m4_fst($1_$2))dnl
|
[m4_pushdef([$1], m4_unquote(m4_car($1_$2)))dnl
|
||||||
m4_pushdef([$2], m4_shift($1_$2))dnl
|
m4_pushdef([$2], m4_shift($1_$2))dnl
|
||||||
$3[]dnl
|
$3[]dnl
|
||||||
m4_popdef([$2])dnl
|
m4_popdef([$2])dnl
|
||||||
@@ -132,6 +133,19 @@ m4_define([b4_int_type],
|
|||||||
m4_define([b4_int_type_for],
|
m4_define([b4_int_type_for],
|
||||||
[b4_int_type($1_min, $1_max)])
|
[b4_int_type($1_min, $1_max)])
|
||||||
|
|
||||||
|
|
||||||
|
# b4_table_value_equals(TABLE, VALUE, LITERAL)
|
||||||
|
# --------------------------------------------
|
||||||
|
# Without inducing a comparison warning from the compiler, check if the
|
||||||
|
# literal value LITERAL equals VALUE from table TABLE, which must have
|
||||||
|
# TABLE_min and TABLE_max defined. YYID must be defined as an identity
|
||||||
|
# function that suppresses warnings about constant conditions.
|
||||||
|
m4_define([b4_table_value_equals],
|
||||||
|
[m4_if(m4_eval($3 < m4_indir([b4_]$1[_min])
|
||||||
|
|| m4_indir([b4_]$1[_max]) < $3), [1],
|
||||||
|
[[YYID (0)]],
|
||||||
|
[[((]$2[) == (]$3[))]])])
|
||||||
|
|
||||||
## ---------##
|
## ---------##
|
||||||
## Values. ##
|
## Values. ##
|
||||||
## ---------##
|
## ---------##
|
||||||
@@ -143,6 +157,8 @@ m4_define([b4_int_type_for],
|
|||||||
m4_define([b4_null], [0])
|
m4_define([b4_null], [0])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## ------------------------- ##
|
## ------------------------- ##
|
||||||
## Assigning token numbers. ##
|
## Assigning token numbers. ##
|
||||||
## ------------------------- ##
|
## ------------------------- ##
|
||||||
@@ -159,7 +175,7 @@ m4_define([b4_token_define],
|
|||||||
# -------------------------------------------------------
|
# -------------------------------------------------------
|
||||||
# Output the definition of the tokens (if there are) as #defines.
|
# Output the definition of the tokens (if there are) as #defines.
|
||||||
m4_define([b4_token_defines],
|
m4_define([b4_token_defines],
|
||||||
[m4_if([$@], [[]], [],
|
[m4_if([$#$1], [1], [],
|
||||||
[/* Tokens. */
|
[/* Tokens. */
|
||||||
m4_map([b4_token_define], [$@])])
|
m4_map([b4_token_define], [$@])])
|
||||||
])
|
])
|
||||||
@@ -176,7 +192,7 @@ m4_define([b4_token_enum],
|
|||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
# Output the definition of the tokens (if there are) as enums.
|
# Output the definition of the tokens (if there are) as enums.
|
||||||
m4_define([b4_token_enums],
|
m4_define([b4_token_enums],
|
||||||
[m4_if([$@], [[]], [],
|
[m4_if([$#$1], [1], [],
|
||||||
[/* Tokens. */
|
[/* Tokens. */
|
||||||
#ifndef YYTOKENTYPE
|
#ifndef YYTOKENTYPE
|
||||||
# define YYTOKENTYPE
|
# define YYTOKENTYPE
|
||||||
@@ -228,8 +244,8 @@ m4_define([b4_c_function_def],
|
|||||||
b4_c_ansi_function_def($@)
|
b4_c_ansi_function_def($@)
|
||||||
#else
|
#else
|
||||||
$2
|
$2
|
||||||
$1 (b4_c_knr_formal_names(m4_shiftn(2, $@)))
|
$1 (b4_c_knr_formal_names(m4_shift2($@)))
|
||||||
b4_c_knr_formal_decls(m4_shiftn(2, $@))
|
b4_c_knr_formal_decls(m4_shift2($@))
|
||||||
#endif[]dnl
|
#endif[]dnl
|
||||||
])
|
])
|
||||||
|
|
||||||
@@ -239,7 +255,7 @@ b4_c_knr_formal_decls(m4_shiftn(2, $@))
|
|||||||
# Declare the function NAME in ANSI.
|
# Declare the function NAME in ANSI.
|
||||||
m4_define([b4_c_ansi_function_def],
|
m4_define([b4_c_ansi_function_def],
|
||||||
[$2
|
[$2
|
||||||
$1 (b4_c_ansi_formals(m4_shiftn(2, $@)))[]dnl
|
$1 (b4_c_ansi_formals(m4_shift2($@)))[]dnl
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
@@ -247,9 +263,8 @@ $1 (b4_c_ansi_formals(m4_shiftn(2, $@)))[]dnl
|
|||||||
# --------------------------------------
|
# --------------------------------------
|
||||||
# Output the arguments ANSI-C definition.
|
# Output the arguments ANSI-C definition.
|
||||||
m4_define([b4_c_ansi_formals],
|
m4_define([b4_c_ansi_formals],
|
||||||
[m4_case([$@],
|
[m4_if([$#], [0], [void],
|
||||||
[], [void],
|
[$#$1], [1], [void],
|
||||||
[[]], [void],
|
|
||||||
[m4_map_sep([b4_c_ansi_formal], [, ], [$@])])])
|
[m4_map_sep([b4_c_ansi_formal], [, ], [$@])])])
|
||||||
|
|
||||||
m4_define([b4_c_ansi_formal],
|
m4_define([b4_c_ansi_formal],
|
||||||
@@ -301,7 +316,7 @@ $2 $1 ();
|
|||||||
# ----------------------------------------------------------------
|
# ----------------------------------------------------------------
|
||||||
# Declare the function NAME.
|
# Declare the function NAME.
|
||||||
m4_define([b4_c_ansi_function_decl],
|
m4_define([b4_c_ansi_function_decl],
|
||||||
[$2 $1 (b4_c_ansi_formals(m4_shiftn(2, $@)));[]dnl
|
[$2 $1 (b4_c_ansi_formals(m4_shift2($@)));[]dnl
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
@@ -316,7 +331,7 @@ m4_define([b4_c_ansi_function_decl],
|
|||||||
# -----------------------------------------------------------
|
# -----------------------------------------------------------
|
||||||
# Call the function NAME with arguments NAME1, NAME2 etc.
|
# Call the function NAME with arguments NAME1, NAME2 etc.
|
||||||
m4_define([b4_c_function_call],
|
m4_define([b4_c_function_call],
|
||||||
[$1 (b4_c_args(m4_shiftn(2, $@)))[]dnl
|
[$1 (b4_c_args(m4_shift2($@)))[]dnl
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+155
-130
@@ -1,8 +1,8 @@
|
|||||||
-*- C -*-
|
-*- C -*-
|
||||||
|
|
||||||
# GLR skeleton for Bison
|
# GLR skeleton for Bison
|
||||||
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation,
|
|
||||||
# Inc.
|
# Copyright (C) 2002-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -35,8 +35,8 @@ m4_define_default([b4_stack_depth_init], [200])
|
|||||||
## ------------------------ ##
|
## ------------------------ ##
|
||||||
|
|
||||||
b4_define_flag_if([pure])
|
b4_define_flag_if([pure])
|
||||||
# If glr.cc is including this file and thus has already set b4_pure_flag, don't
|
# If glr.cc is including this file and thus has already set b4_pure_flag,
|
||||||
# change the value of b4_pure_flag, and don't record a use of api.pure.
|
# do not change the value of b4_pure_flag, and do not record a use of api.pure.
|
||||||
m4_ifndef([b4_pure_flag],
|
m4_ifndef([b4_pure_flag],
|
||||||
[b4_percent_define_default([[api.pure]], [[false]])
|
[b4_percent_define_default([[api.pure]], [[false]])
|
||||||
m4_define([b4_pure_flag],
|
m4_define([b4_pure_flag],
|
||||||
@@ -148,9 +148,9 @@ m4_define([b4_rhs_location],
|
|||||||
# We do want M4 expansion after # for CPP macros.
|
# We do want M4 expansion after # for CPP macros.
|
||||||
m4_changecom()
|
m4_changecom()
|
||||||
m4_divert_push(0)dnl
|
m4_divert_push(0)dnl
|
||||||
@output(b4_parser_file_name@)
|
@output(b4_parser_file_name@)@
|
||||||
b4_copyright([Skeleton implementation for Bison GLR parsers in C],
|
b4_copyright([Skeleton implementation for Bison GLR parsers in C],
|
||||||
[2002, 2003, 2004, 2005, 2006])
|
[2002-2011])
|
||||||
[
|
[
|
||||||
/* C GLR parser skeleton written by Paul Hilfinger. */
|
/* C GLR parser skeleton written by Paul Hilfinger. */
|
||||||
|
|
||||||
@@ -248,7 +248,7 @@ b4_percent_code_get[]dnl
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#ifndef YY_
|
#ifndef YY_
|
||||||
# if YYENABLE_NLS
|
# if defined YYENABLE_NLS && YYENABLE_NLS
|
||||||
# if ENABLE_NLS
|
# if ENABLE_NLS
|
||||||
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
|
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
|
||||||
# define YY_(msgid) dgettext ("bison-runtime", msgid)
|
# define YY_(msgid) dgettext ("bison-runtime", msgid)
|
||||||
@@ -310,7 +310,8 @@ b4_percent_code_get[]dnl
|
|||||||
#ifndef __attribute__
|
#ifndef __attribute__
|
||||||
/* This feature is available in gcc versions 2.5 and later. */
|
/* This feature is available in gcc versions 2.5 and later. */
|
||||||
# if (! defined __GNUC__ || __GNUC__ < 2 \
|
# if (! defined __GNUC__ || __GNUC__ < 2 \
|
||||||
|| (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__)
|
|| (__GNUC__ == 2 && __GNUC_MINOR__ < 5) \
|
||||||
|
|| (defined __STRICT_ANSI__ && __STRICT_ANSI__))
|
||||||
# define __attribute__(Spec) /* empty */
|
# define __attribute__(Spec) /* empty */
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
@@ -412,9 +413,9 @@ static const ]b4_int_type_for([b4_merger])[ yymerger[] =
|
|||||||
]b4_merger[
|
]b4_merger[
|
||||||
};
|
};
|
||||||
|
|
||||||
/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
|
/* YYDEFACT[S] -- default reduction number in state S. Performed when
|
||||||
doesn't specify something else to do. Zero means the default is an
|
YYTABLE doesn't specify something else to do. Zero means the default
|
||||||
error. */
|
is an error. */
|
||||||
static const ]b4_int_type_for([b4_defact])[ yydefact[] =
|
static const ]b4_int_type_for([b4_defact])[ yydefact[] =
|
||||||
{
|
{
|
||||||
]b4_defact[
|
]b4_defact[
|
||||||
@@ -442,8 +443,7 @@ static const ]b4_int_type_for([b4_pgoto])[ yypgoto[] =
|
|||||||
|
|
||||||
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
|
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
|
||||||
positive, shift that token. If negative, reduce the rule which
|
positive, shift that token. If negative, reduce the rule which
|
||||||
number is the opposite. If zero, do what YYDEFACT says.
|
number is the opposite. If YYTABLE_NINF, syntax error. */
|
||||||
If YYTABLE_NINF, syntax error. */
|
|
||||||
#define YYTABLE_NINF ]b4_table_ninf[
|
#define YYTABLE_NINF ]b4_table_ninf[
|
||||||
static const ]b4_int_type_for([b4_table])[ yytable[] =
|
static const ]b4_int_type_for([b4_table])[ yytable[] =
|
||||||
{
|
{
|
||||||
@@ -1013,17 +1013,15 @@ yylhsNonterm (yyRuleNum yyrule)
|
|||||||
return yyr1[yyrule];
|
return yyr1[yyrule];
|
||||||
}
|
}
|
||||||
|
|
||||||
#define yyis_pact_ninf(yystate) \
|
#define yypact_value_is_default(yystate) \
|
||||||
]m4_if(m4_eval(b4_pact_ninf < b4_pact_min), [1],
|
]b4_table_value_equals([[pact]], [[yystate]], [b4_pact_ninf])[
|
||||||
[0],
|
|
||||||
[((yystate) == YYPACT_NINF)])[
|
|
||||||
|
|
||||||
/** True iff LR state STATE has only a default reduction (regardless
|
/** True iff LR state STATE has only a default reduction (regardless
|
||||||
* of token). */
|
* of token). */
|
||||||
static inline yybool
|
static inline yybool
|
||||||
yyisDefaultedState (yyStateNum yystate)
|
yyisDefaultedState (yyStateNum yystate)
|
||||||
{
|
{
|
||||||
return yyis_pact_ninf (yypact[yystate]);
|
return yypact_value_is_default (yypact[yystate]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** The default reduction for STATE, assuming it has one. */
|
/** The default reduction for STATE, assuming it has one. */
|
||||||
@@ -1033,10 +1031,8 @@ yydefaultAction (yyStateNum yystate)
|
|||||||
return yydefact[yystate];
|
return yydefact[yystate];
|
||||||
}
|
}
|
||||||
|
|
||||||
#define yyis_table_ninf(yytable_value) \
|
#define yytable_value_is_error(yytable_value) \
|
||||||
]m4_if(m4_eval(b4_table_ninf < b4_table_min), [1],
|
]b4_table_value_equals([[table]], [[yytable_value]], [b4_table_ninf])[
|
||||||
[YYID (0)],
|
|
||||||
[((yytable_value) == YYTABLE_NINF)])[
|
|
||||||
|
|
||||||
/** Set *YYACTION to the action to take in YYSTATE on seeing YYTOKEN.
|
/** Set *YYACTION to the action to take in YYSTATE on seeing YYTOKEN.
|
||||||
* Result R means
|
* Result R means
|
||||||
@@ -1051,12 +1047,13 @@ yygetLRActions (yyStateNum yystate, int yytoken,
|
|||||||
int* yyaction, const short int** yyconflicts)
|
int* yyaction, const short int** yyconflicts)
|
||||||
{
|
{
|
||||||
int yyindex = yypact[yystate] + yytoken;
|
int yyindex = yypact[yystate] + yytoken;
|
||||||
if (yyindex < 0 || YYLAST < yyindex || yycheck[yyindex] != yytoken)
|
if (yypact_value_is_default (yypact[yystate])
|
||||||
|
|| yyindex < 0 || YYLAST < yyindex || yycheck[yyindex] != yytoken)
|
||||||
{
|
{
|
||||||
*yyaction = -yydefact[yystate];
|
*yyaction = -yydefact[yystate];
|
||||||
*yyconflicts = yyconfl;
|
*yyconflicts = yyconfl;
|
||||||
}
|
}
|
||||||
else if (! yyis_table_ninf (yytable[yyindex]))
|
else if (! yytable_value_is_error (yytable[yyindex]))
|
||||||
{
|
{
|
||||||
*yyaction = yytable[yyindex];
|
*yyaction = yytable[yyindex];
|
||||||
*yyconflicts = yyconfl + yyconflp[yyindex];
|
*yyconflicts = yyconfl + yyconflp[yyindex];
|
||||||
@@ -1805,7 +1802,7 @@ yyreportAmbiguity (yySemanticOption* yyx0,
|
|||||||
|
|
||||||
yyerror (]b4_yyerror_args[YY_("syntax is ambiguous"));
|
yyerror (]b4_yyerror_args[YY_("syntax is ambiguous"));
|
||||||
return yyabort;
|
return yyabort;
|
||||||
}
|
}]b4_locations_if([[
|
||||||
|
|
||||||
/** Starting at and including state S1, resolve the location for each of the
|
/** Starting at and including state S1, resolve the location for each of the
|
||||||
* previous N1 states that is unresolved. The first semantic option of a state
|
* previous N1 states that is unresolved. The first semantic option of a state
|
||||||
@@ -1863,7 +1860,7 @@ yyresolveLocations (yyGLRState* yys1, int yyn1,
|
|||||||
yylloc = yylloc_current;
|
yylloc = yylloc_current;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}]])[
|
||||||
|
|
||||||
/** Resolve the ambiguity represented in state S, perform the indicated
|
/** Resolve the ambiguity represented in state S, perform the indicated
|
||||||
* actions, and set the semantic value of S. If result != yyok, the chain of
|
* actions, and set the semantic value of S. If result != yyok, the chain of
|
||||||
@@ -1897,8 +1894,8 @@ yyresolveValue (yyGLRState* yys, yyGLRStack* yystackp]b4_user_formals[)
|
|||||||
{
|
{
|
||||||
switch (yypreference (yybest, yyp))
|
switch (yypreference (yybest, yyp))
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:]b4_locations_if([[
|
||||||
yyresolveLocations (yys, 1, yystackp]b4_user_args[);
|
yyresolveLocations (yys, 1, yystackp]b4_user_args[);]])[
|
||||||
return yyreportAmbiguity (yybest, yyp]b4_pure_args[);
|
return yyreportAmbiguity (yybest, yyp]b4_pure_args[);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
@@ -2091,102 +2088,130 @@ yyprocessOneStack (yyGLRStack* yystackp, size_t yyk,
|
|||||||
/*ARGSUSED*/ static void
|
/*ARGSUSED*/ static void
|
||||||
yyreportSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
|
yyreportSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
|
||||||
{
|
{
|
||||||
if (yystackp->yyerrState == 0)
|
if (yystackp->yyerrState != 0)
|
||||||
|
return;
|
||||||
|
#if ! YYERROR_VERBOSE
|
||||||
|
yyerror (]b4_lyyerror_args[YY_("syntax error"));
|
||||||
|
#else
|
||||||
|
yySymbol yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
|
||||||
|
size_t yysize0 = yytnamerr (NULL, yytokenName (yytoken));
|
||||||
|
size_t yysize = yysize0;
|
||||||
|
size_t yysize1;
|
||||||
|
yybool yysize_overflow = yyfalse;
|
||||||
|
char* yymsg = NULL;
|
||||||
|
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
|
||||||
|
/* Internationalized format string. */
|
||||||
|
const char *yyformat = 0;
|
||||||
|
/* Arguments of yyformat. */
|
||||||
|
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
|
||||||
|
/* Number of reported tokens (one for the "unexpected", one per
|
||||||
|
"expected"). */
|
||||||
|
int yycount = 0;
|
||||||
|
|
||||||
|
/* There are many possibilities here to consider:
|
||||||
|
- If this state is a consistent state with a default action, then
|
||||||
|
the only way this function was invoked is if the default action
|
||||||
|
is an error action. In that case, don't check for expected
|
||||||
|
tokens because there are none.
|
||||||
|
- The only way there can be no lookahead present (in yychar) is if
|
||||||
|
this state is a consistent state with a default action. Thus,
|
||||||
|
detecting the absence of a lookahead is sufficient to determine
|
||||||
|
that there is no unexpected or expected token to report. In that
|
||||||
|
case, just report a simple "syntax error".
|
||||||
|
- Don't assume there isn't a lookahead just because this state is a
|
||||||
|
consistent state with a default action. There might have been a
|
||||||
|
previous inconsistent state, consistent state with a non-default
|
||||||
|
action, or user semantic action that manipulated yychar.
|
||||||
|
- Of course, the expected token list depends on states to have
|
||||||
|
correct lookahead information, and it depends on the parser not
|
||||||
|
to perform extra reductions after fetching a lookahead from the
|
||||||
|
scanner and before detecting a syntax error. Thus, state merging
|
||||||
|
(from LALR or IELR) and default reductions corrupt the expected
|
||||||
|
token list. However, the list is correct for canonical LR with
|
||||||
|
one exception: it will still contain any token that will not be
|
||||||
|
accepted due to an error action in a later state.
|
||||||
|
*/
|
||||||
|
if (yytoken != YYEMPTY)
|
||||||
{
|
{
|
||||||
#if YYERROR_VERBOSE
|
int yyn = yypact[yystackp->yytops.yystates[0]->yylrState];
|
||||||
int yyn;
|
yyarg[yycount++] = yytokenName (yytoken);
|
||||||
yyn = yypact[yystackp->yytops.yystates[0]->yylrState];
|
if (!yypact_value_is_default (yyn))
|
||||||
if (YYPACT_NINF < yyn && yyn <= YYLAST)
|
{
|
||||||
{
|
/* Start YYX at -YYN if negative to avoid negative indexes in
|
||||||
yySymbol yytoken = YYTRANSLATE (yychar);
|
YYCHECK. In other words, skip the first -YYN actions for this
|
||||||
size_t yysize0 = yytnamerr (NULL, yytokenName (yytoken));
|
state because they are default actions. */
|
||||||
size_t yysize = yysize0;
|
int yyxbegin = yyn < 0 ? -yyn : 0;
|
||||||
size_t yysize1;
|
/* Stay within bounds of both yycheck and yytname. */
|
||||||
yybool yysize_overflow = yyfalse;
|
int yychecklim = YYLAST - yyn + 1;
|
||||||
char* yymsg = NULL;
|
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
|
||||||
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
|
int yyx;
|
||||||
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
|
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
|
||||||
int yyx;
|
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
|
||||||
char *yyfmt;
|
&& !yytable_value_is_error (yytable[yyx + yyn]))
|
||||||
char const *yyf;
|
{
|
||||||
static char const yyunexpected[] = "syntax error, unexpected %s";
|
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
|
||||||
static char const yyexpecting[] = ", expecting %s";
|
{
|
||||||
static char const yyor[] = " or %s";
|
yycount = 1;
|
||||||
char yyformat[sizeof yyunexpected
|
yysize = yysize0;
|
||||||
+ sizeof yyexpecting - 1
|
break;
|
||||||
+ ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
|
}
|
||||||
* (sizeof yyor - 1))];
|
yyarg[yycount++] = yytokenName (yyx);
|
||||||
char const *yyprefix = yyexpecting;
|
yysize1 = yysize + yytnamerr (NULL, yytokenName (yyx));
|
||||||
|
yysize_overflow |= yysize1 < yysize;
|
||||||
/* Start YYX at -YYN if negative to avoid negative indexes in
|
yysize = yysize1;
|
||||||
YYCHECK. */
|
}
|
||||||
int yyxbegin = yyn < 0 ? -yyn : 0;
|
}
|
||||||
|
|
||||||
/* Stay within bounds of both yycheck and yytname. */
|
|
||||||
int yychecklim = YYLAST - yyn + 1;
|
|
||||||
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
|
|
||||||
int yycount = 1;
|
|
||||||
|
|
||||||
yyarg[0] = yytokenName (yytoken);
|
|
||||||
yyfmt = yystpcpy (yyformat, yyunexpected);
|
|
||||||
|
|
||||||
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
|
|
||||||
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
|
|
||||||
{
|
|
||||||
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
|
|
||||||
{
|
|
||||||
yycount = 1;
|
|
||||||
yysize = yysize0;
|
|
||||||
yyformat[sizeof yyunexpected - 1] = '\0';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
yyarg[yycount++] = yytokenName (yyx);
|
|
||||||
yysize1 = yysize + yytnamerr (NULL, yytokenName (yyx));
|
|
||||||
yysize_overflow |= yysize1 < yysize;
|
|
||||||
yysize = yysize1;
|
|
||||||
yyfmt = yystpcpy (yyfmt, yyprefix);
|
|
||||||
yyprefix = yyor;
|
|
||||||
}
|
|
||||||
|
|
||||||
yyf = YY_(yyformat);
|
|
||||||
yysize1 = yysize + strlen (yyf);
|
|
||||||
yysize_overflow |= yysize1 < yysize;
|
|
||||||
yysize = yysize1;
|
|
||||||
|
|
||||||
if (!yysize_overflow)
|
|
||||||
yymsg = (char *) YYMALLOC (yysize);
|
|
||||||
|
|
||||||
if (yymsg)
|
|
||||||
{
|
|
||||||
char *yyp = yymsg;
|
|
||||||
int yyi = 0;
|
|
||||||
while ((*yyp = *yyf))
|
|
||||||
{
|
|
||||||
if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
|
|
||||||
{
|
|
||||||
yyp += yytnamerr (yyp, yyarg[yyi++]);
|
|
||||||
yyf += 2;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
yyp++;
|
|
||||||
yyf++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
yyerror (]b4_lyyerror_args[yymsg);
|
|
||||||
YYFREE (yymsg);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
yyerror (]b4_lyyerror_args[YY_("syntax error"));
|
|
||||||
yyMemoryExhausted (yystackp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif /* YYERROR_VERBOSE */
|
|
||||||
yyerror (]b4_lyyerror_args[YY_("syntax error"));
|
|
||||||
yynerrs += 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch (yycount)
|
||||||
|
{
|
||||||
|
#define YYCASE_(N, S) \
|
||||||
|
case N: \
|
||||||
|
yyformat = S; \
|
||||||
|
break
|
||||||
|
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_
|
||||||
|
}
|
||||||
|
|
||||||
|
yysize1 = yysize + strlen (yyformat);
|
||||||
|
yysize_overflow |= yysize1 < yysize;
|
||||||
|
yysize = yysize1;
|
||||||
|
|
||||||
|
if (!yysize_overflow)
|
||||||
|
yymsg = (char *) YYMALLOC (yysize);
|
||||||
|
|
||||||
|
if (yymsg)
|
||||||
|
{
|
||||||
|
char *yyp = yymsg;
|
||||||
|
int yyi = 0;
|
||||||
|
while ((*yyp = *yyformat))
|
||||||
|
{
|
||||||
|
if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
|
||||||
|
{
|
||||||
|
yyp += yytnamerr (yyp, yyarg[yyi++]);
|
||||||
|
yyformat += 2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
yyp++;
|
||||||
|
yyformat++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
yyerror (]b4_lyyerror_args[yymsg);
|
||||||
|
YYFREE (yymsg);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
yyerror (]b4_lyyerror_args[YY_("syntax error"));
|
||||||
|
yyMemoryExhausted (yystackp);
|
||||||
|
}
|
||||||
|
#endif /* YYERROR_VERBOSE */
|
||||||
|
yynerrs += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Recover from a syntax error on *YYSTACKP, assuming that *YYSTACKP->YYTOKENP,
|
/* Recover from a syntax error on *YYSTACKP, assuming that *YYSTACKP->YYTOKENP,
|
||||||
@@ -2232,7 +2257,7 @@ yyrecoverSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
|
|||||||
YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
|
YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
|
||||||
}
|
}
|
||||||
yyj = yypact[yystackp->yytops.yystates[0]->yylrState];
|
yyj = yypact[yystackp->yytops.yystates[0]->yylrState];
|
||||||
if (yyis_pact_ninf (yyj))
|
if (yypact_value_is_default (yyj))
|
||||||
return;
|
return;
|
||||||
yyj += yytoken;
|
yyj += yytoken;
|
||||||
if (yyj < 0 || YYLAST < yyj || yycheck[yyj] != yytoken)
|
if (yyj < 0 || YYLAST < yyj || yycheck[yyj] != yytoken)
|
||||||
@@ -2240,7 +2265,7 @@ yyrecoverSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
|
|||||||
if (yydefact[yystackp->yytops.yystates[0]->yylrState] != 0)
|
if (yydefact[yystackp->yytops.yystates[0]->yylrState] != 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (yytable[yyj] != 0 && ! yyis_table_ninf (yytable[yyj]))
|
else if (! yytable_value_is_error (yytable[yyj]))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2261,7 +2286,7 @@ yyrecoverSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
|
|||||||
{
|
{
|
||||||
yyGLRState *yys = yystackp->yytops.yystates[0];
|
yyGLRState *yys = yystackp->yytops.yystates[0];
|
||||||
yyj = yypact[yys->yylrState];
|
yyj = yypact[yys->yylrState];
|
||||||
if (! yyis_pact_ninf (yyj))
|
if (! yypact_value_is_default (yyj))
|
||||||
{
|
{
|
||||||
yyj += YYTERROR;
|
yyj += YYTERROR;
|
||||||
if (0 <= yyj && yyj <= YYLAST && yycheck[yyj] == YYTERROR
|
if (0 <= yyj && yyj <= YYLAST && yycheck[yyj] == YYTERROR
|
||||||
@@ -2323,7 +2348,7 @@ yyrecoverSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
|
|||||||
yychar = YYEMPTY;
|
yychar = YYEMPTY;
|
||||||
yylval = yyval_default;
|
yylval = yyval_default;
|
||||||
]b4_locations_if([
|
]b4_locations_if([
|
||||||
#if YYLTYPE_IS_TRIVIAL
|
#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
|
||||||
yylloc.first_line = yylloc.last_line = ]b4_location_initial_line[;
|
yylloc.first_line = yylloc.last_line = ]b4_location_initial_line[;
|
||||||
yylloc.first_column = yylloc.last_column = ]b4_location_initial_column[;
|
yylloc.first_column = yylloc.last_column = ]b4_location_initial_column[;
|
||||||
#endif
|
#endif
|
||||||
@@ -2637,17 +2662,17 @@ dnl glr.cc produces its own header.
|
|||||||
dnl
|
dnl
|
||||||
m4_if(b4_skeleton, ["glr.c"],
|
m4_if(b4_skeleton, ["glr.c"],
|
||||||
[b4_defines_if(
|
[b4_defines_if(
|
||||||
[@output(b4_spec_defines_file@)
|
[@output(b4_spec_defines_file@)@
|
||||||
b4_copyright([Skeleton interface for Bison GLR parsers in C],
|
b4_copyright([Skeleton interface for Bison GLR parsers in C],
|
||||||
[2002, 2003, 2004, 2005, 2006])
|
[2002-2011])
|
||||||
|
|
||||||
b4_shared_declarations
|
b4_shared_declarations
|
||||||
|
|
||||||
b4_pure_if([],
|
b4_pure_if([],
|
||||||
[[extern YYSTYPE b4_prefix][lval;]])
|
[[extern YYSTYPE ]b4_prefix[lval;]])
|
||||||
|
|
||||||
b4_locations_if([b4_pure_if([],
|
b4_locations_if([b4_pure_if([],
|
||||||
[extern YYLTYPE b4_prefix[]lloc;])
|
[extern YYLTYPE ]b4_prefix[lloc;])
|
||||||
])
|
])
|
||||||
])])
|
])])
|
||||||
m4_divert_pop(0)
|
m4_divert_pop(0)
|
||||||
|
|||||||
+10
-13
@@ -1,8 +1,8 @@
|
|||||||
-*- C -*-
|
-*- C -*-
|
||||||
|
|
||||||
# C++ GLR skeleton for Bison
|
# C++ GLR skeleton for Bison
|
||||||
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation,
|
|
||||||
# Inc.
|
# Copyright (C) 2002-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -54,7 +54,8 @@ b4_defines_if([],
|
|||||||
[b4_fatal([b4_skeleton[: using %%defines is mandatory]])])
|
[b4_fatal([b4_skeleton[: using %%defines is mandatory]])])
|
||||||
|
|
||||||
m4_include(b4_pkgdatadir/[c++.m4])
|
m4_include(b4_pkgdatadir/[c++.m4])
|
||||||
m4_include(b4_pkgdatadir/[location.cc])
|
b4_percent_define_ifdef([[location_type]], [],
|
||||||
|
[m4_include(b4_pkgdatadir/[location.cc])])
|
||||||
|
|
||||||
m4_define([b4_parser_class_name],
|
m4_define([b4_parser_class_name],
|
||||||
[b4_percent_define_get([[parser_class_name]])])
|
[b4_percent_define_get([[parser_class_name]])])
|
||||||
@@ -217,9 +218,9 @@ m4_include(b4_pkgdatadir/[glr.c])
|
|||||||
m4_popdef([b4_parse_param])
|
m4_popdef([b4_parse_param])
|
||||||
|
|
||||||
m4_divert_push(0)
|
m4_divert_push(0)
|
||||||
@output(b4_spec_defines_file@)
|
@output(b4_spec_defines_file@)@
|
||||||
b4_copyright([Skeleton interface for Bison GLR parsers in C++],
|
b4_copyright([Skeleton interface for Bison GLR parsers in C++],
|
||||||
[2002, 2003, 2004, 2005, 2006])[
|
[2002-2006, 2009-2011])[
|
||||||
|
|
||||||
/* C++ GLR parser skeleton written by Akim Demaille. */
|
/* C++ GLR parser skeleton written by Akim Demaille. */
|
||||||
|
|
||||||
@@ -230,17 +231,12 @@ b4_copyright([Skeleton interface for Bison GLR parsers in C++],
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
]b4_percent_define_ifdef([[location_type]], [],
|
||||||
|
[[#include "location.hh"]])[
|
||||||
|
|
||||||
/* Using locations. */
|
/* Using locations. */
|
||||||
#define YYLSP_NEEDED ]b4_locations_flag[
|
#define YYLSP_NEEDED ]b4_locations_flag[
|
||||||
|
|
||||||
]b4_namespace_open[
|
|
||||||
class position;
|
|
||||||
class location;
|
|
||||||
]b4_namespace_close[
|
|
||||||
|
|
||||||
#include "location.hh"
|
|
||||||
|
|
||||||
/* Enabling traces. */
|
/* Enabling traces. */
|
||||||
#ifndef YYDEBUG
|
#ifndef YYDEBUG
|
||||||
# define YYDEBUG ]b4_debug_flag[
|
# define YYDEBUG ]b4_debug_flag[
|
||||||
@@ -284,7 +280,8 @@ b4_user_stype
|
|||||||
typedef YYSTYPE semantic_type;
|
typedef YYSTYPE semantic_type;
|
||||||
#endif
|
#endif
|
||||||
/// Symbol locations.
|
/// Symbol locations.
|
||||||
typedef ]b4_percent_define_get([[location_type]])[ location_type;
|
typedef ]b4_percent_define_get([[location_type]],
|
||||||
|
[[location]])[ location_type;
|
||||||
/// Tokens.
|
/// Tokens.
|
||||||
struct token
|
struct token
|
||||||
{
|
{
|
||||||
|
|||||||
+2
-1
@@ -1,7 +1,8 @@
|
|||||||
-*- Autoconf -*-
|
-*- Autoconf -*-
|
||||||
|
|
||||||
# Java skeleton dispatching for Bison.
|
# Java skeleton dispatching for Bison.
|
||||||
# Copyright (C) 2007 Free Software Foundation, Inc.
|
|
||||||
|
# Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+40
-10
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Java language support for Bison
|
# Java language support for Bison
|
||||||
|
|
||||||
# Copyright (C) 2007 Free Software Foundation, Inc.
|
# Copyright (C) 2007-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -25,6 +25,23 @@ m4_define([b4_comment], [/* m4_bpatsubst([$1], [
|
|||||||
]) */])
|
]) */])
|
||||||
|
|
||||||
|
|
||||||
|
# b4_list2(LIST1, LIST2)
|
||||||
|
# --------------------------
|
||||||
|
# Join two lists with a comma if necessary.
|
||||||
|
m4_define([b4_list2],
|
||||||
|
[$1[]m4_ifval(m4_quote($1), [m4_ifval(m4_quote($2), [[, ]])])[]$2])
|
||||||
|
|
||||||
|
|
||||||
|
# b4_percent_define_get3(DEF, PRE, POST, NOT)
|
||||||
|
# -------------------------------------------
|
||||||
|
# Expand to the value of DEF surrounded by PRE and POST if it's %define'ed,
|
||||||
|
# otherwise NOT.
|
||||||
|
m4_define([b4_percent_define_get3],
|
||||||
|
[m4_ifval(m4_quote(b4_percent_define_get([$1])),
|
||||||
|
[$2[]b4_percent_define_get([$1])[]$3], [$4])])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# b4_flag_value(BOOLEAN-FLAG)
|
# b4_flag_value(BOOLEAN-FLAG)
|
||||||
# ---------------------------
|
# ---------------------------
|
||||||
m4_define([b4_flag_value], [b4_flag_if([$1], [true], [false])])
|
m4_define([b4_flag_value], [b4_flag_if([$1], [true], [false])])
|
||||||
@@ -44,6 +61,20 @@ m4_define([b4_abstract_if],
|
|||||||
[b4_percent_define_flag_if([abstract], [$1], [$2])])
|
[b4_percent_define_flag_if([abstract], [$1], [$2])])
|
||||||
|
|
||||||
|
|
||||||
|
# b4_final_if(TRUE, FALSE)
|
||||||
|
# ---------------------------
|
||||||
|
b4_percent_define_default([[final]], [[false]])
|
||||||
|
m4_define([b4_final_if],
|
||||||
|
[b4_percent_define_flag_if([final], [$1], [$2])])
|
||||||
|
|
||||||
|
|
||||||
|
# b4_strictfp_if(TRUE, FALSE)
|
||||||
|
# ---------------------------
|
||||||
|
b4_percent_define_default([[strictfp]], [[false]])
|
||||||
|
m4_define([b4_strictfp_if],
|
||||||
|
[b4_percent_define_flag_if([strictfp], [$1], [$2])])
|
||||||
|
|
||||||
|
|
||||||
# b4_lexer_if(TRUE, FALSE)
|
# b4_lexer_if(TRUE, FALSE)
|
||||||
# ------------------------
|
# ------------------------
|
||||||
m4_define([b4_lexer_if],
|
m4_define([b4_lexer_if],
|
||||||
@@ -53,10 +84,7 @@ m4_define([b4_lexer_if],
|
|||||||
# b4_identification
|
# b4_identification
|
||||||
# -----------------
|
# -----------------
|
||||||
m4_define([b4_identification],
|
m4_define([b4_identification],
|
||||||
[/** Always <tt>true</tt>, identifies Bison output. */
|
[ /** Version number for the Bison executable that generated this parser. */
|
||||||
public static final boolean bison = true;
|
|
||||||
|
|
||||||
/** Version number for the Bison executable that generated this parser. */
|
|
||||||
public static final String bisonVersion = "b4_version";
|
public static final String bisonVersion = "b4_version";
|
||||||
|
|
||||||
/** Name of the skeleton that generated this parser. */
|
/** Name of the skeleton that generated this parser. */
|
||||||
@@ -75,7 +103,7 @@ m4_define([b4_identification],
|
|||||||
m4_define([b4_int_type],
|
m4_define([b4_int_type],
|
||||||
[m4_if(b4_ints_in($@, [-128], [127]), [1], [byte],
|
[m4_if(b4_ints_in($@, [-128], [127]), [1], [byte],
|
||||||
b4_ints_in($@, [-32768], [32767]), [1], [short],
|
b4_ints_in($@, [-32768], [32767]), [1], [short],
|
||||||
[int])])
|
[int])])
|
||||||
|
|
||||||
# b4_int_type_for(NAME)
|
# b4_int_type_for(NAME)
|
||||||
# ---------------------
|
# ---------------------
|
||||||
@@ -106,7 +134,7 @@ m4_define([b4_token_enum],
|
|||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
# Output the definition of the tokens (if there are) as enums.
|
# Output the definition of the tokens (if there are) as enums.
|
||||||
m4_define([b4_token_enums],
|
m4_define([b4_token_enums],
|
||||||
[m4_if([$@], [[]], [],
|
[m4_if([$#$1], [1], [],
|
||||||
[/* Tokens. */
|
[/* Tokens. */
|
||||||
m4_map([b4_token_enum], [$@])])
|
m4_map([b4_token_enum], [$@])])
|
||||||
])
|
])
|
||||||
@@ -128,14 +156,16 @@ m4_define([b4_case], [ case $1:
|
|||||||
m4_define([b4_yystype], [b4_percent_define_get([[stype]])])
|
m4_define([b4_yystype], [b4_percent_define_get([[stype]])])
|
||||||
b4_percent_define_default([[stype]], [[Object]])])
|
b4_percent_define_default([[stype]], [[Object]])])
|
||||||
|
|
||||||
m4_define_default([[b4_prefix]], [[YY]])])
|
# %name-prefix
|
||||||
|
m4_define_default([b4_prefix], [[YY]])
|
||||||
|
|
||||||
b4_percent_define_default([[parser_class_name]], [b4_prefix[]Parser])])
|
b4_percent_define_default([[parser_class_name]], [b4_prefix[]Parser])])
|
||||||
m4_define([b4_parser_class_name], [b4_percent_define_get([[parser_class_name]])])
|
m4_define([b4_parser_class_name], [b4_percent_define_get([[parser_class_name]])])
|
||||||
|
|
||||||
b4_percent_define_default([[lex_throws]], [[java.io.IOException]])])
|
b4_percent_define_default([[lex_throws]], [[java.io.IOException]])])
|
||||||
m4_define([b4_lex_throws], [b4_percent_define_get([[lex_throws]])])
|
m4_define([b4_lex_throws], [b4_percent_define_get([[lex_throws]])])
|
||||||
|
|
||||||
b4_percent_define_default([[throws]], [b4_lex_throws])])
|
b4_percent_define_default([[throws]], [])])
|
||||||
m4_define([b4_throws], [b4_percent_define_get([[throws]])])
|
m4_define([b4_throws], [b4_percent_define_get([[throws]])])
|
||||||
|
|
||||||
b4_percent_define_default([[location_type]], [Location])])
|
b4_percent_define_default([[location_type]], [Location])])
|
||||||
@@ -205,7 +235,7 @@ m4_define([b4_param_decls],
|
|||||||
[m4_map([b4_param_decl], [$@])])
|
[m4_map([b4_param_decl], [$@])])
|
||||||
m4_define([b4_param_decl], [, $1])
|
m4_define([b4_param_decl], [, $1])
|
||||||
|
|
||||||
m4_define([b4_remove_comma], [m4_ifval($1, [$1, ], [])m4_shiftn(2, $@)])
|
m4_define([b4_remove_comma], [m4_ifval(m4_quote($1), [$1, ], [])m4_shift2($@)])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+204
-114
@@ -1,7 +1,6 @@
|
|||||||
# C++ skeleton for Bison
|
# C++ skeleton for Bison
|
||||||
|
|
||||||
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation,
|
# Copyright (C) 2002-2011 Free Software Foundation, Inc.
|
||||||
# Inc.
|
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -25,17 +24,18 @@ m4_define([b4_parser_class_name],
|
|||||||
b4_defines_if([],
|
b4_defines_if([],
|
||||||
[b4_fatal([b4_skeleton[: using %%defines is mandatory]])])
|
[b4_fatal([b4_skeleton[: using %%defines is mandatory]])])
|
||||||
|
|
||||||
# Backward compatibility.
|
b4_percent_define_ifdef([[location_type]], [],
|
||||||
m4_define([b4_location_constructors])
|
[# Backward compatibility.
|
||||||
m4_include(b4_pkgdatadir/[location.cc])
|
m4_define([b4_location_constructors])
|
||||||
|
m4_include(b4_pkgdatadir/[location.cc])])
|
||||||
|
|
||||||
# We do want M4 expansion after # for CPP macros.
|
# We do want M4 expansion after # for CPP macros.
|
||||||
m4_changecom()
|
m4_changecom()
|
||||||
m4_divert_push(0)dnl
|
m4_divert_push(0)dnl
|
||||||
b4_defines_if(
|
b4_defines_if(
|
||||||
[@output(b4_spec_defines_file@)
|
[@output(b4_spec_defines_file@)@
|
||||||
b4_copyright([Skeleton interface for Bison LALR(1) parsers in C++],
|
b4_copyright([Skeleton interface for Bison LALR(1) parsers in C++],
|
||||||
[2002, 2003, 2004, 2005, 2006])
|
[2002-2011])
|
||||||
dnl FIXME: This is wrong, we want computed header guards.
|
dnl FIXME: This is wrong, we want computed header guards.
|
||||||
[
|
[
|
||||||
/* C++ LALR(1) parser skeleton written by Akim Demaille. */
|
/* C++ LALR(1) parser skeleton written by Akim Demaille. */
|
||||||
@@ -48,13 +48,8 @@ dnl FIXME: This is wrong, we want computed header guards.
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "stack.hh"
|
#include "stack.hh"
|
||||||
|
]b4_percent_define_ifdef([[location_type]], [],
|
||||||
]b4_namespace_open[
|
[[#include "location.hh"]])[
|
||||||
class position;
|
|
||||||
class location;
|
|
||||||
]b4_namespace_close[
|
|
||||||
|
|
||||||
#include "location.hh"
|
|
||||||
|
|
||||||
/* Enabling traces. */
|
/* Enabling traces. */
|
||||||
#ifndef YYDEBUG
|
#ifndef YYDEBUG
|
||||||
@@ -74,25 +69,6 @@ dnl FIXME: This is wrong, we want computed header guards.
|
|||||||
# define YYTOKEN_TABLE ]b4_token_table[
|
# define YYTOKEN_TABLE ]b4_token_table[
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
|
|
||||||
If N is 0, then set CURRENT to the empty location which ends
|
|
||||||
the previous symbol: RHS[0] (always defined). */
|
|
||||||
|
|
||||||
#ifndef YYLLOC_DEFAULT
|
|
||||||
# define YYLLOC_DEFAULT(Current, Rhs, N) \
|
|
||||||
do { \
|
|
||||||
if (N) \
|
|
||||||
{ \
|
|
||||||
(Current).begin = (Rhs)[1].begin; \
|
|
||||||
(Current).end = (Rhs)[N].end; \
|
|
||||||
} \
|
|
||||||
else \
|
|
||||||
{ \
|
|
||||||
(Current).begin = (Current).end = (Rhs)[0].end; \
|
|
||||||
} \
|
|
||||||
} while (false)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
]b4_namespace_open[
|
]b4_namespace_open[
|
||||||
|
|
||||||
/// A Bison parser.
|
/// A Bison parser.
|
||||||
@@ -113,7 +89,8 @@ b4_user_stype
|
|||||||
typedef YYSTYPE semantic_type;
|
typedef YYSTYPE semantic_type;
|
||||||
#endif
|
#endif
|
||||||
/// Symbol locations.
|
/// Symbol locations.
|
||||||
typedef ]b4_percent_define_get([[location_type]])[ location_type;
|
typedef ]b4_percent_define_get([[location_type]],
|
||||||
|
[[location]])[ location_type;
|
||||||
/// Tokens.
|
/// Tokens.
|
||||||
struct token
|
struct token
|
||||||
{
|
{
|
||||||
@@ -130,6 +107,7 @@ b4_user_stype
|
|||||||
/// \returns 0 iff parsing succeeded.
|
/// \returns 0 iff parsing succeeded.
|
||||||
virtual int parse ();
|
virtual int parse ();
|
||||||
|
|
||||||
|
#if YYDEBUG
|
||||||
/// The current debugging stream.
|
/// The current debugging stream.
|
||||||
std::ostream& debug_stream () const;
|
std::ostream& debug_stream () const;
|
||||||
/// Set the current debugging stream.
|
/// Set the current debugging stream.
|
||||||
@@ -141,6 +119,7 @@ b4_user_stype
|
|||||||
debug_level_type debug_level () const;
|
debug_level_type debug_level () const;
|
||||||
/// Set the current debugging level.
|
/// Set the current debugging level.
|
||||||
void set_debug_level (debug_level_type l);
|
void set_debug_level (debug_level_type l);
|
||||||
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// Report a syntax error.
|
/// Report a syntax error.
|
||||||
@@ -151,8 +130,7 @@ b4_user_stype
|
|||||||
/// Generate an error message.
|
/// Generate an error message.
|
||||||
/// \param state the state where the error occurred.
|
/// \param state the state where the error occurred.
|
||||||
/// \param tok the lookahead token.
|
/// \param tok the lookahead token.
|
||||||
virtual std::string yysyntax_error_ (int yystate]dnl
|
virtual std::string yysyntax_error_ (int yystate, int tok);
|
||||||
b4_error_verbose_if([, int tok])[);
|
|
||||||
|
|
||||||
#if YYDEBUG
|
#if YYDEBUG
|
||||||
/// \brief Report a symbol value on the debug stream.
|
/// \brief Report a symbol value on the debug stream.
|
||||||
@@ -188,6 +166,14 @@ b4_error_verbose_if([, int tok])[);
|
|||||||
/// The location stack.
|
/// The location stack.
|
||||||
location_stack_type yylocation_stack_;
|
location_stack_type yylocation_stack_;
|
||||||
|
|
||||||
|
/// Whether the given \c yypact_ value indicates a defaulted state.
|
||||||
|
/// \param yyvalue the value to check
|
||||||
|
static bool yy_pact_value_is_default_ (int yyvalue);
|
||||||
|
|
||||||
|
/// Whether the given \c yytable_ value indicates a syntax error.
|
||||||
|
/// \param yyvalue the value to check
|
||||||
|
static bool yy_table_value_is_error_ (int yyvalue);
|
||||||
|
|
||||||
/// Internal symbol numbers.
|
/// Internal symbol numbers.
|
||||||
typedef ]b4_int_type_for([b4_translate])[ token_number_type;
|
typedef ]b4_int_type_for([b4_translate])[ token_number_type;
|
||||||
/* Tables. */
|
/* Tables. */
|
||||||
@@ -195,7 +181,7 @@ b4_error_verbose_if([, int tok])[);
|
|||||||
static const ]b4_int_type_for([b4_pact])[ yypact_[];
|
static const ]b4_int_type_for([b4_pact])[ yypact_[];
|
||||||
static const ]b4_int_type(b4_pact_ninf, b4_pact_ninf)[ yypact_ninf_;
|
static const ]b4_int_type(b4_pact_ninf, b4_pact_ninf)[ yypact_ninf_;
|
||||||
|
|
||||||
/// For a state, default rule to reduce.
|
/// For a state, default reduction number.
|
||||||
/// Unless\a yytable_ specifies something else to do.
|
/// Unless\a yytable_ specifies something else to do.
|
||||||
/// Zero means the default is an error.
|
/// Zero means the default is an error.
|
||||||
static const ]b4_int_type_for([b4_defact])[ yydefact_[];
|
static const ]b4_int_type_for([b4_defact])[ yydefact_[];
|
||||||
@@ -224,12 +210,10 @@ b4_error_verbose_if([, int tok])[);
|
|||||||
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
|
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
|
||||||
/// For a symbol, its name in clear.
|
/// For a symbol, its name in clear.
|
||||||
static const char* const yytname_[];
|
static const char* const yytname_[];
|
||||||
#endif
|
#endif]b4_error_verbose_if([
|
||||||
|
|
||||||
#if YYERROR_VERBOSE
|
|
||||||
/// Convert the symbol name \a n to a form suitable for a diagnostic.
|
/// Convert the symbol name \a n to a form suitable for a diagnostic.
|
||||||
virtual std::string yytnamerr_ (const char *n);
|
static std::string yytnamerr_ (const char *n);])[
|
||||||
#endif
|
|
||||||
|
|
||||||
#if YYDEBUG
|
#if YYDEBUG
|
||||||
/// A type to store symbol numbers and -1.
|
/// A type to store symbol numbers and -1.
|
||||||
@@ -296,9 +280,9 @@ b4_percent_code_get([[provides]])[]dnl
|
|||||||
|
|
||||||
[#endif /* ! defined PARSER_HEADER_H */]
|
[#endif /* ! defined PARSER_HEADER_H */]
|
||||||
])dnl
|
])dnl
|
||||||
@output(b4_parser_file_name@)
|
@output(b4_parser_file_name@)@
|
||||||
b4_copyright([Skeleton implementation for Bison LALR(1) parsers in C++],
|
b4_copyright([Skeleton implementation for Bison LALR(1) parsers in C++],
|
||||||
[2002, 2003, 2004, 2005, 2006])
|
[2002-2011])
|
||||||
b4_percent_code_get([[top]])[]dnl
|
b4_percent_code_get([[top]])[]dnl
|
||||||
m4_if(b4_prefix, [yy], [],
|
m4_if(b4_prefix, [yy], [],
|
||||||
[
|
[
|
||||||
@@ -316,7 +300,7 @@ b4_defines_if([[
|
|||||||
b4_percent_code_get[]dnl
|
b4_percent_code_get[]dnl
|
||||||
|
|
||||||
[#ifndef YY_
|
[#ifndef YY_
|
||||||
# if YYENABLE_NLS
|
# if defined YYENABLE_NLS && YYENABLE_NLS
|
||||||
# if ENABLE_NLS
|
# if ENABLE_NLS
|
||||||
# include <libintl.h> /* FIXME: INFRINGES ON USER NAME SPACE */
|
# include <libintl.h> /* FIXME: INFRINGES ON USER NAME SPACE */
|
||||||
# define YY_(msgid) dgettext ("bison-runtime", msgid)
|
# define YY_(msgid) dgettext ("bison-runtime", msgid)
|
||||||
@@ -327,6 +311,26 @@ b4_percent_code_get[]dnl
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
|
||||||
|
If N is 0, then set CURRENT to the empty location which ends
|
||||||
|
the previous symbol: RHS[0] (always defined). */
|
||||||
|
|
||||||
|
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
|
||||||
|
#ifndef YYLLOC_DEFAULT
|
||||||
|
# define YYLLOC_DEFAULT(Current, Rhs, N) \
|
||||||
|
do \
|
||||||
|
if (N) \
|
||||||
|
{ \
|
||||||
|
(Current).begin = YYRHSLOC (Rhs, 1).begin; \
|
||||||
|
(Current).end = YYRHSLOC (Rhs, N).end; \
|
||||||
|
} \
|
||||||
|
else \
|
||||||
|
{ \
|
||||||
|
(Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \
|
||||||
|
} \
|
||||||
|
while (false)
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Suppress unused-variable warnings by "using" E. */
|
/* Suppress unused-variable warnings by "using" E. */
|
||||||
#define YYUSE(e) ((void) (e))
|
#define YYUSE(e) ((void) (e))
|
||||||
|
|
||||||
@@ -367,12 +371,15 @@ do { \
|
|||||||
|
|
||||||
#endif /* !YYDEBUG */
|
#endif /* !YYDEBUG */
|
||||||
|
|
||||||
|
#define yyerrok (yyerrstatus_ = 0)
|
||||||
|
#define yyclearin (yychar = yyempty_)
|
||||||
|
|
||||||
#define YYACCEPT goto yyacceptlab
|
#define YYACCEPT goto yyacceptlab
|
||||||
#define YYABORT goto yyabortlab
|
#define YYABORT goto yyabortlab
|
||||||
#define YYERROR goto yyerrorlab
|
#define YYERROR goto yyerrorlab
|
||||||
|
#define YYRECOVERING() (!!yyerrstatus_)
|
||||||
|
|
||||||
]b4_namespace_open[
|
]b4_namespace_open[]b4_error_verbose_if([[
|
||||||
#if YYERROR_VERBOSE
|
|
||||||
|
|
||||||
/* Return YYSTR after stripping away unnecessary quotes and
|
/* Return YYSTR after stripping away unnecessary quotes and
|
||||||
backslashes, so that it's suitable for yyerror. The heuristic is
|
backslashes, so that it's suitable for yyerror. The heuristic is
|
||||||
@@ -410,8 +417,7 @@ do { \
|
|||||||
|
|
||||||
return yystr;
|
return yystr;
|
||||||
}
|
}
|
||||||
|
]])[
|
||||||
#endif
|
|
||||||
|
|
||||||
/// Build a parser object.
|
/// Build a parser object.
|
||||||
]b4_parser_class_name::b4_parser_class_name[ (]b4_parse_param_decl[)]m4_ifset([b4_parse_param], [
|
]b4_parser_class_name::b4_parser_class_name[ (]b4_parse_param_decl[)]m4_ifset([b4_parse_param], [
|
||||||
@@ -512,6 +518,18 @@ do { \
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
inline bool
|
||||||
|
]b4_parser_class_name[::yy_pact_value_is_default_ (int yyvalue)
|
||||||
|
{
|
||||||
|
return yyvalue == yypact_ninf_;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline bool
|
||||||
|
]b4_parser_class_name[::yy_table_value_is_error_ (int yyvalue)
|
||||||
|
{
|
||||||
|
return yyvalue == yytable_ninf_;
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
]b4_parser_class_name[::parse ()
|
]b4_parser_class_name[::parse ()
|
||||||
{
|
{
|
||||||
@@ -533,7 +551,7 @@ do { \
|
|||||||
/// Location of the lookahead.
|
/// Location of the lookahead.
|
||||||
location_type yylloc;
|
location_type yylloc;
|
||||||
/// The locations where the error started and ended.
|
/// The locations where the error started and ended.
|
||||||
location yyerror_range[2];
|
location_type yyerror_range[3];
|
||||||
|
|
||||||
/// $$.
|
/// $$.
|
||||||
semantic_type yyval;
|
semantic_type yyval;
|
||||||
@@ -578,7 +596,7 @@ m4_popdef([b4_at_dollar])])dnl
|
|||||||
|
|
||||||
/* Try to take a decision without lookahead. */
|
/* Try to take a decision without lookahead. */
|
||||||
yyn = yypact_[yystate];
|
yyn = yypact_[yystate];
|
||||||
if (yyn == yypact_ninf_)
|
if (yy_pact_value_is_default_ (yyn))
|
||||||
goto yydefault;
|
goto yydefault;
|
||||||
|
|
||||||
/* Read a lookahead token. */
|
/* Read a lookahead token. */
|
||||||
@@ -614,8 +632,8 @@ m4_ifdef([b4_lex_param], [, ]b4_lex_param))[;
|
|||||||
yyn = yytable_[yyn];
|
yyn = yytable_[yyn];
|
||||||
if (yyn <= 0)
|
if (yyn <= 0)
|
||||||
{
|
{
|
||||||
if (yyn == 0 || yyn == yytable_ninf_)
|
if (yy_table_value_is_error_ (yyn))
|
||||||
goto yyerrlab;
|
goto yyerrlab;
|
||||||
yyn = -yyn;
|
yyn = -yyn;
|
||||||
goto yyreduce;
|
goto yyreduce;
|
||||||
}
|
}
|
||||||
@@ -670,8 +688,20 @@ m4_ifdef([b4_lex_param], [, ]b4_lex_param))[;
|
|||||||
switch (yyn)
|
switch (yyn)
|
||||||
{
|
{
|
||||||
]b4_user_actions[
|
]b4_user_actions[
|
||||||
default: break;
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
/* User semantic actions sometimes alter yychar, and that requires
|
||||||
|
that yytoken be updated with the new translation. We take the
|
||||||
|
approach of translating immediately before every use of yytoken.
|
||||||
|
One alternative is translating here after every semantic action,
|
||||||
|
but that translation would be missed if the semantic action
|
||||||
|
invokes YYABORT, YYACCEPT, or YYERROR immediately after altering
|
||||||
|
yychar. In the case of YYABORT or YYACCEPT, an incorrect
|
||||||
|
destructor might then be invoked immediately. In the case of
|
||||||
|
YYERROR, subsequent parser actions might lead to an incorrect
|
||||||
|
destructor call or verbose syntax error message before the
|
||||||
|
lookahead is translated. */
|
||||||
YY_SYMBOL_PRINT ("-> $$ =", yyr1_[yyn], &yyval, &yyloc);
|
YY_SYMBOL_PRINT ("-> $$ =", yyr1_[yyn], &yyval, &yyloc);
|
||||||
|
|
||||||
yypop_ (yylen);
|
yypop_ (yylen);
|
||||||
@@ -695,15 +725,20 @@ m4_ifdef([b4_lex_param], [, ]b4_lex_param))[;
|
|||||||
| yyerrlab -- here on detecting error |
|
| yyerrlab -- here on detecting error |
|
||||||
`------------------------------------*/
|
`------------------------------------*/
|
||||||
yyerrlab:
|
yyerrlab:
|
||||||
|
/* Make sure we have latest lookahead translation. See comments at
|
||||||
|
user semantic actions for why this is necessary. */
|
||||||
|
yytoken = yytranslate_ (yychar);
|
||||||
|
|
||||||
/* If not already recovering from an error, report this error. */
|
/* If not already recovering from an error, report this error. */
|
||||||
if (!yyerrstatus_)
|
if (!yyerrstatus_)
|
||||||
{
|
{
|
||||||
++yynerrs_;
|
++yynerrs_;
|
||||||
error (yylloc, yysyntax_error_ (yystate]dnl
|
if (yychar == yyempty_)
|
||||||
b4_error_verbose_if([, yytoken])[));
|
yytoken = yyempty_;
|
||||||
|
error (yylloc, yysyntax_error_ (yystate, yytoken));
|
||||||
}
|
}
|
||||||
|
|
||||||
yyerror_range[0] = yylloc;
|
yyerror_range[1] = yylloc;
|
||||||
if (yyerrstatus_ == 3)
|
if (yyerrstatus_ == 3)
|
||||||
{
|
{
|
||||||
/* If just tried and failed to reuse lookahead token after an
|
/* If just tried and failed to reuse lookahead token after an
|
||||||
@@ -738,7 +773,7 @@ b4_error_verbose_if([, yytoken])[));
|
|||||||
if (false)
|
if (false)
|
||||||
goto yyerrorlab;
|
goto yyerrorlab;
|
||||||
|
|
||||||
yyerror_range[0] = yylocation_stack_[yylen - 1];
|
yyerror_range[1] = yylocation_stack_[yylen - 1];
|
||||||
/* Do not reclaim the symbols of the rule which action triggered
|
/* Do not reclaim the symbols of the rule which action triggered
|
||||||
this YYERROR. */
|
this YYERROR. */
|
||||||
yypop_ (yylen);
|
yypop_ (yylen);
|
||||||
@@ -755,7 +790,7 @@ b4_error_verbose_if([, yytoken])[));
|
|||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
yyn = yypact_[yystate];
|
yyn = yypact_[yystate];
|
||||||
if (yyn != yypact_ninf_)
|
if (!yy_pact_value_is_default_ (yyn))
|
||||||
{
|
{
|
||||||
yyn += yyterror_;
|
yyn += yyterror_;
|
||||||
if (0 <= yyn && yyn <= yylast_ && yycheck_[yyn] == yyterror_)
|
if (0 <= yyn && yyn <= yylast_ && yycheck_[yyn] == yyterror_)
|
||||||
@@ -770,7 +805,7 @@ b4_error_verbose_if([, yytoken])[));
|
|||||||
if (yystate_stack_.height () == 1)
|
if (yystate_stack_.height () == 1)
|
||||||
YYABORT;
|
YYABORT;
|
||||||
|
|
||||||
yyerror_range[0] = yylocation_stack_[0];
|
yyerror_range[1] = yylocation_stack_[0];
|
||||||
yydestruct_ ("Error: popping",
|
yydestruct_ ("Error: popping",
|
||||||
yystos_[yystate],
|
yystos_[yystate],
|
||||||
&yysemantic_stack_[0], &yylocation_stack_[0]);
|
&yysemantic_stack_[0], &yylocation_stack_[0]);
|
||||||
@@ -779,16 +814,16 @@ b4_error_verbose_if([, yytoken])[));
|
|||||||
YY_STACK_PRINT ();
|
YY_STACK_PRINT ();
|
||||||
}
|
}
|
||||||
|
|
||||||
yyerror_range[1] = yylloc;
|
yyerror_range[2] = yylloc;
|
||||||
// Using YYLLOC is tempting, but would change the location of
|
// Using YYLLOC is tempting, but would change the location of
|
||||||
// the lookahead. YYLOC is available though.
|
// the lookahead. YYLOC is available though.
|
||||||
YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
|
YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
|
||||||
yysemantic_stack_.push (yylval);
|
yysemantic_stack_.push (yylval);
|
||||||
yylocation_stack_.push (yyloc);
|
yylocation_stack_.push (yyloc);
|
||||||
|
|
||||||
/* Shift the error token. */
|
/* Shift the error token. */
|
||||||
YY_SYMBOL_PRINT ("Shifting", yystos_[yyn],
|
YY_SYMBOL_PRINT ("Shifting", yystos_[yyn],
|
||||||
&yysemantic_stack_[0], &yylocation_stack_[0]);
|
&yysemantic_stack_[0], &yylocation_stack_[0]);
|
||||||
|
|
||||||
yystate = yyn;
|
yystate = yyn;
|
||||||
goto yynewstate;
|
goto yynewstate;
|
||||||
@@ -805,7 +840,13 @@ b4_error_verbose_if([, yytoken])[));
|
|||||||
|
|
||||||
yyreturn:
|
yyreturn:
|
||||||
if (yychar != yyempty_)
|
if (yychar != yyempty_)
|
||||||
yydestruct_ ("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc);
|
{
|
||||||
|
/* Make sure we have latest lookahead translation. See comments
|
||||||
|
at user semantic actions for why this is necessary. */
|
||||||
|
yytoken = yytranslate_ (yychar);
|
||||||
|
yydestruct_ ("Cleanup: discarding lookahead", yytoken, &yylval,
|
||||||
|
&yylloc);
|
||||||
|
}
|
||||||
|
|
||||||
/* Do not reclaim the symbols of the rule which action triggered
|
/* Do not reclaim the symbols of the rule which action triggered
|
||||||
this YYABORT or YYACCEPT. */
|
this YYABORT or YYACCEPT. */
|
||||||
@@ -824,52 +865,100 @@ b4_error_verbose_if([, yytoken])[));
|
|||||||
|
|
||||||
// Generate an error message.
|
// Generate an error message.
|
||||||
std::string
|
std::string
|
||||||
]b4_parser_class_name[::yysyntax_error_ (int yystate]dnl
|
]b4_parser_class_name[::yysyntax_error_ (]dnl
|
||||||
b4_error_verbose_if([, int tok])[)
|
b4_error_verbose_if([int yystate, int yytoken],
|
||||||
{
|
[int, int])[)
|
||||||
std::string res;
|
{]b4_error_verbose_if([[
|
||||||
YYUSE (yystate);
|
std::string yyres;
|
||||||
#if YYERROR_VERBOSE
|
// Number of reported tokens (one for the "unexpected", one per
|
||||||
int yyn = yypact_[yystate];
|
// "expected").
|
||||||
if (yypact_ninf_ < yyn && yyn <= yylast_)
|
size_t yycount = 0;
|
||||||
|
// Its maximum.
|
||||||
|
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
|
||||||
|
// Arguments of yyformat.
|
||||||
|
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
|
||||||
|
|
||||||
|
/* There are many possibilities here to consider:
|
||||||
|
- If this state is a consistent state with a default action, then
|
||||||
|
the only way this function was invoked is if the default action
|
||||||
|
is an error action. In that case, don't check for expected
|
||||||
|
tokens because there are none.
|
||||||
|
- The only way there can be no lookahead present (in yytoken) is
|
||||||
|
if this state is a consistent state with a default action.
|
||||||
|
Thus, detecting the absence of a lookahead is sufficient to
|
||||||
|
determine that there is no unexpected or expected token to
|
||||||
|
report. In that case, just report a simple "syntax error".
|
||||||
|
- Don't assume there isn't a lookahead just because this state is
|
||||||
|
a consistent state with a default action. There might have
|
||||||
|
been a previous inconsistent state, consistent state with a
|
||||||
|
non-default action, or user semantic action that manipulated
|
||||||
|
yychar.
|
||||||
|
- Of course, the expected token list depends on states to have
|
||||||
|
correct lookahead information, and it depends on the parser not
|
||||||
|
to perform extra reductions after fetching a lookahead from the
|
||||||
|
scanner and before detecting a syntax error. Thus, state
|
||||||
|
merging (from LALR or IELR) and default reductions corrupt the
|
||||||
|
expected token list. However, the list is correct for
|
||||||
|
canonical LR with one exception: it will still contain any
|
||||||
|
token that will not be accepted due to an error action in a
|
||||||
|
later state.
|
||||||
|
*/
|
||||||
|
if (yytoken != yyempty_)
|
||||||
{
|
{
|
||||||
/* Start YYX at -YYN if negative to avoid negative indexes in
|
yyarg[yycount++] = yytname_[yytoken];
|
||||||
YYCHECK. */
|
int yyn = yypact_[yystate];
|
||||||
int yyxbegin = yyn < 0 ? -yyn : 0;
|
if (!yy_pact_value_is_default_ (yyn))
|
||||||
|
{
|
||||||
/* Stay within bounds of both yycheck and yytname. */
|
/* Start YYX at -YYN if negative to avoid negative indexes in
|
||||||
int yychecklim = yylast_ - yyn + 1;
|
YYCHECK. In other words, skip the first -YYN actions for
|
||||||
int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_;
|
this state because they are default actions. */
|
||||||
int count = 0;
|
int yyxbegin = yyn < 0 ? -yyn : 0;
|
||||||
for (int x = yyxbegin; x < yyxend; ++x)
|
/* Stay within bounds of both yycheck and yytname. */
|
||||||
if (yycheck_[x + yyn] == x && x != yyterror_)
|
int yychecklim = yylast_ - yyn + 1;
|
||||||
++count;
|
int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_;
|
||||||
|
for (int yyx = yyxbegin; yyx < yyxend; ++yyx)
|
||||||
// FIXME: This method of building the message is not compatible
|
if (yycheck_[yyx + yyn] == yyx && yyx != yyterror_
|
||||||
// with internationalization. It should work like yacc.c does it.
|
&& !yy_table_value_is_error_ (yytable_[yyx + yyn]))
|
||||||
// That is, first build a string that looks like this:
|
{
|
||||||
// "syntax error, unexpected %s or %s or %s"
|
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
|
||||||
// Then, invoke YY_ on this string.
|
{
|
||||||
// Finally, use the string as a format to output
|
yycount = 1;
|
||||||
// yytname_[tok], etc.
|
break;
|
||||||
// Until this gets fixed, this message appears in English only.
|
}
|
||||||
res = "syntax error, unexpected ";
|
else
|
||||||
res += yytnamerr_ (yytname_[tok]);
|
yyarg[yycount++] = yytname_[yyx];
|
||||||
if (count < 5)
|
}
|
||||||
{
|
}
|
||||||
count = 0;
|
|
||||||
for (int x = yyxbegin; x < yyxend; ++x)
|
|
||||||
if (yycheck_[x + yyn] == x && x != yyterror_)
|
|
||||||
{
|
|
||||||
res += (!count++) ? ", expecting " : " or ";
|
|
||||||
res += yytnamerr_ (yytname_[x]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
#endif
|
char const* yyformat = 0;
|
||||||
res = YY_("syntax error");
|
switch (yycount)
|
||||||
return res;
|
{
|
||||||
|
#define YYCASE_(N, S) \
|
||||||
|
case N: \
|
||||||
|
yyformat = S; \
|
||||||
|
break
|
||||||
|
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_
|
||||||
|
}
|
||||||
|
|
||||||
|
// Argument number.
|
||||||
|
size_t yyi = 0;
|
||||||
|
for (char const* yyp = yyformat; *yyp; ++yyp)
|
||||||
|
if (yyp[0] == '%' && yyp[1] == 's' && yyi < yycount)
|
||||||
|
{
|
||||||
|
yyres += yytnamerr_ (yyarg[yyi++]);
|
||||||
|
++yyp;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
yyres += *yyp;
|
||||||
|
return yyres;]], [[
|
||||||
|
return YY_("syntax error");]])[
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -882,9 +971,9 @@ b4_error_verbose_if([, int tok])[)
|
|||||||
]b4_pact[
|
]b4_pact[
|
||||||
};
|
};
|
||||||
|
|
||||||
/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
|
/* YYDEFACT[S] -- default reduction number in state S. Performed when
|
||||||
doesn't specify something else to do. Zero means the default is an
|
YYTABLE doesn't specify something else to do. Zero means the
|
||||||
error. */
|
default is an error. */
|
||||||
const ]b4_int_type_for([b4_defact])[
|
const ]b4_int_type_for([b4_defact])[
|
||||||
]b4_parser_class_name[::yydefact_[] =
|
]b4_parser_class_name[::yydefact_[] =
|
||||||
{
|
{
|
||||||
@@ -907,7 +996,7 @@ b4_error_verbose_if([, int tok])[)
|
|||||||
|
|
||||||
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
|
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
|
||||||
positive, shift that token. If negative, reduce the rule which
|
positive, shift that token. If negative, reduce the rule which
|
||||||
number is the opposite. If zero, do what YYDEFACT says. */
|
number is the opposite. If YYTABLE_NINF_, syntax error. */
|
||||||
const ]b4_int_type(b4_table_ninf, b4_table_ninf) b4_parser_class_name::yytable_ninf_ = b4_table_ninf[;
|
const ]b4_int_type(b4_table_ninf, b4_table_ninf) b4_parser_class_name::yytable_ninf_ = b4_table_ninf[;
|
||||||
const ]b4_int_type_for([b4_table])[
|
const ]b4_int_type_for([b4_table])[
|
||||||
]b4_parser_class_name[::yytable_[] =
|
]b4_parser_class_name[::yytable_[] =
|
||||||
@@ -1048,9 +1137,9 @@ b4_error_verbose_if([, int tok])[)
|
|||||||
|
|
||||||
]b4_epilogue
|
]b4_epilogue
|
||||||
dnl
|
dnl
|
||||||
@output(b4_dir_prefix[]stack.hh@)
|
@output(b4_dir_prefix[]stack.hh@)@
|
||||||
b4_copyright([Stack handling for Bison parsers in C++],
|
b4_copyright([Stack handling for Bison parsers in C++],
|
||||||
[2002, 2003, 2004, 2005, 2006])[
|
[2002-2011])[
|
||||||
|
|
||||||
#ifndef BISON_STACK_HH
|
#ifndef BISON_STACK_HH
|
||||||
# define BISON_STACK_HH
|
# define BISON_STACK_HH
|
||||||
@@ -1145,5 +1234,6 @@ b4_copyright([Stack handling for Bison parsers in C++],
|
|||||||
};
|
};
|
||||||
]b4_namespace_close[
|
]b4_namespace_close[
|
||||||
|
|
||||||
#endif // not BISON_STACK_HH]
|
#endif // not BISON_STACK_HH[]dnl
|
||||||
|
]
|
||||||
m4_divert_pop(0)
|
m4_divert_pop(0)
|
||||||
|
|||||||
+164
-107
@@ -1,6 +1,6 @@
|
|||||||
# Java skeleton for Bison -*- autoconf -*-
|
# Java skeleton for Bison -*- autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 2007 Free Software Foundation, Inc.
|
# Copyright (C) 2007-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -23,20 +23,26 @@ m4_ifval(m4_defn([b4_symbol_destructors]),
|
|||||||
[])
|
[])
|
||||||
|
|
||||||
m4_divert_push(0)dnl
|
m4_divert_push(0)dnl
|
||||||
@output(b4_parser_file_name@)
|
@output(b4_parser_file_name@)@
|
||||||
b4_copyright([Skeleton implementation for Bison LALR(1) parsers in Java],
|
b4_copyright([Skeleton implementation for Bison LALR(1) parsers in Java],
|
||||||
[2007])
|
[2007-2011])
|
||||||
|
|
||||||
b4_percent_define_ifdef([package], [package b4_percent_define_get([package]);
|
b4_percent_define_ifdef([package], [package b4_percent_define_get([package]);
|
||||||
])[/* First part of user declarations. */
|
])[/* First part of user declarations. */
|
||||||
]b4_pre_prologue
|
]b4_pre_prologue
|
||||||
b4_percent_code_get([[imports]])
|
b4_percent_code_get([[imports]])
|
||||||
[/**
|
[/**
|
||||||
* A Bison parser, automatically generated from <tt>@ofile@</tt>.
|
* A Bison parser, automatically generated from <tt>]m4_bpatsubst(b4_file_name, [^"\(.*\)"$], [\1])[</tt>.
|
||||||
*
|
*
|
||||||
* @@author LALR (1) parser skeleton written by Paolo Bonzini.
|
* @@author LALR (1) parser skeleton written by Paolo Bonzini.
|
||||||
*/
|
*/
|
||||||
]b4_public_if([public ])b4_abstract_if([abstract ])[class ]b4_parser_class_name[
|
]b4_public_if([public ])dnl
|
||||||
|
b4_abstract_if([abstract ])dnl
|
||||||
|
b4_final_if([final ])dnl
|
||||||
|
b4_strictfp_if([strictfp ])dnl
|
||||||
|
[class ]b4_parser_class_name[]dnl
|
||||||
|
b4_percent_define_get3([extends], [ extends ])dnl
|
||||||
|
b4_percent_define_get3([implements], [ implements ])[
|
||||||
{
|
{
|
||||||
]b4_identification[
|
]b4_identification[
|
||||||
|
|
||||||
@@ -57,7 +63,7 @@ b4_locations_if([[
|
|||||||
public ]b4_position_type[ end;
|
public ]b4_position_type[ end;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a ]b4_location_type[ denoting an empty range located at
|
* Create a <code>]b4_location_type[</code> denoting an empty range located at
|
||||||
* a given point.
|
* a given point.
|
||||||
* @@param loc The position at which the range is anchored. */
|
* @@param loc The position at which the range is anchored. */
|
||||||
public ]b4_location_type[ (]b4_position_type[ loc) {
|
public ]b4_location_type[ (]b4_position_type[ loc) {
|
||||||
@@ -67,7 +73,7 @@ b4_locations_if([[
|
|||||||
/**
|
/**
|
||||||
* Create a <code>]b4_location_type[</code> from the endpoints of the range.
|
* Create a <code>]b4_location_type[</code> from the endpoints of the range.
|
||||||
* @@param begin The first position included in the range.
|
* @@param begin The first position included in the range.
|
||||||
* @@param begin The first position beyond the range. */
|
* @@param end The first position beyond the range. */
|
||||||
public ]b4_location_type[ (]b4_position_type[ begin, ]b4_position_type[ end) {
|
public ]b4_location_type[ (]b4_position_type[ begin, ]b4_position_type[ end) {
|
||||||
this.begin = begin;
|
this.begin = begin;
|
||||||
this.end = end;
|
this.end = end;
|
||||||
@@ -96,10 +102,10 @@ b4_token_enums(b4_tokens)
|
|||||||
private ]b4_location_type[ yylloc (YYStack rhs, int n)
|
private ]b4_location_type[ yylloc (YYStack rhs, int n)
|
||||||
{
|
{
|
||||||
if (n > 0)
|
if (n > 0)
|
||||||
return new ]b4_location_type[ (rhs.locationAt (1).begin, rhs.locationAt (n).end);
|
return new ]b4_location_type[ (rhs.locationAt (n-1).begin, rhs.locationAt (0).end);
|
||||||
else
|
else
|
||||||
return new ]b4_location_type[ (rhs.locationAt (0).end);
|
return new ]b4_location_type[ (rhs.locationAt (0).end);
|
||||||
}]])
|
}]])[
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Communication interface between the scanner and the Bison-generated
|
* Communication interface between the scanner and the Bison-generated
|
||||||
@@ -124,16 +130,15 @@ b4_token_enums(b4_tokens)
|
|||||||
/**
|
/**
|
||||||
* Entry point for the scanner. Returns the token identifier corresponding
|
* Entry point for the scanner. Returns the token identifier corresponding
|
||||||
* to the next token and prepares to return the semantic value
|
* to the next token and prepares to return the semantic value
|
||||||
* ]b4_locations_if([and beginning/ending positions ])[of the token.
|
* ]b4_locations_if([and beginning/ending positions ])[of the token.
|
||||||
* @@return the token identifier corresponding to the next token. */
|
* @@return the token identifier corresponding to the next token. */
|
||||||
int yylex () ]b4_maybe_throws([b4_lex_throws])[;
|
int yylex () ]b4_maybe_throws([b4_lex_throws])[;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Entry point for error reporting. Emits an error
|
* Entry point for error reporting. Emits an error
|
||||||
* ]b4_locations_if([ referring to the given location])[in a user-defined
|
* ]b4_locations_if([referring to the given location ])[in a user-defined way.
|
||||||
* way.
|
|
||||||
*
|
*
|
||||||
* ]b4_locations_if([loc], [[The location of the element to which the
|
* ]b4_locations_if([[@@param loc The location of the element to which the
|
||||||
* error message is related]])[
|
* error message is related]])[
|
||||||
* @@param s The string for the error message. */
|
* @@param s The string for the error message. */
|
||||||
void yyerror (]b4_locations_if([b4_location_type[ loc, ]])[String s);]
|
void yyerror (]b4_locations_if([b4_location_type[ loc, ]])[String s);]
|
||||||
@@ -160,7 +165,7 @@ b4_lexer_if([[
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates the Bison-generated parser.
|
* Instantiates the Bison-generated parser.
|
||||||
* @@param yylex The scanner that will supply tokens to the parser.
|
* @@param yylexer The scanner that will supply tokens to the parser.
|
||||||
*/
|
*/
|
||||||
b4_lexer_if([[protected]], [[public]]) b4_parser_class_name[ (]b4_parse_param_decl([[Lexer yylexer]])[) {
|
b4_lexer_if([[protected]], [[public]]) b4_parser_class_name[ (]b4_parse_param_decl([[Lexer yylexer]])[) {
|
||||||
this.yylexer = yylexer;
|
this.yylexer = yylexer;
|
||||||
@@ -205,7 +210,7 @@ b4_lexer_if([[
|
|||||||
|
|
||||||
]b4_locations_if([
|
]b4_locations_if([
|
||||||
protected final void yyerror (String s) {
|
protected final void yyerror (String s) {
|
||||||
yylexer.yyerror ((Location)null, s);
|
yylexer.yyerror ((]b4_location_type[)null, s);
|
||||||
}
|
}
|
||||||
protected final void yyerror (]b4_position_type[ loc, String s) {
|
protected final void yyerror (]b4_position_type[ loc, String s) {
|
||||||
yylexer.yyerror (new ]b4_location_type[ (loc), s);
|
yylexer.yyerror (new ]b4_location_type[ (loc), s);
|
||||||
@@ -223,11 +228,11 @@ b4_lexer_if([[
|
|||||||
|
|
||||||
public int size = 16;
|
public int size = 16;
|
||||||
public int height = -1;
|
public int height = -1;
|
||||||
|
|
||||||
public final void push (int state, ]b4_yystype[ value]dnl
|
public final void push (int state, ]b4_yystype[ value]dnl
|
||||||
b4_locations_if([, ]b4_location_type[ loc])[) {
|
b4_locations_if([, ]b4_location_type[ loc])[) {
|
||||||
height++;
|
height++;
|
||||||
if (size == height)
|
if (size == height)
|
||||||
{
|
{
|
||||||
int[] newStateStack = new int[size * 2];
|
int[] newStateStack = new int[size * 2];
|
||||||
System.arraycopy (stateStack, 0, newStateStack, 0, height);
|
System.arraycopy (stateStack, 0, newStateStack, 0, height);
|
||||||
@@ -236,7 +241,7 @@ b4_lexer_if([[
|
|||||||
]b4_location_type[[] newLocStack = new ]b4_location_type[[size * 2];
|
]b4_location_type[[] newLocStack = new ]b4_location_type[[size * 2];
|
||||||
System.arraycopy (locStack, 0, newLocStack, 0, height);
|
System.arraycopy (locStack, 0, newLocStack, 0, height);
|
||||||
locStack = newLocStack;]])
|
locStack = newLocStack;]])
|
||||||
|
|
||||||
b4_yystype[[] newValueStack = new ]b4_yystype[[size * 2];
|
b4_yystype[[] newValueStack = new ]b4_yystype[[size * 2];
|
||||||
System.arraycopy (valueStack, 0, newValueStack, 0, height);
|
System.arraycopy (valueStack, 0, newValueStack, 0, height);
|
||||||
valueStack = newValueStack;
|
valueStack = newValueStack;
|
||||||
@@ -250,14 +255,14 @@ b4_lexer_if([[
|
|||||||
}
|
}
|
||||||
|
|
||||||
public final void pop () {
|
public final void pop () {
|
||||||
height--;
|
pop (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void pop (int num) {
|
public final void pop (int num) {
|
||||||
// Avoid memory leaks... garbage collection is a white lie!
|
// Avoid memory leaks... garbage collection is a white lie!
|
||||||
if (num > 0) {
|
if (num > 0) {
|
||||||
java.util.Arrays.fill (valueStack, height - num + 1, height, null);
|
java.util.Arrays.fill (valueStack, height - num + 1, height + 1, null);
|
||||||
]b4_locations_if([[java.util.Arrays.fill (locStack, height - num + 1, height, null);]])[
|
]b4_locations_if([[java.util.Arrays.fill (locStack, height - num + 1, height + 1, null);]])[
|
||||||
}
|
}
|
||||||
height -= num;
|
height -= num;
|
||||||
}
|
}
|
||||||
@@ -278,8 +283,8 @@ b4_lexer_if([[
|
|||||||
public void print (java.io.PrintStream out)
|
public void print (java.io.PrintStream out)
|
||||||
{
|
{
|
||||||
out.print ("Stack now");
|
out.print ("Stack now");
|
||||||
|
|
||||||
for (int i = 0; i < height; i++)
|
for (int i = 0; i <= height; i++)
|
||||||
{
|
{
|
||||||
out.print (' ');
|
out.print (' ');
|
||||||
out.print (stateStack[i]);
|
out.print (stateStack[i]);
|
||||||
@@ -303,11 +308,9 @@ b4_lexer_if([[
|
|||||||
* printing an error message. */
|
* printing an error message. */
|
||||||
public static final int YYERROR = 2;
|
public static final int YYERROR = 2;
|
||||||
|
|
||||||
/**
|
// Internal return codes that are not supported for user semantic
|
||||||
* Returned by a Bison action in order to print an error message and start
|
// actions.
|
||||||
* error recovery. */
|
private static final int YYERRLAB = 3;
|
||||||
public static final int YYFAIL = 3;
|
|
||||||
|
|
||||||
private static final int YYNEWSTATE = 4;
|
private static final int YYNEWSTATE = 4;
|
||||||
private static final int YYDEFAULT = 5;
|
private static final int YYDEFAULT = 5;
|
||||||
private static final int YYREDUCE = 6;
|
private static final int YYREDUCE = 6;
|
||||||
@@ -325,14 +328,14 @@ b4_lexer_if([[
|
|||||||
return yyerrstatus_ == 0;
|
return yyerrstatus_ == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int yyaction (int yyn, YYStack yystack, int yylen)
|
private int yyaction (int yyn, YYStack yystack, int yylen) ]b4_maybe_throws([b4_throws])[
|
||||||
{
|
{
|
||||||
]b4_yystype[ yyval;
|
]b4_yystype[ yyval;
|
||||||
]b4_locations_if([b4_location_type[ yyloc = yylloc (yystack, yylen);]])[
|
]b4_locations_if([b4_location_type[ yyloc = yylloc (yystack, yylen);]])[
|
||||||
|
|
||||||
/* If YYLEN is nonzero, implement the default value of the action:
|
/* If YYLEN is nonzero, implement the default value of the action:
|
||||||
`$$ = $1'. Otherwise, use the top of the stack.
|
`$$ = $1'. Otherwise, use the top of the stack.
|
||||||
|
|
||||||
Otherwise, the following line sets YYVAL to garbage.
|
Otherwise, the following line sets YYVAL to garbage.
|
||||||
This behavior is undocumented and Bison
|
This behavior is undocumented and Bison
|
||||||
users should not rely upon it. */
|
users should not rely upon it. */
|
||||||
@@ -340,7 +343,7 @@ b4_lexer_if([[
|
|||||||
yyval = yystack.valueAt (yylen - 1);
|
yyval = yystack.valueAt (yylen - 1);
|
||||||
else
|
else
|
||||||
yyval = yystack.valueAt (0);
|
yyval = yystack.valueAt (0);
|
||||||
|
|
||||||
yy_reduce_print (yyn, yystack);
|
yy_reduce_print (yyn, yystack);
|
||||||
|
|
||||||
switch (yyn)
|
switch (yyn)
|
||||||
@@ -414,7 +417,7 @@ b4_lexer_if([[
|
|||||||
yycdebug (s + (yytype < yyntokens_ ? " token " : " nterm ")
|
yycdebug (s + (yytype < yyntokens_ ? " token " : " nterm ")
|
||||||
+ yytname_[yytype] + " ("]b4_locations_if([
|
+ yytname_[yytype] + " ("]b4_locations_if([
|
||||||
+ yylocationp + ": "])[
|
+ yylocationp + ": "])[
|
||||||
+ (yyvaluep == null ? "(null)" : yyvaluep) + ")");
|
+ (yyvaluep == null ? "(null)" : yyvaluep.toString ()) + ")");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -424,7 +427,7 @@ b4_lexer_if([[
|
|||||||
* @@return <tt>true</tt> if the parsing succeeds. Note that this does not
|
* @@return <tt>true</tt> if the parsing succeeds. Note that this does not
|
||||||
* imply that there were no syntax errors.
|
* imply that there were no syntax errors.
|
||||||
*/
|
*/
|
||||||
public boolean parse () ]b4_maybe_throws([b4_throws])[
|
public boolean parse () ]b4_maybe_throws([b4_list2([b4_lex_throws], [b4_throws])])[
|
||||||
{
|
{
|
||||||
/// Lookahead and lookahead in internal form.
|
/// Lookahead and lookahead in internal form.
|
||||||
int yychar = yyempty_;
|
int yychar = yyempty_;
|
||||||
@@ -477,19 +480,19 @@ m4_popdef([b4_at_dollar])])dnl
|
|||||||
yycdebug ("Entering state " + yystate + "\n");
|
yycdebug ("Entering state " + yystate + "\n");
|
||||||
if (yydebug > 0)
|
if (yydebug > 0)
|
||||||
yystack.print (yyDebugStream);
|
yystack.print (yyDebugStream);
|
||||||
|
|
||||||
/* Accept? */
|
/* Accept? */
|
||||||
if (yystate == yyfinal_)
|
if (yystate == yyfinal_)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
/* Take a decision. First try without lookahead. */
|
/* Take a decision. First try without lookahead. */
|
||||||
yyn = yypact_[yystate];
|
yyn = yypact_[yystate];
|
||||||
if (yyn == yypact_ninf_)
|
if (yy_pact_value_is_default_ (yyn))
|
||||||
{
|
{
|
||||||
label = YYDEFAULT;
|
label = YYDEFAULT;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Read a lookahead token. */
|
/* Read a lookahead token. */
|
||||||
if (yychar == yyempty_)
|
if (yychar == yyempty_)
|
||||||
{
|
{
|
||||||
@@ -497,10 +500,10 @@ m4_popdef([b4_at_dollar])])dnl
|
|||||||
yychar = yylex ();]
|
yychar = yylex ();]
|
||||||
b4_locations_if([[
|
b4_locations_if([[
|
||||||
yylloc = new ]b4_location_type[(yylexer.getStartPos (),
|
yylloc = new ]b4_location_type[(yylexer.getStartPos (),
|
||||||
yylexer.getEndPos ());]])
|
yylexer.getEndPos ());]])
|
||||||
yylval = yylexer.getLVal ();[
|
yylval = yylexer.getLVal ();[
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Convert token to internal form. */
|
/* Convert token to internal form. */
|
||||||
if (yychar <= EOF)
|
if (yychar <= EOF)
|
||||||
{
|
{
|
||||||
@@ -511,58 +514,58 @@ m4_popdef([b4_at_dollar])])dnl
|
|||||||
{
|
{
|
||||||
yytoken = yytranslate_ (yychar);
|
yytoken = yytranslate_ (yychar);
|
||||||
yy_symbol_print ("Next token is", yytoken,
|
yy_symbol_print ("Next token is", yytoken,
|
||||||
yylval]b4_locations_if([, yylloc])[);
|
yylval]b4_locations_if([, yylloc])[);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If the proper action on seeing token YYTOKEN is to reduce or to
|
/* If the proper action on seeing token YYTOKEN is to reduce or to
|
||||||
detect an error, take that action. */
|
detect an error, take that action. */
|
||||||
yyn += yytoken;
|
yyn += yytoken;
|
||||||
if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yytoken)
|
if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yytoken)
|
||||||
label = YYDEFAULT;
|
label = YYDEFAULT;
|
||||||
|
|
||||||
/* <= 0 means reduce or error. */
|
/* <= 0 means reduce or error. */
|
||||||
else if ((yyn = yytable_[yyn]) <= 0)
|
else if ((yyn = yytable_[yyn]) <= 0)
|
||||||
{
|
{
|
||||||
if (yyn == 0 || yyn == yytable_ninf_)
|
if (yy_table_value_is_error_ (yyn))
|
||||||
label = YYFAIL;
|
label = YYERRLAB;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
yyn = -yyn;
|
yyn = -yyn;
|
||||||
label = YYREDUCE;
|
label = YYREDUCE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Shift the lookahead token. */
|
/* Shift the lookahead token. */
|
||||||
yy_symbol_print ("Shifting", yytoken,
|
yy_symbol_print ("Shifting", yytoken,
|
||||||
yylval]b4_locations_if([, yylloc])[);
|
yylval]b4_locations_if([, yylloc])[);
|
||||||
|
|
||||||
/* Discard the token being shifted. */
|
/* Discard the token being shifted. */
|
||||||
yychar = yyempty_;
|
yychar = yyempty_;
|
||||||
|
|
||||||
/* Count tokens shifted since error; after three, turn off error
|
/* Count tokens shifted since error; after three, turn off error
|
||||||
status. */
|
status. */
|
||||||
if (yyerrstatus_ > 0)
|
if (yyerrstatus_ > 0)
|
||||||
--yyerrstatus_;
|
--yyerrstatus_;
|
||||||
|
|
||||||
yystate = yyn;
|
yystate = yyn;
|
||||||
yystack.push (yystate, yylval]b4_locations_if([, yylloc])[);
|
yystack.push (yystate, yylval]b4_locations_if([, yylloc])[);
|
||||||
label = YYNEWSTATE;
|
label = YYNEWSTATE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/*-----------------------------------------------------------.
|
/*-----------------------------------------------------------.
|
||||||
| yydefault -- do the default action for the current state. |
|
| yydefault -- do the default action for the current state. |
|
||||||
`-----------------------------------------------------------*/
|
`-----------------------------------------------------------*/
|
||||||
case YYDEFAULT:
|
case YYDEFAULT:
|
||||||
yyn = yydefact_[yystate];
|
yyn = yydefact_[yystate];
|
||||||
if (yyn == 0)
|
if (yyn == 0)
|
||||||
label = YYFAIL;
|
label = YYERRLAB;
|
||||||
else
|
else
|
||||||
label = YYREDUCE;
|
label = YYREDUCE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/*-----------------------------.
|
/*-----------------------------.
|
||||||
| yyreduce -- Do a reduction. |
|
| yyreduce -- Do a reduction. |
|
||||||
`-----------------------------*/
|
`-----------------------------*/
|
||||||
@@ -571,24 +574,26 @@ m4_popdef([b4_at_dollar])])dnl
|
|||||||
label = yyaction (yyn, yystack, yylen);
|
label = yyaction (yyn, yystack, yylen);
|
||||||
yystate = yystack.stateAt (0);
|
yystate = yystack.stateAt (0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/*------------------------------------.
|
/*------------------------------------.
|
||||||
| yyerrlab -- here on detecting error |
|
| yyerrlab -- here on detecting error |
|
||||||
`------------------------------------*/
|
`------------------------------------*/
|
||||||
case YYFAIL:
|
case YYERRLAB:
|
||||||
/* If not already recovering from an error, report this error. */
|
/* If not already recovering from an error, report this error. */
|
||||||
if (yyerrstatus_ == 0)
|
if (yyerrstatus_ == 0)
|
||||||
{
|
{
|
||||||
++yynerrs_;
|
++yynerrs_;
|
||||||
yyerror (]b4_locations_if([yylloc, ])[yysyntax_error (yystate, yytoken));
|
if (yychar == yyempty_)
|
||||||
|
yytoken = yyempty_;
|
||||||
|
yyerror (]b4_locations_if([yylloc, ])[yysyntax_error (yystate, yytoken));
|
||||||
}
|
}
|
||||||
|
|
||||||
]b4_locations_if([yyerrloc = yylloc;])[
|
]b4_locations_if([yyerrloc = yylloc;])[
|
||||||
if (yyerrstatus_ == 3)
|
if (yyerrstatus_ == 3)
|
||||||
{
|
{
|
||||||
/* If just tried and failed to reuse lookahead token after an
|
/* If just tried and failed to reuse lookahead token after an
|
||||||
error, discard it. */
|
error, discard it. */
|
||||||
|
|
||||||
if (yychar <= EOF)
|
if (yychar <= EOF)
|
||||||
{
|
{
|
||||||
/* Return failure if at end of input. */
|
/* Return failure if at end of input. */
|
||||||
@@ -598,17 +603,17 @@ m4_popdef([b4_at_dollar])])dnl
|
|||||||
else
|
else
|
||||||
yychar = yyempty_;
|
yychar = yyempty_;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Else will try to reuse lookahead token after shifting the error
|
/* Else will try to reuse lookahead token after shifting the error
|
||||||
token. */
|
token. */
|
||||||
label = YYERRLAB1;
|
label = YYERRLAB1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/*---------------------------------------------------.
|
/*---------------------------------------------------.
|
||||||
| errorlab -- error raised explicitly by YYERROR. |
|
| errorlab -- error raised explicitly by YYERROR. |
|
||||||
`---------------------------------------------------*/
|
`---------------------------------------------------*/
|
||||||
case YYERROR:
|
case YYERROR:
|
||||||
|
|
||||||
]b4_locations_if([yyerrloc = yystack.locationAt (yylen - 1);])[
|
]b4_locations_if([yyerrloc = yystack.locationAt (yylen - 1);])[
|
||||||
/* Do not reclaim the symbols of the rule which action triggered
|
/* Do not reclaim the symbols of the rule which action triggered
|
||||||
this YYERROR. */
|
this YYERROR. */
|
||||||
@@ -617,17 +622,17 @@ m4_popdef([b4_at_dollar])])dnl
|
|||||||
yystate = yystack.stateAt (0);
|
yystate = yystack.stateAt (0);
|
||||||
label = YYERRLAB1;
|
label = YYERRLAB1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/*-------------------------------------------------------------.
|
/*-------------------------------------------------------------.
|
||||||
| yyerrlab1 -- common code for both syntax error and YYERROR. |
|
| yyerrlab1 -- common code for both syntax error and YYERROR. |
|
||||||
`-------------------------------------------------------------*/
|
`-------------------------------------------------------------*/
|
||||||
case YYERRLAB1:
|
case YYERRLAB1:
|
||||||
yyerrstatus_ = 3; /* Each real token shifted decrements this. */
|
yyerrstatus_ = 3; /* Each real token shifted decrements this. */
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
yyn = yypact_[yystate];
|
yyn = yypact_[yystate];
|
||||||
if (yyn != yypact_ninf_)
|
if (!yy_pact_value_is_default_ (yyn))
|
||||||
{
|
{
|
||||||
yyn += yyterror_;
|
yyn += yyterror_;
|
||||||
if (0 <= yyn && yyn <= yylast_ && yycheck_[yyn] == yyterror_)
|
if (0 <= yyn && yyn <= yylast_ && yycheck_[yyn] == yyterror_)
|
||||||
@@ -637,18 +642,18 @@ m4_popdef([b4_at_dollar])])dnl
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Pop the current state because it cannot handle the error token. */
|
/* Pop the current state because it cannot handle the error token. */
|
||||||
if (yystack.height == 1)
|
if (yystack.height == 1)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
]b4_locations_if([yyerrloc = yystack.locationAt (0);])[
|
]b4_locations_if([yyerrloc = yystack.locationAt (0);])[
|
||||||
yystack.pop ();
|
yystack.pop ();
|
||||||
yystate = yystack.stateAt (0);
|
yystate = yystack.stateAt (0);
|
||||||
if (yydebug > 0)
|
if (yydebug > 0)
|
||||||
yystack.print (yyDebugStream);
|
yystack.print (yyDebugStream);
|
||||||
}
|
}
|
||||||
|
|
||||||
]b4_locations_if([
|
]b4_locations_if([
|
||||||
/* Muck with the stack to setup for yylloc. */
|
/* Muck with the stack to setup for yylloc. */
|
||||||
yystack.push (0, null, yylloc);
|
yystack.push (0, null, yylloc);
|
||||||
@@ -659,16 +664,16 @@ m4_popdef([b4_at_dollar])])dnl
|
|||||||
/* Shift the error token. */
|
/* Shift the error token. */
|
||||||
yy_symbol_print ("Shifting", yystos_[yyn],
|
yy_symbol_print ("Shifting", yystos_[yyn],
|
||||||
yylval]b4_locations_if([, yyloc])[);
|
yylval]b4_locations_if([, yyloc])[);
|
||||||
|
|
||||||
yystate = yyn;
|
yystate = yyn;
|
||||||
yystack.push (yyn, yylval]b4_locations_if([, yyloc])[);
|
yystack.push (yyn, yylval]b4_locations_if([, yyloc])[);
|
||||||
label = YYNEWSTATE;
|
label = YYNEWSTATE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Accept. */
|
/* Accept. */
|
||||||
case YYACCEPT:
|
case YYACCEPT:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
/* Abort. */
|
/* Abort. */
|
||||||
case YYABORT:
|
case YYABORT:
|
||||||
return false;
|
return false;
|
||||||
@@ -680,44 +685,96 @@ m4_popdef([b4_at_dollar])])dnl
|
|||||||
{
|
{
|
||||||
if (errorVerbose)
|
if (errorVerbose)
|
||||||
{
|
{
|
||||||
int yyn = yypact_[yystate];
|
/* There are many possibilities here to consider:
|
||||||
if (yypact_ninf_ < yyn && yyn <= yylast_)
|
- Assume YYFAIL is not used. It's too flawed to consider.
|
||||||
|
See
|
||||||
|
<http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
|
||||||
|
for details. YYERROR is fine as it does not invoke this
|
||||||
|
function.
|
||||||
|
- If this state is a consistent state with a default action,
|
||||||
|
then the only way this function was invoked is if the
|
||||||
|
default action is an error action. In that case, don't
|
||||||
|
check for expected tokens because there are none.
|
||||||
|
- The only way there can be no lookahead present (in tok) is
|
||||||
|
if this state is a consistent state with a default action.
|
||||||
|
Thus, detecting the absence of a lookahead is sufficient to
|
||||||
|
determine that there is no unexpected or expected token to
|
||||||
|
report. In that case, just report a simple "syntax error".
|
||||||
|
- Don't assume there isn't a lookahead just because this
|
||||||
|
state is a consistent state with a default action. There
|
||||||
|
might have been a previous inconsistent state, consistent
|
||||||
|
state with a non-default action, or user semantic action
|
||||||
|
that manipulated yychar. (However, yychar is currently out
|
||||||
|
of scope during semantic actions.)
|
||||||
|
- Of course, the expected token list depends on states to
|
||||||
|
have correct lookahead information, and it depends on the
|
||||||
|
parser not to perform extra reductions after fetching a
|
||||||
|
lookahead from the scanner and before detecting a syntax
|
||||||
|
error. Thus, state merging (from LALR or IELR) and default
|
||||||
|
reductions corrupt the expected token list. However, the
|
||||||
|
list is correct for canonical LR with one exception: it
|
||||||
|
will still contain any token that will not be accepted due
|
||||||
|
to an error action in a later state.
|
||||||
|
*/
|
||||||
|
if (tok != yyempty_)
|
||||||
{
|
{
|
||||||
StringBuffer res;
|
// FIXME: This method of building the message is not compatible
|
||||||
|
// with internationalization.
|
||||||
/* Start YYX at -YYN if negative to avoid negative indexes in
|
StringBuffer res =
|
||||||
YYCHECK. */
|
new StringBuffer ("syntax error, unexpected ");
|
||||||
int yyxbegin = yyn < 0 ? -yyn : 0;
|
res.append (yytnamerr_ (yytname_[tok]));
|
||||||
|
int yyn = yypact_[yystate];
|
||||||
/* Stay within bounds of both yycheck and yytname. */
|
if (!yy_pact_value_is_default_ (yyn))
|
||||||
int yychecklim = yylast_ - yyn + 1;
|
{
|
||||||
int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_;
|
/* Start YYX at -YYN if negative to avoid negative
|
||||||
int count = 0;
|
indexes in YYCHECK. In other words, skip the first
|
||||||
for (int x = yyxbegin; x < yyxend; ++x)
|
-YYN actions for this state because they are default
|
||||||
if (yycheck_[x + yyn] == x && x != yyterror_)
|
actions. */
|
||||||
++count;
|
int yyxbegin = yyn < 0 ? -yyn : 0;
|
||||||
|
/* Stay within bounds of both yycheck and yytname. */
|
||||||
// FIXME: This method of building the message is not compatible
|
int yychecklim = yylast_ - yyn + 1;
|
||||||
// with internationalization.
|
int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_;
|
||||||
res = new StringBuffer ("syntax error, unexpected ");
|
int count = 0;
|
||||||
res.append (yytnamerr_ (yytname_[tok]));
|
for (int x = yyxbegin; x < yyxend; ++x)
|
||||||
if (count < 5)
|
if (yycheck_[x + yyn] == x && x != yyterror_
|
||||||
{
|
&& !yy_table_value_is_error_ (yytable_[x + yyn]))
|
||||||
count = 0;
|
++count;
|
||||||
for (int x = yyxbegin; x < yyxend; ++x)
|
if (count < 5)
|
||||||
if (yycheck_[x + yyn] == x && x != yyterror_)
|
{
|
||||||
{
|
count = 0;
|
||||||
res.append (count++ == 0 ? ", expecting " : " or ");
|
for (int x = yyxbegin; x < yyxend; ++x)
|
||||||
res.append (yytnamerr_ (yytname_[x]));
|
if (yycheck_[x + yyn] == x && x != yyterror_
|
||||||
}
|
&& !yy_table_value_is_error_ (yytable_[x + yyn]))
|
||||||
}
|
{
|
||||||
return res.toString ();
|
res.append (count++ == 0 ? ", expecting " : " or ");
|
||||||
|
res.append (yytnamerr_ (yytname_[x]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return res.toString ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return "syntax error";
|
return "syntax error";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the given <code>yypact_</code> value indicates a defaulted state.
|
||||||
|
* @@param yyvalue the value to check
|
||||||
|
*/
|
||||||
|
private static boolean yy_pact_value_is_default_ (int yyvalue)
|
||||||
|
{
|
||||||
|
return yyvalue == yypact_ninf_;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the given <code>yytable_</code> value indicates a syntax error.
|
||||||
|
* @@param yyvalue the value to check
|
||||||
|
*/
|
||||||
|
private static boolean yy_table_value_is_error_ (int yyvalue)
|
||||||
|
{
|
||||||
|
return yyvalue == yytable_ninf_;
|
||||||
|
}
|
||||||
|
|
||||||
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
|
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
|
||||||
STATE-NUM. */
|
STATE-NUM. */
|
||||||
@@ -727,9 +784,9 @@ m4_popdef([b4_at_dollar])])dnl
|
|||||||
]b4_pact[
|
]b4_pact[
|
||||||
};
|
};
|
||||||
|
|
||||||
/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
|
/* YYDEFACT[S] -- default reduction number in state S. Performed when
|
||||||
doesn't specify something else to do. Zero means the default is an
|
YYTABLE doesn't specify something else to do. Zero means the
|
||||||
error. */
|
default is an error. */
|
||||||
private static final ]b4_int_type_for([b4_defact])[ yydefact_[] =
|
private static final ]b4_int_type_for([b4_defact])[ yydefact_[] =
|
||||||
{
|
{
|
||||||
]b4_defact[
|
]b4_defact[
|
||||||
@@ -750,7 +807,7 @@ m4_popdef([b4_at_dollar])])dnl
|
|||||||
|
|
||||||
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
|
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
|
||||||
positive, shift that token. If negative, reduce the rule which
|
positive, shift that token. If negative, reduce the rule which
|
||||||
number is the opposite. If zero, do what YYDEFACT says. */
|
number is the opposite. If YYTABLE_NINF_, syntax error. */
|
||||||
private static final ]b4_int_type_for([b4_table])[ yytable_ninf_ = ]b4_table_ninf[;
|
private static final ]b4_int_type_for([b4_table])[ yytable_ninf_ = ]b4_table_ninf[;
|
||||||
private static final ]b4_int_type_for([b4_table])[
|
private static final ]b4_int_type_for([b4_table])[
|
||||||
yytable_[] =
|
yytable_[] =
|
||||||
@@ -837,7 +894,7 @@ m4_popdef([b4_at_dollar])])dnl
|
|||||||
for (int yyi = 0; yyi < yynrhs; yyi++)
|
for (int yyi = 0; yyi < yynrhs; yyi++)
|
||||||
yy_symbol_print (" $" + (yyi + 1) + " =",
|
yy_symbol_print (" $" + (yyi + 1) + " =",
|
||||||
yyrhs_[yyprhs_[yyrule] + yyi],
|
yyrhs_[yyprhs_[yyrule] + yyi],
|
||||||
]b4_rhs_value(yynrhs, yyi + 1)b4_locations_if([,
|
]b4_rhs_value(yynrhs, yyi + 1)b4_locations_if([,
|
||||||
b4_rhs_location(yynrhs, yyi + 1)])[);
|
b4_rhs_location(yynrhs, yyi + 1)])[);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+10
-10
@@ -1,7 +1,6 @@
|
|||||||
# C++ skeleton for Bison
|
# C++ skeleton for Bison
|
||||||
|
|
||||||
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation,
|
# Copyright (C) 2002-2007, 2009-2011 Free Software Foundation, Inc.
|
||||||
# Inc.
|
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -19,9 +18,9 @@
|
|||||||
# We do want M4 expansion after # for CPP macros.
|
# We do want M4 expansion after # for CPP macros.
|
||||||
m4_changecom()
|
m4_changecom()
|
||||||
m4_divert_push(0)dnl
|
m4_divert_push(0)dnl
|
||||||
@output(b4_dir_prefix[]position.hh@)
|
@output(b4_dir_prefix[]position.hh@)@
|
||||||
b4_copyright([Positions for Bison parsers in C++],
|
b4_copyright([Positions for Bison parsers in C++],
|
||||||
[2002, 2003, 2004, 2005, 2006])[
|
[2002-2007, 2009-2011])[
|
||||||
|
|
||||||
/**
|
/**
|
||||||
** \file position.hh
|
** \file position.hh
|
||||||
@@ -116,10 +115,11 @@ b4_copyright([Positions for Bison parsers in C++],
|
|||||||
inline bool
|
inline bool
|
||||||
operator== (const position& pos1, const position& pos2)
|
operator== (const position& pos1, const position& pos2)
|
||||||
{
|
{
|
||||||
return
|
return (pos1.line == pos2.line
|
||||||
(pos1.filename == pos2.filename
|
&& pos1.column == pos2.column
|
||||||
|| pos1.filename && pos2.filename && *pos1.filename == *pos2.filename)
|
&& (pos1.filename == pos2.filename
|
||||||
&& pos1.line == pos2.line && pos1.column == pos2.column;
|
|| (pos1.filename && pos2.filename
|
||||||
|
&& *pos1.filename == *pos2.filename)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Compare two position objects.
|
/// Compare two position objects.
|
||||||
@@ -143,9 +143,9 @@ b4_copyright([Positions for Bison parsers in C++],
|
|||||||
|
|
||||||
]b4_namespace_close[
|
]b4_namespace_close[
|
||||||
#endif // not BISON_POSITION_HH]
|
#endif // not BISON_POSITION_HH]
|
||||||
@output(b4_dir_prefix[]location.hh@)
|
@output(b4_dir_prefix[]location.hh@)@
|
||||||
b4_copyright([Locations for Bison parsers in C++],
|
b4_copyright([Locations for Bison parsers in C++],
|
||||||
[2002, 2003, 2004, 2005, 2006])[
|
[2002-2007, 2009-2011])[
|
||||||
|
|
||||||
/**
|
/**
|
||||||
** \file location.hh
|
** \file location.hh
|
||||||
|
|||||||
Symlink
+1
@@ -0,0 +1 @@
|
|||||||
|
../../submodules/autoconf/lib/m4sugar/foreach.m4
|
||||||
File diff suppressed because it is too large
Load Diff
Symlink
+1
@@ -0,0 +1 @@
|
|||||||
|
../../submodules/autoconf/lib/m4sugar/m4sugar.m4
|
||||||
+1
-2
@@ -2,9 +2,8 @@
|
|||||||
|
|
||||||
<!--
|
<!--
|
||||||
bison.xsl - common templates for Bison XSLT.
|
bison.xsl - common templates for Bison XSLT.
|
||||||
$Id$
|
|
||||||
|
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc.
|
Copyright (C) 2007-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of Bison, the GNU Compiler Compiler.
|
This file is part of Bison, the GNU Compiler Compiler.
|
||||||
|
|
||||||
|
|||||||
+22
-7
@@ -2,9 +2,8 @@
|
|||||||
|
|
||||||
<!--
|
<!--
|
||||||
xml2dot.xsl - transform Bison XML Report into DOT.
|
xml2dot.xsl - transform Bison XML Report into DOT.
|
||||||
$Id$
|
|
||||||
|
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc.
|
Copyright (C) 2007-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of Bison, the GNU Compiler Compiler.
|
This file is part of Bison, the GNU Compiler Compiler.
|
||||||
|
|
||||||
@@ -36,11 +35,27 @@
|
|||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="bison-xml-report">
|
<xsl:template match="bison-xml-report">
|
||||||
<xsl:apply-templates select="automaton"/>
|
<xsl:text>// Generated by GNU Bison </xsl:text>
|
||||||
|
<xsl:value-of select="@version"/>
|
||||||
|
<xsl:text>. </xsl:text>
|
||||||
|
<xsl:text>// Report bugs to <</xsl:text>
|
||||||
|
<xsl:value-of select="@bug-report"/>
|
||||||
|
<xsl:text>>. </xsl:text>
|
||||||
|
<xsl:text>// Home page: <</xsl:text>
|
||||||
|
<xsl:value-of select="@url"/>
|
||||||
|
<xsl:text>>. </xsl:text>
|
||||||
|
<xsl:apply-templates select="automaton">
|
||||||
|
<xsl:with-param name="filename" select="filename"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="automaton">
|
<xsl:template match="automaton">
|
||||||
<xsl:text>digraph Automaton { </xsl:text>
|
<xsl:param name="filename"/>
|
||||||
|
<xsl:text>digraph "</xsl:text>
|
||||||
|
<xsl:call-template name="escape">
|
||||||
|
<xsl:with-param name="subject" select="$filename"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:text>" { </xsl:text>
|
||||||
<xsl:apply-templates select="state"/>
|
<xsl:apply-templates select="state"/>
|
||||||
<xsl:text>} </xsl:text>
|
<xsl:text>} </xsl:text>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
@@ -197,11 +212,11 @@
|
|||||||
<xsl:with-param name="search" select="$search"/>
|
<xsl:with-param name="search" select="$search"/>
|
||||||
<xsl:with-param name="replace" select="$replace"/>
|
<xsl:with-param name="replace" select="$replace"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="$subject"/>
|
<xsl:value-of select="$subject"/>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
</xsl:stylesheet>
|
</xsl:stylesheet>
|
||||||
|
|||||||
@@ -2,9 +2,8 @@
|
|||||||
|
|
||||||
<!--
|
<!--
|
||||||
xml2text.xsl - transform Bison XML Report into plain text.
|
xml2text.xsl - transform Bison XML Report into plain text.
|
||||||
$Id$
|
|
||||||
|
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc.
|
Copyright (C) 2007-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of Bison, the GNU Compiler Compiler.
|
This file is part of Bison, the GNU Compiler Compiler.
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,8 @@
|
|||||||
|
|
||||||
<!--
|
<!--
|
||||||
xml2html.xsl - transform Bison XML Report into XHTML.
|
xml2html.xsl - transform Bison XML Report into XHTML.
|
||||||
$Id$
|
|
||||||
|
|
||||||
Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
Copyright (C) 2007-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of Bison, the GNU Compiler Compiler.
|
This file is part of Bison, the GNU Compiler Compiler.
|
||||||
|
|
||||||
@@ -49,15 +48,15 @@
|
|||||||
font-size: 9pt;
|
font-size: 9pt;
|
||||||
}
|
}
|
||||||
a:link {
|
a:link {
|
||||||
color: #1f00ff;
|
color: #1f00ff;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
a:visited {
|
a:visited {
|
||||||
color: #1f00ff;
|
color: #1f00ff;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
a:hover {
|
a:hover {
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
#menu a {
|
#menu a {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
|
|||||||
+709
-317
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
|||||||
# DJGPP Maintainer's Makefile -*-Makefile-*-
|
# DJGPP Maintainer's Makefile -*-Makefile-*-
|
||||||
# Requires GNU sed
|
# Requires GNU sed
|
||||||
|
|
||||||
## Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
## Copyright (C) 2005-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
This is a port of GNU Bison @VERSION@ to MSDOS/DJGPP.
|
This is a port of GNU Bison @VERSION@ to MSDOS/DJGPP.
|
||||||
|
|
||||||
Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
Copyright (C) 2005-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ Rem Configure Bison for DJGPP.
|
|||||||
Rem WARNING WARNING WARNING: This file needs to have DOS CRLF end-of-line
|
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 format, or else stock DOS/Windows shells will refuse to run it.
|
||||||
|
|
||||||
Rem Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
Rem Copyright (C) 2005-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Rem This program is free software: you can redistribute it and/or modify
|
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
|
Rem it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+1
-2
@@ -2,8 +2,7 @@
|
|||||||
# Sed script for additional DJGPP specific editing
|
# Sed script for additional DJGPP specific editing
|
||||||
# of the configure script generated by autoconf 2.62.
|
# of the configure script generated by autoconf 2.62.
|
||||||
|
|
||||||
|
# Copyright (C) 2005-2011 Free Software Foundation, Inc.
|
||||||
# Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
# This is the config.site file for configuring GNU packages
|
# This is the config.site file for configuring GNU packages
|
||||||
# which are to be built with DJGPP tools.
|
# which are to be built with DJGPP tools.
|
||||||
|
|
||||||
# Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
# Copyright (C) 2005-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
# sed script for DJGPP specific editing of config.hin
|
# sed script for DJGPP specific editing of config.hin
|
||||||
|
|
||||||
# Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
# Copyright (C) 2005-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+1
-1
@@ -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 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 with other file names after truncation to DOS 8+3 namespace.
|
||||||
Rem
|
Rem
|
||||||
Rem Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
Rem Copyright (C) 2005-2011 Free Software Foundation, Inc.
|
||||||
Rem
|
Rem
|
||||||
Rem This program is free software: you can redistribute it and/or modify
|
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
|
Rem it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
/* Subprocesses with pipes.
|
/* Subprocesses with pipes.
|
||||||
|
|
||||||
Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
Copyright (C) 2005-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+2
-1
@@ -1,5 +1,6 @@
|
|||||||
/* Subprocesses with pipes.
|
/* Subprocesses with pipes.
|
||||||
Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2005-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+1
-2
@@ -2,8 +2,7 @@
|
|||||||
# Sed script for additional DJGPP specific editing
|
# Sed script for additional DJGPP specific editing
|
||||||
# of the testsuite script generated by autoconf 2.61.
|
# of the testsuite script generated by autoconf 2.61.
|
||||||
|
|
||||||
|
# Copyright (C) 2007-2011 Free Software Foundation, Inc.
|
||||||
# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
Makefile
|
|
||||||
bison.aux
|
|
||||||
bison.cp
|
|
||||||
bison.cps
|
|
||||||
bison.dvi
|
|
||||||
bison.fn
|
|
||||||
bison.html
|
|
||||||
bison.ky
|
|
||||||
bison.log
|
|
||||||
bison.pdf
|
|
||||||
bison.pg
|
|
||||||
bison.ps
|
|
||||||
bison.toc
|
|
||||||
bison.tp
|
|
||||||
bison.vr
|
|
||||||
cross-options.texi
|
|
||||||
Makefile.in
|
|
||||||
refcard.dvi
|
|
||||||
refcard.log
|
|
||||||
refcard.ps
|
|
||||||
*.info*
|
|
||||||
stamp-vti
|
|
||||||
version.texi
|
|
||||||
yacc.1
|
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
|
||||||
|
/*.info*
|
||||||
|
/*~
|
||||||
|
/.dirstamp
|
||||||
|
/Makefile
|
||||||
|
/Makefile.in
|
||||||
|
/bison.1
|
||||||
|
/bison.aux
|
||||||
|
/bison.cp
|
||||||
|
/bison.cps
|
||||||
|
/bison.dvi
|
||||||
|
/bison.fn
|
||||||
|
/bison.html
|
||||||
|
/bison.ky
|
||||||
|
/bison.log
|
||||||
|
/bison.pdf
|
||||||
|
/bison.pg
|
||||||
|
/bison.ps
|
||||||
|
/bison.toc
|
||||||
|
/bison.tp
|
||||||
|
/bison.vr
|
||||||
|
/cross-options.texi
|
||||||
|
/gendocs_template
|
||||||
|
/refcard.dvi
|
||||||
|
/refcard.log
|
||||||
|
/refcard.ps
|
||||||
|
/stamp-vti
|
||||||
|
/version.texi
|
||||||
|
/yacc.1
|
||||||
|
|
||||||
+1
-1
@@ -23,7 +23,7 @@ PROJECT_NAME = "@PACKAGE_NAME@"
|
|||||||
# This could be handy for archiving the generated documentation or
|
# This could be handy for archiving the generated documentation or
|
||||||
# if some version control system is used.
|
# if some version control system is used.
|
||||||
|
|
||||||
PROJECT_NUMBER = "@PACKAGE_VERSION@ @ID@"
|
PROJECT_NUMBER = "@PACKAGE_VERSION@"
|
||||||
|
|
||||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
||||||
# base path where the generated documentation will be put.
|
# base path where the generated documentation will be put.
|
||||||
|
|||||||
+11
-16
@@ -1,5 +1,6 @@
|
|||||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||||
## Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
|
|
||||||
|
## Copyright (C) 2001-2003, 2005-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -25,9 +26,12 @@ clean-local:
|
|||||||
|
|
||||||
CROSS_OPTIONS_PL = $(top_srcdir)/build-aux/cross-options.pl
|
CROSS_OPTIONS_PL = $(top_srcdir)/build-aux/cross-options.pl
|
||||||
$(srcdir)/cross-options.texi: $(top_srcdir)/src/getargs.c $(CROSS_OPTIONS_PL)
|
$(srcdir)/cross-options.texi: $(top_srcdir)/src/getargs.c $(CROSS_OPTIONS_PL)
|
||||||
-rm -f $@ $@.tmp
|
mv -f $@ $@~ || : >$@~
|
||||||
|
-rm -f $@.tmp
|
||||||
cd $(top_builddir)/src && $(MAKE) $(AM_MAKEFLAGS) bison
|
cd $(top_builddir)/src && $(MAKE) $(AM_MAKEFLAGS) bison
|
||||||
$(top_builddir)/src/bison --help | perl $(CROSS_OPTIONS_PL) >$@.tmp
|
$(top_builddir)/src/bison --help \
|
||||||
|
| perl $(CROSS_OPTIONS_PL) $(top_srcdir)/src/scan-gram.l >$@.tmp
|
||||||
|
diff -u $@~ $@.tmp || true
|
||||||
mv $@.tmp $@
|
mv $@.tmp $@
|
||||||
MAINTAINERCLEANFILES = $(srcdir)/cross-options.texi
|
MAINTAINERCLEANFILES = $(srcdir)/cross-options.texi
|
||||||
|
|
||||||
@@ -53,15 +57,11 @@ dist_man_MANS = $(srcdir)/bison.1
|
|||||||
EXTRA_DIST += $(dist_man_MANS:.1=.x) common.x
|
EXTRA_DIST += $(dist_man_MANS:.1=.x) common.x
|
||||||
MAINTAINERCLEANFILES += $(dist_man_MANS)
|
MAINTAINERCLEANFILES += $(dist_man_MANS)
|
||||||
|
|
||||||
# Depend on configure.ac to get version number changes.
|
# Depend on configure to get version number changes.
|
||||||
common_dep = $(top_srcdir)/configure.ac $(srcdir)/common.x
|
common_dep = $(top_srcdir)/configure $(srcdir)/common.x
|
||||||
srcsrcdir = $(top_srcdir)/bin
|
srcsrcdir = $(top_srcdir)/bin
|
||||||
$(srcdir)/bison.1: $(common_dep) $(top_srcdir)/src/getargs.c
|
$(srcdir)/bison.1: $(common_dep) $(top_srcdir)/src/getargs.c
|
||||||
|
|
||||||
# Output from --help and --version that must not appear in the man page.
|
|
||||||
neutralize = \
|
|
||||||
perl -0777 -pi -e 's/\.PP\nId:.*\n//g'
|
|
||||||
|
|
||||||
# Differences to ignore when comparing the man page (the date).
|
# Differences to ignore when comparing the man page (the date).
|
||||||
remove_time_stamp = \
|
remove_time_stamp = \
|
||||||
sed 's/^\(\.TH[^"]*"[^"]*"[^"]*\)"[^"]*"/\1/'
|
sed 's/^\(\.TH[^"]*"[^"]*"[^"]*\)"[^"]*"/\1/'
|
||||||
@@ -87,7 +87,6 @@ PREPATH = $(top_builddir)/src
|
|||||||
--include=$*.x \
|
--include=$*.x \
|
||||||
--include=$(srcdir)/common.x \
|
--include=$(srcdir)/common.x \
|
||||||
--output=$@.t `echo '$*' | sed 's,.*/,,'`
|
--output=$@.t `echo '$*' | sed 's,.*/,,'`
|
||||||
$(neutralize) $@.t
|
|
||||||
if $(remove_time_stamp) $@ >$@a.t 2>/dev/null && \
|
if $(remove_time_stamp) $@ >$@a.t 2>/dev/null && \
|
||||||
$(remove_time_stamp) $@.t | cmp $@a.t - >/dev/null 2>&1; then \
|
$(remove_time_stamp) $@.t | cmp $@a.t - >/dev/null 2>&1; then \
|
||||||
touch $@; \
|
touch $@; \
|
||||||
@@ -111,8 +110,7 @@ doc: html
|
|||||||
html-local: Doxyfile
|
html-local: Doxyfile
|
||||||
$(DOXYGEN)
|
$(DOXYGEN)
|
||||||
|
|
||||||
edit = sed -e "s|@ID@|$$Id|" \
|
edit = sed -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
|
||||||
-e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
|
|
||||||
-e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
|
-e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
|
||||||
-e 's,@top_builddir\@,$(top_builddir),g' \
|
-e 's,@top_builddir\@,$(top_builddir),g' \
|
||||||
-e 's,@top_srcdir\@,$(top_srcdir),g'
|
-e 's,@top_srcdir\@,$(top_srcdir),g'
|
||||||
@@ -121,10 +119,7 @@ EXTRA_DIST += Doxyfile.in
|
|||||||
CLEANFILES += Doxyfile
|
CLEANFILES += Doxyfile
|
||||||
# Sed is used to generate Doxyfile from Doxyfile.in instead of
|
# Sed is used to generate Doxyfile from Doxyfile.in instead of
|
||||||
# configure, because the former is way faster than the latter.
|
# configure, because the former is way faster than the latter.
|
||||||
# Moreover, this file is updated whenever ChangeLog is touched: using
|
Doxyfile: $(srcdir)/Doxyfile.in
|
||||||
# sed instead of configure saves us a lot of time.
|
|
||||||
Doxyfile: $(top_srcdir)/ChangeLog $(srcdir)/Doxyfile.in
|
|
||||||
Id=`grep '^\$$Id' $(top_srcdir)/ChangeLog`; \
|
|
||||||
$(edit) $(srcdir)/Doxyfile.in >Doxyfile
|
$(edit) $(srcdir)/Doxyfile.in >Doxyfile
|
||||||
|
|
||||||
CLEANDIRS += html latex
|
CLEANDIRS += html latex
|
||||||
|
|||||||
-197
@@ -1,197 +0,0 @@
|
|||||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36.
|
|
||||||
.TH BISON "1" "May 2008" "bison 2.3b" "User Commands"
|
|
||||||
.SH NAME
|
|
||||||
bison \- GNU Project parser generator (yacc replacement)
|
|
||||||
.SH SYNOPSIS
|
|
||||||
.B bison
|
|
||||||
[\fIOPTION\fR]... \fIFILE\fR
|
|
||||||
.SH DESCRIPTION
|
|
||||||
.I Bison
|
|
||||||
is a parser generator in the style of
|
|
||||||
.IR yacc (1).
|
|
||||||
It should be upwardly compatible with input files designed
|
|
||||||
for
|
|
||||||
.IR yacc .
|
|
||||||
.PP
|
|
||||||
Input files should follow the
|
|
||||||
.I yacc
|
|
||||||
convention of ending in
|
|
||||||
.BR .y .
|
|
||||||
Unlike
|
|
||||||
.IR yacc ,
|
|
||||||
the generated files do not have fixed names, but instead use the prefix
|
|
||||||
of the input file.
|
|
||||||
Moreover, if you need to put
|
|
||||||
.I C++
|
|
||||||
code in the input file, you can end his name by a C++-like extension
|
|
||||||
(.ypp or .y++), then bison will follow your extension to name the
|
|
||||||
output file (.cpp or .c++).
|
|
||||||
For instance, a grammar description file named
|
|
||||||
.B parse.yxx
|
|
||||||
would produce the generated parser in a file named
|
|
||||||
.BR parse.tab.cxx ,
|
|
||||||
instead of
|
|
||||||
.IR yacc 's
|
|
||||||
.B y.tab.c
|
|
||||||
or old
|
|
||||||
.I Bison
|
|
||||||
version's
|
|
||||||
.BR parse.tab.c .
|
|
||||||
.PP
|
|
||||||
This description of the options that can be given to
|
|
||||||
.I bison
|
|
||||||
is adapted from the node
|
|
||||||
.B Invocation
|
|
||||||
in the
|
|
||||||
.B bison.texinfo
|
|
||||||
manual, which should be taken as authoritative.
|
|
||||||
.PP
|
|
||||||
.I Bison
|
|
||||||
supports both traditional single-letter options and mnemonic long
|
|
||||||
option names. Long option names are indicated with
|
|
||||||
.B \-\-
|
|
||||||
instead of
|
|
||||||
.BR \- .
|
|
||||||
Abbreviations for option names are allowed as long as they
|
|
||||||
are unique. When a long option takes an argument, like
|
|
||||||
.BR \-\-file-prefix ,
|
|
||||||
connect the option name and the argument with
|
|
||||||
.BR = .
|
|
||||||
.PP
|
|
||||||
Generate LALR(1) and GLR parsers.
|
|
||||||
.PP
|
|
||||||
Mandatory arguments to long options are mandatory for short options too.
|
|
||||||
The same is true for optional arguments.
|
|
||||||
.SS "Operation modes:"
|
|
||||||
.TP
|
|
||||||
\fB\-h\fR, \fB\-\-help\fR
|
|
||||||
display this help and exit
|
|
||||||
.TP
|
|
||||||
\fB\-V\fR, \fB\-\-version\fR
|
|
||||||
output version information and exit
|
|
||||||
.TP
|
|
||||||
\fB\-\-print\-localedir\fR
|
|
||||||
output directory containing locale\-dependent data
|
|
||||||
.TP
|
|
||||||
\fB\-\-print\-datadir\fR
|
|
||||||
output directory containing skeletons and XSLT
|
|
||||||
.TP
|
|
||||||
\fB\-y\fR, \fB\-\-yacc\fR
|
|
||||||
emulate POSIX Yacc
|
|
||||||
.TP
|
|
||||||
\fB\-W\fR, \fB\-\-warnings\fR=\fI[CATEGORY]\fR
|
|
||||||
report the warnings falling in CATEGORY
|
|
||||||
.SS "Parser:"
|
|
||||||
.TP
|
|
||||||
\fB\-L\fR, \fB\-\-language\fR=\fILANGUAGE\fR
|
|
||||||
specify the output programming language
|
|
||||||
.TP
|
|
||||||
\fB\-S\fR, \fB\-\-skeleton\fR=\fIFILE\fR
|
|
||||||
specify the skeleton to use
|
|
||||||
.TP
|
|
||||||
\fB\-t\fR, \fB\-\-debug\fR
|
|
||||||
instrument the parser for debugging
|
|
||||||
.TP
|
|
||||||
\fB\-\-locations\fR
|
|
||||||
enable locations computation
|
|
||||||
.TP
|
|
||||||
\fB\-p\fR, \fB\-\-name\-prefix\fR=\fIPREFIX\fR
|
|
||||||
prepend PREFIX to the external symbols
|
|
||||||
.TP
|
|
||||||
\fB\-l\fR, \fB\-\-no\-lines\fR
|
|
||||||
don't generate `#line' directives
|
|
||||||
.TP
|
|
||||||
\fB\-k\fR, \fB\-\-token\-table\fR
|
|
||||||
include a table of token names
|
|
||||||
.SS "Output:"
|
|
||||||
.TP
|
|
||||||
\fB\-\-defines\fR[=\fIFILE\fR]
|
|
||||||
also produce a header file
|
|
||||||
.TP
|
|
||||||
\fB\-d\fR
|
|
||||||
likewise but cannot specify FILE (for POSIX Yacc)
|
|
||||||
.TP
|
|
||||||
\fB\-r\fR, \fB\-\-report\fR=\fITHINGS\fR
|
|
||||||
also produce details on the automaton
|
|
||||||
.TP
|
|
||||||
\fB\-\-report\-file\fR=\fIFILE\fR
|
|
||||||
write report to FILE
|
|
||||||
.TP
|
|
||||||
\fB\-v\fR, \fB\-\-verbose\fR
|
|
||||||
same as `\-\-report=state'
|
|
||||||
.TP
|
|
||||||
\fB\-b\fR, \fB\-\-file\-prefix\fR=\fIPREFIX\fR
|
|
||||||
specify a PREFIX for output files
|
|
||||||
.TP
|
|
||||||
\fB\-o\fR, \fB\-\-output\fR=\fIFILE\fR
|
|
||||||
leave output to FILE
|
|
||||||
.TP
|
|
||||||
\fB\-g\fR, \fB\-\-graph\fR[=\fIFILE\fR]
|
|
||||||
also output a graph of the automaton
|
|
||||||
.TP
|
|
||||||
\fB\-x\fR, \fB\-\-xml\fR[=\fIFILE\fR]
|
|
||||||
also output an XML report of the automaton
|
|
||||||
(the XML schema is experimental)
|
|
||||||
.SS "Warning categories include:"
|
|
||||||
.TP
|
|
||||||
`midrule\-values'
|
|
||||||
unset or unused midrule values
|
|
||||||
.TP
|
|
||||||
`yacc'
|
|
||||||
incompatibilities with POSIX YACC
|
|
||||||
.TP
|
|
||||||
`all'
|
|
||||||
all the warnings
|
|
||||||
.TP
|
|
||||||
`no\-CATEGORY'
|
|
||||||
turn off warnings in CATEGORY
|
|
||||||
.TP
|
|
||||||
`none'
|
|
||||||
turn off all the warnings
|
|
||||||
.TP
|
|
||||||
`error'
|
|
||||||
treat warnings as errors
|
|
||||||
.SS "THINGS is a list of comma separated words that can include:"
|
|
||||||
.TP
|
|
||||||
`state'
|
|
||||||
describe the states
|
|
||||||
.TP
|
|
||||||
`itemset'
|
|
||||||
complete the core item sets with their closure
|
|
||||||
.TP
|
|
||||||
`lookahead'
|
|
||||||
explicitly associate lookahead tokens to items
|
|
||||||
.TP
|
|
||||||
`solved'
|
|
||||||
describe shift/reduce conflicts solving
|
|
||||||
.TP
|
|
||||||
`all'
|
|
||||||
include all the above information
|
|
||||||
.TP
|
|
||||||
`none'
|
|
||||||
disable the report
|
|
||||||
.SH AUTHOR
|
|
||||||
Written by Robert Corbett and Richard Stallman.
|
|
||||||
.SH "REPORTING BUGS"
|
|
||||||
Report bugs to <bug\-[email protected]>.
|
|
||||||
.SH COPYRIGHT
|
|
||||||
Copyright \(co 2008 Free Software Foundation, Inc.
|
|
||||||
.br
|
|
||||||
This is free software; see the source for copying conditions. There is NO
|
|
||||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
.SH "SEE ALSO"
|
|
||||||
.BR lex (1),
|
|
||||||
.BR flex (1),
|
|
||||||
.BR yacc (1).
|
|
||||||
.PP
|
|
||||||
The full documentation for
|
|
||||||
.B bison
|
|
||||||
is maintained as a Texinfo manual. If the
|
|
||||||
.B info
|
|
||||||
and
|
|
||||||
.B bison
|
|
||||||
programs are properly installed at your site, the command
|
|
||||||
.IP
|
|
||||||
.B info bison
|
|
||||||
.PP
|
|
||||||
should give you access to the complete manual.
|
|
||||||
+2200
-1151
File diff suppressed because it is too large
Load Diff
+68
-13
@@ -1,12 +1,12 @@
|
|||||||
@c The GNU Free Documentation License.
|
@c The GNU Free Documentation License.
|
||||||
@center Version 1.2, November 2002
|
@center Version 1.3, 3 November 2008
|
||||||
|
|
||||||
@c This file is intended to be included within another document,
|
@c This file is intended to be included within another document,
|
||||||
@c hence no sectioning command or @node.
|
@c hence no sectioning command or @node.
|
||||||
|
|
||||||
@display
|
@display
|
||||||
Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc.
|
Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
|
||||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
@uref{http://fsf.org/}
|
||||||
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
@@ -111,6 +111,9 @@ formats which do not have any title page as such, ``Title Page'' means
|
|||||||
the text near the most prominent appearance of the work's title,
|
the text near the most prominent appearance of the work's title,
|
||||||
preceding the beginning of the body of the text.
|
preceding the beginning of the body of the text.
|
||||||
|
|
||||||
|
The ``publisher'' means any person or entity that distributes copies
|
||||||
|
of the Document to the public.
|
||||||
|
|
||||||
A section ``Entitled XYZ'' means a named subunit of the Document whose
|
A section ``Entitled XYZ'' means a named subunit of the Document whose
|
||||||
title either is precisely XYZ or contains XYZ in parentheses following
|
title either is precisely XYZ or contains XYZ in parentheses following
|
||||||
text that translates XYZ in another language. (Here XYZ stands for a
|
text that translates XYZ in another language. (Here XYZ stands for a
|
||||||
@@ -379,13 +382,30 @@ title.
|
|||||||
@item
|
@item
|
||||||
TERMINATION
|
TERMINATION
|
||||||
|
|
||||||
You may not copy, modify, sublicense, or distribute the Document except
|
You may not copy, modify, sublicense, or distribute the Document
|
||||||
as expressly provided for under this License. Any other attempt to
|
except as expressly provided under this License. Any attempt
|
||||||
copy, modify, sublicense or distribute the Document is void, and will
|
otherwise to copy, modify, sublicense, or distribute it is void, and
|
||||||
automatically terminate your rights under this License. However,
|
will automatically terminate your rights under this License.
|
||||||
parties who have received copies, or rights, from you under this
|
|
||||||
License will not have their licenses terminated so long as such
|
However, if you cease all violation of this License, then your license
|
||||||
parties remain in full compliance.
|
from a particular copyright holder is reinstated (a) provisionally,
|
||||||
|
unless and until the copyright holder explicitly and finally
|
||||||
|
terminates your license, and (b) permanently, if the copyright holder
|
||||||
|
fails to notify you of the violation by some reasonable means prior to
|
||||||
|
60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, receipt of a copy of some or all of the same material does
|
||||||
|
not give you any rights to use it.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
FUTURE REVISIONS OF THIS LICENSE
|
FUTURE REVISIONS OF THIS LICENSE
|
||||||
@@ -403,7 +423,42 @@ following the terms and conditions either of that specified version or
|
|||||||
of any later version that has been published (not as a draft) by the
|
of any later version that has been published (not as a draft) by the
|
||||||
Free Software Foundation. If the Document does not specify a version
|
Free Software Foundation. If the Document does not specify a version
|
||||||
number of this License, you may choose any version ever published (not
|
number of this License, you may choose any version ever published (not
|
||||||
as a draft) by the Free Software Foundation.
|
as a draft) by the Free Software Foundation. If the Document
|
||||||
|
specifies that a proxy can decide which future versions of this
|
||||||
|
License can be used, that proxy's public statement of acceptance of a
|
||||||
|
version permanently authorizes you to choose that version for the
|
||||||
|
Document.
|
||||||
|
|
||||||
|
@item
|
||||||
|
RELICENSING
|
||||||
|
|
||||||
|
``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any
|
||||||
|
World Wide Web server that publishes copyrightable works and also
|
||||||
|
provides prominent facilities for anybody to edit those works. A
|
||||||
|
public wiki that anybody can edit is an example of such a server. A
|
||||||
|
``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the
|
||||||
|
site means any set of copyrightable works thus published on the MMC
|
||||||
|
site.
|
||||||
|
|
||||||
|
``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0
|
||||||
|
license published by Creative Commons Corporation, a not-for-profit
|
||||||
|
corporation with a principal place of business in San Francisco,
|
||||||
|
California, as well as future copyleft versions of that license
|
||||||
|
published by that same organization.
|
||||||
|
|
||||||
|
``Incorporate'' means to publish or republish a Document, in whole or
|
||||||
|
in part, as part of another Document.
|
||||||
|
|
||||||
|
An MMC is ``eligible for relicensing'' if it is licensed under this
|
||||||
|
License, and if all works that were first published under this License
|
||||||
|
somewhere other than this MMC, and subsequently incorporated in whole
|
||||||
|
or in part into the MMC, (1) had no cover texts or invariant sections,
|
||||||
|
and (2) were thus incorporated prior to November 1, 2008.
|
||||||
|
|
||||||
|
The operator of an MMC Site may republish an MMC contained in the site
|
||||||
|
under CC-BY-SA on the same site at any time before August 1, 2009,
|
||||||
|
provided the MMC is eligible for relicensing.
|
||||||
|
|
||||||
@end enumerate
|
@end enumerate
|
||||||
|
|
||||||
@page
|
@page
|
||||||
@@ -417,7 +472,7 @@ license notices just after the title page:
|
|||||||
@group
|
@group
|
||||||
Copyright (C) @var{year} @var{your name}.
|
Copyright (C) @var{year} @var{your name}.
|
||||||
Permission is granted to copy, distribute and/or modify this document
|
Permission is granted to copy, distribute and/or modify this document
|
||||||
under the terms of the GNU Free Documentation License, Version 1.2
|
under the terms of the GNU Free Documentation License, Version 1.3
|
||||||
or any later version published by the Free Software Foundation;
|
or any later version published by the Free Software Foundation;
|
||||||
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
|
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
|
||||||
Texts. A copy of the license is included in the section entitled ``GNU
|
Texts. A copy of the license is included in the section entitled ``GNU
|
||||||
|
|||||||
+1
-1
@@ -19,7 +19,7 @@
|
|||||||
\def\finalout{\overfullrule=0pt}
|
\def\finalout{\overfullrule=0pt}
|
||||||
%\finalout
|
%\finalout
|
||||||
|
|
||||||
% Copyright (c) 1998, 2001 Free Software Foundation, Inc.
|
% Copyright (c) 1998, 2001, 2009-2011 Free Software Foundation, Inc.
|
||||||
%
|
%
|
||||||
% This file is part of Bison.
|
% This file is part of Bison.
|
||||||
%
|
%
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
Makefile
|
|
||||||
Makefile.in
|
|
||||||
bench.pl
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
/Makefile
|
||||||
|
/Makefile.in
|
||||||
|
/bench.pl
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
## Copyright (C) 2006 Free Software Foundation, Inc.
|
## Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+1
-1
@@ -19,7 +19,7 @@ straightforward use of _build/src/bison would.)
|
|||||||
|
|
||||||
--
|
--
|
||||||
|
|
||||||
Copyright (C) 2006 Free Software Foundation, Inc.
|
Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of Bison, the GNU Compiler Compiler.
|
This file is part of Bison, the GNU Compiler Compiler.
|
||||||
|
|
||||||
|
|||||||
+4
-6
@@ -1,6 +1,6 @@
|
|||||||
#! /usr/bin/perl -w
|
#! /usr/bin/perl -w
|
||||||
|
|
||||||
# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
|
# Copyright (C) 2006, 2008-2011 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is part of Bison, the GNU Compiler Compiler.
|
# This file is part of Bison, the GNU Compiler Compiler.
|
||||||
#
|
#
|
||||||
@@ -270,9 +270,7 @@ yylex (void)
|
|||||||
|
|
||||||
/* Skip white space. */
|
/* Skip white space. */
|
||||||
while ((c = get_char ()) == ' ' || c == '\t')
|
while ((c = get_char ()) == ' ' || c == '\t')
|
||||||
{
|
continue;
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/* process numbers */
|
/* process numbers */
|
||||||
if (c == '.' || isdigit (c))
|
if (c == '.' || isdigit (c))
|
||||||
@@ -345,8 +343,8 @@ sub bench_grammar ($)
|
|||||||
(
|
(
|
||||||
"pull-impure" => '',
|
"pull-impure" => '',
|
||||||
"pull-pure" => '%define api.pure',
|
"pull-pure" => '%define api.pure',
|
||||||
"push-impure" => '%define api.push_pull "both"',
|
"push-impure" => '%define api.push-pull "both"',
|
||||||
"push-pure" => '%define api.push_pull "both" %define api.pure',
|
"push-pure" => '%define api.push-pull "both" %define api.pure',
|
||||||
);
|
);
|
||||||
|
|
||||||
my %bench;
|
my %bench;
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
/Makefile
|
||||||
|
/Makefile.in
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||||
## Copyright (C) 2005 Free Software Foundation, Inc.
|
## Copyright (C) 2005, 2009-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
*.cc
|
|
||||||
*.hh
|
|
||||||
*.ll
|
|
||||||
*.output
|
|
||||||
*.stamp
|
|
||||||
*.tmp
|
|
||||||
*.yy
|
|
||||||
.deps
|
|
||||||
Makefile
|
|
||||||
Makefile.in
|
|
||||||
calc++
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
/*.cc
|
||||||
|
/*.hh
|
||||||
|
/*.ll
|
||||||
|
/*.o
|
||||||
|
/*.output
|
||||||
|
/*.stamp
|
||||||
|
/*.tmp
|
||||||
|
/*.yy
|
||||||
|
/.deps
|
||||||
|
/Makefile
|
||||||
|
/Makefile.in
|
||||||
|
/calc++
|
||||||
|
/calc++.exe
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||||
## Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
## Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -31,12 +31,16 @@ $(BISON): $(BISON_IN)
|
|||||||
doc = $(top_srcdir)/doc/bison.texinfo
|
doc = $(top_srcdir)/doc/bison.texinfo
|
||||||
extexi = $(top_srcdir)/examples/extexi
|
extexi = $(top_srcdir)/examples/extexi
|
||||||
# Extract in src.
|
# Extract in src.
|
||||||
$(calc_extracted): $(doc) $(extexi)
|
$(srcdir)/calc.stamp: $(doc) $(extexi)
|
||||||
|
rm -f $@ $@.tmp
|
||||||
|
touch $@.tmp
|
||||||
cd $(srcdir) && \
|
cd $(srcdir) && \
|
||||||
$(AWK) -f ../extexi -v VERSION="$(VERSION)" \
|
$(AWK) -f ../extexi -v VERSION="$(VERSION)" \
|
||||||
../../doc/bison.texinfo -- calc++-parser.yy \
|
../../doc/bison.texinfo -- calc++-parser.yy \
|
||||||
calc++-scanner.ll calc++.cc calc++-driver.hh calc++-driver.cc
|
calc++-scanner.ll calc++.cc calc++-driver.hh calc++-driver.cc
|
||||||
|
mv $@.tmp $@
|
||||||
|
|
||||||
|
$(calc_extracted): $(srcdir)/calc.stamp
|
||||||
|
|
||||||
## ------------------- ##
|
## ------------------- ##
|
||||||
## Parser generation. ##
|
## Parser generation. ##
|
||||||
@@ -50,7 +54,10 @@ MAINTAINERCLEANFILES = $(srcdir)/*.stamp $(BUILT_SOURCES)
|
|||||||
# Compile the parser and save cycles.
|
# Compile the parser and save cycles.
|
||||||
# This code comes from "Handling Tools that Produce Many Outputs",
|
# This code comes from "Handling Tools that Produce Many Outputs",
|
||||||
# from the Automake documentation.
|
# from the Automake documentation.
|
||||||
EXTRA_DIST = $(srcdir)/calc++-parser.stamp $(srcdir)/calc++-parser.yy
|
EXTRA_DIST = \
|
||||||
|
$(srcdir)/calc++-parser.stamp \
|
||||||
|
$(srcdir)/calc++-parser.yy \
|
||||||
|
$(srcdir)/calc.stamp
|
||||||
# Don't depend on $(BISON) otherwise we would rebuild these files
|
# Don't depend on $(BISON) otherwise we would rebuild these files
|
||||||
# in srcdir, including during distcheck, which is forbidden.
|
# in srcdir, including during distcheck, which is forbidden.
|
||||||
$(srcdir)/calc++-parser.stamp: $(srcdir)/calc++-parser.yy $(BISON_IN)
|
$(srcdir)/calc++-parser.stamp: $(srcdir)/calc++-parser.yy $(BISON_IN)
|
||||||
|
|||||||
+3
-1
@@ -1,7 +1,9 @@
|
|||||||
# Extract all examples from the manual source. -*- AWK -*-
|
# Extract all examples from the manual source. -*- AWK -*-
|
||||||
|
|
||||||
# This file is part of GNU Bison
|
# This file is part of GNU Bison
|
||||||
# Copyright 1992, 2000, 2001, 2005, 2006 Free Software Foundation, Inc.
|
|
||||||
|
# Copyright (C) 1992, 2000-2001, 2005-2006, 2009-2011 Free Software
|
||||||
|
# Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
external: gnulib
|
||||||
Submodule
+1
Submodule gnulib added at eff4c0360a
-103
@@ -1,103 +0,0 @@
|
|||||||
.deps
|
|
||||||
Makefile
|
|
||||||
Makefile.in
|
|
||||||
argmatch.c
|
|
||||||
argmatch.h
|
|
||||||
basename.c
|
|
||||||
c-ctype.c
|
|
||||||
c-ctype.h
|
|
||||||
c-strcase.h
|
|
||||||
c-strcasecmp.c
|
|
||||||
c-strncasecmp.c
|
|
||||||
charset.alias
|
|
||||||
config.charset
|
|
||||||
config.h
|
|
||||||
config.hin
|
|
||||||
configmake.h
|
|
||||||
dirname.c
|
|
||||||
dirname.h
|
|
||||||
dup-safer.c
|
|
||||||
error.c
|
|
||||||
error.h
|
|
||||||
exitfail.c
|
|
||||||
exitfail.h
|
|
||||||
fd-safer.c
|
|
||||||
fopen-safer.c
|
|
||||||
getopt.c
|
|
||||||
getopt.h
|
|
||||||
getopt.in.h
|
|
||||||
getopt1.c
|
|
||||||
getopt_.h
|
|
||||||
getopt_int.h
|
|
||||||
gettext.h
|
|
||||||
gnulib.mk
|
|
||||||
hash.c
|
|
||||||
hash.h
|
|
||||||
intprops.h
|
|
||||||
inttypes.h
|
|
||||||
inttypes.in.h
|
|
||||||
inttypes_.h
|
|
||||||
localcharset.c
|
|
||||||
localcharset.h
|
|
||||||
malloc.c
|
|
||||||
mbswidth.c
|
|
||||||
mbswidth.h
|
|
||||||
obstack.c
|
|
||||||
obstack.h
|
|
||||||
pipe-safer.c
|
|
||||||
quote.c
|
|
||||||
quote.h
|
|
||||||
quotearg.c
|
|
||||||
quotearg.h
|
|
||||||
ref-add.sed
|
|
||||||
ref-add.sin
|
|
||||||
ref-del.sed
|
|
||||||
ref-del.sin
|
|
||||||
stamp-h1
|
|
||||||
stdbool.h
|
|
||||||
stdbool.in.h
|
|
||||||
stdbool_.h
|
|
||||||
stdint.h
|
|
||||||
stdint.in.h
|
|
||||||
stdint_.h
|
|
||||||
stdio--.h
|
|
||||||
stdio-safer.h
|
|
||||||
stdlib.h
|
|
||||||
stdlib.in.h
|
|
||||||
stdlib_.h
|
|
||||||
stpcpy.c
|
|
||||||
streq.h
|
|
||||||
strerror.c
|
|
||||||
string.h
|
|
||||||
string.in.h
|
|
||||||
string_.h
|
|
||||||
stripslash.c
|
|
||||||
strndup.c
|
|
||||||
strnlen.c
|
|
||||||
strtol.c
|
|
||||||
strtoul.c
|
|
||||||
strverscmp.c
|
|
||||||
strverscmp.h
|
|
||||||
unistd--.h
|
|
||||||
unistd-safer.h
|
|
||||||
unistd.h
|
|
||||||
unistd.in.h
|
|
||||||
unistd_.h
|
|
||||||
unitypes.h
|
|
||||||
uniwidth
|
|
||||||
uniwidth.h
|
|
||||||
unlocked-io.h
|
|
||||||
verify.h
|
|
||||||
wchar.h
|
|
||||||
wchar.in.h
|
|
||||||
wchar_.h
|
|
||||||
wctype.h
|
|
||||||
wctype.in.h
|
|
||||||
wctype_.h
|
|
||||||
wcwidth.c
|
|
||||||
wcwidth.h
|
|
||||||
xalloc-die.c
|
|
||||||
xalloc.h
|
|
||||||
xmalloc.c
|
|
||||||
xstrndup.c
|
|
||||||
xstrndup.h
|
|
||||||
+245
@@ -0,0 +1,245 @@
|
|||||||
|
|
||||||
|
/*.a
|
||||||
|
/*.bak
|
||||||
|
/*.o
|
||||||
|
/*~
|
||||||
|
/.deps
|
||||||
|
/.dirstamp
|
||||||
|
/Makefile
|
||||||
|
/Makefile.in
|
||||||
|
/alignof.h
|
||||||
|
/alloca.h
|
||||||
|
/alloca.in.h
|
||||||
|
/arg-nonnull.h
|
||||||
|
/argmatch.c
|
||||||
|
/argmatch.h
|
||||||
|
/asnprintf.c
|
||||||
|
/basename-lgpl.c
|
||||||
|
/basename.c
|
||||||
|
/binary-io.h
|
||||||
|
/bitrotate.h
|
||||||
|
/c++defs.h
|
||||||
|
/c-ctype.c
|
||||||
|
/c-ctype.h
|
||||||
|
/c-strcase.h
|
||||||
|
/c-strcasecmp.c
|
||||||
|
/c-strncasecmp.c
|
||||||
|
/calloc.c
|
||||||
|
/charset.alias
|
||||||
|
/cloexec.c
|
||||||
|
/cloexec.h
|
||||||
|
/close-hook.c
|
||||||
|
/close-hook.h
|
||||||
|
/close.c
|
||||||
|
/config.charset
|
||||||
|
/config.h
|
||||||
|
/config.hin
|
||||||
|
/configmake.h
|
||||||
|
/dirname-lgpl.c
|
||||||
|
/dirname.c
|
||||||
|
/dirname.h
|
||||||
|
/dosname.h
|
||||||
|
/dup-safer-flag.c
|
||||||
|
/dup-safer.c
|
||||||
|
/dup2.c
|
||||||
|
/errno.h
|
||||||
|
/errno.in.h
|
||||||
|
/error.c
|
||||||
|
/error.h
|
||||||
|
/exitfail.c
|
||||||
|
/exitfail.h
|
||||||
|
/fatal-signal.c
|
||||||
|
/fatal-signal.h
|
||||||
|
/fclose.c
|
||||||
|
/fcntl.c
|
||||||
|
/fcntl.h
|
||||||
|
/fcntl.in.h
|
||||||
|
/fd-safer-flag.c
|
||||||
|
/fd-safer.c
|
||||||
|
/float+.h
|
||||||
|
/float.h
|
||||||
|
/float.in.h
|
||||||
|
/fopen-safer.c
|
||||||
|
/fopen.c
|
||||||
|
/fprintf.c
|
||||||
|
/fpucw.h
|
||||||
|
/frexp.c
|
||||||
|
/frexpl.c
|
||||||
|
/fseterr.c
|
||||||
|
/fseterr.h
|
||||||
|
/getdtablesize.c
|
||||||
|
/getopt.c
|
||||||
|
/getopt.h
|
||||||
|
/getopt.in.h
|
||||||
|
/getopt1.c
|
||||||
|
/getopt_int.h
|
||||||
|
/gettext.h
|
||||||
|
/gnulib.mk
|
||||||
|
/hash.c
|
||||||
|
/hash.h
|
||||||
|
/intprops.h
|
||||||
|
/inttypes.h
|
||||||
|
/inttypes.in.h
|
||||||
|
/ioctl.c
|
||||||
|
/isnan.c
|
||||||
|
/isnand-nolibm.h
|
||||||
|
/isnand.c
|
||||||
|
/isnanf-nolibm.h
|
||||||
|
/isnanf.c
|
||||||
|
/isnanl-nolibm.h
|
||||||
|
/isnanl.c
|
||||||
|
/iswblank.c
|
||||||
|
/ldexpl.c
|
||||||
|
/localcharset.c
|
||||||
|
/localcharset.h
|
||||||
|
/malloc.c
|
||||||
|
/math.h
|
||||||
|
/math.in.h
|
||||||
|
/mbchar.c
|
||||||
|
/mbchar.h
|
||||||
|
/mbrtowc.c
|
||||||
|
/mbschr.c
|
||||||
|
/mbsinit.c
|
||||||
|
/mbsrchr.c
|
||||||
|
/mbswidth.c
|
||||||
|
/mbswidth.h
|
||||||
|
/mbuiter.h
|
||||||
|
/memchr.c
|
||||||
|
/memchr.valgrind
|
||||||
|
/nonblocking.c
|
||||||
|
/nonblocking.h
|
||||||
|
/obstack.c
|
||||||
|
/obstack.h
|
||||||
|
/open.c
|
||||||
|
/perror.c
|
||||||
|
/pipe-safer.c
|
||||||
|
/pipe.c
|
||||||
|
/pipe2-safer.c
|
||||||
|
/pipe2.c
|
||||||
|
/printf-args.c
|
||||||
|
/printf-args.h
|
||||||
|
/printf-frexp.c
|
||||||
|
/printf-frexp.h
|
||||||
|
/printf-frexpl.c
|
||||||
|
/printf-frexpl.h
|
||||||
|
/printf-parse.c
|
||||||
|
/printf-parse.h
|
||||||
|
/printf.c
|
||||||
|
/quote.c
|
||||||
|
/quote.h
|
||||||
|
/quotearg.c
|
||||||
|
/quotearg.h
|
||||||
|
/rawmemchr.c
|
||||||
|
/rawmemchr.valgrind
|
||||||
|
/realloc.c
|
||||||
|
/ref-add.sed
|
||||||
|
/ref-add.sin
|
||||||
|
/ref-del.sed
|
||||||
|
/ref-del.sin
|
||||||
|
/sched.h
|
||||||
|
/sched.in.h
|
||||||
|
/sig-handler.h
|
||||||
|
/sigaction.c
|
||||||
|
/signal.h
|
||||||
|
/signal.in.h
|
||||||
|
/signbitd.c
|
||||||
|
/signbitf.c
|
||||||
|
/signbitl.c
|
||||||
|
/sigprocmask.c
|
||||||
|
/size_max.h
|
||||||
|
/snprintf.c
|
||||||
|
/spawn-pipe.c
|
||||||
|
/spawn-pipe.h
|
||||||
|
/spawn.h
|
||||||
|
/spawn.in.h
|
||||||
|
/spawn_faction_addclose.c
|
||||||
|
/spawn_faction_adddup2.c
|
||||||
|
/spawn_faction_addopen.c
|
||||||
|
/spawn_faction_destroy.c
|
||||||
|
/spawn_faction_init.c
|
||||||
|
/spawn_int.h
|
||||||
|
/spawnattr_destroy.c
|
||||||
|
/spawnattr_init.c
|
||||||
|
/spawnattr_setflags.c
|
||||||
|
/spawnattr_setsigmask.c
|
||||||
|
/spawni.c
|
||||||
|
/spawnp.c
|
||||||
|
/sprintf.c
|
||||||
|
/stamp-h1
|
||||||
|
/stat.c
|
||||||
|
/stdbool.h
|
||||||
|
/stdbool.in.h
|
||||||
|
/stddef.h
|
||||||
|
/stddef.in.h
|
||||||
|
/stdint.h
|
||||||
|
/stdint.in.h
|
||||||
|
/stdio--.h
|
||||||
|
/stdio-impl.h
|
||||||
|
/stdio-safer.h
|
||||||
|
/stdio-write.c
|
||||||
|
/stdio.h
|
||||||
|
/stdio.in.h
|
||||||
|
/stdlib.h
|
||||||
|
/stdlib.in.h
|
||||||
|
/stpcpy.c
|
||||||
|
/strchrnul.c
|
||||||
|
/strchrnul.valgrind
|
||||||
|
/strdup.c
|
||||||
|
/streq.h
|
||||||
|
/strerror.c
|
||||||
|
/string.h
|
||||||
|
/string.in.h
|
||||||
|
/stripslash.c
|
||||||
|
/strndup.c
|
||||||
|
/strnlen.c
|
||||||
|
/strnlen1.c
|
||||||
|
/strnlen1.h
|
||||||
|
/strtol.c
|
||||||
|
/strtoul.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_wait.h
|
||||||
|
/sys_wait.in.h
|
||||||
|
/time.h
|
||||||
|
/time.in.h
|
||||||
|
/unistd--.h
|
||||||
|
/unistd-safer.h
|
||||||
|
/unistd.h
|
||||||
|
/unistd.in.h
|
||||||
|
/unitypes.h
|
||||||
|
/unitypes.in.h
|
||||||
|
/uniwidth
|
||||||
|
/uniwidth.h
|
||||||
|
/uniwidth.in.h
|
||||||
|
/unlocked-io.h
|
||||||
|
/unsetenv.c
|
||||||
|
/vasnprintf.c
|
||||||
|
/vasnprintf.h
|
||||||
|
/verify.h
|
||||||
|
/vfprintf.c
|
||||||
|
/vsnprintf.c
|
||||||
|
/vsprintf.c
|
||||||
|
/w32sock.h
|
||||||
|
/w32spawn.h
|
||||||
|
/wait-process.c
|
||||||
|
/wait-process.h
|
||||||
|
/waitpid.c
|
||||||
|
/warn-on-use.h
|
||||||
|
/wchar.h
|
||||||
|
/wchar.in.h
|
||||||
|
/wctype.h
|
||||||
|
/wctype.in.h
|
||||||
|
/wcwidth.c
|
||||||
|
/xalloc-die.c
|
||||||
|
/xalloc.h
|
||||||
|
/xmalloc.c
|
||||||
|
/xsize.h
|
||||||
|
/xstrndup.c
|
||||||
|
/xstrndup.h
|
||||||
|
|
||||||
+3
-3
@@ -1,6 +1,7 @@
|
|||||||
# Make bison/lib.
|
# Make bison/lib.
|
||||||
|
|
||||||
# Copyright (C) 2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
|
# Copyright (C) 2001-2004, 2006, 2008-2011 Free Software Foundation,
|
||||||
|
# Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -17,7 +18,7 @@
|
|||||||
|
|
||||||
include gnulib.mk
|
include gnulib.mk
|
||||||
|
|
||||||
AM_CFLAGS = $(WARNING_CFLAGS)
|
AM_CFLAGS += $(WARN_CFLAGS)
|
||||||
|
|
||||||
# Implementation of bitsets.
|
# Implementation of bitsets.
|
||||||
bitsets_sources = \
|
bitsets_sources = \
|
||||||
@@ -36,7 +37,6 @@ timevars_sources = \
|
|||||||
# Non-gnulib sources in Bison's internal library.
|
# Non-gnulib sources in Bison's internal library.
|
||||||
libbison_a_SOURCES += \
|
libbison_a_SOURCES += \
|
||||||
get-errno.h get-errno.c \
|
get-errno.h get-errno.c \
|
||||||
subpipe.h subpipe.c \
|
|
||||||
$(bitsets_sources) $(additional_bitsets_sources) $(timevars_sources)
|
$(bitsets_sources) $(additional_bitsets_sources) $(timevars_sources)
|
||||||
|
|
||||||
# The Yacc compatibility library.
|
# The Yacc compatibility library.
|
||||||
|
|||||||
+4
-1
@@ -1,5 +1,8 @@
|
|||||||
/* Array bitsets.
|
/* Array bitsets.
|
||||||
Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2002-2003, 2006, 2009-2011 Free Software Foundation,
|
||||||
|
Inc.
|
||||||
|
|
||||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
|||||||
+3
-1
@@ -1,5 +1,7 @@
|
|||||||
/* Functions to support abitsets.
|
/* Functions to support abitsets.
|
||||||
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2002, 2004, 2009-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
|||||||
+4
-1
@@ -1,5 +1,8 @@
|
|||||||
/* Base bitset stuff.
|
/* Base bitset stuff.
|
||||||
Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2002-2004, 2006, 2009-2011 Free Software Foundation,
|
||||||
|
Inc.
|
||||||
|
|
||||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
|||||||
+3
-1
@@ -1,5 +1,7 @@
|
|||||||
/* General bitsets.
|
/* General bitsets.
|
||||||
Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
|||||||
+3
-1
@@ -1,5 +1,7 @@
|
|||||||
/* Generic bitsets.
|
/* Generic bitsets.
|
||||||
Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2002-2004, 2009-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
|||||||
+3
-1
@@ -1,5 +1,7 @@
|
|||||||
/* Bitset statistics.
|
/* Bitset statistics.
|
||||||
Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
|||||||
+3
-1
@@ -1,5 +1,7 @@
|
|||||||
/* Functions to support bitset statistics.
|
/* Functions to support bitset statistics.
|
||||||
Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2002-2004, 2009-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
|||||||
+3
-1
@@ -1,5 +1,7 @@
|
|||||||
/* Bitset vectors.
|
/* Bitset vectors.
|
||||||
Copyright (C) 2001, 2002, 2004, 2006 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2001-2002, 2004, 2006, 2009-2011 Free Software
|
||||||
|
Foundation, Inc.
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+3
-1
@@ -1,5 +1,7 @@
|
|||||||
/* Bitset vectors.
|
/* Bitset vectors.
|
||||||
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2002, 2004, 2009-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Contributed by Akim Demaille (akim@freefriends.org).
|
Contributed by Akim Demaille (akim@freefriends.org).
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
|||||||
+3
-1
@@ -1,5 +1,7 @@
|
|||||||
/* Bitset vectors.
|
/* Bitset vectors.
|
||||||
Copyright (C) 2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2001-2002, 2004-2006, 2009-2011 Free Software
|
||||||
|
Foundation, Inc.
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+3
-1
@@ -1,5 +1,7 @@
|
|||||||
/* Bitset vectors.
|
/* Bitset vectors.
|
||||||
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2002, 2004, 2009-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
|||||||
+3
-1
@@ -1,5 +1,7 @@
|
|||||||
/* Functions to support expandable bitsets.
|
/* Functions to support expandable bitsets.
|
||||||
Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
|||||||
+3
-1
@@ -1,5 +1,7 @@
|
|||||||
/* Functions to support ebitsets.
|
/* Functions to support ebitsets.
|
||||||
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2002, 2004, 2009-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
/* get-errno.c - get and set errno.
|
/* get-errno.c - get and set errno.
|
||||||
|
|
||||||
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
|
Copyright (C) 2002, 2006, 2009-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user