mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-08-18 07:04:26 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
06d61f775a | ||
|
|
b3b1806888 | ||
|
|
3ffdd5f125 | ||
|
|
954474bfa1 | ||
|
|
122ff44429 | ||
|
|
6895eefc04 | ||
|
|
d45746a0b7 | ||
|
|
4b07bd01d8 | ||
|
|
e565556458 | ||
|
|
189ba6670f | ||
|
|
c027cccb35 | ||
|
|
a151f354cf | ||
|
|
31f8b787c0 | ||
|
|
b62042d203 | ||
|
|
0100cd629d | ||
|
|
12ff095cad | ||
|
|
67f5d55d7a | ||
|
|
ff1f7871df | ||
|
|
b733bcd00e | ||
|
|
cb76b1f1a3 | ||
|
|
4333ba11c6 | ||
|
|
48f4100a82 | ||
|
|
18493762be | ||
|
|
c7b5c7fd06 | ||
|
|
cf80e9c386 | ||
|
|
311b2e56ea | ||
|
|
895c37a5c7 | ||
|
|
08090fe64c | ||
|
|
c76f5dfb03 | ||
|
|
2ad7e09e96 | ||
|
|
a3d760ef5d | ||
|
|
22cc8d813e | ||
|
|
9398411bfc | ||
|
|
d093cf8cbd | ||
|
|
c412a490ec | ||
|
|
2d2a7d608e | ||
|
|
5ea72c19da | ||
|
|
97d520633b | ||
|
|
af8a609a90 | ||
|
|
73edad9a25 | ||
|
|
9736697d6d | ||
|
|
e2f3fda11a | ||
|
|
3c0be43411 | ||
|
|
d45708d418 | ||
|
|
219c26ea51 | ||
|
|
f1ceed0774 | ||
|
|
d2829fdc04 | ||
|
|
43dc3c8bc4 | ||
|
|
3d04b5673d | ||
|
|
39c2566994 | ||
|
|
1694ac5cf2 | ||
|
|
dfff662817 | ||
|
|
adf1725fdb | ||
|
|
7aaf9ce758 | ||
|
|
2ceb8c617c | ||
|
|
87b9c9bc43 | ||
|
|
dc25ce6bb1 | ||
|
|
ace92a2691 | ||
|
|
397bb3932f | ||
|
|
bbbbe221d7 | ||
|
|
4d7b57b527 | ||
|
|
321fe707f4 | ||
|
|
1266b63674 | ||
|
|
b9ad39c1fb | ||
|
|
b1a4261e6d | ||
|
|
a022ff4186 | ||
|
|
b5b94bd5e6 | ||
|
|
b9e42bb439 | ||
|
|
75ac158b82 | ||
|
|
f23cd66008 | ||
|
|
9874460819 | ||
|
|
915becaa5d | ||
|
|
ae50972393 | ||
|
|
c9e0a88079 | ||
|
|
50bcb22c4c | ||
|
|
cfc9e431c3 | ||
|
|
42f8609bbd | ||
|
|
9e408f848d | ||
|
|
48578d6c12 | ||
|
|
914e713d07 | ||
|
|
94505fb7e2 | ||
|
|
1bcbca4368 | ||
|
|
a17352a9da | ||
|
|
c984dee8d1 | ||
|
|
cefb18280b | ||
|
|
2f3064f08e | ||
|
|
ab3a683f05 | ||
|
|
ecd1b61cd4 | ||
|
|
f67c40374e | ||
|
|
0213d65176 | ||
|
|
c19178bfaf | ||
|
|
0d2b2ab033 | ||
|
|
8ba62e3e10 | ||
|
|
f490771b4b | ||
|
|
5bc993d947 | ||
|
|
580c075d7f | ||
|
|
5d3a1ecbbe | ||
|
|
015e86a7b2 | ||
|
|
c1455babda | ||
|
|
2075a82a18 | ||
|
|
26fccd4d7b | ||
|
|
6469c4d72b | ||
|
|
b328890a9e | ||
|
|
f307943941 | ||
|
|
5339158d01 | ||
|
|
8defe11bfa | ||
|
|
41930e7ad8 | ||
|
|
d07932ef3d | ||
|
|
0364b3344f | ||
|
|
876fd8357a | ||
|
|
1eb0b14659 | ||
|
|
bee1df15b2 | ||
|
|
7e6d1e2296 | ||
|
|
a957d06cef | ||
|
|
462503f825 | ||
|
|
bf151b75ff | ||
|
|
f56274a8f9 | ||
|
|
b5775a81c1 | ||
|
|
7ed73f82ad | ||
|
|
4b1ebc495b | ||
|
|
738cde3e93 | ||
|
|
d6fb461dd8 | ||
|
|
14da0cdd07 | ||
|
|
c9ba9e5978 |
@@ -26,6 +26,7 @@ conftest*
|
|||||||
gnulib
|
gnulib
|
||||||
javacomp.sh
|
javacomp.sh
|
||||||
javaexec.sh
|
javaexec.sh
|
||||||
|
maint.mk
|
||||||
patches
|
patches
|
||||||
releases
|
releases
|
||||||
stamp-h*
|
stamp-h*
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
/gnulib
|
/gnulib
|
||||||
/javacomp.sh
|
/javacomp.sh
|
||||||
/javaexec.sh
|
/javaexec.sh
|
||||||
|
/maint.mk
|
||||||
/patches
|
/patches
|
||||||
/releases
|
/releases
|
||||||
/stamp-h*
|
/stamp-h*
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
COPYING
|
||||||
|
^doc/fdl\.texi$
|
||||||
|
^doc/gpl-3\.0\.texi$
|
||||||
|
^doc/yacc\.1\.in$
|
||||||
|
^src/parse-gram\.h$
|
||||||
|
^data/m4sugar/
|
||||||
@@ -47,6 +47,118 @@ of the .output file etc. This excludes impossible error messages
|
|||||||
meant for the maintainers only.
|
meant for the maintainers only.
|
||||||
|
|
||||||
|
|
||||||
|
* Working from the repository
|
||||||
|
|
||||||
|
These notes intend to help people working on the checked-out sources.
|
||||||
|
These requirements do not apply when building from a distribution tarball.
|
||||||
|
|
||||||
|
** Requirements
|
||||||
|
|
||||||
|
We've opted to keep only the highest-level sources in the repository.
|
||||||
|
This eases our maintenance burden, (fewer merges etc.), but imposes more
|
||||||
|
requirements on anyone wishing to build from the just-checked-out sources.
|
||||||
|
For example, you have to use the latest stable versions of the maintainer
|
||||||
|
tools we depend upon, including:
|
||||||
|
|
||||||
|
- Automake <http://www.gnu.org/software/automake/>
|
||||||
|
- Autoconf <http://www.gnu.org/software/autoconf/>
|
||||||
|
- Flex <http://www.gnu.org/software/flex/>
|
||||||
|
- Gettext <http://www.gnu.org/software/gettext/>
|
||||||
|
- Gzip <http://www.gnu.org/software/gzip/>
|
||||||
|
- Perl <http://www.cpan.org/>
|
||||||
|
- Rsync <http://samba.anu.edu.au/rsync/>
|
||||||
|
- Tar <http://www.gnu.org/software/tar/>
|
||||||
|
|
||||||
|
Valgrind <http://valgrind.org/> is also highly recommended, if
|
||||||
|
Valgrind supports your architecture.
|
||||||
|
|
||||||
|
Bison is written using Bison grammars, so there are bootstrapping
|
||||||
|
issues. The bootstrap script attempts to discover when the C code
|
||||||
|
generated from the grammars is out of date, and to bootstrap with an
|
||||||
|
out-of-date version of the C code, but the process is not foolproof.
|
||||||
|
Also, you may run into similar problems yourself if you modify Bison.
|
||||||
|
|
||||||
|
Only building the initial full source tree will be a bit painful.
|
||||||
|
Later, after synchronizing from the repository a plain `make' should
|
||||||
|
be sufficient.
|
||||||
|
|
||||||
|
** First checkout
|
||||||
|
|
||||||
|
Obviously, if you are reading these notes, you did manage to check out
|
||||||
|
this package from the repository. For the record, you will find all the
|
||||||
|
relevant information on:
|
||||||
|
|
||||||
|
http://savannah.gnu.org/git/?group=bison
|
||||||
|
|
||||||
|
Bison uses Git submodules: subscriptions to other Git repositories.
|
||||||
|
In particular it uses gnulib, the GNU portability library. To ask Git
|
||||||
|
to perform the first checkout of the submodules, run
|
||||||
|
|
||||||
|
$ git submodule update --init
|
||||||
|
|
||||||
|
Git submodule support is weak before versions 1.6 and later, you
|
||||||
|
should probably upgrade Git if your version is older.
|
||||||
|
|
||||||
|
The next step is to get other files needed to build, which are
|
||||||
|
extracted from other source packages:
|
||||||
|
|
||||||
|
$ ./bootstrap
|
||||||
|
|
||||||
|
And there you are! Just
|
||||||
|
|
||||||
|
$ ./configure
|
||||||
|
$ make
|
||||||
|
$ make check
|
||||||
|
|
||||||
|
At this point, there should be no difference between your local copy,
|
||||||
|
and the master copy:
|
||||||
|
|
||||||
|
$ git diff
|
||||||
|
|
||||||
|
should output no difference.
|
||||||
|
|
||||||
|
Enjoy!
|
||||||
|
|
||||||
|
** Updating
|
||||||
|
|
||||||
|
The use of submodules make things somewhat different because git does
|
||||||
|
not support recursive operations: submodules must be taken care of
|
||||||
|
explicitly by the user.
|
||||||
|
|
||||||
|
*** Updating Bison
|
||||||
|
|
||||||
|
If you pull a newer version of a branch, say via `git pull', you might
|
||||||
|
import requests for updated submodules. A simple `git diff' will
|
||||||
|
reveal if the current version of the submodule (i.e., the actual
|
||||||
|
contents of the gnulib directory) and the current request from the
|
||||||
|
subscriber (i.e., the reference of the version of gnulib that the
|
||||||
|
Bison reporitory requests) differ. To upgrade the submodules (i.e.,
|
||||||
|
to check out the version that is actually requested by the subscriber,
|
||||||
|
run `git submodule update'.
|
||||||
|
|
||||||
|
$ git pull
|
||||||
|
$ git submodule update
|
||||||
|
|
||||||
|
*** Updating a submodule
|
||||||
|
To update a submodule, say gnulib, do as follows:
|
||||||
|
|
||||||
|
Get the most recent version of the master branch from git.
|
||||||
|
|
||||||
|
$ cd gnulib
|
||||||
|
$ git fetch
|
||||||
|
$ git checkout -b master --track origin/master
|
||||||
|
|
||||||
|
Make sure Bison can live with that version of gnulib.
|
||||||
|
|
||||||
|
$ cd ..
|
||||||
|
$ ./bootstrap
|
||||||
|
$ make distcheck
|
||||||
|
|
||||||
|
Register your changes.
|
||||||
|
|
||||||
|
$ git checkin ...
|
||||||
|
|
||||||
|
|
||||||
* Test suite
|
* Test suite
|
||||||
|
|
||||||
** make check
|
** make check
|
||||||
@@ -85,8 +197,11 @@ release:
|
|||||||
|
|
||||||
* Release Procedure
|
* Release Procedure
|
||||||
|
|
||||||
** Try to get the *.pot files to the Translation Project at least one week
|
** Try to get the *.pot files to the Translation Project at least one
|
||||||
before a stable release, to give them time to translate them.
|
week before a stable release, to give them time to translate them.
|
||||||
|
Before generating the *.pot files, make sure that po/POTFILES.in and
|
||||||
|
runtime-po/POTFILES.in list all files with translatable strings.
|
||||||
|
This helps: grep -l '\<_(' *
|
||||||
|
|
||||||
** Tests
|
** Tests
|
||||||
See above.
|
See above.
|
||||||
@@ -98,9 +213,17 @@ causes it to be rejected by recent Gettext releases; please report
|
|||||||
these to the Translation Project.
|
these to the Translation Project.
|
||||||
|
|
||||||
** Update README
|
** Update README
|
||||||
Make sure the information in this file is current. Most notably, make sure it
|
Make sure the information in README is current. Most notably, make sure
|
||||||
recommends a version of GNU M4 that is compatible with the latest Bison
|
it recommends a version of GNU M4 that is compatible with the latest
|
||||||
sources.
|
Bison sources.
|
||||||
|
|
||||||
|
** Check copyright years.
|
||||||
|
We update years in copyright statements throughout Bison once at the
|
||||||
|
start of every year by running `make update-copyright'. However, before
|
||||||
|
a release, it's good to verify that it's actually been run. Besides the
|
||||||
|
copyright statement for each Bison file, check the copyright statements
|
||||||
|
that the skeletons insert into generated parsers, and check all
|
||||||
|
occurrences of PACKAGE_COPYRIGHT_YEAR in configure.ac.
|
||||||
|
|
||||||
** Update NEWS
|
** Update NEWS
|
||||||
The version number, *and* the date of the release (including for
|
The version number, *and* the date of the release (including for
|
||||||
@@ -109,9 +232,6 @@ betas).
|
|||||||
** Update ChangeLog
|
** Update ChangeLog
|
||||||
Should have an entry similar to `Version 1.49b.'.
|
Should have an entry similar to `Version 1.49b.'.
|
||||||
|
|
||||||
** Update configure.ac
|
|
||||||
Be sure PACKAGE_COPYRIGHT_YEAR is up-to-date.
|
|
||||||
|
|
||||||
** Tag the release
|
** Tag the release
|
||||||
Before Bison will build with the right version number, you must tag the release
|
Before Bison will build with the right version number, you must tag the release
|
||||||
in git. Do this after all other changes. The command is similar to:
|
in git. Do this after all other changes. The command is similar to:
|
||||||
@@ -145,9 +265,15 @@ The generic GNU upload procedure is at:
|
|||||||
|
|
||||||
http://www.gnu.org/prep/maintain/maintain.html#Automated-FTP-Uploads
|
http://www.gnu.org/prep/maintain/maintain.html#Automated-FTP-Uploads
|
||||||
|
|
||||||
After following the instructions there to register your information so you're
|
Follow the instructions there to register your information so you're permitted
|
||||||
permitted to upload, here's a brief reminder of how to roll the tarballs and
|
to upload. Make sure your public key has been uploaded at least to
|
||||||
upload them:
|
keys.gnupg.net. You can upload it with:
|
||||||
|
|
||||||
|
gpg --keyserver keys.gnupg.net --send-keys F125BDF3
|
||||||
|
|
||||||
|
where F125BDF3 should be replaced with your key ID.
|
||||||
|
|
||||||
|
Here's a brief reminder of how to roll the tarballs and upload them:
|
||||||
|
|
||||||
*** make distcheck
|
*** make distcheck
|
||||||
*** gpg -b bison-2.3b.tar.gz
|
*** gpg -b bison-2.3b.tar.gz
|
||||||
@@ -165,24 +291,67 @@ upload them:
|
|||||||
*** put bison-2.3b.tar.gz.directive.asc
|
*** put bison-2.3b.tar.gz.directive.asc
|
||||||
*** Repeat all these steps for bison-2.3b.tar.bz2.
|
*** Repeat all these steps for bison-2.3b.tar.bz2.
|
||||||
|
|
||||||
|
** Update Bison manual on www.gnu.org.
|
||||||
|
|
||||||
|
*** You need a non-anonymous checkout of the web pages directory.
|
||||||
|
|
||||||
|
$ cvs -d [email protected]:/web/bison checkout bison
|
||||||
|
|
||||||
|
*** Get familiar with the instructions for web page maintainers.
|
||||||
|
http://www.gnu.org/server/standards/readme_index.html
|
||||||
|
http://www.gnu.org/server/standards/README.software.html
|
||||||
|
especially the note about symlinks.
|
||||||
|
|
||||||
|
*** Build the web pages.
|
||||||
|
Assuming BISON_CHECKOUT refers to a checkout of the Bison dir, and
|
||||||
|
BISON_WWW_CHECKOUT refers to the web directory created above, do:
|
||||||
|
|
||||||
|
$ cd $BISON_CHECKOUT/doc
|
||||||
|
$ make stamp-vti
|
||||||
|
$ ../build-aux/gendocs.sh -o "$BISON_WWW_CHECKOUT/manual" \
|
||||||
|
bison "Bison - GNU parser generator"
|
||||||
|
$ cd $BISON_WWW_CHECKOUT
|
||||||
|
|
||||||
|
Verify that the result looks sane.
|
||||||
|
|
||||||
|
*** Commit the modified and the new files.
|
||||||
|
|
||||||
|
*** Remove old files.
|
||||||
|
Find the files which have not been overwritten (because they belonged to
|
||||||
|
sections that have been removed or renamed):
|
||||||
|
|
||||||
|
$ cd manual/html_node
|
||||||
|
$ ls -lt
|
||||||
|
|
||||||
|
Remove these files and commit their removal to CVS. For each of these
|
||||||
|
files, add a line to the file .symlinks. This will ensure that
|
||||||
|
hyperlinks to the removed files will redirect to the entire manual; this
|
||||||
|
is better than a 404 error.
|
||||||
|
|
||||||
|
There is a problem with 'index.html' being written twice (once for POSIX
|
||||||
|
function 'index', once for the table of contents); you can ignore this
|
||||||
|
issue.
|
||||||
|
|
||||||
** Announce
|
** Announce
|
||||||
To generate a template announcement file:
|
To generate a template announcement file:
|
||||||
|
|
||||||
make RELEASE_TYPE=alpha gpg_key_ID=F125BDF3 announcement
|
make RELEASE_TYPE=alpha gpg_key_ID=F125BDF3 announcement
|
||||||
|
|
||||||
where alpha can be replaced by beta or major and F125BDF3 should be replaced
|
where alpha can be replaced by beta or stable and F125BDF3 should be
|
||||||
with your key ID. For an example of how to fill out the template, search the
|
replaced with your key ID.
|
||||||
mailing list archives for the most recent release announcement.
|
|
||||||
|
|
||||||
Complete/fix the announcement file, and send it at least to
|
Complete/fix the announcement file. The generated list of recipients
|
||||||
[email protected] (if a real release, or a ``serious beta''),
|
([email protected], [email protected], [email protected],
|
||||||
bug-bison@gnu.org, [email protected], [email protected],
|
bison[email protected], and [email protected]) is
|
||||||
and [email protected].
|
appropriate for a stable release or a ``serious beta''. For any other
|
||||||
|
release, drop at least [email protected]. For an example of how to fill
|
||||||
|
out the rest of the template, search the mailing list archives for the
|
||||||
|
most recent release announcement.
|
||||||
|
|
||||||
Send the same announcement on the comp.compilers newsgroup by sending
|
For a stable release, send the same announcement on the comp.compilers
|
||||||
email to [email protected]. Do not make any Cc as the moderator will
|
newsgroup by sending email to [email protected]. Do not make any Cc as
|
||||||
throw away anything cross-posted or Cc'ed. It really needs to be a
|
the moderator will throw away anything cross-posted or Cc'ed. It really
|
||||||
separate message.
|
needs to be a separate message.
|
||||||
|
|
||||||
** Bump the version number
|
** Bump the version number
|
||||||
In configure.ac. Run `make'. So that developers don't accidentally add new
|
In configure.ac. Run `make'. So that developers don't accidentally add new
|
||||||
@@ -195,7 +364,8 @@ Push these changes.
|
|||||||
|
|
||||||
-----
|
-----
|
||||||
|
|
||||||
Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
|
Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free
|
||||||
|
Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Bison.
|
This file is part of GNU Bison.
|
||||||
|
|
||||||
|
|||||||
+13
-3
@@ -1,6 +1,7 @@
|
|||||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||||
## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software
|
|
||||||
## Foundation, Inc.
|
## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
||||||
|
## 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -23,7 +24,7 @@ SUBDIRS = build-aux po runtime-po lib data src doc examples tests etc
|
|||||||
aclocaldir = @aclocaldir@
|
aclocaldir = @aclocaldir@
|
||||||
aclocal_DATA = m4/bison-i18n.m4
|
aclocal_DATA = m4/bison-i18n.m4
|
||||||
|
|
||||||
EXTRA_DIST = .prev-version .version cfg.mk maint.mk \
|
EXTRA_DIST = .prev-version .version cfg.mk \
|
||||||
OChangeLog PACKAGING \
|
OChangeLog PACKAGING \
|
||||||
djgpp/Makefile.maint djgpp/README.in djgpp/config.bat \
|
djgpp/Makefile.maint djgpp/README.in djgpp/config.bat \
|
||||||
djgpp/config.sed djgpp/config.site djgpp/config_h.sed \
|
djgpp/config.sed djgpp/config.site djgpp/config_h.sed \
|
||||||
@@ -57,3 +58,12 @@ $(top_srcdir)/.version: configure
|
|||||||
echo $(VERSION) > $@-t && mv $@-t $@
|
echo $(VERSION) > $@-t && mv $@-t $@
|
||||||
dist-hook:
|
dist-hook:
|
||||||
echo $(VERSION) > $(distdir)/.tarball-version
|
echo $(VERSION) > $(distdir)/.tarball-version
|
||||||
|
|
||||||
|
.PHONY: update-b4-copyright update-package-copyright-year
|
||||||
|
update-b4-copyright:
|
||||||
|
find data -type f \
|
||||||
|
| grep -v -E '^data/bison.m4$$' \
|
||||||
|
| xargs $(build_aux)/$@
|
||||||
|
@echo 'warning: src/parse-gram.[hc] may need to be regenerated.'
|
||||||
|
update-package-copyright-year:
|
||||||
|
$(build_aux)/$@ configure.ac
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ to the bison package.
|
|||||||
|
|
||||||
-----
|
-----
|
||||||
|
|
||||||
Copyright (C) 2002, 2005 Free Software Foundation, Inc.
|
Copyright (C) 2002, 2005, 2009, 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of Bison, the GNU Compiler Compiler.
|
This file is part of Bison, the GNU Compiler Compiler.
|
||||||
|
|
||||||
|
|||||||
@@ -1,31 +1,47 @@
|
|||||||
This package contains the GNU Bison parser generator.
|
This package contains the GNU Bison parser generator.
|
||||||
|
|
||||||
See the file INSTALL for generic compilation and installation instructions.
|
* Installation
|
||||||
|
** Build
|
||||||
|
See the file INSTALL for generic compilation and installation
|
||||||
|
instructions.
|
||||||
|
|
||||||
|
Bison requires GNU m4 1.4.6 or later. See:
|
||||||
|
|
||||||
|
ftp://ftp.gnu.org/gnu/m4/m4-1.4.6.tar.gz
|
||||||
|
|
||||||
|
** Internationalization
|
||||||
|
Bison supports two catalogues: one for Bison itself (i.e., for the
|
||||||
|
maintainer-side parser generation), and one for the generated parsers
|
||||||
|
(i.e., for the user-side parser execution). The requirements between
|
||||||
|
both differ: bison needs ngettext, the generated parsers do not. To
|
||||||
|
simplify the build system, neither are installed if ngettext is not
|
||||||
|
supported, even if generated parsers could have been localized. See
|
||||||
|
http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html for
|
||||||
|
more details.
|
||||||
|
|
||||||
|
* Questions
|
||||||
See the section FAQ in the documentation (doc/bison.info) for
|
See the section FAQ in the documentation (doc/bison.info) for
|
||||||
frequently asked questions. The documentation is also available in
|
frequently asked questions. The documentation is also available in
|
||||||
PDF and HTML, provided you have a recent version of Texinfo installed:
|
PDF and HTML, provided you have a recent version of Texinfo installed:
|
||||||
run "make pdf" or "make html".
|
run "make pdf" or "make html".
|
||||||
|
|
||||||
Bison requires GNU m4 1.4.6 or later. See:
|
If you have questions about using Bison and the documentation does
|
||||||
|
not answer them, please send mail to <[email protected]>.
|
||||||
ftp://ftp.gnu.org/gnu/m4/m4-1.4.6.tar.gz
|
|
||||||
|
|
||||||
Bison can work with pre-1.4.6 distributions of GNU m4 if they are
|
|
||||||
sufficiently patched, but if you encounter a bug with an older
|
|
||||||
distribution and report a bug we will probably suggest that you
|
|
||||||
upgrade to 1.4.6 as the first step in trying to fix it.
|
|
||||||
|
|
||||||
|
* Bug reports
|
||||||
Please send bug reports to <[email protected]>. Please include the
|
Please send bug reports to <[email protected]>. Please include the
|
||||||
version number from `bison --version', and a complete, self-contained
|
version number from `bison --version', and a complete, self-contained
|
||||||
test case in each bug report.
|
test case in each bug report.
|
||||||
|
|
||||||
If you have questions about using Bison and the documentation does
|
|
||||||
not answer them, please send mail to <[email protected]>.
|
Local Variables:
|
||||||
|
mode: outline
|
||||||
|
End:
|
||||||
|
|
||||||
-----
|
-----
|
||||||
|
|
||||||
Copyright (C) 1992, 1998, 1999, 2003, 2004, 2005, 2008 Free Software Foundation, Inc.
|
Copyright (C) 1992, 1998, 1999, 2003, 2004, 2005, 2008, 2009, 2010
|
||||||
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of Bison, the GNU Compiler Compiler.
|
This file is part of Bison, the GNU Compiler Compiler.
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ the problems you encounter.
|
|||||||
|
|
||||||
-----
|
-----
|
||||||
|
|
||||||
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
Copyright (C) 2002, 2004, 2009, 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Bison.
|
This file is part of GNU Bison.
|
||||||
|
|
||||||
|
|||||||
@@ -1,80 +0,0 @@
|
|||||||
-*- outline -*-
|
|
||||||
|
|
||||||
These notes intend to help people working on the checked-out sources.
|
|
||||||
These requirements do not apply when building from a distribution tarball.
|
|
||||||
|
|
||||||
* Requirements
|
|
||||||
|
|
||||||
We've opted to keep only the highest-level sources in the repository.
|
|
||||||
This eases our maintenance burden, (fewer merges etc.), but imposes more
|
|
||||||
requirements on anyone wishing to build from the just-checked-out sources.
|
|
||||||
For example, you have to use the latest stable versions of the maintainer
|
|
||||||
tools we depend upon, including:
|
|
||||||
|
|
||||||
- Automake <http://www.gnu.org/software/automake/>
|
|
||||||
- Autoconf <http://www.gnu.org/software/autoconf/>
|
|
||||||
- Flex <http://www.gnu.org/software/flex/>
|
|
||||||
- Gettext <http://www.gnu.org/software/gettext/>
|
|
||||||
- Gzip <http://www.gnu.org/software/gzip/>
|
|
||||||
- Perl <http://www.cpan.org/>
|
|
||||||
- Rsync <http://samba.anu.edu.au/rsync/>
|
|
||||||
- Tar <http://www.gnu.org/software/tar/>
|
|
||||||
|
|
||||||
Valgrind <http://valgrind.org/> is also highly recommended, if
|
|
||||||
Valgrind supports your architecture.
|
|
||||||
|
|
||||||
Bison is written using Bison grammars, so there are bootstrapping
|
|
||||||
issues. The bootstrap script attempts to discover when the C code
|
|
||||||
generated from the grammars is out of date, and to bootstrap with an
|
|
||||||
out-of-date version of the C code, but the process is not foolproof.
|
|
||||||
Also, you may run into similar problems yourself if you modify Bison.
|
|
||||||
|
|
||||||
Only building the initial full source tree will be a bit painful.
|
|
||||||
Later, after synchronizing from the repository a plain `make' should
|
|
||||||
be sufficient.
|
|
||||||
|
|
||||||
* First checkout
|
|
||||||
|
|
||||||
Obviously, if you are reading these notes, you did manage to check out
|
|
||||||
this package from the repository. For the record, you will find all the
|
|
||||||
relevant information on:
|
|
||||||
|
|
||||||
http://savannah.gnu.org/cvs/?group_id=56
|
|
||||||
|
|
||||||
The next step is to get other files needed to build, which are
|
|
||||||
extracted from other source packages:
|
|
||||||
|
|
||||||
$ ./bootstrap
|
|
||||||
|
|
||||||
And there you are! Just
|
|
||||||
|
|
||||||
$ ./configure
|
|
||||||
$ make
|
|
||||||
$ make check
|
|
||||||
|
|
||||||
At this point, there should be no difference between your local copy,
|
|
||||||
and the master copy:
|
|
||||||
|
|
||||||
$ cvs diff
|
|
||||||
|
|
||||||
should output no difference.
|
|
||||||
|
|
||||||
Enjoy!
|
|
||||||
|
|
||||||
-----
|
|
||||||
|
|
||||||
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software
|
|
||||||
Foundation, Inc.
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
@@ -290,8 +290,8 @@ Equip the parser with a means to create the (visual) parse tree.
|
|||||||
|
|
||||||
-----
|
-----
|
||||||
|
|
||||||
Copyright (C) 2001, 2002, 2003, 2004, 2006 Free Software Foundation,
|
Copyright (C) 2001, 2002, 2003, 2004, 2006, 2008, 2009, 2010 Free
|
||||||
Inc.
|
Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of Bison, the GNU Compiler Compiler.
|
This file is part of Bison, the GNU Compiler Compiler.
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
# Bootstrap this package from checked-out sources.
|
# Bootstrap this package from checked-out sources.
|
||||||
|
|
||||||
# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation,
|
# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
|
||||||
# Inc.
|
# Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -36,7 +36,7 @@ bt_regex=`echo "$bt"| sed 's/\./[.]/g'`
|
|||||||
bt2=${bt}2
|
bt2=${bt}2
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo >&2 "\
|
cat <<EOF
|
||||||
Usage: $0 [OPTION]...
|
Usage: $0 [OPTION]...
|
||||||
Bootstrap this package from the checked-out sources.
|
Bootstrap this package from the checked-out sources.
|
||||||
|
|
||||||
@@ -50,14 +50,15 @@ Options:
|
|||||||
--force Attempt to bootstrap even if the sources seem
|
--force Attempt to bootstrap even if the sources seem
|
||||||
not to have been checked out.
|
not to have been checked out.
|
||||||
--skip-po Do not download po files.
|
--skip-po Do not download po files.
|
||||||
--cvs-user=USERNAME Set the username to use when checking out
|
|
||||||
sources from the gnulib repository.
|
|
||||||
|
|
||||||
If the file bootstrap.conf exists in the current working directory, its
|
If the file $0.conf exists in the same directory as this script, its
|
||||||
contents are read as shell variables to configure the bootstrap.
|
contents are read as shell variables to configure the bootstrap.
|
||||||
|
|
||||||
|
For build prerequisites, environment variables like \$AUTOCONF and \$AMTAR
|
||||||
|
are honored.
|
||||||
|
|
||||||
Running without arguments will suffice in most cases.
|
Running without arguments will suffice in most cases.
|
||||||
"
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
# Configuration.
|
# Configuration.
|
||||||
@@ -71,6 +72,10 @@ gnulib_modules=
|
|||||||
# Any gnulib files needed that are not in modules.
|
# Any gnulib files needed that are not in modules.
|
||||||
gnulib_files=
|
gnulib_files=
|
||||||
|
|
||||||
|
# A function to be called after everything else in this script.
|
||||||
|
# Override it via your own definition in bootstrap.conf.
|
||||||
|
bootstrap_epilogue() { :; }
|
||||||
|
|
||||||
# The command to download all .po files for a specified domain into
|
# The command to download all .po files for a specified domain into
|
||||||
# a specified directory. Fill in the first %s is the domain name, and
|
# a specified directory. Fill in the first %s is the domain name, and
|
||||||
# the second with the destination directory. Use rsync's -L and -r
|
# the second with the destination directory. Use rsync's -L and -r
|
||||||
@@ -81,9 +86,10 @@ po_download_command_format=\
|
|||||||
|
|
||||||
extract_package_name='
|
extract_package_name='
|
||||||
/^AC_INIT(/{
|
/^AC_INIT(/{
|
||||||
/.*,.*,.*,/{
|
/.*,.*,.*, */{
|
||||||
s///
|
s///
|
||||||
s/[][]//g
|
s/[][]//g
|
||||||
|
s/)$//
|
||||||
p
|
p
|
||||||
q
|
q
|
||||||
}
|
}
|
||||||
@@ -99,6 +105,11 @@ package=`sed -n "$extract_package_name" configure.ac` || exit
|
|||||||
gnulib_name=lib$package
|
gnulib_name=lib$package
|
||||||
|
|
||||||
build_aux=build-aux
|
build_aux=build-aux
|
||||||
|
source_base=lib
|
||||||
|
m4_base=m4
|
||||||
|
doc_base=doc
|
||||||
|
tests_base=tests
|
||||||
|
|
||||||
# Extra files from gnulib, which override files from other sources.
|
# Extra files from gnulib, which override files from other sources.
|
||||||
gnulib_extra_files="
|
gnulib_extra_files="
|
||||||
$build_aux/install-sh
|
$build_aux/install-sh
|
||||||
@@ -124,12 +135,15 @@ XGETTEXT_OPTIONS='\\\
|
|||||||
--flag=error:3:c-format --flag=error_at_line:5:c-format\\\
|
--flag=error:3:c-format --flag=error_at_line:5:c-format\\\
|
||||||
'
|
'
|
||||||
|
|
||||||
|
# Package bug report address for gettext files
|
||||||
|
[email protected]
|
||||||
|
|
||||||
# Files we don't want to import.
|
# Files we don't want to import.
|
||||||
excluded_files=
|
excluded_files=
|
||||||
|
|
||||||
# File that should exist in the top directory of a checked out hierarchy,
|
# File that should exist in the top directory of a checked out hierarchy,
|
||||||
# but not in a distribution tarball.
|
# but not in a distribution tarball.
|
||||||
checkout_only_file=README-hacking
|
checkout_only_file=HACKING
|
||||||
|
|
||||||
# Whether to use copies instead of symlinks.
|
# Whether to use copies instead of symlinks.
|
||||||
copy=false
|
copy=false
|
||||||
@@ -142,12 +156,18 @@ vc_ignore=auto
|
|||||||
|
|
||||||
# find_tool ENVVAR NAMES...
|
# find_tool ENVVAR NAMES...
|
||||||
# -------------------------
|
# -------------------------
|
||||||
|
# Search for a required program. Use the value of ENVVAR, if set,
|
||||||
|
# otherwise find the first of the NAMES that can be run (i.e.,
|
||||||
|
# supports --version). If found, set ENVVAR to the program name,
|
||||||
|
# die otherwise.
|
||||||
find_tool ()
|
find_tool ()
|
||||||
{
|
{
|
||||||
# Find sha1sum, named gsha1sum on MacPorts.
|
# Find sha1sum, named gsha1sum on MacPorts.
|
||||||
find_tool_envvar=$1
|
find_tool_envvar=$1
|
||||||
shift
|
shift
|
||||||
if eval test x"\$$find_tool_envvar" = x; then
|
find_tool_names=$@
|
||||||
|
eval "find_tool_res=\$$find_tool_envvar"
|
||||||
|
if test x"$find_tool_res" = x; then
|
||||||
for i
|
for i
|
||||||
do
|
do
|
||||||
if ($i --version </dev/null) >/dev/null 2>&1; then
|
if ($i --version </dev/null) >/dev/null 2>&1; then
|
||||||
@@ -155,16 +175,18 @@ find_tool ()
|
|||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
else
|
||||||
|
find_tool_error_prefix="\$$find_tool_envvar: "
|
||||||
fi
|
fi
|
||||||
if test x"$find_tool_res" = x; then
|
if test x"$find_tool_res" = x; then
|
||||||
echo >&2 "$0: $find_tool_name is required"
|
echo >&2 "$0: one of these is required: $find_tool_names"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
($find_tool_res --version </dev/null) >/dev/null 2>&1 || {
|
($find_tool_res --version </dev/null) >/dev/null 2>&1 || {
|
||||||
echo >&2 "$0: cannot run $find_tool_res --version"
|
echo >&2 "$0: ${find_tool_error_prefix}cannot run $find_tool_res --version"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
eval "$find_tool_envvar=\"$find_tool_res\""
|
eval "$find_tool_envvar=\$find_tool_res"
|
||||||
eval "export $find_tool_envvar"
|
eval "export $find_tool_envvar"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -172,7 +194,13 @@ find_tool ()
|
|||||||
find_tool SHA1SUM sha1sum gsha1sum
|
find_tool SHA1SUM sha1sum gsha1sum
|
||||||
|
|
||||||
# Override the default configuration, if necessary.
|
# Override the default configuration, if necessary.
|
||||||
test -r bootstrap.conf && . ./bootstrap.conf
|
# Make sure that bootstrap.conf is sourced from the current directory
|
||||||
|
# if we were invoked as "sh bootstrap".
|
||||||
|
case "$0" in
|
||||||
|
*/*) test -r "$0.conf" && . "$0.conf" ;;
|
||||||
|
*) test -r "$0.conf" && . ./"$0.conf" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
if test "$vc_ignore" = auto; then
|
if test "$vc_ignore" = auto; then
|
||||||
vc_ignore=
|
vc_ignore=
|
||||||
@@ -191,9 +219,7 @@ do
|
|||||||
usage
|
usage
|
||||||
exit;;
|
exit;;
|
||||||
--gnulib-srcdir=*)
|
--gnulib-srcdir=*)
|
||||||
GNULIB_SRCDIR=`expr "$option" : '--gnulib-srcdir=\(.*\)'`;;
|
GNULIB_SRCDIR=`expr "X$option" : 'X--gnulib-srcdir=\(.*\)'`;;
|
||||||
--cvs-user=*)
|
|
||||||
CVS_USER=`expr "$option" : '--cvs-user=\(.*\)'`;;
|
|
||||||
--skip-po)
|
--skip-po)
|
||||||
SKIP_PO=t;;
|
SKIP_PO=t;;
|
||||||
--force)
|
--force)
|
||||||
@@ -211,13 +237,13 @@ if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If each line in $STR is not already on a line by itself in $FILE, insert it,
|
# If $STR is not already on a line by itself in $FILE, insert it,
|
||||||
# sorting the new contents of the file and replacing $FILE with the result.
|
# sorting the new contents of the file and replacing $FILE with the result.
|
||||||
insert_sorted_if_absent() {
|
insert_sorted_if_absent() {
|
||||||
file=$1
|
file=$1
|
||||||
str=$2
|
str=$2
|
||||||
test -f $file || touch $file
|
test -f $file || touch $file
|
||||||
echo "$str" | sort -u - $file | cmp -s - $file \
|
echo "$str" | sort -u - $file | cmp - $file > /dev/null \
|
||||||
|| echo "$str" | sort -u - $file -o $file \
|
|| echo "$str" | sort -u - $file -o $file \
|
||||||
|| exit 1
|
|| exit 1
|
||||||
}
|
}
|
||||||
@@ -259,16 +285,113 @@ if test ! -d $build_aux; then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$0: Bootstrapping from checked-out $package sources..."
|
# Note this deviates from the version comparison in automake
|
||||||
|
# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
|
||||||
|
# but this should suffice as we won't be specifying old
|
||||||
|
# version formats or redundant trailing .0 in bootstrap.conf.
|
||||||
|
# If we did want full compatibility then we should probably
|
||||||
|
# use m4_version_compare from autoconf.
|
||||||
|
sort_ver() { # sort -V is not generally available
|
||||||
|
ver1="$1"
|
||||||
|
ver2="$2"
|
||||||
|
|
||||||
cleanup_gnulib() {
|
# split on '.' and compare each component
|
||||||
status=$?
|
i=1
|
||||||
rm -fr gnulib
|
while : ; do
|
||||||
exit $status
|
p1=$(echo "$ver1" | cut -d. -f$i)
|
||||||
|
p2=$(echo "$ver2" | cut -d. -f$i)
|
||||||
|
if [ ! "$p1" ]; then
|
||||||
|
echo "$1 $2"
|
||||||
|
break
|
||||||
|
elif [ ! "$p2" ]; then
|
||||||
|
echo "$2 $1"
|
||||||
|
break
|
||||||
|
elif [ ! "$p1" = "$p2" ]; then
|
||||||
|
if [ "$p1" -gt "$p2" ] 2>/dev/null; then # numeric comparison
|
||||||
|
echo "$2 $1"
|
||||||
|
elif [ "$p2" -gt "$p1" ] 2>/dev/null; then # numeric comparison
|
||||||
|
echo "$1 $2"
|
||||||
|
else # numeric, then lexicographic comparison
|
||||||
|
lp=$(printf "$p1\n$p2\n" | LANG=C sort -n | tail -n1)
|
||||||
|
if [ "$lp" = "$p2" ]; then
|
||||||
|
echo "$1 $2"
|
||||||
|
else
|
||||||
|
echo "$2 $1"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
i=$(($i+1))
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
# See if we can use gnulib's git-merge-changelog merge driver.
|
get_version() {
|
||||||
|
app=$1
|
||||||
|
|
||||||
|
$app --version >/dev/null 2>&1 || return 1
|
||||||
|
|
||||||
|
$app --version 2>&1 |
|
||||||
|
sed -n '# extract version within line
|
||||||
|
s/.*[v ]\{1,\}\([0-9]\{1,\}\.[.a-z0-9-]*\).*/\1/
|
||||||
|
t done
|
||||||
|
|
||||||
|
# extract version at start of line
|
||||||
|
s/^\([0-9]\{1,\}\.[.a-z0-9-]*\).*/\1/
|
||||||
|
t done
|
||||||
|
|
||||||
|
d
|
||||||
|
|
||||||
|
:done
|
||||||
|
#the following essentially does s/5.005/5.5/
|
||||||
|
s/\.0*\([1-9]\)/.\1/g
|
||||||
|
p
|
||||||
|
q'
|
||||||
|
}
|
||||||
|
|
||||||
|
check_versions() {
|
||||||
|
ret=0
|
||||||
|
|
||||||
|
while read app req_ver; do
|
||||||
|
# Honor $APP variables ($TAR, $AUTOCONF, etc.)
|
||||||
|
appvar=`echo $app | tr '[a-z]' '[A-Z]'`
|
||||||
|
test "$appvar" = TAR && appvar=AMTAR
|
||||||
|
eval "app=\${$appvar-$app}"
|
||||||
|
inst_ver=$(get_version $app)
|
||||||
|
if [ ! "$inst_ver" ]; then
|
||||||
|
echo "Error: '$app' not found" >&2
|
||||||
|
ret=1
|
||||||
|
elif [ ! "$req_ver" = "-" ]; then
|
||||||
|
latest_ver=$(sort_ver $req_ver $inst_ver | cut -d' ' -f2)
|
||||||
|
if [ ! "$latest_ver" = "$inst_ver" ]; then
|
||||||
|
echo "Error: '$app' version == $inst_ver is too old" >&2
|
||||||
|
echo " '$app' version >= $req_ver is required" >&2
|
||||||
|
ret=1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
return $ret
|
||||||
|
}
|
||||||
|
|
||||||
|
print_versions() {
|
||||||
|
echo "Program Min_version"
|
||||||
|
echo "----------------------"
|
||||||
|
printf "$buildreq"
|
||||||
|
echo "----------------------"
|
||||||
|
# can't depend on column -t
|
||||||
|
}
|
||||||
|
|
||||||
|
if ! printf "$buildreq" | check_versions; then
|
||||||
|
test -f README-prereq &&
|
||||||
|
echo "See README-prereq for notes on obtaining these prerequisite programs:" >&2
|
||||||
|
echo
|
||||||
|
print_versions
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "$0: Bootstrapping from checked-out $package sources..."
|
||||||
|
|
||||||
|
# See if we can use gnulib's git-merge-changelog merge driver.
|
||||||
if test -d .git && (git --version) >/dev/null 2>/dev/null ; then
|
if test -d .git && (git --version) >/dev/null 2>/dev/null ; then
|
||||||
if git config merge.merge-changelog.driver >/dev/null ; then
|
if git config merge.merge-changelog.driver >/dev/null ; then
|
||||||
:
|
:
|
||||||
@@ -281,35 +404,52 @@ if test -d .git && (git --version) >/dev/null 2>/dev/null ; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
cleanup_gnulib() {
|
||||||
|
status=$?
|
||||||
|
rm -fr gnulib
|
||||||
|
exit $status
|
||||||
|
}
|
||||||
|
|
||||||
|
git_modules_config () {
|
||||||
|
test -f .gitmodules && git config --file .gitmodules "$@"
|
||||||
|
}
|
||||||
|
|
||||||
# Get gnulib files.
|
# Get gnulib files.
|
||||||
|
|
||||||
case ${GNULIB_SRCDIR--} in
|
case ${GNULIB_SRCDIR--} in
|
||||||
-)
|
-)
|
||||||
if [ ! -d gnulib ]; then
|
if git_modules_config submodule.gnulib.url >/dev/null; then
|
||||||
echo "$0: getting gnulib files..."
|
echo "$0: getting gnulib files..."
|
||||||
|
git submodule init || exit $?
|
||||||
|
git submodule update || exit $?
|
||||||
|
|
||||||
case ${CVS_AUTH-pserver} in
|
elif [ ! -d gnulib ]; then
|
||||||
pserver)
|
echo "$0: getting gnulib files..."
|
||||||
CVS_PREFIX=':pserver:anonymous@';;
|
|
||||||
ssh)
|
|
||||||
CVS_PREFIX="$CVS_USER${CVS_USER+@}";;
|
|
||||||
*)
|
|
||||||
echo "$0: $CVS_AUTH: Unknown CVS access method" >&2
|
|
||||||
exit 1;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case $CVS_RSH in
|
|
||||||
'') CVS_RSH=ssh; export CVS_RSH;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
trap cleanup_gnulib 1 2 13 15
|
trap cleanup_gnulib 1 2 13 15
|
||||||
|
|
||||||
cvs -z3 -q -d ${CVS_PREFIX}pserver.git.sv.gnu.org:/gnulib.git co -d gnulib HEAD ||
|
git clone --help|grep depth > /dev/null && shallow='--depth 2' || shallow=
|
||||||
|
git clone $shallow git://git.sv.gnu.org/gnulib ||
|
||||||
cleanup_gnulib
|
cleanup_gnulib
|
||||||
|
|
||||||
trap - 1 2 13 15
|
trap - 1 2 13 15
|
||||||
fi
|
fi
|
||||||
GNULIB_SRCDIR=gnulib
|
GNULIB_SRCDIR=gnulib
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# Redirect the gnulib submodule to the directory on the command line
|
||||||
|
# if possible.
|
||||||
|
if test -d "$GNULIB_SRCDIR"/.git && \
|
||||||
|
git_modules_config submodule.gnulib.url >/dev/null; then
|
||||||
|
git submodule init
|
||||||
|
GNULIB_SRCDIR=`cd $GNULIB_SRCDIR && pwd`
|
||||||
|
git_modules_config --replace-all submodule.gnulib.url $GNULIB_SRCDIR
|
||||||
|
echo "$0: getting gnulib files..."
|
||||||
|
git submodule update || exit $?
|
||||||
|
GNULIB_SRCDIR=gnulib
|
||||||
|
fi
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
|
gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
|
||||||
@@ -342,12 +482,19 @@ update_po_files() {
|
|||||||
&& ls "$ref_po_dir"/*.po 2>/dev/null |
|
&& ls "$ref_po_dir"/*.po 2>/dev/null |
|
||||||
sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS"
|
sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS"
|
||||||
|
|
||||||
for po in `cd $ref_po_dir && echo *.po|sed 's/\.po//g'`; do
|
langs=`cd $ref_po_dir && echo *.po|sed 's/\.po//g'`
|
||||||
|
test "$langs" = '*' && langs=x
|
||||||
|
for po in $langs; do
|
||||||
|
case $po in x) continue;; esac
|
||||||
new_po="$ref_po_dir/$po.po"
|
new_po="$ref_po_dir/$po.po"
|
||||||
cksum_file="$ref_po_dir/$po.s1"
|
cksum_file="$ref_po_dir/$po.s1"
|
||||||
if ! "$SHA1SUM" -c --status "$cksum_file" < "$new_po" > /dev/null; then
|
if ! test -f "$cksum_file" ||
|
||||||
|
! test -f "$po_dir/$po.po" ||
|
||||||
|
! $SHA1SUM -c --status "$cksum_file" \
|
||||||
|
< "$new_po" > /dev/null; then
|
||||||
echo "updated $po_dir/$po.po..."
|
echo "updated $po_dir/$po.po..."
|
||||||
cp "$new_po" "$po_dir/$po.po" && "$SHA1SUM" < "$new_po" > "$cksum_file"
|
cp "$new_po" "$po_dir/$po.po" \
|
||||||
|
&& $SHA1SUM < "$new_po" > "$cksum_file"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
@@ -450,9 +597,13 @@ cp_mark_as_generated()
|
|||||||
|
|
||||||
if test -z "$c1"; then
|
if test -z "$c1"; then
|
||||||
cmp -s "$cp_src" "$cp_dst" || {
|
cmp -s "$cp_src" "$cp_dst" || {
|
||||||
|
# Copy the file first to get proper permissions if it
|
||||||
|
# doesn't already exist. Then overwrite the copy.
|
||||||
echo "$0: cp -f $cp_src $cp_dst" &&
|
echo "$0: cp -f $cp_src $cp_dst" &&
|
||||||
rm -f "$cp_dst" &&
|
rm -f "$cp_dst" &&
|
||||||
sed "s!$bt_regex/!!g" "$cp_src" > "$cp_dst"
|
cp "$cp_src" "$cp_dst-t" &&
|
||||||
|
sed "s!$bt_regex/!!g" "$cp_src" > "$cp_dst-t" &&
|
||||||
|
mv -f "$cp_dst-t" "$cp_dst"
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
check_dst_dir "$cp_dst"
|
check_dst_dir "$cp_dst"
|
||||||
@@ -482,7 +633,9 @@ version_controlled_file() {
|
|||||||
grep -F "/$file/" $dir/CVS/Entries 2>/dev/null |
|
grep -F "/$file/" $dir/CVS/Entries 2>/dev/null |
|
||||||
grep '^/[^/]*/[0-9]' > /dev/null && found=yes
|
grep '^/[^/]*/[0-9]' > /dev/null && found=yes
|
||||||
elif test -d .git; then
|
elif test -d .git; then
|
||||||
git-rm -n "$dir/$file" > /dev/null 2>&1 && found=yes
|
git rm -n "$dir/$file" > /dev/null 2>&1 && found=yes
|
||||||
|
elif test -d .svn; then
|
||||||
|
svn log -r HEAD "$dir/$file" > /dev/null 2>&1 && found=yes
|
||||||
else
|
else
|
||||||
echo "$0: no version control for $dir/$file?" >&2
|
echo "$0: no version control for $dir/$file?" >&2
|
||||||
fi
|
fi
|
||||||
@@ -505,7 +658,7 @@ slurp() {
|
|||||||
if test $file = Makefile.am; then
|
if test $file = Makefile.am; then
|
||||||
copied=$copied${sep}$gnulib_mk; sep=$nl
|
copied=$copied${sep}$gnulib_mk; sep=$nl
|
||||||
remove_intl='/^[^#].*\/intl/s/^/#/;'"s!$bt_regex/!!g"
|
remove_intl='/^[^#].*\/intl/s/^/#/;'"s!$bt_regex/!!g"
|
||||||
sed "$remove_intl" $1/$dir/$file | cmp -s - $dir/$gnulib_mk || {
|
sed "$remove_intl" $1/$dir/$file | cmp - $dir/$gnulib_mk > /dev/null || {
|
||||||
echo "$0: Copying $1/$dir/$file to $dir/$gnulib_mk ..." &&
|
echo "$0: Copying $1/$dir/$file to $dir/$gnulib_mk ..." &&
|
||||||
rm -f $dir/$gnulib_mk &&
|
rm -f $dir/$gnulib_mk &&
|
||||||
sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk
|
sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk
|
||||||
@@ -537,16 +690,16 @@ slurp() {
|
|||||||
ig=$dir/$dot_ig
|
ig=$dir/$dot_ig
|
||||||
if test -n "$copied"; then
|
if test -n "$copied"; then
|
||||||
insert_vc_ignore $ig "$copied"
|
insert_vc_ignore $ig "$copied"
|
||||||
# If an ignored file name ends with _.h, then also add
|
# If an ignored file name ends with .in.h, then also add
|
||||||
# the name with just ".h". Many gnulib headers are generated,
|
# the name with just ".h". Many gnulib headers are generated,
|
||||||
# e.g., stdint_.h -> stdint.h, dirent_.h ->..., etc.
|
# e.g., stdint.in.h -> stdint.h, dirent.in.h ->..., etc.
|
||||||
# Likewise for .gperf -> .h, .y -> .c, and .sin -> .sed
|
# Likewise for .gperf -> .h, .y -> .c, and .sin -> .sed
|
||||||
f=`echo "$copied"|sed 's/_\.h$/.h/;s/\.sin$/.sed/;s/\.y$/.c/;s/\.gperf$/.h/'`
|
f=`echo "$copied"|sed 's/\.in\.h$/.h/;s/\.sin$/.sed/;s/\.y$/.c/;s/\.gperf$/.h/'`
|
||||||
insert_vc_ignore $ig "$f"
|
insert_vc_ignore $ig "$f"
|
||||||
|
|
||||||
# For files like sys_stat_.h and sys_time_.h, record as
|
# For files like sys_stat.in.h and sys_time.in.h, record as
|
||||||
# ignorable the directory we might eventually create: sys/.
|
# ignorable the directory we might eventually create: sys/.
|
||||||
f=`echo "$copied"|sed 's/sys_.*_\.h$/sys/'`
|
f=`echo "$copied"|sed 's/sys_.*\.in\.h$/sys/'`
|
||||||
insert_vc_ignore $ig "$f"
|
insert_vc_ignore $ig "$f"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@@ -564,13 +717,13 @@ gnulib_tool_options="\
|
|||||||
--import\
|
--import\
|
||||||
--no-changelog\
|
--no-changelog\
|
||||||
--aux-dir $bt/$build_aux\
|
--aux-dir $bt/$build_aux\
|
||||||
--doc-base $bt/doc\
|
--doc-base $bt/$doc_base\
|
||||||
--lib $gnulib_name\
|
--lib $gnulib_name\
|
||||||
--m4-base $bt/m4/\
|
--m4-base $bt/$m4_base/\
|
||||||
--source-base $bt/lib/\
|
--source-base $bt/$source_base/\
|
||||||
--tests-base $bt/tests\
|
--tests-base $bt/$tests_base\
|
||||||
--local-dir $local_gl_dir\
|
--local-dir $local_gl_dir\
|
||||||
$gnulib_tool_option_extras\
|
$gnulib_tool_option_extras\
|
||||||
"
|
"
|
||||||
echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
|
echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
|
||||||
$gnulib_tool $gnulib_tool_options --import $gnulib_modules &&
|
$gnulib_tool $gnulib_tool_options --import $gnulib_modules &&
|
||||||
@@ -587,46 +740,50 @@ grep '^[ ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \
|
|||||||
with_gettext=no
|
with_gettext=no
|
||||||
|
|
||||||
if test $with_gettext = yes; then
|
if test $with_gettext = yes; then
|
||||||
echo "$0: (cd $bt2; autopoint) ..."
|
echo "$0: (cd $bt2; ${AUTOPOINT-autopoint}) ..."
|
||||||
cp configure.ac $bt2 &&
|
cp configure.ac $bt2 &&
|
||||||
(cd $bt2 && autopoint && rm configure.ac) &&
|
(cd $bt2 && ${AUTOPOINT-autopoint} && rm configure.ac) &&
|
||||||
slurp $bt2 $bt || exit
|
slurp $bt2 $bt || exit
|
||||||
|
|
||||||
rm -fr $bt $bt2 || exit
|
|
||||||
fi
|
fi
|
||||||
|
rm -fr $bt $bt2 || exit
|
||||||
|
|
||||||
# Coreutils is unusual in that it generates some of its test-related
|
# Remove any dangling symlink matching "*.m4" or "*.[ch]" in some
|
||||||
# Makefile.am files. That must be done before invoking automake.
|
# gnulib-populated directories. Such .m4 files would cause aclocal to fail.
|
||||||
mam_template=tests/Makefile.am.in
|
# The following requires GNU find 4.2.3 or newer. Considering the usual
|
||||||
if test -f $mam_template; then
|
# portability constraints of this script, that may seem a very demanding
|
||||||
PERL=perl
|
# requirement, but it should be ok. Ignore any failure, which is fine,
|
||||||
for tool in cut head join pr sort tac tail test tr uniq wc; do
|
# since this is only a convenience to help developers avoid the relatively
|
||||||
m=tests/$tool/Makefile.am
|
# unusual case in which a symlinked-to .m4 file is git-removed from gnulib
|
||||||
t=${m}t
|
# between successive runs of this script.
|
||||||
rm -f $m $t
|
find "$m4_base" "$source_base" \
|
||||||
sed -n '1,/^##test-files-begin/p' $mam_template > $t
|
-depth \( -name '*.m4' -o -name '*.[ch]' \) \
|
||||||
echo "x = $tool" >> $t
|
-type l -xtype l -delete > /dev/null 2>&1
|
||||||
srcdir=tests/$tool
|
|
||||||
$PERL -I$srcdir -w -- tests/mk-script $srcdir --list >> $t
|
|
||||||
sed -n '/^##test-files-end/,$p' $mam_template >> $t
|
|
||||||
chmod -w $t
|
|
||||||
mv $t $m
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Reconfigure, getting other files.
|
# Reconfigure, getting other files.
|
||||||
|
|
||||||
|
# Skip autoheader if it's not needed.
|
||||||
|
grep -E '^[ ]*AC_CONFIG_HEADERS?\>' configure.ac >/dev/null ||
|
||||||
|
AUTOHEADER=true
|
||||||
|
|
||||||
for command in \
|
for command in \
|
||||||
libtool \
|
libtool \
|
||||||
'aclocal --force -I m4' \
|
"${ACLOCAL-aclocal} --force -I m4" \
|
||||||
'autoconf --force' \
|
"${AUTOCONF-autoconf} --force" \
|
||||||
'autoheader --force' \
|
"${AUTOHEADER-autoheader} --force" \
|
||||||
'automake --add-missing --copy --force-missing';
|
"${AUTOMAKE-automake} --add-missing --copy --force-missing"
|
||||||
do
|
do
|
||||||
if test "$command" = libtool; then
|
if test "$command" = libtool; then
|
||||||
grep '^[ ]*AM_PROG_LIBTOOL\>' configure.ac >/dev/null ||
|
use_libtool=0
|
||||||
continue
|
# We'd like to use grep -E, to see if any of LT_INIT,
|
||||||
command='libtoolize -c -f'
|
# AC_PROG_LIBTOOL, AM_PROG_LIBTOOL is used in configure.ac,
|
||||||
|
# but that's not portable enough (e.g., for Solaris).
|
||||||
|
grep '^[ ]*A[CM]_PROG_LIBTOOL' configure.ac >/dev/null \
|
||||||
|
&& use_libtool=1
|
||||||
|
grep '^[ ]*LT_INIT' configure.ac >/dev/null \
|
||||||
|
&& use_libtool=1
|
||||||
|
test $use_libtool = 0 \
|
||||||
|
&& continue
|
||||||
|
command="${LIBTOOLIZE-libtoolize} -c -f"
|
||||||
fi
|
fi
|
||||||
echo "$0: $command ..."
|
echo "$0: $command ..."
|
||||||
$command || exit
|
$command || exit
|
||||||
@@ -649,7 +806,7 @@ if test $with_gettext = yes; then
|
|||||||
rm -f po/Makevars
|
rm -f po/Makevars
|
||||||
sed '
|
sed '
|
||||||
/^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '"$EXTRA_LOCALE_CATEGORIES"'/
|
/^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '"$EXTRA_LOCALE_CATEGORIES"'/
|
||||||
/^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/
|
/^MSGID_BUGS_ADDRESS *=/s/=.*/= '"$MSGID_BUGS_ADDRESS"'/
|
||||||
/^XGETTEXT_OPTIONS *=/{
|
/^XGETTEXT_OPTIONS *=/{
|
||||||
s/$/ \\/
|
s/$/ \\/
|
||||||
a\
|
a\
|
||||||
@@ -676,4 +833,10 @@ if test $with_gettext = yes; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
bootstrap_epilogue
|
||||||
|
|
||||||
echo "$0: done. Now you can run './configure'."
|
echo "$0: done. Now you can run './configure'."
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# indent-tabs-mode: nil
|
||||||
|
# End:
|
||||||
|
|||||||
+14
-11
@@ -1,6 +1,6 @@
|
|||||||
# Bootstrap configuration.
|
# Bootstrap configuration.
|
||||||
|
|
||||||
# Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
|
# Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -17,19 +17,15 @@
|
|||||||
|
|
||||||
# gnulib modules used by this package.
|
# gnulib modules used by this package.
|
||||||
gnulib_modules='
|
gnulib_modules='
|
||||||
announce-gen argmatch config-h c-strcase configmake
|
announce-gen argmatch assert config-h c-strcase configmake dirname
|
||||||
dirname error extensions fopen-safer getopt gettext git-version-gen
|
error extensions fopen-safer gendocs getopt-gnu gettext
|
||||||
gnumakefile hash inttypes javacomp-script javaexec-script malloc
|
git-version-gen hash inttypes javacomp-script javaexec-script
|
||||||
mbswidth obstack quote quotearg stdbool stpcpy strerror strtoul
|
maintainer-makefile malloc mbswidth obstack pipe quote quotearg
|
||||||
strverscmp unistd unistd-safer unlocked-io unsetenv verify xalloc
|
stdbool stpcpy strerror strtoul strverscmp unistd unistd-safer
|
||||||
|
unlocked-io update-copyright unsetenv verify warnings xalloc
|
||||||
xalloc-die xstrndup
|
xalloc-die xstrndup
|
||||||
'
|
'
|
||||||
|
|
||||||
# Any gnulib files needed that are not in modules.
|
|
||||||
gnulib_files='
|
|
||||||
m4/warning.m4
|
|
||||||
'
|
|
||||||
|
|
||||||
# Additional xgettext options to use. Use "\\\newline" to break lines.
|
# Additional xgettext options to use. Use "\\\newline" to break lines.
|
||||||
XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
|
XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
|
||||||
--from-code=UTF-8\\\
|
--from-code=UTF-8\\\
|
||||||
@@ -69,3 +65,10 @@ excluded_files='
|
|||||||
# In directories like lib/, m4/, and po/, generate both these files because we
|
# In directories like lib/, m4/, and po/, generate both these files because we
|
||||||
# still try to support CVS emulation.
|
# still try to support CVS emulation.
|
||||||
vc_ignore='.cvsignore .gitignore'
|
vc_ignore='.cvsignore .gitignore'
|
||||||
|
|
||||||
|
bootstrap_epilogue()
|
||||||
|
{
|
||||||
|
# Make sure we don't need src/bison, which usually doesn't exist at
|
||||||
|
# the time of a bootstrap.
|
||||||
|
touch src/parse-gram.[ch]
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
Makefile
|
Makefile
|
||||||
Makefile.in
|
Makefile.in
|
||||||
announce-gen
|
announce-gen
|
||||||
|
arg-nonnull.h
|
||||||
|
c++defs.h
|
||||||
compile
|
compile
|
||||||
config.guess
|
config.guess
|
||||||
config.rpath
|
config.rpath
|
||||||
config.sub
|
config.sub
|
||||||
depcomp
|
depcomp
|
||||||
|
gendocs.sh
|
||||||
git-version-gen
|
git-version-gen
|
||||||
install-sh
|
install-sh
|
||||||
javacomp.sh.in
|
javacomp.sh.in
|
||||||
@@ -14,4 +17,8 @@ link-warning.h
|
|||||||
mdate-sh
|
mdate-sh
|
||||||
missing
|
missing
|
||||||
texinfo.tex
|
texinfo.tex
|
||||||
|
update-copyright
|
||||||
|
useless-if-before-free
|
||||||
|
vc-list-files
|
||||||
|
warn-on-use.h
|
||||||
ylwrap
|
ylwrap
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
/Makefile
|
/Makefile
|
||||||
/Makefile.in
|
/Makefile.in
|
||||||
/announce-gen
|
/announce-gen
|
||||||
|
/arg-nonnull.h
|
||||||
|
/c++defs.h
|
||||||
/compile
|
/compile
|
||||||
/config.guess
|
/config.guess
|
||||||
/config.rpath
|
/config.rpath
|
||||||
/config.sub
|
/config.sub
|
||||||
/depcomp
|
/depcomp
|
||||||
|
/gendocs.sh
|
||||||
/git-version-gen
|
/git-version-gen
|
||||||
/install-sh
|
/install-sh
|
||||||
/javacomp.sh.in
|
/javacomp.sh.in
|
||||||
@@ -14,4 +17,8 @@
|
|||||||
/mdate-sh
|
/mdate-sh
|
||||||
/missing
|
/missing
|
||||||
/texinfo.tex
|
/texinfo.tex
|
||||||
|
/update-copyright
|
||||||
|
/useless-if-before-free
|
||||||
|
/vc-list-files
|
||||||
|
/warn-on-use.h
|
||||||
/ylwrap
|
/ylwrap
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||||
EXTRA_DIST = prev-version.txt cross-options.pl
|
EXTRA_DIST = prev-version.txt cross-options.pl update-b4-copyright
|
||||||
|
|||||||
@@ -8,21 +8,32 @@ my %option;
|
|||||||
while (<>)
|
while (<>)
|
||||||
{
|
{
|
||||||
if (/^\s* # Initial spaces.
|
if (/^\s* # Initial spaces.
|
||||||
(?:(-\w),\s+)? # $1: Possible short option.
|
(?:(-\w),\s+)? # $1: $short: Possible short option.
|
||||||
(--[-\w]+) # $2: Long option.
|
(--[-\w]+) # $2: $long: Long option.
|
||||||
(\[?) # $3: '[' iff the argument is optional.
|
(\[?) # $3: $opt: '[' iff the argument is optional.
|
||||||
(?:=([-\w]+))? # $4: Possible argument name.
|
(?:=(\S+))? # $4: $arg: Possible argument name.
|
||||||
|
\s # Spaces.
|
||||||
/x)
|
/x)
|
||||||
{
|
{
|
||||||
my ($short, $long, $opt, $arg) = ($1, $2, $3, $4);
|
my ($short, $long, $opt, $arg) = ($1, $2, $3, $4);
|
||||||
$short = defined $short ? '@option{' . $short . '}' : '';
|
$short = defined $short ? '@option{' . $short . '}' : '';
|
||||||
if ($arg)
|
if ($arg)
|
||||||
{
|
{
|
||||||
$arg =~ s/^=//;
|
# if $opt, $arg contains the closing ].
|
||||||
$arg = '@var{' . lc ($arg) . '}';
|
substr ($arg, -1) = ''
|
||||||
$arg = '[' . $arg . ']'
|
|
||||||
if $opt eq '[';
|
if $opt eq '[';
|
||||||
$option{"$long=$arg"} = $short ? "$short $arg" : '';
|
$arg =~ s/^=//;
|
||||||
|
$arg = lc ($arg);
|
||||||
|
# If the argument is compite (e.g., for --define[=NAME[=VALUE]]),
|
||||||
|
# put each word in @var, to build @var{name}[=@var{value}], not
|
||||||
|
# @var{name[=value]}].
|
||||||
|
$arg =~ s/(\w+)/\@var{$1}/g;
|
||||||
|
my $long_arg = "=$arg";
|
||||||
|
if ($opt eq '[') {
|
||||||
|
$long_arg = "[$long_arg]";
|
||||||
|
$arg = "[$arg]";
|
||||||
|
}
|
||||||
|
$option{"$long$long_arg"} = $short ? "$short $arg" : '';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -33,5 +44,8 @@ while (<>)
|
|||||||
|
|
||||||
foreach my $long (sort keys %option)
|
foreach my $long (sort keys %option)
|
||||||
{
|
{
|
||||||
printf "\@item %-40s \@tab %s\n", '@option{' . $long . '}', $option{$long};
|
# Avoid trailing spaces.
|
||||||
|
printf ("\@item %-40s \@tab%s\n",
|
||||||
|
'@option{' . $long . '}',
|
||||||
|
$option{$long} ? " $option{$long}" : "");
|
||||||
}
|
}
|
||||||
|
|||||||
Executable
+143
@@ -0,0 +1,143 @@
|
|||||||
|
#!/usr/bin/perl -0777 -pi
|
||||||
|
|
||||||
|
# Update b4_copyright invocations or b4_copyright_years definitions to
|
||||||
|
# include the current year.
|
||||||
|
|
||||||
|
# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 3, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
my $margin = 72;
|
||||||
|
|
||||||
|
my $this_year = $ENV{UPDATE_COPYRIGHT_YEAR};
|
||||||
|
if (!$this_year || $this_year !~ m/^\d{4}$/)
|
||||||
|
{
|
||||||
|
my ($sec, $min, $hour, $mday, $month, $year) = localtime (time ());
|
||||||
|
$this_year = $year + 1900;
|
||||||
|
}
|
||||||
|
my $old_re = <<'EOF'
|
||||||
|
(
|
||||||
|
(?:^|\n)
|
||||||
|
#BEFORE
|
||||||
|
(?:
|
||||||
|
b4_copyright\(\[[^][]*]
|
||||||
|
| m4_(?:push|pop)def\(\[b4_copyright_years]
|
||||||
|
)
|
||||||
|
#AFTER
|
||||||
|
)
|
||||||
|
(?:
|
||||||
|
,\s*
|
||||||
|
(
|
||||||
|
\[\s* (?:\d{4}(?:,\s*|-))* (\d{4}) \s*]
|
||||||
|
)
|
||||||
|
)?
|
||||||
|
\)
|
||||||
|
EOF
|
||||||
|
;
|
||||||
|
|
||||||
|
while (/($old_re)/gx)
|
||||||
|
{
|
||||||
|
my $start = pos() - length ($1);
|
||||||
|
my $b4_copyright_line = $2;
|
||||||
|
my $year_lines = $3;
|
||||||
|
my $final_year = $4;
|
||||||
|
$year_lines .= ')';
|
||||||
|
|
||||||
|
# If there was a second argument, it contains years, so update them.
|
||||||
|
if ($final_year)
|
||||||
|
{
|
||||||
|
$b4_copyright_line .= ',';
|
||||||
|
if ($final_year != $this_year)
|
||||||
|
{
|
||||||
|
# Update the year.
|
||||||
|
$year_lines =~ s/$final_year/$final_year, $this_year/;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Normalize all whitespace.
|
||||||
|
$year_lines =~ s/\s+/ /g;
|
||||||
|
|
||||||
|
# Put spaces after commas.
|
||||||
|
$year_lines =~ s/, ?/, /g;
|
||||||
|
|
||||||
|
# Do not compress to intervals; for example, do not replace
|
||||||
|
# "2008, 2009, 2010" with "2008-2010". See the Copyright
|
||||||
|
# Notices section in Information for Maintainers of GNU Software, at:
|
||||||
|
# http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
|
||||||
|
|
||||||
|
# Format within margin.
|
||||||
|
my $year_lines_new;
|
||||||
|
my $indent = index ($b4_copyright_line, '[');
|
||||||
|
--$indent if ($b4_copyright_line =~ m/^\n/);
|
||||||
|
while (length $year_lines)
|
||||||
|
{
|
||||||
|
my $text_margin = $margin - $indent;
|
||||||
|
if (($year_lines =~ s/^(.{1,$text_margin})(?: |$)//)
|
||||||
|
|| ($year_lines =~ s/^([\S]+)(?: |$)//))
|
||||||
|
{
|
||||||
|
my $line = "\n" . (' 'x$indent) . $1;
|
||||||
|
++$indent if (!$year_lines_new);
|
||||||
|
$year_lines_new .= $line;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
# Should be unreachable, but we don't want an infinite
|
||||||
|
# loop if it can be reached.
|
||||||
|
die;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Replace the old invocation. Should never die.
|
||||||
|
die if (!s/$old_re\G/$b4_copyright_line$year_lines_new/x);
|
||||||
|
|
||||||
|
# Prepare for the next search.
|
||||||
|
pos () = $start + length ("$b4_copyright_line$year_lines_new");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
while (/(\bb4_copyright\()/g)
|
||||||
|
{
|
||||||
|
my $start = pos () - length ($1);
|
||||||
|
my $end = pos ();
|
||||||
|
my $re = $old_re;
|
||||||
|
pos () = $start;
|
||||||
|
$re =~ s/\#BEFORE/\\G/;
|
||||||
|
if (!/$re/x)
|
||||||
|
{
|
||||||
|
my $line = (substr ($_, 0, $start) =~ s/\n/\n/g) + 1;
|
||||||
|
print STDERR
|
||||||
|
"$ARGV:$line: warning: failed to update a b4_copyright\n";
|
||||||
|
}
|
||||||
|
pos () = $end;
|
||||||
|
}
|
||||||
|
|
||||||
|
while (/(\[b4_copyright_years])/g)
|
||||||
|
{
|
||||||
|
my $start = pos () - length ($1);
|
||||||
|
my $end = pos ();
|
||||||
|
my $re = $old_re;
|
||||||
|
$re =~ s/\#AFTER/\\G/;
|
||||||
|
if (!/$re/x)
|
||||||
|
{
|
||||||
|
# The substr operation blows away pos (), so restoring pos ()
|
||||||
|
# at the end is necessary.
|
||||||
|
my $line = (substr ($_, 0, $start) =~ s/\n/\n/g) + 1;
|
||||||
|
print STDERR
|
||||||
|
"$ARGV:$line: warning: failed to update a"
|
||||||
|
. " b4_copyright_years\n";
|
||||||
|
}
|
||||||
|
pos () = $end;
|
||||||
|
}
|
||||||
Executable
+49
@@ -0,0 +1,49 @@
|
|||||||
|
#!/usr/bin/perl -0777 -pi
|
||||||
|
|
||||||
|
# In configure.ac, update PACKAGE_COPYRIGHT_YEAR to the current year.
|
||||||
|
|
||||||
|
# Copyright (C) 2010 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 3, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
my $this_year = $ENV{UPDATE_COPYRIGHT_YEAR};
|
||||||
|
if (!$this_year || $this_year !~ m/^\d{4}$/)
|
||||||
|
{
|
||||||
|
my ($sec, $min, $hour, $mday, $month, $year) = localtime (time ());
|
||||||
|
$this_year = $year + 1900;
|
||||||
|
}
|
||||||
|
my $old_re = <<'EOF'
|
||||||
|
(
|
||||||
|
MACRO\(
|
||||||
|
\[PACKAGE_COPYRIGHT_YEAR],
|
||||||
|
\s*\[
|
||||||
|
)
|
||||||
|
(\d{4})
|
||||||
|
(?=])
|
||||||
|
EOF
|
||||||
|
;
|
||||||
|
foreach my $macro ("AC_DEFINE", "AC_SUBST")
|
||||||
|
{
|
||||||
|
my $this_old_re = $old_re;
|
||||||
|
$this_old_re =~ s/MACRO/$macro/;
|
||||||
|
if (!s/$this_old_re/$1$this_year/x)
|
||||||
|
{
|
||||||
|
print STDERR
|
||||||
|
"$ARGV: warning: failed to update PACKAGE_COPYRIGHT_YEAR in"
|
||||||
|
. " $macro.\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
# Customize maint.mk -*- makefile -*-
|
# Customize maint.mk -*- makefile -*-
|
||||||
# Copyright (C) 2008 Free Software Foundation, Inc.
|
|
||||||
|
# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -14,11 +15,11 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# It's useful to run maintainer-check* targets during development, but we don't
|
# It's useful to run maintainer-*check* targets during development, but we
|
||||||
# want to wait on a recompile because of an update to $(VERSION). Thus,
|
# don't want to wait on a recompile because of an update to $(VERSION). Thus,
|
||||||
# override the _is-dist-target from GNUmakefile so that maintainer-check*
|
# override the _is-dist-target from GNUmakefile so that maintainer-*check*
|
||||||
# targets are filtered out.
|
# targets are filtered out.
|
||||||
_is-dist-target = $(filter-out %clean maintainer-check%, \
|
_is-dist-target = $(filter-out %clean maintainer-check% maintainer-%-check, \
|
||||||
$(filter maintainer-% dist% alpha beta major,$(MAKECMDGOALS)))
|
$(filter maintainer-% dist% alpha beta major,$(MAKECMDGOALS)))
|
||||||
|
|
||||||
# Use alpha.gnu.org for alpha and beta releases.
|
# Use alpha.gnu.org for alpha and beta releases.
|
||||||
@@ -39,4 +40,14 @@ local-checks-to-skip = changelog-check
|
|||||||
|
|
||||||
# The local directory containing the checked-out copy of gnulib used in
|
# The local directory containing the checked-out copy of gnulib used in
|
||||||
# this release. Used solely to get a date for the "announcement" target.
|
# this release. Used solely to get a date for the "announcement" target.
|
||||||
gnulib_dir = $(srcdir)/../../gnulib
|
gnulib_dir = $(srcdir)/gnulib
|
||||||
|
|
||||||
|
bootstrap-tools = autoconf,automake,flex,gettext,gnulib
|
||||||
|
|
||||||
|
announcement_Cc_ = \
|
||||||
|
[email protected], [email protected], [email protected], \
|
||||||
|
[email protected]
|
||||||
|
|
||||||
|
update-copyright: update-b4-copyright update-package-copyright-year
|
||||||
|
update-copyright-env = \
|
||||||
|
UPDATE_COPYRIGHT_FORCE=1
|
||||||
|
|||||||
+52
-35
@@ -1,7 +1,7 @@
|
|||||||
# Configure template for GNU Bison. -*-Autoconf-*-
|
# Configure template for GNU Bison. -*-Autoconf-*-
|
||||||
#
|
#
|
||||||
# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software
|
# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
||||||
# Foundation, Inc.
|
# 2010 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -16,25 +16,36 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# We have strange test case titles, so we need Autoconf 2.61 or better.
|
# In order for some versions of Sun Studio to compile our C++ test cases
|
||||||
AC_PREREQ(2.61)
|
# correctly, we need Autoconf 2.64 or better to handle the restrict
|
||||||
|
# keyword in at least string.h from gnulib.
|
||||||
|
AC_PREREQ(2.64)
|
||||||
|
|
||||||
AC_INIT([GNU Bison],
|
AC_INIT([GNU Bison],
|
||||||
m4_esyscmd([build-aux/git-version-gen .tarball-version]),
|
m4_esyscmd([build-aux/git-version-gen .tarball-version]),
|
||||||
[[email protected]])
|
[[email protected]])
|
||||||
AC_DEFINE([PACKAGE_COPYRIGHT_YEAR], [2008],
|
AC_DEFINE([PACKAGE_COPYRIGHT_YEAR], [2010],
|
||||||
[The copyright year for this package])
|
[The copyright year for this package])
|
||||||
AC_SUBST([PACKAGE_COPYRIGHT_YEAR], [2008])
|
AC_SUBST([PACKAGE_COPYRIGHT_YEAR], [2010])
|
||||||
|
|
||||||
AC_CONFIG_AUX_DIR([build-aux])
|
AC_CONFIG_AUX_DIR([build-aux])
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
|
|
||||||
# We don't have a file m4/Makefile.am, so we need Automake 1.8 or later.
|
# Automake 1.10.3 and 1.11.1 fix a security flaw discussed here:
|
||||||
# We want gnits strictness only when rolling a formal release so that we can,
|
#
|
||||||
# for example, run make dist at other times without being required to add a
|
# http://thread.gmane.org/gmane.comp.sysutils.autotools.announce/131
|
||||||
# bogus NEWS entry.
|
#
|
||||||
AM_INIT_AUTOMAKE([1.8 dist-bzip2]
|
# To avoid 1.11, we make 1.11.1 the minimum version.
|
||||||
m4_bmatch(m4_defn([AC_PACKAGE_VERSION]), [-], [gnu], [gnits]))
|
#
|
||||||
|
# We want gnits strictness only when rolling a stable release. For
|
||||||
|
# release candidates, we use version strings like 2.4.3_rc1, but gnits
|
||||||
|
# doesn't like that, so we let the underscore disable gnits. Between
|
||||||
|
# releases, we want to be able run make dist without being required to
|
||||||
|
# add a bogus NEWS entry. In that case, the version string
|
||||||
|
# automatically contains a dash, which we also let disable gnits.
|
||||||
|
AM_INIT_AUTOMAKE([1.11.1 dist-bzip2]
|
||||||
|
m4_bmatch(m4_defn([AC_PACKAGE_VERSION]), [[-_]],
|
||||||
|
[gnu], [gnits]))
|
||||||
AC_CONFIG_HEADERS([lib/config.h:lib/config.hin])
|
AC_CONFIG_HEADERS([lib/config.h:lib/config.hin])
|
||||||
|
|
||||||
# Checks for the compiler.
|
# Checks for the compiler.
|
||||||
@@ -51,23 +62,29 @@ AC_ARG_ENABLE(gcc-warnings,
|
|||||||
esac],
|
esac],
|
||||||
[enableval=no])
|
[enableval=no])
|
||||||
if test "${enableval}" = yes; then
|
if test "${enableval}" = yes; then
|
||||||
gl_WARNING_CFLAGS([-Werror])
|
gl_WARN_ADD([-Werror], [WERROR_CFLAGS])
|
||||||
AC_SUBST([WERROR_CFLAGS], [$WARNING_CFLAGS])
|
AC_SUBST([WERROR_CFLAGS])
|
||||||
WARNING_CFLAGS=
|
gl_WARN_ADD([-Wall])
|
||||||
gl_WARNING_CFLAGS([-Wall])
|
gl_WARN_ADD([-Wextra -Wno-sign-compare])
|
||||||
gl_WARNING_CFLAGS([-Wextra -Wno-sign-compare])
|
gl_WARN_ADD([-Wcast-align])
|
||||||
gl_WARNING_CFLAGS([-Wcast-align])
|
gl_WARN_ADD([-Wcast-qual])
|
||||||
gl_WARNING_CFLAGS([-Wcast-qual])
|
gl_WARN_ADD([-Wformat])
|
||||||
gl_WARNING_CFLAGS([-Wformat])
|
gl_WARN_ADD([-Wpointer-arith])
|
||||||
gl_WARNING_CFLAGS([-Wpointer-arith])
|
gl_WARN_ADD([-Wwrite-strings])
|
||||||
gl_WARNING_CFLAGS([-Wwrite-strings])
|
AC_SUBST([WARN_CXXFLAGS], [$WARN_CFLAGS])
|
||||||
AC_SUBST([WARNING_CXXFLAGS], [$WARNING_CFLAGS])
|
|
||||||
# The following warnings are not suitable for C++.
|
# The following warnings are not suitable for C++.
|
||||||
gl_WARNING_CFLAGS([-Wbad-function-cast])
|
gl_WARN_ADD([-Wbad-function-cast])
|
||||||
gl_WARNING_CFLAGS([-Wmissing-declarations])
|
gl_WARN_ADD([-Wmissing-declarations])
|
||||||
gl_WARNING_CFLAGS([-Wmissing-prototypes])
|
gl_WARN_ADD([-Wmissing-prototypes])
|
||||||
gl_WARNING_CFLAGS([-Wshadow])
|
gl_WARN_ADD([-Wshadow])
|
||||||
gl_WARNING_CFLAGS([-Wstrict-prototypes])
|
gl_WARN_ADD([-Wstrict-prototypes])
|
||||||
|
AC_SUBST([WARN_CFLAGS])
|
||||||
|
# Warnings for the test suite only.
|
||||||
|
gl_WARN_ADD([-Wundef], [WARN_CFLAGS_TEST])
|
||||||
|
WARN_CXXFLAGS_TEST="$WARN_CXXFLAGS $WARN_CFLAGS_TEST"
|
||||||
|
WARN_CFLAGS_TEST="$WARN_CFLAGS $WARN_CFLAGS_TEST"
|
||||||
|
AC_SUBST([WARN_CXXFLAGS_TEST])
|
||||||
|
AC_SUBST([WARN_CFLAGS_TEST])
|
||||||
AC_DEFINE([lint], 1, [Define to 1 if the compiler is checking for lint.])
|
AC_DEFINE([lint], 1, [Define to 1 if the compiler is checking for lint.])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -92,11 +109,10 @@ AC_SUBST([YACC_LIBRARY])
|
|||||||
AC_PROG_LEX
|
AC_PROG_LEX
|
||||||
AC_PROG_YACC
|
AC_PROG_YACC
|
||||||
AC_PROG_RANLIB
|
AC_PROG_RANLIB
|
||||||
BISON_PROG_GNU_M4
|
AC_PROG_GNU_M4
|
||||||
if test x"$ac_cv_prog_gnu_m4" != xyes; then
|
|
||||||
AC_MSG_ERROR([GNU M4 1.4 is required])
|
|
||||||
fi
|
|
||||||
AC_DEFINE_UNQUOTED([M4], ["$M4"], [Define to the GNU M4 executable name.])
|
AC_DEFINE_UNQUOTED([M4], ["$M4"], [Define to the GNU M4 executable name.])
|
||||||
|
AC_DEFINE_UNQUOTED([M4_GNU_OPTION], ["$M4_GNU"], [Define to "-g" if GNU M4
|
||||||
|
supports -g, otherwise to "".])
|
||||||
AM_MISSING_PROG([HELP2MAN], [help2man])
|
AM_MISSING_PROG([HELP2MAN], [help2man])
|
||||||
AC_PATH_PROG([XSLTPROC], [xsltproc])
|
AC_PATH_PROG([XSLTPROC], [xsltproc])
|
||||||
AC_SUBST([XSLTPROC])
|
AC_SUBST([XSLTPROC])
|
||||||
@@ -118,9 +134,10 @@ BISON_PREREQ_SUBPIPE
|
|||||||
BISON_PREREQ_TIMEVAR
|
BISON_PREREQ_TIMEVAR
|
||||||
|
|
||||||
# Gettext.
|
# Gettext.
|
||||||
# We've never tested with gettext versions before 0.15, so play it safe.
|
# We use gnulib, which is only guaranteed to work properly with the
|
||||||
AM_GNU_GETTEXT([external], [need-formatstring-macros])
|
# latest Gettext.
|
||||||
AM_GNU_GETTEXT_VERSION([0.15])
|
AM_GNU_GETTEXT([external], [need-ngettext])
|
||||||
|
AM_GNU_GETTEXT_VERSION([0.18])
|
||||||
BISON_I18N
|
BISON_I18N
|
||||||
|
|
||||||
# Internationalized parsers.
|
# Internationalized parsers.
|
||||||
|
|||||||
+2
-1
@@ -1,4 +1,5 @@
|
|||||||
## Copyright (C) 2002, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
## Copyright (C) 2002, 2005, 2006, 2007, 2008, 2009, 2010 Free
|
||||||
|
## Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+34
-7
@@ -1,31 +1,58 @@
|
|||||||
-*- outline -*-
|
-*- outline -*-
|
||||||
|
|
||||||
This directory contains Bison skeletons: the general shapes of the
|
This directory contains data needed by Bison.
|
||||||
different parser kinds, that are specialized for specific grammars by
|
|
||||||
the bison program.
|
|
||||||
|
|
||||||
Currently, there are only three supported skeletons:
|
* Skeletons
|
||||||
|
Bison skeletons: the general shapes of the different parser kinds,
|
||||||
|
that are specialized for specific grammars by the bison program.
|
||||||
|
|
||||||
|
Currently, the supported skeletons are:
|
||||||
|
|
||||||
- yacc.c
|
- yacc.c
|
||||||
It used to be named bison.simple: it corresponds to C Yacc
|
It used to be named bison.simple: it corresponds to C Yacc
|
||||||
compatible LALR(1) parsers.
|
compatible LALR(1) parsers.
|
||||||
|
|
||||||
- lalr1.cc
|
- lalr1.cc
|
||||||
Produces a C++ parser class. It is still very experimental, and not
|
Produces a C++ parser class.
|
||||||
yet supported. Please, subscribe to [email protected].
|
|
||||||
|
- lalr1.java
|
||||||
|
Produces a Java parser class.
|
||||||
|
|
||||||
- glr.c
|
- glr.c
|
||||||
A Generalized LR C parser based on Bison's LALR(1) tables.
|
A Generalized LR C parser based on Bison's LALR(1) tables.
|
||||||
|
|
||||||
|
- glr.cc
|
||||||
|
A Generalized LR C++ parser. Actually a C++ wrapper around glr.c.
|
||||||
|
|
||||||
These skeletons are the only ones supported by the Bison team.
|
These skeletons are the only ones supported by the Bison team.
|
||||||
Because the interface between skeletons and the bison program is not
|
Because the interface between skeletons and the bison program is not
|
||||||
finished, *we are not bound to it*. In particular, Bison is not
|
finished, *we are not bound to it*. In particular, Bison is not
|
||||||
mature enough for us to consider that ``foreign skeletons'' are
|
mature enough for us to consider that ``foreign skeletons'' are
|
||||||
supported.
|
supported.
|
||||||
|
|
||||||
|
* m4sugar
|
||||||
|
This directory contains M4sugar, sort of an extended library for M4,
|
||||||
|
which is used by Bison to instantiate the skeletons.
|
||||||
|
|
||||||
|
* xslt
|
||||||
|
This directory contains XSLT programs that transform Bison's XML output
|
||||||
|
into various formats.
|
||||||
|
|
||||||
|
- bison.xsl
|
||||||
|
A library of routines used by the other XSLT programs.
|
||||||
|
|
||||||
|
- xml2dot.xsl
|
||||||
|
Conversion into GraphViz's dot format.
|
||||||
|
|
||||||
|
- xml2text.xsl
|
||||||
|
Conversion into text.
|
||||||
|
|
||||||
|
- xml2xhtml.xsl
|
||||||
|
Conversion into XHTML.
|
||||||
|
|
||||||
-----
|
-----
|
||||||
|
|
||||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
Copyright (C) 2002, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Bison.
|
This file is part of GNU Bison.
|
||||||
|
|
||||||
|
|||||||
+6
-6
@@ -1,8 +1,9 @@
|
|||||||
-*- Autoconf -*-
|
-*- Autoconf -*-
|
||||||
|
|
||||||
# Language-independent M4 Macros for Bison.
|
# Language-independent M4 Macros for Bison.
|
||||||
# Copyright (C) 2002, 2004, 2005, 2006, 2007, 2008 Free Software Foundation,
|
|
||||||
# Inc.
|
# Copyright (C) 2002, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
|
||||||
|
# Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -464,10 +465,9 @@ m4_define([b4_percent_define_default],
|
|||||||
[m4_ifndef([b4_percent_define(]$1[)],
|
[m4_ifndef([b4_percent_define(]$1[)],
|
||||||
[m4_define([b4_percent_define(]$1[)], [$2])dnl
|
[m4_define([b4_percent_define(]$1[)], [$2])dnl
|
||||||
m4_define([b4_percent_define_loc(]$1[)],
|
m4_define([b4_percent_define_loc(]$1[)],
|
||||||
[[[[[Bison:b4_percent_define_default]:1.0]], [[[Bison:b4_percent_define_default]:1.0]]]])dnl
|
[[[[<skeleton default value>:-1.-1]],
|
||||||
m4_define([b4_percent_define_syncline(]$1[)],
|
[[<skeleton default value>:-1.-1]]]])dnl
|
||||||
[[]b4_syncline(1, [["[Bison:b4_percent_define_default]"]])[
|
m4_define([b4_percent_define_syncline(]$1[)], [[]])])])
|
||||||
]])])])
|
|
||||||
|
|
||||||
# b4_percent_define_check_values(VALUES)
|
# b4_percent_define_check_values(VALUES)
|
||||||
# --------------------------------------
|
# --------------------------------------
|
||||||
|
|||||||
+2
-1
@@ -1,7 +1,8 @@
|
|||||||
-*- Autoconf -*-
|
-*- Autoconf -*-
|
||||||
|
|
||||||
# C++ skeleton dispatching for Bison.
|
# C++ skeleton dispatching for Bison.
|
||||||
# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
|
|
||||||
|
# Copyright (C) 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+3
-3
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
# C++ skeleton for Bison
|
# C++ skeleton for Bison
|
||||||
|
|
||||||
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation,
|
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
|
||||||
# Inc.
|
# Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -74,7 +74,7 @@ m4_define([b4_namespace_open],
|
|||||||
|
|
||||||
m4_define([b4_namespace_close],
|
m4_define([b4_namespace_close],
|
||||||
[b4_user_code([b4_percent_define_get_syncline([[namespace]])
|
[b4_user_code([b4_percent_define_get_syncline([[namespace]])
|
||||||
m4_bpatsubst(m4_dquote(m4_bpatsubst(m4_dquote(b4_namespace_ref),
|
m4_bpatsubst(m4_dquote(m4_bpatsubst(m4_dquote(b4_namespace_ref[ ]),
|
||||||
[^\(.\)[ ]*\(::\)?\([^][:]\|:[^][:]\)*],
|
[^\(.\)[ ]*\(::\)?\([^][:]\|:[^][:]\)*],
|
||||||
[\1])),
|
[\1])),
|
||||||
[::\([^][:]\|:[^][:]\)*], [} ])[} // ]b4_namespace_ref])])
|
[::\([^][:]\|:[^][:]\)*], [} ])[} // ]b4_namespace_ref])])
|
||||||
|
|||||||
+2
-1
@@ -1,7 +1,8 @@
|
|||||||
-*- Autoconf -*-
|
-*- Autoconf -*-
|
||||||
|
|
||||||
# C skeleton dispatching for Bison.
|
# C skeleton dispatching for Bison.
|
||||||
# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
|
|
||||||
|
# Copyright (C) 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
-*- Autoconf -*-
|
-*- Autoconf -*-
|
||||||
|
|
||||||
# C M4 Macros for Bison.
|
# C M4 Macros for Bison.
|
||||||
# Copyright (C) 2002, 2004, 2005, 2006, 2007, 2008 Free Software
|
|
||||||
# Foundation, Inc.
|
# Copyright (C) 2002, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
|
||||||
|
# Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+13
-11
@@ -1,8 +1,9 @@
|
|||||||
-*- C -*-
|
-*- C -*-
|
||||||
|
|
||||||
# GLR skeleton for Bison
|
# GLR skeleton for Bison
|
||||||
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation,
|
|
||||||
# Inc.
|
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
||||||
|
# 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -148,9 +149,9 @@ m4_define([b4_rhs_location],
|
|||||||
# We do want M4 expansion after # for CPP macros.
|
# We do want M4 expansion after # for CPP macros.
|
||||||
m4_changecom()
|
m4_changecom()
|
||||||
m4_divert_push(0)dnl
|
m4_divert_push(0)dnl
|
||||||
@output(b4_parser_file_name@)
|
@output(b4_parser_file_name@)@
|
||||||
b4_copyright([Skeleton implementation for Bison GLR parsers in C],
|
b4_copyright([Skeleton implementation for Bison GLR parsers in C],
|
||||||
[2002, 2003, 2004, 2005, 2006])
|
[2002, 2003, 2004, 2005, 2006, 2009, 2010])
|
||||||
[
|
[
|
||||||
/* C GLR parser skeleton written by Paul Hilfinger. */
|
/* C GLR parser skeleton written by Paul Hilfinger. */
|
||||||
|
|
||||||
@@ -248,7 +249,7 @@ b4_percent_code_get[]dnl
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#ifndef YY_
|
#ifndef YY_
|
||||||
# if YYENABLE_NLS
|
# if defined YYENABLE_NLS && YYENABLE_NLS
|
||||||
# if ENABLE_NLS
|
# if ENABLE_NLS
|
||||||
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
|
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
|
||||||
# define YY_(msgid) dgettext ("bison-runtime", msgid)
|
# define YY_(msgid) dgettext ("bison-runtime", msgid)
|
||||||
@@ -310,7 +311,8 @@ b4_percent_code_get[]dnl
|
|||||||
#ifndef __attribute__
|
#ifndef __attribute__
|
||||||
/* This feature is available in gcc versions 2.5 and later. */
|
/* This feature is available in gcc versions 2.5 and later. */
|
||||||
# if (! defined __GNUC__ || __GNUC__ < 2 \
|
# if (! defined __GNUC__ || __GNUC__ < 2 \
|
||||||
|| (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__)
|
|| (__GNUC__ == 2 && __GNUC_MINOR__ < 5) \
|
||||||
|
|| (defined __STRICT_ANSI__ && __STRICT_ANSI__))
|
||||||
# define __attribute__(Spec) /* empty */
|
# define __attribute__(Spec) /* empty */
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
@@ -2323,7 +2325,7 @@ yyrecoverSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
|
|||||||
yychar = YYEMPTY;
|
yychar = YYEMPTY;
|
||||||
yylval = yyval_default;
|
yylval = yyval_default;
|
||||||
]b4_locations_if([
|
]b4_locations_if([
|
||||||
#if YYLTYPE_IS_TRIVIAL
|
#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
|
||||||
yylloc.first_line = yylloc.last_line = ]b4_location_initial_line[;
|
yylloc.first_line = yylloc.last_line = ]b4_location_initial_line[;
|
||||||
yylloc.first_column = yylloc.last_column = ]b4_location_initial_column[;
|
yylloc.first_column = yylloc.last_column = ]b4_location_initial_column[;
|
||||||
#endif
|
#endif
|
||||||
@@ -2637,17 +2639,17 @@ dnl glr.cc produces its own header.
|
|||||||
dnl
|
dnl
|
||||||
m4_if(b4_skeleton, ["glr.c"],
|
m4_if(b4_skeleton, ["glr.c"],
|
||||||
[b4_defines_if(
|
[b4_defines_if(
|
||||||
[@output(b4_spec_defines_file@)
|
[@output(b4_spec_defines_file@)@
|
||||||
b4_copyright([Skeleton interface for Bison GLR parsers in C],
|
b4_copyright([Skeleton interface for Bison GLR parsers in C],
|
||||||
[2002, 2003, 2004, 2005, 2006])
|
[2002, 2003, 2004, 2005, 2006, 2009, 2010])
|
||||||
|
|
||||||
b4_shared_declarations
|
b4_shared_declarations
|
||||||
|
|
||||||
b4_pure_if([],
|
b4_pure_if([],
|
||||||
[[extern YYSTYPE b4_prefix][lval;]])
|
[[extern YYSTYPE ]b4_prefix[lval;]])
|
||||||
|
|
||||||
b4_locations_if([b4_pure_if([],
|
b4_locations_if([b4_pure_if([],
|
||||||
[extern YYLTYPE b4_prefix[]lloc;])
|
[extern YYLTYPE ]b4_prefix[lloc;])
|
||||||
])
|
])
|
||||||
])])
|
])])
|
||||||
m4_divert_pop(0)
|
m4_divert_pop(0)
|
||||||
|
|||||||
+5
-4
@@ -1,8 +1,9 @@
|
|||||||
-*- C -*-
|
-*- C -*-
|
||||||
|
|
||||||
# C++ GLR skeleton for Bison
|
# C++ GLR skeleton for Bison
|
||||||
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation,
|
|
||||||
# Inc.
|
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
||||||
|
# 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -217,9 +218,9 @@ m4_include(b4_pkgdatadir/[glr.c])
|
|||||||
m4_popdef([b4_parse_param])
|
m4_popdef([b4_parse_param])
|
||||||
|
|
||||||
m4_divert_push(0)
|
m4_divert_push(0)
|
||||||
@output(b4_spec_defines_file@)
|
@output(b4_spec_defines_file@)@
|
||||||
b4_copyright([Skeleton interface for Bison GLR parsers in C++],
|
b4_copyright([Skeleton interface for Bison GLR parsers in C++],
|
||||||
[2002, 2003, 2004, 2005, 2006])[
|
[2002, 2003, 2004, 2005, 2006, 2009, 2010])[
|
||||||
|
|
||||||
/* C++ GLR parser skeleton written by Akim Demaille. */
|
/* C++ GLR parser skeleton written by Akim Demaille. */
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -1,7 +1,8 @@
|
|||||||
-*- Autoconf -*-
|
-*- Autoconf -*-
|
||||||
|
|
||||||
# Java skeleton dispatching for Bison.
|
# Java skeleton dispatching for Bison.
|
||||||
# Copyright (C) 2007 Free Software Foundation, Inc.
|
|
||||||
|
# Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Java language support for Bison
|
# Java language support for Bison
|
||||||
|
|
||||||
# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
# Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+15
-15
@@ -1,7 +1,7 @@
|
|||||||
# C++ skeleton for Bison
|
# C++ skeleton for Bison
|
||||||
|
|
||||||
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
||||||
# Free Software Foundation, Inc.
|
# 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -33,9 +33,9 @@ m4_include(b4_pkgdatadir/[location.cc])
|
|||||||
m4_changecom()
|
m4_changecom()
|
||||||
m4_divert_push(0)dnl
|
m4_divert_push(0)dnl
|
||||||
b4_defines_if(
|
b4_defines_if(
|
||||||
[@output(b4_spec_defines_file@)
|
[@output(b4_spec_defines_file@)@
|
||||||
b4_copyright([Skeleton interface for Bison LALR(1) parsers in C++],
|
b4_copyright([Skeleton interface for Bison LALR(1) parsers in C++],
|
||||||
[2002, 2003, 2004, 2005, 2006, 2007, 2008])
|
[2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010])
|
||||||
dnl FIXME: This is wrong, we want computed header guards.
|
dnl FIXME: This is wrong, we want computed header guards.
|
||||||
[
|
[
|
||||||
/* C++ LALR(1) parser skeleton written by Akim Demaille. */
|
/* C++ LALR(1) parser skeleton written by Akim Demaille. */
|
||||||
@@ -298,9 +298,9 @@ b4_percent_code_get([[provides]])[]dnl
|
|||||||
|
|
||||||
[#endif /* ! defined PARSER_HEADER_H */]
|
[#endif /* ! defined PARSER_HEADER_H */]
|
||||||
])dnl
|
])dnl
|
||||||
@output(b4_parser_file_name@)
|
@output(b4_parser_file_name@)@
|
||||||
b4_copyright([Skeleton implementation for Bison LALR(1) parsers in C++],
|
b4_copyright([Skeleton implementation for Bison LALR(1) parsers in C++],
|
||||||
[2002, 2003, 2004, 2005, 2006, 2007, 2008])
|
[2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010])
|
||||||
b4_percent_code_get([[top]])[]dnl
|
b4_percent_code_get([[top]])[]dnl
|
||||||
m4_if(b4_prefix, [yy], [],
|
m4_if(b4_prefix, [yy], [],
|
||||||
[
|
[
|
||||||
@@ -318,7 +318,7 @@ b4_defines_if([[
|
|||||||
b4_percent_code_get[]dnl
|
b4_percent_code_get[]dnl
|
||||||
|
|
||||||
[#ifndef YY_
|
[#ifndef YY_
|
||||||
# if YYENABLE_NLS
|
# if defined YYENABLE_NLS && YYENABLE_NLS
|
||||||
# if ENABLE_NLS
|
# if ENABLE_NLS
|
||||||
# include <libintl.h> /* FIXME: INFRINGES ON USER NAME SPACE */
|
# include <libintl.h> /* FIXME: INFRINGES ON USER NAME SPACE */
|
||||||
# define YY_(msgid) dgettext ("bison-runtime", msgid)
|
# define YY_(msgid) dgettext ("bison-runtime", msgid)
|
||||||
@@ -539,7 +539,7 @@ do { \
|
|||||||
/// Location of the lookahead.
|
/// Location of the lookahead.
|
||||||
location_type yylloc;
|
location_type yylloc;
|
||||||
/// The locations where the error started and ended.
|
/// The locations where the error started and ended.
|
||||||
location_type yyerror_range[2];
|
location_type yyerror_range[3];
|
||||||
|
|
||||||
/// $$.
|
/// $$.
|
||||||
semantic_type yyval;
|
semantic_type yyval;
|
||||||
@@ -710,7 +710,7 @@ m4_ifdef([b4_lex_param], [, ]b4_lex_param))[;
|
|||||||
b4_error_verbose_if([, yytoken])[));
|
b4_error_verbose_if([, yytoken])[));
|
||||||
}
|
}
|
||||||
|
|
||||||
yyerror_range[0] = yylloc;
|
yyerror_range[1] = yylloc;
|
||||||
if (yyerrstatus_ == 3)
|
if (yyerrstatus_ == 3)
|
||||||
{
|
{
|
||||||
/* If just tried and failed to reuse lookahead token after an
|
/* If just tried and failed to reuse lookahead token after an
|
||||||
@@ -745,7 +745,7 @@ b4_error_verbose_if([, yytoken])[));
|
|||||||
if (false)
|
if (false)
|
||||||
goto yyerrorlab;
|
goto yyerrorlab;
|
||||||
|
|
||||||
yyerror_range[0] = yylocation_stack_[yylen - 1];
|
yyerror_range[1] = yylocation_stack_[yylen - 1];
|
||||||
/* Do not reclaim the symbols of the rule which action triggered
|
/* Do not reclaim the symbols of the rule which action triggered
|
||||||
this YYERROR. */
|
this YYERROR. */
|
||||||
yypop_ (yylen);
|
yypop_ (yylen);
|
||||||
@@ -777,7 +777,7 @@ b4_error_verbose_if([, yytoken])[));
|
|||||||
if (yystate_stack_.height () == 1)
|
if (yystate_stack_.height () == 1)
|
||||||
YYABORT;
|
YYABORT;
|
||||||
|
|
||||||
yyerror_range[0] = yylocation_stack_[0];
|
yyerror_range[1] = yylocation_stack_[0];
|
||||||
yydestruct_ ("Error: popping",
|
yydestruct_ ("Error: popping",
|
||||||
yystos_[yystate],
|
yystos_[yystate],
|
||||||
&yysemantic_stack_[0], &yylocation_stack_[0]);
|
&yysemantic_stack_[0], &yylocation_stack_[0]);
|
||||||
@@ -786,10 +786,10 @@ b4_error_verbose_if([, yytoken])[));
|
|||||||
YY_STACK_PRINT ();
|
YY_STACK_PRINT ();
|
||||||
}
|
}
|
||||||
|
|
||||||
yyerror_range[1] = yylloc;
|
yyerror_range[2] = yylloc;
|
||||||
// Using YYLLOC is tempting, but would change the location of
|
// Using YYLLOC is tempting, but would change the location of
|
||||||
// the lookahead. YYLOC is available though.
|
// the lookahead. YYLOC is available though.
|
||||||
YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
|
YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
|
||||||
yysemantic_stack_.push (yylval);
|
yysemantic_stack_.push (yylval);
|
||||||
yylocation_stack_.push (yyloc);
|
yylocation_stack_.push (yyloc);
|
||||||
|
|
||||||
@@ -1055,9 +1055,9 @@ b4_error_verbose_if([, int tok])[)
|
|||||||
|
|
||||||
]b4_epilogue
|
]b4_epilogue
|
||||||
dnl
|
dnl
|
||||||
@output(b4_dir_prefix[]stack.hh@)
|
@output(b4_dir_prefix[]stack.hh@)@
|
||||||
b4_copyright([Stack handling for Bison parsers in C++],
|
b4_copyright([Stack handling for Bison parsers in C++],
|
||||||
[2002, 2003, 2004, 2005, 2006, 2007, 2008])[
|
[2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010])[
|
||||||
|
|
||||||
#ifndef BISON_STACK_HH
|
#ifndef BISON_STACK_HH
|
||||||
# define BISON_STACK_HH
|
# define BISON_STACK_HH
|
||||||
|
|||||||
+5
-4
@@ -1,6 +1,6 @@
|
|||||||
# Java skeleton for Bison -*- autoconf -*-
|
# Java skeleton for Bison -*- autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
# Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -23,9 +23,9 @@ m4_ifval(m4_defn([b4_symbol_destructors]),
|
|||||||
[])
|
[])
|
||||||
|
|
||||||
m4_divert_push(0)dnl
|
m4_divert_push(0)dnl
|
||||||
@output(b4_parser_file_name@)
|
@output(b4_parser_file_name@)@
|
||||||
b4_copyright([Skeleton implementation for Bison LALR(1) parsers in Java],
|
b4_copyright([Skeleton implementation for Bison LALR(1) parsers in Java],
|
||||||
[2007, 2008])
|
[2007, 2008, 2009, 2010])
|
||||||
|
|
||||||
b4_percent_define_ifdef([package], [package b4_percent_define_get([package]);
|
b4_percent_define_ifdef([package], [package b4_percent_define_get([package]);
|
||||||
])[/* First part of user declarations. */
|
])[/* First part of user declarations. */
|
||||||
@@ -310,7 +310,8 @@ b4_lexer_if([[
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returned by a Bison action in order to print an error message and start
|
* Returned by a Bison action in order to print an error message and start
|
||||||
* error recovery. */
|
* error recovery. Formally deprecated in Bison 2.4.2's NEWS entry, where
|
||||||
|
* a plan to phase it out is discussed. */
|
||||||
public static final int YYFAIL = 3;
|
public static final int YYFAIL = 3;
|
||||||
|
|
||||||
private static final int YYNEWSTATE = 4;
|
private static final int YYNEWSTATE = 4;
|
||||||
|
|||||||
+11
-10
@@ -1,7 +1,7 @@
|
|||||||
# C++ skeleton for Bison
|
# C++ skeleton for Bison
|
||||||
|
|
||||||
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation,
|
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
|
||||||
# Inc.
|
# Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -19,9 +19,9 @@
|
|||||||
# We do want M4 expansion after # for CPP macros.
|
# We do want M4 expansion after # for CPP macros.
|
||||||
m4_changecom()
|
m4_changecom()
|
||||||
m4_divert_push(0)dnl
|
m4_divert_push(0)dnl
|
||||||
@output(b4_dir_prefix[]position.hh@)
|
@output(b4_dir_prefix[]position.hh@)@
|
||||||
b4_copyright([Positions for Bison parsers in C++],
|
b4_copyright([Positions for Bison parsers in C++],
|
||||||
[2002, 2003, 2004, 2005, 2006])[
|
[2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010])[
|
||||||
|
|
||||||
/**
|
/**
|
||||||
** \file position.hh
|
** \file position.hh
|
||||||
@@ -116,10 +116,11 @@ b4_copyright([Positions for Bison parsers in C++],
|
|||||||
inline bool
|
inline bool
|
||||||
operator== (const position& pos1, const position& pos2)
|
operator== (const position& pos1, const position& pos2)
|
||||||
{
|
{
|
||||||
return
|
return (pos1.line == pos2.line
|
||||||
(pos1.filename == pos2.filename
|
&& pos1.column == pos2.column
|
||||||
|| pos1.filename && pos2.filename && *pos1.filename == *pos2.filename)
|
&& (pos1.filename == pos2.filename
|
||||||
&& pos1.line == pos2.line && pos1.column == pos2.column;
|
|| (pos1.filename && pos2.filename
|
||||||
|
&& *pos1.filename == *pos2.filename)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Compare two position objects.
|
/// Compare two position objects.
|
||||||
@@ -143,9 +144,9 @@ b4_copyright([Positions for Bison parsers in C++],
|
|||||||
|
|
||||||
]b4_namespace_close[
|
]b4_namespace_close[
|
||||||
#endif // not BISON_POSITION_HH]
|
#endif // not BISON_POSITION_HH]
|
||||||
@output(b4_dir_prefix[]location.hh@)
|
@output(b4_dir_prefix[]location.hh@)@
|
||||||
b4_copyright([Locations for Bison parsers in C++],
|
b4_copyright([Locations for Bison parsers in C++],
|
||||||
[2002, 2003, 2004, 2005, 2006])[
|
[2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010])[
|
||||||
|
|
||||||
/**
|
/**
|
||||||
** \file location.hh
|
** \file location.hh
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
<!--
|
<!--
|
||||||
bison.xsl - common templates for Bison XSLT.
|
bison.xsl - common templates for Bison XSLT.
|
||||||
|
|
||||||
Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of Bison, the GNU Compiler Compiler.
|
This file is part of Bison, the GNU Compiler Compiler.
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<!--
|
<!--
|
||||||
xml2dot.xsl - transform Bison XML Report into DOT.
|
xml2dot.xsl - transform Bison XML Report into DOT.
|
||||||
|
|
||||||
Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of Bison, the GNU Compiler Compiler.
|
This file is part of Bison, the GNU Compiler Compiler.
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<!--
|
<!--
|
||||||
xml2text.xsl - transform Bison XML Report into plain text.
|
xml2text.xsl - transform Bison XML Report into plain text.
|
||||||
|
|
||||||
Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of Bison, the GNU Compiler Compiler.
|
This file is part of Bison, the GNU Compiler Compiler.
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<!--
|
<!--
|
||||||
xml2html.xsl - transform Bison XML Report into XHTML.
|
xml2html.xsl - transform Bison XML Report into XHTML.
|
||||||
|
|
||||||
Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of Bison, the GNU Compiler Compiler.
|
This file is part of Bison, the GNU Compiler Compiler.
|
||||||
|
|
||||||
|
|||||||
+27
-18
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
# Yacc compatible skeleton for Bison
|
# Yacc compatible skeleton for Bison
|
||||||
|
|
||||||
# Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
# Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005,
|
||||||
# 2007, 2008 Free Software Foundation, Inc.
|
# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -153,9 +153,9 @@ m4_define([b4_rhs_location],
|
|||||||
# We do want M4 expansion after # for CPP macros.
|
# We do want M4 expansion after # for CPP macros.
|
||||||
m4_changecom()
|
m4_changecom()
|
||||||
m4_divert_push(0)dnl
|
m4_divert_push(0)dnl
|
||||||
@output(b4_parser_file_name@)
|
@output(b4_parser_file_name@)@
|
||||||
b4_copyright([Skeleton implementation for Bison's Yacc-like parsers in C],dnl '
|
b4_copyright([Skeleton implementation for Bison's Yacc-like parsers in C],
|
||||||
[1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006])[
|
[1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010])[
|
||||||
|
|
||||||
/* C LALR(1) parser skeleton written by Richard Stallman, by
|
/* C LALR(1) parser skeleton written by Richard Stallman, by
|
||||||
simplifying the original so-called "semantic" parser. */
|
simplifying the original so-called "semantic" parser. */
|
||||||
@@ -310,7 +310,7 @@ typedef short int yytype_int16;
|
|||||||
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
|
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
|
||||||
|
|
||||||
#ifndef YY_
|
#ifndef YY_
|
||||||
# if YYENABLE_NLS
|
# if defined YYENABLE_NLS && YYENABLE_NLS
|
||||||
# if ENABLE_NLS
|
# if ENABLE_NLS
|
||||||
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
|
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
|
||||||
# define YY_(msgid) dgettext ("bison-runtime", msgid)
|
# define YY_(msgid) dgettext ("bison-runtime", msgid)
|
||||||
@@ -609,9 +609,18 @@ static const ]b4_int_type_for([b4_stos])[ yystos[] =
|
|||||||
|
|
||||||
/* Like YYERROR except do call yyerror. This remains here temporarily
|
/* Like YYERROR except do call yyerror. This remains here temporarily
|
||||||
to ease the transition to the new meaning of YYERROR, for GCC.
|
to ease the transition to the new meaning of YYERROR, for GCC.
|
||||||
Once GCC version 2 has supplanted version 1, this can go. */
|
Once GCC version 2 has supplanted version 1, this can go. However,
|
||||||
|
YYFAIL appears to be in use. Nevertheless, it is formally deprecated
|
||||||
|
in Bison 2.4.2's NEWS entry, where a plan to phase it out is
|
||||||
|
discussed. */
|
||||||
|
|
||||||
#define YYFAIL goto yyerrlab
|
#define YYFAIL goto yyerrlab
|
||||||
|
#if defined YYFAIL
|
||||||
|
/* This is here to suppress warnings from the GCC cpp's
|
||||||
|
-Wunused-macros. Normally we don't worry about that warning, but
|
||||||
|
some users do, and we want to make it easy for users to remove
|
||||||
|
YYFAIL uses, which will produce warnings from Bison 2.5. */
|
||||||
|
#endif
|
||||||
|
|
||||||
#define YYRECOVERING() (!!yyerrstatus)
|
#define YYRECOVERING() (!!yyerrstatus)
|
||||||
|
|
||||||
@@ -668,7 +677,7 @@ while (YYID (0))
|
|||||||
we won't break user code: when these are the locations we know. */
|
we won't break user code: when these are the locations we know. */
|
||||||
|
|
||||||
#ifndef YY_LOCATION_PRINT
|
#ifndef YY_LOCATION_PRINT
|
||||||
# if YYLTYPE_IS_TRIVIAL
|
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
|
||||||
# define YY_LOCATION_PRINT(File, Loc) \
|
# define YY_LOCATION_PRINT(File, Loc) \
|
||||||
fprintf (File, "%d.%d-%d.%d", \
|
fprintf (File, "%d.%d-%d.%d", \
|
||||||
(Loc).first_line, (Loc).first_column, \
|
(Loc).first_line, (Loc).first_column, \
|
||||||
@@ -1063,7 +1072,7 @@ m4_define([b4_declare_parser_state_variables],
|
|||||||
YYLTYPE *yylsp;
|
YYLTYPE *yylsp;
|
||||||
|
|
||||||
/* The locations where the error started and ended. */
|
/* The locations where the error started and ended. */
|
||||||
YYLTYPE yyerror_range[2];
|
YYLTYPE yyerror_range[3];
|
||||||
]])[
|
]])[
|
||||||
YYSIZE_T yystacksize;
|
YYSIZE_T yystacksize;
|
||||||
]])
|
]])
|
||||||
@@ -1234,7 +1243,7 @@ b4_push_if([b4_pure_if([], [[ int yypushed_char = yychar;
|
|||||||
yyvsp = yyvs;]b4_locations_if([[
|
yyvsp = yyvs;]b4_locations_if([[
|
||||||
yylsp = yyls;
|
yylsp = yyls;
|
||||||
|
|
||||||
#if YYLTYPE_IS_TRIVIAL
|
#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
|
||||||
/* Initialize the default location before parsing starts. */
|
/* Initialize the default location before parsing starts. */
|
||||||
yylloc.first_line = yylloc.last_line = ]b4_location_initial_line[;
|
yylloc.first_line = yylloc.last_line = ]b4_location_initial_line[;
|
||||||
yylloc.first_column = yylloc.last_column = ]b4_location_initial_column[;
|
yylloc.first_column = yylloc.last_column = ]b4_location_initial_column[;
|
||||||
@@ -1524,7 +1533,7 @@ yyerrlab:
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
]b4_locations_if([[ yyerror_range[0] = yylloc;]])[
|
]b4_locations_if([[ yyerror_range[1] = yylloc;]])[
|
||||||
|
|
||||||
if (yyerrstatus == 3)
|
if (yyerrstatus == 3)
|
||||||
{
|
{
|
||||||
@@ -1561,7 +1570,7 @@ yyerrorlab:
|
|||||||
if (/*CONSTCOND*/ 0)
|
if (/*CONSTCOND*/ 0)
|
||||||
goto yyerrorlab;
|
goto yyerrorlab;
|
||||||
|
|
||||||
]b4_locations_if([[ yyerror_range[0] = yylsp[1-yylen];
|
]b4_locations_if([[ yyerror_range[1] = yylsp[1-yylen];
|
||||||
]])[ /* Do not reclaim the symbols of the rule which action triggered
|
]])[ /* Do not reclaim the symbols of the rule which action triggered
|
||||||
this YYERROR. */
|
this YYERROR. */
|
||||||
YYPOPSTACK (yylen);
|
YYPOPSTACK (yylen);
|
||||||
@@ -1595,7 +1604,7 @@ yyerrlab1:
|
|||||||
if (yyssp == yyss)
|
if (yyssp == yyss)
|
||||||
YYABORT;
|
YYABORT;
|
||||||
|
|
||||||
]b4_locations_if([[ yyerror_range[0] = *yylsp;]])[
|
]b4_locations_if([[ yyerror_range[1] = *yylsp;]])[
|
||||||
yydestruct ("Error: popping",
|
yydestruct ("Error: popping",
|
||||||
yystos[yystate], yyvsp]b4_locations_if([, yylsp])[]b4_user_args[);
|
yystos[yystate], yyvsp]b4_locations_if([, yylsp])[]b4_user_args[);
|
||||||
YYPOPSTACK (1);
|
YYPOPSTACK (1);
|
||||||
@@ -1605,10 +1614,10 @@ yyerrlab1:
|
|||||||
|
|
||||||
*++yyvsp = yylval;
|
*++yyvsp = yylval;
|
||||||
]b4_locations_if([[
|
]b4_locations_if([[
|
||||||
yyerror_range[1] = yylloc;
|
yyerror_range[2] = yylloc;
|
||||||
/* Using YYLLOC is tempting, but would change the location of
|
/* Using YYLLOC is tempting, but would change the location of
|
||||||
the lookahead. YYLOC is available though. */
|
the lookahead. YYLOC is available though. */
|
||||||
YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
|
YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
|
||||||
*++yylsp = yyloc;]])[
|
*++yylsp = yyloc;]])[
|
||||||
|
|
||||||
/* Shift the error token. */
|
/* Shift the error token. */
|
||||||
@@ -1674,9 +1683,9 @@ yypushreturn:
|
|||||||
|
|
||||||
]b4_epilogue
|
]b4_epilogue
|
||||||
b4_defines_if(
|
b4_defines_if(
|
||||||
[@output(b4_spec_defines_file@)
|
[@output(b4_spec_defines_file@)@
|
||||||
b4_copyright([Skeleton interface for Bison's Yacc-like parsers in C],dnl '
|
b4_copyright([Skeleton interface for Bison's Yacc-like parsers in C],
|
||||||
[1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006])
|
[1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010])
|
||||||
|
|
||||||
b4_percent_code_get([[requires]])[]dnl
|
b4_percent_code_get([[requires]])[]dnl
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
# DJGPP Maintainer's Makefile -*-Makefile-*-
|
# DJGPP Maintainer's Makefile -*-Makefile-*-
|
||||||
# Requires GNU sed
|
# Requires GNU sed
|
||||||
|
|
||||||
## Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
## Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software
|
||||||
|
## Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+2
-1
@@ -1,6 +1,7 @@
|
|||||||
This is a port of GNU Bison @VERSION@ to MSDOS/DJGPP.
|
This is a port of GNU Bison @VERSION@ to MSDOS/DJGPP.
|
||||||
|
|
||||||
Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software
|
||||||
|
Foundation, Inc.
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+2
-1
@@ -4,7 +4,8 @@ Rem Configure Bison for DJGPP.
|
|||||||
Rem WARNING WARNING WARNING: This file needs to have DOS CRLF end-of-line
|
Rem WARNING WARNING WARNING: This file needs to have DOS CRLF end-of-line
|
||||||
Rem format, or else stock DOS/Windows shells will refuse to run it.
|
Rem format, or else stock DOS/Windows shells will refuse to run it.
|
||||||
|
|
||||||
Rem Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
Rem Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software
|
||||||
|
Rem Foundation, Inc.
|
||||||
|
|
||||||
Rem This program is free software: you can redistribute it and/or modify
|
Rem This program is free software: you can redistribute it and/or modify
|
||||||
Rem it under the terms of the GNU General Public License as published by
|
Rem it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+2
-2
@@ -2,8 +2,8 @@
|
|||||||
# Sed script for additional DJGPP specific editing
|
# Sed script for additional DJGPP specific editing
|
||||||
# of the configure script generated by autoconf 2.62.
|
# of the configure script generated by autoconf 2.62.
|
||||||
|
|
||||||
|
# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software
|
||||||
# Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
# Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+2
-1
@@ -3,7 +3,8 @@
|
|||||||
# This is the config.site file for configuring GNU packages
|
# This is the config.site file for configuring GNU packages
|
||||||
# which are to be built with DJGPP tools.
|
# which are to be built with DJGPP tools.
|
||||||
|
|
||||||
# Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software
|
||||||
|
# Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+2
-1
@@ -1,6 +1,7 @@
|
|||||||
# sed script for DJGPP specific editing of config.hin
|
# sed script for DJGPP specific editing of config.hin
|
||||||
|
|
||||||
# Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software
|
||||||
|
# Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+2
-1
@@ -7,7 +7,8 @@ Rem This batch file unpacks the Bison distribution while simultaneously
|
|||||||
Rem renaming some of the files whose names are invalid on DOS or conflict
|
Rem renaming some of the files whose names are invalid on DOS or conflict
|
||||||
Rem with other file names after truncation to DOS 8+3 namespace.
|
Rem with other file names after truncation to DOS 8+3 namespace.
|
||||||
Rem
|
Rem
|
||||||
Rem Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
Rem Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software
|
||||||
|
Rem Foundation, Inc.
|
||||||
Rem
|
Rem
|
||||||
Rem This program is free software: you can redistribute it and/or modify
|
Rem This program is free software: you can redistribute it and/or modify
|
||||||
Rem it under the terms of the GNU General Public License as published by
|
Rem it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+2
-1
@@ -1,6 +1,7 @@
|
|||||||
/* Subprocesses with pipes.
|
/* Subprocesses with pipes.
|
||||||
|
|
||||||
Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software
|
||||||
|
Foundation, Inc.
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+3
-1
@@ -1,5 +1,7 @@
|
|||||||
/* Subprocesses with pipes.
|
/* Subprocesses with pipes.
|
||||||
Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software
|
||||||
|
Foundation, Inc.
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+1
-2
@@ -2,8 +2,7 @@
|
|||||||
# Sed script for additional DJGPP specific editing
|
# Sed script for additional DJGPP specific editing
|
||||||
# of the testsuite script generated by autoconf 2.61.
|
# of the testsuite script generated by autoconf 2.61.
|
||||||
|
|
||||||
|
# Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||||
# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+3
-2
@@ -1,4 +1,6 @@
|
|||||||
|
*.info*
|
||||||
Makefile
|
Makefile
|
||||||
|
Makefile.in
|
||||||
bison.1
|
bison.1
|
||||||
bison.aux
|
bison.aux
|
||||||
bison.cp
|
bison.cp
|
||||||
@@ -15,11 +17,10 @@ bison.toc
|
|||||||
bison.tp
|
bison.tp
|
||||||
bison.vr
|
bison.vr
|
||||||
cross-options.texi
|
cross-options.texi
|
||||||
Makefile.in
|
gendocs_template
|
||||||
refcard.dvi
|
refcard.dvi
|
||||||
refcard.log
|
refcard.log
|
||||||
refcard.ps
|
refcard.ps
|
||||||
*.info*
|
|
||||||
stamp-vti
|
stamp-vti
|
||||||
version.texi
|
version.texi
|
||||||
yacc.1
|
yacc.1
|
||||||
|
|||||||
+3
-2
@@ -1,4 +1,6 @@
|
|||||||
|
/*.info*
|
||||||
/Makefile
|
/Makefile
|
||||||
|
/Makefile.in
|
||||||
/bison.1
|
/bison.1
|
||||||
/bison.aux
|
/bison.aux
|
||||||
/bison.cp
|
/bison.cp
|
||||||
@@ -15,11 +17,10 @@
|
|||||||
/bison.tp
|
/bison.tp
|
||||||
/bison.vr
|
/bison.vr
|
||||||
/cross-options.texi
|
/cross-options.texi
|
||||||
/Makefile.in
|
/gendocs_template
|
||||||
/refcard.dvi
|
/refcard.dvi
|
||||||
/refcard.log
|
/refcard.log
|
||||||
/refcard.ps
|
/refcard.ps
|
||||||
/*.info*
|
|
||||||
/stamp-vti
|
/stamp-vti
|
||||||
/version.texi
|
/version.texi
|
||||||
/yacc.1
|
/yacc.1
|
||||||
|
|||||||
+3
-2
@@ -1,6 +1,7 @@
|
|||||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||||
## Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007, 2008 Free Software
|
|
||||||
## Foundation, Inc.
|
## Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010
|
||||||
|
## Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+94
-95
@@ -33,14 +33,14 @@
|
|||||||
This manual (@value{UPDATED}) is for @acronym{GNU} Bison (version
|
This manual (@value{UPDATED}) is for @acronym{GNU} Bison (version
|
||||||
@value{VERSION}), the @acronym{GNU} parser generator.
|
@value{VERSION}), the @acronym{GNU} parser generator.
|
||||||
|
|
||||||
Copyright @copyright{} 1988, 1989, 1990, 1991, 1992, 1993, 1995, 1998,
|
Copyright @copyright{} 1988, 1989, 1990, 1991, 1992, 1993, 1995, 1998, 1999,
|
||||||
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software
|
2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
|
||||||
Foundation, Inc.
|
Software Foundation, Inc.
|
||||||
|
|
||||||
@quotation
|
@quotation
|
||||||
Permission is granted to copy, distribute and/or modify this document
|
Permission is granted to copy, distribute and/or modify this document
|
||||||
under the terms of the @acronym{GNU} Free Documentation License,
|
under the terms of the @acronym{GNU} Free Documentation License,
|
||||||
Version 1.2 or any later version published by the Free Software
|
Version 1.3 or any later version published by the Free Software
|
||||||
Foundation; with no Invariant Sections, with the Front-Cover texts
|
Foundation; with no Invariant Sections, with the Front-Cover texts
|
||||||
being ``A @acronym{GNU} Manual,'' and with the Back-Cover Texts as in
|
being ``A @acronym{GNU} Manual,'' and with the Back-Cover Texts as in
|
||||||
(a) below. A copy of the license is included in the section entitled
|
(a) below. A copy of the license is included in the section entitled
|
||||||
@@ -90,7 +90,7 @@ Cover art by Etienne Suvasa.
|
|||||||
* Introduction::
|
* Introduction::
|
||||||
* Conditions::
|
* Conditions::
|
||||||
* Copying:: The @acronym{GNU} General Public License says
|
* Copying:: The @acronym{GNU} General Public License says
|
||||||
how you can copy and share Bison
|
how you can copy and share Bison.
|
||||||
|
|
||||||
Tutorial sections:
|
Tutorial sections:
|
||||||
* Concepts:: Basic concepts for understanding Bison.
|
* Concepts:: Basic concepts for understanding Bison.
|
||||||
@@ -152,13 +152,13 @@ Examples
|
|||||||
|
|
||||||
Reverse Polish Notation Calculator
|
Reverse Polish Notation Calculator
|
||||||
|
|
||||||
* Decls: Rpcalc Decls. Prologue (declarations) for rpcalc.
|
* Rpcalc Declarations:: Prologue (declarations) for rpcalc.
|
||||||
* Rules: Rpcalc Rules. Grammar Rules for rpcalc, with explanation.
|
* Rpcalc Rules:: Grammar Rules for rpcalc, with explanation.
|
||||||
* Lexer: Rpcalc Lexer. The lexical analyzer.
|
* Rpcalc Lexer:: The lexical analyzer.
|
||||||
* Main: Rpcalc Main. The controlling function.
|
* Rpcalc Main:: The controlling function.
|
||||||
* Error: Rpcalc Error. The error reporting function.
|
* Rpcalc Error:: The error reporting function.
|
||||||
* Gen: Rpcalc Gen. Running Bison on the grammar file.
|
* Rpcalc Generate:: Running Bison on the grammar file.
|
||||||
* Comp: Rpcalc Compile. Run the C compiler on the output code.
|
* Rpcalc Compile:: Run the C compiler on the output code.
|
||||||
|
|
||||||
Grammar Rules for @code{rpcalc}
|
Grammar Rules for @code{rpcalc}
|
||||||
|
|
||||||
@@ -168,15 +168,15 @@ Grammar Rules for @code{rpcalc}
|
|||||||
|
|
||||||
Location Tracking Calculator: @code{ltcalc}
|
Location Tracking Calculator: @code{ltcalc}
|
||||||
|
|
||||||
* Decls: Ltcalc Decls. Bison and C declarations for ltcalc.
|
* Ltcalc Declarations:: Bison and C declarations for ltcalc.
|
||||||
* Rules: Ltcalc Rules. Grammar rules for ltcalc, with explanations.
|
* Ltcalc Rules:: Grammar rules for ltcalc, with explanations.
|
||||||
* Lexer: Ltcalc Lexer. The lexical analyzer.
|
* Ltcalc Lexer:: The lexical analyzer.
|
||||||
|
|
||||||
Multi-Function Calculator: @code{mfcalc}
|
Multi-Function Calculator: @code{mfcalc}
|
||||||
|
|
||||||
* Decl: Mfcalc Decl. Bison declarations for multi-function calculator.
|
* Mfcalc Declarations:: Bison declarations for multi-function calculator.
|
||||||
* Rules: Mfcalc Rules. Grammar rules for the calculator.
|
* Mfcalc Rules:: Grammar rules for the calculator.
|
||||||
* Symtab: Mfcalc Symtab. Symbol table management subroutines.
|
* Mfcalc Symbol Table:: Symbol table management subroutines.
|
||||||
|
|
||||||
Bison Grammar Files
|
Bison Grammar Files
|
||||||
|
|
||||||
@@ -231,6 +231,10 @@ Bison Declarations
|
|||||||
Parser C-Language Interface
|
Parser C-Language Interface
|
||||||
|
|
||||||
* Parser Function:: How to call @code{yyparse} and what it returns.
|
* Parser Function:: How to call @code{yyparse} and what it returns.
|
||||||
|
* Push Parser Function:: How to call @code{yypush_parse} and what it returns.
|
||||||
|
* Pull Parser Function:: How to call @code{yypull_parse} and what it returns.
|
||||||
|
* Parser Create Function:: How to call @code{yypstate_new} and what it returns.
|
||||||
|
* Parser Delete Function:: How to call @code{yypstate_delete} and what it returns.
|
||||||
* Lexical:: You must supply a function @code{yylex}
|
* Lexical:: You must supply a function @code{yylex}
|
||||||
which reads tokens.
|
which reads tokens.
|
||||||
* Error Reporting:: You must supply a function @code{yyerror}.
|
* Error Reporting:: You must supply a function @code{yyerror}.
|
||||||
@@ -246,8 +250,8 @@ The Lexical Analyzer Function @code{yylex}
|
|||||||
* Token Locations:: How @code{yylex} must return the text location
|
* Token Locations:: How @code{yylex} must return the text location
|
||||||
(line number, etc.) of the token, if the
|
(line number, etc.) of the token, if the
|
||||||
actions want that.
|
actions want that.
|
||||||
* Pure Calling:: How the calling convention differs
|
* Pure Calling:: How the calling convention differs in a pure parser
|
||||||
in a pure parser (@pxref{Pure Decl, ,A Pure (Reentrant) Parser}).
|
(@pxref{Pure Decl, ,A Pure (Reentrant) Parser}).
|
||||||
|
|
||||||
The Bison Parser Algorithm
|
The Bison Parser Algorithm
|
||||||
|
|
||||||
@@ -316,7 +320,7 @@ Java Parsers
|
|||||||
* Java Location Values:: The position and location classes
|
* Java Location Values:: The position and location classes
|
||||||
* Java Parser Interface:: Instantiating and running the parser
|
* Java Parser Interface:: Instantiating and running the parser
|
||||||
* Java Scanner Interface:: Specifying the scanner for the parser
|
* Java Scanner Interface:: Specifying the scanner for the parser
|
||||||
* Java Action Features:: Special features for use in actions.
|
* Java Action Features:: Special features for use in actions
|
||||||
* Java Differences:: Differences between C/C++ and Java Grammars
|
* Java Differences:: Differences between C/C++ and Java Grammars
|
||||||
* Java Declarations Summary:: List of Bison declarations used with Java
|
* Java Declarations Summary:: List of Bison declarations used with Java
|
||||||
|
|
||||||
@@ -331,7 +335,7 @@ Frequently Asked Questions
|
|||||||
* I can't build Bison:: Troubleshooting
|
* I can't build Bison:: Troubleshooting
|
||||||
* Where can I find help?:: Troubleshouting
|
* Where can I find help?:: Troubleshouting
|
||||||
* Bug Reports:: Troublereporting
|
* Bug Reports:: Troublereporting
|
||||||
* Other Languages:: Parsers in Java and others
|
* More Languages:: Parsers in C++, Java, and so on
|
||||||
* Beta Testing:: Experimenting development versions
|
* Beta Testing:: Experimenting development versions
|
||||||
* Mailing Lists:: Meeting other Bison users
|
* Mailing Lists:: Meeting other Bison users
|
||||||
|
|
||||||
@@ -1403,16 +1407,16 @@ The source code for this calculator is named @file{rpcalc.y}. The
|
|||||||
@samp{.y} extension is a convention used for Bison input files.
|
@samp{.y} extension is a convention used for Bison input files.
|
||||||
|
|
||||||
@menu
|
@menu
|
||||||
* Decls: Rpcalc Decls. Prologue (declarations) for rpcalc.
|
* Rpcalc Declarations:: Prologue (declarations) for rpcalc.
|
||||||
* Rules: Rpcalc Rules. Grammar Rules for rpcalc, with explanation.
|
* Rpcalc Rules:: Grammar Rules for rpcalc, with explanation.
|
||||||
* Lexer: Rpcalc Lexer. The lexical analyzer.
|
* Rpcalc Lexer:: The lexical analyzer.
|
||||||
* Main: Rpcalc Main. The controlling function.
|
* Rpcalc Main:: The controlling function.
|
||||||
* Error: Rpcalc Error. The error reporting function.
|
* Rpcalc Error:: The error reporting function.
|
||||||
* Gen: Rpcalc Gen. Running Bison on the grammar file.
|
* Rpcalc Generate:: Running Bison on the grammar file.
|
||||||
* Comp: Rpcalc Compile. Run the C compiler on the output code.
|
* Rpcalc Compile:: Run the C compiler on the output code.
|
||||||
@end menu
|
@end menu
|
||||||
|
|
||||||
@node Rpcalc Decls
|
@node Rpcalc Declarations
|
||||||
@subsection Declarations for @code{rpcalc}
|
@subsection Declarations for @code{rpcalc}
|
||||||
|
|
||||||
Here are the C and Bison declarations for the reverse polish notation
|
Here are the C and Bison declarations for the reverse polish notation
|
||||||
@@ -1662,7 +1666,7 @@ therefore, @code{NUM} becomes a macro for @code{yylex} to use.
|
|||||||
The semantic value of the token (if it has one) is stored into the
|
The semantic value of the token (if it has one) is stored into the
|
||||||
global variable @code{yylval}, which is where the Bison parser will look
|
global variable @code{yylval}, which is where the Bison parser will look
|
||||||
for it. (The C data type of @code{yylval} is @code{YYSTYPE}, which was
|
for it. (The C data type of @code{yylval} is @code{YYSTYPE}, which was
|
||||||
defined at the beginning of the grammar; @pxref{Rpcalc Decls,
|
defined at the beginning of the grammar; @pxref{Rpcalc Declarations,
|
||||||
,Declarations for @code{rpcalc}}.)
|
,Declarations for @code{rpcalc}}.)
|
||||||
|
|
||||||
A token type code of zero is returned if the end-of-input is encountered.
|
A token type code of zero is returned if the end-of-input is encountered.
|
||||||
@@ -1758,7 +1762,7 @@ have not written any error rules in this example, so any invalid input will
|
|||||||
cause the calculator program to exit. This is not clean behavior for a
|
cause the calculator program to exit. This is not clean behavior for a
|
||||||
real calculator, but it is adequate for the first example.
|
real calculator, but it is adequate for the first example.
|
||||||
|
|
||||||
@node Rpcalc Gen
|
@node Rpcalc Generate
|
||||||
@subsection Running Bison to Make the Parser
|
@subsection Running Bison to Make the Parser
|
||||||
@cindex running Bison (introduction)
|
@cindex running Bison (introduction)
|
||||||
|
|
||||||
@@ -1977,12 +1981,12 @@ most of the work needed to use locations will be done in the lexical
|
|||||||
analyzer.
|
analyzer.
|
||||||
|
|
||||||
@menu
|
@menu
|
||||||
* Decls: Ltcalc Decls. Bison and C declarations for ltcalc.
|
* Ltcalc Declarations:: Bison and C declarations for ltcalc.
|
||||||
* Rules: Ltcalc Rules. Grammar rules for ltcalc, with explanations.
|
* Ltcalc Rules:: Grammar rules for ltcalc, with explanations.
|
||||||
* Lexer: Ltcalc Lexer. The lexical analyzer.
|
* Ltcalc Lexer:: The lexical analyzer.
|
||||||
@end menu
|
@end menu
|
||||||
|
|
||||||
@node Ltcalc Decls
|
@node Ltcalc Declarations
|
||||||
@subsection Declarations for @code{ltcalc}
|
@subsection Declarations for @code{ltcalc}
|
||||||
|
|
||||||
The C and Bison declarations for the location tracking calculator are
|
The C and Bison declarations for the location tracking calculator are
|
||||||
@@ -2218,12 +2222,12 @@ $
|
|||||||
Note that multiple assignment and nested function calls are permitted.
|
Note that multiple assignment and nested function calls are permitted.
|
||||||
|
|
||||||
@menu
|
@menu
|
||||||
* Decl: Mfcalc Decl. Bison declarations for multi-function calculator.
|
* Mfcalc Declarations:: Bison declarations for multi-function calculator.
|
||||||
* Rules: Mfcalc Rules. Grammar rules for the calculator.
|
* Mfcalc Rules:: Grammar rules for the calculator.
|
||||||
* Symtab: Mfcalc Symtab. Symbol table management subroutines.
|
* Mfcalc Symbol Table:: Symbol table management subroutines.
|
||||||
@end menu
|
@end menu
|
||||||
|
|
||||||
@node Mfcalc Decl
|
@node Mfcalc Declarations
|
||||||
@subsection Declarations for @code{mfcalc}
|
@subsection Declarations for @code{mfcalc}
|
||||||
|
|
||||||
Here are the C and Bison declarations for the multi-function calculator.
|
Here are the C and Bison declarations for the multi-function calculator.
|
||||||
@@ -2319,7 +2323,7 @@ exp: NUM @{ $$ = $1; @}
|
|||||||
%%
|
%%
|
||||||
@end smallexample
|
@end smallexample
|
||||||
|
|
||||||
@node Mfcalc Symtab
|
@node Mfcalc Symbol Table
|
||||||
@subsection The @code{mfcalc} Symbol Table
|
@subsection The @code{mfcalc} Symbol Table
|
||||||
@cindex symbol table example
|
@cindex symbol table example
|
||||||
|
|
||||||
@@ -2700,9 +2704,6 @@ feature test macros can affect the behavior of Bison-generated
|
|||||||
@findex %code requires
|
@findex %code requires
|
||||||
@findex %code provides
|
@findex %code provides
|
||||||
@findex %code top
|
@findex %code top
|
||||||
(The prologue alternatives described here are experimental.
|
|
||||||
More user feedback will help to determine whether they should become permanent
|
|
||||||
features.)
|
|
||||||
|
|
||||||
The functionality of @var{Prologue} sections can often be subtle and
|
The functionality of @var{Prologue} sections can often be subtle and
|
||||||
inflexible.
|
inflexible.
|
||||||
@@ -3799,8 +3800,11 @@ typedef struct YYLTYPE
|
|||||||
@} YYLTYPE;
|
@} YYLTYPE;
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
At the beginning of the parsing, Bison initializes all these fields to 1
|
When @code{YYLTYPE} is not defined, at the beginning of the parsing, Bison
|
||||||
for @code{yylloc}.
|
initializes all these fields to 1 for @code{yylloc}. To initialize
|
||||||
|
@code{yylloc} with a custom location type (or to chose a different
|
||||||
|
initialization), use the @code{%initial-action} directive. @xref{Initial
|
||||||
|
Action Decl, , Performing Actions before Parsing}.
|
||||||
|
|
||||||
@node Actions and Locations
|
@node Actions and Locations
|
||||||
@subsection Actions and Locations
|
@subsection Actions and Locations
|
||||||
@@ -4490,8 +4494,8 @@ number which Bison printed. With @acronym{GLR} parsers, add an
|
|||||||
@code{%expect-rr} declaration as well.
|
@code{%expect-rr} declaration as well.
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
Now Bison will warn you if you introduce an unexpected conflict, but
|
Now Bison will report an error if you introduce an unexpected conflict,
|
||||||
will keep silent otherwise.
|
but will keep silent otherwise.
|
||||||
|
|
||||||
@node Start Decl
|
@node Start Decl
|
||||||
@subsection The Start-Symbol
|
@subsection The Start-Symbol
|
||||||
@@ -4737,10 +4741,6 @@ Thus, @code{%code} replaces the traditional Yacc prologue,
|
|||||||
For a detailed discussion, see @ref{Prologue Alternatives}.
|
For a detailed discussion, see @ref{Prologue Alternatives}.
|
||||||
|
|
||||||
For Java, the default location is inside the parser class.
|
For Java, the default location is inside the parser class.
|
||||||
|
|
||||||
(Like all the Yacc prologue alternatives, this directive is experimental.
|
|
||||||
More user feedback will help to determine whether it should become a permanent
|
|
||||||
feature.)
|
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Directive} %code @var{qualifier} @{@var{code}@}
|
@deffn {Directive} %code @var{qualifier} @{@var{code}@}
|
||||||
@@ -4818,10 +4818,6 @@ before any class definitions.
|
|||||||
@end itemize
|
@end itemize
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
(Like all the Yacc prologue alternatives, this directive is experimental.
|
|
||||||
More user feedback will help to determine whether it should become a permanent
|
|
||||||
feature.)
|
|
||||||
|
|
||||||
@cindex Prologue
|
@cindex Prologue
|
||||||
For a detailed discussion of how to use @code{%code} in place of the
|
For a detailed discussion of how to use @code{%code} in place of the
|
||||||
traditional Yacc prologue for C/C++, see @ref{Prologue Alternatives}.
|
traditional Yacc prologue for C/C++, see @ref{Prologue Alternatives}.
|
||||||
@@ -4830,8 +4826,8 @@ traditional Yacc prologue for C/C++, see @ref{Prologue Alternatives}.
|
|||||||
@deffn {Directive} %debug
|
@deffn {Directive} %debug
|
||||||
In the parser file, define the macro @code{YYDEBUG} to 1 if it is not
|
In the parser file, define the macro @code{YYDEBUG} to 1 if it is not
|
||||||
already defined, so that the debugging facilities are compiled.
|
already defined, so that the debugging facilities are compiled.
|
||||||
@end deffn
|
|
||||||
@xref{Tracing, ,Tracing Your Parser}.
|
@xref{Tracing, ,Tracing Your Parser}.
|
||||||
|
@end deffn
|
||||||
|
|
||||||
@deffn {Directive} %define @var{variable}
|
@deffn {Directive} %define @var{variable}
|
||||||
@deffnx {Directive} %define @var{variable} "@var{value}"
|
@deffnx {Directive} %define @var{variable} "@var{value}"
|
||||||
@@ -5224,10 +5220,8 @@ in the grammar file, you are likely to run into trouble.
|
|||||||
* Parser Function:: How to call @code{yyparse} and what it returns.
|
* Parser Function:: How to call @code{yyparse} and what it returns.
|
||||||
* Push Parser Function:: How to call @code{yypush_parse} and what it returns.
|
* Push Parser Function:: How to call @code{yypush_parse} and what it returns.
|
||||||
* Pull Parser Function:: How to call @code{yypull_parse} and what it returns.
|
* Pull Parser Function:: How to call @code{yypull_parse} and what it returns.
|
||||||
* Parser Create Function:: How to call @code{yypstate_new} and what it
|
* Parser Create Function:: How to call @code{yypstate_new} and what it returns.
|
||||||
returns.
|
* Parser Delete Function:: How to call @code{yypstate_delete} and what it returns.
|
||||||
* Parser Delete Function:: How to call @code{yypstate_delete} and what it
|
|
||||||
returns.
|
|
||||||
* Lexical:: You must supply a function @code{yylex}
|
* Lexical:: You must supply a function @code{yylex}
|
||||||
which reads tokens.
|
which reads tokens.
|
||||||
* Error Reporting:: You must supply a function @code{yyerror}.
|
* Error Reporting:: You must supply a function @code{yyerror}.
|
||||||
@@ -5357,7 +5351,7 @@ This function is available if either the @code{%define api.push_pull "push"} or
|
|||||||
@xref{Push Decl, ,A Push Parser}.
|
@xref{Push Decl, ,A Push Parser}.
|
||||||
|
|
||||||
@deftypefun yypstate *yypstate_new (void)
|
@deftypefun yypstate *yypstate_new (void)
|
||||||
The fuction will return a valid parser instance if there was memory available
|
The function will return a valid parser instance if there was memory available
|
||||||
or 0 if no memory was available.
|
or 0 if no memory was available.
|
||||||
In impure mode, it will also return 0 if a parser instance is currently
|
In impure mode, it will also return 0 if a parser instance is currently
|
||||||
allocated.
|
allocated.
|
||||||
@@ -5405,8 +5399,8 @@ that need it. @xref{Invocation, ,Invoking Bison}.
|
|||||||
* Token Locations:: How @code{yylex} must return the text location
|
* Token Locations:: How @code{yylex} must return the text location
|
||||||
(line number, etc.) of the token, if the
|
(line number, etc.) of the token, if the
|
||||||
actions want that.
|
actions want that.
|
||||||
* Pure Calling:: How the calling convention differs
|
* Pure Calling:: How the calling convention differs in a pure parser
|
||||||
in a pure parser (@pxref{Pure Decl, ,A Pure (Reentrant) Parser}).
|
(@pxref{Pure Decl, ,A Pure (Reentrant) Parser}).
|
||||||
@end menu
|
@end menu
|
||||||
|
|
||||||
@node Calling Convention
|
@node Calling Convention
|
||||||
@@ -6178,8 +6172,10 @@ This particular ambiguity was first encountered in the specifications of
|
|||||||
Algol 60 and is called the ``dangling @code{else}'' ambiguity.
|
Algol 60 and is called the ``dangling @code{else}'' ambiguity.
|
||||||
|
|
||||||
To avoid warnings from Bison about predictable, legitimate shift/reduce
|
To avoid warnings from Bison about predictable, legitimate shift/reduce
|
||||||
conflicts, use the @code{%expect @var{n}} declaration. There will be no
|
conflicts, use the @code{%expect @var{n}} declaration.
|
||||||
warning as long as the number of shift/reduce conflicts is exactly @var{n}.
|
There will be no warning as long as the number of shift/reduce conflicts
|
||||||
|
is exactly @var{n}, and Bison will report an error if there is a
|
||||||
|
different number.
|
||||||
@xref{Expect Decl, ,Suppressing Conflict Warnings}.
|
@xref{Expect Decl, ,Suppressing Conflict Warnings}.
|
||||||
|
|
||||||
The definition of @code{if_stmt} above is solely to blame for the
|
The definition of @code{if_stmt} above is solely to blame for the
|
||||||
@@ -6814,7 +6810,7 @@ that allows variable-length arrays. The default is 200.
|
|||||||
Do not allow @code{YYINITDEPTH} to be greater than @code{YYMAXDEPTH}.
|
Do not allow @code{YYINITDEPTH} to be greater than @code{YYMAXDEPTH}.
|
||||||
|
|
||||||
@c FIXME: C++ output.
|
@c FIXME: C++ output.
|
||||||
Because of semantical differences between C and C++, the
|
Because of semantic differences between C and C++, the
|
||||||
@acronym{LALR}(1) parsers in C produced by Bison cannot grow when compiled
|
@acronym{LALR}(1) parsers in C produced by Bison cannot grow when compiled
|
||||||
by C++ compilers. In this precise case (compiling a C parser as C++) you are
|
by C++ compilers. In this precise case (compiling a C parser as C++) you are
|
||||||
suggested to grow @code{YYINITDEPTH}. The Bison maintainers hope to fix
|
suggested to grow @code{YYINITDEPTH}. The Bison maintainers hope to fix
|
||||||
@@ -7653,7 +7649,7 @@ standard I/O stream, the numeric code for the token type, and the token
|
|||||||
value (from @code{yylval}).
|
value (from @code{yylval}).
|
||||||
|
|
||||||
Here is an example of @code{YYPRINT} suitable for the multi-function
|
Here is an example of @code{YYPRINT} suitable for the multi-function
|
||||||
calculator (@pxref{Mfcalc Decl, ,Declarations for @code{mfcalc}}):
|
calculator (@pxref{Mfcalc Declarations, ,Declarations for @code{mfcalc}}):
|
||||||
|
|
||||||
@smallexample
|
@smallexample
|
||||||
%@{
|
%@{
|
||||||
@@ -7781,8 +7777,8 @@ traditional Yacc grammars. If your grammar uses a Bison extension
|
|||||||
like @samp{%glr-parser}, Bison might not be Yacc-compatible even if
|
like @samp{%glr-parser}, Bison might not be Yacc-compatible even if
|
||||||
this option is specified.
|
this option is specified.
|
||||||
|
|
||||||
@item -W
|
@item -W [@var{category}]
|
||||||
@itemx --warnings
|
@itemx --warnings[=@var{category}]
|
||||||
Output warnings falling in @var{category}. @var{category} can be one
|
Output warnings falling in @var{category}. @var{category} can be one
|
||||||
of:
|
of:
|
||||||
@table @code
|
@table @code
|
||||||
@@ -7819,8 +7815,8 @@ Treat warnings as errors.
|
|||||||
@end table
|
@end table
|
||||||
|
|
||||||
A category can be turned off by prefixing its name with @samp{no-}. For
|
A category can be turned off by prefixing its name with @samp{no-}. For
|
||||||
instance, @option{-Wno-syntax} will hide the warnings about unused
|
instance, @option{-Wno-yacc} will hide the warnings about
|
||||||
variables.
|
@acronym{POSIX} Yacc incompatibilities.
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@noindent
|
@noindent
|
||||||
@@ -8020,8 +8016,8 @@ int yyparse (void);
|
|||||||
@c - initial action
|
@c - initial action
|
||||||
|
|
||||||
The C++ @acronym{LALR}(1) parser is selected using the skeleton directive,
|
The C++ @acronym{LALR}(1) parser is selected using the skeleton directive,
|
||||||
@samp{%skeleton "lalr1.c"}, or the synonymous command-line option
|
@samp{%skeleton "lalr1.cc"}, or the synonymous command-line option
|
||||||
@option{--skeleton=lalr1.c}.
|
@option{--skeleton=lalr1.cc}.
|
||||||
@xref{Decl Summary}.
|
@xref{Decl Summary}.
|
||||||
|
|
||||||
When run, @command{bison} will create several entities in the @samp{yy}
|
When run, @command{bison} will create several entities in the @samp{yy}
|
||||||
@@ -8170,11 +8166,19 @@ this class is detailed below. It can be extended using the
|
|||||||
it describes an additional member of the parser class, and an
|
it describes an additional member of the parser class, and an
|
||||||
additional argument for its constructor.
|
additional argument for its constructor.
|
||||||
|
|
||||||
@defcv {Type} {parser} {semantic_value_type}
|
@defcv {Type} {parser} {semantic_type}
|
||||||
@defcvx {Type} {parser} {location_value_type}
|
@defcvx {Type} {parser} {location_type}
|
||||||
The types for semantics value and locations.
|
The types for semantics value and locations.
|
||||||
@end defcv
|
@end defcv
|
||||||
|
|
||||||
|
@defcv {Type} {parser} {token}
|
||||||
|
A structure that contains (only) the definition of the tokens as the
|
||||||
|
@code{yytokentype} enumeration. To refer to the token @code{FOO}, the
|
||||||
|
scanner should use @code{yy::parser::token::FOO}. The scanner can use
|
||||||
|
@samp{typedef yy::parser::token token;} to ``import'' the token enumeration
|
||||||
|
(@pxref{Calc++ Scanner}).
|
||||||
|
@end defcv
|
||||||
|
|
||||||
@deftypemethod {parser} {} parser (@var{type1} @var{arg1}, ...)
|
@deftypemethod {parser} {} parser (@var{type1} @var{arg1}, ...)
|
||||||
Build a new parser object. There are no arguments by default, unless
|
Build a new parser object. There are no arguments by default, unless
|
||||||
@samp{%parse-param @{@var{type1} @var{arg1}@}} was used.
|
@samp{%parse-param @{@var{type1} @var{arg1}@}} was used.
|
||||||
@@ -8213,7 +8217,7 @@ The parser invokes the scanner by calling @code{yylex}. Contrary to C
|
|||||||
parsers, C++ parsers are always pure: there is no point in using the
|
parsers, C++ parsers are always pure: there is no point in using the
|
||||||
@code{%define api.pure} directive. Therefore the interface is as follows.
|
@code{%define api.pure} directive. Therefore the interface is as follows.
|
||||||
|
|
||||||
@deftypemethod {parser} {int} yylex (semantic_value_type& @var{yylval}, location_type& @var{yylloc}, @var{type1} @var{arg1}, ...)
|
@deftypemethod {parser} {int} yylex (semantic_type* @var{yylval}, location_type* @var{yylloc}, @var{type1} @var{arg1}, ...)
|
||||||
Return the next token. Its type is the return value, its semantic
|
Return the next token. Its type is the return value, its semantic
|
||||||
value and location being @var{yylval} and @var{yylloc}. Invocations of
|
value and location being @var{yylval} and @var{yylloc}. Invocations of
|
||||||
@samp{%lex-param @{@var{type1} @var{arg1}@}} yield additional arguments.
|
@samp{%lex-param @{@var{type1} @var{arg1}@}} yield additional arguments.
|
||||||
@@ -8453,7 +8457,7 @@ global variables.
|
|||||||
|
|
||||||
@noindent
|
@noindent
|
||||||
Then we request the location tracking feature, and initialize the
|
Then we request the location tracking feature, and initialize the
|
||||||
first location's file name. Afterwards new locations are computed
|
first location's file name. Afterward new locations are computed
|
||||||
relatively to the previous locations: the file name will be
|
relatively to the previous locations: the file name will be
|
||||||
automatically propagated.
|
automatically propagated.
|
||||||
|
|
||||||
@@ -8584,8 +8588,8 @@ parser's to get the set of defined tokens.
|
|||||||
@example
|
@example
|
||||||
%@{ /* -*- C++ -*- */
|
%@{ /* -*- C++ -*- */
|
||||||
# include <cstdlib>
|
# include <cstdlib>
|
||||||
# include <errno.h>
|
# include <cerrno>
|
||||||
# include <limits.h>
|
# include <climits>
|
||||||
# include <string>
|
# include <string>
|
||||||
# include "calc++-driver.hh"
|
# include "calc++-driver.hh"
|
||||||
# include "calc++-parser.hh"
|
# include "calc++-parser.hh"
|
||||||
@@ -8733,7 +8737,7 @@ main (int argc, char *argv[])
|
|||||||
* Java Location Values:: The position and location classes
|
* Java Location Values:: The position and location classes
|
||||||
* Java Parser Interface:: Instantiating and running the parser
|
* Java Parser Interface:: Instantiating and running the parser
|
||||||
* Java Scanner Interface:: Specifying the scanner for the parser
|
* Java Scanner Interface:: Specifying the scanner for the parser
|
||||||
* Java Action Features:: Special features for use in actions.
|
* Java Action Features:: Special features for use in actions
|
||||||
* Java Differences:: Differences between C/C++ and Java Grammars
|
* Java Differences:: Differences between C/C++ and Java Grammars
|
||||||
* Java Declarations Summary:: List of Bison declarations used with Java
|
* Java Declarations Summary:: List of Bison declarations used with Java
|
||||||
@end menu
|
@end menu
|
||||||
@@ -8987,7 +8991,7 @@ changed using @code{%define location_type "@var{class-name}".}
|
|||||||
|
|
||||||
@deftypemethod {Lexer} {int} yylex ()
|
@deftypemethod {Lexer} {int} yylex ()
|
||||||
Return the next token. Its type is the return value, its semantic
|
Return the next token. Its type is the return value, its semantic
|
||||||
value and location are saved and returned by the ther methods in the
|
value and location are saved and returned by the their methods in the
|
||||||
interface.
|
interface.
|
||||||
|
|
||||||
Use @code{%define lex_throws} to specify any uncaught exceptions.
|
Use @code{%define lex_throws} to specify any uncaught exceptions.
|
||||||
@@ -9005,7 +9009,7 @@ The return type can be changed using @code{%define position_type
|
|||||||
@end deftypemethod
|
@end deftypemethod
|
||||||
|
|
||||||
@deftypemethod {Lexer} {Object} getLVal ()
|
@deftypemethod {Lexer} {Object} getLVal ()
|
||||||
Return the semantical value of the last token that yylex returned.
|
Return the semantic value of the last token that yylex returned.
|
||||||
|
|
||||||
The return type can be changed using @code{%define stype
|
The return type can be changed using @code{%define stype
|
||||||
"@var{class-name}".}
|
"@var{class-name}".}
|
||||||
@@ -9075,11 +9079,6 @@ Start error recovery without printing an error message.
|
|||||||
@xref{Error Recovery}.
|
@xref{Error Recovery}.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Statement} {return YYFAIL;}
|
|
||||||
Print an error message and start error recovery.
|
|
||||||
@xref{Error Recovery}.
|
|
||||||
@end deffn
|
|
||||||
|
|
||||||
@deftypefn {Function} {boolean} recovering ()
|
@deftypefn {Function} {boolean} recovering ()
|
||||||
Return whether error recovery is being done. In this state, the parser
|
Return whether error recovery is being done. In this state, the parser
|
||||||
reads token until it reaches a known state, and then restarts normal
|
reads token until it reaches a known state, and then restarts normal
|
||||||
@@ -9121,7 +9120,7 @@ corresponds to these C macros.}.
|
|||||||
@item
|
@item
|
||||||
Java lacks unions, so @code{%union} has no effect. Instead, semantic
|
Java lacks unions, so @code{%union} has no effect. Instead, semantic
|
||||||
values have a common base type: @code{Object} or as specified by
|
values have a common base type: @code{Object} or as specified by
|
||||||
@code{%define stype}. Angle backets on @code{%token}, @code{type},
|
@samp{%define stype}. Angle brackets on @code{%token}, @code{type},
|
||||||
@code{$@var{n}} and @code{$$} specify subtypes rather than fields of
|
@code{$@var{n}} and @code{$$} specify subtypes rather than fields of
|
||||||
an union. The type of @code{$$}, even with angle brackets, is the base
|
an union. The type of @code{$$}, even with angle brackets, is the base
|
||||||
type since Java casts are not allow on the left-hand side of assignments.
|
type since Java casts are not allow on the left-hand side of assignments.
|
||||||
@@ -9130,7 +9129,7 @@ left-hand side of assignments. See @pxref{Java Semantic Values} and
|
|||||||
@pxref{Java Action Features}.
|
@pxref{Java Action Features}.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
The prolog declarations have a different meaning than in C/C++ code.
|
The prologue declarations have a different meaning than in C/C++ code.
|
||||||
@table @asis
|
@table @asis
|
||||||
@item @code{%code imports}
|
@item @code{%code imports}
|
||||||
blocks are placed at the beginning of the Java source code. They may
|
blocks are placed at the beginning of the Java source code. They may
|
||||||
@@ -9776,10 +9775,6 @@ Insert @var{code} verbatim into output parser source.
|
|||||||
Equip the parser for debugging. @xref{Decl Summary}.
|
Equip the parser for debugging. @xref{Decl Summary}.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Directive} %debug
|
|
||||||
Equip the parser for debugging. @xref{Decl Summary}.
|
|
||||||
@end deffn
|
|
||||||
|
|
||||||
@ifset defaultprec
|
@ifset defaultprec
|
||||||
@deffn {Directive} %default-prec
|
@deffn {Directive} %default-prec
|
||||||
Assign a precedence to rules that lack an explicit @samp{%prec}
|
Assign a precedence to rules that lack an explicit @samp{%prec}
|
||||||
@@ -10352,12 +10347,16 @@ grammatically indivisible. The piece of text it represents is a token.
|
|||||||
|
|
||||||
@bye
|
@bye
|
||||||
|
|
||||||
|
@c Local Variables:
|
||||||
|
@c fill-column: 76
|
||||||
|
@c End:
|
||||||
|
|
||||||
@c LocalWords: texinfo setfilename settitle setchapternewpage finalout
|
@c LocalWords: texinfo setfilename settitle setchapternewpage finalout
|
||||||
@c LocalWords: ifinfo smallbook shorttitlepage titlepage GPL FIXME iftex
|
@c LocalWords: ifinfo smallbook shorttitlepage titlepage GPL FIXME iftex
|
||||||
@c LocalWords: akim fn cp syncodeindex vr tp synindex dircategory direntry
|
@c LocalWords: akim fn cp syncodeindex vr tp synindex dircategory direntry
|
||||||
@c LocalWords: ifset vskip pt filll insertcopying sp ISBN Etienne Suvasa
|
@c LocalWords: ifset vskip pt filll insertcopying sp ISBN Etienne Suvasa
|
||||||
@c LocalWords: ifnottex yyparse detailmenu GLR RPN Calc var Decls Rpcalc
|
@c LocalWords: ifnottex yyparse detailmenu GLR RPN Calc var Decls Rpcalc
|
||||||
@c LocalWords: rpcalc Lexer Gen Comp Expr ltcalc mfcalc Decl Symtab yylex
|
@c LocalWords: rpcalc Lexer Expr ltcalc mfcalc yylex
|
||||||
@c LocalWords: yyerror pxref LR yylval cindex dfn LALR samp gpl BNF xref
|
@c LocalWords: yyerror pxref LR yylval cindex dfn LALR samp gpl BNF xref
|
||||||
@c LocalWords: const int paren ifnotinfo AC noindent emph expr stmt findex
|
@c LocalWords: const int paren ifnotinfo AC noindent emph expr stmt findex
|
||||||
@c LocalWords: glr YYSTYPE TYPENAME prog dprec printf decl init stmtMerge
|
@c LocalWords: glr YYSTYPE TYPENAME prog dprec printf decl init stmtMerge
|
||||||
|
|||||||
+67
-12
@@ -1,12 +1,12 @@
|
|||||||
@c The GNU Free Documentation License.
|
@c The GNU Free Documentation License.
|
||||||
@center Version 1.2, November 2002
|
@center Version 1.3, 3 November 2008
|
||||||
|
|
||||||
@c This file is intended to be included within another document,
|
@c This file is intended to be included within another document,
|
||||||
@c hence no sectioning command or @node.
|
@c hence no sectioning command or @node.
|
||||||
|
|
||||||
@display
|
@display
|
||||||
Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc.
|
Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
|
||||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
@uref{http://fsf.org/}
|
||||||
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
@@ -111,6 +111,9 @@ formats which do not have any title page as such, ``Title Page'' means
|
|||||||
the text near the most prominent appearance of the work's title,
|
the text near the most prominent appearance of the work's title,
|
||||||
preceding the beginning of the body of the text.
|
preceding the beginning of the body of the text.
|
||||||
|
|
||||||
|
The ``publisher'' means any person or entity that distributes copies
|
||||||
|
of the Document to the public.
|
||||||
|
|
||||||
A section ``Entitled XYZ'' means a named subunit of the Document whose
|
A section ``Entitled XYZ'' means a named subunit of the Document whose
|
||||||
title either is precisely XYZ or contains XYZ in parentheses following
|
title either is precisely XYZ or contains XYZ in parentheses following
|
||||||
text that translates XYZ in another language. (Here XYZ stands for a
|
text that translates XYZ in another language. (Here XYZ stands for a
|
||||||
@@ -379,13 +382,30 @@ title.
|
|||||||
@item
|
@item
|
||||||
TERMINATION
|
TERMINATION
|
||||||
|
|
||||||
You may not copy, modify, sublicense, or distribute the Document except
|
You may not copy, modify, sublicense, or distribute the Document
|
||||||
as expressly provided for under this License. Any other attempt to
|
except as expressly provided under this License. Any attempt
|
||||||
copy, modify, sublicense or distribute the Document is void, and will
|
otherwise to copy, modify, sublicense, or distribute it is void, and
|
||||||
automatically terminate your rights under this License. However,
|
will automatically terminate your rights under this License.
|
||||||
parties who have received copies, or rights, from you under this
|
|
||||||
License will not have their licenses terminated so long as such
|
However, if you cease all violation of this License, then your license
|
||||||
parties remain in full compliance.
|
from a particular copyright holder is reinstated (a) provisionally,
|
||||||
|
unless and until the copyright holder explicitly and finally
|
||||||
|
terminates your license, and (b) permanently, if the copyright holder
|
||||||
|
fails to notify you of the violation by some reasonable means prior to
|
||||||
|
60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, receipt of a copy of some or all of the same material does
|
||||||
|
not give you any rights to use it.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
FUTURE REVISIONS OF THIS LICENSE
|
FUTURE REVISIONS OF THIS LICENSE
|
||||||
@@ -403,7 +423,42 @@ following the terms and conditions either of that specified version or
|
|||||||
of any later version that has been published (not as a draft) by the
|
of any later version that has been published (not as a draft) by the
|
||||||
Free Software Foundation. If the Document does not specify a version
|
Free Software Foundation. If the Document does not specify a version
|
||||||
number of this License, you may choose any version ever published (not
|
number of this License, you may choose any version ever published (not
|
||||||
as a draft) by the Free Software Foundation.
|
as a draft) by the Free Software Foundation. If the Document
|
||||||
|
specifies that a proxy can decide which future versions of this
|
||||||
|
License can be used, that proxy's public statement of acceptance of a
|
||||||
|
version permanently authorizes you to choose that version for the
|
||||||
|
Document.
|
||||||
|
|
||||||
|
@item
|
||||||
|
RELICENSING
|
||||||
|
|
||||||
|
``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any
|
||||||
|
World Wide Web server that publishes copyrightable works and also
|
||||||
|
provides prominent facilities for anybody to edit those works. A
|
||||||
|
public wiki that anybody can edit is an example of such a server. A
|
||||||
|
``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the
|
||||||
|
site means any set of copyrightable works thus published on the MMC
|
||||||
|
site.
|
||||||
|
|
||||||
|
``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0
|
||||||
|
license published by Creative Commons Corporation, a not-for-profit
|
||||||
|
corporation with a principal place of business in San Francisco,
|
||||||
|
California, as well as future copyleft versions of that license
|
||||||
|
published by that same organization.
|
||||||
|
|
||||||
|
``Incorporate'' means to publish or republish a Document, in whole or
|
||||||
|
in part, as part of another Document.
|
||||||
|
|
||||||
|
An MMC is ``eligible for relicensing'' if it is licensed under this
|
||||||
|
License, and if all works that were first published under this License
|
||||||
|
somewhere other than this MMC, and subsequently incorporated in whole
|
||||||
|
or in part into the MMC, (1) had no cover texts or invariant sections,
|
||||||
|
and (2) were thus incorporated prior to November 1, 2008.
|
||||||
|
|
||||||
|
The operator of an MMC Site may republish an MMC contained in the site
|
||||||
|
under CC-BY-SA on the same site at any time before August 1, 2009,
|
||||||
|
provided the MMC is eligible for relicensing.
|
||||||
|
|
||||||
@end enumerate
|
@end enumerate
|
||||||
|
|
||||||
@page
|
@page
|
||||||
@@ -417,7 +472,7 @@ license notices just after the title page:
|
|||||||
@group
|
@group
|
||||||
Copyright (C) @var{year} @var{your name}.
|
Copyright (C) @var{year} @var{your name}.
|
||||||
Permission is granted to copy, distribute and/or modify this document
|
Permission is granted to copy, distribute and/or modify this document
|
||||||
under the terms of the GNU Free Documentation License, Version 1.2
|
under the terms of the GNU Free Documentation License, Version 1.3
|
||||||
or any later version published by the Free Software Foundation;
|
or any later version published by the Free Software Foundation;
|
||||||
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
|
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
|
||||||
Texts. A copy of the license is included in the section entitled ``GNU
|
Texts. A copy of the license is included in the section entitled ``GNU
|
||||||
|
|||||||
+1
-1
@@ -19,7 +19,7 @@
|
|||||||
\def\finalout{\overfullrule=0pt}
|
\def\finalout{\overfullrule=0pt}
|
||||||
%\finalout
|
%\finalout
|
||||||
|
|
||||||
% Copyright (c) 1998, 2001 Free Software Foundation, Inc.
|
% Copyright (c) 1998, 2001, 2009, 2010 Free Software Foundation, Inc.
|
||||||
%
|
%
|
||||||
% This file is part of Bison.
|
% This file is part of Bison.
|
||||||
%
|
%
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
## Copyright (C) 2006 Free Software Foundation, Inc.
|
## Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+1
-1
@@ -19,7 +19,7 @@ straightforward use of _build/src/bison would.)
|
|||||||
|
|
||||||
--
|
--
|
||||||
|
|
||||||
Copyright (C) 2006 Free Software Foundation, Inc.
|
Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of Bison, the GNU Compiler Compiler.
|
This file is part of Bison, the GNU Compiler Compiler.
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
#! /usr/bin/perl -w
|
#! /usr/bin/perl -w
|
||||||
|
|
||||||
# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
|
# Copyright (C) 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is part of Bison, the GNU Compiler Compiler.
|
# This file is part of Bison, the GNU Compiler Compiler.
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||||
## Copyright (C) 2005 Free Software Foundation, Inc.
|
## Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||||
## Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
## Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -31,12 +31,16 @@ $(BISON): $(BISON_IN)
|
|||||||
doc = $(top_srcdir)/doc/bison.texinfo
|
doc = $(top_srcdir)/doc/bison.texinfo
|
||||||
extexi = $(top_srcdir)/examples/extexi
|
extexi = $(top_srcdir)/examples/extexi
|
||||||
# Extract in src.
|
# Extract in src.
|
||||||
$(calc_extracted): $(doc) $(extexi)
|
$(srcdir)/calc.stamp: $(doc) $(extexi)
|
||||||
|
rm -f $@ $@.tmp
|
||||||
|
touch $@.tmp
|
||||||
cd $(srcdir) && \
|
cd $(srcdir) && \
|
||||||
$(AWK) -f ../extexi -v VERSION="$(VERSION)" \
|
$(AWK) -f ../extexi -v VERSION="$(VERSION)" \
|
||||||
../../doc/bison.texinfo -- calc++-parser.yy \
|
../../doc/bison.texinfo -- calc++-parser.yy \
|
||||||
calc++-scanner.ll calc++.cc calc++-driver.hh calc++-driver.cc
|
calc++-scanner.ll calc++.cc calc++-driver.hh calc++-driver.cc
|
||||||
|
mv $@.tmp $@
|
||||||
|
|
||||||
|
$(calc_extracted): $(srcdir)/calc.stamp
|
||||||
|
|
||||||
## ------------------- ##
|
## ------------------- ##
|
||||||
## Parser generation. ##
|
## Parser generation. ##
|
||||||
@@ -50,7 +54,10 @@ MAINTAINERCLEANFILES = $(srcdir)/*.stamp $(BUILT_SOURCES)
|
|||||||
# Compile the parser and save cycles.
|
# Compile the parser and save cycles.
|
||||||
# This code comes from "Handling Tools that Produce Many Outputs",
|
# This code comes from "Handling Tools that Produce Many Outputs",
|
||||||
# from the Automake documentation.
|
# from the Automake documentation.
|
||||||
EXTRA_DIST = $(srcdir)/calc++-parser.stamp $(srcdir)/calc++-parser.yy
|
EXTRA_DIST = \
|
||||||
|
$(srcdir)/calc++-parser.stamp \
|
||||||
|
$(srcdir)/calc++-parser.yy \
|
||||||
|
$(srcdir)/calc.stamp
|
||||||
# Don't depend on $(BISON) otherwise we would rebuild these files
|
# Don't depend on $(BISON) otherwise we would rebuild these files
|
||||||
# in srcdir, including during distcheck, which is forbidden.
|
# in srcdir, including during distcheck, which is forbidden.
|
||||||
$(srcdir)/calc++-parser.stamp: $(srcdir)/calc++-parser.yy $(BISON_IN)
|
$(srcdir)/calc++-parser.stamp: $(srcdir)/calc++-parser.yy $(BISON_IN)
|
||||||
|
|||||||
+3
-1
@@ -1,7 +1,9 @@
|
|||||||
# Extract all examples from the manual source. -*- AWK -*-
|
# Extract all examples from the manual source. -*- AWK -*-
|
||||||
|
|
||||||
# This file is part of GNU Bison
|
# This file is part of GNU Bison
|
||||||
# Copyright 1992, 2000, 2001, 2005, 2006 Free Software Foundation, Inc.
|
|
||||||
|
# Copyright (C) 1992, 2000, 2001, 2005, 2006, 2009, 2010 Free Software
|
||||||
|
# Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+1
-1
Submodule gnulib updated: cdccece581...b48afd89ec
@@ -1,35 +1,55 @@
|
|||||||
.deps
|
.deps
|
||||||
Makefile
|
Makefile
|
||||||
Makefile.in
|
Makefile.in
|
||||||
|
alloca.h
|
||||||
|
alloca.in.h
|
||||||
argmatch.c
|
argmatch.c
|
||||||
argmatch.h
|
argmatch.h
|
||||||
|
basename-lgpl.c
|
||||||
basename.c
|
basename.c
|
||||||
|
binary-io.h
|
||||||
|
bitrotate.h
|
||||||
c-ctype.c
|
c-ctype.c
|
||||||
c-ctype.h
|
c-ctype.h
|
||||||
c-strcase.h
|
c-strcase.h
|
||||||
c-strcasecmp.c
|
c-strcasecmp.c
|
||||||
c-strncasecmp.c
|
c-strncasecmp.c
|
||||||
charset.alias
|
charset.alias
|
||||||
|
cloexec.c
|
||||||
|
cloexec.h
|
||||||
config.charset
|
config.charset
|
||||||
config.h
|
config.h
|
||||||
config.hin
|
config.hin
|
||||||
configmake.h
|
configmake.h
|
||||||
|
dirname-lgpl.c
|
||||||
dirname.c
|
dirname.c
|
||||||
dirname.h
|
dirname.h
|
||||||
|
dup-safer-flag.c
|
||||||
dup-safer.c
|
dup-safer.c
|
||||||
|
dup2.c
|
||||||
|
errno.h
|
||||||
errno.in.h
|
errno.in.h
|
||||||
error.c
|
error.c
|
||||||
error.h
|
error.h
|
||||||
exitfail.c
|
exitfail.c
|
||||||
exitfail.h
|
exitfail.h
|
||||||
|
fatal-signal.c
|
||||||
|
fatal-signal.h
|
||||||
|
fcntl.c
|
||||||
|
fcntl.h
|
||||||
|
fcntl.in.h
|
||||||
|
fd-safer-flag.c
|
||||||
fd-safer.c
|
fd-safer.c
|
||||||
fopen-safer.c
|
fopen-safer.c
|
||||||
|
fopen.c
|
||||||
|
getdtablesize.c
|
||||||
getopt.c
|
getopt.c
|
||||||
getopt.h
|
getopt.h
|
||||||
getopt.in.h
|
getopt.in.h
|
||||||
getopt1.c
|
getopt1.c
|
||||||
getopt_.h
|
getopt_.h
|
||||||
getopt_int.h
|
getopt_int.h
|
||||||
|
getpagesize.c
|
||||||
gettext.h
|
gettext.h
|
||||||
gnulib.mk
|
gnulib.mk
|
||||||
hash.c
|
hash.c
|
||||||
@@ -41,32 +61,72 @@ inttypes_.h
|
|||||||
localcharset.c
|
localcharset.c
|
||||||
localcharset.h
|
localcharset.h
|
||||||
malloc.c
|
malloc.c
|
||||||
|
mbrtowc.c
|
||||||
|
mbsinit.c
|
||||||
mbswidth.c
|
mbswidth.c
|
||||||
mbswidth.h
|
mbswidth.h
|
||||||
|
memchr.c
|
||||||
|
memchr.valgrind
|
||||||
obstack.c
|
obstack.c
|
||||||
obstack.h
|
obstack.h
|
||||||
|
open.c
|
||||||
pipe-safer.c
|
pipe-safer.c
|
||||||
|
pipe.c
|
||||||
|
pipe.h
|
||||||
|
pipe2-safer.c
|
||||||
|
pipe2.c
|
||||||
quote.c
|
quote.c
|
||||||
quote.h
|
quote.h
|
||||||
quotearg.c
|
quotearg.c
|
||||||
quotearg.h
|
quotearg.h
|
||||||
|
rawmemchr.c
|
||||||
|
rawmemchr.valgrind
|
||||||
ref-add.sed
|
ref-add.sed
|
||||||
ref-add.sin
|
ref-add.sin
|
||||||
ref-del.sed
|
ref-del.sed
|
||||||
ref-del.sin
|
ref-del.sin
|
||||||
|
sched.h
|
||||||
|
sched.in.h
|
||||||
|
sig-handler.h
|
||||||
|
sigaction.c
|
||||||
|
signal.h
|
||||||
|
signal.in.h
|
||||||
|
sigprocmask.c
|
||||||
|
spawn.h
|
||||||
|
spawn.in.h
|
||||||
|
spawn_faction_addclose.c
|
||||||
|
spawn_faction_adddup2.c
|
||||||
|
spawn_faction_addopen.c
|
||||||
|
spawn_faction_destroy.c
|
||||||
|
spawn_faction_init.c
|
||||||
|
spawn_int.h
|
||||||
|
spawnattr_destroy.c
|
||||||
|
spawnattr_init.c
|
||||||
|
spawnattr_setflags.c
|
||||||
|
spawnattr_setsigmask.c
|
||||||
|
spawni.c
|
||||||
|
spawnp.c
|
||||||
stamp-h1
|
stamp-h1
|
||||||
|
stat.c
|
||||||
stdbool.h
|
stdbool.h
|
||||||
stdbool.in.h
|
stdbool.in.h
|
||||||
stdbool_.h
|
stdbool_.h
|
||||||
|
stddef.h
|
||||||
|
stddef.in.h
|
||||||
stdint.h
|
stdint.h
|
||||||
stdint.in.h
|
stdint.in.h
|
||||||
stdint_.h
|
stdint_.h
|
||||||
stdio--.h
|
stdio--.h
|
||||||
stdio-safer.h
|
stdio-safer.h
|
||||||
|
stdio-write.c
|
||||||
|
stdio.h
|
||||||
|
stdio.in.h
|
||||||
stdlib.h
|
stdlib.h
|
||||||
stdlib.in.h
|
stdlib.in.h
|
||||||
stdlib_.h
|
stdlib_.h
|
||||||
stpcpy.c
|
stpcpy.c
|
||||||
|
strchrnul.c
|
||||||
|
strchrnul.valgrind
|
||||||
streq.h
|
streq.h
|
||||||
strerror.c
|
strerror.c
|
||||||
string.h
|
string.h
|
||||||
@@ -79,17 +139,29 @@ strtol.c
|
|||||||
strtoul.c
|
strtoul.c
|
||||||
strverscmp.c
|
strverscmp.c
|
||||||
strverscmp.h
|
strverscmp.h
|
||||||
|
sys
|
||||||
|
sys_stat.h
|
||||||
|
sys_stat.in.h
|
||||||
|
sys_wait.h
|
||||||
|
sys_wait.in.h
|
||||||
|
time.h
|
||||||
|
time.in.h
|
||||||
unistd--.h
|
unistd--.h
|
||||||
unistd-safer.h
|
unistd-safer.h
|
||||||
unistd.h
|
unistd.h
|
||||||
unistd.in.h
|
unistd.in.h
|
||||||
unistd_.h
|
unistd_.h
|
||||||
unitypes.h
|
unitypes.h
|
||||||
|
unitypes.in.h
|
||||||
uniwidth
|
uniwidth
|
||||||
uniwidth.h
|
uniwidth.h
|
||||||
|
uniwidth.in.h
|
||||||
unlocked-io.h
|
unlocked-io.h
|
||||||
unsetenv.c
|
unsetenv.c
|
||||||
verify.h
|
verify.h
|
||||||
|
w32spawn.h
|
||||||
|
wait-process.c
|
||||||
|
wait-process.h
|
||||||
wchar.h
|
wchar.h
|
||||||
wchar.in.h
|
wchar.in.h
|
||||||
wchar_.h
|
wchar_.h
|
||||||
|
|||||||
@@ -4,35 +4,55 @@
|
|||||||
/.deps
|
/.deps
|
||||||
/Makefile
|
/Makefile
|
||||||
/Makefile.in
|
/Makefile.in
|
||||||
|
/alloca.h
|
||||||
|
/alloca.in.h
|
||||||
/argmatch.c
|
/argmatch.c
|
||||||
/argmatch.h
|
/argmatch.h
|
||||||
|
/basename-lgpl.c
|
||||||
/basename.c
|
/basename.c
|
||||||
|
/binary-io.h
|
||||||
|
/bitrotate.h
|
||||||
/c-ctype.c
|
/c-ctype.c
|
||||||
/c-ctype.h
|
/c-ctype.h
|
||||||
/c-strcase.h
|
/c-strcase.h
|
||||||
/c-strcasecmp.c
|
/c-strcasecmp.c
|
||||||
/c-strncasecmp.c
|
/c-strncasecmp.c
|
||||||
/charset.alias
|
/charset.alias
|
||||||
|
/cloexec.c
|
||||||
|
/cloexec.h
|
||||||
/config.charset
|
/config.charset
|
||||||
/config.h
|
/config.h
|
||||||
/config.hin
|
/config.hin
|
||||||
/configmake.h
|
/configmake.h
|
||||||
|
/dirname-lgpl.c
|
||||||
/dirname.c
|
/dirname.c
|
||||||
/dirname.h
|
/dirname.h
|
||||||
|
/dup-safer-flag.c
|
||||||
/dup-safer.c
|
/dup-safer.c
|
||||||
|
/dup2.c
|
||||||
|
/errno.h
|
||||||
/errno.in.h
|
/errno.in.h
|
||||||
/error.c
|
/error.c
|
||||||
/error.h
|
/error.h
|
||||||
/exitfail.c
|
/exitfail.c
|
||||||
/exitfail.h
|
/exitfail.h
|
||||||
|
/fatal-signal.c
|
||||||
|
/fatal-signal.h
|
||||||
|
/fcntl.c
|
||||||
|
/fcntl.h
|
||||||
|
/fcntl.in.h
|
||||||
|
/fd-safer-flag.c
|
||||||
/fd-safer.c
|
/fd-safer.c
|
||||||
/fopen-safer.c
|
/fopen-safer.c
|
||||||
|
/fopen.c
|
||||||
|
/getdtablesize.c
|
||||||
/getopt.c
|
/getopt.c
|
||||||
/getopt.h
|
/getopt.h
|
||||||
/getopt.in.h
|
/getopt.in.h
|
||||||
/getopt1.c
|
/getopt1.c
|
||||||
/getopt_.h
|
/getopt_.h
|
||||||
/getopt_int.h
|
/getopt_int.h
|
||||||
|
/getpagesize.c
|
||||||
/gettext.h
|
/gettext.h
|
||||||
/gnulib.mk
|
/gnulib.mk
|
||||||
/hash.c
|
/hash.c
|
||||||
@@ -44,32 +64,72 @@
|
|||||||
/localcharset.c
|
/localcharset.c
|
||||||
/localcharset.h
|
/localcharset.h
|
||||||
/malloc.c
|
/malloc.c
|
||||||
|
/mbrtowc.c
|
||||||
|
/mbsinit.c
|
||||||
/mbswidth.c
|
/mbswidth.c
|
||||||
/mbswidth.h
|
/mbswidth.h
|
||||||
|
/memchr.c
|
||||||
|
/memchr.valgrind
|
||||||
/obstack.c
|
/obstack.c
|
||||||
/obstack.h
|
/obstack.h
|
||||||
|
/open.c
|
||||||
/pipe-safer.c
|
/pipe-safer.c
|
||||||
|
/pipe.c
|
||||||
|
/pipe.h
|
||||||
|
/pipe2-safer.c
|
||||||
|
/pipe2.c
|
||||||
/quote.c
|
/quote.c
|
||||||
/quote.h
|
/quote.h
|
||||||
/quotearg.c
|
/quotearg.c
|
||||||
/quotearg.h
|
/quotearg.h
|
||||||
|
/rawmemchr.c
|
||||||
|
/rawmemchr.valgrind
|
||||||
/ref-add.sed
|
/ref-add.sed
|
||||||
/ref-add.sin
|
/ref-add.sin
|
||||||
/ref-del.sed
|
/ref-del.sed
|
||||||
/ref-del.sin
|
/ref-del.sin
|
||||||
|
/sched.h
|
||||||
|
/sched.in.h
|
||||||
|
/sig-handler.h
|
||||||
|
/sigaction.c
|
||||||
|
/signal.h
|
||||||
|
/signal.in.h
|
||||||
|
/sigprocmask.c
|
||||||
|
/spawn.h
|
||||||
|
/spawn.in.h
|
||||||
|
/spawn_faction_addclose.c
|
||||||
|
/spawn_faction_adddup2.c
|
||||||
|
/spawn_faction_addopen.c
|
||||||
|
/spawn_faction_destroy.c
|
||||||
|
/spawn_faction_init.c
|
||||||
|
/spawn_int.h
|
||||||
|
/spawnattr_destroy.c
|
||||||
|
/spawnattr_init.c
|
||||||
|
/spawnattr_setflags.c
|
||||||
|
/spawnattr_setsigmask.c
|
||||||
|
/spawni.c
|
||||||
|
/spawnp.c
|
||||||
/stamp-h1
|
/stamp-h1
|
||||||
|
/stat.c
|
||||||
/stdbool.h
|
/stdbool.h
|
||||||
/stdbool.in.h
|
/stdbool.in.h
|
||||||
/stdbool_.h
|
/stdbool_.h
|
||||||
|
/stddef.h
|
||||||
|
/stddef.in.h
|
||||||
/stdint.h
|
/stdint.h
|
||||||
/stdint.in.h
|
/stdint.in.h
|
||||||
/stdint_.h
|
/stdint_.h
|
||||||
/stdio--.h
|
/stdio--.h
|
||||||
/stdio-safer.h
|
/stdio-safer.h
|
||||||
|
/stdio-write.c
|
||||||
|
/stdio.h
|
||||||
|
/stdio.in.h
|
||||||
/stdlib.h
|
/stdlib.h
|
||||||
/stdlib.in.h
|
/stdlib.in.h
|
||||||
/stdlib_.h
|
/stdlib_.h
|
||||||
/stpcpy.c
|
/stpcpy.c
|
||||||
|
/strchrnul.c
|
||||||
|
/strchrnul.valgrind
|
||||||
/streq.h
|
/streq.h
|
||||||
/strerror.c
|
/strerror.c
|
||||||
/string.h
|
/string.h
|
||||||
@@ -82,17 +142,29 @@
|
|||||||
/strtoul.c
|
/strtoul.c
|
||||||
/strverscmp.c
|
/strverscmp.c
|
||||||
/strverscmp.h
|
/strverscmp.h
|
||||||
|
/sys
|
||||||
|
/sys_stat.h
|
||||||
|
/sys_stat.in.h
|
||||||
|
/sys_wait.h
|
||||||
|
/sys_wait.in.h
|
||||||
|
/time.h
|
||||||
|
/time.in.h
|
||||||
/unistd--.h
|
/unistd--.h
|
||||||
/unistd-safer.h
|
/unistd-safer.h
|
||||||
/unistd.h
|
/unistd.h
|
||||||
/unistd.in.h
|
/unistd.in.h
|
||||||
/unistd_.h
|
/unistd_.h
|
||||||
/unitypes.h
|
/unitypes.h
|
||||||
|
/unitypes.in.h
|
||||||
/uniwidth
|
/uniwidth
|
||||||
/uniwidth.h
|
/uniwidth.h
|
||||||
|
/uniwidth.in.h
|
||||||
/unlocked-io.h
|
/unlocked-io.h
|
||||||
/unsetenv.c
|
/unsetenv.c
|
||||||
/verify.h
|
/verify.h
|
||||||
|
/w32spawn.h
|
||||||
|
/wait-process.c
|
||||||
|
/wait-process.h
|
||||||
/wchar.h
|
/wchar.h
|
||||||
/wchar.in.h
|
/wchar.in.h
|
||||||
/wchar_.h
|
/wchar_.h
|
||||||
|
|||||||
+3
-3
@@ -1,6 +1,7 @@
|
|||||||
# Make bison/lib.
|
# Make bison/lib.
|
||||||
|
|
||||||
# Copyright (C) 2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
|
# Copyright (C) 2001, 2002, 2003, 2004, 2006, 2008, 2009, 2010 Free
|
||||||
|
# Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -17,7 +18,7 @@
|
|||||||
|
|
||||||
include gnulib.mk
|
include gnulib.mk
|
||||||
|
|
||||||
AM_CFLAGS = $(WARNING_CFLAGS)
|
AM_CFLAGS += $(WARN_CFLAGS)
|
||||||
|
|
||||||
# Implementation of bitsets.
|
# Implementation of bitsets.
|
||||||
bitsets_sources = \
|
bitsets_sources = \
|
||||||
@@ -36,7 +37,6 @@ timevars_sources = \
|
|||||||
# Non-gnulib sources in Bison's internal library.
|
# Non-gnulib sources in Bison's internal library.
|
||||||
libbison_a_SOURCES += \
|
libbison_a_SOURCES += \
|
||||||
get-errno.h get-errno.c \
|
get-errno.h get-errno.c \
|
||||||
subpipe.h subpipe.c \
|
|
||||||
$(bitsets_sources) $(additional_bitsets_sources) $(timevars_sources)
|
$(bitsets_sources) $(additional_bitsets_sources) $(timevars_sources)
|
||||||
|
|
||||||
# The Yacc compatibility library.
|
# The Yacc compatibility library.
|
||||||
|
|||||||
+4
-1
@@ -1,5 +1,8 @@
|
|||||||
/* Array bitsets.
|
/* Array bitsets.
|
||||||
Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2002, 2003, 2006, 2009, 2010 Free Software
|
||||||
|
Foundation, Inc.
|
||||||
|
|
||||||
Contributed by Michael Hayes ([email protected]).
|
Contributed by Michael Hayes ([email protected]).
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
|||||||
+3
-1
@@ -1,5 +1,7 @@
|
|||||||
/* Functions to support abitsets.
|
/* Functions to support abitsets.
|
||||||
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2002, 2004, 2009, 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
|||||||
+4
-1
@@ -1,5 +1,8 @@
|
|||||||
/* Base bitset stuff.
|
/* Base bitset stuff.
|
||||||
Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2002, 2003, 2004, 2006, 2009, 2010 Free Software
|
||||||
|
Foundation, Inc.
|
||||||
|
|
||||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
|||||||
+4
-1
@@ -1,5 +1,8 @@
|
|||||||
/* General bitsets.
|
/* General bitsets.
|
||||||
Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009, 2010 Free
|
||||||
|
Software Foundation, Inc.
|
||||||
|
|
||||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
|||||||
+4
-1
@@ -1,5 +1,8 @@
|
|||||||
/* Generic bitsets.
|
/* Generic bitsets.
|
||||||
Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2002, 2003, 2004, 2009, 2010 Free Software
|
||||||
|
Foundation, Inc.
|
||||||
|
|
||||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
|||||||
+4
-1
@@ -1,5 +1,8 @@
|
|||||||
/* Bitset statistics.
|
/* Bitset statistics.
|
||||||
Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009, 2010 Free
|
||||||
|
Software Foundation, Inc.
|
||||||
|
|
||||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
|||||||
+4
-1
@@ -1,5 +1,8 @@
|
|||||||
/* Functions to support bitset statistics.
|
/* Functions to support bitset statistics.
|
||||||
Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2002, 2003, 2004, 2009, 2010 Free Software
|
||||||
|
Foundation, Inc.
|
||||||
|
|
||||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
|||||||
+3
-1
@@ -1,5 +1,7 @@
|
|||||||
/* Bitset vectors.
|
/* Bitset vectors.
|
||||||
Copyright (C) 2001, 2002, 2004, 2006 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2001, 2002, 2004, 2006, 2009, 2010 Free Software
|
||||||
|
Foundation, Inc.
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+3
-1
@@ -1,5 +1,7 @@
|
|||||||
/* Bitset vectors.
|
/* Bitset vectors.
|
||||||
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2002, 2004, 2009, 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Contributed by Akim Demaille (akim@freefriends.org).
|
Contributed by Akim Demaille (akim@freefriends.org).
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
|||||||
+3
-1
@@ -1,5 +1,7 @@
|
|||||||
/* Bitset vectors.
|
/* Bitset vectors.
|
||||||
Copyright (C) 2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2001, 2002, 2004, 2005, 2006, 2009, 2010 Free Software
|
||||||
|
Foundation, Inc.
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+3
-1
@@ -1,5 +1,7 @@
|
|||||||
/* Bitset vectors.
|
/* Bitset vectors.
|
||||||
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2002, 2004, 2009, 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
|||||||
+4
-1
@@ -1,5 +1,8 @@
|
|||||||
/* Functions to support expandable bitsets.
|
/* Functions to support expandable bitsets.
|
||||||
Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009, 2010 Free
|
||||||
|
Software Foundation, Inc.
|
||||||
|
|
||||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
|||||||
+3
-1
@@ -1,5 +1,7 @@
|
|||||||
/* Functions to support ebitsets.
|
/* Functions to support ebitsets.
|
||||||
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2002, 2004, 2009, 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
/* get-errno.c - get and set errno.
|
/* get-errno.c - get and set errno.
|
||||||
|
|
||||||
Copyright (C) 2002, 2006 Free Software Foundation, Inc.
|
Copyright (C) 2002, 2006, 2009, 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
/* get-errno.h - get and set errno.
|
/* get-errno.h - get and set errno.
|
||||||
|
|
||||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
Copyright (C) 2002, 2009, 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+4
-1
@@ -1,5 +1,8 @@
|
|||||||
/* Functions to support link list bitsets.
|
/* Functions to support link list bitsets.
|
||||||
Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2002, 2003, 2004, 2006, 2009, 2010 Free Software
|
||||||
|
Foundation, Inc.
|
||||||
|
|
||||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
|||||||
+3
-1
@@ -1,5 +1,7 @@
|
|||||||
/* Functions to support lbitsets.
|
/* Functions to support lbitsets.
|
||||||
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2002, 2004, 2009, 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
|||||||
+2
-1
@@ -1,5 +1,6 @@
|
|||||||
/* Fake libiberty.h for Bison.
|
/* Fake libiberty.h for Bison.
|
||||||
Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2002, 2003, 2004, 2009, 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
/* Yacc library main function.
|
/* Yacc library main function.
|
||||||
|
|
||||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
Copyright (C) 2002, 2009, 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of Bison, the GNU Compiler Compiler.
|
This file is part of Bison, the GNU Compiler Compiler.
|
||||||
|
|
||||||
|
|||||||
-176
@@ -1,176 +0,0 @@
|
|||||||
/* Subprocesses with pipes.
|
|
||||||
|
|
||||||
Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
||||||
|
|
||||||
/* Written by Paul Eggert <[email protected]>
|
|
||||||
and Florian Krohm <florian@edamail.fishkill.ibm.com>. */
|
|
||||||
|
|
||||||
#include <config.h>
|
|
||||||
|
|
||||||
#include "subpipe.h"
|
|
||||||
|
|
||||||
#include <errno.h>
|
|
||||||
|
|
||||||
#include <signal.h>
|
|
||||||
#if ! defined SIGCHLD && defined SIGCLD
|
|
||||||
# define SIGCHLD SIGCLD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
#include <unistd.h>
|
|
||||||
#ifndef STDIN_FILENO
|
|
||||||
# define STDIN_FILENO 0
|
|
||||||
#endif
|
|
||||||
#ifndef STDOUT_FILENO
|
|
||||||
# define STDOUT_FILENO 1
|
|
||||||
#endif
|
|
||||||
#if ! HAVE_DUP2 && ! defined dup2
|
|
||||||
# include <fcntl.h>
|
|
||||||
# define dup2(f, t) (close (t), fcntl (f, F_DUPFD, t))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if HAVE_SYS_WAIT_H
|
|
||||||
# include <sys/wait.h>
|
|
||||||
#endif
|
|
||||||
#ifndef WEXITSTATUS
|
|
||||||
# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
|
|
||||||
#endif
|
|
||||||
#ifndef WIFEXITED
|
|
||||||
# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if HAVE_VFORK_H
|
|
||||||
# include <vfork.h>
|
|
||||||
#endif
|
|
||||||
#if ! HAVE_WORKING_VFORK
|
|
||||||
# define vfork fork
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "error.h"
|
|
||||||
#include "unistd-safer.h"
|
|
||||||
|
|
||||||
#include "gettext.h"
|
|
||||||
#define _(Msgid) gettext (Msgid)
|
|
||||||
|
|
||||||
#ifndef __attribute__
|
|
||||||
/* This feature is available in gcc versions 2.5 and later. */
|
|
||||||
# if ! defined __GNUC__ || __GNUC__ < 2 || \
|
|
||||||
(__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
|
|
||||||
# define __attribute__(Spec) /* empty */
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef ATTRIBUTE_UNUSED
|
|
||||||
# define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* Initialize this module. */
|
|
||||||
|
|
||||||
void
|
|
||||||
init_subpipe (void)
|
|
||||||
{
|
|
||||||
#ifdef SIGCHLD
|
|
||||||
/* System V fork+wait does not work if SIGCHLD is ignored. */
|
|
||||||
signal (SIGCHLD, SIG_DFL);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Create a subprocess that is run as a filter. ARGV is the
|
|
||||||
NULL-terminated argument vector for the subprocess. Store read and
|
|
||||||
write file descriptors for communication with the subprocess into
|
|
||||||
FD[0] and FD[1]: input meant for the process can be written into
|
|
||||||
FD[0], and output from the process can be read from FD[1]. Return
|
|
||||||
the subprocess id.
|
|
||||||
|
|
||||||
To avoid deadlock, the invoker must not let incoming data pile up
|
|
||||||
in FD[1] while writing data to FD[0]. */
|
|
||||||
|
|
||||||
pid_t
|
|
||||||
create_subpipe (char const * const *argv, int fd[2])
|
|
||||||
{
|
|
||||||
int pipe_fd[2];
|
|
||||||
int child_fd[2];
|
|
||||||
pid_t pid;
|
|
||||||
|
|
||||||
if (pipe_safer (child_fd) != 0 || pipe_safer (pipe_fd) != 0)
|
|
||||||
error (EXIT_FAILURE, errno, "pipe");
|
|
||||||
fd[0] = child_fd[1];
|
|
||||||
fd[1] = pipe_fd[0];
|
|
||||||
child_fd[1] = pipe_fd[1];
|
|
||||||
|
|
||||||
pid = vfork ();
|
|
||||||
if (pid < 0)
|
|
||||||
error (EXIT_FAILURE, errno, "fork");
|
|
||||||
|
|
||||||
if (! pid)
|
|
||||||
{
|
|
||||||
/* Child. */
|
|
||||||
close (fd[0]);
|
|
||||||
close (fd[1]);
|
|
||||||
dup2 (child_fd[0], STDIN_FILENO);
|
|
||||||
close (child_fd[0]);
|
|
||||||
dup2 (child_fd[1], STDOUT_FILENO);
|
|
||||||
close (child_fd[1]);
|
|
||||||
|
|
||||||
/* The cast to (char **) rather than (char * const *) is needed
|
|
||||||
for portability to older hosts with a nonstandard prototype
|
|
||||||
for execvp. */
|
|
||||||
execvp (argv[0], (char **) argv);
|
|
||||||
|
|
||||||
_exit (errno == ENOENT ? 127 : 126);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Parent. */
|
|
||||||
close (child_fd[0]);
|
|
||||||
close (child_fd[1]);
|
|
||||||
return pid;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Wait for the subprocess to exit. */
|
|
||||||
|
|
||||||
void
|
|
||||||
reap_subpipe (pid_t pid, char const *program)
|
|
||||||
{
|
|
||||||
#if HAVE_WAITPID || defined waitpid
|
|
||||||
int wstatus;
|
|
||||||
if (waitpid (pid, &wstatus, 0) < 0)
|
|
||||||
error (EXIT_FAILURE, errno, "waitpid");
|
|
||||||
else
|
|
||||||
{
|
|
||||||
int status = WIFEXITED (wstatus) ? WEXITSTATUS (wstatus) : -1;
|
|
||||||
if (status)
|
|
||||||
error (EXIT_FAILURE, 0,
|
|
||||||
_(status == 126
|
|
||||||
? "subsidiary program `%s' could not be invoked"
|
|
||||||
: status == 127
|
|
||||||
? "subsidiary program `%s' not found"
|
|
||||||
: status < 0
|
|
||||||
? "subsidiary program `%s' failed"
|
|
||||||
: "subsidiary program `%s' failed (exit status %d)"),
|
|
||||||
program, status);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
end_of_output_subpipe (pid_t pid ATTRIBUTE_UNUSED,
|
|
||||||
int fd[2] ATTRIBUTE_UNUSED)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
/* Subprocesses with pipes.
|
|
||||||
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
||||||
|
|
||||||
/* Written by Paul Eggert <[email protected]>
|
|
||||||
and Florian Krohm <florian@edamail.fishkill.ibm.com>. */
|
|
||||||
|
|
||||||
#if HAVE_SYS_TYPES_H
|
|
||||||
# include <sys/types.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void init_subpipe (void);
|
|
||||||
pid_t create_subpipe (char const * const *, int[2]);
|
|
||||||
void end_of_output_subpipe (pid_t, int[2]);
|
|
||||||
void reap_subpipe (pid_t, char const *);
|
|
||||||
+4
-1
@@ -1,5 +1,8 @@
|
|||||||
/* Timing variables for measuring compiler performance.
|
/* Timing variables for measuring compiler performance.
|
||||||
Copyright (C) 2000, 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2000, 2002, 2004, 2006, 2009, 2010 Free Software
|
||||||
|
Foundation, Inc.
|
||||||
|
|
||||||
Contributed by Alex Samuel <samuel@codesourcery.com>
|
Contributed by Alex Samuel <samuel@codesourcery.com>
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
|||||||
+3
-1
@@ -1,6 +1,8 @@
|
|||||||
/* This file contains the definitions for timing variables used to -*- C -*-
|
/* This file contains the definitions for timing variables used to -*- C -*-
|
||||||
measure run-time performance of the compiler.
|
measure run-time performance of the compiler.
|
||||||
Copyright (C) 2002, 2007 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2002, 2007, 2009, 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Contributed by Akim Demaille <akim@freefriends.org>.
|
Contributed by Akim Demaille <akim@freefriends.org>.
|
||||||
|
|
||||||
This file is part of Bison, the GNU Compiler Compiler.
|
This file is part of Bison, the GNU Compiler Compiler.
|
||||||
|
|||||||
+4
-1
@@ -1,5 +1,8 @@
|
|||||||
/* Timing variables for measuring compiler performance.
|
/* Timing variables for measuring compiler performance.
|
||||||
Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2000, 2002, 2004, 2009, 2010 Free Software
|
||||||
|
Foundation, Inc.
|
||||||
|
|
||||||
Contributed by Alex Samuel <samuel@codesourcery.com>
|
Contributed by Alex Samuel <samuel@codesourcery.com>
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
|||||||
+4
-1
@@ -1,5 +1,8 @@
|
|||||||
/* Variable array bitsets.
|
/* Variable array bitsets.
|
||||||
Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009, 2010 Free
|
||||||
|
Software Foundation, Inc.
|
||||||
|
|
||||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
|||||||
+3
-1
@@ -1,5 +1,7 @@
|
|||||||
/* Functions to support vbitsets.
|
/* Functions to support vbitsets.
|
||||||
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2002, 2004, 2009, 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
/* Yacc library error-printing function.
|
/* Yacc library error-printing function.
|
||||||
|
|
||||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
Copyright (C) 2002, 2009, 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of Bison, the GNU Compiler Compiler.
|
This file is part of Bison, the GNU Compiler Compiler.
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,28 @@
|
|||||||
|
00gnulib.m4
|
||||||
absolute-header.m4
|
absolute-header.m4
|
||||||
|
alloca.m4
|
||||||
argmatch.m4
|
argmatch.m4
|
||||||
|
asm-underscore.m4
|
||||||
|
assert.m4
|
||||||
|
cloexec.m4
|
||||||
config-h.m4
|
config-h.m4
|
||||||
dirname.m4
|
dirname.m4
|
||||||
dos.m4
|
dos.m4
|
||||||
double-slash-root.m4
|
double-slash-root.m4
|
||||||
|
dup2.m4
|
||||||
environ.m4
|
environ.m4
|
||||||
errno_h.m4
|
errno_h.m4
|
||||||
error.m4
|
error.m4
|
||||||
exitfail.m4
|
exitfail.m4
|
||||||
extensions.m4
|
extensions.m4
|
||||||
|
fatal-signal.m4
|
||||||
|
fcntl-o.m4
|
||||||
|
fcntl.m4
|
||||||
|
fcntl_h.m4
|
||||||
|
fopen.m4
|
||||||
|
getdtablesize.m4
|
||||||
getopt.m4
|
getopt.m4
|
||||||
|
getpagesize.m4
|
||||||
gettext.m4
|
gettext.m4
|
||||||
gnulib-cache.m4
|
gnulib-cache.m4
|
||||||
gnulib-common.m4
|
gnulib-common.m4
|
||||||
@@ -28,24 +41,48 @@ javaexec.m4
|
|||||||
lib-ld.m4
|
lib-ld.m4
|
||||||
lib-link.m4
|
lib-link.m4
|
||||||
lib-prefix.m4
|
lib-prefix.m4
|
||||||
|
libunistring-base.m4
|
||||||
localcharset.m4
|
localcharset.m4
|
||||||
|
locale-fr.m4
|
||||||
|
locale-ja.m4
|
||||||
|
locale-zh.m4
|
||||||
longlong.m4
|
longlong.m4
|
||||||
malloc.m4
|
malloc.m4
|
||||||
mbrtowc.m4
|
mbrtowc.m4
|
||||||
|
mbsinit.m4
|
||||||
mbstate_t.m4
|
mbstate_t.m4
|
||||||
mbswidth.m4
|
mbswidth.m4
|
||||||
|
memchr.m4
|
||||||
|
mmap-anon.m4
|
||||||
|
mode_t.m4
|
||||||
|
multiarch.m4
|
||||||
nls.m4
|
nls.m4
|
||||||
|
open.m4
|
||||||
|
pipe.m4
|
||||||
|
pipe2.m4
|
||||||
po.m4
|
po.m4
|
||||||
|
posix_spawn.m4
|
||||||
progtest.m4
|
progtest.m4
|
||||||
quote.m4
|
quote.m4
|
||||||
quotearg.m4
|
quotearg.m4
|
||||||
|
rawmemchr.m4
|
||||||
|
sched_h.m4
|
||||||
setenv.m4
|
setenv.m4
|
||||||
|
sig_atomic_t.m4
|
||||||
|
sigaction.m4
|
||||||
|
signal_h.m4
|
||||||
|
signalblocking.m4
|
||||||
|
spawn_h.m4
|
||||||
|
stat.m4
|
||||||
stdbool.m4
|
stdbool.m4
|
||||||
|
stddef_h.m4
|
||||||
stdint.m4
|
stdint.m4
|
||||||
stdint_h.m4
|
stdint_h.m4
|
||||||
stdio-safer.m4
|
stdio-safer.m4
|
||||||
|
stdio_h.m4
|
||||||
stdlib_h.m4
|
stdlib_h.m4
|
||||||
stpcpy.m4
|
stpcpy.m4
|
||||||
|
strchrnul.m4
|
||||||
strerror.m4
|
strerror.m4
|
||||||
string_h.m4
|
string_h.m4
|
||||||
strndup.m4
|
strndup.m4
|
||||||
@@ -53,14 +90,22 @@ strnlen.m4
|
|||||||
strtol.m4
|
strtol.m4
|
||||||
strtoul.m4
|
strtoul.m4
|
||||||
strverscmp.m4
|
strverscmp.m4
|
||||||
|
sys_stat_h.m4
|
||||||
|
sys_wait_h.m4
|
||||||
threadlib.m4
|
threadlib.m4
|
||||||
|
time_h.m4
|
||||||
unistd-safer.m4
|
unistd-safer.m4
|
||||||
unistd_h.m4
|
unistd_h.m4
|
||||||
unlocked-io.m4
|
unlocked-io.m4
|
||||||
|
wait-process.m4
|
||||||
|
warn-on-use.m4
|
||||||
warning.m4
|
warning.m4
|
||||||
|
warnings.m4
|
||||||
wchar.m4
|
wchar.m4
|
||||||
|
wchar_h.m4
|
||||||
wchar_t.m4
|
wchar_t.m4
|
||||||
wctype.m4
|
wctype.m4
|
||||||
|
wctype_h.m4
|
||||||
wcwidth.m4
|
wcwidth.m4
|
||||||
wint_t.m4
|
wint_t.m4
|
||||||
xalloc.m4
|
xalloc.m4
|
||||||
|
|||||||
@@ -1,15 +1,28 @@
|
|||||||
|
/00gnulib.m4
|
||||||
/absolute-header.m4
|
/absolute-header.m4
|
||||||
|
/alloca.m4
|
||||||
/argmatch.m4
|
/argmatch.m4
|
||||||
|
/asm-underscore.m4
|
||||||
|
/assert.m4
|
||||||
|
/cloexec.m4
|
||||||
/config-h.m4
|
/config-h.m4
|
||||||
/dirname.m4
|
/dirname.m4
|
||||||
/dos.m4
|
/dos.m4
|
||||||
/double-slash-root.m4
|
/double-slash-root.m4
|
||||||
|
/dup2.m4
|
||||||
/environ.m4
|
/environ.m4
|
||||||
/errno_h.m4
|
/errno_h.m4
|
||||||
/error.m4
|
/error.m4
|
||||||
/exitfail.m4
|
/exitfail.m4
|
||||||
/extensions.m4
|
/extensions.m4
|
||||||
|
/fatal-signal.m4
|
||||||
|
/fcntl-o.m4
|
||||||
|
/fcntl.m4
|
||||||
|
/fcntl_h.m4
|
||||||
|
/fopen.m4
|
||||||
|
/getdtablesize.m4
|
||||||
/getopt.m4
|
/getopt.m4
|
||||||
|
/getpagesize.m4
|
||||||
/gettext.m4
|
/gettext.m4
|
||||||
/gnulib-cache.m4
|
/gnulib-cache.m4
|
||||||
/gnulib-common.m4
|
/gnulib-common.m4
|
||||||
@@ -28,24 +41,48 @@
|
|||||||
/lib-ld.m4
|
/lib-ld.m4
|
||||||
/lib-link.m4
|
/lib-link.m4
|
||||||
/lib-prefix.m4
|
/lib-prefix.m4
|
||||||
|
/libunistring-base.m4
|
||||||
/localcharset.m4
|
/localcharset.m4
|
||||||
|
/locale-fr.m4
|
||||||
|
/locale-ja.m4
|
||||||
|
/locale-zh.m4
|
||||||
/longlong.m4
|
/longlong.m4
|
||||||
/malloc.m4
|
/malloc.m4
|
||||||
/mbrtowc.m4
|
/mbrtowc.m4
|
||||||
|
/mbsinit.m4
|
||||||
/mbstate_t.m4
|
/mbstate_t.m4
|
||||||
/mbswidth.m4
|
/mbswidth.m4
|
||||||
|
/memchr.m4
|
||||||
|
/mmap-anon.m4
|
||||||
|
/mode_t.m4
|
||||||
|
/multiarch.m4
|
||||||
/nls.m4
|
/nls.m4
|
||||||
|
/open.m4
|
||||||
|
/pipe.m4
|
||||||
|
/pipe2.m4
|
||||||
/po.m4
|
/po.m4
|
||||||
|
/posix_spawn.m4
|
||||||
/progtest.m4
|
/progtest.m4
|
||||||
/quote.m4
|
/quote.m4
|
||||||
/quotearg.m4
|
/quotearg.m4
|
||||||
|
/rawmemchr.m4
|
||||||
|
/sched_h.m4
|
||||||
/setenv.m4
|
/setenv.m4
|
||||||
|
/sig_atomic_t.m4
|
||||||
|
/sigaction.m4
|
||||||
|
/signal_h.m4
|
||||||
|
/signalblocking.m4
|
||||||
|
/spawn_h.m4
|
||||||
|
/stat.m4
|
||||||
/stdbool.m4
|
/stdbool.m4
|
||||||
|
/stddef_h.m4
|
||||||
/stdint.m4
|
/stdint.m4
|
||||||
/stdint_h.m4
|
/stdint_h.m4
|
||||||
/stdio-safer.m4
|
/stdio-safer.m4
|
||||||
|
/stdio_h.m4
|
||||||
/stdlib_h.m4
|
/stdlib_h.m4
|
||||||
/stpcpy.m4
|
/stpcpy.m4
|
||||||
|
/strchrnul.m4
|
||||||
/strerror.m4
|
/strerror.m4
|
||||||
/string_h.m4
|
/string_h.m4
|
||||||
/strndup.m4
|
/strndup.m4
|
||||||
@@ -53,14 +90,22 @@
|
|||||||
/strtol.m4
|
/strtol.m4
|
||||||
/strtoul.m4
|
/strtoul.m4
|
||||||
/strverscmp.m4
|
/strverscmp.m4
|
||||||
|
/sys_stat_h.m4
|
||||||
|
/sys_wait_h.m4
|
||||||
/threadlib.m4
|
/threadlib.m4
|
||||||
|
/time_h.m4
|
||||||
/unistd-safer.m4
|
/unistd-safer.m4
|
||||||
/unistd_h.m4
|
/unistd_h.m4
|
||||||
/unlocked-io.m4
|
/unlocked-io.m4
|
||||||
|
/wait-process.m4
|
||||||
|
/warn-on-use.m4
|
||||||
/warning.m4
|
/warning.m4
|
||||||
|
/warnings.m4
|
||||||
/wchar.m4
|
/wchar.m4
|
||||||
|
/wchar_h.m4
|
||||||
/wchar_t.m4
|
/wchar_t.m4
|
||||||
/wctype.m4
|
/wctype.m4
|
||||||
|
/wctype_h.m4
|
||||||
/wcwidth.m4
|
/wcwidth.m4
|
||||||
/wint_t.m4
|
/wint_t.m4
|
||||||
/xalloc.m4
|
/xalloc.m4
|
||||||
|
|||||||
+3
-1
@@ -1,5 +1,7 @@
|
|||||||
# bison-i18n.m4 serial 2
|
# bison-i18n.m4 serial 2
|
||||||
dnl Copyright (C) 2005-2006 Free Software Foundation, Inc.
|
|
||||||
|
dnl Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
dnl This file is free software; the Free Software Foundation
|
dnl This file is free software; the Free Software Foundation
|
||||||
dnl gives unlimited permission to copy and/or distribute it,
|
dnl gives unlimited permission to copy and/or distribute it,
|
||||||
dnl with or without modifications, as long as this notice is preserved.
|
dnl with or without modifications, as long as this notice is preserved.
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
# Sanity test a C compiler.
|
# Sanity test a C compiler.
|
||||||
|
|
||||||
# Copyright (C) 2006 Free Software Foundation, Inc.
|
# Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# -*- Autoconf -*-
|
# -*- Autoconf -*-
|
||||||
# Sanity-test a C++ compiler.
|
# Sanity-test a C++ compiler.
|
||||||
#
|
#
|
||||||
# Copyright (C) 2004, 2006 Free Software Foundation, Inc.
|
# Copyright (C) 2004, 2006, 2009, 2010 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user