Compare commits

...
42 Commits
Author SHA1 Message Date
Akim Demaille 12de352a6f Bump to 1.31. 2002-01-14 10:28:31 +00:00
Akim Demaille 6fc75bfd3a * tests/regression.at (Invalid CPP headers): Remove. 2002-01-14 10:16:49 +00:00
Akim Demaille 96df91407c Bump to 1.30m. 2002-01-14 10:16:41 +00:00
Akim Demaille b30efba0d0 . 2002-01-12 11:45:03 +00:00
Akim Demaille fd2d280114 Version 1.30l. 2002-01-12 11:41:45 +00:00
Akim Demaille 68e202f30f * lib/Makefile.am (EXTRA_DIST): Add strnlen.c: Automake is still
not using Autoconf traces and does not see Autoconf's AC_LIBOBJ.
2002-01-12 11:39:54 +00:00
Akim Demaille d7848b138c . 2002-01-11 13:46:33 +00:00
Akim Demaille 40c6b975e9 Update. 2002-01-11 13:42:16 +00:00
Akim Demaille a5fb3dead0 Version 1.30k. 2002-01-11 13:37:00 +00:00
Akim Demaille ac5ff6a908 * configure.in: Use AC_FUNC_STRNLEN. 2002-01-11 13:31:33 +00:00
Akim Demaille 0b1cb33137 . 2002-01-09 15:17:22 +00:00
Akim Demaille 9f3c97f74f Version 1.30j. 2002-01-09 15:12:39 +00:00
Akim Demaille a99566be67 * configure.in (WERROR_CFLAGS): Compute it.
* src/Makefile.am (CFLAGS): Pass it.
* tests/atlocal.in (CFLAGS): Idem.
2002-01-09 15:06:25 +00:00
Akim Demaille ca66b45a86 Update. 2002-01-09 14:56:07 +00:00
Akim Demaille 55601256c2 * lib/Makefile.am (libbison_a_SOURCES): Add xstrndup.c.
* src/getargs.c (AS_FILE_NAME): New.
(getargs): Use it to convert DOSish file names.
* src/files.c (base_name): Rename as full_base_name to avoid
clashes with `base_name ()'.
(get_extension_index): Remove.
(filename_split): New.
(compute_base_names): N-th rewrite, using filename_split.
2002-01-08 17:41:38 +00:00
Akim Demaille 43cc2463d2 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c,
* lib/xstrndup.c, lib/strchr.c:
New, stolen from the Fileutils 4.1.
* lib/Makefile.am (libbison_a_SOURCES): Adjust.
* configure.in: Check for the presence of memrchr, strchr,
strnlen, and of their prototypes.
Don't check for strndup: we no longer use it.
* src/system.h: Adjust the prototypes.
2002-01-08 17:30:53 +00:00
Akim Demaille 25a46077de * src/conflicts.c (count_rr_conflicts): The previous RR conflicts
patch was improperly applied: fix it.
2002-01-07 08:42:59 +00:00
Akim Demaille 62d3162c4c Revert the previous patch which was meant for the trunk only. 2002-01-07 08:40:29 +00:00
Akim Demaille 3f2f7848cc * src/reader.c (parse_braces): Don't fetch the next char, the
convention is to fetch on entry.
* tests/torture.at (GNU Cim Grammar): Reintroduce their weird
'switch' without a following semicolon.
* tests/regression.at (braces parsing): New.
2002-01-06 20:59:30 +00:00
Akim Demaille c4267a3d35 Bison is dead wrong in its RR conflict reports.
* tests/torture.at (GNU Cim Grammar): New.
* src/conflicts.c (count_rr_conflicts): Fix.
2002-01-06 20:59:12 +00:00
Akim Demaille ae774286e8 Creating package.m4 from configure.ac causes too many problems.
* tests/Makefile.am (package.m4): Create it by hand,
AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
2002-01-06 20:57:20 +00:00
Akim Demaille 43f8a3245a Regen. 2002-01-06 20:56:42 +00:00
Paul Eggert a22d7bd8d6 * doc/bison.texinfo (Debugging):
Remove YYSTDERR; it's no longer defined or used.
Also, s/cstdio.h/cstdio/.
2002-01-05 01:20:57 +00:00
Paul Eggert f36280e16e (Debugging): Remove YYSTDERR; it's no longer defined or used.
Also, s/cstdio.h/cstdio/.
2002-01-05 01:18:26 +00:00
Akim Demaille 38612b10a3 * src/files.h: Add it prototype. 2002-01-03 13:55:09 +00:00
Akim Demaille ffc03584ad * src/files.c, src/files.h (strsuffix): Not static.
* src/conflicts.c (conflicts_print): Don't consider it is an error
to have a %expectation violation on a file ending by `plural.y'.
Eek.
2002-01-03 13:39:20 +00:00
Akim Demaille dd3c3f3006 * tests/bison.in: Adjust to CVS Autoconf.
* tests/calc.at (exp): We no longer need to special case GCC as
the warning flags are passed by configure.
* tests/atlocal.in: Adjust.
* configure.in: Bump to 1.30j.
2002-01-03 11:10:50 +00:00
Akim Demaille f1d93aa21c Regen. 2002-01-03 11:09:47 +00:00
Akim Demaille a4f0747a2a . 2002-01-03 10:45:14 +00:00
Akim Demaille ca69f83c53 Version 1.30i. 2002-01-03 10:42:17 +00:00
Akim Demaille b06c1dfb75 Update. 2002-01-03 10:40:03 +00:00
Akim Demaille 7525f95ed5 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
The ISO C++ standard is extremely clear about it: stderr is
considered a macro, not a regular symbol (see table 94 `Header
<cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
Therefore std:: does not apply to it.  It still does with fprintf.
Also, s/cstdio.h/cstdio/.
2002-01-03 09:48:08 +00:00
Akim Demaille 1daed0de8a * lib/quotearg.c: Use #include "..."' instead of #include <...>'
for non system headers.
2002-01-03 09:27:34 +00:00
Akim Demaille 32e175835b Regen. 2002-01-03 09:24:59 +00:00
Akim Demaille ea04a14c5c * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
Sparc, as they were causing more porting problems than the
(minor) performance improvement was worth.
2001-12-27 18:30:40 +00:00
Akim Demaille d6b12c2d8b * src/output.c (output_short_table, output_short_or_char_table):
Change the prototype to use `int' for array ranges: some
invocations do pass an int, not a short.
Reported by Wayne Green.
2001-12-27 18:28:23 +00:00
Akim Demaille f4ffa313a2 Regen. 2001-12-22 15:13:48 +00:00
Akim Demaille 1214dfb03b Some actions of web2c.y are improperly triggered.
Reported by Mike Castle.
* src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
* tests/regression.at (Web2c): Rename as...
(Web2c Report): this.
(Web2c Actions): New.
2001-12-22 14:44:25 +00:00
Akim Demaille 55b4181996 Reductions in web2c.y are improperly reported.
Reported by Mike Castle.
* src/conflicts.c (print_reductions): Fix.
* tests/regression.at (Web2c): New.
2001-12-22 14:41:15 +00:00
Akim Demaille 12a04365ce Bump to 1.30i 2001-12-22 14:39:44 +00:00
Akim Demaille 6929a4a0e8 Adjust. 2001-12-18 09:58:07 +00:00
Akim Demaille 07cccc8bc6 . 2001-12-18 09:51:33 +00:00
53 changed files with 2820 additions and 694 deletions
+159 -1
View File
@@ -1,3 +1,161 @@
2002-01-14 Akim Demaille <[email protected]>
Version 1.31.
2002-01-14 Akim Demaille <[email protected]>
* tests/regression.at (Invalid CPP headers): Remove.
2002-01-12 Akim Demaille <[email protected]>
Version 1.30l.
2002-01-12 Akim Demaille <[email protected]>
* lib/Makefile.am (EXTRA_DIST): Add strnlen.c: Automake is still
not using Autoconf traces and does not see Autoconf's AC_LIBOBJ.
2002-01-11 Akim Demaille <[email protected]>
Version 1.30k.
2002-01-11 Akim Demaille <[email protected]>
* configure.in: Use AC_FUNC_STRNLEN.
Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
2002-01-09 Akim Demaille <[email protected]>
Version 1.30j.
2002-01-09 Akim Demaille <[email protected]>
* configure.in (WERROR_CFLAGS): Compute it.
* src/Makefile.am (CFLAGS): Pass it.
* tests/atlocal.in (CFLAGS): Idem.
2002-01-08 Akim Demaille <[email protected]>
* lib/Makefile.am (libbison_a_SOURCES): Add xstrndup.c.
* src/getargs.c (AS_FILE_NAME): New.
(getargs): Use it to convert DOSish file names.
* src/files.c (base_name): Rename as full_base_name to avoid
clashes with `base_name ()'.
(get_extension_index): Remove.
(filename_split): New.
(compute_base_names): N-th rewrite, using filename_split.
2002-01-08 Akim Demaille <[email protected]>
* lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c,
* lib/xstrndup.c, lib/strchr.c:
New, stolen from the Fileutils 4.1.
* lib/Makefile.am (libbison_a_SOURCES): Adjust.
* configure.in: Check for the presence of memrchr, strchr,
strnlen, and of their prototypes.
Don't check for strndup: we no longer use it.
* src/system.h: Adjust the prototypes.
2002-01-07 Akim Demaille <[email protected]>
* src/conflicts.c (count_rr_conflicts): The previous RR conflicts
patch was improperly applied: fix it.
2002-01-07 Akim Demaille <[email protected]>
* tests/torture.at (GNU Cim Grammar): Reintroduce their weird
'switch' without a following semicolon.
* tests/regression.at (braces parsing): New.
2002-01-06 Akim Demaille <[email protected]>
Bison is dead wrong in its RR conflict reports.
* tests/torture.at (GNU Cim Grammar): New.
* src/conflicts.c (count_rr_conflicts): Fix.
2002-01-06 Akim Demaille <[email protected]>
Creating package.m4 from configure.ac causes too many problems.
* tests/Makefile.am (package.m4): Create it by hand,
AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
2002-01-04 Paul Eggert <[email protected]>
* doc/bison.texinfo (Debugging):
Remove YYSTDERR; it's no longer defined or used.
Also, s/cstdio.h/cstdio/.
2002-01-03 Akim Demaille <[email protected]>
* src/files.h: Add it prototype.
2002-01-03 Akim Demaille <[email protected]>
* src/files.c, src/files.h (strsuffix): Not static.
* src/conflicts.c (conflicts_print): Don't consider it is an error
to have a %expectation violation on a file ending by `plural.y'.
Eek.
2002-01-03 Akim Demaille <[email protected]>
* tests/bison.in: Adjust to CVS Autoconf.
* tests/calc.at (exp): We no longer need to special case GCC as
the warning flags are passed by configure.
* tests/atlocal.in: Adjust.
* configure.in: Bump to 1.30j.
2002-01-03 Akim Demaille <[email protected]>
Version 1.30i.
2002-01-03 Akim Demaille <[email protected]>
* src/bison.simple (YYSTDERR): Remove, replace `stderr'.
The ISO C++ standard is extremely clear about it: stderr is
considered a macro, not a regular symbol (see table 94 `Header
<cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
Therefore std:: does not apply to it. It still does with fprintf.
Also, s/cstdio.h/cstdio/.
2002-01-03 Akim Demaille <[email protected]>
* lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
for non system headers.
2001-12-27 Paul Eggert <[email protected]>
* src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
Sparc, as they were causing more porting problems than the
(minor) performance improvement was worth.
2001-12-22 Akim Demaille <[email protected]>
* src/output.c (output_short_table, output_short_or_char_table):
Change the prototype to use `int' for array ranges: some
invocations do pass an int, not a short.
Reported by Wayne Green.
2001-12-22 Akim Demaille <[email protected]>
Some actions of web2c.y are improperly triggered.
Reported by Mike Castle.
* src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
* tests/regression.at (Web2c): Rename as...
(Web2c Report): this.
(Web2c Actions): New.
2001-12-22 Akim Demaille <[email protected]>
Reductions in web2c.y are improperly reported.
Reported by Mike Castle.
* src/conflicts.c (print_reductions): Fix.
* tests/regression.at (Web2c): New.
2001-12-18 Akim Demaille <[email protected]>
Version 1.30h.
@@ -36,7 +194,7 @@
* src/reader.c (copy_action): When --yacc, don't append a `;'
to the user action: let it fail if lacking.
Suggested by Aharon Robbins and Tom Tromey.
Suggested by Arnold Robbins and Tom Tromey.
2001-12-13 Akim Demaille <[email protected]>
+38 -26
View File
@@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.5a from Makefile.am.
# Makefile.in generated by automake 1.5c from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
@@ -13,7 +13,6 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
@@ -48,6 +47,7 @@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
install_sh_DATA = $(install_sh) -c -m 644
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
@@ -97,6 +97,7 @@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@
WERROR_CFLAGS = @WERROR_CFLAGS@
am__include = @am__include@
am__quote = @am__quote@
install_sh = @install_sh@
@@ -138,8 +139,8 @@ RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
install-exec-recursive installdirs-recursive install-recursive \
uninstall-recursive check-recursive installcheck-recursive
DIST_COMMON = README ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL \
Makefile.am Makefile.in NEWS README-alpha THANKS aclocal.m4 \
config.hin configure configure.in
Makefile.am Makefile.in NEWS THANKS aclocal.m4 config.hin \
configure configure.in
DIST_SUBDIRS = $(SUBDIRS)
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
@@ -237,13 +238,13 @@ tags-recursive:
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique $(LISP)
mkid -fID $$unique
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.hin $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
@@ -254,14 +255,14 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.hin $(TAGS_DEPENDENCIES) \
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
list='$(SOURCES) $(HEADERS) config.hin $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)config.hin$$unique$(LISP)$$tags" \
|| etags $(ETAGS_ARGS) $$tags config.hin $$unique $(LISP)
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| etags $(ETAGS_ARGS) $$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
@@ -270,14 +271,18 @@ GTAGS:
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = .
# Avoid unsightly `./'.
distdir = $(PACKAGE)-$(VERSION)
am__remove_distdir = \
{ test ! -d $(distdir) \
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr $(distdir); }; }
GZIP_ENV = --best
distcleancheck_listfiles = find . -type f -print
distdir: $(DISTFILES)
@if sed 15q $(srcdir)/NEWS | fgrep -e "$(VERSION)" >/dev/null; \
@@ -285,11 +290,11 @@ distdir: $(DISTFILES)
echo "NEWS not updated; not releasing" 1>&2; \
exit 1; \
fi
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
$(am__remove_distdir)
mkdir $(distdir)
$(mkinstalldirs) $(distdir)/intl $(distdir)/po $(distdir)/tests
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
@@ -323,22 +328,22 @@ distdir: $(DISTFILES)
|| chmod -R a+r $(distdir)
dist-gzip: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
$(am__remove_distdir)
dist-bzip2: distdir
$(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
$(am__remove_distdir)
dist dist-all: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
$(am__remove_distdir)
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/=build
@@ -348,6 +353,7 @@ distcheck: dist
&& cd $(distdir)/=build \
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
--with-included-gettext \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
@@ -359,15 +365,20 @@ distcheck: dist
find $$dc_install_base -type f -print ; \
exit 1; } >&2 ) \
&& $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
&& $(MAKE) $(AM_MAKEFLAGS) distclean \
&& rm -f $(distdir).tar.gz \
&& (test `find . -type f -print | wc -l` -eq 0 \
|| { echo "ERROR: files left after distclean:" ; \
find . -type f -print ; \
exit 1; } >&2 )
-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
$(am__remove_distdir)
@echo "$(distdir).tar.gz is ready for distribution" | \
sed 'h;s/./=/g;p;x;p;x'
distcleancheck: distclean
if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: check-recursive
all-am: Makefile config.h
@@ -385,6 +396,7 @@ install-am: all-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
@@ -439,9 +451,9 @@ uninstall-info: uninstall-info-recursive
.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \
clean-generic clean-recursive dist dist-all dist-bzip2 \
dist-gzip distcheck distclean distclean-generic distclean-hdr \
distclean-recursive distclean-tags distdir dvi dvi-am \
dvi-recursive info info-am info-recursive install install-am \
install-data install-data-am install-data-recursive \
distclean-recursive distclean-tags distcleancheck distdir dvi \
dvi-am dvi-recursive info info-am info-recursive install \
install-am install-data install-data-am install-data-recursive \
install-exec install-exec-am install-exec-recursive \
install-info install-info-am install-info-recursive install-man \
install-recursive install-strip installcheck installcheck-am \
+16 -22
View File
@@ -1,7 +1,22 @@
Bison News
----------
Changes in version 1.30h:
Changes in version 1.31, 2002-01-14:
* Many Bug Fixes
* GNU Gettext and %expect
GNU Gettext asserts 10 s/r conflicts, but there are 7. Now that
Bison dies on incorrect %expectations, we fear there will be
too many bug reports for Gettext, so _for the time being_, %expect
does not trigger an error when the input file is named `plural.y'.
* Use of alloca in parsers
If YYSTACK_USE_ALLOCA is defined to 0, then the parsers will use
malloc exclusively. Since 1.29, but was not NEWS'ed.
alloca is used only when compiled with GCC, to avoid portability
problems as on AIX.
* When the generated parser lacks debugging code, YYDEBUG is now 0
(as POSIX requires) instead of being undefined.
@@ -11,23 +26,15 @@ Changes in version 1.30h:
ending semicolon. Now if in Yacc compatibility mode, the semicolon
is no longer output: one has to write { $$ = $1; }.
Changes in version 1.30g:
* Bug fixes
* Better C++ compliance
The output parsers try to respect C++ namespaces.
Changes in version 1.30f:
* Reduced Grammars
Fixed bugs when reporting useless nonterminals.
* 64 bit hosts
The parsers work properly on 64 bit hosts.
Changes in version 1.30e:
* Error messages
Some calls to strerror resulted in scrambled or missing error messages.
@@ -39,8 +46,6 @@ Changes in version 1.30e:
* Rule line numbers are fixed in traces.
Changes in version 1.30d:
* Swedish translation
* Parse errors
@@ -48,17 +53,6 @@ Changes in version 1.30d:
Before: parse error: unexpected `'/'', expecting `"number"' or `'-'' or `'(''
Now: parse error: unexpected '/', expecting "number" or '-' or '('
* Fixed VCG output
Was broken when strings aliases for symbols were used.
Changes in version 1.30c:
* Fixed a few warnings.
* Some portability issues.
Changes in version 1.30b:
* Fixed parser memory leaks.
When the generated parser was using malloc to extend its stacks, the
previous allocations were not freed.
+4 -1
View File
@@ -2,15 +2,16 @@ Bison was originally written by Robert Corbett. It would not be what
it is today without the invaluable help of these people:
Airy Andre [email protected]
Aharon Robbins [email protected]
Akim Demaille [email protected]
Albert Chin-A-Young [email protected]
Alexander Belopolsky [email protected]
Arnold Robbins [email protected]
Daniel Hagerty [email protected]
David J. MacKenzie [email protected]
Dick Streefland [email protected]
Enrico Scholz [email protected]
Fabrice Bauzac [email protected]
H. Merijn Brand [email protected]
Hans Aberg [email protected]
Jesse Thilo [email protected]
Jim Meyering [email protected]
@@ -18,6 +19,7 @@ Juan Manuel Guerrero [email protected]
Keith Browne [email protected]
Laurent Mascherpa [email protected]
Marc Autret [email protected]
Mike Castle [email protected]
Neil Booth [email protected]
Nelson H. F. Beebe [email protected]
Noah Friedman [email protected]
@@ -31,6 +33,7 @@ Robert Anisko [email protected]
Shura [email protected]
Tom Lane [email protected]
Tom Tromey [email protected]
Wayne Green [email protected]
Wolfram Wagner [email protected]
Wwp [email protected]
Vendored
+26 -19
View File
@@ -1,4 +1,4 @@
# aclocal.m4 generated automatically by aclocal 1.5a -*- Autoconf -*-
# aclocal.m4 generated automatically by aclocal 1.5c -*- Autoconf -*-
# Copyright 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
@@ -33,7 +33,7 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 6
# serial 7
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
@@ -55,7 +55,7 @@ AC_DEFUN([AM_INIT_AUTOMAKE],
# test to see if srcdir already configured
if test "`cd $srcdir && pwd`" != "`pwd`" &&
test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
fi
# Define the identity of the package.
@@ -177,7 +177,7 @@ AC_MSG_RESULT(yes)])
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 2
# serial 3
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
@@ -199,8 +199,7 @@ if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
else
am_missing_run=
am_backtick='`'
AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
AC_MSG_WARN([`missing' script is too old or missing])
fi
])
@@ -495,11 +494,13 @@ AC_SUBST([AMDEPBACKSLASH])
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
[for mf in $CONFIG_FILES; do
case $mf in
Makefile) dirpart=.;;
*/Makefile) dirpart=`AS_DIRNAME("$mf")`;;
*) continue;;
esac
# Strip MF so we end up with the name of the file.
mf=`echo "$mf" | sed -e 's/:.*$//'`
if (head -1 $mf | fgrep 'generated by automake') > /dev/null 2>&1; then
dirpart=`AS_DIRNAME("$mf")`
else
dirpart=
fi
grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
# Extract the definition of DEP_FILES from the Makefile without
# running `make'.
@@ -546,11 +547,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
])
# AM_MAKE_INCLUDE()
# -----------------
# Check to see how make treats includes.
# Copyright 2001 Free Software Foundation, Inc.
# Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*-
# 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
@@ -567,6 +564,11 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 2
# AM_MAKE_INCLUDE()
# -----------------
# Check to see how make treats includes.
AC_DEFUN([AM_MAKE_INCLUDE],
[am_make=${MAKE-make}
cat > confinc << 'END'
@@ -575,7 +577,7 @@ doit:
END
# If we don't find an include directive, just comment out the code.
AC_MSG_CHECKING([for style of include used by $am_make])
am__include='#'
am__include="#"
am__quote=
_am_result=none
# First try GNU make style include.
@@ -595,7 +597,7 @@ if test "$am__include" = "#"; then
echo '.include "confinc"' > confmf
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
am__include=.include
am__quote='"'
am__quote="\""
_am_result=BSD
fi
fi
@@ -642,7 +644,12 @@ if $2; then
else
$1_TRUE='#'
$1_FALSE=
fi])
fi
AC_CONFIG_COMMANDS_PRE(
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
AC_MSG_ERROR([conditional \"$1\" was never defined.
Usually this means the macro was only invoked conditionally.])
fi])])
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
+30 -10
View File
@@ -35,10 +35,18 @@
*/
#undef HAVE_DECL_MEMCHR
/* Define to 1 if you have the declaration of `memrchr', and to 0 if you
don't. */
#undef HAVE_DECL_MEMRCHR
/* Define to 1 if you have the declaration of `stpcpy', and to 0 if you don't.
*/
#undef HAVE_DECL_STPCPY
/* Define to 1 if you have the declaration of `strchr', and to 0 if you don't.
*/
#undef HAVE_DECL_STRCHR
/* Define to 1 if you have the declaration of `strerror', and to 0 if you
don't. */
#undef HAVE_DECL_STRERROR
@@ -47,14 +55,14 @@
don't. */
#undef HAVE_DECL_STRERROR_R
/* Define to 1 if you have the declaration of `strndup', and to 0 if you
don't. */
#undef HAVE_DECL_STRNDUP
/* Define to 1 if you have the declaration of `strnlen', and to 0 if you
don't. */
#undef HAVE_DECL_STRNLEN
/* Define to 1 if you have the declaration of `strspn', and to 0 if you don't.
*/
#undef HAVE_DECL_STRSPN
/* Define if the malloc check has been performed. */
#undef HAVE_DONE_WORKING_MALLOC_CHECK
@@ -133,6 +141,9 @@
/* Define to 1 if you have the `mempcpy' function. */
#undef HAVE_MEMPCPY
/* Define to 1 if you have the `memrchr' function. */
#undef HAVE_MEMRCHR
/* Define to 1 if you have the `mkstemp' function. */
#undef HAVE_MKSTEMP
@@ -190,12 +201,6 @@
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the `strndup' function. */
#undef HAVE_STRNDUP
/* Define to 1 if you have the `strnlen' function. */
#undef HAVE_STRNLEN
/* Define to 1 if you have the `strspn' function. */
#undef HAVE_STRSPN
@@ -241,6 +246,21 @@
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define if compiler has function prototypes */
#undef PROTOTYPES
+5 -5
View File
@@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.5a from Makefile.am.
# Makefile.in generated by automake 1.5c from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
@@ -13,7 +13,6 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
@@ -48,6 +47,7 @@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
install_sh_DATA = $(install_sh) -c -m 644
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
@@ -97,10 +97,10 @@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@
WERROR_CFLAGS = @WERROR_CFLAGS@
am__include = @am__include@
am__quote = @am__quote@
install_sh = @install_sh@
EXTRA_DIST = move-if-change prev-version.txt
subdir = config
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
@@ -121,7 +121,6 @@ uninstall-info-am:
tags: TAGS
TAGS:
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
@@ -129,7 +128,7 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
@@ -160,6 +159,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
+9 -3
View File
@@ -1,9 +1,9 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002 Free Software Foundation, Inc.
timestamp='2001-12-13'
timestamp='2002-01-02'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -289,6 +289,9 @@ EOF
*:[Aa]miga[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-amigaos
exit 0 ;;
*:[Mm]orph[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-morphos
exit 0 ;;
*:OS/390:*:*)
echo i370-ibm-openedition
exit 0 ;;
@@ -770,6 +773,9 @@ EOF
mips:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
#undef mips
#undef mipsel
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
CPU=mipsel
#else
+11 -5
View File
@@ -1,9 +1,9 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002 Free Software Foundation, Inc.
timestamp='2001-12-10'
timestamp='2002-01-02'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -227,6 +227,7 @@ case $basic_machine in
1750a | 580 \
| a29k \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| c4x | clipper \
| d10v | d30v | dsp16xx \
@@ -278,7 +279,8 @@ case $basic_machine in
580-* \
| a29k-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alphapca5[67]-* | arc-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armv*-* \
| avr-* \
| bs2000-* \
@@ -629,6 +631,10 @@ case $basic_machine in
basic_machine=m68k-rom68k
os=-coff
;;
morphos)
basic_machine=powerpc-unknown
os=-morphos
;;
msdos)
basic_machine=i386-pc
os=-msdos
@@ -1087,7 +1093,7 @@ case $os in
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus*)
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* | -morphos*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
+1 -1
View File
@@ -1 +1 @@
1.30g
1.30
+51 -34
View File
@@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
\def\texinfoversion{2001-07-25.07}
\def\texinfoversion{2002-01-04.07}
%
% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
% 2000, 01 Free Software Foundation, Inc.
@@ -30,14 +30,17 @@
% Please try the latest version of texinfo.tex before submitting bug
% reports; you can get the latest version from:
% ftp://ftp.gnu.org/gnu/texinfo.tex
% (and all GNU mirrors, see http://www.gnu.org/order/ftp.html)
% ftp://texinfo.org/tex/texinfo.tex
% ftp://us.ctan.org/macros/texinfo/texinfo.tex
% (and all CTAN mirrors, finger [email protected] for a list).
% /home/gd/gnu/doc/texinfo.tex on the GNU machines.
% (and all GNU mirrors, see http://www.gnu.org/order/ftp.html)
% ftp://texinfo.org/texinfo/texinfo.tex
% ftp://tug.org/tex/texinfo.tex
% (and all CTAN mirrors, see http://www.ctan.org),
% and /home/gd/gnu/doc/texinfo.tex on the GNU machines.
%
% The texinfo.tex in any given Texinfo distribution could well be out
% of date, so if that's what you're using, please check.
% Texinfo has a small home page at http://texinfo.org/.
%
% Texinfo has a small home page at http://texinfo.org/ and also
% http://www.gnu.org/software/texinfo.
%
% Send bug reports to [email protected]. Please include including a
% complete document in each bug report with which we can reproduce the
@@ -927,10 +930,12 @@ where each line of input produces a line of output.}
\def\dopdfimage#1#2#3{%
\def\imagewidth{#2}%
\def\imageheight{#3}%
% without \immediate, pdftex seg faults when the same image is
% included twice. (Version 3.14159-pre-1.0-unofficial-20010704.)
\ifnum\pdftexversion < 14
\pdfimage
\immediate\pdfimage
\else
\pdfximage
\immediate\pdfximage
\fi
\ifx\empty\imagewidth\else width \imagewidth \fi
\ifx\empty\imageheight\else height \imageheight \fi
@@ -943,7 +948,7 @@ where each line of input produces a line of output.}
\pdfrefximage \pdflastximage
\fi}
\def\pdfmkdest#1{{\normalturnoffactive \pdfdest name{#1} xyz}}
\def\pdfmkpgn#1{#1@}
\def\pdfmkpgn#1{#1}
\let\linkcolor = \Blue % was Cyan, but that seems light?
\def\endlink{\Black\pdfendlink}
% Adding outlines to PDF; macros for calculating structure of outlines
@@ -5799,8 +5804,15 @@ width0pt\relax} \fi
%
\smallfonts \rm
%
% Hang the footnote text off the number.
\hang
% Because we use hanging indentation in footnotes, a @noindent appears
% to exdent this text, so make it be a no-op. makeinfo does not use
% hanging indentation so @noindent can still be needed within footnote
% text after an @example or the like (not that this is good style).
\let\noindent = \relax
%
% Hang the footnote text off the number. Use \everypar in case the
% footnote extends for more than one paragraph.
\everypar = {\hang}%
\textindent{\thisfootno}%
%
% Don't crash into the line above the footnote text. Since this
@@ -5881,7 +5893,7 @@ width0pt\relax} \fi
\global\warnednoepsftrue
\fi
\else
\imagexxx #1,,,\finish
\imagexxx #1,,,,,\finish
\fi
}
%
@@ -5891,33 +5903,34 @@ width0pt\relax} \fi
% #4 is (ignored optional) html alt text.
% #5 is (ignored optional) extension.
% #6 is just the usual extra ignored arg for parsing this stuff.
\def\imagexxx#1,#2,#3,#4,#5,#6\finish{%
\newif\ifimagevmode
\def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup \loggingall
\catcode`\^^M = 5 % in case we're inside an example
\normalturnoffactive % allow _ et al. in names
% If the image is by itself, center it.
\ifvmode
\imagevmodetrue
\nobreak\bigskip
% Usually we'll have text after the image which will insert
% \parskip glue, so insert it here too to equalize the space
% above and below.
\nobreak\vskip\parskip
\nobreak
\line\bgroup\hss
\fi
%
% Output the image.
\ifpdf
\centerline{\dopdfimage{#1}{#2}{#3}}%
\dopdfimage{#1}{#2}{#3}%
\else
% \epsfbox itself resets \epsf?size at each figure.
\setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
\setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
\begingroup
\catcode`\^^M = 5 % in case we're inside an example
\normalturnoffactive % allow _ et al. in names
% If the image is by itself, center it.
\ifvmode
\nobreak\bigskip
% Usually we'll have text after the image which will insert
% \parskip glue, so insert it here too to equalize the space
% above and below.
\nobreak\vskip\parskip
\nobreak
\centerline{\epsfbox{#1.eps}}%
\bigbreak
\else
% In the middle of a paragraph, no extra space.
\epsfbox{#1.eps}%
\fi
\endgroup
\epsfbox{#1.eps}%
\fi
}
%
\ifimagevmode \hss \egroup \bigbreak \fi % space after the image
\endgroup}
\message{localization,}
@@ -6087,6 +6100,10 @@ should work if nowhere else does.}
%
\afourpaper
\internalpagesizes{237mm}{150mm}{3.6mm}{3.6mm}{3mm}{7mm}%
%
% Must explicitly reset to 0 because we call \afourpaper, apparently,
% although this does not entirely make sense.
\globaldefs = 0
}}
% Use @afourwide to print on European A4 paper in wide format.
Vendored
+364 -148
View File
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.52g for GNU Bison 1.30h.
# Generated by GNU Autoconf 2.52g for GNU Bison 1.31.
#
# Report bugs to <[email protected]>.
#
@@ -253,6 +253,13 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# only ac_max_sed_lines should be used.
: ${ac_max_here_lines=38}
# Identity of this package.
PACKAGE_NAME='GNU Bison'
PACKAGE_TARNAME='bison'
PACKAGE_VERSION='1.31'
PACKAGE_STRING='GNU Bison 1.31'
PACKAGE_BUGREPORT='[email protected]'
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
@@ -329,13 +336,6 @@ oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'
# Identity of this package.
PACKAGE_NAME='GNU Bison'
PACKAGE_TARNAME='bison'
PACKAGE_VERSION='1.30h'
PACKAGE_STRING='GNU Bison 1.30h'
PACKAGE_BUGREPORT='[email protected]'
ac_prev=
for ac_option
do
@@ -760,7 +760,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures GNU Bison 1.30h to adapt to many kinds of systems.
\`configure' configures GNU Bison 1.31 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -826,7 +826,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of GNU Bison 1.30h:";;
short | recursive ) echo "Configuration of GNU Bison 1.31:";;
esac
cat <<\_ACEOF
@@ -894,10 +894,10 @@ case $srcdir in
esac
# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
# absolute.
ac_buildpath=`cd "$ac_dir" && cd $ac_builddir && pwd`
ac_top_buildpath=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
ac_srcpath=`cd "$ac_dir" && cd $ac_srcdir && pwd`
ac_top_srcpath=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
cd $ac_dir
# Check for guested configure; otherwise get Cygnus style configure.
@@ -921,7 +921,7 @@ fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
GNU Bison configure 1.30h
GNU Bison configure 1.31
generated by GNU Autoconf 2.52g
Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
@@ -936,7 +936,7 @@ cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by GNU Bison $as_me 1.30h, which was
It was created by GNU Bison $as_me 1.31, which was
generated by GNU Autoconf 2.52g. Invocation command line was
$ $0 $@
@@ -996,15 +996,17 @@ for ac_arg
do
case $ac_arg in
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
| --no-cr | --no-c) ;;
| --no-cr | --no-c) continue ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
continue ;;
*" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
ac_sep=" " ;;
*) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
ac_sep=" " ;;
ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
case " $ac_configure_args " in
*" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
*) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
ac_sep=" " ;;
esac
# Get rid of the leading space.
done
@@ -1054,7 +1056,8 @@ _ASBOX
echo "$as_me: caught signal $ac_signal"
echo "$as_me: exit $exit_status"
} >&5
rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
rm -f core core.* *.core &&
rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
exit $exit_status
' 0
for ac_signal in 1 2 13 15; do
@@ -1067,6 +1070,33 @@ rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
echo >confdefs.h
# Predefined preprocessor variables.
cat >>confdefs.h <<_ACEOF
#define PACKAGE_NAME "$PACKAGE_NAME"
_ACEOF
cat >>confdefs.h <<_ACEOF
#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
_ACEOF
cat >>confdefs.h <<_ACEOF
#define PACKAGE_VERSION "$PACKAGE_VERSION"
_ACEOF
cat >>confdefs.h <<_ACEOF
#define PACKAGE_STRING "$PACKAGE_STRING"
_ACEOF
cat >>confdefs.h <<_ACEOF
#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
_ACEOF
# Let the site file select an alternate cache file if it wants to.
# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
@@ -1132,16 +1162,16 @@ echo "$as_me: current value: $ac_new_val" >&2;}
ac_cache_corrupted=:
fi;;
esac
# Pass precious variables to config.status. It doesn't matter if
# we pass some twice (in addition to the command line arguments).
# Pass precious variables to config.status.
if test "$ac_new_set" = set; then
case $ac_new_val in
*" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
ac_configure_args="$ac_configure_args '$ac_arg'"
;;
*) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
;;
ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
*) ac_arg=$ac_var=$ac_new_val ;;
esac
case " $ac_configure_args " in
*" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
*) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
esac
fi
done
@@ -1355,9 +1385,8 @@ if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
else
am_missing_run=
am_backtick='`'
{ echo "$as_me:$LINENO: WARNING: ${am_backtick}missing' script is too old or missing" >&5
echo "$as_me: WARNING: ${am_backtick}missing' script is too old or missing" >&2;}
{ echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
fi
for ac_prog in gawk mawk nawk awk
@@ -1449,6 +1478,7 @@ else
fi
rm -f .deps 2>/dev/null
mkdir .deps 2>/dev/null
if test -d .deps; then
@@ -1470,7 +1500,7 @@ fi
# Define the identity of the package.
PACKAGE=bison
VERSION=1.30h
VERSION=1.31
cat >>confdefs.h <<_ACEOF
#define PACKAGE "$PACKAGE"
@@ -1517,9 +1547,6 @@ ac_config_headers="$ac_config_headers config.h:config.hin"
# Initialize the test suite.
ac_config_commands="$ac_config_commands tests/package.m4"
ac_config_commands="$ac_config_commands tests/atconfig"
@@ -2295,7 +2322,7 @@ END
# If we don't find an include directive, just comment out the code.
echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
am__include='#'
am__include="#"
am__quote=
_am_result=none
# First try GNU make style include.
@@ -2315,7 +2342,7 @@ if test "$am__include" = "#"; then
echo '.include "confinc"' > confmf
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
am__include=.include
am__quote='"'
am__quote="\""
_am_result=BSD
fi
fi
@@ -3182,6 +3209,55 @@ else
enableval=no
fi;
if test "${enableval}" = yes; then
echo "$as_me:$LINENO: checking whether compiler accepts -Werror" >&5
echo $ECHO_N "checking whether compiler accepts -Werror... $ECHO_C" >&6
ac_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Werror"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
int x;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
WARNING_CFLAGS="$WARNING_CFLAGS -Werror"
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
rm -f conftest.$ac_objext conftest.$ac_ext
CFLAGS="$ac_save_CFLAGS"
WERROR_CFLAGS=$WARNING_CFLAGS
WARNING_CFLAGS=
echo "$as_me:$LINENO: checking whether compiler accepts -Wall" >&5
echo $ECHO_N "checking whether compiler accepts -Wall... $ECHO_C" >&6
@@ -3733,52 +3809,6 @@ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
rm -f conftest.$ac_objext conftest.$ac_ext
CFLAGS="$ac_save_CFLAGS"
echo "$as_me:$LINENO: checking whether compiler accepts -Werror" >&5
echo $ECHO_N "checking whether compiler accepts -Werror... $ECHO_C" >&6
ac_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Werror"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
int x;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
WARNING_CFLAGS="$WARNING_CFLAGS -Werror"
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
rm -f conftest.$ac_objext conftest.$ac_ext
CFLAGS="$ac_save_CFLAGS"
fi
@@ -4989,6 +5019,73 @@ if test $ac_cv_lib_error_at_line = no; then
LIBOBJS="$LIBOBJS error.$ac_objext"
fi
echo "$as_me:$LINENO: checking for working strnlen" >&5
echo $ECHO_N "checking for working strnlen... $ECHO_C" >&6
if test "${ac_cv_func_strnlen_working+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then
ac_cv_func_strnlen_working=no
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
#define S "foobar"
#define S_LEN (sizeof S - 1)
/* At least one implementation is buggy: that of AIX 4.3 would
give strnlen (S, 1) == 3. */
int i;
for (i = 0; i < S_LEN + 1; ++i)
{
int expected = i <= S_LEN ? i : S_LEN;
if (strnlen (S, i) != expected)
exit (1);
}
exit (0);
;
return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_strnlen_working=yes
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_func_strnlen_working=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_func_strnlen_working" >&5
echo "${ECHO_T}$ac_cv_func_strnlen_working" >&6
test $ac_cv_func_strnlen_working = no && LIBOBJS="$LIBOBJS strnlen.$ac_objext"
for ac_func in mkstemp setlocale
@@ -5128,9 +5225,9 @@ _ACEOF
fi
echo "$as_me:$LINENO: checking whether strndup is declared" >&5
echo $ECHO_N "checking whether strndup is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_strndup+set}" = set; then
echo "$as_me:$LINENO: checking whether strchr is declared" >&5
echo $ECHO_N "checking whether strchr is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_strchr+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -5146,8 +5243,8 @@ $ac_includes_default
int
main ()
{
#ifndef strndup
char *p = (char *) strndup;
#ifndef strchr
char *p = (char *) strchr;
#endif
;
@@ -5166,26 +5263,88 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_have_decl_strndup=yes
ac_cv_have_decl_strchr=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_have_decl_strndup=no
ac_cv_have_decl_strchr=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_have_decl_strndup" >&5
echo "${ECHO_T}$ac_cv_have_decl_strndup" >&6
if test $ac_cv_have_decl_strndup = yes; then
echo "$as_me:$LINENO: result: $ac_cv_have_decl_strchr" >&5
echo "${ECHO_T}$ac_cv_have_decl_strchr" >&6
if test $ac_cv_have_decl_strchr = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_STRNDUP 1
#define HAVE_DECL_STRCHR 1
_ACEOF
else
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_STRNDUP 0
#define HAVE_DECL_STRCHR 0
_ACEOF
fi
echo "$as_me:$LINENO: checking whether strspn is declared" >&5
echo $ECHO_N "checking whether strspn is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_strspn+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
$ac_includes_default
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
#ifndef strspn
char *p = (char *) strspn;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_have_decl_strspn=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_have_decl_strspn=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_have_decl_strspn" >&5
echo "${ECHO_T}$ac_cv_have_decl_strspn" >&6
if test $ac_cv_have_decl_strspn = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_STRSPN 1
_ACEOF
else
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_STRSPN 0
_ACEOF
@@ -5314,6 +5473,68 @@ _ACEOF
fi
echo "$as_me:$LINENO: checking whether memrchr is declared" >&5
echo $ECHO_N "checking whether memrchr is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_memrchr+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
$ac_includes_default
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
#ifndef memrchr
char *p = (char *) memrchr;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_have_decl_memrchr=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_have_decl_memrchr=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_have_decl_memrchr" >&5
echo "${ECHO_T}$ac_cv_have_decl_memrchr" >&6
if test $ac_cv_have_decl_memrchr = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_MEMRCHR 1
_ACEOF
else
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_MEMRCHR 0
_ACEOF
fi
@@ -5321,7 +5542,7 @@ fi
for ac_func in stpcpy strndup strnlen strspn memchr
for ac_func in stpcpy strchr strspn memchr memrchr
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -7368,7 +7589,7 @@ $ac_includes_default
VM page cache was not coherent with the file system buffer cache
like early versions of FreeBSD and possibly contemporary NetBSD.)
For shared mappings, we should conversely verify that changes get
propogated back to all the places they're supposed to be.
propagated back to all the places they're supposed to be.
Grep wants private fixed already mapped.
The main things grep needs to know about mmap are:
@@ -8900,6 +9121,13 @@ fi
DEFS=-DHAVE_CONFIG_H
if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
echo "$as_me: error: conditional \"AMDEP\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
@@ -9149,7 +9377,7 @@ _ASBOX
} >&5
cat >&5 <<_CSEOF
This file was extended by GNU Bison $as_me 1.30h, which was
This file was extended by GNU Bison $as_me 1.31, which was
generated by GNU Autoconf 2.52g. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -9211,7 +9439,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
GNU Bison config.status 1.30h
GNU Bison config.status 1.31
configured by $0, generated by GNU Autoconf 2.52g,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
@@ -9294,12 +9522,6 @@ cat >>$CONFIG_STATUS <<_ACEOF
# INIT-COMMANDS section.
#
PACKAGE_NAME='$PACKAGE_NAME'
PACKAGE_TARNAME='$PACKAGE_TARNAME'
PACKAGE_VERSION='$PACKAGE_VERSION'
PACKAGE_STRING='$PACKAGE_STRING'
PACKAGE_BUGREPORT='$PACKAGE_BUGREPORT'
AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
@@ -9323,7 +9545,6 @@ do
"src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
"doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
"m4/Makefile" ) CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;;
"tests/package.m4" ) CONFIG_COMMANDS="$CONFIG_COMMANDS tests/package.m4" ;;
"tests/atconfig" ) CONFIG_COMMANDS="$CONFIG_COMMANDS tests/atconfig" ;;
"depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
@@ -9382,6 +9603,11 @@ if test -n "\$CONFIG_FILES"; then
s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
s,@SHELL@,$SHELL,;t t
s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
s,@exec_prefix@,$exec_prefix,;t t
s,@prefix@,$prefix,;t t
s,@program_transform_name@,$program_transform_name,;t t
@@ -9397,11 +9623,6 @@ s,@includedir@,$includedir,;t t
s,@oldincludedir@,$oldincludedir,;t t
s,@infodir@,$infodir,;t t
s,@mandir@,$mandir,;t t
s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
s,@build_alias@,$build_alias,;t t
s,@host_alias@,$host_alias,;t t
s,@target_alias@,$target_alias,;t t
@@ -9445,6 +9666,7 @@ s,@RANLIB@,$RANLIB,;t t
s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
s,@AUTOM4TE@,$AUTOM4TE,;t t
s,@WARNING_CFLAGS@,$WARNING_CFLAGS,;t t
s,@WERROR_CFLAGS@,$WERROR_CFLAGS,;t t
s,@U@,$U,;t t
s,@ANSI2KNR@,$ANSI2KNR,;t t
s,@ALLOCA@,$ALLOCA,;t t
@@ -9595,10 +9817,10 @@ case $srcdir in
esac
# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
# absolute.
ac_buildpath=`cd "$ac_dir" && cd $ac_builddir && pwd`
ac_top_buildpath=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
ac_srcpath=`cd "$ac_dir" && cd $ac_srcdir && pwd`
ac_top_srcpath=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
case $INSTALL in
@@ -9659,13 +9881,13 @@ cat >>$CONFIG_STATUS <<\_ACEOF
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
s,@configure_input@,$configure_input,;t t
s,@srcdir@,$ac_srcdir,;t t
s,@srcpath@,$ac_srcpath,;t t
s,@abs_srcdir@,$ac_abs_srcdir,;t t
s,@top_srcdir@,$ac_top_srcdir,;t t
s,@top_srcpath@,$ac_top_srcpath,;t t
s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
s,@builddir@,$ac_builddir,;t t
s,@buildpath@,$ac_buildpath,;t t
s,@abs_builddir@,$ac_abs_builddir,;t t
s,@top_builddir@,$ac_top_builddir,;t t
s,@top_buildpath@,$ac_top_buildpath,;t t
s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
s,@INSTALL@,$ac_INSTALL,;t t
" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
rm -f $tmp/stdin
@@ -9952,37 +10174,29 @@ case $srcdir in
esac
# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
# absolute.
ac_buildpath=`cd "$ac_dir" && cd $ac_builddir && pwd`
ac_top_buildpath=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
ac_srcpath=`cd "$ac_dir" && cd $ac_srcdir && pwd`
ac_top_srcpath=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
{ echo "$as_me:$LINENO: executing $ac_dest commands" >&5
echo "$as_me: executing $ac_dest commands" >&6;}
case $ac_dest in
tests/package.m4 ) cat >tests/package.m4 <<ATEOF
# Signature of the current package.
m4_define([PACKAGE_NAME], [$PACKAGE_NAME])
m4_define([PACKAGE_TARNAME], [$PACKAGE_TARNAME])
m4_define([PACKAGE_VERSION], [$PACKAGE_VERSION])
m4_define([PACKAGE_STRING], [$PACKAGE_STRING])
m4_define([PACKAGE_BUGREPORT], [$PACKAGE_BUGREPORT])
ATEOF
;;
tests/atconfig ) cat >tests/atconfig <<ATEOF
# Configurable variable values for building test suites.
# Generated by $0.
# Copyright 2000, 2001 Free Software Foundation, Inc.
# The test suite will define top_srcdir=$at_top_srcdir/../.. etc.
at_testdir='tests'
buildpath='$ac_buildpath'
srcdir='$ac_srcdir'
srcpath='$ac_srcpath'
top_srcdir='$ac_top_srcdir'
top_srcpath='$ac_top_srcpath'
top_builddir='$ac_top_builddir'
top_buildpath='$ac_top_buildpath'
abs_builddir='$ac_abs_builddir'
at_srcdir='$ac_srcdir'
abs_srcdir='$ac_abs_srcdir'
at_top_srcdir='$ac_top_srcdir'
abs_top_srcdir='$ac_abs_top_srcdir'
at_top_builddir='$ac_top_builddir'
abs_top_builddir='$ac_abs_top_builddir'
AUTOTEST_PATH='tests'
@@ -9990,9 +10204,10 @@ SHELL=\${CONFIG_SHELL-'$SHELL'}
ATEOF
;;
depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
case $mf in
Makefile) dirpart=.;;
*/Makefile) dirpart=`(dirname "$mf") 2>/dev/null ||
# Strip MF so we end up with the name of the file.
mf=`echo "$mf" | sed -e 's/:.*$//'`
if (head -1 $mf | fgrep 'generated by automake') > /dev/null 2>&1; then
dirpart=`(dirname "$mf") 2>/dev/null ||
$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$mf" : 'X\(//\)[^/]' \| \
X"$mf" : 'X\(//\)$' \| \
@@ -10003,9 +10218,10 @@ echo X"$mf" |
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`;;
*) continue;;
esac
s/.*/./; q'`
else
dirpart=
fi
grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
# Extract the definition of DEP_FILES from the Makefile without
# running `make'.
+9 -6
View File
@@ -1,6 +1,6 @@
# Configure template for GNU Bison. -*-Autoconf-*-
#
# Copyright 2001 Free Software Foundation, Inc.
# Copyright 2001, 2002 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
@@ -20,10 +20,10 @@
# We need a recent Autoconf to run a recent Autotest.
AC_PREREQ(2.52g)
AC_INIT([GNU Bison], [1.30h], [[email protected]])
AC_INIT([GNU Bison], [1.31], [[email protected]])
AC_CONFIG_AUX_DIR(config)
AM_INIT_AUTOMAKE([bison], [1.30h])
AM_INIT_AUTOMAKE([bison], [1.31])
AM_CONFIG_HEADER(config.h:config.hin)
# Initialize the test suite.
@@ -49,6 +49,9 @@ AC_ARG_ENABLE(gcc-warnings,
esac],
[enableval=no])
if test "${enableval}" = yes; then
BISON_WARNING(-Werror)
AC_SUBST([WERROR_CFLAGS], [$WARNING_CFLAGS])
WARNING_CFLAGS=
BISON_WARNING(-Wall)
BISON_WARNING(-W)
BISON_WARNING(-Wbad-function-cast)
@@ -61,7 +64,6 @@ if test "${enableval}" = yes; then
BISON_WARNING(-Wshadow)
BISON_WARNING(-Wstrict-prototypes)
BISON_WARNING(-Wwrite-strings)
BISON_WARNING(-Werror)
fi
# Checks for libraries.
@@ -84,9 +86,10 @@ AM_C_PROTOTYPES
AC_FUNC_ALLOCA
AC_FUNC_OBSTACK
AC_FUNC_ERROR_AT_LINE
AC_FUNC_STRNLEN
AC_CHECK_FUNCS(mkstemp setlocale)
AC_CHECK_DECLS([stpcpy, strndup, strnlen, memchr])
AC_REPLACE_FUNCS(stpcpy strndup strnlen strspn memchr)
AC_CHECK_DECLS([stpcpy, strchr, strspn, strnlen, memchr, memrchr])
AC_REPLACE_FUNCS(stpcpy strchr strspn memchr memrchr)
jm_FUNC_MALLOC
jm_FUNC_REALLOC
jm_PREREQ_QUOTEARG
+4 -4
View File
@@ -4935,13 +4935,13 @@ Alternatively, use the @samp{-t} option when you run Bison
you always define @code{YYDEBUG} so that debugging is always possible.
The trace facility outputs messages with macro calls of the form
@code{YYFPRINTF (YYSTDERR, @var{format}, @var{args})} where
@code{YYFPRINTF (stderr, @var{format}, @var{args})} where
@var{format} and @var{args} are the usual @code{printf} format and
arguments. If you define @code{YYDEBUG} to a nonzero value but do not
define @code{YYFPRINTF}, @code{<stdio.h>} is automatically included
and the macros are defined to @code{fprintf} and @code{stderr}. In
the same situation, C++ parsers include @code{<cstdio.h>} instead, and
use @code{std::fprintf} and @code{std::stderr}.
and @code{YYPRINTF} is defined to @code{fprintf}. In the same
situation, C++ parsers include @code{<cstdio>} and use
@code{std::fprintf} instead.
Once you have compiled the program with trace facilities, the way to
request a trace is to store a nonzero value in the variable @code{yydebug}.
+4 -4
View File
@@ -1,4 +1,4 @@
@set UPDATED 18 December 2001
@set UPDATED-MONTH December 2001
@set EDITION 1.30h
@set VERSION 1.30h
@set UPDATED 5 January 2002
@set UPDATED-MONTH January 2002
@set EDITION 1.31
@set VERSION 1.31
+6 -5
View File
@@ -1,4 +1,4 @@
## Copyright 2001 Free Software Foundation, Inc.
## Copyright 2001, 2002 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
@@ -24,14 +24,15 @@ noinst_LIBRARIES = libbison.a
INCLUDES = -I.. -I$(srcdir) -I../intl
# Heck, we are still using an old version of Automake which does not
# understand LIBOBJ additions using $objext...
EXTRA_DIST = malloc.c realloc.c
# understand inner AC_LIBOBJ (i.e., from Autoconf itself, not from
# configure.in).
EXTRA_DIST = malloc.c realloc.c strnlen.c
libbison_a_SOURCES = \
basename.c dirname.h dirname.c \
getopt.h getopt.c getopt1.c \
quote.h quote.c quotearg.h quotearg.c \
xalloc.h xmalloc.c xstrdup.c
xalloc.h xmalloc.c xstrdup.c xstrndup.c
libbison_a_LIBADD = @LIBOBJS@ @ALLOCA@
libbison_a_DEPENDENCIES = $(libbison_a_LIBADD)
+50 -35
View File
@@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.5a from Makefile.am.
# Makefile.in generated by automake 1.5c from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
@@ -13,7 +13,6 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
@@ -48,6 +47,7 @@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
install_sh_DATA = $(install_sh) -c -m 644
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
@@ -97,6 +97,7 @@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@
WERROR_CFLAGS = @WERROR_CFLAGS@
am__include = @am__include@
am__quote = @am__quote@
install_sh = @install_sh@
@@ -109,15 +110,16 @@ noinst_LIBRARIES = libbison.a
INCLUDES = -I.. -I$(srcdir) -I../intl
# Heck, we are still using an old version of Automake which does not
# understand LIBOBJ additions using $objext...
EXTRA_DIST = malloc.c realloc.c
# understand inner AC_LIBOBJ (i.e., from Autoconf itself, not from
# configure.in).
EXTRA_DIST = malloc.c realloc.c strnlen.c
libbison_a_SOURCES = \
basename.c dirname.h dirname.c \
getopt.h getopt.c getopt1.c \
quote.h quote.c quotearg.h quotearg.c \
xalloc.h xmalloc.c xstrdup.c
xalloc.h xmalloc.c xstrdup.c xstrndup.c
libbison_a_LIBADD = @LIBOBJS@ @ALLOCA@
@@ -129,9 +131,10 @@ CONFIG_CLEAN_FILES =
LIBRARIES = $(noinst_LIBRARIES)
libbison_a_AR = $(AR) cru
am_libbison_a_OBJECTS = getopt$U.$(OBJEXT) getopt1$U.$(OBJEXT) \
quote$U.$(OBJEXT) quotearg$U.$(OBJEXT) xmalloc$U.$(OBJEXT) \
xstrdup$U.$(OBJEXT)
am_libbison_a_OBJECTS = basename$U.$(OBJEXT) dirname$U.$(OBJEXT) \
getopt$U.$(OBJEXT) getopt1$U.$(OBJEXT) quote$U.$(OBJEXT) \
quotearg$U.$(OBJEXT) xmalloc$U.$(OBJEXT) xstrdup$U.$(OBJEXT) \
xstrndup$U.$(OBJEXT)
libbison_a_OBJECTS = $(am_libbison_a_OBJECTS)
DEFS = @DEFS@
@@ -140,22 +143,24 @@ CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/alloca.Po $(DEPDIR)/error.Po \
@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/alloca.Po $(DEPDIR)/basename$U.Po \
@AMDEP_TRUE@ $(DEPDIR)/dirname$U.Po $(DEPDIR)/error.Po \
@AMDEP_TRUE@ $(DEPDIR)/getopt$U.Po $(DEPDIR)/getopt1$U.Po \
@AMDEP_TRUE@ $(DEPDIR)/malloc.Po $(DEPDIR)/memchr.Po \
@AMDEP_TRUE@ $(DEPDIR)/obstack.Po $(DEPDIR)/quote$U.Po \
@AMDEP_TRUE@ $(DEPDIR)/quotearg$U.Po $(DEPDIR)/realloc.Po \
@AMDEP_TRUE@ $(DEPDIR)/stpcpy.Po $(DEPDIR)/strndup.Po \
@AMDEP_TRUE@ $(DEPDIR)/strnlen.Po $(DEPDIR)/strspn.Po \
@AMDEP_TRUE@ $(DEPDIR)/xmalloc$U.Po $(DEPDIR)/xstrdup$U.Po
@AMDEP_TRUE@ $(DEPDIR)/memrchr.Po $(DEPDIR)/obstack.Po \
@AMDEP_TRUE@ $(DEPDIR)/quote$U.Po $(DEPDIR)/quotearg$U.Po \
@AMDEP_TRUE@ $(DEPDIR)/realloc.Po $(DEPDIR)/stpcpy.Po \
@AMDEP_TRUE@ $(DEPDIR)/strchr.Po $(DEPDIR)/strspn.Po \
@AMDEP_TRUE@ $(DEPDIR)/xmalloc$U.Po $(DEPDIR)/xstrdup$U.Po \
@AMDEP_TRUE@ $(DEPDIR)/xstrndup$U.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
DIST_SOURCES = $(libbison_a_SOURCES)
DIST_COMMON = Makefile.am Makefile.in alloca.c ansi2knr.1 ansi2knr.c \
error.c error.h malloc.c memchr.c obstack.c obstack.h realloc.c \
stpcpy.c strndup.c strnlen.c strspn.c
error.c error.h malloc.c memchr.c memrchr.c obstack.c obstack.h \
realloc.c stpcpy.c strchr.c strspn.c
SOURCES = $(libbison_a_SOURCES)
all: all-am
@@ -195,21 +200,24 @@ mostlyclean-kr:
-test "$U" = "" || rm -f *_.c
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/alloca.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/basename$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/dirname$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/error.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt1$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/malloc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/memchr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/memrchr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/obstack.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/quote$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/quotearg$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/realloc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/stpcpy.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strndup.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strnlen.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strchr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strspn.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/xmalloc$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/xstrdup$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/xstrndup$U.Po@am__quote@
distclean-depend:
-rm -rf $(DEPDIR)
@@ -228,6 +236,10 @@ distclean-depend:
CCDEPMODE = @CCDEPMODE@
alloca_.c: alloca.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/alloca.c; then echo $(srcdir)/alloca.c; else echo alloca.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > alloca_.c || rm -f alloca_.c
basename_.c: basename.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/basename.c; then echo $(srcdir)/basename.c; else echo basename.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > basename_.c || rm -f basename_.c
dirname_.c: dirname.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/dirname.c; then echo $(srcdir)/dirname.c; else echo dirname.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > dirname_.c || rm -f dirname_.c
error_.c: error.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/error.c; then echo $(srcdir)/error.c; else echo error.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > error_.c || rm -f error_.c
getopt_.c: getopt.c $(ANSI2KNR)
@@ -238,6 +250,8 @@ malloc_.c: malloc.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/malloc.c; then echo $(srcdir)/malloc.c; else echo malloc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > malloc_.c || rm -f malloc_.c
memchr_.c: memchr.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/memchr.c; then echo $(srcdir)/memchr.c; else echo memchr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > memchr_.c || rm -f memchr_.c
memrchr_.c: memrchr.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/memrchr.c; then echo $(srcdir)/memrchr.c; else echo memrchr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > memrchr_.c || rm -f memrchr_.c
obstack_.c: obstack.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/obstack.c; then echo $(srcdir)/obstack.c; else echo obstack.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > obstack_.c || rm -f obstack_.c
quote_.c: quote.c $(ANSI2KNR)
@@ -248,46 +262,47 @@ realloc_.c: realloc.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/realloc.c; then echo $(srcdir)/realloc.c; else echo realloc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > realloc_.c || rm -f realloc_.c
stpcpy_.c: stpcpy.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/stpcpy.c; then echo $(srcdir)/stpcpy.c; else echo stpcpy.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > stpcpy_.c || rm -f stpcpy_.c
strndup_.c: strndup.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strndup.c; then echo $(srcdir)/strndup.c; else echo strndup.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strndup_.c || rm -f strndup_.c
strnlen_.c: strnlen.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strnlen.c; then echo $(srcdir)/strnlen.c; else echo strnlen.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strnlen_.c || rm -f strnlen_.c
strchr_.c: strchr.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strchr.c; then echo $(srcdir)/strchr.c; else echo strchr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strchr_.c || rm -f strchr_.c
strspn_.c: strspn.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strspn.c; then echo $(srcdir)/strspn.c; else echo strspn.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strspn_.c || rm -f strspn_.c
xmalloc_.c: xmalloc.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xmalloc.c; then echo $(srcdir)/xmalloc.c; else echo xmalloc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xmalloc_.c || rm -f xmalloc_.c
xstrdup_.c: xstrdup.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xstrdup.c; then echo $(srcdir)/xstrdup.c; else echo xstrdup.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xstrdup_.c || rm -f xstrdup_.c
alloca_.$(OBJEXT) error_.$(OBJEXT) getopt_.$(OBJEXT) getopt1_.$(OBJEXT) \
malloc_.$(OBJEXT) memchr_.$(OBJEXT) obstack_.$(OBJEXT) quote_.$(OBJEXT) \
quotearg_.$(OBJEXT) realloc_.$(OBJEXT) stpcpy_.$(OBJEXT) \
strndup_.$(OBJEXT) strnlen_.$(OBJEXT) strspn_.$(OBJEXT) \
xmalloc_.$(OBJEXT) xstrdup_.$(OBJEXT) : $(ANSI2KNR)
xstrndup_.c: xstrndup.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xstrndup.c; then echo $(srcdir)/xstrndup.c; else echo xstrndup.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xstrndup_.c || rm -f xstrndup_.c
alloca_.$(OBJEXT) basename_.$(OBJEXT) dirname_.$(OBJEXT) \
error_.$(OBJEXT) getopt_.$(OBJEXT) getopt1_.$(OBJEXT) malloc_.$(OBJEXT) \
memchr_.$(OBJEXT) memrchr_.$(OBJEXT) obstack_.$(OBJEXT) \
quote_.$(OBJEXT) quotearg_.$(OBJEXT) realloc_.$(OBJEXT) \
stpcpy_.$(OBJEXT) strchr_.$(OBJEXT) strspn_.$(OBJEXT) \
xmalloc_.$(OBJEXT) xstrdup_.$(OBJEXT) xstrndup_.$(OBJEXT) : $(ANSI2KNR)
uninstall-info-am:
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique $(LISP)
mkid -fID $$unique
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| etags $(ETAGS_ARGS) $$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
@@ -296,7 +311,6 @@ GTAGS:
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
@@ -304,7 +318,7 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
@@ -335,6 +349,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
+71
View File
@@ -0,0 +1,71 @@
/* basename.c -- return the last element in a path
Copyright (C) 1990, 1998, 1999, 2000, 2001 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, 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. */
#if HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdio.h>
#include <assert.h>
#ifndef FILESYSTEM_PREFIX_LEN
# define FILESYSTEM_PREFIX_LEN(Filename) 0
#endif
#ifndef PARAMS
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
#endif
#ifndef ISSLASH
# define ISSLASH(C) ((C) == '/')
#endif
char *base_name PARAMS ((char const *name));
/* In general, we can't use the builtin `basename' function if available,
since it has different meanings in different environments.
In some environments the builtin `basename' modifies its argument.
If NAME is all slashes, be sure to return `/'. */
char *
base_name (char const *name)
{
char const *base = name += FILESYSTEM_PREFIX_LEN (name);
int all_slashes = 1;
char const *p;
for (p = name; *p; p++)
{
if (ISSLASH (*p))
base = p + 1;
else
all_slashes = 0;
}
/* If NAME is all slashes, arrange to return `/'. */
if (*base == '\0' && ISSLASH (*name) && all_slashes)
--base;
/* Make sure the last byte is not a slash. */
assert (all_slashes || !ISSLASH (*(p - 1)));
return (char *) base;
}
+189
View File
@@ -0,0 +1,189 @@
/* dirname.c -- return all but the last element in a path
Copyright (C) 1990, 1998, 2000 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, 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. */
#if HAVE_CONFIG_H
# include <config.h>
#endif
#ifdef STDC_HEADERS
# include <stdlib.h>
#else
char *malloc ();
#endif
#if defined STDC_HEADERS || defined HAVE_STRING_H
# include <string.h>
#else
# include <strings.h>
# ifndef strrchr
# define strrchr rindex
# endif
#endif
#include <assert.h>
#ifndef HAVE_DECL_MEMRCHR
"this configure-time declaration test was not run"
#endif
#if !HAVE_DECL_MEMRCHR
void *memrchr ();
#endif
#include "dirname.h"
#ifndef FILESYSTEM_PREFIX_LEN
# define FILESYSTEM_PREFIX_LEN(Filename) 0
#endif
#ifndef ISSLASH
# define ISSLASH(C) ((C) == '/')
#endif
#define BACKSLASH_IS_PATH_SEPARATOR ISSLASH ('\\')
/* Return the length of `dirname (PATH)' and set *RESULT to point
to PATH or to `"."', as appropriate. Works properly even if
there are trailing slashes (by effectively ignoring them).
WARNING: This function doesn't work for cwd-relative names like
`a:foo' that are specified with a drive-letter prefix. That case
is handled in the caller. */
static size_t
dir_name_r (char const *path, char const **result)
{
char const *slash;
size_t length; /* Length of result, not including NUL. */
slash = strrchr (path, '/');
if (BACKSLASH_IS_PATH_SEPARATOR)
{
char const *b = strrchr (path, '\\');
if (b && slash < b)
slash = b;
}
/* If the last byte of PATH is a slash, decrement SLASH until it's
pointing at the leftmost in a sequence of trailing slashes. */
if (slash && slash[1] == 0)
{
while (path < slash && ISSLASH (slash[-1]))
{
--slash;
}
if (path < slash)
{
size_t len = slash - path;
slash = memrchr (path, '/', len);
if (BACKSLASH_IS_PATH_SEPARATOR)
{
char const *b = memrchr (path, '\\', len);
if (b && slash < b)
slash = b;
}
}
}
if (slash == 0)
{
/* File is in the current directory. */
length = FILESYSTEM_PREFIX_LEN (path);
if (length == 0)
{
path = ".";
length = 1;
}
}
else
{
/* Remove any trailing slashes from the result. If we have a
canonicalized "d:/path", leave alone the root case "d:/". */
char const *lim = path + FILESYSTEM_PREFIX_LEN (path);
while (lim < slash && ISSLASH (*slash))
--slash;
length = slash - path + 1;
}
*result = path;
return length;
}
/* Return the leading directories part of PATH,
allocated with malloc. If out of memory, return 0.
Works properly even if there are trailing slashes
(by effectively ignoring them). */
char *
dir_name (char const *path)
{
char const *result;
size_t length = dir_name_r (path, &result);
int append_dot = (length && length == FILESYSTEM_PREFIX_LEN (newpath));
char *newpath = (char *) malloc (length + append_dot + 1);
if (newpath == 0)
return 0;
strncpy (newpath, result, length);
/* If PATH is "d:foo", return "d:.", the CWD on drive d: */
if (append_dot)
newpath[length++] = '.';
newpath[length] = 0;
return newpath;
}
#ifdef TEST_DIRNAME
/*
Run the test like this (expect no output):
gcc -DHAVE_CONFIG_H -DTEST_DIRNAME -I.. -O -Wall memrchr.c dirname.c
sed -n '/^BEGIN-DATA$/,/^END-DATA$/p' dirname.c|grep -v DATA|./a.out
BEGIN-DATA
foo//// .
bar/foo//// bar
foo/ .
/ /
. .
a .
END-DATA
*/
# define MAX_BUFF_LEN 1024
# include <stdio.h>
# include <stdlib.h>
int
main ()
{
char buff[MAX_BUFF_LEN + 1];
buff[MAX_BUFF_LEN] = 0;
while (fgets (buff, MAX_BUFF_LEN, stdin) && buff[0])
{
char path[MAX_BUFF_LEN];
char expected_result[MAX_BUFF_LEN];
char const *result;
sscanf (buff, "%s %s", path, expected_result);
result = dir_name (path);
if (strcmp (result, expected_result))
printf ("%s: got %s, expected %s\n", path, result, expected_result);
}
exit (0);
}
#endif
+31
View File
@@ -0,0 +1,31 @@
/* Copyright (C) 1998 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, 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. */
#ifndef DIRNAME_H_
# define DIRNAME_H_ 1
# ifndef PARAMS
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
# endif
char *
dir_name PARAMS ((const char *path));
#endif /* not DIRNAME_H_ */
+209
View File
@@ -0,0 +1,209 @@
/* memrchr -- find the last occurrence of a byte in a memory block
Copyright (C) 1991, 93, 96, 97, 99, 2000 Free Software Foundation, Inc.
Based on strlen implementation by Torbjorn Granlund ([email protected]),
with help from Dan Sahlin ([email protected]) and
commentary by Jim Blandy ([email protected]);
adaptation to memchr suggested by Dick Karpinski ([email protected]),
and implemented by Roland McGrath ([email protected]).
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdlib.h>
#undef __ptr_t
#if defined (__cplusplus) || (defined (__STDC__) && __STDC__)
# define __ptr_t void *
#else /* Not C++ or ANSI C. */
# define __ptr_t char *
#endif /* C++ or ANSI C. */
#if defined (_LIBC)
# include <string.h>
# include <memcopy.h>
#else
# define reg_char char
#endif
#if defined (HAVE_LIMITS_H) || defined (_LIBC)
# include <limits.h>
#endif
#define LONG_MAX_32_BITS 2147483647
#ifndef LONG_MAX
# define LONG_MAX LONG_MAX_32_BITS
#endif
#include <sys/types.h>
#undef __memrchr
#undef memrchr
#ifndef weak_alias
# define __memrchr memrchr
#endif
/* Search no more than N bytes of S for C. */
__ptr_t
__memrchr (s, c_in, n)
const __ptr_t s;
int c_in;
size_t n;
{
const unsigned char *char_ptr;
const unsigned long int *longword_ptr;
unsigned long int longword, magic_bits, charmask;
unsigned reg_char c;
c = (unsigned char) c_in;
/* Handle the last few characters by reading one character at a time.
Do this until CHAR_PTR is aligned on a longword boundary. */
for (char_ptr = (const unsigned char *) s + n;
n > 0 && ((unsigned long int) char_ptr
& (sizeof (longword) - 1)) != 0;
--n)
if (*--char_ptr == c)
return (__ptr_t) char_ptr;
/* All these elucidatory comments refer to 4-byte longwords,
but the theory applies equally well to 8-byte longwords. */
longword_ptr = (unsigned long int *) char_ptr;
/* Bits 31, 24, 16, and 8 of this number are zero. Call these bits
the "holes." Note that there is a hole just to the left of
each byte, with an extra at the end:
bits: 01111110 11111110 11111110 11111111
bytes: AAAAAAAA BBBBBBBB CCCCCCCC DDDDDDDD
The 1-bits make sure that carries propagate to the next 0-bit.
The 0-bits provide holes for carries to fall into. */
if (sizeof (longword) != 4 && sizeof (longword) != 8)
abort ();
#if LONG_MAX <= LONG_MAX_32_BITS
magic_bits = 0x7efefeff;
#else
magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff;
#endif
/* Set up a longword, each of whose bytes is C. */
charmask = c | (c << 8);
charmask |= charmask << 16;
#if LONG_MAX > LONG_MAX_32_BITS
charmask |= charmask << 32;
#endif
/* Instead of the traditional loop which tests each character,
we will test a longword at a time. The tricky part is testing
if *any of the four* bytes in the longword in question are zero. */
while (n >= sizeof (longword))
{
/* We tentatively exit the loop if adding MAGIC_BITS to
LONGWORD fails to change any of the hole bits of LONGWORD.
1) Is this safe? Will it catch all the zero bytes?
Suppose there is a byte with all zeros. Any carry bits
propagating from its left will fall into the hole at its
least significant bit and stop. Since there will be no
carry from its most significant bit, the LSB of the
byte to the left will be unchanged, and the zero will be
detected.
2) Is this worthwhile? Will it ignore everything except
zero bytes? Suppose every byte of LONGWORD has a bit set
somewhere. There will be a carry into bit 8. If bit 8
is set, this will carry into bit 16. If bit 8 is clear,
one of bits 9-15 must be set, so there will be a carry
into bit 16. Similarly, there will be a carry into bit
24. If one of bits 24-30 is set, there will be a carry
into bit 31, so all of the hole bits will be changed.
The one misfire occurs when bits 24-30 are clear and bit
31 is set; in this case, the hole at bit 31 is not
changed. If we had access to the processor carry flag,
we could close this loophole by putting the fourth hole
at bit 32!
So it ignores everything except 128's, when they're aligned
properly.
3) But wait! Aren't we looking for C, not zero?
Good point. So what we do is XOR LONGWORD with a longword,
each of whose bytes is C. This turns each byte that is C
into a zero. */
longword = *--longword_ptr ^ charmask;
/* Add MAGIC_BITS to LONGWORD. */
if ((((longword + magic_bits)
/* Set those bits that were unchanged by the addition. */
^ ~longword)
/* Look at only the hole bits. If any of the hole bits
are unchanged, most likely one of the bytes was a
zero. */
& ~magic_bits) != 0)
{
/* Which of the bytes was C? If none of them were, it was
a misfire; continue the search. */
const unsigned char *cp = (const unsigned char *) longword_ptr;
#if LONG_MAX > 2147483647
if (cp[7] == c)
return (__ptr_t) &cp[7];
if (cp[6] == c)
return (__ptr_t) &cp[6];
if (cp[5] == c)
return (__ptr_t) &cp[5];
if (cp[4] == c)
return (__ptr_t) &cp[4];
#endif
if (cp[3] == c)
return (__ptr_t) &cp[3];
if (cp[2] == c)
return (__ptr_t) &cp[2];
if (cp[1] == c)
return (__ptr_t) &cp[1];
if (cp[0] == c)
return (__ptr_t) cp;
}
n -= sizeof (longword);
}
char_ptr = (const unsigned char *) longword_ptr;
while (n-- > 0)
{
if (*--char_ptr == c)
return (__ptr_t) char_ptr;
}
return 0;
}
#ifdef weak_alias
weak_alias (__memrchr, memrchr)
#endif
+19 -2
View File
@@ -1,3 +1,20 @@
/* quote.c - quote arguments for output
Copyright (C) 1998, 1999, 2000, 2001 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, 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. */
/* Written by Paul Eggert <[email protected]> */
#if HAVE_CONFIG_H
@@ -8,8 +25,8 @@
# include <stddef.h> /* For the definition of size_t on windows w/MSVC. */
#endif
#include <sys/types.h>
#include <quotearg.h>
#include <quote.h>
#include "quotearg.h"
#include "quote.h"
/* Return an unambiguous printable representated, allocated in slot N,
for NAME, suitable for diagnostics. */
+17 -1
View File
@@ -1,4 +1,20 @@
/* prototypes for quote.c */
/* quote.h - prototypes for quote.c
Copyright (C) 1998, 1999, 2000, 2001 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, 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. */
#ifndef PARAMS
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
+2 -2
View File
@@ -25,8 +25,8 @@
# include <stddef.h> /* For the definition of size_t on windows w/MSVC. */
#endif
#include <sys/types.h>
#include <quotearg.h>
#include <xalloc.h>
#include "quotearg.h"
#include "xalloc.h"
#include <ctype.h>
+32
View File
@@ -0,0 +1,32 @@
/* Copyright (C) 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this program; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place -
Suite 330, Boston, MA 02111-1307, USA. */
#if HAVE_CONFIG_H
# include <config.h>
#endif
#if HAVE_STRING_H
# include <string.h>
#else
# include <strings.h>
#endif
char *
strchr (const char *s, int c)
{
return index (s, c);
}
+12 -23
View File
@@ -1,7 +1,4 @@
/* Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
/* Copyright (C) 2001 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
@@ -17,20 +14,20 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
# include "config.h"
#if HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdio.h>
#include <sys/types.h>
#if defined _LIBC || defined STDC_HEADERS
# include <stdlib.h>
#if STDC_HEADERS || HAVE_STRING_H
# include <string.h>
#else
char *malloc ();
# include <strings.h>
#endif
#include <sys/types.h>
#include "xalloc.h"
#ifndef HAVE_DECL_STRNLEN
"this configure-time declaration test was not run"
#endif
@@ -38,18 +35,13 @@ char *malloc ();
size_t strnlen ();
#endif
#undef __strndup
#undef strndup
#ifndef weak_alias
# define __strndup strndup
#endif
char *xstrndup (const char *s, size_t n);
char *
__strndup (const char *s, size_t n)
xstrndup (const char *s, size_t n)
{
size_t len = strnlen (s, n);
char *new = malloc (len + 1);
char *new = xmalloc (len + 1);
if (new == NULL)
return NULL;
@@ -57,6 +49,3 @@ __strndup (const char *s, size_t n)
new[len] = '\0';
return (char *) memcpy (new, s, len);
}
#ifdef weak_alias
weak_alias (__strndup, strndup)
#endif
+5 -5
View File
@@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.5a from Makefile.am.
# Makefile.in generated by automake 1.5c from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
@@ -13,7 +13,6 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
@@ -48,6 +47,7 @@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
install_sh_DATA = $(install_sh) -c -m 644
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
@@ -97,10 +97,10 @@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@
WERROR_CFLAGS = @WERROR_CFLAGS@
am__include = @am__include@
am__quote = @am__quote@
install_sh = @install_sh@
EXTRA_DIST = \
c-bs-a.m4 \
codeset.m4 \
@@ -138,7 +138,6 @@ uninstall-info-am:
tags: TAGS
TAGS:
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
@@ -146,7 +145,7 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
@@ -177,6 +176,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
+12 -12
View File
@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: bison 1.25\n"
"POT-Creation-Date: 2001-12-18 10:35+0100\n"
"POT-Creation-Date: 2002-01-11 14:38+0100\n"
"PO-Revision-Date: 1996-10-10 17:54 MET DST\n"
"Last-Translator: Ulrich Drepper <[email protected]>\n"
"Language-Team: German <[email protected]>\n"
@@ -91,18 +91,18 @@ msgstr " %d Reduziere/Reduziere"
msgid "%s contains "
msgstr "%s enthält "
#: src/conflicts.c:405
#: src/conflicts.c:412
#, fuzzy, c-format
msgid "expected %d shift/reduce conflict\n"
msgid_plural "expected %d shift/reduce conflicts\n"
msgstr[0] " %d Schiebe/Reduziere Konflikte"
#: src/conflicts.c:457 src/conflicts.c:534
#: src/conflicts.c:463 src/conflicts.c:540
#, c-format
msgid " %-4s\t[reduce using rule %d (%s)]\n"
msgstr " %-4s\t[reduziere mit Regel %d (%s)]\n"
#: src/conflicts.c:461 src/print.c:154
#: src/conflicts.c:467 src/print.c:154
#, c-format
msgid ""
" $default\treduce using rule %d (%s)\n"
@@ -111,22 +111,22 @@ msgstr ""
" $default\treduziere mit Regel %d (%s)\n"
"\n"
#: src/conflicts.c:515 src/conflicts.c:528
#: src/conflicts.c:521 src/conflicts.c:534
#, c-format
msgid " %-4s\treduce using rule %d (%s)\n"
msgstr " %-4s\treduziere mit Tegel %d (%s)\n"
#: src/conflicts.c:544
#: src/conflicts.c:550
#, c-format
msgid " $default\treduce using rule %d (%s)\n"
msgstr " $default\treduziere mit Regel %d (%s)\n"
#: src/files.c:144
#: src/files.c:150
#, c-format
msgid "cannot open file `%s'"
msgstr ""
#: src/files.c:163
#: src/files.c:169
msgid "cannot close file"
msgstr ""
@@ -200,22 +200,22 @@ msgid ""
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
msgstr ""
#: src/getargs.c:215 src/lex.c:694
#: src/getargs.c:223 src/lex.c:694
#, c-format
msgid "`%s' is no longer supported"
msgstr ""
#: src/getargs.c:239
#: src/getargs.c:247
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr ""
#: src/getargs.c:246
#: src/getargs.c:254
#, c-format
msgid "%s: no grammar file given\n"
msgstr "%s: keine Grammatik-Datei angegeben\n"
#: src/getargs.c:250
#: src/getargs.c:258
#, fuzzy, c-format
msgid "%s: extra arguments ignored after `%s'\n"
msgstr "%s: zusätzliche Argumente nach »%s« werden ignoriert\n"
+12 -12
View File
@@ -30,7 +30,7 @@
msgid ""
msgstr ""
"Project-Id-Version: GNU bison 1.25\n"
"POT-Creation-Date: 2001-12-18 10:35+0100\n"
"POT-Creation-Date: 2002-01-11 14:38+0100\n"
"PO-Revision-Date: 1998-09-21 10:19+0200\n"
"Last-Translator: Nicolás García-Pedrajas <[email protected]>\n"
"Language-Team: Spanish <[email protected]>\n"
@@ -149,18 +149,18 @@ msgstr " %d reducci
msgid "%s contains "
msgstr "%s contiene "
#: src/conflicts.c:405
#: src/conflicts.c:412
#, fuzzy, c-format
msgid "expected %d shift/reduce conflict\n"
msgid_plural "expected %d shift/reduce conflicts\n"
msgstr[0] " %d conflictos desplazamiento/reducción"
#: src/conflicts.c:457 src/conflicts.c:534
#: src/conflicts.c:463 src/conflicts.c:540
#, c-format
msgid " %-4s\t[reduce using rule %d (%s)]\n"
msgstr " %-4s\t[reduce usando la regla %d (%s)]\n"
#: src/conflicts.c:461 src/print.c:154
#: src/conflicts.c:467 src/print.c:154
#, c-format
msgid ""
" $default\treduce using rule %d (%s)\n"
@@ -169,22 +169,22 @@ msgstr ""
" $default\treduce usando la regla %d (%s)\n"
"\n"
#: src/conflicts.c:515 src/conflicts.c:528
#: src/conflicts.c:521 src/conflicts.c:534
#, c-format
msgid " %-4s\treduce using rule %d (%s)\n"
msgstr " %-4s\treduce usando la regla %d (%s)\n"
#: src/conflicts.c:544
#: src/conflicts.c:550
#, c-format
msgid " $default\treduce using rule %d (%s)\n"
msgstr " $default\treduce usando la regla %d (%s)\n"
#: src/files.c:144
#: src/files.c:150
#, c-format
msgid "cannot open file `%s'"
msgstr ""
#: src/files.c:163
#: src/files.c:169
msgid "cannot close file"
msgstr ""
@@ -258,25 +258,25 @@ msgid ""
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
msgstr ""
#: src/getargs.c:215 src/lex.c:694
#: src/getargs.c:223 src/lex.c:694
#, c-format
msgid "`%s' is no longer supported"
msgstr ""
#: src/getargs.c:239
#: src/getargs.c:247
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr ""
# Me parece menos "computadora" decir "ningún fichero de gramática" - cll
#
#: src/getargs.c:246
#: src/getargs.c:254
#, c-format
msgid "%s: no grammar file given\n"
msgstr "%s: no se ha especificado ningún fichero de gramática\n"
# Ignorar es no saber, to ignore es no hacer caso, que no es lo mismo. sv
#: src/getargs.c:250
#: src/getargs.c:258
#, fuzzy, c-format
msgid "%s: extra arguments ignored after `%s'\n"
msgstr "%s: los argumentos extra después de '%s' no se tendrán en cuenta\n"
+12 -12
View File
@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: bison 1.30f\n"
"POT-Creation-Date: 2001-12-18 10:35+0100\n"
"POT-Creation-Date: 2002-01-11 14:38+0100\n"
"PO-Revision-Date: 2001-12-05 20:35+0200\n"
"Last-Translator: Toomas Soome <[email protected]>\n"
"Language-Team: Estonian <[email protected]>\n"
@@ -91,19 +91,19 @@ msgstr " %d redutseerimine/redutseerimine"
msgid "%s contains "
msgstr "%s sisaldab "
#: src/conflicts.c:405
#: src/conflicts.c:412
#, c-format
msgid "expected %d shift/reduce conflict\n"
msgid_plural "expected %d shift/reduce conflicts\n"
msgstr[0] "eeldasime %d nihutamine/redutseerimine konflikti\n"
msgstr[1] "eeldasime %d nihutamine/redutseerimine konflikti\n"
#: src/conflicts.c:457 src/conflicts.c:534
#: src/conflicts.c:463 src/conflicts.c:540
#, c-format
msgid " %-4s\t[reduce using rule %d (%s)]\n"
msgstr " %-4s\t[redutseerin, kasutades reeglit %d (%s)]\n"
#: src/conflicts.c:461 src/print.c:154
#: src/conflicts.c:467 src/print.c:154
#, c-format
msgid ""
" $default\treduce using rule %d (%s)\n"
@@ -112,22 +112,22 @@ msgstr ""
" $default\tredutseerin kasutades reeglit %d (%s)\n"
"\n"
#: src/conflicts.c:515 src/conflicts.c:528
#: src/conflicts.c:521 src/conflicts.c:534
#, c-format
msgid " %-4s\treduce using rule %d (%s)\n"
msgstr " %-4s\tredutseerin kasutades reeglit %d (%s)\n"
#: src/conflicts.c:544
#: src/conflicts.c:550
#, c-format
msgid " $default\treduce using rule %d (%s)\n"
msgstr " $default\tredutseerin kasutades reeglit %d (%s)\n"
#: src/files.c:144
#: src/files.c:150
#, c-format
msgid "cannot open file `%s'"
msgstr "faili `%s' ei saa avada"
#: src/files.c:163
#: src/files.c:169
msgid "cannot close file"
msgstr "faili ei õnnestu sulgeda"
@@ -225,22 +225,22 @@ msgstr ""
"See on vaba tarkvara; kopeerimistingimused leiate lähtetekstidest. Garantii\n"
"PUUDUB; ka müügiks või mingil eesmärgil kasutamiseks.\n"
#: src/getargs.c:215 src/lex.c:694
#: src/getargs.c:223 src/lex.c:694
#, c-format
msgid "`%s' is no longer supported"
msgstr "`%s' ei ole enam toetatud"
#: src/getargs.c:239
#: src/getargs.c:247
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "Lisainfo saamiseks proovige `%s --help'.\n"
#: src/getargs.c:246
#: src/getargs.c:254
#, c-format
msgid "%s: no grammar file given\n"
msgstr "%s: puudub grammatikafail\n"
#: src/getargs.c:250
#: src/getargs.c:258
#, c-format
msgid "%s: extra arguments ignored after `%s'\n"
msgstr "%s: ignoreerin lisaargumente peale `%s'\n"
+12 -12
View File
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: GNU bison 1.30f\n"
"POT-Creation-Date: 2001-12-18 10:35+0100\n"
"POT-Creation-Date: 2002-01-11 14:38+0100\n"
"PO-Revision-Date: 2001-12-05 13:00-0500\n"
"Last-Translator: Michel Robitaille <[email protected]>\n"
"Language-Team: French <[email protected]>\n"
@@ -91,18 +91,18 @@ msgstr " %d r
msgid "%s contains "
msgstr "%s contient "
#: src/conflicts.c:405
#: src/conflicts.c:412
#, c-format
msgid "expected %d shift/reduce conflict\n"
msgid_plural "expected %d shift/reduce conflicts\n"
msgstr[0] "attendu %d conflits décalage/réduction\n"
#: src/conflicts.c:457 src/conflicts.c:534
#: src/conflicts.c:463 src/conflicts.c:540
#, c-format
msgid " %-4s\t[reduce using rule %d (%s)]\n"
msgstr " %-4s\t[réduction par la règle %d (%s)\n"
#: src/conflicts.c:461 src/print.c:154
#: src/conflicts.c:467 src/print.c:154
#, c-format
msgid ""
" $default\treduce using rule %d (%s)\n"
@@ -111,22 +111,22 @@ msgstr ""
" $défaut\tréduction par la règle %d (%s)\n"
"\n"
#: src/conflicts.c:515 src/conflicts.c:528
#: src/conflicts.c:521 src/conflicts.c:534
#, c-format
msgid " %-4s\treduce using rule %d (%s)\n"
msgstr " %-4s\tréduction par la règle %d (%s)\n"
#: src/conflicts.c:544
#: src/conflicts.c:550
#, c-format
msgid " $default\treduce using rule %d (%s)\n"
msgstr " $défaut\tréduction par la règle %d (%s)\n"
#: src/files.c:144
#: src/files.c:150
#, c-format
msgid "cannot open file `%s'"
msgstr "ne peut ouvrir le fichier `%s'"
#: src/files.c:163
#: src/files.c:169
msgid "cannot close file"
msgstr "ne peut fermer le fichier"
@@ -228,22 +228,22 @@ msgstr ""
"reproduction. AUCUNE garantie n'est donnée; tant pour des raisons\n"
"COMMERCIALES que pour RÉPONDRE À UN BESOIN PARTICULIER.\n"
#: src/getargs.c:215 src/lex.c:694
#: src/getargs.c:223 src/lex.c:694
#, c-format
msgid "`%s' is no longer supported"
msgstr "`%s' n'est plus supporté"
#: src/getargs.c:239
#: src/getargs.c:247
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "Pour en savoir davantage, faites: `%s --help'.\n"
#: src/getargs.c:246
#: src/getargs.c:254
#, c-format
msgid "%s: no grammar file given\n"
msgstr "%s: grammaire manquante\n"
#: src/getargs.c:250
#: src/getargs.c:258
#, c-format
msgid "%s: extra arguments ignored after `%s'\n"
msgstr "%s: arguments supplémentaires ignorés après `%s'\n"
+12 -12
View File
@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: GNU bison 1.30f\n"
"POT-Creation-Date: 2001-12-18 10:35+0100\n"
"POT-Creation-Date: 2002-01-11 14:38+0100\n"
"PO-Revision-Date: 2001-12-10 15:59+0900\n"
"Last-Translator: Daisuke Yamashita <[email protected]>\n"
"Language-Team: Japanese <[email protected]>\n"
@@ -89,18 +89,18 @@ msgstr " %d
msgid "%s contains "
msgstr "%s の中身は"
#: src/conflicts.c:405
#: src/conflicts.c:412
#, c-format
msgid "expected %d shift/reduce conflict\n"
msgid_plural "expected %d shift/reduce conflicts\n"
msgstr[0] "本来 %d 個のシフト/還元衝突であるはずです\n"
#: src/conflicts.c:457 src/conflicts.c:534
#: src/conflicts.c:463 src/conflicts.c:540
#, c-format
msgid " %-4s\t[reduce using rule %d (%s)]\n"
msgstr " %-4s\t[規則 %d を利用して還元 (%s)]\n"
#: src/conflicts.c:461 src/print.c:154
#: src/conflicts.c:467 src/print.c:154
#, c-format
msgid ""
" $default\treduce using rule %d (%s)\n"
@@ -109,22 +109,22 @@ msgstr ""
" $default\t規則 %d を利用して還元 (%s)\n"
"\n"
#: src/conflicts.c:515 src/conflicts.c:528
#: src/conflicts.c:521 src/conflicts.c:534
#, c-format
msgid " %-4s\treduce using rule %d (%s)\n"
msgstr " %-4s\t規則 %d を利用して還元 (%s)\n"
#: src/conflicts.c:544
#: src/conflicts.c:550
#, c-format
msgid " $default\treduce using rule %d (%s)\n"
msgstr " $default\t規則 %d を利用して還元 (%s)\n"
#: src/files.c:144
#: src/files.c:150
#, c-format
msgid "cannot open file `%s'"
msgstr "ファイル `%s' を開けません"
#: src/files.c:163
#: src/files.c:169
msgid "cannot close file"
msgstr "ファイルを閉じることができません"
@@ -224,22 +224,22 @@ msgstr ""
"これはフリーソフトウェアです -- 複製についての条件はソースを見ましょう。\n"
"一切の保証はありません -- 商業性や目的適合性についての保証すらありません。\n"
#: src/getargs.c:215 src/lex.c:694
#: src/getargs.c:223 src/lex.c:694
#, c-format
msgid "`%s' is no longer supported"
msgstr "`%s' は最早サポートされません"
#: src/getargs.c:239
#: src/getargs.c:247
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "`%s --help' で詳細情報を参照してください\n"
#: src/getargs.c:246
#: src/getargs.c:254
#, c-format
msgid "%s: no grammar file given\n"
msgstr "%s: 文法ファイルが指定されていません\n"
#: src/getargs.c:250
#: src/getargs.c:258
#, c-format
msgid "%s: extra arguments ignored after `%s'\n"
msgstr "%s: `%s' の後ろの余分な引数は無視されました\n"
+12 -12
View File
@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: bison 1.25\n"
"POT-Creation-Date: 2001-12-18 10:35+0100\n"
"POT-Creation-Date: 2002-01-11 14:38+0100\n"
"PO-Revision-Date: 1996-08-27 15:34 MET DST\n"
"Last-Translator: Erick Branderhorst <[email protected]>\n"
"Language-Team: Dutch <[email protected]>\n"
@@ -91,18 +91,18 @@ msgstr " %d reduceer/reduceer"
msgid "%s contains "
msgstr "%s bevat"
#: src/conflicts.c:405
#: src/conflicts.c:412
#, fuzzy, c-format
msgid "expected %d shift/reduce conflict\n"
msgid_plural "expected %d shift/reduce conflicts\n"
msgstr[0] " %d verschuif/reduceer conflicten"
#: src/conflicts.c:457 src/conflicts.c:534
#: src/conflicts.c:463 src/conflicts.c:540
#, c-format
msgid " %-4s\t[reduce using rule %d (%s)]\n"
msgstr " %-4s\t[reduceer gebruikt regel %d (%s)]\n"
#: src/conflicts.c:461 src/print.c:154
#: src/conflicts.c:467 src/print.c:154
#, c-format
msgid ""
" $default\treduce using rule %d (%s)\n"
@@ -111,22 +111,22 @@ msgstr ""
" $default\treduce using rule %d (%s)\n"
"\n"
#: src/conflicts.c:515 src/conflicts.c:528
#: src/conflicts.c:521 src/conflicts.c:534
#, c-format
msgid " %-4s\treduce using rule %d (%s)\n"
msgstr ""
#: src/conflicts.c:544
#: src/conflicts.c:550
#, c-format
msgid " $default\treduce using rule %d (%s)\n"
msgstr ""
#: src/files.c:144
#: src/files.c:150
#, c-format
msgid "cannot open file `%s'"
msgstr ""
#: src/files.c:163
#: src/files.c:169
msgid "cannot close file"
msgstr ""
@@ -200,22 +200,22 @@ msgid ""
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
msgstr ""
#: src/getargs.c:215 src/lex.c:694
#: src/getargs.c:223 src/lex.c:694
#, c-format
msgid "`%s' is no longer supported"
msgstr ""
#: src/getargs.c:239
#: src/getargs.c:247
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr ""
#: src/getargs.c:246
#: src/getargs.c:254
#, c-format
msgid "%s: no grammar file given\n"
msgstr "%s: geen grammatica bestand gegeven\n"
#: src/getargs.c:250
#: src/getargs.c:258
#, fuzzy, c-format
msgid "%s: extra arguments ignored after `%s'\n"
msgstr "%s: extra argumenten genegeerd na '%s'\n"
+12 -12
View File
@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: bison 1.29\n"
"POT-Creation-Date: 2001-12-18 10:35+0100\n"
"POT-Creation-Date: 2002-01-11 14:38+0100\n"
"PO-Revision-Date: 2001-09-09 13:49+04:00\n"
"Last-Translator: Dmitry S. Sivachenko <[email protected]>\n"
"Language-Team: Russian <[email protected]>\n"
@@ -91,18 +91,18 @@ msgstr " %d
msgid "%s contains "
msgstr "%s ÓÏÄÅÒÖÉÔ "
#: src/conflicts.c:405
#: src/conflicts.c:412
#, fuzzy, c-format
msgid "expected %d shift/reduce conflict\n"
msgid_plural "expected %d shift/reduce conflicts\n"
msgstr[0] " %d ËÏÎÆÌÉËÔÏ× ÓÄ×ÉÇÁ/×Ù×ÏÄÁ"
#: src/conflicts.c:457 src/conflicts.c:534
#: src/conflicts.c:463 src/conflicts.c:540
#, c-format
msgid " %-4s\t[reduce using rule %d (%s)]\n"
msgstr " %-4s\t[×Ù×ÏÄ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ ÐÒÁ×ÉÌÁ %d (%s)]\n"
#: src/conflicts.c:461 src/print.c:154
#: src/conflicts.c:467 src/print.c:154
#, c-format
msgid ""
" $default\treduce using rule %d (%s)\n"
@@ -111,22 +111,22 @@ msgstr ""
" $default\t×Ù×ÏÄ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ ÐÒÁ×ÉÌÁ %d (%s)\n"
"\n"
#: src/conflicts.c:515 src/conflicts.c:528
#: src/conflicts.c:521 src/conflicts.c:534
#, c-format
msgid " %-4s\treduce using rule %d (%s)\n"
msgstr " %-4s\t×Ù×ÏÄ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ ÐÒÁ×ÉÌÁ %d (%s)\n"
#: src/conflicts.c:544
#: src/conflicts.c:550
#, c-format
msgid " $default\treduce using rule %d (%s)\n"
msgstr " $default\t×Ù×ÏÄ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ ÐÒÁ×ÉÌÁ %d (%s)\n"
#: src/files.c:144
#: src/files.c:150
#, c-format
msgid "cannot open file `%s'"
msgstr "ÎÅ ÕÄÁÅÔÓÑ ÏÔËÒÙÔØ ÆÁÊÌ `%s'"
#: src/files.c:163
#: src/files.c:169
msgid "cannot close file"
msgstr "ÎÅ ÕÄÁÅÔÓÑ ÚÁËÒÙÔØ ÆÁÊÌ"
@@ -229,22 +229,22 @@ msgstr ""
"ðòéçïäîïóôé\n"
"äìñ ïðòåäåìåîîïê ãåìé.\n"
#: src/getargs.c:215 src/lex.c:694
#: src/getargs.c:223 src/lex.c:694
#, c-format
msgid "`%s' is no longer supported"
msgstr "`%s' ÂÏÌØÛÅ ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔÓÑ"
#: src/getargs.c:239
#: src/getargs.c:247
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "éÓÐÏÌØÚÕÊÔÅ `%s --help' ÄÌÑ ÄÏÐÏÌÎÉÔÅÌØÎÏÊ ÉÎÆÏÒÍÁÃÉÉ.\n"
#: src/getargs.c:246
#: src/getargs.c:254
#, c-format
msgid "%s: no grammar file given\n"
msgstr "%s: ÎÅ ÚÁÄÁÎ ÆÁÊÌ Ó ÇÒÁÍÍÁÔÉËÏÊ\n"
#: src/getargs.c:250
#: src/getargs.c:258
#, c-format
msgid "%s: extra arguments ignored after `%s'\n"
msgstr "%s: ÌÉÛÎÉÅ ÁÒÇÕÍÅÎÔÙ ÐÏÓÌÅ `%s' ÉÇÎÏÒÉÒÏ×ÁÎÙ\n"
+12 -12
View File
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: bison 1.30f\n"
"POT-Creation-Date: 2001-12-18 10:35+0100\n"
"POT-Creation-Date: 2002-01-11 14:38+0100\n"
"PO-Revision-Date: 2001-12-06 22:33+0100\n"
"Last-Translator: Göran Uddeborg <[email protected]>\n"
"Language-Team: Swedish <[email protected]>\n"
@@ -94,19 +94,19 @@ msgstr " %d reducera/reducera"
msgid "%s contains "
msgstr "%s innehåller "
#: src/conflicts.c:405
#: src/conflicts.c:412
#, c-format
msgid "expected %d shift/reduce conflict\n"
msgid_plural "expected %d shift/reduce conflicts\n"
msgstr[0] "förväntade %d skifta/reducerakonflikt\n"
msgstr[1] "förväntade %d skifta/reducerakonflikter\n"
#: src/conflicts.c:457 src/conflicts.c:534
#: src/conflicts.c:463 src/conflicts.c:540
#, c-format
msgid " %-4s\t[reduce using rule %d (%s)]\n"
msgstr " %-4s\t[reducera med regel %d (%s)]\n"
#: src/conflicts.c:461 src/print.c:154
#: src/conflicts.c:467 src/print.c:154
#, c-format
msgid ""
" $default\treduce using rule %d (%s)\n"
@@ -115,22 +115,22 @@ msgstr ""
" $standard\treducera med regel %d (%s)\n"
"\n"
#: src/conflicts.c:515 src/conflicts.c:528
#: src/conflicts.c:521 src/conflicts.c:534
#, c-format
msgid " %-4s\treduce using rule %d (%s)\n"
msgstr " %-4s\treducera med regel %d (%s)\n"
#: src/conflicts.c:544
#: src/conflicts.c:550
#, c-format
msgid " $default\treduce using rule %d (%s)\n"
msgstr " $standard\treducera med regel %d (%s)\n"
#: src/files.c:144
#: src/files.c:150
#, c-format
msgid "cannot open file `%s'"
msgstr "kan inte öppna filen \"%s\""
#: src/files.c:163
#: src/files.c:169
msgid "cannot close file"
msgstr "kan inte stänga fil"
@@ -231,22 +231,22 @@ msgstr ""
"finns INGEN garanti, inte ens för SÄLJBARHET eller LÄMPLIGHET FÖR ETT\n"
"SPECIELLT ÄNDAMÅL.\n"
#: src/getargs.c:215 src/lex.c:694
#: src/getargs.c:223 src/lex.c:694
#, c-format
msgid "`%s' is no longer supported"
msgstr "\"%s\" stöds inte längre"
#: src/getargs.c:239
#: src/getargs.c:247
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "Försök med \"%s --help\" för mer information.\n"
#: src/getargs.c:246
#: src/getargs.c:254
#, c-format
msgid "%s: no grammar file given\n"
msgstr "%s: ingen grammatikfil angiven\n"
#: src/getargs.c:250
#: src/getargs.c:258
#, c-format
msgid "%s: extra arguments ignored after `%s'\n"
msgstr "%s: extra argument ignorerade efter \"%s\"\n"
+12 -12
View File
@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: bison 1.30f\n"
"POT-Creation-Date: 2001-12-18 10:35+0100\n"
"POT-Creation-Date: 2002-01-11 14:38+0100\n"
"PO-Revision-Date: 2001-12-06 12:09+300\n"
"Last-Translator: Altug Bayram <[email protected]>\n"
"Language-Team: Turkish <[email protected]>\n"
@@ -94,19 +94,19 @@ msgstr " %d indirgeme/indirgeme"
msgid "%s contains "
msgstr "%s içerir"
#: src/conflicts.c:405
#: src/conflicts.c:412
#, c-format
msgid "expected %d shift/reduce conflict\n"
msgid_plural "expected %d shift/reduce conflicts\n"
msgstr[0] "beklenen %d öteleme/indirgeme çeliþkisi\n"
msgstr[1] "beklenen %d öteleme/indirgeme çeliþkisi\n"
#: src/conflicts.c:457 src/conflicts.c:534
#: src/conflicts.c:463 src/conflicts.c:540
#, c-format
msgid " %-4s\t[reduce using rule %d (%s)]\n"
msgstr " %-4s\t[indirgeme kural %d (%s)'i kullanýyor]\n"
#: src/conflicts.c:461 src/print.c:154
#: src/conflicts.c:467 src/print.c:154
#, c-format
msgid ""
" $default\treduce using rule %d (%s)\n"
@@ -115,22 +115,22 @@ msgstr ""
" $default\tindirgeme kural %d (%s)'i kullanýyor\n"
"\n"
#: src/conflicts.c:515 src/conflicts.c:528
#: src/conflicts.c:521 src/conflicts.c:534
#, c-format
msgid " %-4s\treduce using rule %d (%s)\n"
msgstr " %-4s\tindirgeme kural %d (%s)'i kullanýyor\n"
#: src/conflicts.c:544
#: src/conflicts.c:550
#, c-format
msgid " $default\treduce using rule %d (%s)\n"
msgstr " $default\tindirgeme kural %d (%s)'i kullanýyor\n"
#: src/files.c:144
#: src/files.c:150
#, c-format
msgid "cannot open file `%s'"
msgstr "`%s' dosyasý açýlamadý"
#: src/files.c:163
#: src/files.c:169
msgid "cannot close file"
msgstr "dosya kapatýlamýyor"
@@ -233,22 +233,22 @@ msgstr ""
"Hiçbir garantisi yoktur; hatta SATILABÝLÝRLÝÐÝ veya ÞAHSÝ KULLANIMINIZA\n"
"UYGUNLUÐU için bile garanti verilmez.\n"
#: src/getargs.c:215 src/lex.c:694
#: src/getargs.c:223 src/lex.c:694
#, c-format
msgid "`%s' is no longer supported"
msgstr "`%s' artýk desteklenmeyecek"
#: src/getargs.c:239
#: src/getargs.c:247
#, c-format
msgid "Try `%s --help' for more information.\n"
msgstr "Daha fazla bilgi için `%s --help' yazýn.\n"
#: src/getargs.c:246
#: src/getargs.c:254
#, c-format
msgid "%s: no grammar file given\n"
msgstr "%s: gramer dosyasý verilmemiþ\n"
#: src/getargs.c:250
#: src/getargs.c:258
#, c-format
msgid "%s: extra arguments ignored after `%s'\n"
msgstr "%s: '%s' den sonraki argümanlar yoksayýldý\n"
+2 -2
View File
@@ -1,4 +1,4 @@
## Copyright 2001 Free Software Foundation, Inc.
## Copyright 2001, 2002 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
@@ -22,7 +22,7 @@ DEFS = @DEFS@ \
-DBISON_HAIRY=\"$(pkgdatadir)/bison.hairy\" \
-DLOCALEDIR=\"$(datadir)/locale\"
CFLAGS = @CFLAGS@ $(WARNING_CFLAGS)
CFLAGS = @CFLAGS@ $(WARNING_CFLAGS) $(WERROR_CFLAGS)
# libintl.h in is build/intl, intl/libgettext.h in src/,
# config.h in build/.
+14 -12
View File
@@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.5a from Makefile.am.
# Makefile.in generated by automake 1.5c from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
@@ -13,7 +13,6 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
@@ -48,6 +47,7 @@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
install_sh_DATA = $(install_sh) -c -m 644
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
@@ -97,6 +97,7 @@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@
WERROR_CFLAGS = @WERROR_CFLAGS@
am__include = @am__include@
am__quote = @am__quote@
install_sh = @install_sh@
@@ -109,7 +110,7 @@ DEFS = @DEFS@ \
-DLOCALEDIR=\"$(datadir)/locale\"
CFLAGS = @CFLAGS@ $(WARNING_CFLAGS)
CFLAGS = @CFLAGS@ $(WARNING_CFLAGS) $(WERROR_CFLAGS)
# libintl.h in is build/intl, intl/libgettext.h in src/,
# config.h in build/.
@@ -329,14 +330,15 @@ print_graph_.$(OBJEXT) reader_.$(OBJEXT) reduce_.$(OBJEXT) \
state_.$(OBJEXT) symtab_.$(OBJEXT) vcg_.$(OBJEXT) vmsgetargs_.$(OBJEXT) \
warshall_.$(OBJEXT) : $(ANSI2KNR)
uninstall-info-am:
pkgdataDATA_INSTALL = $(INSTALL_DATA)
install-pkgdataDATA: $(pkgdata_DATA)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
@list='$(pkgdata_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f"; \
$(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f; \
echo " $(pkgdataDATA_INSTALL) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f"; \
$(pkgdataDATA_INSTALL) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f; \
done
uninstall-pkgdataDATA:
@@ -350,26 +352,26 @@ uninstall-pkgdataDATA:
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique $(LISP)
mkid -fID $$unique
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| etags $(ETAGS_ARGS) $$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
@@ -378,7 +380,6 @@ GTAGS:
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
@@ -386,7 +387,7 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
@@ -418,6 +419,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
+22 -33
View File
@@ -54,19 +54,9 @@
# define YYSTACK_ALLOC alloca
# define YYSIZE_T YYSTD (size_t)
# else
# if defined (__GNUC__) || defined (_AIX) || defined (__hpux)
# ifdef __GNUC__
# define YYSTACK_ALLOC __builtin_alloca
# endif
# ifndef __GNUC__
# ifdef _AIX
# pragma alloca
# endif
# if defined (__sgi) || defined (__sparc__) || defined (__sparc) || defined (__sun)
# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
# define YYSTACK_ALLOC alloca
# define YYSIZE_T YYSTD (size_t)
# endif
# endif
# endif
# endif
# endif
@@ -227,12 +217,11 @@ while (0)
# ifndef YYFPRINTF
# ifdef __cplusplus
# include <cstdio.h> /* INFRINGES ON USER NAME SPACE */
# include <cstdio> /* INFRINGES ON USER NAME SPACE */
# else
# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
# endif
# define YYFPRINTF YYSTD (fprintf)
# define YYSTDERR YYSTD (stderr)
# endif
# define YYDPRINTF(Args) \
@@ -471,7 +460,7 @@ yyparse (YYPARSE_PARAM_ARG)
rule. */
int yylen;
YYDPRINTF ((YYSTDERR, "Starting parse\n"));
YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
yyerrstatus = 0;
@@ -567,14 +556,14 @@ yyparse (YYPARSE_PARAM_ARG)
yylsp = yyls + yysize - 1;
#endif
YYDPRINTF ((YYSTDERR, "Stack size increased to %lu\n",
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize));
if (yyssp >= yyss + yystacksize - 1)
YYABORT;
}
YYDPRINTF ((YYSTDERR, "Entering state %d\n", yystate));
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
goto yybackup;
@@ -601,7 +590,7 @@ yybackup:
if (yychar == YYEMPTY)
{
YYDPRINTF ((YYSTDERR, "Reading a token: "));
YYDPRINTF ((stderr, "Reading a token: "));
yychar = YYLEX;
}
@@ -612,7 +601,7 @@ yybackup:
yychar1 = 0;
yychar = YYEOF; /* Don't call YYLEX any more */
YYDPRINTF ((YYSTDERR, "Now at end of input.\n"));
YYDPRINTF ((stderr, "Now at end of input.\n"));
}
else
{
@@ -623,14 +612,14 @@ yybackup:
which are defined only if `YYDEBUG' is set. */
if (yydebug)
{
YYFPRINTF (YYSTDERR, "Next token is %d (%s",
YYFPRINTF (stderr, "Next token is %d (%s",
yychar, yytname[yychar1]);
/* Give the individual parser a way to print the precise
meaning of a token, for further debugging info. */
# ifdef YYPRINT
YYPRINT (YYSTDERR, yychar, yylval);
YYPRINT (stderr, yychar, yylval);
# endif
YYFPRINTF (YYSTDERR, ")\n");
YYFPRINTF (stderr, ")\n");
}
#endif
}
@@ -662,7 +651,7 @@ yybackup:
YYACCEPT;
/* Shift the lookahead token. */
YYDPRINTF ((YYSTDERR, "Shifting token %d (%s), ",
YYDPRINTF ((stderr, "Shifting token %d (%s), ",
yychar, yytname[yychar1]));
/* Discard the token being shifted unless it is eof. */
@@ -724,13 +713,13 @@ yyreduce:
{
int yyi;
YYFPRINTF (YYSTDERR, "Reducing via rule %d (line %d), ",
YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
yyn, yyrline[yyn]);
/* Print the symbols being reduced, and their result. */
for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
YYFPRINTF (YYSTDERR, "%s ", yytname[yyrhs[yyi]]);
YYFPRINTF (YYSTDERR, " -> %s\n", yytname[yyr1[yyn]]);
YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
}
#endif
%% actions /* The action file replaces this line. */
@@ -746,10 +735,10 @@ yyreduce:
if (yydebug)
{
short *yyssp1 = yyss - 1;
YYFPRINTF (YYSTDERR, "state stack now");
YYFPRINTF (stderr, "state stack now");
while (yyssp1 != yyssp)
YYFPRINTF (YYSTDERR, " %d", *++yyssp1);
YYFPRINTF (YYSTDERR, "\n");
YYFPRINTF (stderr, " %d", *++yyssp1);
YYFPRINTF (stderr, "\n");
}
#endif
@@ -845,7 +834,7 @@ yyerrlab1:
/* return failure if at end of input */
if (yychar == YYEOF)
YYABORT;
YYDPRINTF ((YYSTDERR, "Discarding token %d (%s).\n",
YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
yychar, yytname[yychar1]));
yychar = YYEMPTY;
}
@@ -891,10 +880,10 @@ yyerrpop:
if (yydebug)
{
short *yyssp1 = yyss - 1;
YYFPRINTF (YYSTDERR, "Error: state stack now");
YYFPRINTF (stderr, "Error: state stack now");
while (yyssp1 != yyssp)
YYFPRINTF (YYSTDERR, " %d", *++yyssp1);
YYFPRINTF (YYSTDERR, "\n");
YYFPRINTF (stderr, " %d", *++yyssp1);
YYFPRINTF (stderr, "\n");
}
#endif
@@ -924,7 +913,7 @@ yyerrhandle:
if (yyn == YYFINAL)
YYACCEPT;
YYDPRINTF ((YYSTDERR, "Shifting error token, "));
YYDPRINTF ((stderr, "Shifting error token, "));
*++yyvsp = yylval;
#if YYLSP_NEEDED
+12 -6
View File
@@ -276,7 +276,7 @@ count_rr_conflicts (int state)
int count = 0;
int j;
for (j = m; j < n; j++)
if (BITISSET (LA (m), j))
if (BITISSET (LA (j), i))
count++;
if (count >= 2)
@@ -401,7 +401,14 @@ conflicts_print (void)
if (expected_conflicts != -1 && !src_ok)
{
complain_message_count++;
/* FIXME: BIG ATTROCIOUS HACK. For flames, complaints and so
on, see Bruno Haible. GNU Gettext's plural.y's %expect is
wrong, and newer Bison reject it. But then, Bruno will be
overwhelmed by bug reports, until a fixed Gettext is
released. So for the 1.3x generation only, we leave a puke
puke hack. */
if (!strsuffix (infile, "plural.y"))
complain_message_count++;
fprintf (stderr, ngettext ("expected %d shift/reduce conflict\n",
"expected %d shift/reduce conflicts\n",
expected_conflicts),
@@ -414,7 +421,6 @@ void
print_reductions (FILE *out, int state)
{
int i;
int j;
int m;
int n;
shifts *shiftp;
@@ -463,8 +469,6 @@ print_reductions (FILE *out, int state)
}
else if (n - m >= 1)
{
int k;
int cmax = 0;
int default_LA = -1;
int default_rule = 0;
@@ -473,6 +477,7 @@ print_reductions (FILE *out, int state)
for (i = m; i < n; i++)
{
int count = 0;
int j, k;
for (k = 0; k < tokensetsize; ++k)
lookaheadset[k] = LA (i)[k] & ~shiftset[k];
@@ -501,12 +506,13 @@ print_reductions (FILE *out, int state)
for (i = 0; i < ntokens; i++)
{
int j;
int defaulted = 0;
int count = BITISSET (shiftset, i);
for (j = m; j < n; j++)
{
if (BITISSET (LA (m), j))
if (BITISSET (LA (j), i))
{
if (count == 0)
{
+109 -107
View File
@@ -1,5 +1,6 @@
/* Open and close files for bison,
Copyright 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, Inc.
Copyright 1984, 1986, 1989, 1992, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -26,6 +27,11 @@
#include "error.h"
#include "complain.h"
/* From basename.c. Almost a lie, as it returns a char *. */
const char *base_name PARAMS ((char const *name));
/* From xstrndup.c. */
char *xstrndup PARAMS ((const char *s, size_t n));
FILE *finput = NULL;
struct obstack action_obstack;
@@ -45,7 +51,7 @@ char *spec_defines_file = NULL; /* for --defines. */
char *infile = NULL;
char *attrsfile = NULL;
static char *base_name = NULL;
static char *full_base_name = NULL;
static char *short_base_name = NULL;
/* C source file extension (the parser source). */
@@ -58,7 +64,7 @@ const char *header_extension = NULL;
| Is SUFFIX ending STRING? |
`--------------------------*/
static int
int
strsuffix (const char *string, const char *suffix)
{
size_t string_len = strlen (string);
@@ -112,10 +118,10 @@ compute_header_macro (void)
{
macro_name = XMALLOC (char,
strlen (prefix) +
strlen (base_name) +
strlen (full_base_name) +
strlen (header_extension) + 1);
cp = stpcpy (macro_name, prefix);
cp = stpcpy (cp, base_name);
cp = stpcpy (cp, full_base_name);
cp = stpcpy (cp, header_extension);
}
@@ -274,27 +280,6 @@ tr (const char *in, char from, char to)
return (temp);
}
/* Gets the extension index in FILENAME. Returns 0 if fails to
find an extension. */
static int
get_extension_index (const char *filename)
{
int len;
len = strlen (filename);
if (filename[len-- - 1] == '.')
return (0);
while ((len > 0) && (filename[len - 1] != '.'))
if (filename[len - 1] == '/')
return (0);
else
len--;
return (len - 1);
}
/* Computes extensions from the grammar file extension. */
static void
compute_exts_from_gf (const char *ext)
@@ -317,14 +302,61 @@ compute_exts_from_src (const char *ext)
header_extension = tr (header_extension, 'C', 'H');
}
/* Decompose FILENAME in four parts: *BASE, *TAB, and *EXT, the fourth
part, (the directory) is ranging from FILENAME to the char before
*BASE, so we don't need an additional parameter.
*EXT points to the last period in the basename, or NULL if none.
If there is no *EXT, *TAB is NULL. Otherwise, *TAB points to
`.tab' or `_tab' if present right before *EXT, or is NULL. *TAB
cannot be equal to *BASE.
None are allocated, they are simply pointers to parts of FILENAME.
Examples:
'/tmp/foo.tab.c' -> *BASE = 'foo.tab.c', *TAB = '.tab.c', *EXT =
'.c'
'foo.c' -> *BASE = 'foo.c', *TAB = NULL, *EXT = '.c'
'tab.c' -> *BASE = 'tab.c', *TAB = NULL, *EXT = '.c'
'.tab.c' -> *BASE = '.tab.c', *TAB = NULL, *EXT = '.c'
'foo.tab' -> *BASE = 'foo.tab', *TAB = NULL, *EXT = '.tab'
'foo_tab' -> *BASE = 'foo_tab', *TAB = NULL, *EXT = NULL
'foo' -> *BASE = 'foo', *TAB = NULL, *EXT = NULL. */
static void
filename_split (const char *filename,
const char **base, const char **tab, const char **ext)
{
*base = base_name (filename);
/* Look for the extension, i.e., look for the last dot. */
*ext = strrchr (*base, '.');
*tab = NULL;
/* If there is an exentension, check if there is a `.tab' part right
before. */
if (*ext
&& (*ext - *base) > (int) strlen (".tab")
&& (!strncmp (*ext - strlen (".tab"), ".tab", strlen (".tab"))
|| !strncmp (*ext - strlen ("_tab"), "_tab", strlen ("_tab"))))
*tab = *ext - strlen (".tab");
}
/* FIXME: Should use xstrndup. */
static void
compute_base_names (void)
{
size_t base_length;
size_t short_base_length;
size_t ext_index;
const char *base, *tab, *ext;
/* If --output=foo.c was specified (SPEC_OUTFILE == foo.c),
BASE_NAME and SHORT_BASE_NAME are `foo'.
@@ -336,94 +368,63 @@ compute_base_names (void)
files, remove the ".c" or ".tab.c" suffix. */
if (spec_outfile)
{
#ifdef MSDOS
strlwr (spec_outfile);
#endif /* MSDOS */
/* BASE_LENGTH includes ".tab" but not ".c". */
base_length = strlen (spec_outfile);
filename_split (spec_outfile, &base, &tab, &ext);
ext_index = get_extension_index (spec_outfile);
/* If the initial segment of extension contains 'c' or a 'C', I assume
that it is a C or C++ source file. */
if (ext_index)
ext_index =
(strspn (spec_outfile + ext_index + 1, "cC")) ? ext_index : 0;
if (ext_index)
{
base_length -= strlen (spec_outfile + ext_index);
compute_exts_from_src (spec_outfile + ext_index);
}
/* The full base name goes up the EXT, excluding it. */
full_base_name =
xstrndup (spec_outfile,
(strlen (spec_outfile) - (ext ? strlen (ext) : 0)));
/* The short base name goes up to TAB, excluding it. */
short_base_name =
xstrndup (spec_outfile,
(strlen (spec_outfile)
- (tab ? strlen (tab) : (ext ? strlen (ext) : 0))));
base_name = strndup (spec_outfile, base_length);
/* SHORT_BASE_LENGTH includes neither ".tab" nor ".c". */
short_base_length = base_length;
if (strsuffix (base_name, ".tab") || strsuffix (base_name, "_tab"))
short_base_length -= 4;
short_base_name = strndup (spec_outfile, short_base_length);
return;
if (ext)
compute_exts_from_src (ext);
}
/* If --file-prefix=foo was specified, BASE_NAME and SHORT_BASE_NAME
are `foo'.
/* If --file-prefix=foo was specified, FULL_BASE_NAME = `foo.tab'
and SHORT_BASE_NAME = `foo'.
Construct names from it. */
if (spec_file_prefix)
else
{
#ifdef MSDOS
strlwr (spec_file_prefix);
#endif /* MSDOS */
short_base_name = xstrdup (spec_file_prefix);
base_name = XMALLOC (char,
strlen (short_base_name) + strlen (EXT_TAB) + 1);
stpcpy (stpcpy (base_name, short_base_name), EXT_TAB);
if (spec_file_prefix)
{
/* If --file-prefix=foo was specified, SHORT_BASE_NAME =
`foo'. */
short_base_name = xstrdup (spec_file_prefix);
}
else if (yacc_flag)
{
/* If --yacc, then the output is `y.tab.c'. */
short_base_name = xstrdup ("y");
}
else
{
/* Otherwise, the short base name is computed from the input
grammar: `foo.yy' => `foo'. */
filename_split (infile, &base, &tab, &ext);
short_base_name =
xstrndup (infile,
(strlen (infile) - (ext ? strlen (ext) : 0)));
}
/* Computes the extensions from the garmmar file name. */
ext_index = get_extension_index (infile);
/* If the initial segment of extension contains a 'y' or a 'Y', I assume
that it is a yacc or bison grammar file. */
if (ext_index)
ext_index = (strspn (infile + ext_index + 1, "yY")) ? ext_index : 0;
if (ext_index)
compute_exts_from_gf (infile + ext_index);
/* In these cases, always append `.tab'. */
full_base_name = XMALLOC (char,
strlen (short_base_name)
+ strlen (EXT_TAB) + 1);
stpcpy (stpcpy (full_base_name, short_base_name), EXT_TAB);
return;
/* Computes the extensions from the grammar file name. */
filename_split (infile, &base, &tab, &ext);
if (ext)
compute_exts_from_gf (ext);
}
/* If neither -o nor --file-prefix were specified, and the input
file is foo.y, BASE_NAME is `foo.tab', and SHORT_BASE_NAME is
`foo'.
If --yacc is used, do as if the input file was `y.y'. */
{
const char *name_base = yacc_flag ? "y.y" : infile;
/* BASE_LENGTH gets length of BASE_NAME, sans ".y" suffix if any. */
base_length = strlen (name_base);
ext_index = get_extension_index (name_base);
/* If the initial segment of extension contains a 'y' or a 'Y', I assume
that it is a yacc or bison grammar file. */
if (ext_index)
ext_index = (strspn (name_base + ext_index + 1, "yY")) ? ext_index : 0;
if (ext_index)
{
base_length -= strlen (name_base + ext_index);
compute_exts_from_gf (name_base + ext_index);
}
short_base_length = base_length;
short_base_name = strndup (name_base, short_base_length);
base_name = XMALLOC (char,
strlen (short_base_name) + strlen (EXT_TAB) + 1);
stpcpy (stpcpy (base_name, short_base_name), EXT_TAB);
return;
}
}
/*-------------------------------------------------------.
| Close the open files, compute the output files names. |
`-------------------------------------------------------*/
@@ -441,7 +442,7 @@ compute_output_file_names (void)
/* It the defines filename if not given, we create it. */
if (!spec_defines_file)
spec_defines_file = stringappend (base_name, header_extension);
spec_defines_file = stringappend (full_base_name, header_extension);
/* It the graph filename if not given, we create it. */
if (!spec_graph_file)
@@ -498,7 +499,8 @@ output_files (void)
if (spec_outfile)
obstack_save (&table_obstack, spec_outfile);
else
obstack_save (&table_obstack, stringappend (base_name, src_extension));
obstack_save (&table_obstack,
stringappend (full_base_name, src_extension));
obstack_free (&table_obstack, NULL);
/* Output the header file if wanted. */
+7 -3
View File
@@ -1,7 +1,5 @@
#ifndef FILES_H_
# define FILES_H_
/* File names and variables for bison,
Copyright 1984, 1989, 2000 Free Software Foundation, Inc.
Copyright 1984, 1989, 2000, 2002 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -20,6 +18,9 @@
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef FILES_H_
# define FILES_H_
/* These two should be pathnames for opening the sample parser files.
When bison is installed, they should be absolute pathnames.
XPFILE1 and XPFILE2 normally come from config.h. */
@@ -79,4 +80,7 @@ int xfclose PARAMS ((FILE *ptr));
const char *skeleton_find PARAMS ((const char *envvar,
const char *skeleton_name));
int strsuffix PARAMS ((const char *string, const char *suffix));
#endif /* !FILES_H_ */
+13 -5
View File
@@ -159,6 +159,14 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
| Process the options. |
`----------------------*/
/* Under DOS, there is no difference on the case. This can be
troublesome when looking for `.tab' etc. */
#ifdef MSDOS
# define AS_FILE_NAME(File) (strlwr (File), (File))
#else
# define AS_FILE_NAME(File) (File)
#endif
void
getargs (int argc, char *argv[])
{
@@ -186,7 +194,7 @@ getargs (int argc, char *argv[])
case 'g':
/* Here, the -g and --graph=FILE options are differentiated. */
graph_flag = 1;
spec_graph_file = optarg;
spec_graph_file = AS_FILE_NAME (optarg);
break;
case 'v':
@@ -194,13 +202,13 @@ getargs (int argc, char *argv[])
break;
case 'S':
skeleton = optarg;
skeleton = AS_FILE_NAME (optarg);
break;
case 'd':
/* Here, the -d and --defines options are differentiated. */
defines_flag = 1;
spec_defines_file = optarg;
spec_defines_file = AS_FILE_NAME (optarg);
break;
case 'l':
@@ -224,11 +232,11 @@ getargs (int argc, char *argv[])
break;
case 'o':
spec_outfile = optarg;
spec_outfile = AS_FILE_NAME (optarg);
break;
case 'b':
spec_file_prefix = optarg;
spec_file_prefix = AS_FILE_NAME (optarg);
break;
case 'p':
+1 -1
View File
@@ -103,7 +103,7 @@ traverse (int i)
break;
for (k = 0; k < size; ++k)
F (i)[k] = F (j)[k];
F (j)[k] = F (i)[k];
}
}
+2 -2
View File
@@ -131,7 +131,7 @@ output_short_or_char_table (struct obstack *oout,
const char *table_name,
short *short_table,
short first_value,
short begin, short end)
int begin, int end)
{
int i, j;
@@ -169,7 +169,7 @@ output_short_table (struct obstack *oout,
const char *table_name,
short *short_table,
short first_value,
short begin, short end)
int begin, int end)
{
output_short_or_char_table (oout, comment, "short", table_name, short_table,
first_value, begin, end);
+14 -2
View File
@@ -110,14 +110,26 @@ char *alloca ();
char *stpcpy PARAMS ((char *dest, const char *src));
#endif
#if !HAVE_DECL_STRNDUP
char *strndup PARAMS ((const char *s, size_t size));
#if !HAVE_DECL_STRCHR
char *strchr(const char *s, int c);
#endif
#if !HAVE_DECL_STRSPN
size_t strspn(const char *s, const char *accept);
#endif
#if !HAVE_DECL_STRNLEN
size_t strnlen PARAMS ((const char *s, size_t maxlen));
#endif
#if !HAVE_DECL_MEMCHR
void *memchr PARAMS ((const void *s, int c, size_t n));
#endif
#if !HAVE_DECL_MEMRCHR
void *memrchr PARAMS ((const void *s, int c, size_t n));
#endif
/*-----------------.
+23 -3
View File
@@ -1,7 +1,7 @@
## Process this file with automake to create Makefile.in.
## Makefile for Bison testsuite.
## Copyright 2000, 2001 Free Software Foundation, Inc.
## Copyright 2000, 2001, 2002 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
@@ -20,16 +20,36 @@
EXTRA_DIST = $(TESTSUITE_AT) testsuite
DISTCLEANFILES = atconfig bison package.m4
DISTCLEANFILES = atconfig bison
MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
## ------------ ##
## package.m4. ##
## ------------ ##
$(srcdir)/package.m4: $(top_srcdir)/configure.in
{ \
echo '# Signature of the current package.'; \
echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
} >$(srcdir)/package.m4
EXTRA_DIST += package.m4
## ------------ ##
## Test suite. ##
## ------------ ##
TESTSUITE_AT = \
testsuite.at \
output.at sets.at reduce.at calc.at torture.at regression.at
TESTSUITE = $(srcdir)/testsuite
AUTOTEST = $(AUTOM4TE) --language=autotest
$(srcdir)/$(TESTSUITE): $(TESTSUITE_AT)
$(srcdir)/$(TESTSUITE): package.m4 $(TESTSUITE_AT)
$(AUTOTEST) -I $(srcdir) testsuite.at -o $@.tmp
mv $@.tmp $@
+18 -7
View File
@@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.5a from Makefile.am.
# Makefile.in generated by automake 1.5c from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
@@ -13,7 +13,6 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
@@ -48,6 +47,7 @@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
install_sh_DATA = $(install_sh) -c -m 644
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
@@ -97,13 +97,14 @@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@
WERROR_CFLAGS = @WERROR_CFLAGS@
am__include = @am__include@
am__quote = @am__quote@
install_sh = @install_sh@
EXTRA_DIST = $(TESTSUITE_AT) testsuite
EXTRA_DIST = $(TESTSUITE_AT) testsuite package.m4
DISTCLEANFILES = atconfig bison package.m4
DISTCLEANFILES = atconfig bison
MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
TESTSUITE_AT = \
@@ -135,7 +136,6 @@ uninstall-info-am:
tags: TAGS
TAGS:
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
@@ -143,7 +143,7 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
@@ -175,6 +175,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
@@ -234,7 +235,17 @@ uninstall-am: uninstall-info-am
maintainer-clean-generic mostlyclean mostlyclean-generic \
uninstall uninstall-am uninstall-info-am
$(srcdir)/$(TESTSUITE): $(TESTSUITE_AT)
$(srcdir)/package.m4: $(top_srcdir)/configure.in
{ \
echo '# Signature of the current package.'; \
echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
} >$(srcdir)/package.m4
$(srcdir)/$(TESTSUITE): package.m4 $(TESTSUITE_AT)
$(AUTOTEST) -I $(srcdir) testsuite.at -o $@.tmp
mv $@.tmp $@
+3 -6
View File
@@ -1,13 +1,10 @@
# @configure_input@ -*- shell-script -*-
# Configurable variable values for Bison test suite.
# Copyright 2000, 2001 Free Software Foundation, Inc.
# Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
# We need a C compiler.
CC='@CC@'
CFLAGS='@CFLAGS@ @WARNING_CFLAGS@'
# We need to know if the compiler is GCC.
GCC='@GCC@'
CFLAGS='@CFLAGS@ @WARNING_CFLAGS@ @WERROR_CFLAGS@'
# We need `config.h'.
CPPFLAGS="-I$top_buildpath @CPPFLAGS@"
CPPFLAGS="-I$abs_top_builddir @CPPFLAGS@"
+4 -4
View File
@@ -1,11 +1,11 @@
#! /bin/sh
# @configure_generated@
# @configure_input@
# Wrapper around a non installed bison to make it work as an installed one.
# We want to use the files shipped with Bison.
BISON_SIMPLE='@top_srcpath@/src/bison.simple'
BISON_SIMPLE='@abs_top_srcdir@/src/bison.simple'
export BISON_SIMPLE
BISON_HAIRY='@top_srcpath@/src/bison.hairy'
BISON_HAIRY='@abs_top_srcdir@/src/bison.hairy'
export BISON_HAIRY
exec '@top_buildpath@/src/bison' ${1+"$@"}
exec '@abs_top_builddir@/src/bison' ${1+"$@"}
-11
View File
@@ -334,17 +334,6 @@ AT_DATA_CALC_Y([$1])
AT_CHECK([bison calc.y -o calc.c m4_bpatsubst([$1], [--yyerror-verbose])],
[0], [], [])
# Some compilers issue warnings we don't want to hear about.
# Maybe some day we will have proper Autoconf macros to disable these
# warnings, but this place is not the right one for that.
# So let's keep only GCC warnings, which we know are sane.
# Well, that's only part of the story: some assemblers issue warnings
# which can be totally useless, and actually polluting. It seems that
# the best bet be to completely ignore stderr, but to pass -Werror
# to GCC.
if test "$GCC" = yes; then
CFLAGS="$CFLAGS -Werror"
fi
AT_CHECK([$CC $CFLAGS $CPPFLAGS calc.c -o calc], 0, [], [ignore])
# Test the priorities.
+242 -20
View File
@@ -18,6 +18,29 @@
AT_BANNER([[Regression tests.]])
## ---------------- ##
## Braces parsing. ##
## ---------------- ##
AT_SETUP([braces parsing])
AT_DATA([input.y],
[[/* Bison used to swallow the character after `}'. */
%%
exp: { tests = {{{{{{{{{{}}}}}}}}}}; }
%%
]])
AT_CHECK([bison -v input.y -o input.c], 0, ignore, ignore)
AT_CHECK([fgrep 'tests = {{{{{{{{{{}}}}}}}}}};' input.c], 0, [ignore])
AT_CLEANUP
## ------------------ ##
## Duplicate string. ##
## ------------------ ##
@@ -583,31 +606,230 @@ AT_CLEANUP
## --------------------- ##
## Invalid CPP headers. ##
## --------------------- ##
## -------------- ##
## Web2c Report. ##
## -------------- ##
# AT_TEST_CPP_GUARD_H([INPUT-FILE-BASE)
# -------------------------------------
m4_define([AT_TEST_CPP_GUARD_H],
[AT_SETUP([Invalid CPP guards: $1])
# The generation of the reduction was once wrong in Bison, and made it
# miss some reductions. In the following test case, the reduction on
# `undef_id_tok' in state 1 was missing. This is stripped down from
# the actual web2c.y.
# Possibly create inner directories.
dirname=`AS_DIRNAME([$1])`
AS_MKDIR_P([$dirname])
AT_SETUP([Web2c Report])
AT_DATA([$1.y],
[%%
dummy:
])
AT_DATA([input.y],
[[%token undef_id_tok const_id_tok
AT_CHECK([bison --defines=$1.h $1.y])
%start CONST_DEC_PART
%%
CONST_DEC_PART:
CONST_DEC_LIST
;
# CPP should be happy with it.
AT_CHECK([$CC -E $1.h], 0, [ignore])
CONST_DEC_LIST:
CONST_DEC
| CONST_DEC_LIST CONST_DEC
;
CONST_DEC:
{ } undef_id_tok '=' const_id_tok ';'
;
%%
]])
AT_CHECK([bison -v input.y])
AT_CHECK([sed -n 's/ *$//;/^$/!p' input.output], 0,
[[Grammar
Number, Line, Rule
1 6 CONST_DEC_PART -> CONST_DEC_LIST
2 10 CONST_DEC_LIST -> CONST_DEC
3 12 CONST_DEC_LIST -> CONST_DEC_LIST CONST_DEC
4 15 @1 -> /* empty */
5 15 CONST_DEC -> @1 undef_id_tok '=' const_id_tok ';'
Terminals, with rules where they appear
$ (-1)
';' (59) 5
'=' (61) 5
error (256)
undef_id_tok (257) 5
const_id_tok (258) 5
Nonterminals, with rules where they appear
CONST_DEC_PART (7)
on left: 1
CONST_DEC_LIST (8)
on left: 2 3, on right: 1 3
CONST_DEC (9)
on left: 5, on right: 2 3
@1 (10)
on left: 4, on right: 5
state 0
$default reduce using rule 4 (@1)
CONST_DEC_PART go to state 9
CONST_DEC_LIST go to state 1
CONST_DEC go to state 2
@1 go to state 3
state 1
CONST_DEC_PART -> CONST_DEC_LIST . (rule 1)
CONST_DEC_LIST -> CONST_DEC_LIST . CONST_DEC (rule 3)
undef_id_tok reduce using rule 4 (@1)
$default reduce using rule 1 (CONST_DEC_PART)
CONST_DEC go to state 4
@1 go to state 3
state 2
CONST_DEC_LIST -> CONST_DEC . (rule 2)
$default reduce using rule 2 (CONST_DEC_LIST)
state 3
CONST_DEC -> @1 . undef_id_tok '=' const_id_tok ';' (rule 5)
undef_id_tok shift, and go to state 5
state 4
CONST_DEC_LIST -> CONST_DEC_LIST CONST_DEC . (rule 3)
$default reduce using rule 3 (CONST_DEC_LIST)
state 5
CONST_DEC -> @1 undef_id_tok . '=' const_id_tok ';' (rule 5)
'=' shift, and go to state 6
state 6
CONST_DEC -> @1 undef_id_tok '=' . const_id_tok ';' (rule 5)
const_id_tok shift, and go to state 7
state 7
CONST_DEC -> @1 undef_id_tok '=' const_id_tok . ';' (rule 5)
';' shift, and go to state 8
state 8
CONST_DEC -> @1 undef_id_tok '=' const_id_tok ';' . (rule 5)
$default reduce using rule 5 (CONST_DEC)
state 9
$ go to state 10
state 10
$ go to state 11
state 11
$default accept
]])
AT_CLEANUP
])
AT_TEST_CPP_GUARD_H([input/input])
AT_TEST_CPP_GUARD_H([9foo])
## --------------- ##
## Web2c Actions. ##
## --------------- ##
# The generation of the mapping `state -> action' was once wrong in
# extremely specific situations. web2c.y exhibits this situation.
# Below is a stripped version of the grammar. It looks like one can
# simplify it further, but just don't: it is tuned to exhibit a bug,
# which disapears when applying sane grammar transformations.
#
# It used to be wrong on yydefact only:
#
# static const short yydefact[] =
# {
# - 2, 0, 1, 0, 0, 2, 3, 2, 5, 4,
# + 2, 0, 1, 0, 0, 0, 3, 2, 5, 4,
# 0, 0
# };
#
# but let's check all the tables.
AT_SETUP([Web2c Actions])
AT_DATA([input.y],
[[%%
statement: struct_stat;
struct_stat: /* empty. */ | if else;
if: "if" "const" "then" statement;
else: "else" statement;
%%
]])
AT_CHECK([bison -v input.y -o input.c])
# Check only the tables. We don't use --no-parser, because it is
# still to be implemented in the experimental branch of Bison.
AT_CHECK([[sed -n 's/ *$//;/^static const.*\[\] =/,/^}/p' input.c]], 0,
[[static const char yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 1, 3, 4, 5,
6
};
static const short yyprhs[] =
{
0, 0, 2, 3, 6, 11
};
static const short yyrhs[] =
{
8, 0, 0, 9, 10, 0, 3, 4, 5, 7,
0, 6, 7, 0
};
static const short yyrline[] =
{
0, 2, 3, 3, 4, 5
};
static const char *const yytname[] =
{
"$", "error", "$undefined.", "\"if\"", "\"const\"", "\"then\"",
"\"else\"", "statement", "struct_stat", "if", "else", NULL
};
static const short yyr1[] =
{
0, 7, 8, 8, 9, 10
};
static const short yyr2[] =
{
0, 1, 0, 2, 4, 2
};
static const short yydefact[] =
{
2, 0, 1, 0, 0, 2, 3, 2, 5, 4,
0, 0, 0
};
static const short yydefgoto[] =
{
8, 2, 3, 6
};
static const short yypact[] =
{
-2, -1,-32768, -4, 1, -2,-32768, -2,-32768,-32768,
4, 5,-32768
};
static const short yypgoto[] =
{
0,-32768,-32768,-32768
};
static const short yytable[] =
{
10, 1, 5, 4, 11, 12, 7, 9
};
static const short yycheck[] =
{
0, 3, 6, 4, 0, 0, 5, 7
};
]])
AT_CLEANUP
+852
View File
@@ -454,3 +454,855 @@ comma : ',' opt_nls
AT_CHECK([[bison --verbose --defines input.y]])
AT_CLEANUP
## ----------------- ##
## GNU Cim Grammar. ##
## ----------------- ##
AT_SETUP([GNU Cim Grammar])
# GNU Cim, the GNU Simula 87 Compiler.
# Bison was once wrong, due to an incorrect computation of the RR conflicts.
# It reported 80 SR && 99 RR conflicts instead of 78/10!!!
AT_DATA([[input.y]],
[[%union {
long token;
long ival;
long arrdim;
double rval;
char *ident;
char *tval;
char stat_decl;
}
%token
HACTIVATE HAFTER /*HAND*/ HARRAY HAT
HBEFORE HBEGIN HBOOLEAN
HCHARACTER HCLASS /*HCOMMENT*/ HCONC
HDELAY HDO
HELSE HEND HEQ /*HEQV*/ HEXTERNAL
HFOR
HGE HGO HGOTO HGT
HHIDDEN
HIF /*HIMP*/ HIN HINNER HINSPECT HINTEGER HIS
HLABEL HLE HLONG HLT
HNAME HNE HNEW HNONE /*HNOT*/ HNOTEXT
/*HOR*/ HOTHERWISE
HPRIOR HPROCEDURE HPROTECTED
HQUA
HREACTIVATE HREAL HREF
HSHORT HSTEP HSWITCH
HTEXT HTHEN HTHIS HTO
HUNTIL
HVALUE HVAR HVIRTUAL
HWHEN HWHILE
HASSIGNVALUE HASSIGNREF
/*HDOT*/ HPAREXPSEPARATOR HLABELSEPARATOR HSTATEMENTSEPARATOR
HBEGPAR HENDPAR
HEQR HNER
HADD HSUB HMUL HDIV HINTDIV HEXP
HDOTDOTDOT
%token <ident> HIDENTIFIER
%token <ival> HBOOLEANKONST HINTEGERKONST HCHARACTERKONST
%token <rval> HREALKONST
%token <tval> HTEXTKONST
%type <tval> EXT_IDENT
%type <stat_decl> DECLSTATEMENT MODULSTATEMENT MBEE_DECLSTMS MBEE_DECLSTMSU
%type <stat_decl> MODULS
%type <ident> EXPRESSION_SIMP MBEE_ARG_R_PT
%type <arrdim> BAUND_PAIR_LIST
%right <token> HASSIGN
%left HORELSE
%left HANDTHEN
%left HEQV
%left HIMP
%left HOR
%left HAND
%left HNOT
%left <token> HVALRELOPERATOR HREFRELOPERATOR HOBJRELOPERATOR
%left HCONC
%left <token> HTERMOPERATOR
%left <token> UNEAR
%left <token> HFACTOROPERATOR
%left HPRIMARYOPERATOR
%left HQUA
%left HDOT
%start MAIN_MODULE
%%
/* GRAMATIKK FOR PROGRAM MODULES */
MAIN_MODULE : { categ=CLOCAL; mout(MBLOCK);
beginBlock(KBLOKK);separat_comp=FALSE;}
MODULS { endBlock(NULL,CCNO); mout(MENDBLOCK);}
| error HSTATEMENTSEPARATOR MBEE_DECLSTMS
;
EXT_DECLARATION : HEXTERNAL
MBEE_TYPE
HPROCEDURE
{ MBEENEWBLOCK();
kind=KPROC;}
EXT_LIST
|
HEXTERNAL
HIDENTIFIER
HPROCEDURE
{ MBEENEWBLOCK();
type=TNOTY;
kind=KPROC;
if($2==Ckind)categ=CCPROC;else
yerror (1);
ysensitive=sensitive;
sensitive=ON;}
HIDENTIFIER { $<ident>$=$5;
sensitive=ysensitive;}
EXTERNAL_KIND_ITEM
{ categ=CLOCAL;}
| HEXTERNAL
HCLASS
{ MBEENEWBLOCK();
kind=KCLASS;}
EXT_LIST
;
EXTERNAL_KIND_ITEM: EXT_IDENT
HOBJRELOPERATOR
{ if($2!=HIS)yerror (2);}
MBEE_TYPE HPROCEDURE
HIDENTIFIER
{ regDecl($6, type, KPROC, CCPROC);
beginBlock(kind);}
HEADING EMPTY_BLOCK
{ categ=CLOCAL;
endBlock($1==NULL?$<ident>0:tag($1),CCCPROC);}
/* |
EXT_IDENT
{ if($1!=NULL)yerror (3);
regDecl($0, type, kind, categ);}
MBEE_REST_EXT_LIST
{ endBlock(NULL,CCNO);}
;
MBEE_REST_EXT_LIST: /* EMPTY
| HPAREXPSEPARATOR EXT_KIND_LIST
;
EXT_KIND_LIST : EXT_KIND_ITEM
| EXT_KIND_LIST HPAREXPSEPARATOR EXT_KIND_ITEM
;
EXT_KIND_ITEM : HIDENTIFIER
EXT_IDENT
{ if($2!=NULL)yerror (3);
regDecl($1, type, kind, categ);}*/
;
EMPTY_BLOCK : /*EMPT*/
| HBEGIN HEND
;
EXT_LIST : EXT_ITEM
| EXT_LIST HPAREXPSEPARATOR EXT_ITEM
;
EXT_ITEM : HIDENTIFIER
EXT_IDENT
{ lesinn_external_spec($1,$2, kind);}
;
EXT_IDENT : /* EMPTY */ { $$=NULL;}
| HVALRELOPERATOR { if($1!=HEQ)yerror (9);
external=TRUE;}
HTEXTKONST { $$=$3;external=FALSE;}
;
/* GRAMATIKK FOR TYPER */
NO_TYPE : /*EMPT*/ { type=TNOTY;}
;
MBEE_TYPE : NO_TYPE
| TYPE
;
TYPE : HREF HBEGPAR
HIDENTIFIER
{ prefquantident=$3;
type=TREF;}
HENDPAR
| HTEXT { type=TTEXT;}
| HBOOLEAN { type=TBOOL;}
| HCHARACTER { type=TCHAR;}
| HSHORT HINTEGER { type=TSHORT;}
| HINTEGER { type=TINTG;}
| HREAL { type=TREAL;}
| HLONG HREAL { type=TLONG;}
;
/* GRAMATIKK FOR DEL AV SETNINGER */
MBEE_ELSE_PART : /*EMPT*/
/* | HELSE
HIF
EXPRESSION
HTHEN { mout(MELSE);
mout(MIF);
OBSBLOCK();}
BLOCK { MBEEENDBLOCK();}
MBEE_ELSE_PART { mout(MENDIF);}*/
| HELSE { OBSBLOCK(); mout(MELSE);}
BLOCK { MBEEENDBLOCK();}
;
FOR_LIST : FOR_LIST_ELEMENT { mout(MENDSEP);
mout(MLISTSEP);}
| FOR_LIST_ELEMENT
HPAREXPSEPARATOR
FOR_LIST { mout(MLISTSEP);}
;
FOR_LIST_ELEMENT: EXPRESSION
MBEE_F_L_EL_R_PT
;
MBEE_F_L_EL_R_PT: /*EMPT*/
| HWHILE
EXPRESSION { mout(MFORWHILE);}
| HSTEP
EXPRESSION
HUNTIL
EXPRESSION { mout(MUNTIL);
mout(MSTEP);}
;
GOTO : HGO
HTO
| HGOTO
;
CONN_STATE_R_PT : WHEN_CLAUSE_LIST
| HDO { beginBlock(KCON); mout(MDO);
OBSBLOCK(); }
BLOCK { endBlock(NULL,CCNO);
MBEEENDBLOCK(); mout(MENDDO);}
;
WHEN_CLAUSE_LIST: HWHEN
HIDENTIFIER
HDO { beginBlock(KCON); mout(MIDENTIFIER);
OBSBLOCK(); moutId($2);
mout(MWHEN);}
BLOCK { endBlock(NULL,CCNO);
MBEEENDBLOCK(); mout(MENDWHEN);}
| WHEN_CLAUSE_LIST
HWHEN
HIDENTIFIER
HDO { beginBlock(KCON); mout(MIDENTIFIER);
OBSBLOCK(); moutId($3);
mout(MWHEN);}
BLOCK { endBlock(NULL,CCNO);
MBEEENDBLOCK(); mout(MENDWHEN);}
;
MBEE_OTWI_CLAUS : /*EMPT*/
| HOTHERWISE {OBSBLOCK(); mout(MOTHERWISE);}
BLOCK {MBEEENDBLOCK();mout(MENDOTHERWISE);}
;
ACTIVATOR : HACTIVATE { mout(MBOOLEANKONST);
moutIval(FALSE);}
| HREACTIVATE { mout(MBOOLEANKONST);
moutIval(TRUE);}
;
SCHEDULE : /*EMPT*/ { mout(MCHARACTERKONST);
moutIval(DIRECT);
mout(MINTEGERKONST);
moutIval(0);
mout(MNONE);
mout(MBOOLEANKONST);
moutIval(FALSE);}
| ATDELAY EXPRESSION { mout(MNONE);}
PRIOR
| BEFOREAFTER { mout(MINTEGERKONST);
moutIval(0);}
EXPRESSION { mout(MBOOLEANKONST);
moutIval(FALSE);}
;
ATDELAY : HAT { mout(MCHARACTERKONST);
moutIval(AT);}
| HDELAY { mout(MCHARACTERKONST);
moutIval(DELAYS);}
;
BEFOREAFTER : HBEFORE { mout(MCHARACTERKONST);
moutIval(BEFORE);}
| HAFTER { mout(MCHARACTERKONST);
moutIval(AFTER);}
;
PRIOR : /*EMPT*/ { mout(MBOOLEANKONST);
moutIval(FALSE);}
| HPRIOR { mout(MBOOLEANKONST);
moutIval(TRUE);}
;
/* GRAMATIKK FOR SETNINGER OG DEKLARASJONER */
MODULSTATEMENT : HWHILE
EXPRESSION
HDO { STOPOBSBLOCK(); mout(MWHILE);
OBSBLOCK();}
BLOCK { MBEEENDBLOCK(); mout(MENDWHILE);
$$=STATEMENT;}
| HIF
EXPRESSION
HTHEN { STOPOBSBLOCK(); mout(MIF);
OBSBLOCK();}
BLOCK { MBEEENDBLOCK();}
MBEE_ELSE_PART { mout(MENDIF);
$$=STATEMENT;}
| HFOR
HIDENTIFIER
HASSIGN { STOPOBSBLOCK(); mout(MIDENTIFIER);
moutId($2);}
FOR_LIST
HDO { beginBlock(KFOR);
if($3==HASSIGNVALUE) mout(MFOR);
else mout(MFORR);
OBSBLOCK(); mout(MFORDO);}
BLOCK { MBEEENDBLOCK();
endBlock(NULL,CCNO); mout(MENDFOR);
$$=STATEMENT;}
| GOTO
EXPRESSION { mout(MGOTO);
STOPOBSBLOCK(); $$=STATEMENT;}
| HINSPECT
EXPRESSION { mout(MINSPECT);
STOPOBSBLOCK();
beginBlock(KINSP);}
CONN_STATE_R_PT
{ endBlock(NULL,CCNO);}
MBEE_OTWI_CLAUS { mout(MENDINSPECT);
$$=STATEMENT;}
| HINNER { STOPOBSBLOCK(); mout(MINNER);
regInner(); $$=STATEMENT;}
| HIDENTIFIER
HLABELSEPARATOR
{ STOPOBSBLOCK();
regDecl($1, TLABEL, KSIMPLE, categ); mout(MLABEL);
moutId($1);
mout(MENDLABEL);}
DECLSTATEMENT { if($4<=DECLARATION)
{ yerror (27);
$$=DECLARATION;}
else $$=$4;}
| EXPRESSION_SIMP
HBEGIN
{ $<ident>$=$1; }
IMPORT_SPEC_MODULE
{ mout(MPRBLOCK);
prefquantident=$1;
beginBlock(KPRBLK);}
MBEE_DECLSTMS
HEND { endBlock(NULL,CCNO); mout(MENDPRBLOCK);
$$=STATEMENT;}
| EXPRESSION_SIMP HBEGIN error HSTATEMENTSEPARATOR
MBEE_DECLSTMS HEND { $$=STATEMENT;
endBlock(NULL,CCNO); mout(MENDPRBLOCK);}
| EXPRESSION_SIMP HBEGIN error HEND
{ $$=STATEMENT;
endBlock(NULL,CCNO); mout(MENDPRBLOCK);}
| EXPRESSION_SIMP
{ STOPOBSBLOCK(); $$=STATEMENT;
mout(MENDASSIGN);}
| ACTIVATOR EXPRESSION SCHEDULE
{ $$=STATEMENT;
mout(MENDSEP);
mout(MARGUMENTSEP);
mout(MARGUMENTSEP);
mout(MARGUMENTSEP);
mout(MARGUMENTSEP);
mout(MARGUMENTSEP);
mout(MARGUMENTSEP);
mout(MARGUMENT);
moutId(activateid);
mout(MENDASSIGN);}
| HBEGIN
{ STOPOBSBLOCK();
OBSBLOCK();}
MBEE_DECLSTMS
HEND { MBEEENDBLOCK(); $$=STATEMENT;}
| MBEE_TYPE HPROCEDURE
HIDENTIFIER
{ MBEENEWBLOCK(); mout(MPROCEDURE);
regDecl($3, type, KPROC, categ);
beginBlock(KPROC);}
HEADING BLOCK { endBlock(NULL,CCNO); $$=DECLARATION;
mout(MENDPROCEDURE);}
| HIDENTIFIER
HCLASS
NO_TYPE
{ $<ident>$=$1; }
IMPORT_SPEC_MODULE
HIDENTIFIER
{ prefquantident=$1;
mout(MCLASS);
regDecl($6, TNOTY, KCLASS, categ);
beginBlock(KCLASS);}
HEADING
BLOCK { endBlock(NULL,CCNO); $$=DECLARATION;
mout(MENDCLASS);}
| HCLASS
NO_TYPE
HIDENTIFIER
{ prefquantident=0;
MBEENEWBLOCK(); mout(MCLASS);
regDecl($3, TNOTY, KCLASS, categ);
beginBlock(KCLASS);}
HEADING
BLOCK { endBlock(NULL,CCNO); $$=DECLARATION;
mout(MENDCLASS);}
| EXT_DECLARATION { $$=EXTDECLARATION;}
| /*EMPT*/{ STOPOBSBLOCK(); $$=EMPTYSTATEMENT;}
;
IMPORT_SPEC_MODULE: { MBEENEWBLOCK();
kind=KCLASS;
if($<ident>0==simsetident &&
findDecl(simsetident,cblock,FALSE)==NULL)
lesinn_external_spec(simsetident,
SIMSETATRFILE, kind);
if($<ident>0==simulationident && findDecl(
simulationident,cblock,FALSE)==NULL)
lesinn_external_spec(simulationident,
SIMULATIONATRFILE, kind);
if(($<ident>0==fileident && findDecl(
fileident,cblock,FALSE)==NULL) ||
($<ident>0==outfileident && findDecl(
outfileident,cblock,FALSE)==NULL) ||
($<ident>0==infileident && findDecl(
infileident,cblock,FALSE)==NULL) ||
($<ident>0==directfileident && findDecl(
directfileident,cblock,FALSE)==NULL) ||
($<ident>0==printfileident && findDecl(
printfileident,cblock,FALSE)==NULL) ||
($<ident>0==bytefileident && findDecl(
bytefileident,cblock,FALSE)==NULL) ||
($<ident>0==inbytefileident && findDecl(
inbytefileident,cblock,FALSE)==NULL) ||
($<ident>0==outbytefileident && findDecl(
outbytefileident,cblock,FALSE)==NULL) ||
($<ident>0==directbytefileident && findDecl(
directbytefileident,cblock,FALSE)==NULL))
lesinn_external_spec(fileident,
FILEATRFILE, kind);}
;
DECLSTATEMENT : MODULSTATEMENT
| TYPE
HIDENTIFIER
MBEE_CONSTANT
HPAREXPSEPARATOR
{ MBEENEWBLOCK();
kind=KSIMPLE;
regDecl($2, type, KSIMPLE, categ);
categ=CLOCAL;}
IDENTIFIER_LISTC { $$=DECLARATION;}
| TYPE
HIDENTIFIER
MBEE_CONSTANT
{ MBEENEWBLOCK();
regDecl($2, type, KSIMPLE, categ);
categ=CLOCAL; $$=DECLARATION;}
| MBEE_TYPE
HARRAY { MBEENEWBLOCK();
kind=KARRAY;}
ARR_SEGMENT_LIST { $$=DECLARATION;}
| HSWITCH
HIDENTIFIER
HASSIGN { MBEENEWBLOCK(); mout(MIDENTIFIER);
moutId($2);
regDecl($2, TLABEL, KARRAY, categ);}
SWITCH_LIST { $$=DECLARATION;
mout(MSWITCH);
mout(MENDSWITCH);}
;
BLOCK : DECLSTATEMENT { if($1<=DECLARATION)yerror (29);}
| HBEGIN MBEE_DECLSTMS HEND
| HBEGIN error HSTATEMENTSEPARATOR MBEE_DECLSTMS HEND
| HBEGIN error HEND
;
MBEE_DECLSTMS : MBEE_DECLSTMSU { if($1<=DECLARATION)yerror (28);
$$=$1;}
;
MBEE_DECLSTMSU : DECLSTATEMENT { $$=$1;}
| MBEE_DECLSTMSU
HSTATEMENTSEPARATOR
DECLSTATEMENT { if($1>=STATEMENT && $3<=DECLARATION)
yerror (26);
$$=$3;}
;
MODULS : MODULSTATEMENT { if($1==DECLARATION)
{separat_comp=TRUE;gettimestamp();}
$$=$1;}
| MODULS HSTATEMENTSEPARATOR MODULSTATEMENT
{ if($1>=STATEMENT && $3<=DECLARATION)
yerror (26);else
if($1>=STATEMENT
&& $3!=EMPTYSTATEMENT)yerror (25);
if(separat_comp && $3==STATEMENT)
yerror (25);
if($3==DECLARATION && !separat_comp)
{separat_comp=TRUE;gettimestamp();}
$$=$3;}
;
/* GRAMATIKK FOR DEL AV DEKLARASJONER */
ARR_SEGMENT_LIST: ARR_SEGMENT
| ARR_SEGMENT_LIST
HPAREXPSEPARATOR
ARR_SEGMENT
;
ARR_SEGMENT : ARRAY_SEGMENT
HBEGPAR
BAUND_PAIR_LIST HENDPAR { mout(MARRAY);
mout(MENDARRAY);
setArrayDim($3);}
;
ARRAY_SEGMENT : ARRAY_SEGMENT_EL { mout(MENDSEP);
mout(MARRAYSEP);}
| ARRAY_SEGMENT_EL
HPAREXPSEPARATOR
ARRAY_SEGMENT { mout(MARRAYSEP);}
;
ARRAY_SEGMENT_EL: HIDENTIFIER { mout(MIDENTIFIER);
moutId($1);
regDecl($1, type, kind, categ);
if(lastArray==NULL)
lastArray=cblock->lastparloc;}
;
BAUND_PAIR_LIST : BAUND_PAIR { mout(MENDSEP);
mout(MBOUNDSEP);
$$=1;}
| BAUND_PAIR
HPAREXPSEPARATOR
BAUND_PAIR_LIST { mout(MBOUNDSEP);
$$=$3+1;}
;
BAUND_PAIR : EXPRESSION
HLABELSEPARATOR
EXPRESSION { mout(MBOUNDPARSEP);}
;
SWITCH_LIST : EXPRESSION { mout(MENDSEP);
mout(MSWITCHSEP);}
| EXPRESSION
HPAREXPSEPARATOR
SWITCH_LIST { mout(MSWITCHSEP);}
;
HEADING : MBEE_FMAL_PAR_P HSTATEMENTSEPARATOR { kind=KNOKD;}
MBEE_MODE_PART { categ=CSPEC;}
MBEE_SPEC_PART { kind=KNOKD;}
MBEE_PROT_PART { categ=CVIRT;}
MBEE_VIRT_PART
{ categ=CLOCAL;}
;
MBEE_FMAL_PAR_P : /*EMPT*/
| FMAL_PAR_PART
;
FMAL_PAR_PART : HBEGPAR NO_TYPE
MBEE_LISTV HENDPAR
;
MBEE_LISTV : /*EMPT*/
| LISTV
;
LISTV : HIDENTIFIER { regDecl($1, type, KNOKD, CDEFLT);}
| FPP_CATEG HDOTDOTDOT { regDecl(varargsid, TVARARGS, KNOKD, categ);}
| HIDENTIFIER { regDecl($1, type, KNOKD, CDEFLT);}
HPAREXPSEPARATOR LISTV
| FPP_SPEC
| FPP_SPEC
HPAREXPSEPARATOR LISTV
;
FPP_HEADING : HBEGPAR NO_TYPE
FPP_MBEE_LISTV HENDPAR
;
FPP_MBEE_LISTV : /*EMPT*/
| FPP_LISTV
;
FPP_LISTV : FPP_CATEG HDOTDOTDOT { regDecl(varargsid, TVARARGS, KNOKD, categ);}
| FPP_SPEC
| FPP_SPEC
HPAREXPSEPARATOR LISTV
;
FPP_SPEC : FPP_CATEG SPECIFIER HIDENTIFIER
{ regDecl($3, type, kind, categ);}
| FPP_CATEG FPP_PROC_DECL_IN_SPEC
;
FPP_CATEG : HNAME HLABELSEPARATOR
{ categ=CNAME;}
| HVALUE HLABELSEPARATOR
{ categ=CVALUE;}
| HVAR HLABELSEPARATOR
{ categ=CVAR;}
| /*EMPT*/ { categ=CDEFLT;}
;
FPP_PROC_DECL_IN_SPEC: MBEE_TYPE HPROCEDURE
HIDENTIFIER
{ $<ival>$=categ;
regDecl($3, type, KPROC, categ);
beginBlock(KPROC);}
FPP_HEADING
{ categ=$<ival>4; /* M} settes tilbake*/}
{ endBlock(NULL,CCNO);}
;
IDENTIFIER_LISTV: HIDENTIFIER { regDecl($1, type, kind, categ);}
| HDOTDOTDOT { regDecl(varargsid, TVARARGS, kind, categ);}
| HIDENTIFIER { regDecl($1, type, kind, categ);}
HPAREXPSEPARATOR IDENTIFIER_LISTV
;
MBEE_MODE_PART : /*EMPT*/
| MODE_PART
;
MODE_PART : NAME_PART
| VALUE_PART
| VAR_PART
| NAME_PART VALUE_PART
| VALUE_PART NAME_PART
| NAME_PART VAR_PART
| VAR_PART NAME_PART
| VALUE_PART VAR_PART
| VAR_PART VALUE_PART
| VAR_PART NAME_PART VALUE_PART
| NAME_PART VAR_PART VALUE_PART
| NAME_PART VALUE_PART VAR_PART
| VAR_PART VALUE_PART NAME_PART
| VALUE_PART VAR_PART NAME_PART
| VALUE_PART NAME_PART VAR_PART
;
NAME_PART : HNAME { categ=CNAME;}
IDENTIFIER_LISTV
HSTATEMENTSEPARATOR
;
VAR_PART : HVAR { categ=CVAR;}
IDENTIFIER_LISTV
HSTATEMENTSEPARATOR
;
VALUE_PART : HVALUE { categ=CVALUE;}
IDENTIFIER_LISTV HSTATEMENTSEPARATOR
;
MBEE_SPEC_PART : /*EMPT*/
| SPEC_PART
;
SPEC_PART : ONE_SPEC
| SPEC_PART ONE_SPEC
;
ONE_SPEC : SPECIFIER IDENTIFIER_LIST HSTATEMENTSEPARATOR
| NO_TYPE HPROCEDURE HIDENTIFIER HOBJRELOPERATOR
{ if($4!=HIS) yerror (8);}
PROC_DECL_IN_SPEC HSTATEMENTSEPARATOR
| FPP_PROC_DECL_IN_SPEC HSTATEMENTSEPARATOR
| MBEE_TYPE HPROCEDURE HIDENTIFIER HSTATEMENTSEPARATOR
{ yerror (45);}
| MBEE_TYPE HPROCEDURE HIDENTIFIER HPAREXPSEPARATOR
IDENTIFIER_LIST HSTATEMENTSEPARATOR
{ yerror (45);}
;
SPECIFIER : TYPE { kind=KSIMPLE;}
| MBEE_TYPE
HARRAY { kind=KARRAY;}
| HLABEL { type=TLABEL;
kind=KSIMPLE;}
| HSWITCH { type=TLABEL;
kind=KARRAY;}
;
PROC_DECL_IN_SPEC: MBEE_TYPE HPROCEDURE
HIDENTIFIER
{ $<ival>$=categ;
regDecl($3, type, KPROC, categ);
beginBlock(KPROC);}
HEADING
{ categ=$<ival>4; /* M} settes tilbake*/}
MBEE_BEGIN_END
{ endBlock(NULL,CCNO);}
;
MBEE_BEGIN_END : /* EMPTY */
| HBEGIN HEND
;
MBEE_PROT_PART : /*EMPT*/
| PROTECTION_PART
;
PROTECTION_PART : PROT_SPECIFIER IDENTIFIER_LIST
HSTATEMENTSEPARATOR
| PROTECTION_PART PROT_SPECIFIER
IDENTIFIER_LIST HSTATEMENTSEPARATOR
;
PROT_SPECIFIER : HHIDDEN { categ=CHIDEN;}
| HPROTECTED { categ=CPROT;}
| HHIDDEN
HPROTECTED { categ=CHIPRO;}
| HPROTECTED
HHIDDEN { categ=CHIPRO;}
;
MBEE_VIRT_PART : /*EMPT*/
| VIRTUAL_PART
;
VIRTUAL_PART : HVIRTUAL
HLABELSEPARATOR
MBEE_SPEC_PART
;
IDENTIFIER_LIST : HIDENTIFIER { regDecl($1, type, kind, categ);}
| IDENTIFIER_LIST HPAREXPSEPARATOR
HIDENTIFIER { regDecl($3, type, kind, categ);}
;
IDENTIFIER_LISTC: HIDENTIFIER
MBEE_CONSTANT { regDecl($1, type, kind, categ);
categ=CLOCAL;}
| IDENTIFIER_LISTC HPAREXPSEPARATOR
HIDENTIFIER
MBEE_CONSTANT { regDecl($3, type, kind, categ);
categ=CLOCAL;}
;
MBEE_CONSTANT : /* EMPTY */
| HVALRELOPERATOR
{ MBEENEWBLOCK();
if($1!=HEQ) yerror (8);
if(type==TREF)yerror (7);
categ=CCONSTU;
mout(MIDENTIFIER);
moutId($<token>0);}
EXPRESSION { mout(MASSIGN);
mout(MCONST);}
;
/* GRAMATIKK FOR UTTRYKK */
EXPRESSION : EXPRESSION_SIMP {}
| HIF
EXPRESSION
HTHEN
EXPRESSION
HELSE
EXPRESSION { mout(MELSEE);
mout(MIFE);}
;
EXPRESSION_SIMP : EXPRESSION_SIMP
HASSIGN
EXPRESSION { if($2==HASSIGNREF)mout(MASSIGNR);
else mout(MASSIGN);$$=NULL;}
|
EXPRESSION_SIMP
HCONC
EXPRESSION_SIMP { mout(MCONC);$$=NULL;}
| EXPRESSION_SIMP HOR
HELSE
EXPRESSION_SIMP
%prec HORELSE { mout(MORELSEE);$$=NULL;}
| EXPRESSION_SIMP HAND
HTHEN
EXPRESSION_SIMP
%prec HANDTHEN { mout(MANDTHENE);$$=NULL;}
| EXPRESSION_SIMP
HEQV EXPRESSION_SIMP { mout(MEQV);$$=NULL;}
| EXPRESSION_SIMP
HIMP EXPRESSION_SIMP { mout(MIMP);$$=NULL;}
| EXPRESSION_SIMP
HOR EXPRESSION_SIMP { mout(MOR);$$=NULL;}
| EXPRESSION_SIMP
HAND EXPRESSION_SIMP { mout(MAND);$$=NULL;}
| HNOT EXPRESSION_SIMP { mout(MNOT);$$=NULL;}
| EXPRESSION_SIMP
HVALRELOPERATOR
EXPRESSION_SIMP
{ switch($2)
{ case HEQ: mout(MEQ);break;
case HNE: mout(MNE);break;
case HLT: mout(MLT);break;
case HLE: mout(MLE);break;
case HGT: mout(MGT);break;
case HGE: mout(MGE);break;
}$$=NULL;}
| EXPRESSION_SIMP
HREFRELOPERATOR
EXPRESSION_SIMP
{ if($2==HNER) mout(MNER);
else mout(MEQR);$$=NULL;}
| EXPRESSION_SIMP
HOBJRELOPERATOR
EXPRESSION_SIMP
{ if($2==HIS) mout(MIS);
else mout(MINS);$$=NULL;}
| HTERMOPERATOR
EXPRESSION_SIMP %prec UNEAR
{ if($1==HADD) mout(MUADD);
else mout(MUSUB);$$=NULL;}
| EXPRESSION_SIMP
HTERMOPERATOR
EXPRESSION_SIMP
{ if($2==HADD) mout(MADD);
else mout(MSUB);$$=NULL;}
| EXPRESSION_SIMP
HFACTOROPERATOR
EXPRESSION_SIMP
{ if($2==HMUL) mout(MMUL); else
if($2==HDIV) mout(MDIV);
else mout(MINTDIV);$$=NULL;}
| EXPRESSION_SIMP
HPRIMARYOPERATOR
EXPRESSION_SIMP { mout(MPRIMARY);$$=NULL;}
| HBEGPAR
EXPRESSION HENDPAR { mout(MNOOP);$$=NULL;}
| HTEXTKONST { mout(MTEXTKONST);
moutTval($1);$$=NULL;}
| HCHARACTERKONST { mout(MCHARACTERKONST);
moutIval($1);$$=NULL;}
| HREALKONST { mout(MREALKONST);
moutRval($1);$$=NULL;}
| HINTEGERKONST { mout(MINTEGERKONST);
moutIval($1);$$=NULL;}
| HBOOLEANKONST { mout(MBOOLEANKONST);
moutIval($1);$$=NULL;}
| HNONE { mout(MNONE);$$=NULL;}
| HIDENTIFIER
{ $<ident>$=$1;}
MBEE_ARG_R_PT
| HTHIS HIDENTIFIER { mout(MTHIS);
moutId($2);$$=NULL;}
| HNEW
HIDENTIFIER
ARG_R_PT { mout(MNEWARG);
moutId($2);$$=NULL;}
| EXPRESSION_SIMP
HDOT
EXPRESSION_SIMP { mout(MDOT);$$=NULL;}
| EXPRESSION_SIMP
HQUA HIDENTIFIER { mout(MQUA);
moutId($3);$$=NULL;}
;
ARG_R_PT : /*EMPTY*/ { mout(MENDSEP);}
| HBEGPAR
ARGUMENT_LIST HENDPAR
;
MBEE_ARG_R_PT : /*EMPTY*/ { mout(MIDENTIFIER);
moutId($<ident>0);
$$=$<ident>0;}
| HBEGPAR
ARGUMENT_LIST HENDPAR { mout(MARGUMENT);
moutId($<ident>0);}
;
ARGUMENT_LIST : EXPRESSION { mout(MENDSEP);
mout(MARGUMENTSEP);}
| EXPRESSION
HPAREXPSEPARATOR
ARGUMENT_LIST { mout(MARGUMENTSEP);}
;
%%
]])
# Pass plenty of options, to exercise plenty of code, even if we
# don't actually check the output. But SEGV is watching us, and
# so might do dmalloc.
AT_CHECK([[bison --verbose --defines input.y]], 0, [],
[[input.y contains 78 shift/reduce conflicts and 10 reduce/reduce conflicts.
]])
AT_CHECK([[grep '^State.*contains' input.output]], 0,
[[State 62 contains 14 shift/reduce conflicts.
State 162 contains 1 shift/reduce conflict.
State 199 contains 33 shift/reduce conflicts and 4 reduce/reduce conflicts.
State 204 contains 1 shift/reduce conflict.
State 238 contains 1 shift/reduce conflict.
State 333 contains 9 shift/reduce conflicts and 2 reduce/reduce conflicts.
State 354 contains 1 shift/reduce conflict.
State 358 contains 9 shift/reduce conflicts and 2 reduce/reduce conflicts.
State 425 contains 9 shift/reduce conflicts and 2 reduce/reduce conflicts.
]])
AT_CLEANUP