mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-08-14 21:25:14 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f5109f5af0 | ||
|
|
1bd0dedaaa | ||
|
|
c1432f6538 | ||
|
|
cf147260d2 | ||
|
|
3a73c9ae44 | ||
|
|
dbcdae2d04 | ||
|
|
70d8f2910e | ||
|
|
d110145422 | ||
|
|
ae199bf10f | ||
|
|
b47dbebee5 | ||
|
|
94306d5282 | ||
|
|
00292f6611 | ||
|
|
c89b4c032c | ||
|
|
d83a9c402c | ||
|
|
55f64b82cd | ||
|
|
127287e9c4 | ||
|
|
48b16bbc04 | ||
|
|
a420f9620e | ||
|
|
fa4d969f11 | ||
|
|
326eb46f40 | ||
|
|
7812f29985 | ||
|
|
7e7b77c138 | ||
|
|
9d5b26c682 | ||
|
|
42a6501d1a | ||
|
|
5b4aaf787b | ||
|
|
b5240ba555 | ||
|
|
ef9a1fafaf | ||
|
|
a4cf101a98 | ||
|
|
e6efa9dacc | ||
|
|
adc90f13ab | ||
|
|
15d29c1ffe | ||
|
|
6250acbdb1 | ||
|
|
ec5d1a8a24 | ||
|
|
dd5f2af2bd | ||
|
|
eab522e49a | ||
|
|
fe3816515c | ||
|
|
19e251af0f | ||
|
|
f9315de5a4 | ||
|
|
1fb38e78c2 | ||
|
|
ca5d201376 | ||
|
|
3d54b57635 | ||
|
|
d53ae497dc | ||
|
|
3bc00d6c4b | ||
|
|
e0045d49b6 | ||
|
|
fc01665ea5 | ||
|
|
57beea5776 | ||
|
|
5f3df3960e | ||
|
|
040984073a | ||
|
|
135bc829bd | ||
|
|
f938a7e7b8 | ||
|
|
f38b17c9bf | ||
|
|
aacbb77a75 | ||
|
|
89519adfbe | ||
|
|
26a69b31fa | ||
|
|
a9401edbf5 | ||
|
|
b3d0c7a208 | ||
|
|
1d0737fa58 | ||
|
|
1eeda0abd5 | ||
|
|
4ff8b7f7c9 | ||
|
|
6d07bacfc0 | ||
|
|
141f57937b | ||
|
|
0ffda36340 | ||
|
|
3922956abd | ||
|
|
9cbfdc9e01 | ||
|
|
9e0876fb0c | ||
|
|
49b1cf794d | ||
|
|
6fdb09caac | ||
|
|
dc9701e848 | ||
|
|
802b9687d0 | ||
|
|
ab703f2c9b | ||
|
|
0fab8d7b36 | ||
|
|
df9a1ba4de | ||
|
|
d11e0cfa89 | ||
|
|
258b75caaa | ||
|
|
6088a2a04d | ||
|
|
4cf31ef8e7 | ||
|
|
1a05945136 | ||
|
|
a778f668a1 | ||
|
|
8c27717915 | ||
|
|
97460c7864 | ||
|
|
9662b51284 | ||
|
|
30757c8c93 | ||
|
|
ac8c5689f8 | ||
|
|
6100a9aa2e | ||
|
|
67fd79c427 | ||
|
|
15f40952f7 | ||
|
|
c70fdfcd20 | ||
|
|
e2688cd96e | ||
|
|
1beb0b24f3 | ||
|
|
a22ff96f32 | ||
|
|
31d7addbf5 | ||
|
|
f32c66b5f4 | ||
|
|
71206cce8e | ||
|
|
d741bd1bfd | ||
|
|
0410a6e0cc | ||
|
|
a7db4add01 | ||
|
|
d2aaf69e73 | ||
|
|
eb520e4cc0 | ||
|
|
baf785db2e | ||
|
|
f7ab6a5010 | ||
|
|
22dda0f004 | ||
|
|
82b248ada6 | ||
|
|
2cbd078f51 | ||
|
|
1c02d4bfbf | ||
|
|
716f248dcd | ||
|
|
867a3e0085 | ||
|
|
fa0e93148c | ||
|
|
e054b19038 | ||
|
|
5f6da1c0f8 | ||
|
|
407d4a75bb | ||
|
|
34160ec4ec | ||
|
|
6770ae09d3 | ||
|
|
b34d96c1c3 | ||
|
|
c3d5a4a783 | ||
|
|
828c373b6d | ||
|
|
fd2df2ede4 | ||
|
|
63cb01d656 | ||
|
|
1c59e0a121 | ||
|
|
8a0adb0183 | ||
|
|
12545799f9 | ||
|
|
99be023555 | ||
|
|
0ffd4fd1a2 | ||
|
|
0925ebb4fa | ||
|
|
43d3b66471 | ||
|
|
73e561d51a | ||
|
|
3062864d2c | ||
|
|
681c331d2c | ||
|
|
989b5b8e3d | ||
|
|
4b43d40257 | ||
|
|
bedf57f515 | ||
|
|
4d1801f1a8 | ||
|
|
85ac3861e7 | ||
|
|
b94a9e1ed1 | ||
|
|
009ce67dbe | ||
|
|
f2a97c6294 | ||
|
|
c8775f9398 | ||
|
|
3ea5f0ec81 | ||
|
|
51c30d2144 | ||
|
|
ad7458633d | ||
|
|
010f91c341 | ||
|
|
bd134904da | ||
|
|
cea1469d47 | ||
|
|
5e6f62f2f1 | ||
|
|
0fb669f9d6 | ||
|
|
51f4735e22 | ||
|
|
7768896a25 | ||
|
|
80ce3401e9 | ||
|
|
b9c9f76197 | ||
|
|
9f666b5106 | ||
|
|
c19683bb19 | ||
|
|
ba20a26459 | ||
|
|
72f000b088 | ||
|
|
1094323fe4 | ||
|
|
f79b4f5ce1 | ||
|
|
2ce37586de | ||
|
|
ca407bdf9d | ||
|
|
506ffb1f74 | ||
|
|
ffc9da3a52 | ||
|
|
1ce590705a | ||
|
|
a749a69501 | ||
|
|
e8fd72d5bb | ||
|
|
e59adf8f04 | ||
|
|
8fb1053bfe | ||
|
|
4f136612d9 | ||
|
|
ff498c4aed | ||
|
|
65211d70bc | ||
|
|
72d848c21d | ||
|
|
9577fb1f47 | ||
|
|
f508a6a0d6 | ||
|
|
a2599d0fc2 | ||
|
|
727e8b0bde | ||
|
|
4b3017faf2 | ||
|
|
78b178f716 | ||
|
|
baf073c6c5 | ||
|
|
7296e729ce | ||
|
|
7cf96b1a9e | ||
|
|
05ac60f348 | ||
|
|
080e734812 | ||
|
|
7eb453acd5 | ||
|
|
3a4f411faa | ||
|
|
4c04c52a9d | ||
|
|
a730d142be | ||
|
|
a61e1620e7 | ||
|
|
e4f85c39b2 | ||
|
|
9ec93868c1 | ||
|
|
d46c3fc694 | ||
|
|
d6d67dbdcb | ||
|
|
73ce7e7e63 | ||
|
|
f8b30d02ec | ||
|
|
2e72b98ed8 | ||
|
|
a8999f947d | ||
|
|
ccf830a458 | ||
|
|
9b9642fca4 | ||
|
|
e0d634e5c3 | ||
|
|
e62f1a8991 | ||
|
|
7bbc8cb035 | ||
|
|
38989c080e | ||
|
|
b4fb989f02 | ||
|
|
08b770bc1b | ||
|
|
cb530ce9e2 | ||
|
|
e105489549 | ||
|
|
95f22ad2a7 | ||
|
|
d229d15c76 | ||
|
|
deb63d8117 | ||
|
|
ecadd90f94 | ||
|
|
419ab1055e | ||
|
|
213744b51e | ||
|
|
b47217154a | ||
|
|
c7a65b99a6 | ||
|
|
249d3236d0 | ||
|
|
d521d95a3d | ||
|
|
987cc1fb28 | ||
|
|
7ec5ab2e48 | ||
|
|
08fe02d9fc | ||
|
|
6201a1a70f | ||
|
|
f1bbfccee2 | ||
|
|
1821246647 | ||
|
|
010c0266ef | ||
|
|
592fde9564 | ||
|
|
508a43be8c |
@@ -7,9 +7,15 @@ INSTALL
|
|||||||
Makefile
|
Makefile
|
||||||
Makefile.in
|
Makefile.in
|
||||||
_*
|
_*
|
||||||
|
a.exe
|
||||||
|
a.out
|
||||||
aclocal.m4
|
aclocal.m4
|
||||||
autom4te.cache
|
autom4te.cache
|
||||||
|
b.out
|
||||||
bison-*
|
bison-*
|
||||||
|
build-aux
|
||||||
|
conf[0-9]*
|
||||||
|
confdefs*
|
||||||
config.cache
|
config.cache
|
||||||
config.h
|
config.h
|
||||||
config.hin
|
config.hin
|
||||||
@@ -17,6 +23,7 @@ config.log
|
|||||||
config.status
|
config.status
|
||||||
configure
|
configure
|
||||||
configure.lineno
|
configure.lineno
|
||||||
|
conftest*
|
||||||
intl
|
intl
|
||||||
patches
|
patches
|
||||||
releases
|
releases
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
Version 2, June 1991
|
Version 2, June 1991
|
||||||
|
|
||||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
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.
|
||||||
|
|
||||||
@@ -305,7 +305,7 @@ the "copyright" line and a pointer to where the full notice is found.
|
|||||||
|
|
||||||
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, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
@@ -313,7 +313,7 @@ Also add information on how to contact you by electronic and paper mail.
|
|||||||
If the program is interactive, make it output a short notice like this
|
If the program is interactive, make it output a short notice like this
|
||||||
when it starts in an interactive mode:
|
when it starts in an interactive mode:
|
||||||
|
|
||||||
Gnomovision version 69, Copyright (C) year name of author
|
Gnomovision version 69, Copyright (C) year name of author
|
||||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
This is free software, and you are welcome to redistribute it
|
This is free software, and you are welcome to redistribute it
|
||||||
under certain conditions; type `show c' for details.
|
under certain conditions; type `show c' for details.
|
||||||
|
|||||||
+1
-1
@@ -18,7 +18,7 @@
|
|||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License along
|
# You should have received a copy of the GNU General Public License along
|
||||||
# with this program; if not, write to the Free Software Foundation, Inc.,
|
# with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
# Systems where /bin/sh is not the default shell need this. The $(shell)
|
# 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.
|
# command below won't work with e.g. stock DOS/Windows shells.
|
||||||
|
|||||||
@@ -131,5 +131,5 @@ 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 GNU Bison; see the file COPYING. If not, write to the Free
|
along with GNU Bison; see the file COPYING. If not, write to the Free
|
||||||
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
02111-1307, USA.
|
02110-1301, USA.
|
||||||
|
|||||||
+10
-5
@@ -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) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
## Copyright (C) 2001, 2002, 2003, 2004, 2005 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
|
||||||
@@ -13,14 +13,19 @@
|
|||||||
|
|
||||||
## 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, write to the Free Software
|
## along with this program; if not, write to the Free Software
|
||||||
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
## 02111-1307 USA
|
## 02110-1301 USA
|
||||||
|
|
||||||
ACLOCAL_AMFLAGS = -I m4
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
|
|
||||||
SUBDIRS = config po lib data src doc tests
|
SUBDIRS = config po runtime-po lib data src doc examples tests
|
||||||
|
|
||||||
EXTRA_DIST = REFERENCES OChangeLog Makefile.maint GNUmakefile Makefile.cfg
|
# Files installed for use by Automake.
|
||||||
|
aclocaldir = @aclocaldir@
|
||||||
|
aclocal_DATA = m4/bison-i18n.m4
|
||||||
|
|
||||||
|
EXTRA_DIST = GNUmakefile Makefile.cfg Makefile.maint \
|
||||||
|
OChangeLog PACKAGING
|
||||||
|
|
||||||
.PHONY: maintainer-check
|
.PHONY: maintainer-check
|
||||||
maintainer-check:
|
maintainer-check:
|
||||||
|
|||||||
+2
-3
@@ -13,11 +13,10 @@
|
|||||||
|
|
||||||
# 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, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
# 02111-1307, USA.
|
# 02110-1301, USA.
|
||||||
|
|
||||||
prev_version_file = $(srcdir)/config/prev-version.txt
|
prev_version_file = $(srcdir)/config/prev-version.txt
|
||||||
move_if_change = $(srcdir)/config/move-if-change
|
|
||||||
announce_gen = $(srcdir)/config/announce-gen
|
announce_gen = $(srcdir)/config/announce-gen
|
||||||
release_archive_dir = releases
|
release_archive_dir = releases
|
||||||
|
|
||||||
|
|||||||
+206
-123
@@ -2,7 +2,7 @@
|
|||||||
# This Makefile fragment is shared between the coreutils,
|
# This Makefile fragment is shared between the coreutils,
|
||||||
# CPPI, Bison, and Autoconf.
|
# CPPI, Bison, and Autoconf.
|
||||||
|
|
||||||
## Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
## Copyright (C) 2001, 2002, 2003, 2004, 2005 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
|
||||||
@@ -16,14 +16,15 @@
|
|||||||
##
|
##
|
||||||
## 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, write to the Free Software
|
## along with this program; if not, write to the Free Software
|
||||||
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
## 02111-1307, USA.
|
## 02110-1301, USA.
|
||||||
|
|
||||||
# This is reported not to work with make-3.79.1
|
# This is reported not to work with make-3.79.1
|
||||||
# ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
|
# ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
|
||||||
ME := Makefile.maint
|
ME := Makefile.maint
|
||||||
|
|
||||||
# Do not save the original name or timestamp in the .tar.gz file.
|
# Do not save the original name or timestamp in the .tar.gz file.
|
||||||
|
# Use --rsyncable if available.
|
||||||
GZIP_ENV = \
|
GZIP_ENV = \
|
||||||
"--no-name --best$$( \
|
"--no-name --best$$( \
|
||||||
case $$(gzip --help) in \
|
case $$(gzip --help) in \
|
||||||
@@ -33,6 +34,20 @@ GZIP_ENV = \
|
|||||||
|
|
||||||
CVS = cvs
|
CVS = cvs
|
||||||
|
|
||||||
|
CVS_LIST = sh -c ' \
|
||||||
|
(cvsu --find --types=AFGM $$*) 2>/dev/null || \
|
||||||
|
awk -F/ '\''{ \
|
||||||
|
if (!$$1 && $$3 !~ /^-/) { \
|
||||||
|
f=FILENAME; \
|
||||||
|
sub(/CVS\/Entries/, "", f); \
|
||||||
|
print f $$2; \
|
||||||
|
}}'\'' \
|
||||||
|
$$(find $${*-*} -name Entries -print) /dev/null \
|
||||||
|
' 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)
|
ifeq ($(origin prev_version_file), undefined)
|
||||||
prev_version_file = .prev-version
|
prev_version_file = .prev-version
|
||||||
endif
|
endif
|
||||||
@@ -69,126 +84,184 @@ local-checks-available = \
|
|||||||
|
|
||||||
local-check = $(filter-out $(local-checks-to-skip), $(local-checks-available))
|
local-check = $(filter-out $(local-checks-to-skip), $(local-checks-available))
|
||||||
|
|
||||||
# Make sure C source files in src/ don't include xalloc.h directly,
|
|
||||||
# since they all already include it via sys2.h.
|
|
||||||
# It's not a big deal -- just aesthetics.
|
|
||||||
.PHONY: $(syntax-check-rules)
|
.PHONY: $(syntax-check-rules)
|
||||||
syntax-check-rules = \
|
syntax-check-rules = \
|
||||||
sc_cast_of_argument_to_free \
|
sc_cast_of_argument_to_free \
|
||||||
sc_cast_of_x_alloc_return_value \
|
sc_cast_of_x_alloc_return_value \
|
||||||
|
sc_cast_of_alloca_return_value \
|
||||||
sc_changelog \
|
sc_changelog \
|
||||||
|
sc_dd_max_sym_length \
|
||||||
sc_error_exit_success \
|
sc_error_exit_success \
|
||||||
|
sc_file_system \
|
||||||
|
sc_obsolete_symbols \
|
||||||
|
sc_prohibit_atoi_atof \
|
||||||
|
sc_prohibit_jm_in_m4 \
|
||||||
|
sc_root_tests \
|
||||||
sc_space_tab \
|
sc_space_tab \
|
||||||
sc_sun_os_names \
|
sc_sun_os_names \
|
||||||
sc_system_h_headers \
|
sc_system_h_headers \
|
||||||
sc_unmarked_diagnostics \
|
sc_tight_scope \
|
||||||
sc_xalloc_h_in_src
|
sc_trailing_space \
|
||||||
|
sc_unmarked_diagnostics
|
||||||
|
|
||||||
syntax-check: $(syntax-check-rules)
|
syntax-check: $(syntax-check-rules)
|
||||||
# @grep -E '# *include <(limits|std(def|arg|bool))\.h>' \
|
# @grep -nE '# *include <(limits|std(def|arg|bool))\.h>' \
|
||||||
# $$(find -type f -name '*.[chly]') && \
|
# $$(find -type f -name '*.[chly]') && \
|
||||||
# { echo '$(ME): found conditional include' 1>&2; \
|
# { echo '$(ME): found conditional include' 1>&2; \
|
||||||
# exit 1; } || :
|
# exit 1; } || :
|
||||||
|
|
||||||
# grep -E '^# *include <(string|stdlib)\.h>' \
|
# grep -nE '^# *include <(string|stdlib)\.h>' \
|
||||||
# $(srcdir)/{lib,src}/*.[chy] && \
|
# $(srcdir)/{lib,src}/*.[chy] && \
|
||||||
# { echo '$(ME): FIXME' 1>&2; \
|
# { echo '$(ME): FIXME' 1>&2; \
|
||||||
# exit 1; } || :
|
# exit 1; } || :
|
||||||
# FIXME: don't allow `#include .strings\.h' anywhere
|
# FIXME: don't allow `#include .strings\.h' anywhere
|
||||||
|
|
||||||
# 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 --exclude=$(srcdir)/src/shred.c -E \
|
|
||||||
'\<error \([^"]*"[^"]*[a-z]{3}' $(srcdir)/{lib,src}/*.c \
|
|
||||||
| grep -v '_(' && \
|
|
||||||
{ echo '$(ME): found unmarked diagnostic(s)' 1>&2; \
|
|
||||||
exit 1; } || :
|
|
||||||
|
|
||||||
sc_cast_of_argument_to_free:
|
sc_cast_of_argument_to_free:
|
||||||
@grep -E '\<free \(\(' $(srcdir)/{lib,src}/*.[chly] && \
|
@grep -nE '\<free \(\(' $(srcdir)/{lib,src}/*.[chly] && \
|
||||||
{ echo '$(ME): don'\''t cast free argument' 1>&2; \
|
{ echo '$(ME): don'\''t cast free argument' 1>&2; \
|
||||||
exit 1; } || :
|
exit 1; } || :
|
||||||
|
|
||||||
sc_cast_of_x_alloc_return_value:
|
sc_cast_of_x_alloc_return_value:
|
||||||
@grep -E --exclude=$(srcdir)/lib/regex.c \
|
@grep -nE --exclude=$(srcdir)/lib/regex.c \
|
||||||
'\*\) *x(m|c|re)alloc\>' $(srcdir)/{lib,src}/*.[chy] && \
|
'\*\) *x(m|c|re)alloc\>' \
|
||||||
|
$(srcdir)/{lib,src}/*.[chy] && \
|
||||||
{ echo '$(ME): don'\''t cast x*alloc return value' 1>&2; \
|
{ echo '$(ME): don'\''t cast x*alloc return value' 1>&2; \
|
||||||
exit 1; } || :
|
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:
|
sc_space_tab:
|
||||||
@( cvsu --list ) > /dev/null 2>&1 || : && \
|
@grep -n '[ ] ' \
|
||||||
grep '[ ] ' \
|
$$($(CVS_LIST_EXCEPT)) && \
|
||||||
$$(cvsu --list | grep -vEf .x-$@ ) && \
|
|
||||||
{ echo '$(ME): found SPACE-TAB sequence; remove the SPACE' \
|
{ echo '$(ME): found SPACE-TAB sequence; remove the SPACE' \
|
||||||
1>&2; exit 1; } || :
|
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]|ato''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,
|
# Using EXIT_SUCCESS as the first argument to error is misleading,
|
||||||
# since when that parameter is 0, error does not exit. Use `0' instead.
|
# since when that parameter is 0, error does not exit. Use `0' instead.
|
||||||
sc_error_exit_success:
|
sc_error_exit_success:
|
||||||
@grep -F 'error (EXIT_SUCCESS,' \
|
@grep -nF 'error (EXIT_SUCCESS,' \
|
||||||
$$(find -type f -name '*.[chly]') && \
|
$$(find -type f -name '*.[chly]') && \
|
||||||
{ echo '$(ME): found error (EXIT_SUCCESS' 1>&2; \
|
{ echo '$(ME): found error (EXIT_SUCCESS' 1>&2; \
|
||||||
exit 1; } || :
|
exit 1; } || :
|
||||||
|
|
||||||
# FIXME: merge this with sc_system_h_headers below.
|
sc_file_system:
|
||||||
# xalloc.h is included via system.h, so should not be included
|
@grep -ni 'file''system' \
|
||||||
# directly by any file in src/.
|
$$($(CVS_LIST_EXCEPT)) && \
|
||||||
sc_xalloc_h_in_src:
|
{ echo '$(ME): found use of "file''system";' \
|
||||||
@if test -f $(srcdir)/src/sys2.h; then \
|
'rewrite to use "file system"' 1>&2; \
|
||||||
if grep 'xalloc\.h' $(srcdir)/src/*.c; then \
|
exit 1; } || :
|
||||||
exit 1; \
|
|
||||||
fi; \
|
sc_obsolete_symbols:
|
||||||
fi
|
@grep -nE '\<(HAVE_''FCNTL_H)\>' \
|
||||||
|
$$($(CVS_LIST_EXCEPT)) && \
|
||||||
|
{ echo '$(ME): do not use HAVE_''FCNTL_H' \
|
||||||
|
1>&2; exit 1; } || :
|
||||||
|
|
||||||
# FIXME: warn about definitions of EXIT_FAILURE, EXIT_SUCCESS, STREQ
|
# FIXME: warn about definitions of EXIT_FAILURE, EXIT_SUCCESS, STREQ
|
||||||
|
|
||||||
# Each nonempty line must start with a year number, or a TAB.
|
# Each nonempty line must start with a year number, or a TAB.
|
||||||
sc_changelog:
|
sc_changelog:
|
||||||
@grep '^[^12 ]' $$(find . -name ChangeLog -maxdepth 2) && \
|
@grep -n '^[^12 ]' $$(find . -maxdepth 2 -name ChangeLog) && \
|
||||||
{ echo '$(ME): found unexpected prefix in a ChangeLog' 1>&2; \
|
{ echo '$(ME): found unexpected prefix in a ChangeLog' 1>&2; \
|
||||||
exit 1; } || :
|
exit 1; } || :
|
||||||
|
|
||||||
header_regexp = \
|
# Ensure that dd's definition of LONGEST_SYMBOL stays in sync
|
||||||
alloca\
|
# with the strings from the two affected variables.
|
||||||
|closeout\
|
dd_c = $(srcdir)/src/dd.c
|
||||||
|ctype\
|
sc_dd_max_sym_length:
|
||||||
|dirent\
|
ifneq ($(wildcard $(dd_c)),)
|
||||||
|errno\
|
@len=$$( (sed -n '/conversions\[\] =$$/,/^};/p' $(dd_c);\
|
||||||
|fcntl\
|
sed -n '/flags\[\] =$$/,/^};/p' $(dd_c) ) \
|
||||||
|inttypes\
|
|sed -n '/"/s/^[^"]*"\([^"]*\)".*/\1/p' \
|
||||||
|limits\
|
| wc --max-line-length); \
|
||||||
|locale\
|
max=$$(sed -n '/^#define LONGEST_SYMBOL /s///p' $(dd_c) \
|
||||||
|pathmax\
|
|tr -d '"' | wc --max-line-length); \
|
||||||
|std(lib|bool)\
|
if test "$$len" = "$$max"; then :; else \
|
||||||
|string\
|
echo 'dd.c: LONGEST_SYMBOL is not longest' 1>&2; \
|
||||||
|sys/(stat|dir|time)\
|
exit 1; \
|
||||||
|time\
|
fi
|
||||||
|unistd\
|
endif
|
||||||
|utime\
|
|
||||||
|version-etc\
|
# Many m4 macros names once began with `jm_'.
|
||||||
|xalloc
|
# On 2004-04-13, they were all changed to start with gl_ instead.
|
||||||
h_re := $(shell echo '$(header_regexp)'|tr -d ' ')
|
# 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
|
# Files in src/ should not include directly any of
|
||||||
# the headers already included via system.h.
|
# the headers already included via system.h.
|
||||||
# Get list of candidates with this:
|
sc_system_h_headers: .re-list
|
||||||
# grep -h include src/sys*.h|sed 's/.*include //'|sort -
|
if test -f $(srcdir)/src/system.h; then \
|
||||||
sc_system_h_headers:
|
trap 'rc=$$?; rm -f .re-list; exit $$rc' 0 1 2 3 15; \
|
||||||
@( cvsu --list ) > /dev/null 2>&1 || : && \
|
grep -nE -f .re-list \
|
||||||
grep -E '^# *include ["<]($(h_re))\.h[">]' \
|
$$($(CVS_LIST) src | \
|
||||||
$$(cvsu --list src | grep -Ev 'sys(2|tem)\.h$$') \
|
grep -Ev '((copy|system)\.h|parse-gram\.c)$$') \
|
||||||
&& { echo '$(ME): the above are already included via system.h'\
|
&& { echo '$(ME): the above are already included via system.h'\
|
||||||
1>&2; exit 1; } || :
|
1>&2; exit 1; } || :; \
|
||||||
|
fi
|
||||||
|
|
||||||
sc_sun_os_names:
|
sc_sun_os_names:
|
||||||
@( cvsu --list ) > /dev/null 2>&1 || : && \
|
@grep -nEi \
|
||||||
grep -Ei \
|
|
||||||
'solaris[^[:alnum:]]*2\.(7|8|9|[1-9][0-9])|sunos[^[:alnum:]][6-9]' \
|
'solaris[^[:alnum:]]*2\.(7|8|9|[1-9][0-9])|sunos[^[:alnum:]][6-9]' \
|
||||||
$$(cvsu --list | grep -vEf .x-$@ ) && \
|
$$($(CVS_LIST_EXCEPT)) && \
|
||||||
{ echo '$(ME): found misuse of Sun OS version numbers' 1>&2; \
|
{ echo '$(ME): found misuse of Sun OS version numbers' 1>&2; \
|
||||||
exit 1; } || :
|
exit 1; } || :
|
||||||
|
|
||||||
|
sc_tight_scope:
|
||||||
|
$(MAKE) -C src $@
|
||||||
|
|
||||||
|
sc_trailing_space:
|
||||||
|
@grep -n '[ ]$$' \
|
||||||
|
$$($(CVS_LIST_EXCEPT)) && \
|
||||||
|
{ echo '$(ME): found trailing space(s)' \
|
||||||
|
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}' $(srcdir)/{lib,src}/*.c \
|
||||||
|
| grep -v '_(' && \
|
||||||
|
{ echo '$(ME): found unmarked diagnostic(s)' 1>&2; \
|
||||||
|
exit 1; } || :
|
||||||
|
|
||||||
# Ensure that date's --help output stays in sync with the info
|
# Ensure that date's --help output stays in sync with the info
|
||||||
# documentation for GNU strftime. The only exception is %N,
|
# documentation for GNU strftime. The only exception is %N,
|
||||||
# which date accepts but GNU strftime does not.
|
# which date accepts but GNU strftime does not.
|
||||||
@@ -208,8 +281,17 @@ strftime-check:
|
|||||||
# not @...@ in Makefile.am, now that we can rely on automake
|
# not @...@ in Makefile.am, now that we can rely on automake
|
||||||
# to emit a definition for each substituted variable.
|
# to emit a definition for each substituted variable.
|
||||||
makefile-check:
|
makefile-check:
|
||||||
grep -E '@[A-Z_0-9]+@' `find . -name Makefile.am` \
|
grep -nE '@[A-Z_0-9]+@' `find . -name Makefile.am` \
|
||||||
&& { echo 'Makefile.maint: use $(...), not @...@' 1>&2; exit 1; } || :
|
&& { echo 'Makefile.maint: use $$(...), not @...@' 1>&2; exit 1; } || :
|
||||||
|
|
||||||
|
news-date-check: NEWS
|
||||||
|
today=`date +%Y-%m-%d`; \
|
||||||
|
if head NEWS | grep '^\*.*'$$today >/dev/null; then \
|
||||||
|
:; \
|
||||||
|
else \
|
||||||
|
echo "today's date is not in NEWS" 1>&2; \
|
||||||
|
exit 1; \
|
||||||
|
fi
|
||||||
|
|
||||||
changelog-check:
|
changelog-check:
|
||||||
if head ChangeLog | grep 'Version $(VERSION)' >/dev/null; then \
|
if head ChangeLog | grep 'Version $(VERSION)' >/dev/null; then \
|
||||||
@@ -225,28 +307,30 @@ m4-check:
|
|||||||
exit 1; } || :
|
exit 1; } || :
|
||||||
|
|
||||||
# Verify that all source files using _() are listed in po/POTFILES.in.
|
# Verify that all source files using _() are listed in po/POTFILES.in.
|
||||||
|
# FIXME: don't hard-code src/false.c below; use a more general mechanism.
|
||||||
po-check:
|
po-check:
|
||||||
if test -f po/POTFILES.in; then \
|
if test -f po/POTFILES.in; then \
|
||||||
grep -E -v '^(#|$$)' po/POTFILES.in | sort > $@-1; \
|
grep -E -v '^(#|$$)' po/POTFILES.in \
|
||||||
files=; \
|
| grep -v '^src/false\.c$$' | sort > $@-1; \
|
||||||
|
files=; \
|
||||||
for file in lib/*.[chly] src/*.[chly]; do \
|
for file in lib/*.[chly] src/*.[chly]; do \
|
||||||
case $$file in \
|
case $$file in \
|
||||||
*.[ch]) \
|
*.[ch]) \
|
||||||
base=`expr " $$file" : ' \(.*\)\..'`; \
|
base=`expr " $$file" : ' \(.*\)\..'`; \
|
||||||
{ test -f $$base.l || test -f $$base.y; } && continue;; \
|
{ test -f $$base.l || test -f $$base.y; } && continue;; \
|
||||||
esac; \
|
esac; \
|
||||||
files="$$files $$file"; \
|
files="$$files $$file"; \
|
||||||
done; \
|
done; \
|
||||||
grep -E -l '\bN?_\([^)"]*("|$$)' $$files | sort > $@-2; \
|
grep -E -l '\bN?_\([^)"]*("|$$)' $$files | sort > $@-2; \
|
||||||
diff -u $@-1 $@-2 || exit 1; \
|
diff -u $@-1 $@-2 || exit 1; \
|
||||||
rm -f $@-1 $@-2; \
|
rm -f $@-1 $@-2; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# In a definition of #define AUTHORS "... and ..." where the RHS contains
|
# In a definition of #define AUTHORS "... and ..." where the RHS contains
|
||||||
# the English word `and', the string must be marked with `N_ (...)' so that
|
# the English word `and', the string must be marked with `N_ (...)' so that
|
||||||
# gettext recognizes it as a string requiring translation.
|
# gettext recognizes it as a string requiring translation.
|
||||||
author_mark_check:
|
author_mark_check:
|
||||||
@grep '^# *define AUTHORS "[^"]* and ' src/*.c |grep -v ' N_ (' && \
|
@grep -n '^# *define AUTHORS "[^"]* and ' src/*.c |grep -v ' N_ (' && \
|
||||||
{ echo 'Makefile.maint: enclose the above strings in N_ (...)' 1>&2; \
|
{ echo 'Makefile.maint: enclose the above strings in N_ (...)' 1>&2; \
|
||||||
exit 1; } || :
|
exit 1; } || :
|
||||||
|
|
||||||
@@ -258,7 +342,7 @@ author_mark_check:
|
|||||||
# that we'd have to worry about limits on command line length.
|
# that we'd have to worry about limits on command line length.
|
||||||
msg = 'Makefile.maint: Do not use `:'\'' above; use @PATH_SEPARATOR@ instead'
|
msg = 'Makefile.maint: Do not use `:'\'' above; use @PATH_SEPARATOR@ instead'
|
||||||
makefile_path_separator_check:
|
makefile_path_separator_check:
|
||||||
@grep 'PATH=.*:' `find $(srcdir) -name Makefile.am` \
|
@grep -n 'PATH=.*:' `find $(srcdir) -name Makefile.am` \
|
||||||
&& { echo $(msg) 1>&2; exit 1; } || :
|
&& { echo $(msg) 1>&2; exit 1; } || :
|
||||||
|
|
||||||
# Check that `make alpha' will not fail at the end of the process.
|
# Check that `make alpha' will not fail at the end of the process.
|
||||||
@@ -279,7 +363,7 @@ v_etc_file = lib/version-etc.c
|
|||||||
# Make sure that the copyright date in $(v_etc_file) is up to date.
|
# Make sure that the copyright date in $(v_etc_file) is up to date.
|
||||||
copyright-check:
|
copyright-check:
|
||||||
@if test -f $(v_etc_file); then \
|
@if test -f $(v_etc_file); then \
|
||||||
grep '"Copyright (C) $(shell date +%Y) Free' $(v_etc_file) \
|
grep 'enum { COPYRIGHT_YEAR = 2005 };' $(v_etc_file) \
|
||||||
>/dev/null \
|
>/dev/null \
|
||||||
|| { echo 'out of date copyright in $(v_etc_file); update it' 1>&2; \
|
|| { echo 'out of date copyright in $(v_etc_file); update it' 1>&2; \
|
||||||
exit 1; }; \
|
exit 1; }; \
|
||||||
@@ -330,21 +414,23 @@ null_AM_MAKEFLAGS = \
|
|||||||
# Detect format-string/arg-list mismatches that would normally be obscured
|
# Detect format-string/arg-list mismatches that would normally be obscured
|
||||||
# by the use of _(). The --disable-nls effectively defines away that macro,
|
# by the use of _(). The --disable-nls effectively defines away that macro,
|
||||||
# and building with CFLAGS='-Wformat -Werror' causes any format warning to be
|
# and building with CFLAGS='-Wformat -Werror' causes any format warning to be
|
||||||
# treated as a failure.
|
# 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
|
TMPDIR ?= /tmp
|
||||||
t=$(TMPDIR)/$(PACKAGE)/test
|
t=$(TMPDIR)/$(PACKAGE)/test
|
||||||
my-distcheck: $(local-check)
|
my-distcheck: $(local-check)
|
||||||
-rm -rf $(t)
|
-rm -rf $(t)
|
||||||
mkdir -p $(t)
|
mkdir -p $(t)
|
||||||
GZIP=$(GZIP_ENV) $(AMTAR) -C $(t) -zxf $(distdir).tar.gz
|
GZIP=$(GZIP_ENV) $(AMTAR) -C $(t) -zxf $(distdir).tar.gz
|
||||||
cd $(t)/$(distdir) \
|
cd $(t)/$(distdir) \
|
||||||
&& ./configure --disable-nls \
|
&& ./configure --disable-nls \
|
||||||
&& $(MAKE) CFLAGS='-Wformat -Werror' \
|
&& $(MAKE) CFLAGS='-Werror -Wall -Wformat -Wshadow' \
|
||||||
AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)' \
|
AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)' \
|
||||||
&& $(MAKE) dvi \
|
&& $(MAKE) dvi \
|
||||||
&& $(MAKE) check \
|
&& $(MAKE) check \
|
||||||
&& $(MAKE) distclean
|
&& $(MAKE) distclean
|
||||||
(cd $(t) && mv $(distdir) $(distdir).old \
|
(cd $(t) && mv $(distdir) $(distdir).old \
|
||||||
&& $(AMTAR) -zxf - ) < $(distdir).tar.gz
|
&& $(AMTAR) -zxf - ) < $(distdir).tar.gz
|
||||||
diff -ur $(t)/$(distdir).old $(t)/$(distdir)
|
diff -ur $(t)/$(distdir).old $(t)/$(distdir)
|
||||||
-rm -rf $(t)
|
-rm -rf $(t)
|
||||||
@@ -377,15 +463,9 @@ rel-check:
|
|||||||
prev-tgz = $(PACKAGE)-$(PREV_VERSION).tar.gz
|
prev-tgz = $(PACKAGE)-$(PREV_VERSION).tar.gz
|
||||||
xd-delta = $(PACKAGE)-$(PREV_VERSION)-$(VERSION).xdelta
|
xd-delta = $(PACKAGE)-$(PREV_VERSION)-$(VERSION).xdelta
|
||||||
|
|
||||||
signatures ?= $(distdir).tar.bz2.asc $(distdir).tar.gz.asc
|
rel-files = $(xd-delta) $(DIST_ARCHIVES)
|
||||||
%.asc: %
|
announcement: NEWS ChangeLog $(rel-files)
|
||||||
rm -f $@
|
@./announce-gen \
|
||||||
gpg --armor --detach-sign -o $@ $<
|
|
||||||
|
|
||||||
rel-files = $(xd-delta) $(distdir).tar.bz2 $(distdir).tar.gz $(signatures)
|
|
||||||
announce_gen ?= ./announce-gen
|
|
||||||
announcement: NEWS ChangeLog $(rel-files) $(signatures)
|
|
||||||
@$(announce_gen) \
|
|
||||||
--release-type=$(RELEASE_TYPE) \
|
--release-type=$(RELEASE_TYPE) \
|
||||||
--package=$(PACKAGE) \
|
--package=$(PACKAGE) \
|
||||||
--prev=$(PREV_VERSION) \
|
--prev=$(PREV_VERSION) \
|
||||||
@@ -443,14 +523,16 @@ po-update:
|
|||||||
# The following pseudo table associates a local directory and a URL
|
# The following pseudo table associates a local directory and a URL
|
||||||
# with each of the files that belongs to some other package and is
|
# with each of the files that belongs to some other package and is
|
||||||
# regularly updated from the specified URL.
|
# regularly updated from the specified URL.
|
||||||
wget_files ?= $(srcdir)/config/config.guess \
|
wget_files ?= \
|
||||||
$(srcdir)/config/config.sub \
|
$(srcdir)/build-aux/config.guess \
|
||||||
$(srcdir)/src/ansi2knr.c \
|
$(srcdir)/build-aux/config.sub \
|
||||||
$(srcdir)/config/texinfo.tex
|
$(srcdir)/build-aux/texinfo.tex \
|
||||||
|
$(srcdir)/src/ansi2knr.c
|
||||||
|
|
||||||
get-targets = $(patsubst %, get-%, $(wget_files))
|
get-targets = $(patsubst %, get-%, $(wget_files))
|
||||||
|
|
||||||
config.guess-url_prefix = $(ftp-gnu)/config/
|
config.guess-url_prefix = $(ftp-gnu)/build-aux/
|
||||||
config.sub-url_prefix = $(ftp-gnu)/config/
|
config.sub-url_prefix = $(ftp-gnu)/build-aux/
|
||||||
|
|
||||||
ansi2knr.c-url_prefix = ftp://ftp.cs.wisc.edu/ghost/
|
ansi2knr.c-url_prefix = ftp://ftp.cs.wisc.edu/ghost/
|
||||||
|
|
||||||
@@ -468,11 +550,11 @@ $(get-targets):
|
|||||||
&& $(move_if_change) $(target).t $(target)
|
&& $(move_if_change) $(target).t $(target)
|
||||||
|
|
||||||
cvs_files ?= \
|
cvs_files ?= \
|
||||||
$(srcdir)/src/ansi2knr.c \
|
$(srcdir)/build-aux/depcomp \
|
||||||
$(srcdir)/config/depcomp \
|
$(srcdir)/build-aux/install-sh \
|
||||||
$(srcdir)/config/install-sh \
|
$(srcdir)/build-aux/missing \
|
||||||
$(srcdir)/config/missing \
|
$(srcdir)/build-aux/mkinstalldirs \
|
||||||
$(srcdir)/config/mkinstalldirs
|
$(srcdir)/src/ansi2knr.c
|
||||||
automake_repo=:pserver:anoncvs:[email protected]:/cvs/automake
|
automake_repo=:pserver:anoncvs:[email protected]:/cvs/automake
|
||||||
.PHONY: wget-update
|
.PHONY: wget-update
|
||||||
wget-update: $(get-targets)
|
wget-update: $(get-targets)
|
||||||
@@ -492,25 +574,26 @@ cvs-update:
|
|||||||
done; \
|
done; \
|
||||||
test "$$fail" && exit 1
|
test "$$fail" && exit 1
|
||||||
|
|
||||||
define emit-upload-commands
|
emit_upload_commands:
|
||||||
echo =====================================
|
@echo =====================================
|
||||||
echo =====================================
|
@echo =====================================
|
||||||
echo upload $(PACKAGE) $(PREV_VERSION) $(VERSION)
|
@echo "$(srcdir)/gnupload $(GNUPLOADFLAGS) \\"
|
||||||
echo '# send the /tmp/announcement e-mail'
|
@echo " --to $(gnu_rel_host):coreutils \\"
|
||||||
echo =====================================
|
@echo " $(rel-files)"
|
||||||
echo =====================================
|
@echo '# send the /tmp/announcement e-mail'
|
||||||
endef
|
@echo =====================================
|
||||||
|
@echo =====================================
|
||||||
|
|
||||||
$(xd-delta): $(release_archive_dir)/$(prev-tgz) $(distdir).tar.gz
|
$(xd-delta): $(release_archive_dir)/$(prev-tgz) $(distdir).tar.gz
|
||||||
xdelta delta -9 $^ $@ || :
|
xdelta delta -9 $^ $@ || :
|
||||||
|
|
||||||
.PHONY: alpha beta major
|
.PHONY: alpha beta major
|
||||||
alpha beta major: $(local-check)
|
alpha beta major: news-date-check $(local-check)
|
||||||
$(MAKE) cvs-dist
|
$(MAKE) cvs-dist
|
||||||
$(MAKE) $(xd-delta)
|
$(MAKE) $(xd-delta)
|
||||||
$(MAKE) -s announcement RELEASE_TYPE=$@ > /tmp/announce-$(my_distdir)
|
$(MAKE) -s announcement RELEASE_TYPE=$@ > /tmp/announce-$(my_distdir)
|
||||||
ln $(rel-files) $(release_archive_dir)
|
ln $(rel-files) $(release_archive_dir)
|
||||||
chmod a-w $(rel-files)
|
chmod a-w $(rel-files)
|
||||||
|
$(MAKE) -s emit_upload_commands RELEASE_TYPE=$@
|
||||||
echo $(VERSION) > $(prev_version_file)
|
echo $(VERSION) > $(prev_version_file)
|
||||||
$(CVS) ci -m. $(prev_version_file)
|
$(CVS) ci -m. $(prev_version_file)
|
||||||
@$(emit-upload-commands)
|
|
||||||
|
|||||||
@@ -1,6 +1,30 @@
|
|||||||
Bison News
|
Bison News
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
Changes in version 2.1, 2005-09-16:
|
||||||
|
|
||||||
|
* Bison-generated parsers now support the translation of diagnostics like
|
||||||
|
"syntax error" into languages other than English. The default
|
||||||
|
language is still English. For details, please see the new
|
||||||
|
Internationalization section of the Bison manual. Software
|
||||||
|
distributors should also see the new PACKAGING file. Thanks to
|
||||||
|
Bruno Haible for this new feature.
|
||||||
|
|
||||||
|
* Wording in the Bison-generated parsers has been changed slightly to
|
||||||
|
simplify translation. In particular, the message "memory exhausted"
|
||||||
|
has replaced "parser stack overflow", as the old message was not
|
||||||
|
always accurate for modern Bison-generated parsers.
|
||||||
|
|
||||||
|
* Destructors are now called when the parser aborts, for all symbols left
|
||||||
|
behind on the stack. Also, the start symbol is now destroyed after a
|
||||||
|
successful parse. In both cases, the behavior was formerly inconsistent.
|
||||||
|
|
||||||
|
* When generating verbose diagnostics, Bison-generated parsers no longer
|
||||||
|
quote the literal strings associated with tokens. For example, for
|
||||||
|
a syntax error associated with '%token NUM "number"' they might
|
||||||
|
print 'syntax error, unexpected number' instead of 'syntax error,
|
||||||
|
unexpected "number"'.
|
||||||
|
|
||||||
Changes in version 2.0, 2004-12-25:
|
Changes in version 2.0, 2004-12-25:
|
||||||
|
|
||||||
* Possibly-incompatible changes
|
* Possibly-incompatible changes
|
||||||
@@ -399,6 +423,8 @@ Changes in version 1.31, 2002-01-14:
|
|||||||
alloca is used only when compiled with GCC, to avoid portability
|
alloca is used only when compiled with GCC, to avoid portability
|
||||||
problems as on AIX.
|
problems as on AIX.
|
||||||
|
|
||||||
|
* yyparse now returns 2 if memory is exhausted; formerly it dumped core.
|
||||||
|
|
||||||
* When the generated parser lacks debugging code, YYDEBUG is now 0
|
* When the generated parser lacks debugging code, YYDEBUG is now 0
|
||||||
(as POSIX requires) instead of being undefined.
|
(as POSIX requires) instead of being undefined.
|
||||||
|
|
||||||
@@ -593,7 +619,7 @@ End:
|
|||||||
|
|
||||||
-----
|
-----
|
||||||
|
|
||||||
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of Bison, the GNU Compiler Compiler.
|
This file is part of Bison, the GNU Compiler Compiler.
|
||||||
@@ -610,5 +636,5 @@ 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 autoconf; see the file COPYING. If not, write to
|
along with autoconf; see the file COPYING. If not, write to
|
||||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
Boston, MA 02111-1307, USA.
|
Boston, MA 02110-1301, USA.
|
||||||
|
|||||||
@@ -0,0 +1,56 @@
|
|||||||
|
Packaging hints for binary package distributors
|
||||||
|
===============================================
|
||||||
|
|
||||||
|
Although the source of the bison package comes as a single package,
|
||||||
|
in distributions of binary packages the installed files should
|
||||||
|
be split into two packages:
|
||||||
|
|
||||||
|
bison-runtime
|
||||||
|
Contents: Runtime libraries and programs.
|
||||||
|
Audience: Anyone who wants to run internationalized programs
|
||||||
|
that contain Bison-generated parsers.
|
||||||
|
|
||||||
|
bison
|
||||||
|
Contents: Tools and documentation for developers that use Bison.
|
||||||
|
Audience: Anyone who wants to develop programs that use parsers.
|
||||||
|
Dependencies: requires bison-runtime.
|
||||||
|
|
||||||
|
The 'bison-runtime' binary package is much smaller than the 'bison'
|
||||||
|
binary package. It should be included in any distribution that
|
||||||
|
contains localized programs that use the diagnostics contained in
|
||||||
|
Bison-generated parsers.
|
||||||
|
|
||||||
|
If you want to install both packages at the same time, you simply do
|
||||||
|
at the toplevel directory:
|
||||||
|
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
After installation, the file
|
||||||
|
|
||||||
|
$prefix/share/locale/*/LC_MESSAGES/bison-runtime.mo
|
||||||
|
|
||||||
|
belongs to the bison-runtime package; all other installed files belong
|
||||||
|
to the bison package.
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
|
Copyright (C) 2002, 2005 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This file is part of Bison, the GNU Compiler Compiler.
|
||||||
|
|
||||||
|
Bison 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 2, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
Bison 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 autoconf; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
@@ -3,34 +3,25 @@ This directory contains the Bison parser generator.
|
|||||||
See the file INSTALL for generic compilation and installation instructions.
|
See the file INSTALL for generic compilation and installation instructions.
|
||||||
See the file doc/FAQ for frequently asked questions.
|
See the file doc/FAQ for frequently asked questions.
|
||||||
|
|
||||||
Bison requires GNU m4 1.4 or later. Vanilla GNU m4 1.4 has some
|
Bison requires GNU m4 1.4.3 or later. See:
|
||||||
serious bugs, so we recommend using m4 1.4 as patched by the standard
|
|
||||||
GNU/Linux distributions. If you're building GNU m4 1.4 from scratch
|
|
||||||
we suggest using this version:
|
|
||||||
|
|
||||||
ftp://ftp.gnu.org/gnu/m4/m4-1.4.2.tar.gz
|
ftp://ftp.gnu.org/gnu/m4/m4-1.4.3.tar.gz
|
||||||
|
|
||||||
Older versions of Sun Forte Developer 6 update 2 have a compiler bug
|
Bison can work with pre-1.4.3 distributions of GNU m4 if they are
|
||||||
that cause "make check" to fail with a "Encounter BINCL entry"
|
sufficiently patched, but if you encounter a bug with an older
|
||||||
diagnostic. To fix the bug, update to the latest set of Solaris and
|
distribution and report a bug we will probably suggest that you
|
||||||
Forte patches recommended by Sun.
|
upgrade to 1.4.3 as the first step in trying to fix it.
|
||||||
|
|
||||||
VMS and MS-DOS builds are probably broken right now. If you are able
|
Please send bug reports to <[email protected]>. Please include the
|
||||||
to build Bison on either platform and you need to make changes to do
|
version number from `bison --version', and a complete, self-contained
|
||||||
so, please submit those changes as a bug report. On VMS, you will
|
test case in each bug report.
|
||||||
probably have to create Makefile from Makefile.in by hand. Remember
|
|
||||||
to do `SET COMMAND BISON' to install the data in `BISON.CLD'.
|
|
||||||
|
|
||||||
Send bug reports to <[email protected]>. Please include the version
|
If you have questions about using Bison and the documentation does
|
||||||
number from `bison --version', and a complete, self-contained test
|
not answer them, please send mail to <[email protected]>.
|
||||||
case in each bug report.
|
|
||||||
|
|
||||||
If you have questions about using Bison which the documentation does
|
|
||||||
not answer, send mail to <[email protected]>.
|
|
||||||
|
|
||||||
-----
|
-----
|
||||||
|
|
||||||
Copyright (C) 1992, 1998, 1999, 2003, 2004 Free Software Foundation, Inc.
|
Copyright (C) 1992, 1998, 1999, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of Bison, the GNU Compiler Compiler.
|
This file is part of Bison, the GNU Compiler Compiler.
|
||||||
|
|
||||||
@@ -46,5 +37,5 @@ 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 autoconf; see the file COPYING. If not, write to
|
along with autoconf; see the file COPYING. If not, write to
|
||||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
Boston, MA 02111-1307, USA.
|
Boston, MA 02110-1301, USA.
|
||||||
|
|||||||
+2
-2
@@ -28,5 +28,5 @@ 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 Bison; see the file COPYING. If not, write to
|
along with Bison; see the file COPYING. If not, write to
|
||||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
Boston, MA 02111-1307, USA.
|
Boston, MA 02110-1301, USA.
|
||||||
|
|||||||
+23
-29
@@ -9,11 +9,25 @@ Only the sources are installed in the CVS repository (to ease the
|
|||||||
maintenance, merges etc.), therefore you will have to get the latest
|
maintenance, merges etc.), therefore you will have to get the latest
|
||||||
stable versions of the maintainer tools we depend upon, including:
|
stable versions of the maintainer tools we depend upon, including:
|
||||||
|
|
||||||
- Automake
|
- Automake <http://www.gnu.org/software/automake/>
|
||||||
- Autoconf
|
- Autoconf <http://www.gnu.org/software/autoconf/>
|
||||||
- Flex
|
- Flex <http://www.gnu.org/software/flex/>
|
||||||
- Gettext
|
- Gettext <http://www.gnu.org/software/gettext/>
|
||||||
- CVS Bison itself
|
- Gzip <http://www.gnu.org/software/gzip/>
|
||||||
|
- Tar <http://www.gnu.org/software/tar/>
|
||||||
|
- Wget <http://www.gnu.org/software/wget/>
|
||||||
|
|
||||||
|
As of this writing, the latest stable version of Gzip is 1.2.4 but we
|
||||||
|
suggest using test version 1.3.5 (or later, if one becomes available).
|
||||||
|
|
||||||
|
Valgrind <http://valgrind.org/> is also highly recommended, if
|
||||||
|
Valgrind supports your architecture.
|
||||||
|
|
||||||
|
Bison is written using Bison grammars, so there are bootstrapping
|
||||||
|
issues. The bootstrap script attempts to discover when the C code
|
||||||
|
generated from the grammars is out of date, and to bootstrap with an
|
||||||
|
out-of-date version of the C code, but the process is not foolproof.
|
||||||
|
Also, you may run into similar problems yourself if you modify Bison.
|
||||||
|
|
||||||
Only building the initial full source tree will be a bit painful,
|
Only building the initial full source tree will be a bit painful,
|
||||||
later, a plain `cvs update -P & make' should be sufficient.
|
later, a plain `cvs update -P & make' should be sufficient.
|
||||||
@@ -39,33 +53,13 @@ and the CVS master copy:
|
|||||||
|
|
||||||
$ cvs diff
|
$ cvs diff
|
||||||
|
|
||||||
should output no difference, except maybe the date in po/*.po files.
|
should output no difference.
|
||||||
|
|
||||||
Enjoy!
|
Enjoy!
|
||||||
|
|
||||||
* Troubleshooting
|
|
||||||
|
|
||||||
Unfortunately the current Gettext still does not include all the
|
|
||||||
needed tools so that the bootstrapping always perform successfully.
|
|
||||||
|
|
||||||
If you experience problems, I suggest the following:
|
|
||||||
|
|
||||||
1. Do a regular CVS checkout
|
|
||||||
|
|
||||||
2. Fetch a recent tarball in:
|
|
||||||
ftp://alpha.gnu.org/gnu/bison/
|
|
||||||
|
|
||||||
3. Extract it
|
|
||||||
|
|
||||||
4. Override the content of your checkout with the content of this
|
|
||||||
tarball, i.e.:
|
|
||||||
cp -r bison-1.875c/* bison-cvs
|
|
||||||
|
|
||||||
5. Proceed on ./configure && make etc.
|
|
||||||
|
|
||||||
-----
|
-----
|
||||||
|
|
||||||
Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
|
Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Bison.
|
This file is part of GNU Bison.
|
||||||
|
|
||||||
@@ -81,5 +75,5 @@ 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 Bison; see the file COPYING. If not, write to
|
along with Bison; see the file COPYING. If not, write to
|
||||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
Boston, MA 02111-1307, USA.
|
Boston, MA 02110-1301, USA.
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ Alexander Belopolsky [email protected]
|
|||||||
Alexandre Duret-Lutz [email protected]
|
Alexandre Duret-Lutz [email protected]
|
||||||
Andreas Schwab [email protected]
|
Andreas Schwab [email protected]
|
||||||
Andrew Suffield [email protected]
|
Andrew Suffield [email protected]
|
||||||
|
Anthony Heading [email protected]
|
||||||
Arnold Robbins [email protected]
|
Arnold Robbins [email protected]
|
||||||
Art Haas [email protected]
|
Art Haas [email protected]
|
||||||
Baron Schwartz [email protected]
|
Baron Schwartz [email protected]
|
||||||
@@ -33,6 +34,7 @@ Jan Nieuwenhuizen [email protected]
|
|||||||
Jesse Thilo [email protected]
|
Jesse Thilo [email protected]
|
||||||
Jim Kent [email protected]
|
Jim Kent [email protected]
|
||||||
Jim Meyering [email protected]
|
Jim Meyering [email protected]
|
||||||
|
Joel E. Denny [email protected]
|
||||||
Juan Manuel Guerrero [email protected]
|
Juan Manuel Guerrero [email protected]
|
||||||
Kees Zeelenberg [email protected]
|
Kees Zeelenberg [email protected]
|
||||||
Keith Browne [email protected]
|
Keith Browne [email protected]
|
||||||
@@ -72,6 +74,7 @@ Wayne Green [email protected]
|
|||||||
Wolfram Wagner [email protected]
|
Wolfram Wagner [email protected]
|
||||||
Wwp [email protected]
|
Wwp [email protected]
|
||||||
Zack Weinberg [email protected]
|
Zack Weinberg [email protected]
|
||||||
|
[email protected]
|
||||||
|
|
||||||
Many people are not named here because we lost track of them. We
|
Many people are not named here because we lost track of them. We
|
||||||
thank them! Please, help us keeping this list up to date.
|
thank them! Please, help us keeping this list up to date.
|
||||||
|
|||||||
@@ -12,18 +12,16 @@ They should not: it is not documented. But if they need to, let's
|
|||||||
find something clean (not like YYLSP_NEEDED...).
|
find something clean (not like YYLSP_NEEDED...).
|
||||||
|
|
||||||
|
|
||||||
* URGENT: Documenting C++ output
|
|
||||||
Write a first documentation for C++ output.
|
|
||||||
|
|
||||||
|
|
||||||
* Documentation
|
* Documentation
|
||||||
Before releasing, make sure the documentation ("Understanding your
|
Before releasing, make sure the documentation ("Understanding your
|
||||||
parser") refers to the current `output' format.
|
parser") refers to the current `output' format.
|
||||||
|
|
||||||
|
* lalr1.cc
|
||||||
|
** vector
|
||||||
|
Move to using vector, drop stack.hh.
|
||||||
|
|
||||||
* GLR & C++
|
** I18n
|
||||||
Currently, the GLR parser cannot compile with a C++ compiler.
|
Catch up with yacc.c.
|
||||||
|
|
||||||
|
|
||||||
* Report
|
* Report
|
||||||
|
|
||||||
@@ -52,14 +50,7 @@ DeRemer and Penello: they already provide the algorithm.
|
|||||||
|
|
||||||
* Extensions
|
* Extensions
|
||||||
|
|
||||||
** %destructor
|
** Labeling the symbols
|
||||||
I think we should document it as experimental, and allow its use in
|
|
||||||
the next releases. But we also need to port it to GLR. What about
|
|
||||||
lalr1.cc? Well, read what Hans reported, maybe we don't want
|
|
||||||
%detructor. On the other hand, there is no reason not to provide it:
|
|
||||||
users can avoid its use.
|
|
||||||
|
|
||||||
** $foo
|
|
||||||
Have a look at the Lemon parser generator: instead of $1, $2 etc. they
|
Have a look at the Lemon parser generator: instead of $1, $2 etc. they
|
||||||
can name the values. This is much more pleasant. For instance:
|
can name the values. This is much more pleasant. For instance:
|
||||||
|
|
||||||
@@ -69,6 +60,21 @@ I love this. I have been bitten too often by the removal of the
|
|||||||
symbol, and forgetting to shift all the $n to $n-1. If you are
|
symbol, and forgetting to shift all the $n to $n-1. If you are
|
||||||
unlucky, it compiles...
|
unlucky, it compiles...
|
||||||
|
|
||||||
|
But instead of using $a etc., we can use regular variables. And
|
||||||
|
instead of using (), I propose to use `:' (again). Paul suggests
|
||||||
|
supporting `->' in addition to `:' to separate LHS and RHS. In other
|
||||||
|
words:
|
||||||
|
|
||||||
|
r:exp -> a:exp '+' b:exp { r = a + b; };
|
||||||
|
|
||||||
|
That requires an significant improvement of the grammar parser. Using
|
||||||
|
GLR would be nice. It also requires that Bison know the type of the
|
||||||
|
symbols (which will be useful for %include anyway). So we have some
|
||||||
|
time before...
|
||||||
|
|
||||||
|
Note that there remains the problem of locations: `@r'?
|
||||||
|
|
||||||
|
|
||||||
** $-1
|
** $-1
|
||||||
We should find a means to provide an access to values deep in the
|
We should find a means to provide an access to values deep in the
|
||||||
stack. For instance, instead of
|
stack. For instance, instead of
|
||||||
@@ -192,7 +198,9 @@ Paul notes:
|
|||||||
PDP-10 ports :-) but they should probably be documented
|
PDP-10 ports :-) but they should probably be documented
|
||||||
somewhere.
|
somewhere.
|
||||||
|
|
||||||
|
More importantly, Bison does not currently allow NUL bytes in
|
||||||
|
tokens, either via escapes (e.g., "x\0y") or via a NUL byte in
|
||||||
|
the source code. This should get fixed.
|
||||||
|
|
||||||
* --graph
|
* --graph
|
||||||
Show reductions. []
|
Show reductions. []
|
||||||
@@ -353,5 +361,5 @@ 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 Bison; see the file COPYING. If not, write to
|
along with Bison; see the file COPYING. If not, write to
|
||||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
Boston, MA 02111-1307, USA.
|
Boston, MA 02110-1301, USA.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Bootstrap this package from CVS.
|
# Bootstrap this package from CVS.
|
||||||
|
|
||||||
# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
|
# Copyright (C) 2003, 2004, 2005 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
|
||||||
@@ -16,8 +16,8 @@
|
|||||||
|
|
||||||
# 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, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
# 02111-1307, USA.
|
# 02110-1301, USA.
|
||||||
|
|
||||||
# Written by Paul Eggert.
|
# Written by Paul Eggert.
|
||||||
|
|
||||||
@@ -25,6 +25,7 @@ package=bison
|
|||||||
|
|
||||||
# Ensure file names are sorted consistently across platforms;
|
# Ensure file names are sorted consistently across platforms;
|
||||||
# e.g., m4/ulonglong_gl.m4 should follow m4/ulonglong.m4.
|
# e.g., m4/ulonglong_gl.m4 should follow m4/ulonglong.m4.
|
||||||
|
# Also, ensure diagnostics are in English, e.g., "wget --help" below.
|
||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
export LC_ALL
|
export LC_ALL
|
||||||
|
|
||||||
@@ -83,7 +84,7 @@ case ${GNULIB_SRCDIR--} in
|
|||||||
|
|
||||||
cvs -z3 -q -d ${CVS_PREFIX}subversions.gnu.org:/cvsroot/gnulib co gnulib || exit
|
cvs -z3 -q -d ${CVS_PREFIX}subversions.gnu.org:/cvsroot/gnulib co gnulib || exit
|
||||||
|
|
||||||
trap 0
|
trap - 0
|
||||||
fi
|
fi
|
||||||
GNULIB_SRCDIR=gnulib
|
GNULIB_SRCDIR=gnulib
|
||||||
esac
|
esac
|
||||||
@@ -97,6 +98,7 @@ dirname
|
|||||||
error
|
error
|
||||||
extensions
|
extensions
|
||||||
getopt
|
getopt
|
||||||
|
gettext
|
||||||
hard-locale
|
hard-locale
|
||||||
hash
|
hash
|
||||||
malloc
|
malloc
|
||||||
@@ -105,7 +107,9 @@ obstack
|
|||||||
quote
|
quote
|
||||||
quotearg
|
quotearg
|
||||||
stdbool
|
stdbool
|
||||||
|
stdio-safer
|
||||||
stpcpy
|
stpcpy
|
||||||
|
unistd-safer
|
||||||
xalloc
|
xalloc
|
||||||
xalloc-die
|
xalloc-die
|
||||||
xstrndup
|
xstrndup
|
||||||
@@ -150,6 +154,8 @@ for gnulib_file in $gnulib_files; do
|
|||||||
cp -p $GNULIB_SRCDIR/$gnulib_file $dest || exit
|
cp -p $GNULIB_SRCDIR/$gnulib_file $dest || exit
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# This suppresses a bogus diagnostic
|
||||||
|
# "warning: macro `AM_LANGINFO_CODESET' not found in library".
|
||||||
echo "$0: patching m4/gettext.m4 so that AM_INTL_SUBDIR is empty ..."
|
echo "$0: patching m4/gettext.m4 so that AM_INTL_SUBDIR is empty ..."
|
||||||
sed '
|
sed '
|
||||||
/^AC_DEFUN(\[AM_INTL_SUBDIR],/,/^]/c\
|
/^AC_DEFUN(\[AM_INTL_SUBDIR],/,/^]/c\
|
||||||
@@ -161,13 +167,61 @@ sed '
|
|||||||
|
|
||||||
case $SKIP_PO in
|
case $SKIP_PO in
|
||||||
'')
|
'')
|
||||||
|
case `wget --help` in
|
||||||
|
*'--no-cache'*)
|
||||||
|
no_cache='--no-cache';;
|
||||||
|
*'--cache=on/off'*)
|
||||||
|
no_cache='--cache=off';;
|
||||||
|
*)
|
||||||
|
no_cache='';;
|
||||||
|
esac
|
||||||
|
|
||||||
echo "$0: getting translations into po (please ignore the robots.txt ERROR 404)..."
|
echo "$0: getting translations into po (please ignore the robots.txt ERROR 404)..."
|
||||||
(cd po &&
|
(cd po &&
|
||||||
rm -f dummy `ls | sed -n '/\.gmo$/p; /\.po/p'` &&
|
rm -f dummy `ls | sed -n '/\.gmo$/p; /\.po/p'` &&
|
||||||
wget -nv -nd -r -l 1 -A .po -C off \
|
wget -nv -nd -r -l 1 -A .po $no_cache \
|
||||||
http://www2.iro.umontreal.ca/~gnutra/po/maint/$package/ &&
|
http://www.iro.umontreal.ca/translation/maint/$package/ &&
|
||||||
ls *.po | sed 's/\.po$//' >LINGUAS
|
ls *.po | sed 's/\.po$//' >LINGUAS
|
||||||
) || exit;;
|
) || exit
|
||||||
|
|
||||||
|
case $package in
|
||||||
|
bison)
|
||||||
|
echo "$0: getting translations into po (please ignore the robots.txt ERROR 404)..."
|
||||||
|
(cd runtime-po &&
|
||||||
|
rm -f dummy `ls | sed -n '/\.gmo$/p; /\.po$/p'` &&
|
||||||
|
wget -nv -nd -r -l 1 -A .po $no_cache \
|
||||||
|
http://www.iro.umontreal.ca/translation/maint/$package-runtime/ &&
|
||||||
|
|
||||||
|
# For translations that have not yet been upgraded to the new
|
||||||
|
# runtime-po domain, prime the pump by extracting the relevant
|
||||||
|
# strings from the obsolete translations.
|
||||||
|
# This code can be removed once the bison-runtime domain
|
||||||
|
# has been translated by each team.
|
||||||
|
for po in ../po/*.po; do
|
||||||
|
test -f "$po" || continue
|
||||||
|
runpo=`basename $po`
|
||||||
|
test -f $runpo || {
|
||||||
|
msggrep -K \
|
||||||
|
-e 'memory exhausted' \
|
||||||
|
-e 'syntax error' \
|
||||||
|
$po 2>/dev/null |
|
||||||
|
sed '
|
||||||
|
s/^#~ //
|
||||||
|
/^msgid "syntax error; also memory exhausted"$/,/^$/d
|
||||||
|
/^$/,${ /^#/d; }
|
||||||
|
' >$runpo-
|
||||||
|
if cmp -s $runpo- $runpo; then
|
||||||
|
rm $runpo-
|
||||||
|
else
|
||||||
|
mv $runpo- $runpo
|
||||||
|
fi
|
||||||
|
test -s $runpo || rm -f $runpo
|
||||||
|
} || exit
|
||||||
|
done &&
|
||||||
|
|
||||||
|
ls *.po | sed 's/\.po$//' >LINGUAS
|
||||||
|
) || exit
|
||||||
|
esac;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
@@ -197,6 +251,7 @@ intl_files_to_remove='
|
|||||||
intl
|
intl
|
||||||
m4/codeset.m4
|
m4/codeset.m4
|
||||||
m4/gettext.m4
|
m4/gettext.m4
|
||||||
|
m4/glibc2.m4
|
||||||
m4/glibc21.m4
|
m4/glibc21.m4
|
||||||
m4/intdiv0.m4
|
m4/intdiv0.m4
|
||||||
m4/intmax.m4
|
m4/intmax.m4
|
||||||
@@ -223,21 +278,19 @@ intl_files_to_remove='
|
|||||||
echo $0: rm -fr $intl_files_to_remove ...
|
echo $0: rm -fr $intl_files_to_remove ...
|
||||||
rm -fr $intl_files_to_remove || exit
|
rm -fr $intl_files_to_remove || exit
|
||||||
|
|
||||||
# Patch what appears to be a bug in gettext 0.14.1;
|
|
||||||
# remove this once the bug is fixed.
|
|
||||||
grep @top_builddir@ po/Makefile.in.in >/dev/null || {
|
|
||||||
echo "$0: prepending 'top_builddir=@top_builddir@' to po/Makefile.in.in ... "
|
|
||||||
old_contents=`cat po/Makefile.in.in` || exit
|
|
||||||
cat >po/Makefile.in.in <<EOF
|
|
||||||
top_builddir=@top_builddir@
|
|
||||||
$old_contents
|
|
||||||
EOF
|
|
||||||
}
|
|
||||||
|
|
||||||
# Put bug-reporting address into po/Makevars.
|
# Put bug-reporting address into po/Makevars.
|
||||||
echo "$0: sed '/^MSGID_BUGS_ADDRESS *=/s/=.*/= [email protected]/' po/Makevars.template >po/Makevars ..."
|
echo "$0: sed '/^MSGID_BUGS_ADDRESS *=/s/=.*/= [email protected]/' po/Makevars.template >po/Makevars ..."
|
||||||
sed '/^MSGID_BUGS_ADDRESS *=/s/=.*/= [email protected]/' po/Makevars.template >po/Makevars
|
sed '/^MSGID_BUGS_ADDRESS *=/s/=.*/= [email protected]/' po/Makevars.template >po/Makevars
|
||||||
|
|
||||||
|
# Likewise for runtime-po/Makevars, except also change a few other parameters.
|
||||||
|
sed '
|
||||||
|
s/^\(DOMAIN\) *=.*/\1 = bison-runtime/
|
||||||
|
s/^\(subdir\) *=.*/\1 = runtime-po/
|
||||||
|
s/^\(XGETTEXT_OPTIONS\) *=.*/\1 = --keyword=YY_/
|
||||||
|
' <po/Makevars >runtime-po/Makevars
|
||||||
|
|
||||||
|
# Copy identical files from po to runtime-po.
|
||||||
|
(cd po && cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po)
|
||||||
|
|
||||||
# if src/parse-gram.[ch] are out of date, rebuild them.
|
# if src/parse-gram.[ch] are out of date, rebuild them.
|
||||||
parse_gram_y=`find src/parse-gram.y \
|
parse_gram_y=`find src/parse-gram.y \
|
||||||
|
|||||||
@@ -1,13 +1,3 @@
|
|||||||
*.t
|
*.t
|
||||||
Makefile
|
Makefile
|
||||||
Makefile.in
|
Makefile.in
|
||||||
config.guess
|
|
||||||
config.rpath
|
|
||||||
config.sub
|
|
||||||
depcomp
|
|
||||||
install-sh
|
|
||||||
mdate-sh
|
|
||||||
missing
|
|
||||||
mkinstalldirs
|
|
||||||
texinfo.tex
|
|
||||||
ylwrap
|
|
||||||
|
|||||||
+1
-1
@@ -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 = move-if-change prev-version.txt config.rpath
|
EXTRA_DIST = prev-version.txt
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# Like mv $1 $2, but if the files are the same, just delete $1.
|
|
||||||
# Status is 0 if $2 is changed, 1 otherwise.
|
|
||||||
if
|
|
||||||
test -r $2
|
|
||||||
then
|
|
||||||
if
|
|
||||||
cmp -s $1 $2
|
|
||||||
then
|
|
||||||
echo $2 is unchanged
|
|
||||||
rm -f $1
|
|
||||||
else
|
|
||||||
mv -f $1 $2
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
mv -f $1 $2
|
|
||||||
fi
|
|
||||||
@@ -1 +1 @@
|
|||||||
1.75
|
2.0
|
||||||
|
|||||||
+17
-8
@@ -1,6 +1,6 @@
|
|||||||
# Configure template for GNU Bison. -*-Autoconf-*-
|
# Configure template for GNU Bison. -*-Autoconf-*-
|
||||||
#
|
#
|
||||||
# Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
# Copyright (C) 2001, 2002, 2003, 2004, 2005 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
|
||||||
@@ -14,8 +14,8 @@
|
|||||||
#
|
#
|
||||||
# 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, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
# 02111-1307 USA
|
# 02110-1301 USA
|
||||||
|
|
||||||
# This file uses AC_CONFIG_MACRO_DIR, so we need Autoconf 2.58 or better.
|
# This file uses AC_CONFIG_MACRO_DIR, so we need Autoconf 2.58 or better.
|
||||||
# But Autoconf 2.58 has a bug in the way that it generates tests: it
|
# But Autoconf 2.58 has a bug in the way that it generates tests: it
|
||||||
@@ -23,8 +23,8 @@
|
|||||||
# least Autoconf 2.59.
|
# least Autoconf 2.59.
|
||||||
AC_PREREQ(2.59)
|
AC_PREREQ(2.59)
|
||||||
|
|
||||||
AC_INIT([GNU Bison], [2.0], [[email protected]])
|
AC_INIT([GNU Bison], [2.1], [[email protected]])
|
||||||
AC_CONFIG_AUX_DIR([config])
|
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.
|
# We don't have a file m4/Makefile.am, so we need Automake 1.8 or later.
|
||||||
@@ -107,8 +107,15 @@ BISON_PREREQ_TIMEVAR
|
|||||||
|
|
||||||
# gnulib and gettext.
|
# gnulib and gettext.
|
||||||
GNULIB_AUTOCONF_SNIPPET
|
GNULIB_AUTOCONF_SNIPPET
|
||||||
# We use po/Makevars.template, so we need at least gettext 0.12.
|
# We use po/Makevars, so we need at least gettext 0.12.
|
||||||
AM_GNU_GETTEXT_VERSION([0.12])
|
AM_GNU_GETTEXT_VERSION([0.12])
|
||||||
|
BISON_I18N
|
||||||
|
|
||||||
|
# Internationalized parsers.
|
||||||
|
AC_CONFIG_FILES([runtime-po/Makefile.in])
|
||||||
|
# Autoconf macros for packages using internationalized parsers.
|
||||||
|
aclocaldir='${datadir}/aclocal'
|
||||||
|
AC_SUBST([aclocaldir])
|
||||||
|
|
||||||
# Initialize the test suite.
|
# Initialize the test suite.
|
||||||
AC_CONFIG_TESTDIR(tests)
|
AC_CONFIG_TESTDIR(tests)
|
||||||
@@ -120,14 +127,16 @@ BISON_TEST_FOR_WORKING_CXX_COMPILER
|
|||||||
AM_MISSING_PROG([AUTOM4TE], [autom4te])
|
AM_MISSING_PROG([AUTOM4TE], [autom4te])
|
||||||
# Needed by tests/atlocal.in.
|
# Needed by tests/atlocal.in.
|
||||||
AC_SUBST([GCC])
|
AC_SUBST([GCC])
|
||||||
O0CFLAGS=`echo $CFLAGS | sed 's/-O[0-9] *//'`
|
O0CFLAGS=`echo $CFLAGS | sed 's/-O[[0-9]] *//'`
|
||||||
AC_SUBST([O0CFLAGS])
|
AC_SUBST([O0CFLAGS])
|
||||||
O0CXXFLAGS=`echo $CXXFLAGS | sed 's/-O[0-9] *//'`
|
O0CXXFLAGS=`echo $CXXFLAGS | sed 's/-O[[0-9]] *//'`
|
||||||
AC_SUBST([O0CXXFLAGS])
|
AC_SUBST([O0CXXFLAGS])
|
||||||
|
|
||||||
AC_CONFIG_FILES([Makefile
|
AC_CONFIG_FILES([Makefile
|
||||||
config/Makefile
|
config/Makefile
|
||||||
po/Makefile.in
|
po/Makefile.in
|
||||||
data/Makefile
|
data/Makefile
|
||||||
|
examples/Makefile
|
||||||
|
examples/calc++/Makefile
|
||||||
lib/Makefile src/Makefile doc/Makefile])
|
lib/Makefile src/Makefile doc/Makefile])
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|||||||
+6
-4
@@ -1,4 +1,4 @@
|
|||||||
## Copyright (C) 2002 Free Software Foundation, Inc.
|
## Copyright (C) 2002, 2005 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
|
||||||
@@ -12,10 +12,12 @@
|
|||||||
|
|
||||||
## 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, write to the Free Software
|
## along with this program; if not, write to the Free Software
|
||||||
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
## 02111-1307 USA
|
## 02110-1301 USA
|
||||||
|
|
||||||
dist_pkgdata_DATA = README c.m4 yacc.c lalr1.cc glr.c
|
dist_pkgdata_DATA = README \
|
||||||
|
c.m4 yacc.c glr.c \
|
||||||
|
c++.m4 lalr1.cc
|
||||||
|
|
||||||
m4sugardir = $(pkgdatadir)/m4sugar
|
m4sugardir = $(pkgdatadir)/m4sugar
|
||||||
dist_m4sugar_DATA = m4sugar/m4sugar.m4
|
dist_m4sugar_DATA = m4sugar/m4sugar.m4
|
||||||
|
|||||||
+2
-2
@@ -41,5 +41,5 @@ 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 Bison; see the file COPYING. If not, write to
|
along with Bison; see the file COPYING. If not, write to
|
||||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
Boston, MA 02111-1307, USA.
|
Boston, MA 02110-1301, USA.
|
||||||
|
|||||||
+121
@@ -0,0 +1,121 @@
|
|||||||
|
m4_divert(-1)
|
||||||
|
|
||||||
|
# C++ skeleton for Bison
|
||||||
|
|
||||||
|
# Copyright (C) 2002, 2003, 2004, 2005 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 2 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, write to the Free Software
|
||||||
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
|
# 02110-1301 USA
|
||||||
|
|
||||||
|
## ---------------- ##
|
||||||
|
## Default values. ##
|
||||||
|
## ---------------- ##
|
||||||
|
|
||||||
|
# Default parser class name.
|
||||||
|
m4_define_default([b4_parser_class_name], [parser])
|
||||||
|
m4_define_default([b4_location_type], [location])
|
||||||
|
m4_define_default([b4_filename_type], [std::string])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# b4_token_enums(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)
|
||||||
|
# -----------------------------------------------------
|
||||||
|
# Output the definition of the tokens (if there are) as enums.
|
||||||
|
m4_define([b4_token_enums],
|
||||||
|
[m4_if([$@], [[]], [],
|
||||||
|
[/* Tokens. */
|
||||||
|
enum yytokentype {
|
||||||
|
m4_map_sep([ b4_token_enum], [,
|
||||||
|
],
|
||||||
|
[$@])
|
||||||
|
};
|
||||||
|
])])
|
||||||
|
|
||||||
|
|
||||||
|
## ----------------- ##
|
||||||
|
## Semantic Values. ##
|
||||||
|
## ----------------- ##
|
||||||
|
|
||||||
|
|
||||||
|
# b4_lhs_value([TYPE])
|
||||||
|
# --------------------
|
||||||
|
# Expansion of $<TYPE>$.
|
||||||
|
m4_define([b4_lhs_value],
|
||||||
|
[(yyval[]m4_ifval([$1], [.$1]))])
|
||||||
|
|
||||||
|
|
||||||
|
# b4_rhs_value(RULE-LENGTH, NUM, [TYPE])
|
||||||
|
# --------------------------------------
|
||||||
|
# Expansion of $<TYPE>NUM, where the current rule has RULE-LENGTH
|
||||||
|
# symbols on RHS.
|
||||||
|
m4_define([b4_rhs_value],
|
||||||
|
[(yysemantic_stack_@{m4_eval([$1 - $2])@}m4_ifval([$3], [.$3]))])
|
||||||
|
|
||||||
|
# b4_lhs_location()
|
||||||
|
# -----------------
|
||||||
|
# Expansion of @$.
|
||||||
|
m4_define([b4_lhs_location],
|
||||||
|
[(yyloc)])
|
||||||
|
|
||||||
|
|
||||||
|
# b4_rhs_location(RULE-LENGTH, NUM)
|
||||||
|
# ---------------------------------
|
||||||
|
# Expansion of @NUM, where the current rule has RULE-LENGTH symbols
|
||||||
|
# on RHS.
|
||||||
|
m4_define([b4_rhs_location],
|
||||||
|
[(yylocation_stack_@{m4_eval([$1 - $2])@})])
|
||||||
|
|
||||||
|
|
||||||
|
# b4_parse_param_decl
|
||||||
|
# -------------------
|
||||||
|
# Extra formal arguments of the constructor.
|
||||||
|
# Change the parameter names from "foo" into "foo_yyarg", so that
|
||||||
|
# there is no collision bw the user chosen attribute name, and the
|
||||||
|
# argument name in the constructor.
|
||||||
|
m4_define([b4_parse_param_decl],
|
||||||
|
[m4_ifset([b4_parse_param],
|
||||||
|
[m4_map_sep([b4_parse_param_decl_1], [, ], [b4_parse_param])])])
|
||||||
|
|
||||||
|
m4_define([b4_parse_param_decl_1],
|
||||||
|
[$1_yyarg])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# b4_parse_param_cons
|
||||||
|
# -------------------
|
||||||
|
# Extra initialisations of the constructor.
|
||||||
|
m4_define([b4_parse_param_cons],
|
||||||
|
[m4_ifset([b4_parse_param],
|
||||||
|
[,
|
||||||
|
b4_cc_constructor_calls(b4_parse_param)])])
|
||||||
|
m4_define([b4_cc_constructor_calls],
|
||||||
|
[m4_map_sep([b4_cc_constructor_call], [,
|
||||||
|
], [$@])])
|
||||||
|
m4_define([b4_cc_constructor_call],
|
||||||
|
[$2 ($2_yyarg)])
|
||||||
|
|
||||||
|
# b4_parse_param_vars
|
||||||
|
# -------------------
|
||||||
|
# Extra instance variables.
|
||||||
|
m4_define([b4_parse_param_vars],
|
||||||
|
[m4_ifset([b4_parse_param],
|
||||||
|
[
|
||||||
|
/* User arguments. */
|
||||||
|
b4_cc_var_decls(b4_parse_param)])])
|
||||||
|
m4_define([b4_cc_var_decls],
|
||||||
|
[m4_map_sep([b4_cc_var_decl], [
|
||||||
|
], [$@])])
|
||||||
|
m4_define([b4_cc_var_decl],
|
||||||
|
[ $1;])
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
m4_divert(-1) -*- Autoconf -*-
|
m4_divert(-1) -*- Autoconf -*-
|
||||||
|
|
||||||
# C M4 Macros for Bison.
|
# C M4 Macros for Bison.
|
||||||
# Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
# Copyright (C) 2002, 2004, 2005 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
|
||||||
@@ -15,8 +15,8 @@ m4_divert(-1) -*- Autoconf -*-
|
|||||||
|
|
||||||
# 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, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
# 02111-1307 USA
|
# 02110-1301 USA
|
||||||
|
|
||||||
|
|
||||||
## ---------------- ##
|
## ---------------- ##
|
||||||
@@ -43,8 +43,8 @@ m4_define([b4_copyright],
|
|||||||
|
|
||||||
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, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
Boston, MA 02111-1307, USA. */])
|
Boston, MA 02110-1301, USA. */])
|
||||||
|
|
||||||
|
|
||||||
# b4_identification
|
# b4_identification
|
||||||
@@ -53,6 +53,9 @@ m4_define([b4_identification],
|
|||||||
[/* Identify Bison output. */
|
[/* Identify Bison output. */
|
||||||
[#]define YYBISON 1
|
[#]define YYBISON 1
|
||||||
|
|
||||||
|
/* Bison version. */
|
||||||
|
[#]define YYBISON_VERSION "b4_version"
|
||||||
|
|
||||||
/* Skeleton name. */
|
/* Skeleton name. */
|
||||||
[#]define YYSKELETON_NAME b4_skeleton
|
[#]define YYSKELETON_NAME b4_skeleton
|
||||||
|
|
||||||
@@ -119,7 +122,7 @@ m4_define([b4_int_type],
|
|||||||
|
|
||||||
m4_eval([0 <= $1]), [1], [unsigned int],
|
m4_eval([0 <= $1]), [1], [unsigned int],
|
||||||
|
|
||||||
[int])])
|
[int])])
|
||||||
|
|
||||||
|
|
||||||
# b4_int_type_for(NAME)
|
# b4_int_type_for(NAME)
|
||||||
@@ -166,6 +169,16 @@ m4_define([b4_token_define],
|
|||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
# b4_token_defines(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)
|
||||||
|
# -------------------------------------------------------
|
||||||
|
# Output the definition of the tokens (if there are) as #defines.
|
||||||
|
m4_define([b4_token_defines],
|
||||||
|
[m4_if([$@], [[]], [],
|
||||||
|
[/* Tokens. */
|
||||||
|
m4_map([b4_token_define], [$@])])
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
# b4_token_enum(TOKEN-NAME, TOKEN-NUMBER)
|
# b4_token_enum(TOKEN-NAME, TOKEN-NUMBER)
|
||||||
# ---------------------------------------
|
# ---------------------------------------
|
||||||
# Output the definition of this token as an enum.
|
# Output the definition of this token as an enum.
|
||||||
@@ -173,10 +186,10 @@ m4_define([b4_token_enum],
|
|||||||
[$1 = $2])
|
[$1 = $2])
|
||||||
|
|
||||||
|
|
||||||
# b4_token_defines(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)
|
# b4_token_enums(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)
|
||||||
# -------------------------------------------------------
|
# -----------------------------------------------------
|
||||||
# Output the definition of the tokens (if there are) as enums and #define.
|
# Output the definition of the tokens (if there are) as enums.
|
||||||
m4_define([b4_token_defines],
|
m4_define([b4_token_enums],
|
||||||
[m4_if([$@], [[]], [],
|
[m4_if([$@], [[]], [],
|
||||||
[/* Tokens. */
|
[/* Tokens. */
|
||||||
#ifndef YYTOKENTYPE
|
#ifndef YYTOKENTYPE
|
||||||
@@ -189,8 +202,14 @@ m4_map_sep([ b4_token_enum], [,
|
|||||||
[$@])
|
[$@])
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
m4_map([b4_token_define], [$@])
|
])])
|
||||||
])
|
|
||||||
|
|
||||||
|
# b4_token_enums_defines(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)
|
||||||
|
# -------------------------------------------------------------
|
||||||
|
# Output the definition of the tokens (if there are) as enums and #defines.
|
||||||
|
m4_define([b4_token_enums_defines],
|
||||||
|
[b4_token_enums($@)b4_token_defines($@)
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
@@ -345,7 +364,7 @@ m4_popdef([b4_dollar_dollar])dnl
|
|||||||
# Generate the "yydestruct" function, which declaration is issued using
|
# Generate the "yydestruct" function, which declaration is issued using
|
||||||
# FUNCTION-DECLARATOR, which may be "b4_c_ansi_function_def" for ISO C
|
# FUNCTION-DECLARATOR, which may be "b4_c_ansi_function_def" for ISO C
|
||||||
# or "b4_c_function_def" for K&R.
|
# or "b4_c_function_def" for K&R.
|
||||||
m4_define([b4_yydestruct_generate],
|
m4_define_default([b4_yydestruct_generate],
|
||||||
[[/*-----------------------------------------------.
|
[[/*-----------------------------------------------.
|
||||||
| Release the memory associated to this symbol. |
|
| Release the memory associated to this symbol. |
|
||||||
`-----------------------------------------------*/
|
`-----------------------------------------------*/
|
||||||
@@ -380,7 +399,7 @@ m4_define([b4_yydestruct_generate],
|
|||||||
# Generate the "yysymprint" function, which declaration is issued using
|
# Generate the "yysymprint" function, which declaration is issued using
|
||||||
# FUNCTION-DECLARATOR, which may be "b4_c_ansi_function_def" for ISO C
|
# FUNCTION-DECLARATOR, which may be "b4_c_ansi_function_def" for ISO C
|
||||||
# or "b4_c_function_def" for K&R.
|
# or "b4_c_function_def" for K&R.
|
||||||
m4_define([b4_yysymprint_generate],
|
m4_define_default([b4_yysymprint_generate],
|
||||||
[[/*--------------------------------.
|
[[/*--------------------------------.
|
||||||
| Print this symbol on YYOUTPUT. |
|
| Print this symbol on YYOUTPUT. |
|
||||||
`--------------------------------*/
|
`--------------------------------*/
|
||||||
@@ -403,7 +422,7 @@ b4_location_if([ (void) yylocationp;
|
|||||||
YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
|
YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
|
||||||
|
|
||||||
]b4_location_if([ YY_LOCATION_PRINT (yyoutput, *yylocationp);
|
]b4_location_if([ YY_LOCATION_PRINT (yyoutput, *yylocationp);
|
||||||
fprintf (yyoutput, ": ");
|
YYFPRINTF (yyoutput, ": ");
|
||||||
])dnl
|
])dnl
|
||||||
[
|
[
|
||||||
# ifdef YYPRINT
|
# ifdef YYPRINT
|
||||||
|
|||||||
+497
-227
File diff suppressed because it is too large
Load Diff
+218
-227
@@ -1,6 +1,8 @@
|
|||||||
m4_divert(-1)
|
m4_divert(-1)
|
||||||
|
|
||||||
# C++ skeleton for Bison
|
# C++ skeleton for Bison
|
||||||
# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
|
|
||||||
|
# Copyright (C) 2002, 2003, 2004, 2005 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
|
||||||
@@ -14,98 +16,10 @@ m4_divert(-1)
|
|||||||
|
|
||||||
# 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, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
# 02111-1307 USA
|
# 02110-1301 USA
|
||||||
|
|
||||||
## ---------------- ##
|
|
||||||
## Default values. ##
|
|
||||||
## ---------------- ##
|
|
||||||
|
|
||||||
# Default parser class name.
|
|
||||||
m4_define_default([b4_parser_class_name], [parser])
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## ----------------- ##
|
|
||||||
## Semantic Values. ##
|
|
||||||
## ----------------- ##
|
|
||||||
|
|
||||||
|
|
||||||
# b4_lhs_value([TYPE])
|
|
||||||
# --------------------
|
|
||||||
# Expansion of $<TYPE>$.
|
|
||||||
m4_define([b4_lhs_value],
|
|
||||||
[(yyval[]m4_ifval([$1], [.$1]))])
|
|
||||||
|
|
||||||
|
|
||||||
# b4_rhs_value(RULE-LENGTH, NUM, [TYPE])
|
|
||||||
# --------------------------------------
|
|
||||||
# Expansion of $<TYPE>NUM, where the current rule has RULE-LENGTH
|
|
||||||
# symbols on RHS.
|
|
||||||
m4_define([b4_rhs_value],
|
|
||||||
[(yysemantic_stack_@{m4_eval([$1 - $2])@}m4_ifval([$3], [.$3]))])
|
|
||||||
|
|
||||||
m4_define_default([b4_location_type], [location])
|
|
||||||
m4_define_default([b4_filename_type], [std::string])
|
|
||||||
|
|
||||||
# b4_lhs_location()
|
|
||||||
# -----------------
|
|
||||||
# Expansion of @$.
|
|
||||||
m4_define([b4_lhs_location],
|
|
||||||
[(yyloc)])
|
|
||||||
|
|
||||||
|
|
||||||
# b4_rhs_location(RULE-LENGTH, NUM)
|
|
||||||
# ---------------------------------
|
|
||||||
# Expansion of @NUM, where the current rule has RULE-LENGTH symbols
|
|
||||||
# on RHS.
|
|
||||||
m4_define([b4_rhs_location],
|
|
||||||
[(yylocation_stack_@{m4_eval([$1 - $2])@})])
|
|
||||||
|
|
||||||
|
|
||||||
# b4_parse_param_decl
|
|
||||||
# -------------------
|
|
||||||
# Extra formal arguments of the constructor.
|
|
||||||
# Change the parameter names from "foo" into "foo_yyarg", so that
|
|
||||||
# there is no collision bw the user chosen attribute name, and the
|
|
||||||
# argument name in the constructor.
|
|
||||||
m4_define([b4_parse_param_decl],
|
|
||||||
[m4_ifset([b4_parse_param],
|
|
||||||
[m4_map_sep([b4_parse_param_decl_1], [, ], [b4_parse_param])])])
|
|
||||||
|
|
||||||
m4_define([b4_parse_param_decl_1],
|
|
||||||
[$1_yyarg])
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# b4_parse_param_cons
|
|
||||||
# -------------------
|
|
||||||
# Extra initialisations of the constructor.
|
|
||||||
m4_define([b4_parse_param_cons],
|
|
||||||
[m4_ifset([b4_parse_param],
|
|
||||||
[,
|
|
||||||
b4_cc_constructor_calls(b4_parse_param)])])
|
|
||||||
m4_define([b4_cc_constructor_calls],
|
|
||||||
[m4_map_sep([b4_cc_constructor_call], [,
|
|
||||||
], [$@])])
|
|
||||||
m4_define([b4_cc_constructor_call],
|
|
||||||
[$2 ($2_yyarg)])
|
|
||||||
|
|
||||||
# b4_parse_param_vars
|
|
||||||
# -------------------
|
|
||||||
# Extra instance variables.
|
|
||||||
m4_define([b4_parse_param_vars],
|
|
||||||
[m4_ifset([b4_parse_param],
|
|
||||||
[
|
|
||||||
/* User arguments. */
|
|
||||||
b4_cc_var_decls(b4_parse_param)])])
|
|
||||||
m4_define([b4_cc_var_decls],
|
|
||||||
[m4_map_sep([b4_cc_var_decl], [
|
|
||||||
], [$@])])
|
|
||||||
m4_define([b4_cc_var_decl],
|
|
||||||
[ $1;])
|
|
||||||
|
|
||||||
|
|
||||||
|
m4_include(b4_pkgdatadir/[c++.m4])
|
||||||
|
|
||||||
# We do want M4 expansion after # for CPP macros.
|
# We do want M4 expansion after # for CPP macros.
|
||||||
m4_changecom()
|
m4_changecom()
|
||||||
@@ -113,7 +27,7 @@ m4_divert(0)dnl
|
|||||||
m4_if(b4_defines_flag, 0, [],
|
m4_if(b4_defines_flag, 0, [],
|
||||||
[@output @output_header_name@
|
[@output @output_header_name@
|
||||||
b4_copyright([C++ Skeleton parser for LALR(1) parsing with Bison],
|
b4_copyright([C++ Skeleton parser for LALR(1) parsing with Bison],
|
||||||
[2002, 2003, 2004])[
|
[2002, 2003, 2004, 2005])[
|
||||||
/* FIXME: This is wrong, we want computed header guards.
|
/* FIXME: This is wrong, we want computed header guards.
|
||||||
I don't know why the macros are missing now. :( */
|
I don't know why the macros are missing now. :( */
|
||||||
#ifndef PARSER_HEADER_H
|
#ifndef PARSER_HEADER_H
|
||||||
@@ -131,7 +45,7 @@ namespace yy
|
|||||||
class location;
|
class location;
|
||||||
}
|
}
|
||||||
|
|
||||||
]b4_token_defines(b4_tokens)[
|
]b4_token_enums(b4_tokens)[
|
||||||
|
|
||||||
/* Copy the first part of user declarations. */
|
/* Copy the first part of user declarations. */
|
||||||
]b4_pre_prologue[
|
]b4_pre_prologue[
|
||||||
@@ -147,14 +61,28 @@ b4_syncline([@oline@], [@ofile@])[
|
|||||||
# define YYDEBUG ]b4_debug[
|
# define YYDEBUG ]b4_debug[
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Enabling verbose error message. */
|
/* Enabling verbose error messages. */
|
||||||
#ifndef YYERROR_VERBOSE
|
#ifdef YYERROR_VERBOSE
|
||||||
|
# undef YYERROR_VERBOSE
|
||||||
|
# define YYERROR_VERBOSE 1
|
||||||
|
#else
|
||||||
# define YYERROR_VERBOSE ]b4_error_verbose[
|
# define YYERROR_VERBOSE ]b4_error_verbose[
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if YYERROR_VERBOSE
|
||||||
|
# define YYERROR_VERBOSE_IF(x) x
|
||||||
|
#else
|
||||||
|
# define YYERROR_VERBOSE_IF(x) /* empty */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Enabling the token table. */
|
||||||
|
#ifndef YYTOKEN_TABLE
|
||||||
|
# define YYTOKEN_TABLE ]b4_token_table[
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
|
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
|
||||||
]m4_ifdef([b4_stype],
|
]m4_ifdef([b4_stype],
|
||||||
[b4_syncline([b4_stype_line], [b4_filename])
|
[b4_syncline([b4_stype_line], [b4_file_name])
|
||||||
union YYSTYPE b4_stype;
|
union YYSTYPE b4_stype;
|
||||||
/* Line __line__ of lalr1.cc. */
|
/* Line __line__ of lalr1.cc. */
|
||||||
b4_syncline([@oline@], [@ofile@])],
|
b4_syncline([@oline@], [@ofile@])],
|
||||||
@@ -247,17 +175,14 @@ namespace yy
|
|||||||
void set_debug_level (debug_level_type l);
|
void set_debug_level (debug_level_type l);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
/// Call the scanner.
|
|
||||||
virtual void yylex_ ();
|
|
||||||
|
|
||||||
/// Report a syntax error.
|
/// Report a syntax error.
|
||||||
/// \param loc where the syntax error is found.
|
/// \param loc where the syntax error is found.
|
||||||
/// \param msg a description of the syntax error.
|
/// \param msg a description of the syntax error.
|
||||||
virtual void error (const location_type& loc, const std::string& msg);
|
virtual void error (const location_type& loc, const std::string& msg);
|
||||||
|
|
||||||
/// Generate an error message, and invoke error.
|
/// Generate an error message.
|
||||||
virtual void yyreport_syntax_error_ ();
|
/// \param tok the look-ahead token.
|
||||||
|
virtual std::string yysyntax_error_ (YYERROR_VERBOSE_IF (int tok));
|
||||||
|
|
||||||
#if YYDEBUG
|
#if YYDEBUG
|
||||||
/// \brief Report a symbol on the debug stream.
|
/// \brief Report a symbol on the debug stream.
|
||||||
@@ -319,9 +244,14 @@ namespace yy
|
|||||||
/// For a rule, its RHS length.
|
/// For a rule, its RHS length.
|
||||||
static const ]b4_int_type_for([b4_r2])[ yyr2_[];
|
static const ]b4_int_type_for([b4_r2])[ yyr2_[];
|
||||||
|
|
||||||
#if YYDEBUG || YYERROR_VERBOSE
|
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
|
||||||
/// For a symbol, its name in clear.
|
/// For a symbol, its name in clear.
|
||||||
static const char* const yyname_[];
|
static const char* const yytname_[];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if YYERROR_VERBOSE
|
||||||
|
/// Convert the symbol name \a n to a form suitable for a diagnostic.
|
||||||
|
virtual std::string yytnamerr_ (const char *n);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if YYDEBUG
|
#if YYDEBUG
|
||||||
@@ -383,21 +313,6 @@ namespace yy
|
|||||||
int yydebug_;
|
int yydebug_;
|
||||||
std::ostream* yycdebug_;
|
std::ostream* yycdebug_;
|
||||||
|
|
||||||
/* Look-ahead and look-ahead in internal form. */
|
|
||||||
int yylooka_;
|
|
||||||
int yyilooka_;
|
|
||||||
|
|
||||||
/// Semantic value of the look-ahead.
|
|
||||||
semantic_type yylval;
|
|
||||||
/// Location of the look-ahead.
|
|
||||||
location_type yylloc;
|
|
||||||
/// The locations where the error started and ended.
|
|
||||||
location yyerror_range_[2];
|
|
||||||
|
|
||||||
/// $$.
|
|
||||||
semantic_type yyval;
|
|
||||||
/// @@$.
|
|
||||||
location_type yyloc;
|
|
||||||
]b4_parse_param_vars[
|
]b4_parse_param_vars[
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -406,7 +321,7 @@ namespace yy
|
|||||||
])dnl
|
])dnl
|
||||||
@output @output_parser_name@
|
@output @output_parser_name@
|
||||||
b4_copyright([C++ Skeleton parser for LALR(1) parsing with Bison],
|
b4_copyright([C++ Skeleton parser for LALR(1) parsing with Bison],
|
||||||
[2002, 2003, 2004])
|
[2002, 2003, 2004, 2005])
|
||||||
m4_if(b4_prefix[], [yy], [],
|
m4_if(b4_prefix[], [yy], [],
|
||||||
[
|
[
|
||||||
// Take the name prefix into account.
|
// Take the name prefix into account.
|
||||||
@@ -415,6 +330,18 @@ m4_if(b4_defines_flag, 0, [],
|
|||||||
[
|
[
|
||||||
#include @output_header_name@])[
|
#include @output_header_name@])[
|
||||||
|
|
||||||
|
#ifndef YY_
|
||||||
|
# if YYENABLE_NLS
|
||||||
|
# if ENABLE_NLS
|
||||||
|
# include <libintl.h> /* FIXME: INFRINGES ON USER NAME SPACE */
|
||||||
|
# define YY_(msgid) dgettext ("bison-runtime", msgid)
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
# ifndef YY_
|
||||||
|
# define YY_(msgid) msgid
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* A pseudo ostream that takes yydebug_ into account. */
|
/* A pseudo ostream that takes yydebug_ into account. */
|
||||||
# define YYCDEBUG \
|
# define YYCDEBUG \
|
||||||
for (bool yydebugcond_ = yydebug_; yydebugcond_; yydebugcond_ = false) \
|
for (bool yydebugcond_ = yydebug_; yydebugcond_; yydebugcond_ = false) \
|
||||||
@@ -457,6 +384,47 @@ do { \
|
|||||||
#define YYABORT goto yyabortlab
|
#define YYABORT goto yyabortlab
|
||||||
#define YYERROR goto yyerrorlab
|
#define YYERROR goto yyerrorlab
|
||||||
|
|
||||||
|
#if YYERROR_VERBOSE
|
||||||
|
|
||||||
|
/* Return YYSTR after stripping away unnecessary quotes and
|
||||||
|
backslashes, so that it's suitable for yyerror. The heuristic is
|
||||||
|
that double-quoting is unnecessary unless the string contains an
|
||||||
|
apostrophe, a comma, or backslash (other than backslash-backslash).
|
||||||
|
YYSTR is taken from yytname. */
|
||||||
|
std::string
|
||||||
|
yy::]b4_parser_class_name[::yytnamerr_ (const char *yystr)
|
||||||
|
{
|
||||||
|
if (*yystr == '"')
|
||||||
|
{
|
||||||
|
std::string yyr = "";
|
||||||
|
char const *yyp = yystr;
|
||||||
|
|
||||||
|
for (;;)
|
||||||
|
switch (*++yyp)
|
||||||
|
{
|
||||||
|
case '\'':
|
||||||
|
case ',':
|
||||||
|
goto do_not_strip_quotes;
|
||||||
|
|
||||||
|
case '\\':
|
||||||
|
if (*++yyp != '\\')
|
||||||
|
goto do_not_strip_quotes;
|
||||||
|
/* Fall through. */
|
||||||
|
default:
|
||||||
|
yyr += *yyp;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '"':
|
||||||
|
return yyr;
|
||||||
|
}
|
||||||
|
do_not_strip_quotes: ;
|
||||||
|
}
|
||||||
|
|
||||||
|
return yystr;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#if YYDEBUG
|
#if YYDEBUG
|
||||||
/*--------------------------------.
|
/*--------------------------------.
|
||||||
| Print this symbol on YYOUTPUT. |
|
| Print this symbol on YYOUTPUT. |
|
||||||
@@ -474,7 +442,7 @@ yy::]b4_parser_class_name[::yysymprint_ (int yytype,
|
|||||||
(void) cdebug_;
|
(void) cdebug_;
|
||||||
|
|
||||||
*yycdebug_ << (yytype < yyntokens_ ? "token" : "nterm")
|
*yycdebug_ << (yytype < yyntokens_ ? "token" : "nterm")
|
||||||
<< ' ' << yyname_[yytype] << " ("
|
<< ' ' << yytname_[yytype] << " ("
|
||||||
<< *yylocationp << ": ";
|
<< *yylocationp << ": ";
|
||||||
switch (yytype)
|
switch (yytype)
|
||||||
{
|
{
|
||||||
@@ -542,6 +510,24 @@ yy::]b4_parser_class_name[::set_debug_level (debug_level_type l)
|
|||||||
int
|
int
|
||||||
yy::]b4_parser_class_name[::parse ()
|
yy::]b4_parser_class_name[::parse ()
|
||||||
{
|
{
|
||||||
|
/* Look-ahead and look-ahead in internal form. */
|
||||||
|
int yylooka;
|
||||||
|
int yyilooka;
|
||||||
|
|
||||||
|
/// Semantic value of the look-ahead.
|
||||||
|
semantic_type yylval;
|
||||||
|
/// Location of the look-ahead.
|
||||||
|
location_type yylloc;
|
||||||
|
/// The locations where the error started and ended.
|
||||||
|
location yyerror_range[2];
|
||||||
|
|
||||||
|
/// $$.
|
||||||
|
semantic_type yyval;
|
||||||
|
/// @@$.
|
||||||
|
location_type yyloc;
|
||||||
|
|
||||||
|
int yyresult_;
|
||||||
|
|
||||||
YYCDEBUG << "Starting parse" << std::endl;
|
YYCDEBUG << "Starting parse" << std::endl;
|
||||||
|
|
||||||
yynerrs_ = 0;
|
yynerrs_ = 0;
|
||||||
@@ -549,7 +535,7 @@ yy::]b4_parser_class_name[::parse ()
|
|||||||
|
|
||||||
/* Start. */
|
/* Start. */
|
||||||
yystate_ = 0;
|
yystate_ = 0;
|
||||||
yylooka_ = yyempty_;
|
yylooka = yyempty_;
|
||||||
|
|
||||||
]m4_ifdef([b4_initial_action], [
|
]m4_ifdef([b4_initial_action], [
|
||||||
m4_pushdef([b4_at_dollar], [yylloc])dnl
|
m4_pushdef([b4_at_dollar], [yylloc])dnl
|
||||||
@@ -586,25 +572,32 @@ yybackup:
|
|||||||
goto yydefault;
|
goto yydefault;
|
||||||
|
|
||||||
/* Read a look-ahead token. */
|
/* Read a look-ahead token. */
|
||||||
if (yylooka_ == yyempty_)
|
if (yylooka == yyempty_)
|
||||||
yylex_ ();
|
{
|
||||||
|
YYCDEBUG << "Reading a token: ";
|
||||||
|
yylooka = ]b4_c_function_call([yylex], [int],
|
||||||
|
[[YYSTYPE*], [&yylval]][]dnl
|
||||||
|
b4_location_if([, [[location*], [&yylloc]]])dnl
|
||||||
|
m4_ifdef([b4_lex_param], [, ]b4_lex_param))[;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Convert token to internal form. */
|
/* Convert token to internal form. */
|
||||||
if (yylooka_ <= yyeof_)
|
if (yylooka <= yyeof_)
|
||||||
{
|
{
|
||||||
yylooka_ = yyilooka_ = yyeof_;
|
yylooka = yyilooka = yyeof_;
|
||||||
YYCDEBUG << "Now at end of input." << std::endl;
|
YYCDEBUG << "Now at end of input." << std::endl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
yyilooka_ = yytranslate_ (yylooka_);
|
yyilooka = yytranslate_ (yylooka);
|
||||||
YY_SYMBOL_PRINT ("Next token is", yyilooka_, &yylval, &yylloc);
|
YY_SYMBOL_PRINT ("Next token is", yyilooka, &yylval, &yylloc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If the proper action on seeing token ILOOKA_ is to reduce or to
|
/* If the proper action on seeing token ILOOKA_ is to reduce or to
|
||||||
detect an error, take that action. */
|
detect an error, take that action. */
|
||||||
yyn_ += yyilooka_;
|
yyn_ += yyilooka;
|
||||||
if (yyn_ < 0 || yylast_ < yyn_ || yycheck_[yyn_] != yyilooka_)
|
if (yyn_ < 0 || yylast_ < yyn_ || yycheck_[yyn_] != yyilooka)
|
||||||
goto yydefault;
|
goto yydefault;
|
||||||
|
|
||||||
/* Reduce or error. */
|
/* Reduce or error. */
|
||||||
@@ -627,11 +620,11 @@ yybackup:
|
|||||||
goto yyacceptlab;
|
goto yyacceptlab;
|
||||||
|
|
||||||
/* Shift the look-ahead token. */
|
/* Shift the look-ahead token. */
|
||||||
YY_SYMBOL_PRINT ("Shifting", yyilooka_, &yylval, &yylloc);
|
YY_SYMBOL_PRINT ("Shifting", yyilooka, &yylval, &yylloc);
|
||||||
|
|
||||||
/* Discard the token being shifted unless it is eof. */
|
/* Discard the token being shifted unless it is eof. */
|
||||||
if (yylooka_ != yyeof_)
|
if (yylooka != yyeof_)
|
||||||
yylooka_ = yyempty_;
|
yylooka = yyempty_;
|
||||||
|
|
||||||
yysemantic_stack_.push (yylval);
|
yysemantic_stack_.push (yylval);
|
||||||
yylocation_stack_.push (yylloc);
|
yylocation_stack_.push (yylloc);
|
||||||
@@ -677,6 +670,7 @@ yyreduce:
|
|||||||
switch (yyn_)
|
switch (yyn_)
|
||||||
{
|
{
|
||||||
]b4_actions[
|
]b4_actions[
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
]/* Line __line__ of lalr1.cc. */
|
]/* Line __line__ of lalr1.cc. */
|
||||||
@@ -704,36 +698,28 @@ b4_syncline([@oline@], [@ofile@])[
|
|||||||
`------------------------------------*/
|
`------------------------------------*/
|
||||||
yyerrlab:
|
yyerrlab:
|
||||||
/* If not already recovering from an error, report this error. */
|
/* If not already recovering from an error, report this error. */
|
||||||
yyreport_syntax_error_ ();
|
if (!yyerrstatus_)
|
||||||
|
{
|
||||||
|
++yynerrs_;
|
||||||
|
error (yylloc, yysyntax_error_ (YYERROR_VERBOSE_IF (yyilooka)));
|
||||||
|
}
|
||||||
|
|
||||||
yyerror_range_[0] = yylloc;
|
yyerror_range[0] = yylloc;
|
||||||
if (yyerrstatus_ == 3)
|
if (yyerrstatus_ == 3)
|
||||||
{
|
{
|
||||||
/* If just tried and failed to reuse look-ahead token after an
|
/* If just tried and failed to reuse look-ahead token after an
|
||||||
error, discard it. */
|
error, discard it. */
|
||||||
|
|
||||||
/* Return failure if at end of input. */
|
if (yylooka <= yyeof_)
|
||||||
if (yylooka_ <= yyeof_)
|
|
||||||
{
|
{
|
||||||
/* If at end of input, pop the error token,
|
/* Return failure if at end of input. */
|
||||||
then the rest of the stack, then return failure. */
|
if (yylooka == yyeof_)
|
||||||
if (yylooka_ == yyeof_)
|
YYABORT;
|
||||||
for (;;)
|
|
||||||
{
|
|
||||||
yyerror_range_[0] = yylocation_stack_[0];
|
|
||||||
yypop_ ();
|
|
||||||
if (yystate_stack_.height () == 1)
|
|
||||||
YYABORT;
|
|
||||||
yydestruct_ ("Error: popping",
|
|
||||||
yystos_[yystate_stack_[0]],
|
|
||||||
&yysemantic_stack_[0],
|
|
||||||
&yylocation_stack_[0]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
yydestruct_ ("Error: discarding", yyilooka_, &yylval, &yylloc);
|
yydestruct_ ("Error: discarding", yyilooka, &yylval, &yylloc);
|
||||||
yylooka_ = yyempty_;
|
yylooka = yyempty_;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -747,14 +733,13 @@ yyerrlab:
|
|||||||
`---------------------------------------------------*/
|
`---------------------------------------------------*/
|
||||||
yyerrorlab:
|
yyerrorlab:
|
||||||
|
|
||||||
#ifdef __GNUC__
|
/* Pacify compilers like GCC when the user code never invokes
|
||||||
/* Pacify GCC when the user code never invokes YYERROR and the label
|
YYERROR and the label yyerrorlab therefore never appears in user
|
||||||
yyerrorlab therefore never appears in user code. */
|
code. */
|
||||||
if (0)
|
if (false)
|
||||||
goto yyerrorlab;
|
goto yyerrorlab;
|
||||||
#endif
|
|
||||||
|
|
||||||
yyerror_range_[0] = yylocation_stack_[yylen_ - 1];
|
yyerror_range[0] = yylocation_stack_[yylen_ - 1];
|
||||||
yypop_ (yylen_);
|
yypop_ (yylen_);
|
||||||
yystate_ = yystate_stack_[0];
|
yystate_ = yystate_stack_[0];
|
||||||
goto yyerrlab1;
|
goto yyerrlab1;
|
||||||
@@ -783,7 +768,7 @@ yyerrlab1:
|
|||||||
if (yystate_stack_.height () == 1)
|
if (yystate_stack_.height () == 1)
|
||||||
YYABORT;
|
YYABORT;
|
||||||
|
|
||||||
yyerror_range_[0] = yylocation_stack_[0];
|
yyerror_range[0] = 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]);
|
||||||
@@ -795,10 +780,10 @@ yyerrlab1:
|
|||||||
if (yyn_ == yyfinal_)
|
if (yyn_ == yyfinal_)
|
||||||
goto yyacceptlab;
|
goto yyacceptlab;
|
||||||
|
|
||||||
yyerror_range_[1] = yylloc;
|
yyerror_range[1] = yylloc;
|
||||||
// Using YYLLOC is tempting, but would change the location of
|
// Using YYLLOC is tempting, but would change the location of
|
||||||
// the look-ahead. YYLOC is available though.
|
// the look-ahead. YYLOC is available though.
|
||||||
YYLLOC_DEFAULT (yyloc, yyerror_range_ - 1, 2);
|
YYLLOC_DEFAULT (yyloc, yyerror_range - 1, 2);
|
||||||
yysemantic_stack_.push (yylval);
|
yysemantic_stack_.push (yylval);
|
||||||
yylocation_stack_.push (yyloc);
|
yylocation_stack_.push (yyloc);
|
||||||
|
|
||||||
@@ -811,70 +796,76 @@ yyerrlab1:
|
|||||||
|
|
||||||
/* Accept. */
|
/* Accept. */
|
||||||
yyacceptlab:
|
yyacceptlab:
|
||||||
return 0;
|
yyresult_ = 0;
|
||||||
|
goto yyreturn;
|
||||||
|
|
||||||
/* Abort. */
|
/* Abort. */
|
||||||
yyabortlab:
|
yyabortlab:
|
||||||
/* Free the lookahead. */
|
yyresult_ = 1;
|
||||||
yydestruct_ ("Error: discarding lookahead", yyilooka_, &yylval, &yylloc);
|
goto yyreturn;
|
||||||
yylooka_ = yyempty_;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
yyreturn:
|
||||||
yy::]b4_parser_class_name[::yylex_ ()
|
if (yylooka != yyeof_ && yylooka != yyempty_)
|
||||||
{
|
yydestruct_ ("Cleanup: discarding lookahead", yyilooka, &yylval, &yylloc);
|
||||||
YYCDEBUG << "Reading a token: ";
|
|
||||||
#if YYLSP_NEEDED
|
|
||||||
yylooka_ = yylex (&yylval, &yylloc);
|
|
||||||
#else
|
|
||||||
yylooka_ = yylex (&yylval);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
// Generate an error message, and invoke error.
|
while (yystate_stack_.height () != 1)
|
||||||
void
|
|
||||||
yy::]b4_parser_class_name[::yyreport_syntax_error_ ()
|
|
||||||
{
|
|
||||||
/* If not already recovering from an error, report this error. */
|
|
||||||
if (!yyerrstatus_)
|
|
||||||
{
|
{
|
||||||
++yynerrs_;
|
yydestruct_ ("Cleanup: popping",
|
||||||
std::string message;
|
yystos_[yystate_stack_[0]],
|
||||||
#if YYERROR_VERBOSE
|
&yysemantic_stack_[0],
|
||||||
yyn_ = yypact_[yystate_];
|
&yylocation_stack_[0]);
|
||||||
if (yypact_ninf_ < yyn_ && yyn_ < yylast_)
|
yypop_ ();
|
||||||
{
|
}
|
||||||
/* Start YYX at -YYN if negative to avoid negative indexes in
|
|
||||||
YYCHECK. */
|
|
||||||
int yyxbegin = yyn_ < 0 ? -yyn_ : 0;
|
|
||||||
|
|
||||||
/* Stay within bounds of both yycheck and yytname. */
|
return yyresult_;
|
||||||
int yychecklim = yylast_ - yyn_;
|
}
|
||||||
int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_;
|
|
||||||
int count = 0;
|
// Generate an error message.
|
||||||
|
std::string
|
||||||
|
yy::]b4_parser_class_name[::yysyntax_error_ (YYERROR_VERBOSE_IF (int tok))
|
||||||
|
{
|
||||||
|
std::string res;
|
||||||
|
#if YYERROR_VERBOSE
|
||||||
|
yyn_ = yypact_[yystate_];
|
||||||
|
if (yypact_ninf_ < yyn_ && yyn_ < yylast_)
|
||||||
|
{
|
||||||
|
/* Start YYX at -YYN if negative to avoid negative indexes in
|
||||||
|
YYCHECK. */
|
||||||
|
int yyxbegin = yyn_ < 0 ? -yyn_ : 0;
|
||||||
|
|
||||||
|
/* Stay within bounds of both yycheck and yytname. */
|
||||||
|
int yychecklim = yylast_ - yyn_;
|
||||||
|
int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_;
|
||||||
|
int count = 0;
|
||||||
|
for (int x = yyxbegin; x < yyxend; ++x)
|
||||||
|
if (yycheck_[x + yyn_] == x && x != yyterror_)
|
||||||
|
++count;
|
||||||
|
|
||||||
|
// FIXME: This method of building the message is not compatible
|
||||||
|
// with internationalization. It should work like yacc.c does it.
|
||||||
|
// That is, first build a string that looks like this:
|
||||||
|
// "syntax error, unexpected %s or %s or %s"
|
||||||
|
// Then, invoke YY_ on this string.
|
||||||
|
// Finally, use the string as a format to output
|
||||||
|
// yytname_[tok], etc.
|
||||||
|
// Until this gets fixed, this message appears in English only.
|
||||||
|
res = "syntax error, unexpected ";
|
||||||
|
res += yytnamerr_ (yytname_[tok]);
|
||||||
|
if (count < 5)
|
||||||
|
{
|
||||||
|
count = 0;
|
||||||
for (int x = yyxbegin; x < yyxend; ++x)
|
for (int x = yyxbegin; x < yyxend; ++x)
|
||||||
if (yycheck_[x + yyn_] == x && x != yyterror_)
|
if (yycheck_[x + yyn_] == x && x != yyterror_)
|
||||||
++count;
|
{
|
||||||
|
res += (!count++) ? ", expecting " : " or ";
|
||||||
message = "syntax error, unexpected ";
|
res += yytnamerr_ (yytname_[x]);
|
||||||
message += yyname_[yyilooka_];
|
}
|
||||||
if (count < 5)
|
}
|
||||||
{
|
|
||||||
count = 0;
|
|
||||||
for (int x = yyxbegin; x < yyxend; ++x)
|
|
||||||
if (yycheck_[x + yyn_] == x && x != yyterror_)
|
|
||||||
{
|
|
||||||
message += (!count++) ? ", expecting " : " or ";
|
|
||||||
message += yyname_[x];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
message = "syntax error";
|
|
||||||
error (yylloc, message);
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
res = YY_("syntax error");
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -959,11 +950,11 @@ yy::]b4_parser_class_name[::yyr2_[] =
|
|||||||
]b4_r2[
|
]b4_r2[
|
||||||
};
|
};
|
||||||
|
|
||||||
#if YYDEBUG || YYERROR_VERBOSE
|
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
|
||||||
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
|
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
|
||||||
First, the terminals, then, starting at \a yyntokens_, nonterminals. */
|
First, the terminals, then, starting at \a yyntokens_, nonterminals. */
|
||||||
const char*
|
const char*
|
||||||
const yy::]b4_parser_class_name[::yyname_[] =
|
const yy::]b4_parser_class_name[::yytname_[] =
|
||||||
{
|
{
|
||||||
]b4_tname[
|
]b4_tname[
|
||||||
};
|
};
|
||||||
@@ -1009,12 +1000,12 @@ yy::]b4_parser_class_name[::yyreduce_print_ (int yyrule)
|
|||||||
{
|
{
|
||||||
unsigned int yylno = yyrline_[yyrule];
|
unsigned int yylno = yyrline_[yyrule];
|
||||||
/* Print the symbols being reduced, and their result. */
|
/* Print the symbols being reduced, and their result. */
|
||||||
*yycdebug_ << "Reducing stack by rule " << yyn_ - 1
|
*yycdebug_ << "Reducing stack by rule " << yyn_ - 1
|
||||||
<< " (line " << yylno << "), ";
|
<< " (line " << yylno << "), ";
|
||||||
for (]b4_int_type_for([b4_prhs])[ i = yyprhs_[yyn_];
|
for (]b4_int_type_for([b4_prhs])[ i = yyprhs_[yyn_];
|
||||||
0 <= yyrhs_[i]; ++i)
|
0 <= yyrhs_[i]; ++i)
|
||||||
*yycdebug_ << yyname_[yyrhs_[i]] << ' ';
|
*yycdebug_ << yytname_[yyrhs_[i]] << ' ';
|
||||||
*yycdebug_ << "-> " << yyname_[yyr1_[yyn_]] << std::endl;
|
*yycdebug_ << "-> " << yytname_[yyr1_[yyn_]] << std::endl;
|
||||||
}
|
}
|
||||||
#endif // YYDEBUG
|
#endif // YYDEBUG
|
||||||
|
|
||||||
@@ -1049,7 +1040,7 @@ const yy::]b4_parser_class_name[::token_number_type yy::]b4_parser_class_name[::
|
|||||||
]b4_epilogue
|
]b4_epilogue
|
||||||
dnl
|
dnl
|
||||||
@output stack.hh
|
@output stack.hh
|
||||||
b4_copyright([stack handling for Bison C++ parsers], [2002, 2003, 2004])[
|
b4_copyright([stack handling for Bison C++ parsers], [2002, 2003, 2004, 2005])[
|
||||||
|
|
||||||
#ifndef BISON_STACK_HH
|
#ifndef BISON_STACK_HH
|
||||||
# define BISON_STACK_HH
|
# define BISON_STACK_HH
|
||||||
@@ -1148,7 +1139,7 @@ namespace yy
|
|||||||
#endif // not BISON_STACK_HH]
|
#endif // not BISON_STACK_HH]
|
||||||
dnl
|
dnl
|
||||||
@output position.hh
|
@output position.hh
|
||||||
b4_copyright([Position class for Bison C++ parsers], [2002, 2003, 2004])[
|
b4_copyright([Position class for Bison C++ parsers], [2002, 2003, 2004, 2005])[
|
||||||
|
|
||||||
/**
|
/**
|
||||||
** \file position.hh
|
** \file position.hh
|
||||||
@@ -1261,7 +1252,7 @@ namespace yy
|
|||||||
}
|
}
|
||||||
#endif // not BISON_POSITION_HH]
|
#endif // not BISON_POSITION_HH]
|
||||||
@output location.hh
|
@output location.hh
|
||||||
b4_copyright([Location class for Bison C++ parsers], [2002, 2003, 2004])[
|
b4_copyright([Location class for Bison C++ parsers], [2002, 2003, 2004, 2005])[
|
||||||
|
|
||||||
/**
|
/**
|
||||||
** \file location.hh
|
** \file location.hh
|
||||||
|
|||||||
+339
-375
File diff suppressed because it is too large
Load Diff
+246
-117
@@ -1,7 +1,8 @@
|
|||||||
m4_divert(-1) -*- C -*-
|
m4_divert(-1) -*- C -*-
|
||||||
|
|
||||||
# Yacc compatible skeleton for Bison
|
# Yacc compatible skeleton for Bison
|
||||||
# Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004
|
|
||||||
|
# Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005
|
||||||
# Free Software Foundation, Inc.
|
# 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
|
||||||
@@ -16,8 +17,8 @@ m4_divert(-1) -*- C -*-
|
|||||||
|
|
||||||
# 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, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
# 02111-1307 USA
|
# 02110-1301 USA
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -81,7 +82,7 @@ m4_define([b4_int_type],
|
|||||||
|
|
||||||
m4_eval([0 <= $1]), [1], [unsigned int],
|
m4_eval([0 <= $1]), [1], [unsigned int],
|
||||||
|
|
||||||
[int])])
|
[int])])
|
||||||
|
|
||||||
|
|
||||||
## ----------------- ##
|
## ----------------- ##
|
||||||
@@ -134,7 +135,7 @@ m4_changecom()
|
|||||||
m4_divert(0)dnl
|
m4_divert(0)dnl
|
||||||
@output @output_parser_name@
|
@output @output_parser_name@
|
||||||
b4_copyright([Skeleton parser for Yacc-like parsing with Bison],
|
b4_copyright([Skeleton parser for Yacc-like parsing with Bison],
|
||||||
[1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004])[
|
[1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005])[
|
||||||
|
|
||||||
/* As a special exception, when this file is copied by Bison into a
|
/* As a special exception, when this file is copied by Bison into a
|
||||||
Bison output file, you may use that output file without restriction.
|
Bison output file, you may use that output file without restriction.
|
||||||
@@ -163,7 +164,7 @@ m4_if(b4_prefix[], [yy], [],
|
|||||||
#define yynerrs b4_prefix[]nerrs
|
#define yynerrs b4_prefix[]nerrs
|
||||||
b4_location_if([#define yylloc b4_prefix[]lloc])])[
|
b4_location_if([#define yylloc b4_prefix[]lloc])])[
|
||||||
|
|
||||||
]b4_token_defines(b4_tokens)[
|
]b4_token_enums_defines(b4_tokens)[
|
||||||
|
|
||||||
/* Copy the first part of user declarations. */
|
/* Copy the first part of user declarations. */
|
||||||
]b4_pre_prologue[
|
]b4_pre_prologue[
|
||||||
@@ -181,9 +182,14 @@ b4_location_if([#define yylloc b4_prefix[]lloc])])[
|
|||||||
# define YYERROR_VERBOSE ]b4_error_verbose[
|
# define YYERROR_VERBOSE ]b4_error_verbose[
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Enabling the token table. */
|
||||||
|
#ifndef YYTOKEN_TABLE
|
||||||
|
# define YYTOKEN_TABLE ]b4_token_table[
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
|
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
|
||||||
]m4_ifdef([b4_stype],
|
]m4_ifdef([b4_stype],
|
||||||
[b4_syncline([b4_stype_line], [b4_filename])
|
[b4_syncline([b4_stype_line], [b4_file_name])
|
||||||
typedef union m4_bregexp(b4_stype, [^{], [YYSTYPE ])b4_stype YYSTYPE;
|
typedef union m4_bregexp(b4_stype, [^{], [YYSTYPE ])b4_stype YYSTYPE;
|
||||||
/* Line __line__ of yacc.c. */
|
/* Line __line__ of yacc.c. */
|
||||||
b4_syncline([@oline@], [@ofile@])],
|
b4_syncline([@oline@], [@ofile@])],
|
||||||
@@ -213,14 +219,33 @@ typedef struct YYLTYPE
|
|||||||
/* Line __line__ of yacc.c. */
|
/* Line __line__ of yacc.c. */
|
||||||
b4_syncline([@oline@], [@ofile@])[
|
b4_syncline([@oline@], [@ofile@])[
|
||||||
|
|
||||||
#if ! defined (yyoverflow) || YYERROR_VERBOSE
|
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
|
||||||
|
# define YYSIZE_T __SIZE_TYPE__
|
||||||
|
#endif
|
||||||
|
#if ! defined (YYSIZE_T) && defined (size_t)
|
||||||
|
# define YYSIZE_T size_t
|
||||||
|
#endif
|
||||||
|
#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
|
||||||
|
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
|
||||||
|
# define YYSIZE_T size_t
|
||||||
|
#endif
|
||||||
|
#if ! defined (YYSIZE_T)
|
||||||
|
# define YYSIZE_T unsigned int
|
||||||
|
#endif
|
||||||
|
|
||||||
# ifndef YYFREE
|
#ifndef YY_
|
||||||
# define YYFREE free
|
# if YYENABLE_NLS
|
||||||
|
# if ENABLE_NLS
|
||||||
|
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
|
||||||
|
# define YY_(msgid) dgettext ("bison-runtime", msgid)
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# ifndef YYMALLOC
|
# ifndef YY_
|
||||||
# define YYMALLOC malloc
|
# define YY_(msgid) msgid
|
||||||
# endif
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if ! defined (yyoverflow) || YYERROR_VERBOSE
|
||||||
|
|
||||||
/* The parser invokes alloca or malloc; define the necessary symbols. */
|
/* The parser invokes alloca or malloc; define the necessary symbols. */
|
||||||
|
|
||||||
@@ -230,6 +255,10 @@ b4_syncline([@oline@], [@ofile@])[
|
|||||||
# define YYSTACK_ALLOC __builtin_alloca
|
# define YYSTACK_ALLOC __builtin_alloca
|
||||||
# else
|
# else
|
||||||
# define YYSTACK_ALLOC alloca
|
# define YYSTACK_ALLOC alloca
|
||||||
|
# if defined (__STDC__) || defined (__cplusplus)
|
||||||
|
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
|
||||||
|
# define YYINCLUDED_STDLIB_H
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
@@ -237,13 +266,39 @@ b4_syncline([@oline@], [@ofile@])[
|
|||||||
# ifdef YYSTACK_ALLOC
|
# ifdef YYSTACK_ALLOC
|
||||||
/* Pacify GCC's `empty if-body' warning. */
|
/* Pacify GCC's `empty if-body' warning. */
|
||||||
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
|
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
|
||||||
# else
|
# ifndef YYSTACK_ALLOC_MAXIMUM
|
||||||
# if defined (__STDC__) || defined (__cplusplus)
|
/* The OS might guarantee only one guard page at the bottom of the stack,
|
||||||
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
|
and a page size can be as small as 4096 bytes. So we cannot safely
|
||||||
# define YYSIZE_T size_t
|
invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
|
||||||
|
to allow for a few compiler-allocated temporary stack slots. */
|
||||||
|
# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
|
||||||
# endif
|
# endif
|
||||||
|
# else
|
||||||
# define YYSTACK_ALLOC YYMALLOC
|
# define YYSTACK_ALLOC YYMALLOC
|
||||||
# define YYSTACK_FREE YYFREE
|
# define YYSTACK_FREE YYFREE
|
||||||
|
# ifndef YYSTACK_ALLOC_MAXIMUM
|
||||||
|
# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
|
||||||
|
# endif
|
||||||
|
# ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
# endif
|
||||||
|
# ifndef YYMALLOC
|
||||||
|
# define YYMALLOC malloc
|
||||||
|
# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
|
||||||
|
&& (defined (__STDC__) || defined (__cplusplus)))
|
||||||
|
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
# ifndef YYFREE
|
||||||
|
# define YYFREE free
|
||||||
|
# if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
|
||||||
|
&& (defined (__STDC__) || defined (__cplusplus)))
|
||||||
|
void free (void *); /* INFRINGES ON USER NAME SPACE */
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
# ifdef __cplusplus
|
||||||
|
}
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
|
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
|
||||||
|
|
||||||
@@ -285,7 +340,7 @@ union yyalloc
|
|||||||
# define YYCOPY(To, From, Count) \
|
# define YYCOPY(To, From, Count) \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
register YYSIZE_T yyi; \
|
YYSIZE_T yyi; \
|
||||||
for (yyi = 0; yyi < (Count); yyi++) \
|
for (yyi = 0; yyi < (Count); yyi++) \
|
||||||
(To)[yyi] = (From)[yyi]; \
|
(To)[yyi] = (From)[yyi]; \
|
||||||
} \
|
} \
|
||||||
@@ -335,7 +390,7 @@ union yyalloc
|
|||||||
#define YYUNDEFTOK ]b4_undef_token_number[
|
#define YYUNDEFTOK ]b4_undef_token_number[
|
||||||
#define YYMAXUTOK ]b4_user_token_number_max[
|
#define YYMAXUTOK ]b4_user_token_number_max[
|
||||||
|
|
||||||
#define YYTRANSLATE(YYX) \
|
#define YYTRANSLATE(YYX) \
|
||||||
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
|
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
|
||||||
|
|
||||||
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
|
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
|
||||||
@@ -365,8 +420,8 @@ static const ]b4_int_type_for([b4_rline])[ yyrline[] =
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if YYDEBUG || YYERROR_VERBOSE
|
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
|
||||||
/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
|
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
|
||||||
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
|
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
|
||||||
static const char *const yytname[] =
|
static const char *const yytname[] =
|
||||||
{
|
{
|
||||||
@@ -445,22 +500,6 @@ static const ]b4_int_type_for([b4_stos])[ yystos[] =
|
|||||||
]b4_stos[
|
]b4_stos[
|
||||||
};
|
};
|
||||||
|
|
||||||
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
|
|
||||||
# define YYSIZE_T __SIZE_TYPE__
|
|
||||||
#endif
|
|
||||||
#if ! defined (YYSIZE_T) && defined (size_t)
|
|
||||||
# define YYSIZE_T size_t
|
|
||||||
#endif
|
|
||||||
#if ! defined (YYSIZE_T)
|
|
||||||
# if defined (__STDC__) || defined (__cplusplus)
|
|
||||||
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
|
|
||||||
# define YYSIZE_T size_t
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
#if ! defined (YYSIZE_T)
|
|
||||||
# define YYSIZE_T unsigned int
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define yyerrok (yyerrstatus = 0)
|
#define yyerrok (yyerrstatus = 0)
|
||||||
#define yyclearin (yychar = YYEMPTY)
|
#define yyclearin (yychar = YYEMPTY)
|
||||||
#define YYEMPTY (-2)
|
#define YYEMPTY (-2)
|
||||||
@@ -490,8 +529,8 @@ do \
|
|||||||
goto yybackup; \
|
goto yybackup; \
|
||||||
} \
|
} \
|
||||||
else \
|
else \
|
||||||
{ \
|
{ \
|
||||||
yyerror (]b4_yyerror_args["syntax error: cannot back up");\
|
yyerror (]b4_yyerror_args[YY_("syntax error: cannot back up")); \
|
||||||
YYERROR; \
|
YYERROR; \
|
||||||
} \
|
} \
|
||||||
while (0)
|
while (0)
|
||||||
@@ -570,7 +609,7 @@ do { \
|
|||||||
if (yydebug) \
|
if (yydebug) \
|
||||||
{ \
|
{ \
|
||||||
YYFPRINTF (stderr, "%s ", Title); \
|
YYFPRINTF (stderr, "%s ", Title); \
|
||||||
yysymprint (stderr, \
|
yysymprint (stderr, \
|
||||||
Type, Value]b4_location_if([, Location])[); \
|
Type, Value]b4_location_if([, Location])[); \
|
||||||
YYFPRINTF (stderr, "\n"); \
|
YYFPRINTF (stderr, "\n"); \
|
||||||
} \
|
} \
|
||||||
@@ -606,13 +645,13 @@ do { \
|
|||||||
[[int yyrule], [yyrule]])[
|
[[int yyrule], [yyrule]])[
|
||||||
{
|
{
|
||||||
int yyi;
|
int yyi;
|
||||||
unsigned int yylno = yyrline[yyrule];
|
unsigned long int yylno = yyrline[yyrule];
|
||||||
YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
|
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
|
||||||
yyrule - 1, yylno);
|
yyrule - 1, yylno);
|
||||||
/* Print the symbols being reduced, and their result. */
|
/* Print the symbols being reduced, and their result. */
|
||||||
for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
|
for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
|
||||||
YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
|
YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
|
||||||
YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
|
YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
# define YY_REDUCE_PRINT(Rule) \
|
# define YY_REDUCE_PRINT(Rule) \
|
||||||
@@ -641,7 +680,7 @@ int yydebug;
|
|||||||
if the built-in stack extension method is used).
|
if the built-in stack extension method is used).
|
||||||
|
|
||||||
Do not make this value too large; the results are undefined if
|
Do not make this value too large; the results are undefined if
|
||||||
SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
|
YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
|
||||||
evaluated with infinite-precision integer arithmetic. */
|
evaluated with infinite-precision integer arithmetic. */
|
||||||
|
|
||||||
#ifndef YYMAXDEPTH
|
#ifndef YYMAXDEPTH
|
||||||
@@ -665,7 +704,7 @@ yystrlen (yystr)
|
|||||||
const char *yystr;
|
const char *yystr;
|
||||||
# endif
|
# endif
|
||||||
{
|
{
|
||||||
register const char *yys = yystr;
|
const char *yys = yystr;
|
||||||
|
|
||||||
while (*yys++ != '\0')
|
while (*yys++ != '\0')
|
||||||
continue;
|
continue;
|
||||||
@@ -690,8 +729,8 @@ yystpcpy (yydest, yysrc)
|
|||||||
const char *yysrc;
|
const char *yysrc;
|
||||||
# endif
|
# endif
|
||||||
{
|
{
|
||||||
register char *yyd = yydest;
|
char *yyd = yydest;
|
||||||
register const char *yys = yysrc;
|
const char *yys = yysrc;
|
||||||
|
|
||||||
while ((*yyd++ = *yys++) != '\0')
|
while ((*yyd++ = *yys++) != '\0')
|
||||||
continue;
|
continue;
|
||||||
@@ -701,7 +740,55 @@ yystpcpy (yydest, yysrc)
|
|||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
#endif /* !YYERROR_VERBOSE */
|
# ifndef yytnamerr
|
||||||
|
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
|
||||||
|
quotes and backslashes, so that it's suitable for yyerror. The
|
||||||
|
heuristic is that double-quoting is unnecessary unless the string
|
||||||
|
contains an apostrophe, a comma, or backslash (other than
|
||||||
|
backslash-backslash). YYSTR is taken from yytname. If YYRES is
|
||||||
|
null, do not copy; instead, return the length of what the result
|
||||||
|
would have been. */
|
||||||
|
static YYSIZE_T
|
||||||
|
yytnamerr (char *yyres, const char *yystr)
|
||||||
|
{
|
||||||
|
if (*yystr == '"')
|
||||||
|
{
|
||||||
|
size_t yyn = 0;
|
||||||
|
char const *yyp = yystr;
|
||||||
|
|
||||||
|
for (;;)
|
||||||
|
switch (*++yyp)
|
||||||
|
{
|
||||||
|
case '\'':
|
||||||
|
case ',':
|
||||||
|
goto do_not_strip_quotes;
|
||||||
|
|
||||||
|
case '\\':
|
||||||
|
if (*++yyp != '\\')
|
||||||
|
goto do_not_strip_quotes;
|
||||||
|
/* Fall through. */
|
||||||
|
default:
|
||||||
|
if (yyres)
|
||||||
|
yyres[yyn] = *yyp;
|
||||||
|
yyn++;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '"':
|
||||||
|
if (yyres)
|
||||||
|
yyres[yyn] = '\0';
|
||||||
|
return yyn;
|
||||||
|
}
|
||||||
|
do_not_strip_quotes: ;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! yyres)
|
||||||
|
return yystrlen (yystr);
|
||||||
|
|
||||||
|
return yystpcpy (yyres, yystr) - yyres;
|
||||||
|
}
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#endif /* YYERROR_VERBOSE */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -763,8 +850,8 @@ b4_c_function_def([yyparse], [int], b4_parse_param)
|
|||||||
#endif
|
#endif
|
||||||
{[
|
{[
|
||||||
]b4_pure_if([b4_declare_parser_variables])[
|
]b4_pure_if([b4_declare_parser_variables])[
|
||||||
register int yystate;
|
int yystate;
|
||||||
register int yyn;
|
int yyn;
|
||||||
int yyresult;
|
int yyresult;
|
||||||
/* Number of tokens to shift before error messages enabled. */
|
/* Number of tokens to shift before error messages enabled. */
|
||||||
int yyerrstatus;
|
int yyerrstatus;
|
||||||
@@ -782,12 +869,12 @@ b4_c_function_def([yyparse], [int], b4_parse_param)
|
|||||||
/* The state stack. */
|
/* The state stack. */
|
||||||
short int yyssa[YYINITDEPTH];
|
short int yyssa[YYINITDEPTH];
|
||||||
short int *yyss = yyssa;
|
short int *yyss = yyssa;
|
||||||
register short int *yyssp;
|
short int *yyssp;
|
||||||
|
|
||||||
/* The semantic value stack. */
|
/* The semantic value stack. */
|
||||||
YYSTYPE yyvsa[YYINITDEPTH];
|
YYSTYPE yyvsa[YYINITDEPTH];
|
||||||
YYSTYPE *yyvs = yyvsa;
|
YYSTYPE *yyvs = yyvsa;
|
||||||
register YYSTYPE *yyvsp;
|
YYSTYPE *yyvsp;
|
||||||
|
|
||||||
]b4_location_if(
|
]b4_location_if(
|
||||||
[[ /* The location stack. */
|
[[ /* The location stack. */
|
||||||
@@ -832,18 +919,19 @@ b4_c_function_def([yyparse], [int], b4_parse_param)
|
|||||||
#endif
|
#endif
|
||||||
]])
|
]])
|
||||||
m4_ifdef([b4_initial_action], [
|
m4_ifdef([b4_initial_action], [
|
||||||
m4_pushdef([b4_at_dollar], [yylloc])dnl
|
m4_pushdef([b4_at_dollar], [m4_define([b4_at_dollar_used])yylloc])dnl
|
||||||
m4_pushdef([b4_dollar_dollar], [yylval])dnl
|
m4_pushdef([b4_dollar_dollar], [m4_define([b4_dollar_dollar_used])yylval])dnl
|
||||||
/* User initialization code. */
|
/* User initialization code. */
|
||||||
b4_initial_action
|
b4_initial_action
|
||||||
m4_popdef([b4_dollar_dollar])dnl
|
m4_popdef([b4_dollar_dollar])dnl
|
||||||
m4_popdef([b4_at_dollar])dnl
|
m4_popdef([b4_at_dollar])dnl
|
||||||
/* Line __line__ of yacc.c. */
|
/* Line __line__ of yacc.c. */
|
||||||
b4_syncline([@oline@], [@ofile@])])dnl
|
b4_syncline([@oline@], [@ofile@])
|
||||||
[
|
])dnl
|
||||||
yyvsp[0] = yylval;
|
m4_ifdef([b4_dollar_dollar_used],[[ yyvsp[0] = yylval;
|
||||||
]b4_location_if([[ yylsp[0] = yylloc;
|
]])dnl
|
||||||
]])
|
m4_ifdef([b4_at_dollar_used], [[ yylsp[0] = yylloc;
|
||||||
|
]])dnl
|
||||||
[ goto yysetstate;
|
[ goto yysetstate;
|
||||||
|
|
||||||
/*------------------------------------------------------------.
|
/*------------------------------------------------------------.
|
||||||
@@ -876,7 +964,7 @@ b4_syncline([@oline@], [@ofile@])])dnl
|
|||||||
data in use in that stack, in bytes. This used to be a
|
data in use in that stack, in bytes. This used to be a
|
||||||
conditional around just the two extra args, but that might
|
conditional around just the two extra args, but that might
|
||||||
be undefined if yyoverflow is a macro. */
|
be undefined if yyoverflow is a macro. */
|
||||||
yyoverflow ("parser stack overflow",
|
yyoverflow (YY_("memory exhausted"),
|
||||||
&yyss1, yysize * sizeof (*yyssp),
|
&yyss1, yysize * sizeof (*yyssp),
|
||||||
&yyvs1, yysize * sizeof (*yyvsp),
|
&yyvs1, yysize * sizeof (*yyvsp),
|
||||||
]b4_location_if([ &yyls1, yysize * sizeof (*yylsp),])[
|
]b4_location_if([ &yyls1, yysize * sizeof (*yylsp),])[
|
||||||
@@ -887,11 +975,11 @@ b4_syncline([@oline@], [@ofile@])])dnl
|
|||||||
}
|
}
|
||||||
#else /* no yyoverflow */
|
#else /* no yyoverflow */
|
||||||
# ifndef YYSTACK_RELOCATE
|
# ifndef YYSTACK_RELOCATE
|
||||||
goto yyoverflowlab;
|
goto yyexhaustedlab;
|
||||||
# else
|
# else
|
||||||
/* Extend the stack our own way. */
|
/* Extend the stack our own way. */
|
||||||
if (YYMAXDEPTH <= yystacksize)
|
if (YYMAXDEPTH <= yystacksize)
|
||||||
goto yyoverflowlab;
|
goto yyexhaustedlab;
|
||||||
yystacksize *= 2;
|
yystacksize *= 2;
|
||||||
if (YYMAXDEPTH < yystacksize)
|
if (YYMAXDEPTH < yystacksize)
|
||||||
yystacksize = YYMAXDEPTH;
|
yystacksize = YYMAXDEPTH;
|
||||||
@@ -901,7 +989,7 @@ b4_syncline([@oline@], [@ofile@])])dnl
|
|||||||
union yyalloc *yyptr =
|
union yyalloc *yyptr =
|
||||||
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
|
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
|
||||||
if (! yyptr)
|
if (! yyptr)
|
||||||
goto yyoverflowlab;
|
goto yyexhaustedlab;
|
||||||
YYSTACK_RELOCATE (yyss);
|
YYSTACK_RELOCATE (yyss);
|
||||||
YYSTACK_RELOCATE (yyvs);
|
YYSTACK_RELOCATE (yyvs);
|
||||||
]b4_location_if([ YYSTACK_RELOCATE (yyls);])[
|
]b4_location_if([ YYSTACK_RELOCATE (yyls);])[
|
||||||
@@ -1032,6 +1120,7 @@ yyreduce:
|
|||||||
switch (yyn)
|
switch (yyn)
|
||||||
]{
|
]{
|
||||||
b4_actions
|
b4_actions
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Line __line__ of yacc.c. */
|
/* Line __line__ of yacc.c. */
|
||||||
@@ -1074,12 +1163,36 @@ yyerrlab:
|
|||||||
|
|
||||||
if (YYPACT_NINF < yyn && yyn < YYLAST)
|
if (YYPACT_NINF < yyn && yyn < YYLAST)
|
||||||
{
|
{
|
||||||
YYSIZE_T yysize = 0;
|
|
||||||
int yytype = YYTRANSLATE (yychar);
|
int yytype = YYTRANSLATE (yychar);
|
||||||
const char* yyprefix;
|
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
|
||||||
char *yymsg;
|
YYSIZE_T yysize = yysize0;
|
||||||
|
YYSIZE_T yysize1;
|
||||||
|
int yysize_overflow = 0;
|
||||||
|
char *yymsg = 0;
|
||||||
|
# define YYERROR_VERBOSE_ARGS_MAXIMUM 5
|
||||||
|
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
|
||||||
int yyx;
|
int yyx;
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
/* This is so xgettext sees the translatable formats that are
|
||||||
|
constructed on the fly. */
|
||||||
|
YY_("syntax error, unexpected %s");
|
||||||
|
YY_("syntax error, unexpected %s, expecting %s");
|
||||||
|
YY_("syntax error, unexpected %s, expecting %s or %s");
|
||||||
|
YY_("syntax error, unexpected %s, expecting %s or %s or %s");
|
||||||
|
YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
|
||||||
|
#endif
|
||||||
|
char *yyfmt;
|
||||||
|
char const *yyf;
|
||||||
|
static char const yyunexpected[] = "syntax error, unexpected %s";
|
||||||
|
static char const yyexpecting[] = ", expecting %s";
|
||||||
|
static char const yyor[] = " or %s";
|
||||||
|
char yyformat[sizeof yyunexpected
|
||||||
|
+ sizeof yyexpecting - 1
|
||||||
|
+ ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
|
||||||
|
* (sizeof yyor - 1))];
|
||||||
|
char const *yyprefix = yyexpecting;
|
||||||
|
|
||||||
/* Start YYX at -YYN if negative to avoid negative indexes in
|
/* Start YYX at -YYN if negative to avoid negative indexes in
|
||||||
YYCHECK. */
|
YYCHECK. */
|
||||||
int yyxbegin = yyn < 0 ? -yyn : 0;
|
int yyxbegin = yyn < 0 ? -yyn : 0;
|
||||||
@@ -1087,48 +1200,68 @@ yyerrlab:
|
|||||||
/* Stay within bounds of both yycheck and yytname. */
|
/* Stay within bounds of both yycheck and yytname. */
|
||||||
int yychecklim = YYLAST - yyn;
|
int yychecklim = YYLAST - yyn;
|
||||||
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
|
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
|
||||||
int yycount = 0;
|
int yycount = 1;
|
||||||
|
|
||||||
|
yyarg[0] = yytname[yytype];
|
||||||
|
yyfmt = yystpcpy (yyformat, yyunexpected);
|
||||||
|
|
||||||
yyprefix = ", expecting ";
|
|
||||||
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
|
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
|
||||||
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
|
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
|
||||||
{
|
{
|
||||||
yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]);
|
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
|
||||||
yycount += 1;
|
|
||||||
if (yycount == 5)
|
|
||||||
{
|
{
|
||||||
yysize = 0;
|
yycount = 1;
|
||||||
|
yysize = yysize0;
|
||||||
|
yyformat[sizeof yyunexpected - 1] = '\0';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
yyarg[yycount++] = yytname[yyx];
|
||||||
|
yysize1 = yysize + yytnamerr (0, yytname[yyx]);
|
||||||
|
yysize_overflow |= yysize1 < yysize;
|
||||||
|
yysize = yysize1;
|
||||||
|
yyfmt = yystpcpy (yyfmt, yyprefix);
|
||||||
|
yyprefix = yyor;
|
||||||
}
|
}
|
||||||
yysize += (sizeof ("syntax error, unexpected ")
|
|
||||||
+ yystrlen (yytname[yytype]));
|
|
||||||
yymsg = (char *) YYSTACK_ALLOC (yysize);
|
|
||||||
if (yymsg != 0)
|
|
||||||
{
|
|
||||||
char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
|
|
||||||
yyp = yystpcpy (yyp, yytname[yytype]);
|
|
||||||
|
|
||||||
if (yycount < 5)
|
yyf = YY_(yyformat);
|
||||||
|
yysize1 = yysize + yystrlen (yyf);
|
||||||
|
yysize_overflow |= yysize1 < yysize;
|
||||||
|
yysize = yysize1;
|
||||||
|
|
||||||
|
if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
|
||||||
|
yymsg = (char *) YYSTACK_ALLOC (yysize);
|
||||||
|
if (yymsg)
|
||||||
|
{
|
||||||
|
/* Avoid sprintf, as that infringes on the user's name space.
|
||||||
|
Don't have undefined behavior even if the translation
|
||||||
|
produced a string with the wrong number of "%s"s. */
|
||||||
|
char *yyp = yymsg;
|
||||||
|
int yyi = 0;
|
||||||
|
while ((*yyp = *yyf))
|
||||||
{
|
{
|
||||||
yyprefix = ", expecting ";
|
if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
|
||||||
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
|
{
|
||||||
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
|
yyp += yytnamerr (yyp, yyarg[yyi++]);
|
||||||
{
|
yyf += 2;
|
||||||
yyp = yystpcpy (yyp, yyprefix);
|
}
|
||||||
yyp = yystpcpy (yyp, yytname[yyx]);
|
else
|
||||||
yyprefix = " or ";
|
{
|
||||||
}
|
yyp++;
|
||||||
|
yyf++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
yyerror (]b4_yyerror_args[yymsg);
|
yyerror (]b4_yyerror_args[yymsg);
|
||||||
YYSTACK_FREE (yymsg);
|
YYSTACK_FREE (yymsg);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
yyerror (]b4_yyerror_args["syntax error; also virtual memory exhausted");
|
{
|
||||||
|
yyerror (]b4_yyerror_args[YY_("syntax error"));
|
||||||
|
goto yyexhaustedlab;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif /* YYERROR_VERBOSE */
|
#endif /* YYERROR_VERBOSE */
|
||||||
yyerror (]b4_yyerror_args["syntax error");
|
yyerror (]b4_yyerror_args[YY_("syntax error"));
|
||||||
}
|
}
|
||||||
|
|
||||||
]b4_location_if([[ yyerror_range[0] = yylloc;]])[
|
]b4_location_if([[ yyerror_range[0] = yylloc;]])[
|
||||||
@@ -1140,18 +1273,9 @@ yyerrlab:
|
|||||||
|
|
||||||
if (yychar <= YYEOF)
|
if (yychar <= YYEOF)
|
||||||
{
|
{
|
||||||
/* If at end of input, pop the error token,
|
/* Return failure if at end of input. */
|
||||||
then the rest of the stack, then return failure. */
|
|
||||||
if (yychar == YYEOF)
|
if (yychar == YYEOF)
|
||||||
for (;;)
|
YYABORT;
|
||||||
{
|
|
||||||
]b4_location_if([[ yyerror_range[0] = *yylsp;]])[
|
|
||||||
YYPOPSTACK;
|
|
||||||
if (yyssp == yyss)
|
|
||||||
YYABORT;
|
|
||||||
yydestruct ("Error: popping",
|
|
||||||
yystos[*yyssp], yyvsp]b4_location_if([, yylsp])[);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1170,12 +1294,11 @@ yyerrlab:
|
|||||||
`---------------------------------------------------*/
|
`---------------------------------------------------*/
|
||||||
yyerrorlab:
|
yyerrorlab:
|
||||||
|
|
||||||
#ifdef __GNUC__
|
/* Pacify compilers like GCC when the user code never invokes
|
||||||
/* Pacify GCC when the user code never invokes YYERROR and the label
|
YYERROR and the label yyerrorlab therefore never appears in user
|
||||||
yyerrorlab therefore never appears in user code. */
|
code. */
|
||||||
if (0)
|
if (0)
|
||||||
goto yyerrorlab;
|
goto yyerrorlab;
|
||||||
#endif
|
|
||||||
|
|
||||||
]b4_location_if([[ yyerror_range[0] = yylsp[1-yylen];
|
]b4_location_if([[ yyerror_range[0] = yylsp[1-yylen];
|
||||||
yylsp -= yylen;
|
yylsp -= yylen;
|
||||||
@@ -1245,23 +1368,29 @@ yyacceptlab:
|
|||||||
| yyabortlab -- YYABORT comes here. |
|
| yyabortlab -- YYABORT comes here. |
|
||||||
`-----------------------------------*/
|
`-----------------------------------*/
|
||||||
yyabortlab:
|
yyabortlab:
|
||||||
yydestruct ("Error: discarding lookahead",
|
|
||||||
yytoken, &yylval]b4_location_if([, &yylloc])[);
|
|
||||||
yychar = YYEMPTY;
|
|
||||||
yyresult = 1;
|
yyresult = 1;
|
||||||
goto yyreturn;
|
goto yyreturn;
|
||||||
|
|
||||||
#ifndef yyoverflow
|
#ifndef yyoverflow
|
||||||
/*----------------------------------------------.
|
/*-------------------------------------------------.
|
||||||
| yyoverflowlab -- parser overflow comes here. |
|
| yyexhaustedlab -- memory exhaustion comes here. |
|
||||||
`----------------------------------------------*/
|
`-------------------------------------------------*/
|
||||||
yyoverflowlab:
|
yyexhaustedlab:
|
||||||
yyerror (]b4_yyerror_args["parser stack overflow");
|
yyerror (]b4_yyerror_args[YY_("memory exhausted"));
|
||||||
yyresult = 2;
|
yyresult = 2;
|
||||||
/* Fall through. */
|
/* Fall through. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
yyreturn:
|
yyreturn:
|
||||||
|
if (yychar != YYEOF && yychar != YYEMPTY)
|
||||||
|
yydestruct ("Cleanup: discarding lookahead",
|
||||||
|
yytoken, &yylval]b4_location_if([, &yylloc])[);
|
||||||
|
while (yyssp != yyss)
|
||||||
|
{
|
||||||
|
yydestruct ("Cleanup: popping",
|
||||||
|
yystos[*yyssp], yyvsp]b4_location_if([, yylsp])[);
|
||||||
|
YYPOPSTACK;
|
||||||
|
}
|
||||||
#ifndef yyoverflow
|
#ifndef yyoverflow
|
||||||
if (yyss != yyssa)
|
if (yyss != yyssa)
|
||||||
YYSTACK_FREE (yyss);
|
YYSTACK_FREE (yyss);
|
||||||
@@ -1274,18 +1403,18 @@ b4_epilogue
|
|||||||
m4_if(b4_defines_flag, 0, [],
|
m4_if(b4_defines_flag, 0, [],
|
||||||
[@output @output_header_name@
|
[@output @output_header_name@
|
||||||
b4_copyright([Skeleton parser for Yacc-like parsing with Bison],
|
b4_copyright([Skeleton parser for Yacc-like parsing with Bison],
|
||||||
[1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004])
|
[1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005])
|
||||||
|
|
||||||
/* As a special exception, when this file is copied by Bison into a
|
/* As a special exception, when this file is copied by Bison into a
|
||||||
Bison output file, you may use that output file without restriction.
|
Bison output file, you may use that output file without restriction.
|
||||||
This special exception was added by the Free Software Foundation
|
This special exception was added by the Free Software Foundation
|
||||||
in version 1.24 of Bison. */
|
in version 1.24 of Bison. */
|
||||||
|
|
||||||
b4_token_defines(b4_tokens)
|
b4_token_enums_defines(b4_tokens)
|
||||||
|
|
||||||
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
|
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
|
||||||
m4_ifdef([b4_stype],
|
m4_ifdef([b4_stype],
|
||||||
[b4_syncline([b4_stype_line], [b4_filename])
|
[b4_syncline([b4_stype_line], [b4_file_name])
|
||||||
typedef union m4_bregexp(b4_stype, [^{], [YYSTYPE ])b4_stype YYSTYPE;
|
typedef union m4_bregexp(b4_stype, [^{], [YYSTYPE ])b4_stype YYSTYPE;
|
||||||
/* Line __line__ of yacc.c. */
|
/* Line __line__ of yacc.c. */
|
||||||
b4_syncline([@oline@], [@ofile@])],
|
b4_syncline([@oline@], [@ofile@])],
|
||||||
|
|||||||
+6
-3
@@ -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) 2001, 2002, 2003 Free Software Foundation, Inc.
|
## Copyright (C) 2001, 2002, 2003, 2005 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
|
||||||
@@ -13,8 +13,8 @@
|
|||||||
|
|
||||||
## 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, write to the Free Software
|
## along with this program; if not, write to the Free Software
|
||||||
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
## 02111-1307 USA
|
## 02110-1301 USA
|
||||||
|
|
||||||
AM_MAKEINFOFLAGS = --no-split
|
AM_MAKEINFOFLAGS = --no-split
|
||||||
info_TEXINFOS = bison.texinfo
|
info_TEXINFOS = bison.texinfo
|
||||||
@@ -25,6 +25,9 @@ EXTRA_DIST = FAQ bison.1 refcard.tex
|
|||||||
|
|
||||||
CLEANFILES = refcard.dvi refcard.log refcard.ps bison.fns
|
CLEANFILES = refcard.dvi refcard.log refcard.ps bison.fns
|
||||||
|
|
||||||
|
clean-local:
|
||||||
|
rm -rf *.t2d
|
||||||
|
|
||||||
refcard.dvi: refcard.tex
|
refcard.dvi: refcard.tex
|
||||||
tex refcard.tex
|
tex refcard.tex
|
||||||
|
|
||||||
|
|||||||
+923
-120
File diff suppressed because it is too large
Load Diff
+3
-3
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
@display
|
@display
|
||||||
Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc.
|
Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc.
|
||||||
59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
|
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
|
||||||
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.
|
||||||
@@ -420,8 +420,8 @@ license notices just after the title page:
|
|||||||
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.2
|
||||||
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 Texts.
|
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
|
||||||
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
|
||||||
Free Documentation License''.
|
Free Documentation License''.
|
||||||
@end group
|
@end group
|
||||||
@end smallexample
|
@end smallexample
|
||||||
|
|||||||
+2
-2
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
@display
|
@display
|
||||||
Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
|
Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
|
||||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
|
||||||
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.
|
||||||
@@ -352,7 +352,7 @@ 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, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
@end smallexample
|
@end smallexample
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|||||||
+6
-6
@@ -35,8 +35,8 @@
|
|||||||
%
|
%
|
||||||
% 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 either Flex or Bison; see the file COPYING. If not, write
|
% along with either Flex or Bison; see the file COPYING. If not, write
|
||||||
% to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
% to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
% Boston, MA 02111-1307, USA.
|
% Boston, MA 02110-1301, USA.
|
||||||
%
|
%
|
||||||
% This file is intended to be processed by plain TeX (TeX82).
|
% This file is intended to be processed by plain TeX (TeX82).
|
||||||
%
|
%
|
||||||
@@ -96,9 +96,9 @@ For information, write to the:
|
|||||||
\vskip .2\baselineskip
|
\vskip .2\baselineskip
|
||||||
\centerline{Free Software Foundation, Inc.}
|
\centerline{Free Software Foundation, Inc.}
|
||||||
\vskip .2\baselineskip
|
\vskip .2\baselineskip
|
||||||
\centerline{59 Temple Place - Suite 330}
|
\centerline{51 Franklin Street, Fifth Floor}
|
||||||
\vskip .2\baselineskip
|
\vskip .2\baselineskip
|
||||||
\centerline{Boston, MA 02111-1307 USA}
|
\centerline{Boston, MA 02110-1301 USA}
|
||||||
\endgroup}
|
\endgroup}
|
||||||
|
|
||||||
%%%% smallcopyrightnotice for two column printing on one page.
|
%%%% smallcopyrightnotice for two column printing on one page.
|
||||||
@@ -121,9 +121,9 @@ For information, write to the:
|
|||||||
\vskip .2\baselineskip
|
\vskip .2\baselineskip
|
||||||
\centerline{Free Software Foundation, Inc.}
|
\centerline{Free Software Foundation, Inc.}
|
||||||
\vskip .2\baselineskip
|
\vskip .2\baselineskip
|
||||||
\centerline{59 Temple Place - Suite 330}
|
\centerline{51 Franklin Street, Fifth Floor}
|
||||||
\vskip .2\baselineskip
|
\vskip .2\baselineskip
|
||||||
\centerline{Boston, MA 02111-1307 USA}
|
\centerline{Boston, MA 02110-1301 USA}
|
||||||
\endgroup}
|
\endgroup}
|
||||||
|
|
||||||
% make \bye not \outer so that the \def\bye in the \else clause below
|
% make \bye not \outer so that the \def\bye in the \else clause below
|
||||||
|
|||||||
-300
@@ -1,300 +0,0 @@
|
|||||||
#! /bin/sh
|
|
||||||
|
|
||||||
# clcommit version 0.9.5
|
|
||||||
|
|
||||||
# Copyright (C) 1999, 2000, Free Software Foundation
|
|
||||||
|
|
||||||
# This script is Free Software, and it can be copied, distributed and
|
|
||||||
# modified as defined in the GNU General Public License. A copy of
|
|
||||||
# its license can be downloaded from http://www.gnu.org/copyleft/gpl.html
|
|
||||||
|
|
||||||
# Originally by Gary V. Vaughan <[email protected]>
|
|
||||||
# Pretty much rewritten by Alexandre Oliva <[email protected]>
|
|
||||||
|
|
||||||
# This scripts eases checking in changes to CVS-maintained projects
|
|
||||||
# with ChangeLog files. It will check that there have been no
|
|
||||||
# conflicting commits in the CVS repository and print which files it
|
|
||||||
# is going to commit to stderr. A list of files to compare and to
|
|
||||||
# check in can be given in the command line. If it is not given, all
|
|
||||||
# files in the current directory (and below, unless `-l' is given) are
|
|
||||||
# considered for check in.
|
|
||||||
|
|
||||||
# The commit message will be extracted from the differences between a
|
|
||||||
# file named ChangeLog* in the commit list, or named after -C, and the
|
|
||||||
# one in the repository (unless a message was specified with `-m' or
|
|
||||||
# `-F'). An empty message is not accepted (but a blank line is). If
|
|
||||||
# the message is acceptable, it will be presented for verification
|
|
||||||
# (and possible edition) using the $PAGER environment variable (or
|
|
||||||
# `more', if it is not set, or `cat', if the `-f' switch is given).
|
|
||||||
# If $PAGER exits successfully, the modified files (at that moment)
|
|
||||||
# are checked in, unless `-n' was specified, in which case nothing is
|
|
||||||
# checked in.
|
|
||||||
|
|
||||||
# usage: clcommit [-v] [-h] [-f] [-l] [-n] [-q] [-z N] [-C ChangeLog_file]
|
|
||||||
# [-m msg|-F msg_file|-1] [--] [file|dir ...]
|
|
||||||
|
|
||||||
# -f --force don't check (unless *followed* by -n), and just
|
|
||||||
# display commit message instead of running $PAGER
|
|
||||||
# -l --local don't descend into subdirectories
|
|
||||||
# -m msg --message=msg set commit message
|
|
||||||
# --msg=msg same as -m
|
|
||||||
# -F file --file=file read commit message from file
|
|
||||||
# -1 --first extract first entry from ChangeLog, no cvs diff
|
|
||||||
# -C file --changelog=file extract commit message from specified ChangeLog
|
|
||||||
# --fast same as --force --first
|
|
||||||
# -n --dry-run don't commit anything
|
|
||||||
# -q --quiet run cvs in quiet mode
|
|
||||||
# -zN --compress=N set compression level (0-9, 0=none, 9=max)
|
|
||||||
# -v --version print version information
|
|
||||||
# -h,-? --help print short or long help message
|
|
||||||
|
|
||||||
name=clcommit
|
|
||||||
: ${CVS=cvs}
|
|
||||||
cvsopt=
|
|
||||||
updateopt=
|
|
||||||
commitopt=
|
|
||||||
dry_run=false
|
|
||||||
commit=:
|
|
||||||
update=:
|
|
||||||
log_file="${TMPDIR-/tmp}/commitlog.$$"
|
|
||||||
first=false
|
|
||||||
|
|
||||||
rm -f "$log_file"
|
|
||||||
trap 'rm -f "$log_file"; exit 1' 1 2 15
|
|
||||||
|
|
||||||
# this just eases exit handling
|
|
||||||
main_repeat=":"
|
|
||||||
while $main_repeat; do
|
|
||||||
|
|
||||||
repeat="test $# -gt 0"
|
|
||||||
while $repeat; do
|
|
||||||
case "$1" in
|
|
||||||
--fast)
|
|
||||||
shift
|
|
||||||
set fnord --force --first ${1+"$@"}
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-f|--force)
|
|
||||||
update=false
|
|
||||||
PAGER=cat
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-l|--local)
|
|
||||||
updateopt="$updateopt -l"
|
|
||||||
commitopt="$commitopt -l"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-m|--message|--msg)
|
|
||||||
if test $# = 1; then
|
|
||||||
echo "$name: missing argument for $1" >&2
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if $first || test -f "$log_file"; then
|
|
||||||
echo "$name: you can have at most one of -m, -F and -1" >&2
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
shift
|
|
||||||
echo "$1" > "$log_file"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-F|--file)
|
|
||||||
if $first || test -f "$log_file"; then
|
|
||||||
echo "$name: you can have at most one of -m, -F and -1" >&2
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if test $# = 1; then
|
|
||||||
echo "$name: missing argument for $1" >&2
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
shift
|
|
||||||
if cat < "$1" > "$log_file"; then :; else
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-1|--first)
|
|
||||||
if test -f "$log_File"; then
|
|
||||||
echo "$name: you can have at most one of -m, -F and -1" >&2
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
first=:
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-C|--[cC]hange[lL]og)
|
|
||||||
if test $# = 1; then
|
|
||||||
echo "$name: missing argument for $1" >&2
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
shift
|
|
||||||
if test ! -f "$1"; then
|
|
||||||
echo "$name: ChangeLog file \`$1' does not exist" >&2
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
ChangeLog="$1"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-n|--dry-run)
|
|
||||||
commit=false
|
|
||||||
update=true
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-q|--quiet)
|
|
||||||
cvsopt="$cvsopt -q"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-v|--verbose)
|
|
||||||
cvsopt="$cvsopt -t"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-z|--compress)
|
|
||||||
if test $# = 1; then
|
|
||||||
echo "$name: missing argument for $1" >&2
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
case "$2" in
|
|
||||||
[0-9]) :;;
|
|
||||||
*) echo "$name: invalid argument for $1" >&2
|
|
||||||
break
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
cvsopt="$cvsopt -z$2"
|
|
||||||
shift
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
|
|
||||||
-m*|-F*|-C*|-z*)
|
|
||||||
opt=`echo "$1" | sed '1s/^\(..\).*$/\1/;q'`
|
|
||||||
arg=`echo "$1" | sed '1s/^-[a-zA-Z0-9]//'`
|
|
||||||
shift
|
|
||||||
set -- "$opt" "$arg" ${1+"$@"}
|
|
||||||
;;
|
|
||||||
--message=*|--msg=*|--file=*|--[Cc]hange[Ll]og=*|--compress=*)
|
|
||||||
opt=`echo "$1" | sed '1s/^\(--[^=]*\)=.*/\1/;q'`
|
|
||||||
arg=`echo "$1" | sed '1s/^--[^=]*=//'`
|
|
||||||
shift
|
|
||||||
set -- "$opt" "$arg" ${1+"$@"}
|
|
||||||
;;
|
|
||||||
|
|
||||||
-v|--version)
|
|
||||||
sed '/^# '$name' version /,/^# Heavily modified by/ { s/^# //; p; }; d' < $0
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
-\?|-h)
|
|
||||||
sed '/^# usage:/,/# -h/ { s/^# //; p; }; d' < $0 &&
|
|
||||||
echo
|
|
||||||
echo "run \`$name --help | more' for full usage"
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
--help)
|
|
||||||
sed '/^# '$name' version /,/^[^#]/ { /^[^#]/ d; s/^# //; p; }; d' < $0
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
--)
|
|
||||||
shift
|
|
||||||
repeat=false
|
|
||||||
;;
|
|
||||||
-*)
|
|
||||||
echo "$name: invalid flag $1" >&2
|
|
||||||
break
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
repeat=false
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
# might have used break 2 within the previous loop, but so what
|
|
||||||
$repeat && break
|
|
||||||
|
|
||||||
$update && \
|
|
||||||
if echo "$name: checking for conflicts..." >&2
|
|
||||||
($CVS $cvsopt -q -n update $updateopt ${1+"$@"} 2>/dev/null \
|
|
||||||
| while read line; do
|
|
||||||
echo "$line"
|
|
||||||
echo "$line" >&3
|
|
||||||
done | grep '^C') 3>&1 >/dev/null; then
|
|
||||||
echo "$name: some conflicts were found, aborting..." >&2
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test ! -f "$log_file"; then
|
|
||||||
if test -z "$ChangeLog"; then
|
|
||||||
for f in ${1+"$@"}; do
|
|
||||||
case "$f" in
|
|
||||||
ChangeLog* | */ChangeLog*)
|
|
||||||
if test -z "$ChangeLog"; then
|
|
||||||
ChangeLog="$f"
|
|
||||||
else
|
|
||||||
echo "$name: multiple ChangeLog files: $ChangeLog and $f" >&2
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "$name: checking commit message..." >&2
|
|
||||||
if $first; then
|
|
||||||
skipping=:
|
|
||||||
sed 's,^,+,' < ${ChangeLog-ChangeLog} |
|
|
||||||
while read line; do
|
|
||||||
case "$line" in
|
|
||||||
"+2"*) if $skipping; then skipping=false; else break; fi;;
|
|
||||||
"+ "*)
|
|
||||||
echo "$name: *** Warning: lines should start with tabs, not spaces; ignoring line:" >&2
|
|
||||||
echo "$line" | sed 's/^.//' >&2;;
|
|
||||||
"+ "*)
|
|
||||||
$skipping || echo "$line" ;;
|
|
||||||
esac
|
|
||||||
done |
|
|
||||||
sed 's,^\+ ,,' > "$log_file" || break
|
|
||||||
else
|
|
||||||
$CVS $cvsopt diff -u ${ChangeLog-ChangeLog} |
|
|
||||||
while read line; do
|
|
||||||
case $line in
|
|
||||||
"--- "*) :;;
|
|
||||||
"-"*)
|
|
||||||
echo "$name: *** Warning: the following line in ChangeLog diff is suspicious:" >&2
|
|
||||||
echo "$line" | sed 's/^.//' >&2;;
|
|
||||||
"+ "*)
|
|
||||||
echo "$name: *** Warning: lines should start with tabs, not spaces; ignoring line:" >&2
|
|
||||||
echo "$line" | sed 's/^.//' >&2;;
|
|
||||||
"+") echo;;
|
|
||||||
"+ "*) echo "$line";;
|
|
||||||
esac
|
|
||||||
done |
|
|
||||||
sed -e 's,\+ ,,' -e '/./p' -e '/./d' -e '1d' -e '$d' > "$log_file" \
|
|
||||||
|| break
|
|
||||||
fi
|
|
||||||
# The sed script above removes "+TAB" from the beginning of a line, then
|
|
||||||
# deletes the first and/or the last line, when they happen to be empty
|
|
||||||
fi
|
|
||||||
|
|
||||||
if grep '[^ ]' < "$log_file" > /dev/null; then :; else
|
|
||||||
echo "$name: empty commit message, aborting" >&2
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
|
|
||||||
if grep '^$' < "$log_file" > /dev/null; then
|
|
||||||
echo "$name: *** Warning: blank lines should not appear within commit messages." >&2
|
|
||||||
echo "$name: *** They should be used to separate distinct commits." >&2
|
|
||||||
fi
|
|
||||||
|
|
||||||
${PAGER-more} "$log_file" || break
|
|
||||||
|
|
||||||
sleep 1 # give the user some time for a ^C
|
|
||||||
|
|
||||||
# Do not check for empty $log_file again, even though the user might have
|
|
||||||
# zeroed it out. If s/he did, it was probably intentional.
|
|
||||||
|
|
||||||
if $commit; then
|
|
||||||
$CVS $cvsopt commit $commitopt -F $log_file ${1+"$@"} || break
|
|
||||||
fi
|
|
||||||
|
|
||||||
main_repeat=false
|
|
||||||
done
|
|
||||||
|
|
||||||
rm -f "$log_file"
|
|
||||||
|
|
||||||
# if main_repeat was not set to `false', we failed
|
|
||||||
$main_repeat && exit 1
|
|
||||||
exit 0
|
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
Makefile
|
||||||
|
Makefile.in
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||||
|
## Copyright (C) 2005 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 2 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, write to the Free Software
|
||||||
|
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
|
## 02110-1301 USA
|
||||||
|
|
||||||
|
SUBDIRS = calc++
|
||||||
|
|
||||||
|
dist_noinst_SCRIPTS = extexi
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
*.cc
|
||||||
|
*.hh
|
||||||
|
*.ll
|
||||||
|
*.output
|
||||||
|
*.stamp
|
||||||
|
*.tmp
|
||||||
|
*.yy
|
||||||
|
.deps
|
||||||
|
Makefile
|
||||||
|
Makefile.in
|
||||||
|
calc++
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||||
|
## Copyright (C) 2005 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 2 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, write to the Free Software
|
||||||
|
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
|
## 02110-1301 USA
|
||||||
|
|
||||||
|
## ------------------------------------- ##
|
||||||
|
## Running the bison from this tarball. ##
|
||||||
|
## ------------------------------------- ##
|
||||||
|
|
||||||
|
BISON = $(top_builddir)/tests/bison
|
||||||
|
BISON_IN = $(top_srcdir)/tests/bison.in
|
||||||
|
|
||||||
|
$(BISON): $(BISON_IN)
|
||||||
|
cd $(top_builddir)/tests && $(MAKE) $(AM_MAKEFLAGS) bison
|
||||||
|
|
||||||
|
## ------------ ##
|
||||||
|
## Extracting. ##
|
||||||
|
## ------------ ##
|
||||||
|
|
||||||
|
doc = $(top_srcdir)/doc/bison.texinfo
|
||||||
|
extexi = $(top_srcdir)/examples/extexi
|
||||||
|
# Extract in src.
|
||||||
|
$(calc_extracted): $(doc) $(extexi)
|
||||||
|
cd $(srcdir) && \
|
||||||
|
$(AWK) -f ../extexi ../../doc/bison.texinfo -- \
|
||||||
|
calc++-parser.yy \
|
||||||
|
calc++-scanner.ll calc++.cc calc++-driver.hh calc++-driver.cc
|
||||||
|
|
||||||
|
|
||||||
|
## ------------------- ##
|
||||||
|
## Parser generation. ##
|
||||||
|
## ------------------- ##
|
||||||
|
|
||||||
|
BUILT_SOURCES = $(calc_extracted) $(calc_sources_generated)
|
||||||
|
CLEANFILES = $(srcdir)/*.output *.tmp
|
||||||
|
MAINTAINERCLEANFILES = $(srcdir)/*.stamp $(BUILT_SOURCES)
|
||||||
|
|
||||||
|
# Compile the parser and save cycles.
|
||||||
|
# This code comes from "Handling Tools that Produce Many Outputs",
|
||||||
|
# from the Automake documentation.
|
||||||
|
EXTRA_DIST = $(srcdir)/calc++-parser.stamp $(srcdir)/calc++-parser.yy
|
||||||
|
# Don't depend on $(BISON) otherwise we would rebuild these files
|
||||||
|
# in srcdir, including during distcheck, which is forbidden.
|
||||||
|
$(srcdir)/calc++-parser.stamp: $(srcdir)/calc++-parser.yy $(BISON_IN)
|
||||||
|
@rm -f calc++-parser.tmp
|
||||||
|
@touch calc++-parser.tmp
|
||||||
|
$(BISON) -d -ra -S lalr1.cc -o $(srcdir)/calc++-parser.cc \
|
||||||
|
$(srcdir)/calc++-parser.yy
|
||||||
|
@mv -f calc++-parser.tmp $@
|
||||||
|
|
||||||
|
$(calc_sources_generated): $(srcdir)/calc++-parser.stamp
|
||||||
|
@if test -f $@; then :; else \
|
||||||
|
rm -f $(srcdir)/calc++-parser.stamp && \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) $(srcdir)/calc++-parser.stamp; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
## --------------------------- ##
|
||||||
|
## Building & testing calc++. ##
|
||||||
|
## --------------------------- ##
|
||||||
|
|
||||||
|
noinst_PROGRAMS = calc++
|
||||||
|
|
||||||
|
calc_sources_extracted = $(srcdir)/calc++-scanner.ll $(srcdir)/calc++.cc \
|
||||||
|
$(srcdir)/calc++-driver.hh $(srcdir)/calc++-driver.cc
|
||||||
|
calc_extracted = $(calc_sources_extracted) $(srcdir)/calc++-parser.yy
|
||||||
|
calc_sources_generated = \
|
||||||
|
$(srcdir)/stack.hh $(srcdir)/position.hh $(srcdir)/location.hh \
|
||||||
|
$(srcdir)/calc++-parser.hh $(srcdir)/calc++-parser.cc
|
||||||
|
|
||||||
|
calc___SOURCES = $(calc_sources_extracted) $(calc_sources_generated)
|
||||||
|
|
||||||
|
TESTS = test
|
||||||
|
EXTRA_DIST += $(TESTS)
|
||||||
Executable
+29
@@ -0,0 +1,29 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
set +e
|
||||||
|
cat >input <<EOF
|
||||||
|
a := 1
|
||||||
|
b := 2
|
||||||
|
c := 3
|
||||||
|
d := a + b * c
|
||||||
|
d
|
||||||
|
EOF
|
||||||
|
|
||||||
|
./calc++ input
|
||||||
|
./calc++ -p input
|
||||||
|
|
||||||
|
cat >input <<EOF
|
||||||
|
a := 1
|
||||||
|
d := a + b * c
|
||||||
|
EOF
|
||||||
|
./calc++ input
|
||||||
|
|
||||||
|
set -x
|
||||||
|
echo toto
|
||||||
|
cat >input <<EOF
|
||||||
|
toto := 1
|
||||||
|
toto
|
||||||
|
EOF
|
||||||
|
./calc++ -s input
|
||||||
|
|
||||||
|
rm input
|
||||||
+136
@@ -0,0 +1,136 @@
|
|||||||
|
# Extract all examples from the manual source. -*- AWK -*-
|
||||||
|
|
||||||
|
# This file is part of GNU Bison
|
||||||
|
# Copyright 1992, 2000, 2001, 2005 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 2 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, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||||
|
# 02111-1307 USA
|
||||||
|
|
||||||
|
# This script is for use with any Awk that conforms to POSIX.
|
||||||
|
# It was derived from a similar script tests/generate.awk in GNU m4.
|
||||||
|
#
|
||||||
|
# Usage: extexi input-file.texi ... -- [FILES to extract]
|
||||||
|
BEGIN {
|
||||||
|
if (!output_dir)
|
||||||
|
output_dir = ".";
|
||||||
|
for (argc = 1; argc < ARGC; ++argc)
|
||||||
|
if (ARGV[argc] == "--")
|
||||||
|
break;
|
||||||
|
for (i = argc + 1; i < ARGC; ++i)
|
||||||
|
file_wanted[ARGV[i]] = 1;
|
||||||
|
ARGC = argc;
|
||||||
|
}
|
||||||
|
|
||||||
|
/^@node / {
|
||||||
|
if (seq > 0)
|
||||||
|
print "AT_CLEANUP";
|
||||||
|
|
||||||
|
split ($0, tmp, ",");
|
||||||
|
node = substr(tmp[1], 7);
|
||||||
|
seq = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/^@comment file: / {
|
||||||
|
if (!file_wanted[$3])
|
||||||
|
message("ignoring " $3);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
message("extracting " $3);
|
||||||
|
file = $3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/^@example$/, /^@end example$/ {
|
||||||
|
if (!file)
|
||||||
|
next;
|
||||||
|
|
||||||
|
if ($0 ~ /^@example$/)
|
||||||
|
{
|
||||||
|
input = files_output[file] ? "\n" : "";
|
||||||
|
|
||||||
|
# FNR is starting at 0 instead of 1, and
|
||||||
|
# #line report the line number of the *next* line.
|
||||||
|
# => + 2.
|
||||||
|
# Note that recent Bison support it, but not Flex.
|
||||||
|
if (file ~ /\.[chy]*$/)
|
||||||
|
input = "#line " (FNR + 1) " \"" FILENAME "\"\n";
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($0 ~ /^@end example$/)
|
||||||
|
{
|
||||||
|
if (input == "")
|
||||||
|
fatal("no contents: " file);
|
||||||
|
|
||||||
|
input = normalize(input);
|
||||||
|
# No spurious end of line: use printf.
|
||||||
|
if (files_output[file])
|
||||||
|
printf ("%s", input) >> output_dir "/" file;
|
||||||
|
else
|
||||||
|
printf ("%s", input) > output_dir "/" file;
|
||||||
|
close (output_dir "/" file);
|
||||||
|
files_output[file] = 1;
|
||||||
|
|
||||||
|
file = input = "";
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
|
input = input $0 "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# We have to handle CONTENTS line per line, since anchors in AWK are
|
||||||
|
# referring to the whole string, not the lines.
|
||||||
|
function normalize(contents, i, lines, n, line, res) {
|
||||||
|
# Remove the Texinfo tags.
|
||||||
|
n = split (contents, lines, "\n");
|
||||||
|
# We don't want the last field which empty: it's behind the last \n.
|
||||||
|
for (i = 1; i < n; ++i)
|
||||||
|
{
|
||||||
|
line = lines[i];
|
||||||
|
|
||||||
|
# Whole line commands.
|
||||||
|
if (line ~ /^@(c |comment|dots|end (ignore|group)|ignore|group)/)
|
||||||
|
# Gperf accepts empty lines as valid input!!!
|
||||||
|
if (file ~ /\.gperf$/)
|
||||||
|
continue;
|
||||||
|
else
|
||||||
|
line = "";
|
||||||
|
|
||||||
|
gsub (/^@result\{\}/, "", line);
|
||||||
|
gsub (/^@error\{\}/, "", line);
|
||||||
|
gsub ("@[{]", "{", line);
|
||||||
|
gsub ("@}", "}", line);
|
||||||
|
gsub ("@@", "@", line);
|
||||||
|
gsub ("@comment.*", "", line);
|
||||||
|
|
||||||
|
res = res line "\n";
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function message(msg) {
|
||||||
|
if (! message_printed[msg])
|
||||||
|
{
|
||||||
|
print "extexi: " msg > "/dev/stderr";
|
||||||
|
message_printed[msg] = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function fatal(msg) {
|
||||||
|
message(msg);
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
+9
-3
@@ -9,11 +9,14 @@ argmatch.h
|
|||||||
basename.c
|
basename.c
|
||||||
dirname.c
|
dirname.c
|
||||||
dirname.h
|
dirname.h
|
||||||
|
dup-safer.c
|
||||||
error.c
|
error.c
|
||||||
error.h
|
error.h
|
||||||
exit.h
|
exit.h
|
||||||
exitfail.c
|
exitfail.c
|
||||||
exitfail.h
|
exitfail.h
|
||||||
|
fd-safer.c
|
||||||
|
fopen-safer.c
|
||||||
getopt.c
|
getopt.c
|
||||||
getopt.h
|
getopt.h
|
||||||
getopt1.c
|
getopt1.c
|
||||||
@@ -30,26 +33,29 @@ mbswidth.c
|
|||||||
mbswidth.h
|
mbswidth.h
|
||||||
obstack.c
|
obstack.c
|
||||||
obstack.h
|
obstack.h
|
||||||
|
pipe-safer.c
|
||||||
quote.c
|
quote.c
|
||||||
quote.h
|
quote.h
|
||||||
quotearg.c
|
quotearg.c
|
||||||
quotearg.h
|
quotearg.h
|
||||||
realloc.c
|
|
||||||
stdbool.h
|
stdbool.h
|
||||||
stdbool_.h
|
stdbool_.h
|
||||||
|
stdio--.h
|
||||||
|
stdio-safer.h
|
||||||
stpcpy.c
|
stpcpy.c
|
||||||
stpcpy.h
|
stpcpy.h
|
||||||
strdup.c
|
strdup.c
|
||||||
strdup.h
|
strdup.h
|
||||||
stripslash.c
|
stripslash.c
|
||||||
strncasecmp.c
|
|
||||||
strndup.c
|
strndup.c
|
||||||
strndup.h
|
strndup.h
|
||||||
strnlen.c
|
strnlen.c
|
||||||
|
strnlen.h
|
||||||
|
unistd--.h
|
||||||
|
unistd-safer.h
|
||||||
unlocked-io.h
|
unlocked-io.h
|
||||||
xalloc-die.c
|
xalloc-die.c
|
||||||
xalloc.h
|
xalloc.h
|
||||||
xmalloc.c
|
xmalloc.c
|
||||||
xstrdup.c
|
|
||||||
xstrndup.c
|
xstrndup.c
|
||||||
xstrndup.h
|
xstrndup.h
|
||||||
|
|||||||
+2
-2
@@ -12,8 +12,8 @@
|
|||||||
|
|
||||||
## 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, write to the Free Software
|
## along with this program; if not, write to the Free Software
|
||||||
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
## 02111-1307 USA
|
## 02110-1301 USA
|
||||||
|
|
||||||
AM_CFLAGS = $(WARNING_CFLAGS)
|
AM_CFLAGS = $(WARNING_CFLAGS)
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
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, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
|
|||||||
+2
-2
@@ -14,10 +14,10 @@ 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, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
#ifndef _ABITSET_H
|
#ifndef _ABITSET_H
|
||||||
#define _ABITSET_H
|
#define _ABITSET_H
|
||||||
|
|
||||||
#include "bitset.h"
|
#include "bitset.h"
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -14,7 +14,7 @@ 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, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
#ifndef _BBITSET_H
|
#ifndef _BBITSET_H
|
||||||
#define _BBITSET_H
|
#define _BBITSET_H
|
||||||
@@ -34,7 +34,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|||||||
BITSET_TABLE: Expandable table of pointers to arrays of bits
|
BITSET_TABLE: Expandable table of pointers to arrays of bits
|
||||||
(variable size, less storage for large sparse sets).
|
(variable size, less storage for large sparse sets).
|
||||||
Faster than BITSET_LIST for random access.
|
Faster than BITSET_LIST for random access.
|
||||||
BITSET_VARRAY: Variable array of bits (variable size, fast for
|
BITSET_VARRAY: Variable array of bits (variable size, fast for
|
||||||
dense bitsets).
|
dense bitsets).
|
||||||
BITSET_STATS: Wrapper bitset for internal use only. Used for gathering
|
BITSET_STATS: Wrapper bitset for internal use only. Used for gathering
|
||||||
statistics and/or better run-time checking.
|
statistics and/or better run-time checking.
|
||||||
|
|||||||
+5
-5
@@ -1,5 +1,5 @@
|
|||||||
/* General bitsets.
|
/* General bitsets.
|
||||||
Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
|
Copyright (C) 2002, 2003, 2004, 2005 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
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
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, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
@@ -111,7 +111,7 @@ bitset_type_choose (bitset_bindex n_bits ATTRIBUTE_UNUSED, unsigned int attr)
|
|||||||
/* Choose the type of bitset. Note that sometimes we will be asked
|
/* Choose the type of bitset. Note that sometimes we will be asked
|
||||||
for a zero length fixed size bitset. */
|
for a zero length fixed size bitset. */
|
||||||
|
|
||||||
|
|
||||||
/* If no attributes selected, choose a good compromise. */
|
/* If no attributes selected, choose a good compromise. */
|
||||||
if (!attr)
|
if (!attr)
|
||||||
return BITSET_VARRAY;
|
return BITSET_VARRAY;
|
||||||
@@ -138,7 +138,7 @@ bitset_alloc (bitset_bindex n_bits, enum bitset_type type)
|
|||||||
|
|
||||||
bytes = bitset_bytes (type, n_bits);
|
bytes = bitset_bytes (type, n_bits);
|
||||||
|
|
||||||
bset = (bitset) xcalloc (1, bytes);
|
bset = xcalloc (1, bytes);
|
||||||
|
|
||||||
/* The cache is disabled until some elements are allocated. If we
|
/* The cache is disabled until some elements are allocated. If we
|
||||||
have variable length arrays, then we may need to allocate a dummy
|
have variable length arrays, then we may need to allocate a dummy
|
||||||
@@ -307,7 +307,7 @@ bitset_print (FILE *file, bitset bset, bool verbose)
|
|||||||
pos = 0;
|
pos = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf (file, "%d ", i);
|
fprintf (file, "%lu ", (unsigned long int) i);
|
||||||
pos += 1 + (i >= 10) + (i >= 100);
|
pos += 1 + (i >= 10) + (i >= 100);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+6
-7
@@ -14,7 +14,7 @@ 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, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
#ifndef _BITSET_H
|
#ifndef _BITSET_H
|
||||||
#define _BITSET_H
|
#define _BITSET_H
|
||||||
@@ -309,8 +309,8 @@ extern void bitset_dump (FILE *, bitset);
|
|||||||
*/
|
*/
|
||||||
#define BITSET_FOR_EACH(ITER, BSET, INDEX, MIN) \
|
#define BITSET_FOR_EACH(ITER, BSET, INDEX, MIN) \
|
||||||
for (ITER.next = (MIN), ITER.num = BITSET_LIST_SIZE; \
|
for (ITER.next = (MIN), ITER.num = BITSET_LIST_SIZE; \
|
||||||
(ITER.num == BITSET_LIST_SIZE) \
|
(ITER.num == BITSET_LIST_SIZE) \
|
||||||
&& (ITER.num = bitset_list (BSET, ITER.list, \
|
&& (ITER.num = bitset_list (BSET, ITER.list, \
|
||||||
BITSET_LIST_SIZE, &ITER.next));) \
|
BITSET_LIST_SIZE, &ITER.next));) \
|
||||||
for (ITER.i = 0; \
|
for (ITER.i = 0; \
|
||||||
ITER.i < ITER.num && ((INDEX) = ITER.list[ITER.i], 1); \
|
ITER.i < ITER.num && ((INDEX) = ITER.list[ITER.i], 1); \
|
||||||
@@ -331,7 +331,7 @@ extern void bitset_dump (FILE *, bitset);
|
|||||||
*/
|
*/
|
||||||
#define BITSET_FOR_EACH_REVERSE(ITER, BSET, INDEX, MIN) \
|
#define BITSET_FOR_EACH_REVERSE(ITER, BSET, INDEX, MIN) \
|
||||||
for (ITER.next = (MIN), ITER.num = BITSET_LIST_SIZE; \
|
for (ITER.next = (MIN), ITER.num = BITSET_LIST_SIZE; \
|
||||||
(ITER.num == BITSET_LIST_SIZE) \
|
(ITER.num == BITSET_LIST_SIZE) \
|
||||||
&& (ITER.num = bitset_list_reverse (BSET, ITER.list, \
|
&& (ITER.num = bitset_list_reverse (BSET, ITER.list, \
|
||||||
BITSET_LIST_SIZE, &ITER.next));) \
|
BITSET_LIST_SIZE, &ITER.next));) \
|
||||||
for (ITER.i = 0; \
|
for (ITER.i = 0; \
|
||||||
@@ -371,10 +371,10 @@ extern void bitset_stats_enable (void);
|
|||||||
extern void bitset_stats_disable (void);
|
extern void bitset_stats_disable (void);
|
||||||
|
|
||||||
/* Read bitset stats file of accummulated stats. */
|
/* Read bitset stats file of accummulated stats. */
|
||||||
void bitset_stats_read (const char *filename);
|
void bitset_stats_read (const char *file_name);
|
||||||
|
|
||||||
/* Write bitset stats file of accummulated stats. */
|
/* Write bitset stats file of accummulated stats. */
|
||||||
void bitset_stats_write (const char *filename);
|
void bitset_stats_write (const char *file_name);
|
||||||
|
|
||||||
/* Dump bitset stats. */
|
/* Dump bitset stats. */
|
||||||
extern void bitset_stats_dump (FILE *);
|
extern void bitset_stats_dump (FILE *);
|
||||||
@@ -386,4 +386,3 @@ extern void debug_bitset (bitset);
|
|||||||
extern void debug_bitset_stats (void);
|
extern void debug_bitset_stats (void);
|
||||||
|
|
||||||
#endif /* _BITSET_H */
|
#endif /* _BITSET_H */
|
||||||
|
|
||||||
|
|||||||
+26
-26
@@ -1,5 +1,5 @@
|
|||||||
/* Bitset statistics.
|
/* Bitset statistics.
|
||||||
Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
|
Copyright (C) 2002, 2003, 2004, 2005 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
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
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, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* This file is a wrapper bitset implementation for the other bitset
|
/* This file is a wrapper bitset implementation for the other bitset
|
||||||
@@ -50,29 +50,29 @@
|
|||||||
|
|
||||||
|
|
||||||
/* Accessor macros. */
|
/* Accessor macros. */
|
||||||
#define BITSET_STATS_ALLOCS_INC(TYPE) \
|
#define BITSET_STATS_ALLOCS_INC(TYPE) \
|
||||||
bitset_stats_info->types[(TYPE)].allocs++
|
bitset_stats_info->types[(TYPE)].allocs++
|
||||||
#define BITSET_STATS_FREES_INC(BSET) \
|
#define BITSET_STATS_FREES_INC(BSET) \
|
||||||
bitset_stats_info->types[BITSET_TYPE_ (BSET)].frees++
|
bitset_stats_info->types[BITSET_TYPE_ (BSET)].frees++
|
||||||
#define BITSET_STATS_SETS_INC(BSET) \
|
#define BITSET_STATS_SETS_INC(BSET) \
|
||||||
bitset_stats_info->types[BITSET_TYPE_ (BSET)].sets++
|
bitset_stats_info->types[BITSET_TYPE_ (BSET)].sets++
|
||||||
#define BITSET_STATS_CACHE_SETS_INC(BSET) \
|
#define BITSET_STATS_CACHE_SETS_INC(BSET) \
|
||||||
bitset_stats_info->types[BITSET_TYPE_ (BSET)].cache_sets++
|
bitset_stats_info->types[BITSET_TYPE_ (BSET)].cache_sets++
|
||||||
#define BITSET_STATS_RESETS_INC(BSET) \
|
#define BITSET_STATS_RESETS_INC(BSET) \
|
||||||
bitset_stats_info->types[BITSET_TYPE_ (BSET)].resets++
|
bitset_stats_info->types[BITSET_TYPE_ (BSET)].resets++
|
||||||
#define BITSET_STATS_CACHE_RESETS_INC(BSET) \
|
#define BITSET_STATS_CACHE_RESETS_INC(BSET) \
|
||||||
bitset_stats_info->types[BITSET_TYPE_ (BSET)].cache_resets++
|
bitset_stats_info->types[BITSET_TYPE_ (BSET)].cache_resets++
|
||||||
#define BITSET_STATS_TESTS_INC(BSET) \
|
#define BITSET_STATS_TESTS_INC(BSET) \
|
||||||
bitset_stats_info->types[BITSET_TYPE_ (BSET)].tests++
|
bitset_stats_info->types[BITSET_TYPE_ (BSET)].tests++
|
||||||
#define BITSET_STATS_CACHE_TESTS_INC(BSET) \
|
#define BITSET_STATS_CACHE_TESTS_INC(BSET) \
|
||||||
bitset_stats_info->types[BITSET_TYPE_ (BSET)].cache_tests++
|
bitset_stats_info->types[BITSET_TYPE_ (BSET)].cache_tests++
|
||||||
#define BITSET_STATS_LISTS_INC(BSET) \
|
#define BITSET_STATS_LISTS_INC(BSET) \
|
||||||
bitset_stats_info->types[BITSET_TYPE_ (BSET)].lists++
|
bitset_stats_info->types[BITSET_TYPE_ (BSET)].lists++
|
||||||
#define BITSET_STATS_LIST_COUNTS_INC(BSET, I) \
|
#define BITSET_STATS_LIST_COUNTS_INC(BSET, I) \
|
||||||
bitset_stats_info->types[BITSET_TYPE_ (BSET)].list_counts[(I)]++
|
bitset_stats_info->types[BITSET_TYPE_ (BSET)].list_counts[(I)]++
|
||||||
#define BITSET_STATS_LIST_SIZES_INC(BSET, I) \
|
#define BITSET_STATS_LIST_SIZES_INC(BSET, I) \
|
||||||
bitset_stats_info->types[BITSET_TYPE_ (BSET)].list_sizes[(I)]++
|
bitset_stats_info->types[BITSET_TYPE_ (BSET)].list_sizes[(I)]++
|
||||||
#define BITSET_STATS_LIST_DENSITY_INC(BSET, I) \
|
#define BITSET_STATS_LIST_DENSITY_INC(BSET, I) \
|
||||||
bitset_stats_info->types[BITSET_TYPE_ (BSET)].list_density[(I)]++
|
bitset_stats_info->types[BITSET_TYPE_ (BSET)].list_density[(I)]++
|
||||||
|
|
||||||
|
|
||||||
@@ -241,17 +241,17 @@ bitset_stats_disable (void)
|
|||||||
|
|
||||||
/* Read bitset statistics file. */
|
/* Read bitset statistics file. */
|
||||||
void
|
void
|
||||||
bitset_stats_read (const char *filename)
|
bitset_stats_read (const char *file_name)
|
||||||
{
|
{
|
||||||
FILE *file;
|
FILE *file;
|
||||||
|
|
||||||
if (!bitset_stats_info)
|
if (!bitset_stats_info)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!filename)
|
if (!file_name)
|
||||||
filename = BITSET_STATS_FILE;
|
file_name = BITSET_STATS_FILE;
|
||||||
|
|
||||||
file = fopen (filename, "r");
|
file = fopen (file_name, "r");
|
||||||
if (file)
|
if (file)
|
||||||
{
|
{
|
||||||
if (fread (&bitset_stats_info_data, sizeof (bitset_stats_info_data),
|
if (fread (&bitset_stats_info_data, sizeof (bitset_stats_info_data),
|
||||||
@@ -271,17 +271,17 @@ bitset_stats_read (const char *filename)
|
|||||||
|
|
||||||
/* Write bitset statistics file. */
|
/* Write bitset statistics file. */
|
||||||
void
|
void
|
||||||
bitset_stats_write (const char *filename)
|
bitset_stats_write (const char *file_name)
|
||||||
{
|
{
|
||||||
FILE *file;
|
FILE *file;
|
||||||
|
|
||||||
if (!bitset_stats_info)
|
if (!bitset_stats_info)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!filename)
|
if (!file_name)
|
||||||
filename = BITSET_STATS_FILE;
|
file_name = BITSET_STATS_FILE;
|
||||||
|
|
||||||
file = fopen (filename, "w");
|
file = fopen (file_name, "w");
|
||||||
if (file)
|
if (file)
|
||||||
{
|
{
|
||||||
if (fwrite (&bitset_stats_info_data, sizeof (bitset_stats_info_data),
|
if (fwrite (&bitset_stats_info_data, sizeof (bitset_stats_info_data),
|
||||||
@@ -698,25 +698,25 @@ bitset_stats_init (bitset bset, bitset_bindex n_bits, enum bitset_type type)
|
|||||||
{
|
{
|
||||||
case BITSET_ARRAY:
|
case BITSET_ARRAY:
|
||||||
bytes = abitset_bytes (n_bits);
|
bytes = abitset_bytes (n_bits);
|
||||||
sbset = (bitset) xcalloc (1, bytes);
|
sbset = xcalloc (1, bytes);
|
||||||
abitset_init (sbset, n_bits);
|
abitset_init (sbset, n_bits);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BITSET_LIST:
|
case BITSET_LIST:
|
||||||
bytes = lbitset_bytes (n_bits);
|
bytes = lbitset_bytes (n_bits);
|
||||||
sbset = (bitset) xcalloc (1, bytes);
|
sbset = xcalloc (1, bytes);
|
||||||
lbitset_init (sbset, n_bits);
|
lbitset_init (sbset, n_bits);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BITSET_TABLE:
|
case BITSET_TABLE:
|
||||||
bytes = ebitset_bytes (n_bits);
|
bytes = ebitset_bytes (n_bits);
|
||||||
sbset = (bitset) xcalloc (1, bytes);
|
sbset = xcalloc (1, bytes);
|
||||||
ebitset_init (sbset, n_bits);
|
ebitset_init (sbset, n_bits);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BITSET_VARRAY:
|
case BITSET_VARRAY:
|
||||||
bytes = vbitset_bytes (n_bits);
|
bytes = vbitset_bytes (n_bits);
|
||||||
sbset = (bitset) xcalloc (1, bytes);
|
sbset = xcalloc (1, bytes);
|
||||||
vbitset_init (sbset, n_bits);
|
vbitset_init (sbset, n_bits);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -14,7 +14,7 @@ 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, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
#ifndef _BITSET_STATS_H
|
#ifndef _BITSET_STATS_H
|
||||||
#define _BITSET_STATS_H
|
#define _BITSET_STATS_H
|
||||||
|
|||||||
+2
-2
@@ -15,8 +15,8 @@ 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 Bison; see the file COPYING. If not, write to the Free
|
along with Bison; see the file COPYING. If not, write to the Free
|
||||||
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
02111-1307, USA. */
|
02110-1301, USA. */
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|||||||
+1
-1
@@ -14,7 +14,7 @@ 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, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
#ifndef _BITSETV_PRINT_H
|
#ifndef _BITSETV_PRINT_H
|
||||||
#define _BITSETV_PRINT_H
|
#define _BITSETV_PRINT_H
|
||||||
|
|||||||
+4
-4
@@ -1,5 +1,5 @@
|
|||||||
/* Bitset vectors.
|
/* Bitset vectors.
|
||||||
Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
|
Copyright (C) 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
||||||
@@ -15,8 +15,8 @@ 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 GCC; see the file COPYING. If not, write to the Free
|
along with GCC; see the file COPYING. If not, write to the Free
|
||||||
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
02111-1307, USA. */
|
02110-1301, USA. */
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
@@ -47,7 +47,7 @@ bitsetv_alloc (bitset_bindex n_vecs, bitset_bindex n_bits,
|
|||||||
/* Allocate vector table at head of bitset array. */
|
/* Allocate vector table at head of bitset array. */
|
||||||
vector_bytes = (n_vecs + 1) * sizeof (bitset) + bytes - 1;
|
vector_bytes = (n_vecs + 1) * sizeof (bitset) + bytes - 1;
|
||||||
vector_bytes -= vector_bytes % bytes;
|
vector_bytes -= vector_bytes % bytes;
|
||||||
bsetv = (bitset *) xcalloc (1, vector_bytes + bytes * n_vecs);
|
bsetv = xcalloc (1, vector_bytes + bytes * n_vecs);
|
||||||
|
|
||||||
for (i = 0; i < n_vecs; i++)
|
for (i = 0; i < n_vecs; i++)
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -14,7 +14,7 @@ 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, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
#ifndef _BITSETV_H
|
#ifndef _BITSETV_H
|
||||||
#define _BITSETV_H
|
#define _BITSETV_H
|
||||||
|
|||||||
+14
-14
@@ -1,5 +1,5 @@
|
|||||||
/* Functions to support expandable bitsets.
|
/* Functions to support expandable bitsets.
|
||||||
Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
|
Copyright (C) 2002, 2003, 2004, 2005 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
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
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, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
@@ -115,11 +115,11 @@ static ebitset_elt *ebitset_free_list; /* Free list of bitset elements. */
|
|||||||
((BSET)->b.cindex = (EINDEX) * EBITSET_ELT_WORDS, \
|
((BSET)->b.cindex = (EINDEX) * EBITSET_ELT_WORDS, \
|
||||||
(BSET)->b.cdata = EBITSET_WORDS (EBITSET_ELTS (BSET) [EINDEX]))
|
(BSET)->b.cdata = EBITSET_WORDS (EBITSET_ELTS (BSET) [EINDEX]))
|
||||||
|
|
||||||
|
#undef min
|
||||||
|
#undef max
|
||||||
#define min(a, b) ((a) > (b) ? (b) : (a))
|
#define min(a, b) ((a) > (b) ? (b) : (a))
|
||||||
#define max(a, b) ((a) > (b) ? (a) : (b))
|
#define max(a, b) ((a) > (b) ? (a) : (b))
|
||||||
|
|
||||||
|
|
||||||
static bitset_bindex
|
static bitset_bindex
|
||||||
ebitset_resize (bitset src, bitset_bindex n_bits)
|
ebitset_resize (bitset src, bitset_bindex n_bits)
|
||||||
{
|
{
|
||||||
@@ -136,7 +136,7 @@ ebitset_resize (bitset src, bitset_bindex n_bits)
|
|||||||
{
|
{
|
||||||
bitset_windex size;
|
bitset_windex size;
|
||||||
|
|
||||||
/* The bitset needs to grow. If we already have enough memory
|
/* The bitset needs to grow. If we already have enough memory
|
||||||
allocated, then just zero what we need. */
|
allocated, then just zero what we need. */
|
||||||
if (newsize > EBITSET_ASIZE (src))
|
if (newsize > EBITSET_ASIZE (src))
|
||||||
{
|
{
|
||||||
@@ -149,13 +149,13 @@ ebitset_resize (bitset src, bitset_bindex n_bits)
|
|||||||
size = newsize;
|
size = newsize;
|
||||||
else
|
else
|
||||||
size = newsize + newsize / 4;
|
size = newsize + newsize / 4;
|
||||||
|
|
||||||
EBITSET_ELTS (src)
|
EBITSET_ELTS (src)
|
||||||
= realloc (EBITSET_ELTS (src), size * sizeof (ebitset_elt *));
|
= realloc (EBITSET_ELTS (src), size * sizeof (ebitset_elt *));
|
||||||
EBITSET_ASIZE (src) = size;
|
EBITSET_ASIZE (src) = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset (EBITSET_ELTS (src) + oldsize, 0,
|
memset (EBITSET_ELTS (src) + oldsize, 0,
|
||||||
(newsize - oldsize) * sizeof (ebitset_elt *));
|
(newsize - oldsize) * sizeof (ebitset_elt *));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -838,10 +838,10 @@ ebitset_unused_clear (bitset dst)
|
|||||||
{
|
{
|
||||||
unsigned int last_bit;
|
unsigned int last_bit;
|
||||||
bitset_bindex n_bits;
|
bitset_bindex n_bits;
|
||||||
|
|
||||||
n_bits = BITSET_NBITS_ (dst);
|
n_bits = BITSET_NBITS_ (dst);
|
||||||
last_bit = n_bits % EBITSET_ELT_BITS;
|
last_bit = n_bits % EBITSET_ELT_BITS;
|
||||||
|
|
||||||
if (last_bit)
|
if (last_bit)
|
||||||
{
|
{
|
||||||
bitset_windex eindex;
|
bitset_windex eindex;
|
||||||
@@ -849,20 +849,20 @@ ebitset_unused_clear (bitset dst)
|
|||||||
ebitset_elt *elt;
|
ebitset_elt *elt;
|
||||||
|
|
||||||
elts = EBITSET_ELTS (dst);
|
elts = EBITSET_ELTS (dst);
|
||||||
|
|
||||||
eindex = n_bits / EBITSET_ELT_BITS;
|
eindex = n_bits / EBITSET_ELT_BITS;
|
||||||
|
|
||||||
elt = elts[eindex];
|
elt = elts[eindex];
|
||||||
if (elt)
|
if (elt)
|
||||||
{
|
{
|
||||||
bitset_windex windex;
|
bitset_windex windex;
|
||||||
bitset_windex woffset;
|
bitset_windex woffset;
|
||||||
bitset_word *srcp = EBITSET_WORDS (elt);
|
bitset_word *srcp = EBITSET_WORDS (elt);
|
||||||
|
|
||||||
windex = n_bits / BITSET_WORD_BITS;
|
windex = n_bits / BITSET_WORD_BITS;
|
||||||
woffset = eindex * EBITSET_ELT_WORDS;
|
woffset = eindex * EBITSET_ELT_WORDS;
|
||||||
|
|
||||||
srcp[windex - woffset] &= ((bitset_word) 1 << last_bit) - 1;
|
srcp[windex - woffset] &= ((bitset_word) 1 << last_bit) - 1;
|
||||||
windex++;
|
windex++;
|
||||||
for (; (windex - woffset) < EBITSET_ELT_WORDS; windex++)
|
for (; (windex - woffset) < EBITSET_ELT_WORDS; windex++)
|
||||||
srcp[windex - woffset] = 0;
|
srcp[windex - woffset] = 0;
|
||||||
|
|||||||
+2
-2
@@ -14,10 +14,10 @@ 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, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
#ifndef _EBITSET_H
|
#ifndef _EBITSET_H
|
||||||
#define _EBITSET_H
|
#define _EBITSET_H
|
||||||
|
|
||||||
#include "bitset.h"
|
#include "bitset.h"
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
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, write to the Free Software Foundation,
|
along with this program; if not, write to the Free Software Foundation,
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
/* Written by Paul Eggert. */
|
/* Written by Paul Eggert. */
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
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, write to the Free Software Foundation,
|
along with this program; if not, write to the Free Software Foundation,
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
extern int get_errno (void);
|
extern int get_errno (void);
|
||||||
extern void set_errno (int);
|
extern void set_errno (int);
|
||||||
|
|||||||
+6
-6
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
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, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
/* Number of words to use for each element. The larger the value the
|
/* Number of words to use for each element. The larger the value the
|
||||||
greater the size of the cache and the shorter the time to find a given bit
|
greater the size of the cache and the shorter the time to find a given bit
|
||||||
but the more memory wasted for sparse bitsets and the longer the time
|
but the more memory wasted for sparse bitsets and the longer the time
|
||||||
to search for set bits.
|
to search for set bits.
|
||||||
|
|
||||||
The routines that dominate timing profiles are lbitset_elt_find
|
The routines that dominate timing profiles are lbitset_elt_find
|
||||||
and lbitset_elt_link, especially when accessing the bits randomly. */
|
and lbitset_elt_link, especially when accessing the bits randomly. */
|
||||||
@@ -888,18 +888,18 @@ lbitset_unused_clear (bitset dst)
|
|||||||
|
|
||||||
n_bits = BITSET_SIZE_ (dst);
|
n_bits = BITSET_SIZE_ (dst);
|
||||||
last_bit = n_bits % LBITSET_ELT_BITS;
|
last_bit = n_bits % LBITSET_ELT_BITS;
|
||||||
|
|
||||||
if (last_bit)
|
if (last_bit)
|
||||||
{
|
{
|
||||||
lbitset_elt *elt;
|
lbitset_elt *elt;
|
||||||
bitset_windex windex;
|
bitset_windex windex;
|
||||||
bitset_word *srcp;
|
bitset_word *srcp;
|
||||||
|
|
||||||
elt = LBITSET_TAIL (dst);
|
elt = LBITSET_TAIL (dst);
|
||||||
srcp = elt->words;
|
srcp = elt->words;
|
||||||
windex = n_bits / BITSET_WORD_BITS;
|
windex = n_bits / BITSET_WORD_BITS;
|
||||||
|
|
||||||
srcp[windex - elt->index] &= ((bitset_word) 1 << last_bit) - 1;
|
srcp[windex - elt->index] &= ((bitset_word) 1 << last_bit) - 1;
|
||||||
windex++;
|
windex++;
|
||||||
|
|
||||||
for (; (windex - elt->index) < LBITSET_ELT_WORDS; windex++)
|
for (; (windex - elt->index) < LBITSET_ELT_WORDS; windex++)
|
||||||
|
|||||||
+2
-2
@@ -14,10 +14,10 @@ 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, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
#ifndef _LBITSET_H
|
#ifndef _LBITSET_H
|
||||||
#define _LBITSET_H
|
#define _LBITSET_H
|
||||||
|
|
||||||
#include "bitset.h"
|
#include "bitset.h"
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
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, write to the Free Software Foundation,
|
along with this program; if not, write to the Free Software Foundation,
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
|
|
||||||
/* Bison depends on libiberty's implementation of bitsets, which
|
/* Bison depends on libiberty's implementation of bitsets, which
|
||||||
|
|||||||
+2
-2
@@ -16,8 +16,8 @@
|
|||||||
|
|
||||||
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 Bison; see the file COPYING. If not, write to
|
along with Bison; see the file COPYING. If not, write to
|
||||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
|
|||||||
+26
-38
@@ -1,6 +1,6 @@
|
|||||||
/* Subprocesses with pipes.
|
/* Subprocesses with pipes.
|
||||||
|
|
||||||
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
Copyright (C) 2002, 2004, 2005 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
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
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, write to the Free Software Foundation,
|
along with this program; if not, write to the Free Software Foundation,
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
/* Written by Paul Eggert <[email protected]>
|
/* Written by Paul Eggert <[email protected]>
|
||||||
and Florian Krohm <florian@edamail.fishkill.ibm.com>. */
|
and Florian Krohm <florian@edamail.fishkill.ibm.com>. */
|
||||||
@@ -44,9 +44,7 @@
|
|||||||
# define STDOUT_FILENO 1
|
# define STDOUT_FILENO 1
|
||||||
#endif
|
#endif
|
||||||
#if ! HAVE_DUP2 && ! defined dup2
|
#if ! HAVE_DUP2 && ! defined dup2
|
||||||
# if HAVE_FCNTL_H
|
# include <fcntl.h>
|
||||||
# include <fcntl.h>
|
|
||||||
# endif
|
|
||||||
# define dup2(f, t) (close (t), fcntl (f, F_DUPFD, t))
|
# define dup2(f, t) (close (t), fcntl (f, F_DUPFD, t))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -68,6 +66,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
|
#include "unistd-safer.h"
|
||||||
|
|
||||||
#include "gettext.h"
|
#include "gettext.h"
|
||||||
#define _(Msgid) gettext (Msgid)
|
#define _(Msgid) gettext (Msgid)
|
||||||
@@ -99,56 +98,44 @@ pid_t
|
|||||||
create_subpipe (char const * const *argv, int fd[2])
|
create_subpipe (char const * const *argv, int fd[2])
|
||||||
{
|
{
|
||||||
int pipe_fd[2];
|
int pipe_fd[2];
|
||||||
int from_in_fd;
|
int child_fd[2];
|
||||||
int from_out_fd;
|
|
||||||
int to_in_fd;
|
|
||||||
int to_out_fd;
|
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
|
|
||||||
if (pipe (pipe_fd) != 0)
|
if (pipe (child_fd) != 0
|
||||||
error (EXIT_FAILURE, errno, "pipe");
|
|| (child_fd[0] = fd_safer (child_fd[0])) < 0
|
||||||
to_in_fd = pipe_fd[0];
|
|| (fd[0] = fd_safer (child_fd[1])) < 0
|
||||||
to_out_fd = pipe_fd[1];
|
|| pipe (pipe_fd) != 0
|
||||||
|
|| (fd[1] = fd_safer (pipe_fd[0])) < 0
|
||||||
if (pipe (pipe_fd) != 0)
|
|| (child_fd[1] = fd_safer (pipe_fd[1])) < 0)
|
||||||
error (EXIT_FAILURE, errno, "pipe");
|
error (EXIT_FAILURE, errno,
|
||||||
from_in_fd = pipe_fd[0];
|
"pipe");
|
||||||
from_out_fd = pipe_fd[1];
|
|
||||||
|
|
||||||
pid = vfork ();
|
pid = vfork ();
|
||||||
if (pid < 0)
|
if (pid < 0)
|
||||||
error (EXIT_FAILURE, errno, "fork");
|
error (EXIT_FAILURE, errno,
|
||||||
|
"fork");
|
||||||
|
|
||||||
if (! pid)
|
if (! pid)
|
||||||
{
|
{
|
||||||
/* Child. */
|
/* Child. */
|
||||||
close (to_out_fd);
|
close (fd[0]);
|
||||||
close (from_in_fd);
|
close (fd[1]);
|
||||||
|
dup2 (child_fd[0], STDIN_FILENO);
|
||||||
if (to_in_fd != STDIN_FILENO)
|
close (child_fd[0]);
|
||||||
{
|
dup2 (child_fd[1], STDOUT_FILENO);
|
||||||
dup2 (to_in_fd, STDIN_FILENO);
|
close (child_fd[1]);
|
||||||
close (to_in_fd);
|
|
||||||
}
|
|
||||||
if (from_out_fd != STDOUT_FILENO)
|
|
||||||
{
|
|
||||||
dup2 (from_out_fd, STDOUT_FILENO);
|
|
||||||
close (from_out_fd);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* The cast to (char **) rather than (char * const *) is needed
|
/* The cast to (char **) rather than (char * const *) is needed
|
||||||
for portability to older hosts with a nonstandard prototype
|
for portability to older hosts with a nonstandard prototype
|
||||||
for execvp. */
|
for execvp. */
|
||||||
execvp (argv[0], (char **) argv);
|
execvp (argv[0], (char **) argv);
|
||||||
|
|
||||||
_exit (errno == ENOENT ? 127 : 126);
|
_exit (errno == ENOENT ? 127 : 126);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Parent. */
|
/* Parent. */
|
||||||
close (to_in_fd);
|
close (child_fd[0]);
|
||||||
close (from_out_fd);
|
close (child_fd[1]);
|
||||||
fd[0] = to_out_fd;
|
|
||||||
fd[1] = from_in_fd;
|
|
||||||
return pid;
|
return pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -161,7 +148,8 @@ reap_subpipe (pid_t pid, char const *program)
|
|||||||
#if HAVE_WAITPID || defined waitpid
|
#if HAVE_WAITPID || defined waitpid
|
||||||
int wstatus;
|
int wstatus;
|
||||||
if (waitpid (pid, &wstatus, 0) < 0)
|
if (waitpid (pid, &wstatus, 0) < 0)
|
||||||
error (EXIT_FAILURE, errno, "waitpid");
|
error (EXIT_FAILURE, errno,
|
||||||
|
"waitpid");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int status = WIFEXITED (wstatus) ? WEXITSTATUS (wstatus) : -1;
|
int status = WIFEXITED (wstatus) ? WEXITSTATUS (wstatus) : -1;
|
||||||
|
|||||||
+2
-2
@@ -15,8 +15,8 @@
|
|||||||
|
|
||||||
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 Bison; see the file COPYING. If not, write to the Free
|
along with Bison; see the file COPYING. If not, write to the Free
|
||||||
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
02111-1307, USA. */
|
02110-1301, USA. */
|
||||||
|
|
||||||
/* Written by Paul Eggert <[email protected]>
|
/* Written by Paul Eggert <[email protected]>
|
||||||
and Florian Krohm <florian@edamail.fishkill.ibm.com>. */
|
and Florian Krohm <florian@edamail.fishkill.ibm.com>. */
|
||||||
|
|||||||
+3
-3
@@ -16,8 +16,8 @@ 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 Bison; see the file COPYING. If not, write to the Free
|
along with Bison; see the file COPYING. If not, write to the Free
|
||||||
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
02111-1307, USA. */
|
02110-1301, USA. */
|
||||||
|
|
||||||
#if IN_GCC
|
#if IN_GCC
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|||||||
/* This source file is taken from the GCC source code, with slight
|
/* This source file is taken from the GCC source code, with slight
|
||||||
modifications that are under control of the IN_GCC preprocessor
|
modifications that are under control of the IN_GCC preprocessor
|
||||||
variable. The !IN_GCC part of this file is specific to Bison. */
|
variable. The !IN_GCC part of this file is specific to Bison. */
|
||||||
|
|
||||||
# include "../src/system.h"
|
# include "../src/system.h"
|
||||||
# if HAVE_SYS_TIME_H
|
# if HAVE_SYS_TIME_H
|
||||||
# include <sys/time.h>
|
# include <sys/time.h>
|
||||||
|
|||||||
+2
-2
@@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
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 Bison; see the file COPYING. If not, write to
|
along with Bison; see the file COPYING. If not, write to
|
||||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
/* This file contains timing variable definitions, used by timevar.h
|
/* This file contains timing variable definitions, used by timevar.h
|
||||||
and timevar.c.
|
and timevar.c.
|
||||||
|
|||||||
+2
-2
@@ -16,8 +16,8 @@
|
|||||||
|
|
||||||
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 Bison; see the file COPYING. If not, write to the Free
|
along with Bison; see the file COPYING. If not, write to the Free
|
||||||
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
02111-1307, USA. */
|
02110-1301, USA. */
|
||||||
|
|
||||||
#ifndef GCC_TIMEVAR_H
|
#ifndef GCC_TIMEVAR_H
|
||||||
#define GCC_TIMEVAR_H
|
#define GCC_TIMEVAR_H
|
||||||
|
|||||||
+39
-38
@@ -1,5 +1,5 @@
|
|||||||
/* Variable array bitsets.
|
/* Variable array bitsets.
|
||||||
Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
|
Copyright (C) 2002, 2003, 2004, 2005 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
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
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, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
/* This file implements variable size bitsets stored as a variable
|
/* This file implements variable size bitsets stored as a variable
|
||||||
length array of words. Any unused bits in the last word must be
|
length array of words. Any unused bits in the last word must be
|
||||||
zero.
|
zero.
|
||||||
|
|
||||||
Note that binary or ternary operations assume that each bitset operand
|
Note that binary or ternary operations assume that each bitset operand
|
||||||
has the same size.
|
has the same size.
|
||||||
@@ -38,7 +38,7 @@ static void vbitset_unused_clear (bitset);
|
|||||||
static void vbitset_set (bitset, bitset_bindex);
|
static void vbitset_set (bitset, bitset_bindex);
|
||||||
static void vbitset_reset (bitset, bitset_bindex);
|
static void vbitset_reset (bitset, bitset_bindex);
|
||||||
static bool vbitset_test (bitset, bitset_bindex);
|
static bool vbitset_test (bitset, bitset_bindex);
|
||||||
static bitset_bindex vbitset_list (bitset, bitset_bindex *,
|
static bitset_bindex vbitset_list (bitset, bitset_bindex *,
|
||||||
bitset_bindex, bitset_bindex *);
|
bitset_bindex, bitset_bindex *);
|
||||||
static bitset_bindex vbitset_list_reverse (bitset, bitset_bindex *,
|
static bitset_bindex vbitset_list_reverse (bitset, bitset_bindex *,
|
||||||
bitset_bindex, bitset_bindex *);
|
bitset_bindex, bitset_bindex *);
|
||||||
@@ -48,7 +48,8 @@ static bitset_bindex vbitset_list_reverse (bitset, bitset_bindex *,
|
|||||||
#define VBITSET_SIZE(X) ((X)->b.csize)
|
#define VBITSET_SIZE(X) ((X)->b.csize)
|
||||||
#define VBITSET_ASIZE(X) ((X)->v.size)
|
#define VBITSET_ASIZE(X) ((X)->v.size)
|
||||||
|
|
||||||
|
#undef min
|
||||||
|
#undef max
|
||||||
#define min(a, b) ((a) > (b) ? (b) : (a))
|
#define min(a, b) ((a) > (b) ? (b) : (a))
|
||||||
#define max(a, b) ((a) > (b) ? (a) : (b))
|
#define max(a, b) ((a) > (b) ? (a) : (b))
|
||||||
|
|
||||||
@@ -68,7 +69,7 @@ vbitset_resize (bitset src, bitset_bindex n_bits)
|
|||||||
{
|
{
|
||||||
bitset_windex size;
|
bitset_windex size;
|
||||||
|
|
||||||
/* The bitset needs to grow. If we already have enough memory
|
/* The bitset needs to grow. If we already have enough memory
|
||||||
allocated, then just zero what we need. */
|
allocated, then just zero what we need. */
|
||||||
if (newsize > VBITSET_ASIZE (src))
|
if (newsize > VBITSET_ASIZE (src))
|
||||||
{
|
{
|
||||||
@@ -81,13 +82,13 @@ vbitset_resize (bitset src, bitset_bindex n_bits)
|
|||||||
size = newsize;
|
size = newsize;
|
||||||
else
|
else
|
||||||
size = newsize + newsize / 4;
|
size = newsize + newsize / 4;
|
||||||
|
|
||||||
VBITSET_WORDS (src)
|
VBITSET_WORDS (src)
|
||||||
= realloc (VBITSET_WORDS (src), size * sizeof (bitset_word));
|
= realloc (VBITSET_WORDS (src), size * sizeof (bitset_word));
|
||||||
VBITSET_ASIZE (src) = size;
|
VBITSET_ASIZE (src) = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset (VBITSET_WORDS (src) + oldsize, 0,
|
memset (VBITSET_WORDS (src) + oldsize, 0,
|
||||||
(newsize - oldsize) * sizeof (bitset_word));
|
(newsize - oldsize) * sizeof (bitset_word));
|
||||||
VBITSET_SIZE (src) = newsize;
|
VBITSET_SIZE (src) = newsize;
|
||||||
}
|
}
|
||||||
@@ -426,7 +427,7 @@ vbitset_not (bitset dst, bitset src)
|
|||||||
sizeof (bitset_word) * (dsize - ssize));
|
sizeof (bitset_word) * (dsize - ssize));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
vbitset_equal_p (bitset dst, bitset src)
|
vbitset_equal_p (bitset dst, bitset src)
|
||||||
{
|
{
|
||||||
@@ -465,7 +466,7 @@ vbitset_subset_p (bitset dst, bitset src)
|
|||||||
bitset_word *dstp = VBITSET_WORDS (dst);
|
bitset_word *dstp = VBITSET_WORDS (dst);
|
||||||
bitset_windex ssize = VBITSET_SIZE (src);
|
bitset_windex ssize = VBITSET_SIZE (src);
|
||||||
bitset_windex dsize = VBITSET_SIZE (dst);
|
bitset_windex dsize = VBITSET_SIZE (dst);
|
||||||
|
|
||||||
for (i = 0; i < min (ssize, dsize); i++, dstp++, srcp++)
|
for (i = 0; i < min (ssize, dsize); i++, dstp++, srcp++)
|
||||||
if (*dstp != (*srcp | *dstp))
|
if (*dstp != (*srcp | *dstp))
|
||||||
return 0;
|
return 0;
|
||||||
@@ -520,7 +521,7 @@ vbitset_and (bitset dst, bitset src1, bitset src2)
|
|||||||
|
|
||||||
for (i = 0; i < min (ssize1, ssize2); i++)
|
for (i = 0; i < min (ssize1, ssize2); i++)
|
||||||
*dstp++ = *src1p++ & *src2p++;
|
*dstp++ = *src1p++ & *src2p++;
|
||||||
|
|
||||||
memset (dstp, 0, sizeof (bitset_word) * (dsize - min (ssize1, ssize2)));
|
memset (dstp, 0, sizeof (bitset_word) * (dsize - min (ssize1, ssize2)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -549,14 +550,14 @@ vbitset_and_cmp (bitset dst, bitset src1, bitset src2)
|
|||||||
for (i = 0; i < min (ssize1, ssize2); i++, dstp++)
|
for (i = 0; i < min (ssize1, ssize2); i++, dstp++)
|
||||||
{
|
{
|
||||||
bitset_word tmp = *src1p++ & *src2p++;
|
bitset_word tmp = *src1p++ & *src2p++;
|
||||||
|
|
||||||
if (*dstp != tmp)
|
if (*dstp != tmp)
|
||||||
{
|
{
|
||||||
changed = 1;
|
changed = 1;
|
||||||
*dstp = tmp;
|
*dstp = tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ssize2 > ssize1)
|
if (ssize2 > ssize1)
|
||||||
{
|
{
|
||||||
src1p = src2p;
|
src1p = src2p;
|
||||||
@@ -600,7 +601,7 @@ vbitset_andn (bitset dst, bitset src1, bitset src2)
|
|||||||
|
|
||||||
for (i = 0; i < min (ssize1, ssize2); i++)
|
for (i = 0; i < min (ssize1, ssize2); i++)
|
||||||
*dstp++ = *src1p++ & ~(*src2p++);
|
*dstp++ = *src1p++ & ~(*src2p++);
|
||||||
|
|
||||||
if (ssize2 > ssize1)
|
if (ssize2 > ssize1)
|
||||||
{
|
{
|
||||||
for (; i < ssize2; i++)
|
for (; i < ssize2; i++)
|
||||||
@@ -642,14 +643,14 @@ vbitset_andn_cmp (bitset dst, bitset src1, bitset src2)
|
|||||||
for (i = 0; i < min (ssize1, ssize2); i++, dstp++)
|
for (i = 0; i < min (ssize1, ssize2); i++, dstp++)
|
||||||
{
|
{
|
||||||
bitset_word tmp = *src1p++ & ~(*src2p++);
|
bitset_word tmp = *src1p++ & ~(*src2p++);
|
||||||
|
|
||||||
if (*dstp != tmp)
|
if (*dstp != tmp)
|
||||||
{
|
{
|
||||||
changed = 1;
|
changed = 1;
|
||||||
*dstp = tmp;
|
*dstp = tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ssize2 > ssize1)
|
if (ssize2 > ssize1)
|
||||||
{
|
{
|
||||||
for (; i < ssize2; i++, dstp++)
|
for (; i < ssize2; i++, dstp++)
|
||||||
@@ -668,7 +669,7 @@ vbitset_andn_cmp (bitset dst, bitset src1, bitset src2)
|
|||||||
for (; i < ssize1; i++, dstp++)
|
for (; i < ssize1; i++, dstp++)
|
||||||
{
|
{
|
||||||
bitset_word tmp = *src1p++;
|
bitset_word tmp = *src1p++;
|
||||||
|
|
||||||
if (*dstp != tmp)
|
if (*dstp != tmp)
|
||||||
{
|
{
|
||||||
changed = 1;
|
changed = 1;
|
||||||
@@ -705,7 +706,7 @@ vbitset_or (bitset dst, bitset src1, bitset src2)
|
|||||||
|
|
||||||
for (i = 0; i < min (ssize1, ssize2); i++)
|
for (i = 0; i < min (ssize1, ssize2); i++)
|
||||||
*dstp++ = *src1p++ | *src2p++;
|
*dstp++ = *src1p++ | *src2p++;
|
||||||
|
|
||||||
if (ssize2 > ssize1)
|
if (ssize2 > ssize1)
|
||||||
{
|
{
|
||||||
src1p = src2p;
|
src1p = src2p;
|
||||||
@@ -743,14 +744,14 @@ vbitset_or_cmp (bitset dst, bitset src1, bitset src2)
|
|||||||
for (i = 0; i < min (ssize1, ssize2); i++, dstp++)
|
for (i = 0; i < min (ssize1, ssize2); i++, dstp++)
|
||||||
{
|
{
|
||||||
bitset_word tmp = *src1p++ | *src2p++;
|
bitset_word tmp = *src1p++ | *src2p++;
|
||||||
|
|
||||||
if (*dstp != tmp)
|
if (*dstp != tmp)
|
||||||
{
|
{
|
||||||
changed = 1;
|
changed = 1;
|
||||||
*dstp = tmp;
|
*dstp = tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ssize2 > ssize1)
|
if (ssize2 > ssize1)
|
||||||
{
|
{
|
||||||
src1p = src2p;
|
src1p = src2p;
|
||||||
@@ -760,7 +761,7 @@ vbitset_or_cmp (bitset dst, bitset src1, bitset src2)
|
|||||||
for (; i < ssize1; i++, dstp++)
|
for (; i < ssize1; i++, dstp++)
|
||||||
{
|
{
|
||||||
bitset_word tmp = *src1p++;
|
bitset_word tmp = *src1p++;
|
||||||
|
|
||||||
if (*dstp != tmp)
|
if (*dstp != tmp)
|
||||||
{
|
{
|
||||||
changed = 1;
|
changed = 1;
|
||||||
@@ -796,7 +797,7 @@ vbitset_xor (bitset dst, bitset src1, bitset src2)
|
|||||||
|
|
||||||
for (i = 0; i < min (ssize1, ssize2); i++)
|
for (i = 0; i < min (ssize1, ssize2); i++)
|
||||||
*dstp++ = *src1p++ ^ *src2p++;
|
*dstp++ = *src1p++ ^ *src2p++;
|
||||||
|
|
||||||
if (ssize2 > ssize1)
|
if (ssize2 > ssize1)
|
||||||
{
|
{
|
||||||
src1p = src2p;
|
src1p = src2p;
|
||||||
@@ -834,14 +835,14 @@ vbitset_xor_cmp (bitset dst, bitset src1, bitset src2)
|
|||||||
for (i = 0; i < min (ssize1, ssize2); i++, dstp++)
|
for (i = 0; i < min (ssize1, ssize2); i++, dstp++)
|
||||||
{
|
{
|
||||||
bitset_word tmp = *src1p++ ^ *src2p++;
|
bitset_word tmp = *src1p++ ^ *src2p++;
|
||||||
|
|
||||||
if (*dstp != tmp)
|
if (*dstp != tmp)
|
||||||
{
|
{
|
||||||
changed = 1;
|
changed = 1;
|
||||||
*dstp = tmp;
|
*dstp = tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ssize2 > ssize1)
|
if (ssize2 > ssize1)
|
||||||
{
|
{
|
||||||
src1p = src2p;
|
src1p = src2p;
|
||||||
@@ -851,7 +852,7 @@ vbitset_xor_cmp (bitset dst, bitset src1, bitset src2)
|
|||||||
for (; i < ssize1; i++, dstp++)
|
for (; i < ssize1; i++, dstp++)
|
||||||
{
|
{
|
||||||
bitset_word tmp = *src1p++;
|
bitset_word tmp = *src1p++;
|
||||||
|
|
||||||
if (*dstp != tmp)
|
if (*dstp != tmp)
|
||||||
{
|
{
|
||||||
changed = 1;
|
changed = 1;
|
||||||
@@ -877,7 +878,7 @@ vbitset_and_or (bitset dst, bitset src1, bitset src2, bitset src3)
|
|||||||
bitset_word *src3p;
|
bitset_word *src3p;
|
||||||
bitset_word *dstp;
|
bitset_word *dstp;
|
||||||
bitset_windex size;
|
bitset_windex size;
|
||||||
|
|
||||||
if (BITSET_NBITS_ (src1) != BITSET_NBITS_ (src2)
|
if (BITSET_NBITS_ (src1) != BITSET_NBITS_ (src2)
|
||||||
|| BITSET_NBITS_ (src1) != BITSET_NBITS_ (src3))
|
|| BITSET_NBITS_ (src1) != BITSET_NBITS_ (src3))
|
||||||
{
|
{
|
||||||
@@ -908,7 +909,7 @@ vbitset_and_or_cmp (bitset dst, bitset src1, bitset src2, bitset src3)
|
|||||||
bitset_word *src3p;
|
bitset_word *src3p;
|
||||||
bitset_word *dstp;
|
bitset_word *dstp;
|
||||||
bitset_windex size;
|
bitset_windex size;
|
||||||
|
|
||||||
if (BITSET_NBITS_ (src1) != BITSET_NBITS_ (src2)
|
if (BITSET_NBITS_ (src1) != BITSET_NBITS_ (src2)
|
||||||
|| BITSET_NBITS_ (src1) != BITSET_NBITS_ (src3))
|
|| BITSET_NBITS_ (src1) != BITSET_NBITS_ (src3))
|
||||||
return bitset_and_or_cmp_ (dst, src1, src2, src3);
|
return bitset_and_or_cmp_ (dst, src1, src2, src3);
|
||||||
@@ -920,11 +921,11 @@ vbitset_and_or_cmp (bitset dst, bitset src1, bitset src2, bitset src3)
|
|||||||
src3p = VBITSET_WORDS (src3);
|
src3p = VBITSET_WORDS (src3);
|
||||||
dstp = VBITSET_WORDS (dst);
|
dstp = VBITSET_WORDS (dst);
|
||||||
size = VBITSET_SIZE (dst);
|
size = VBITSET_SIZE (dst);
|
||||||
|
|
||||||
for (i = 0; i < size; i++, dstp++)
|
for (i = 0; i < size; i++, dstp++)
|
||||||
{
|
{
|
||||||
bitset_word tmp = (*src1p++ & *src2p++) | *src3p++;
|
bitset_word tmp = (*src1p++ & *src2p++) | *src3p++;
|
||||||
|
|
||||||
if (*dstp != tmp)
|
if (*dstp != tmp)
|
||||||
{
|
{
|
||||||
changed = 1;
|
changed = 1;
|
||||||
@@ -944,7 +945,7 @@ vbitset_andn_or (bitset dst, bitset src1, bitset src2, bitset src3)
|
|||||||
bitset_word *src3p;
|
bitset_word *src3p;
|
||||||
bitset_word *dstp;
|
bitset_word *dstp;
|
||||||
bitset_windex size;
|
bitset_windex size;
|
||||||
|
|
||||||
if (BITSET_NBITS_ (src1) != BITSET_NBITS_ (src2)
|
if (BITSET_NBITS_ (src1) != BITSET_NBITS_ (src2)
|
||||||
|| BITSET_NBITS_ (src1) != BITSET_NBITS_ (src3))
|
|| BITSET_NBITS_ (src1) != BITSET_NBITS_ (src3))
|
||||||
{
|
{
|
||||||
@@ -975,7 +976,7 @@ vbitset_andn_or_cmp (bitset dst, bitset src1, bitset src2, bitset src3)
|
|||||||
bitset_word *src3p;
|
bitset_word *src3p;
|
||||||
bitset_word *dstp;
|
bitset_word *dstp;
|
||||||
bitset_windex size;
|
bitset_windex size;
|
||||||
|
|
||||||
if (BITSET_NBITS_ (src1) != BITSET_NBITS_ (src2)
|
if (BITSET_NBITS_ (src1) != BITSET_NBITS_ (src2)
|
||||||
|| BITSET_NBITS_ (src1) != BITSET_NBITS_ (src3))
|
|| BITSET_NBITS_ (src1) != BITSET_NBITS_ (src3))
|
||||||
return bitset_andn_or_cmp_ (dst, src1, src2, src3);
|
return bitset_andn_or_cmp_ (dst, src1, src2, src3);
|
||||||
@@ -987,11 +988,11 @@ vbitset_andn_or_cmp (bitset dst, bitset src1, bitset src2, bitset src3)
|
|||||||
src3p = VBITSET_WORDS (src3);
|
src3p = VBITSET_WORDS (src3);
|
||||||
dstp = VBITSET_WORDS (dst);
|
dstp = VBITSET_WORDS (dst);
|
||||||
size = VBITSET_SIZE (dst);
|
size = VBITSET_SIZE (dst);
|
||||||
|
|
||||||
for (i = 0; i < size; i++, dstp++)
|
for (i = 0; i < size; i++, dstp++)
|
||||||
{
|
{
|
||||||
bitset_word tmp = (*src1p++ & ~(*src2p++)) | *src3p++;
|
bitset_word tmp = (*src1p++ & ~(*src2p++)) | *src3p++;
|
||||||
|
|
||||||
if (*dstp != tmp)
|
if (*dstp != tmp)
|
||||||
{
|
{
|
||||||
changed = 1;
|
changed = 1;
|
||||||
@@ -1011,7 +1012,7 @@ vbitset_or_and (bitset dst, bitset src1, bitset src2, bitset src3)
|
|||||||
bitset_word *src3p;
|
bitset_word *src3p;
|
||||||
bitset_word *dstp;
|
bitset_word *dstp;
|
||||||
bitset_windex size;
|
bitset_windex size;
|
||||||
|
|
||||||
if (BITSET_NBITS_ (src1) != BITSET_NBITS_ (src2)
|
if (BITSET_NBITS_ (src1) != BITSET_NBITS_ (src2)
|
||||||
|| BITSET_NBITS_ (src1) != BITSET_NBITS_ (src3))
|
|| BITSET_NBITS_ (src1) != BITSET_NBITS_ (src3))
|
||||||
{
|
{
|
||||||
@@ -1026,7 +1027,7 @@ vbitset_or_and (bitset dst, bitset src1, bitset src2, bitset src3)
|
|||||||
src3p = VBITSET_WORDS (src3);
|
src3p = VBITSET_WORDS (src3);
|
||||||
dstp = VBITSET_WORDS (dst);
|
dstp = VBITSET_WORDS (dst);
|
||||||
size = VBITSET_SIZE (dst);
|
size = VBITSET_SIZE (dst);
|
||||||
|
|
||||||
for (i = 0; i < size; i++)
|
for (i = 0; i < size; i++)
|
||||||
*dstp++ = (*src1p++ | *src2p++) & *src3p++;
|
*dstp++ = (*src1p++ | *src2p++) & *src3p++;
|
||||||
}
|
}
|
||||||
@@ -1042,7 +1043,7 @@ vbitset_or_and_cmp (bitset dst, bitset src1, bitset src2, bitset src3)
|
|||||||
bitset_word *src3p;
|
bitset_word *src3p;
|
||||||
bitset_word *dstp;
|
bitset_word *dstp;
|
||||||
bitset_windex size;
|
bitset_windex size;
|
||||||
|
|
||||||
if (BITSET_NBITS_ (src1) != BITSET_NBITS_ (src2)
|
if (BITSET_NBITS_ (src1) != BITSET_NBITS_ (src2)
|
||||||
|| BITSET_NBITS_ (src1) != BITSET_NBITS_ (src3))
|
|| BITSET_NBITS_ (src1) != BITSET_NBITS_ (src3))
|
||||||
return bitset_or_and_cmp_ (dst, src1, src2, src3);
|
return bitset_or_and_cmp_ (dst, src1, src2, src3);
|
||||||
@@ -1054,11 +1055,11 @@ vbitset_or_and_cmp (bitset dst, bitset src1, bitset src2, bitset src3)
|
|||||||
src3p = VBITSET_WORDS (src3);
|
src3p = VBITSET_WORDS (src3);
|
||||||
dstp = VBITSET_WORDS (dst);
|
dstp = VBITSET_WORDS (dst);
|
||||||
size = VBITSET_SIZE (dst);
|
size = VBITSET_SIZE (dst);
|
||||||
|
|
||||||
for (i = 0; i < size; i++, dstp++)
|
for (i = 0; i < size; i++, dstp++)
|
||||||
{
|
{
|
||||||
bitset_word tmp = (*src1p++ | *src2p++) & *src3p++;
|
bitset_word tmp = (*src1p++ | *src2p++) & *src3p++;
|
||||||
|
|
||||||
if (*dstp != tmp)
|
if (*dstp != tmp)
|
||||||
{
|
{
|
||||||
changed = 1;
|
changed = 1;
|
||||||
|
|||||||
+2
-2
@@ -14,10 +14,10 @@ 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, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
#ifndef _VBITSET_H
|
#ifndef _VBITSET_H
|
||||||
#define _VBITSET_H
|
#define _VBITSET_H
|
||||||
|
|
||||||
#include "bitset.h"
|
#include "bitset.h"
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -16,8 +16,8 @@
|
|||||||
|
|
||||||
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 Bison; see the file COPYING. If not, write to
|
along with Bison; see the file COPYING. If not, write to
|
||||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|||||||
+2
-5
@@ -1,36 +1,33 @@
|
|||||||
*_gl.m4
|
*_gl.m4
|
||||||
alloca.m4
|
alloca.m4
|
||||||
codeset.m4
|
|
||||||
dirname.m4
|
dirname.m4
|
||||||
dos.m4
|
dos.m4
|
||||||
error.m4
|
error.m4
|
||||||
exitfail.m4
|
exitfail.m4
|
||||||
extensions.m4
|
extensions.m4
|
||||||
getopt.m4
|
getopt.m4
|
||||||
gettext.m4
|
|
||||||
gnulib.m4
|
gnulib.m4
|
||||||
hard-locale.m4
|
hard-locale.m4
|
||||||
hash.m4
|
hash.m4
|
||||||
iconv.m4
|
iconv.m4
|
||||||
lib-ld.m4
|
|
||||||
lib-link.m4
|
lib-link.m4
|
||||||
lib-prefix.m4
|
|
||||||
mbrtowc.m4
|
mbrtowc.m4
|
||||||
mbstate_t.m4
|
mbstate_t.m4
|
||||||
mbswidth.m4
|
mbswidth.m4
|
||||||
nls.m4
|
nls.m4
|
||||||
obstack.m4
|
obstack.m4
|
||||||
onceonly.m4
|
onceonly.m4
|
||||||
po.m4
|
|
||||||
progtest.m4
|
progtest.m4
|
||||||
quote.m4
|
quote.m4
|
||||||
quotearg.m4
|
quotearg.m4
|
||||||
stdbool.m4
|
stdbool.m4
|
||||||
|
stdio-safer.m4
|
||||||
stpcpy.m4
|
stpcpy.m4
|
||||||
strdup.m4
|
strdup.m4
|
||||||
strerror_r.m4
|
strerror_r.m4
|
||||||
strndup.m4
|
strndup.m4
|
||||||
strnlen.m4
|
strnlen.m4
|
||||||
|
unistd-safer.m4
|
||||||
unlocked-io.m4
|
unlocked-io.m4
|
||||||
xalloc.m4
|
xalloc.m4
|
||||||
xstrndup.m4
|
xstrndup.m4
|
||||||
|
|||||||
@@ -0,0 +1,59 @@
|
|||||||
|
# bison-i18n.m4 serial 1 (bison-2.1)
|
||||||
|
dnl Copyright (C) 2005 Free Software Foundation, Inc.
|
||||||
|
dnl This file is free software; the Free Software Foundation
|
||||||
|
dnl gives unlimited permission to copy and/or distribute it,
|
||||||
|
dnl with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
dnl From Bruno Haible.
|
||||||
|
|
||||||
|
dnl Support for internationalization of bison-generated parsers.
|
||||||
|
|
||||||
|
dnl BISON_I18N
|
||||||
|
dnl should be used in configure.ac, after AM_GNU_GETTEXT. If USE_NLS is yes, it
|
||||||
|
dnl sets BISON_LOCALEDIR to indicate where to find the bison-runtime.mo files
|
||||||
|
dnl and defines YYENABLE_NLS if there are bison-runtime.mo files at all.
|
||||||
|
AC_DEFUN([BISON_I18N],
|
||||||
|
[
|
||||||
|
if test -z "$USE_NLS"; then
|
||||||
|
echo "The BISON-I18N macro is used without being preceded by AM-GNU-GETTEXT." 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
BISON_LOCALEDIR=
|
||||||
|
if test "$USE_NLS" = yes; then
|
||||||
|
dnl AC_PROG_YACC sets the YACC variable; other macros set the BISON variable.
|
||||||
|
if test -n "$YACC"; then
|
||||||
|
case "$YACC" in
|
||||||
|
*bison*)
|
||||||
|
if ($YACC --print-localedir) >/dev/null 2>&1; then
|
||||||
|
BISON_LOCALEDIR=`$YACC --print-localedir`
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
if test -n "$BISON"; then
|
||||||
|
if test "$BISON" != ":"; then
|
||||||
|
if ($BISON --print-localedir) >/dev/null 2>&1; then
|
||||||
|
BISON_LOCALEDIR=`$BISON --print-localedir`
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
AC_SUBST([BISON_LOCALEDIR])
|
||||||
|
if test -n "$BISON_LOCALEDIR"; then
|
||||||
|
USER_LINGUAS="${LINGUAS-%UNSET%}"
|
||||||
|
if test -n "$USER_LINGUAS"; then
|
||||||
|
BISON_USE_NLS=yes
|
||||||
|
else
|
||||||
|
BISON_USE_NLS=no
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
BISON_USE_NLS=no
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
BISON_USE_NLS=no
|
||||||
|
fi
|
||||||
|
if test $BISON_USE_NLS = yes; then
|
||||||
|
AC_DEFINE([YYENABLE_NLS], 1,
|
||||||
|
[Define to 1 to internationalize bison runtime messages.])
|
||||||
|
fi
|
||||||
|
])
|
||||||
@@ -15,8 +15,8 @@
|
|||||||
#
|
#
|
||||||
# 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, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
# 02111-1307 USA
|
# 02110-1301 USA
|
||||||
|
|
||||||
# Written by Paul Eggert <[email protected]>.
|
# Written by Paul Eggert <[email protected]>.
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,8 @@
|
|||||||
#
|
#
|
||||||
# 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, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
# 02111-1307, USA.
|
# 02110-1301, USA.
|
||||||
|
|
||||||
# BISON_PROG_GNU_M4
|
# BISON_PROG_GNU_M4
|
||||||
# -----------------
|
# -----------------
|
||||||
|
|||||||
+3
-4
@@ -1,7 +1,7 @@
|
|||||||
# -*- Autoconf -*-
|
# -*- Autoconf -*-
|
||||||
# Checks required to run `subpipe'.
|
# Checks required to run `subpipe'.
|
||||||
#
|
#
|
||||||
# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
|
# Copyright (C) 2002, 2003, 2005 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
|
||||||
@@ -15,15 +15,14 @@
|
|||||||
#
|
#
|
||||||
# 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, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
# 02111-1307 USA
|
# 02110-1301 USA
|
||||||
|
|
||||||
# Written by Paul Eggert <[email protected]>.
|
# Written by Paul Eggert <[email protected]>.
|
||||||
|
|
||||||
AC_DEFUN([BISON_PREREQ_SUBPIPE],
|
AC_DEFUN([BISON_PREREQ_SUBPIPE],
|
||||||
[
|
[
|
||||||
AC_TYPE_PID_T
|
AC_TYPE_PID_T
|
||||||
AC_CHECK_HEADERS([fcntl.h])
|
|
||||||
AC_HEADER_SYS_WAIT
|
AC_HEADER_SYS_WAIT
|
||||||
AC_CHECK_FUNCS(dup2 waitpid)
|
AC_CHECK_FUNCS(dup2 waitpid)
|
||||||
AC_FUNC_FORK
|
AC_FUNC_FORK
|
||||||
|
|||||||
+2
-2
@@ -15,8 +15,8 @@
|
|||||||
#
|
#
|
||||||
# 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, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
# 02111-1307 USA
|
# 02110-1301 USA
|
||||||
|
|
||||||
# serial 2
|
# serial 2
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -14,8 +14,8 @@
|
|||||||
#
|
#
|
||||||
# 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, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
# 02111-1307 USA
|
# 02110-1301 USA
|
||||||
|
|
||||||
# serial 1
|
# serial 1
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -20,4 +20,4 @@ lib/obstack.c
|
|||||||
lib/quotearg.c
|
lib/quotearg.c
|
||||||
lib/subpipe.c
|
lib/subpipe.c
|
||||||
lib/timevar.c
|
lib/timevar.c
|
||||||
lib/xmalloc.c
|
lib/xalloc-die.c
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
*.gmo
|
||||||
|
*.po
|
||||||
|
LINGUAS
|
||||||
|
Makefile
|
||||||
|
Makefile.in
|
||||||
|
Makefile.in.in
|
||||||
|
Makevars
|
||||||
|
POTFILES
|
||||||
|
Rules-quot
|
||||||
|
bison-runtime.pot
|
||||||
|
boldquot.sed
|
||||||
|
[email protected]
|
||||||
|
[email protected]
|
||||||
|
insert-header.sin
|
||||||
|
quot.sed
|
||||||
|
remove-potcdate.sed
|
||||||
|
remove-potcdate.sin
|
||||||
|
stamp-po
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
data/glr.c
|
||||||
|
data/lalr1.cc
|
||||||
|
data/yacc.c
|
||||||
@@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
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 Bison; see the file COPYING. If not, write to
|
along with Bison; see the file COPYING. If not, write to
|
||||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
|
|
||||||
/* See comments in state.h for the data structures that represent it.
|
/* See comments in state.h for the data structures that represent it.
|
||||||
|
|||||||
@@ -15,8 +15,8 @@
|
|||||||
|
|
||||||
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 Bison; see the file COPYING. If not, write to
|
along with Bison; see the file COPYING. If not, write to
|
||||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
#ifndef LR0_H_
|
#ifndef LR0_H_
|
||||||
# define LR0_H_
|
# define LR0_H_
|
||||||
|
|||||||
+37
-8
@@ -1,4 +1,4 @@
|
|||||||
## Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
## Copyright (C) 2001, 2002, 2003, 2004, 2005 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
|
||||||
@@ -12,12 +12,10 @@
|
|||||||
|
|
||||||
## 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, write to the Free Software
|
## along with this program; if not, write to the Free Software
|
||||||
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
## 02111-1307 USA
|
## 02110-1301 USA
|
||||||
|
|
||||||
DEFS = @DEFS@ \
|
DEFS += -DPKGDATADIR=\"$(pkgdatadir)\" -DLOCALEDIR=\"$(datadir)/locale\"
|
||||||
-DPKGDATADIR=\"$(pkgdatadir)\" \
|
|
||||||
-DLOCALEDIR=\"$(datadir)/locale\"
|
|
||||||
|
|
||||||
AM_CFLAGS = $(WARNING_CFLAGS) $(WERROR_CFLAGS)
|
AM_CFLAGS = $(WARNING_CFLAGS) $(WERROR_CFLAGS)
|
||||||
AM_CPPFLAGS = -I$(top_srcdir)/lib -I../lib
|
AM_CPPFLAGS = -I$(top_srcdir)/lib -I../lib
|
||||||
@@ -33,7 +31,7 @@ bin_PROGRAMS = bison
|
|||||||
bin_SCRIPTS = $(YACC_SCRIPT)
|
bin_SCRIPTS = $(YACC_SCRIPT)
|
||||||
EXTRA_SCRIPTS = yacc
|
EXTRA_SCRIPTS = yacc
|
||||||
|
|
||||||
bison_SOURCES = \
|
bison_SOURCES = \
|
||||||
LR0.c LR0.h \
|
LR0.c LR0.h \
|
||||||
assoc.c assoc.h \
|
assoc.c assoc.h \
|
||||||
closure.c closure.h \
|
closure.c closure.h \
|
||||||
@@ -56,7 +54,7 @@ bison_SOURCES = \
|
|||||||
reduce.c reduce.h \
|
reduce.c reduce.h \
|
||||||
relation.c relation.h \
|
relation.c relation.h \
|
||||||
scan-gram.l \
|
scan-gram.l \
|
||||||
scan-skel.l \
|
scan-skel.h scan-skel.l \
|
||||||
state.c state.h \
|
state.c state.h \
|
||||||
symlist.c symlist.h \
|
symlist.c symlist.h \
|
||||||
symtab.c symtab.h \
|
symtab.c symtab.h \
|
||||||
@@ -77,3 +75,34 @@ yacc:
|
|||||||
|
|
||||||
echo:
|
echo:
|
||||||
echo $(bison_SOURCES) $(noinst_HEADERS)
|
echo $(bison_SOURCES) $(noinst_HEADERS)
|
||||||
|
|
||||||
|
# The following rule is not designed to be portable,
|
||||||
|
# and relies on tools that not everyone has.
|
||||||
|
|
||||||
|
# Most functions in src/*.c should have static scope.
|
||||||
|
# Any that don't must be marked with `extern', but `main'
|
||||||
|
# and `usage' are exceptions. They're always extern, but
|
||||||
|
# don't need to be marked.
|
||||||
|
#
|
||||||
|
# The second nm|grep checks for file-scope variables with `extern' scope.
|
||||||
|
sc_tight_scope: $(all_programs)
|
||||||
|
@t=exceptions-$$$$; \
|
||||||
|
trap 's=$$?; rm -f $$t; exit $$s' 0 1 2 13 15; \
|
||||||
|
( printf '^main$$\n^usage$$\n'; \
|
||||||
|
grep -h -A1 '^extern .*[^;]$$' $(SOURCES) \
|
||||||
|
| grep -vE '^(extern |--)' |sed 's/^/^/;s/ .*/$$/' ) > $$t; \
|
||||||
|
if nm -e *.$(OBJEXT) \
|
||||||
|
| sed -n 's/.* T //p' \
|
||||||
|
| grep -Ev -f $$t; then \
|
||||||
|
echo 'the above functions should have static scope' 1>&2; \
|
||||||
|
exit 1; \
|
||||||
|
fi; \
|
||||||
|
( printf '^program_name$$\n'; \
|
||||||
|
sed -n 's/^extern .*[* ]\([a-zA-Z_][a-zA-Z_0-9]*\);$$/^\1$$/p' \
|
||||||
|
$$(ls $(SOURCES) | grep '\.h$$') /dev/null) > $$t; \
|
||||||
|
if nm -e *.$(OBJEXT) \
|
||||||
|
| sed -n 's/.* [BD] //p' \
|
||||||
|
| grep -Ev -f $$t; then \
|
||||||
|
echo 'the above variables should have static scope' 1>&2; \
|
||||||
|
exit 1; \
|
||||||
|
fi
|
||||||
|
|||||||
+2
-2
@@ -15,8 +15,8 @@
|
|||||||
|
|
||||||
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 Bison; see the file COPYING. If not, write to
|
along with Bison; see the file COPYING. If not, write to
|
||||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -15,8 +15,8 @@
|
|||||||
|
|
||||||
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 Bison; see the file COPYING. If not, write to
|
along with Bison; see the file COPYING. If not, write to
|
||||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
#ifndef ASSOC_H_
|
#ifndef ASSOC_H_
|
||||||
# define ASSOC_H_
|
# define ASSOC_H_
|
||||||
|
|||||||
+2
-2
@@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
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 Bison; see the file COPYING. If not, write to the Free
|
along with Bison; see the file COPYING. If not, write to the Free
|
||||||
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
02111-1307, USA. */
|
02110-1301, USA. */
|
||||||
|
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
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 Bison; see the file COPYING. If not, write to the Free
|
along with Bison; see the file COPYING. If not, write to the Free
|
||||||
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
02111-1307, USA. */
|
02110-1301, USA. */
|
||||||
|
|
||||||
#ifndef CLOSURE_H_
|
#ifndef CLOSURE_H_
|
||||||
# define CLOSURE_H_
|
# define CLOSURE_H_
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
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, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||||
USA. */
|
USA. */
|
||||||
|
|
||||||
/* Based on error.c and error.h,
|
/* Based on error.c and error.h,
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
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, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||||
USA. */
|
USA. */
|
||||||
|
|
||||||
#ifndef COMPLAIN_H_
|
#ifndef COMPLAIN_H_
|
||||||
|
|||||||
+2
-2
@@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
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 Bison; see the file COPYING. If not, write to the Free
|
along with Bison; see the file COPYING. If not, write to the Free
|
||||||
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
02111-1307, USA. */
|
02110-1301, USA. */
|
||||||
|
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -15,8 +15,8 @@
|
|||||||
|
|
||||||
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 Bison; see the file COPYING. If not, write to the Free
|
along with Bison; see the file COPYING. If not, write to the Free
|
||||||
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
02111-1307, USA. */
|
02110-1301, USA. */
|
||||||
|
|
||||||
#ifndef CONFLICTS_H_
|
#ifndef CONFLICTS_H_
|
||||||
# define CONFLICTS_H_
|
# define CONFLICTS_H_
|
||||||
|
|||||||
+2
-2
@@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
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 Bison; see the file COPYING. If not, write to
|
along with Bison; see the file COPYING. If not, write to
|
||||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
|
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
|
|||||||
+2
-2
@@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
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 Bison; see the file COPYING. If not, write to
|
along with Bison; see the file COPYING. If not, write to
|
||||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
#ifndef DERIVES_H_
|
#ifndef DERIVES_H_
|
||||||
# define DERIVES_H_
|
# define DERIVES_H_
|
||||||
|
|||||||
+16
-17
@@ -1,6 +1,6 @@
|
|||||||
/* Open and close files for Bison.
|
/* Open and close files for Bison.
|
||||||
|
|
||||||
Copyright (C) 1984, 1986, 1989, 1992, 2000, 2001, 2002, 2003, 2004
|
Copyright (C) 1984, 1986, 1989, 1992, 2000, 2001, 2002, 2003, 2004, 2005
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of Bison, the GNU Compiler Compiler.
|
This file is part of Bison, the GNU Compiler Compiler.
|
||||||
@@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
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 Bison; see the file COPYING. If not, write to the Free
|
along with Bison; see the file COPYING. If not, write to the Free
|
||||||
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
02111-1307, USA. */
|
02110-1301, USA. */
|
||||||
|
|
||||||
|
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
@@ -32,6 +32,7 @@
|
|||||||
#include "files.h"
|
#include "files.h"
|
||||||
#include "getargs.h"
|
#include "getargs.h"
|
||||||
#include "gram.h"
|
#include "gram.h"
|
||||||
|
#include "stdio-safer.h"
|
||||||
|
|
||||||
/* From basename.c. Almost a lie, as it returns a char *. */
|
/* From basename.c. Almost a lie, as it returns a char *. */
|
||||||
const char *base_name (char const *name);
|
const char *base_name (char const *name);
|
||||||
@@ -65,9 +66,9 @@ static char *full_base_name = NULL;
|
|||||||
char *short_base_name = NULL;
|
char *short_base_name = NULL;
|
||||||
|
|
||||||
/* C source file extension (the parser source). */
|
/* C source file extension (the parser source). */
|
||||||
const char *src_extension = NULL;
|
static char const *src_extension = NULL;
|
||||||
/* Header file extension (if option ``-d'' is specified). */
|
/* Header file extension (if option ``-d'' is specified). */
|
||||||
const char *header_extension = NULL;
|
static char const *header_extension = NULL;
|
||||||
|
|
||||||
/*-----------------------------------------------------------------.
|
/*-----------------------------------------------------------------.
|
||||||
| Return a newly allocated string composed of the concatenation of |
|
| Return a newly allocated string composed of the concatenation of |
|
||||||
@@ -95,7 +96,7 @@ xfopen (const char *name, const char *mode)
|
|||||||
{
|
{
|
||||||
FILE *ptr;
|
FILE *ptr;
|
||||||
|
|
||||||
ptr = fopen (name, mode);
|
ptr = fopen_safer (name, mode);
|
||||||
if (!ptr)
|
if (!ptr)
|
||||||
error (EXIT_FAILURE, get_errno (), _("cannot open file `%s'"), name);
|
error (EXIT_FAILURE, get_errno (), _("cannot open file `%s'"), name);
|
||||||
|
|
||||||
@@ -164,8 +165,8 @@ compute_exts_from_src (const char *ext)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Decompose FILENAME in four parts: *BASE, *TAB, and *EXT, the fourth
|
/* Decompose FILE_NAME in four parts: *BASE, *TAB, and *EXT, the fourth
|
||||||
part, (the directory) is ranging from FILENAME to the char before
|
part, (the directory) is ranging from FILE_NAME to the char before
|
||||||
*BASE, so we don't need an additional parameter.
|
*BASE, so we don't need an additional parameter.
|
||||||
|
|
||||||
*EXT points to the last period in the basename, or NULL if none.
|
*EXT points to the last period in the basename, or NULL if none.
|
||||||
@@ -174,7 +175,7 @@ compute_exts_from_src (const char *ext)
|
|||||||
`.tab' or `_tab' if present right before *EXT, or is NULL. *TAB
|
`.tab' or `_tab' if present right before *EXT, or is NULL. *TAB
|
||||||
cannot be equal to *BASE.
|
cannot be equal to *BASE.
|
||||||
|
|
||||||
None are allocated, they are simply pointers to parts of FILENAME.
|
None are allocated, they are simply pointers to parts of FILE_NAME.
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
'/tmp/foo.tab.c' -> *BASE = 'foo.tab.c', *TAB = '.tab.c', *EXT =
|
'/tmp/foo.tab.c' -> *BASE = 'foo.tab.c', *TAB = '.tab.c', *EXT =
|
||||||
@@ -193,10 +194,10 @@ compute_exts_from_src (const char *ext)
|
|||||||
'foo' -> *BASE = 'foo', *TAB = NULL, *EXT = NULL. */
|
'foo' -> *BASE = 'foo', *TAB = NULL, *EXT = NULL. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
filename_split (const char *filename,
|
file_name_split (const char *file_name,
|
||||||
const char **base, const char **tab, const char **ext)
|
const char **base, const char **tab, const char **ext)
|
||||||
{
|
{
|
||||||
*base = base_name (filename);
|
*base = base_name (file_name);
|
||||||
|
|
||||||
/* Look for the extension, i.e., look for the last dot. */
|
/* Look for the extension, i.e., look for the last dot. */
|
||||||
*ext = strrchr (*base, '.');
|
*ext = strrchr (*base, '.');
|
||||||
@@ -216,8 +217,6 @@ filename_split (const char *filename,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* FIXME: Should use xstrndup. */
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
compute_base_names (void)
|
compute_base_names (void)
|
||||||
{
|
{
|
||||||
@@ -233,7 +232,7 @@ compute_base_names (void)
|
|||||||
files, remove the ".c" or ".tab.c" suffix. */
|
files, remove the ".c" or ".tab.c" suffix. */
|
||||||
if (spec_outfile)
|
if (spec_outfile)
|
||||||
{
|
{
|
||||||
filename_split (spec_outfile, &base, &tab, &ext);
|
file_name_split (spec_outfile, &base, &tab, &ext);
|
||||||
|
|
||||||
/* The full base name goes up the EXT, excluding it. */
|
/* The full base name goes up the EXT, excluding it. */
|
||||||
full_base_name =
|
full_base_name =
|
||||||
@@ -271,7 +270,7 @@ compute_base_names (void)
|
|||||||
{
|
{
|
||||||
/* Otherwise, the short base name is computed from the input
|
/* Otherwise, the short base name is computed from the input
|
||||||
grammar: `foo/bar.yy' => `bar'. */
|
grammar: `foo/bar.yy' => `bar'. */
|
||||||
filename_split (grammar_file, &base, &tab, &ext);
|
file_name_split (grammar_file, &base, &tab, &ext);
|
||||||
short_base_name =
|
short_base_name =
|
||||||
xstrndup (base,
|
xstrndup (base,
|
||||||
(strlen (base) - (ext ? strlen (ext) : 0)));
|
(strlen (base) - (ext ? strlen (ext) : 0)));
|
||||||
@@ -282,7 +281,7 @@ compute_base_names (void)
|
|||||||
stpcpy (stpcpy (full_base_name, short_base_name), TAB_EXT);
|
stpcpy (stpcpy (full_base_name, short_base_name), TAB_EXT);
|
||||||
|
|
||||||
/* Compute the extensions from the grammar file name. */
|
/* Compute the extensions from the grammar file name. */
|
||||||
filename_split (grammar_file, &base, &tab, &ext);
|
file_name_split (grammar_file, &base, &tab, &ext);
|
||||||
if (ext && !yacc_flag)
|
if (ext && !yacc_flag)
|
||||||
compute_exts_from_gf (ext);
|
compute_exts_from_gf (ext);
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -15,8 +15,8 @@
|
|||||||
|
|
||||||
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 Bison; see the file COPYING. If not, write to
|
along with Bison; see the file COPYING. If not, write to
|
||||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
#ifndef FILES_H_
|
#ifndef FILES_H_
|
||||||
# define FILES_H_
|
# define FILES_H_
|
||||||
|
|||||||
+18
-11
@@ -1,6 +1,6 @@
|
|||||||
/* Parse command line arguments for Bison.
|
/* Parse command line arguments for Bison.
|
||||||
|
|
||||||
Copyright (C) 1984, 1986, 1989, 1992, 2000, 2001, 2002, 2003, 2004
|
Copyright (C) 1984, 1986, 1989, 1992, 2000, 2001, 2002, 2003, 2004, 2005
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of Bison, the GNU Compiler Compiler.
|
This file is part of Bison, the GNU Compiler Compiler.
|
||||||
@@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
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 Bison; see the file COPYING. If not, write to the Free
|
along with Bison; see the file COPYING. If not, write to the Free
|
||||||
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
02111-1307, USA. */
|
02110-1301, USA. */
|
||||||
|
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
|
|
||||||
@@ -207,9 +207,10 @@ for the equivalent short option also. Similarly for optional arguments.\n"),
|
|||||||
|
|
||||||
fputs (_("\
|
fputs (_("\
|
||||||
Operation modes:\n\
|
Operation modes:\n\
|
||||||
-h, --help display this help and exit\n\
|
-h, --help display this help and exit\n\
|
||||||
-V, --version output version information and exit\n\
|
-V, --version output version information and exit\n\
|
||||||
-y, --yacc emulate POSIX yacc\n"), stdout);
|
--print-localedir output directory containing locale-dependent data\n\
|
||||||
|
-y, --yacc emulate POSIX yacc\n"), stdout);
|
||||||
putc ('\n', stdout);
|
putc ('\n', stdout);
|
||||||
|
|
||||||
fputs (_("\
|
fputs (_("\
|
||||||
@@ -269,7 +270,7 @@ version (void)
|
|||||||
putc ('\n', stdout);
|
putc ('\n', stdout);
|
||||||
|
|
||||||
fprintf (stdout,
|
fprintf (stdout,
|
||||||
_("Copyright (C) %d Free Software Foundation, Inc.\n"), 2004);
|
_("Copyright (C) %d Free Software Foundation, Inc.\n"), 2005);
|
||||||
|
|
||||||
fputs (_("\
|
fputs (_("\
|
||||||
This is free software; see the source for copying conditions. There is NO\n\
|
This is free software; see the source for copying conditions. There is NO\n\
|
||||||
@@ -284,19 +285,21 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
|
|||||||
`----------------------*/
|
`----------------------*/
|
||||||
|
|
||||||
/* Shorts options. */
|
/* Shorts options. */
|
||||||
const char *short_options = "yvegdhr:ltknVo:b:p:S:T::";
|
static char const short_options[] = "yvegdhr:ltknVo:b:p:S:T::";
|
||||||
|
|
||||||
/* Values for long options that do not have single-letter equivalents. */
|
/* Values for long options that do not have single-letter equivalents. */
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
LOCATIONS_OPTION = CHAR_MAX + 1
|
LOCATIONS_OPTION = CHAR_MAX + 1,
|
||||||
|
PRINT_LOCALEDIR_OPTION
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct option const long_options[] =
|
static struct option const long_options[] =
|
||||||
{
|
{
|
||||||
/* Operation modes. */
|
/* Operation modes. */
|
||||||
{ "help", no_argument, 0, 'h' },
|
{ "help", no_argument, 0, 'h' },
|
||||||
{ "version", no_argument, 0, 'V' },
|
{ "version", no_argument, 0, 'V' },
|
||||||
|
{ "print-localedir", no_argument, 0, PRINT_LOCALEDIR_OPTION },
|
||||||
|
|
||||||
/* Parser. */
|
/* Parser. */
|
||||||
{ "name-prefix", required_argument, 0, 'p' },
|
{ "name-prefix", required_argument, 0, 'p' },
|
||||||
@@ -364,6 +367,10 @@ getargs (int argc, char *argv[])
|
|||||||
version ();
|
version ();
|
||||||
exit (EXIT_SUCCESS);
|
exit (EXIT_SUCCESS);
|
||||||
|
|
||||||
|
case PRINT_LOCALEDIR_OPTION:
|
||||||
|
printf ("%s\n", LOCALEDIR);
|
||||||
|
exit (EXIT_SUCCESS);
|
||||||
|
|
||||||
case 'g':
|
case 'g':
|
||||||
/* Here, the -g and --graph=FILE options are differentiated. */
|
/* Here, the -g and --graph=FILE options are differentiated. */
|
||||||
graph_flag = true;
|
graph_flag = true;
|
||||||
|
|||||||
+9
-5
@@ -1,5 +1,5 @@
|
|||||||
/* Parse command line arguments for bison.
|
/* Parse command line arguments for bison.
|
||||||
Copyright (C) 1984, 1986, 1989, 1992, 2000, 2001, 2002, 2003, 2004
|
Copyright (C) 1984, 1986, 1989, 1992, 2000, 2001, 2002, 2003, 2004, 2005
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of Bison, the GNU Compiler Compiler.
|
This file is part of Bison, the GNU Compiler Compiler.
|
||||||
@@ -16,15 +16,19 @@
|
|||||||
|
|
||||||
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 Bison; see the file COPYING. If not, write to the Free
|
along with Bison; see the file COPYING. If not, write to the Free
|
||||||
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
02111-1307, USA. */
|
02110-1301, USA. */
|
||||||
|
|
||||||
#ifndef GETARGS_H_
|
#ifndef GETARGS_H_
|
||||||
# define GETARGS_H_
|
# define GETARGS_H_
|
||||||
|
|
||||||
/* flags set by % directives */
|
/* flags set by % directives */
|
||||||
extern const char *skeleton; /* for -S */
|
|
||||||
extern const char *include; /* for -I */
|
/* for -S */
|
||||||
|
extern char const *skeleton;
|
||||||
|
|
||||||
|
/* for -I */
|
||||||
|
extern char const *include;
|
||||||
|
|
||||||
extern bool debug_flag; /* for -t */
|
extern bool debug_flag; /* for -t */
|
||||||
extern bool defines_flag; /* for -d */
|
extern bool defines_flag; /* for -d */
|
||||||
|
|||||||
+3
-3
@@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
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 Bison; see the file COPYING. If not, write to
|
along with Bison; see the file COPYING. If not, write to
|
||||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
|
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
@@ -269,7 +269,7 @@ grammar_dump (FILE *out, const char *title)
|
|||||||
rule *rule_i = &rules[i];
|
rule *rule_i = &rules[i];
|
||||||
item_number *rp = NULL;
|
item_number *rp = NULL;
|
||||||
unsigned int rhs_itemno = rule_i->rhs - ritem;
|
unsigned int rhs_itemno = rule_i->rhs - ritem;
|
||||||
unsigned int rhs_count = 0;
|
unsigned int rhs_count = 0;
|
||||||
/* Find the last RHS index in ritems. */
|
/* Find the last RHS index in ritems. */
|
||||||
for (rp = rule_i->rhs; *rp >= 0; ++rp)
|
for (rp = rule_i->rhs; *rp >= 0; ++rp)
|
||||||
++rhs_count;
|
++rhs_count;
|
||||||
|
|||||||
+2
-2
@@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
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 Bison; see the file COPYING. If not, write to
|
along with Bison; see the file COPYING. If not, write to
|
||||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
#ifndef GRAM_H_
|
#ifndef GRAM_H_
|
||||||
# define GRAM_H_
|
# define GRAM_H_
|
||||||
|
|||||||
+2
-2
@@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
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 Bison; see the file COPYING. If not, write to
|
along with Bison; see the file COPYING. If not, write to
|
||||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
|
|
||||||
/* Compute how to make the finite state machine deterministic; find
|
/* Compute how to make the finite state machine deterministic; find
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user