mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-08-08 18:25:13 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a69417c066 | ||
|
|
d138fdbf19 | ||
|
|
9326268a46 | ||
|
|
88964d04d9 | ||
|
|
e803581008 | ||
|
|
015af8c168 | ||
|
|
3a48f72d7e | ||
|
|
3e0f96bc08 | ||
|
|
ef1a77c2c9 | ||
|
|
2842171a4c | ||
|
|
64fa1ea1b8 | ||
|
|
7700a71572 | ||
|
|
7baed3bf89 | ||
|
|
1710ea3d30 | ||
|
|
12de352a6f | ||
|
|
6fc75bfd3a | ||
|
|
96df91407c | ||
|
|
b30efba0d0 | ||
|
|
fd2d280114 | ||
|
|
68e202f30f | ||
|
|
d7848b138c | ||
|
|
40c6b975e9 | ||
|
|
a5fb3dead0 | ||
|
|
ac5ff6a908 | ||
|
|
0b1cb33137 | ||
|
|
9f3c97f74f | ||
|
|
a99566be67 | ||
|
|
ca66b45a86 | ||
|
|
55601256c2 | ||
|
|
43cc2463d2 | ||
|
|
25a46077de | ||
|
|
62d3162c4c | ||
|
|
3f2f7848cc | ||
|
|
c4267a3d35 | ||
|
|
ae774286e8 | ||
|
|
43f8a3245a | ||
|
|
a22d7bd8d6 | ||
|
|
f36280e16e | ||
|
|
38612b10a3 | ||
|
|
ffc03584ad | ||
|
|
dd3c3f3006 | ||
|
|
f1d93aa21c | ||
|
|
a4f0747a2a | ||
|
|
ca69f83c53 | ||
|
|
b06c1dfb75 | ||
|
|
7525f95ed5 | ||
|
|
1daed0de8a | ||
|
|
32e175835b | ||
|
|
ea04a14c5c | ||
|
|
d6b12c2d8b | ||
|
|
f4ffa313a2 | ||
|
|
1214dfb03b | ||
|
|
55b4181996 | ||
|
|
12a04365ce | ||
|
|
6929a4a0e8 | ||
|
|
07cccc8bc6 | ||
|
|
36791b5576 | ||
|
|
dba44a1367 | ||
|
|
d4593e87be | ||
|
|
6b1ec1fb33 | ||
|
|
bfb74f79b8 | ||
|
|
c520f816b1 | ||
|
|
cc6ed5f7f1 | ||
|
|
ac28f67c0b | ||
|
|
f30e1ab65c | ||
|
|
52e9776027 | ||
|
|
21292982fe | ||
|
|
9f0938ad32 | ||
|
|
cb948818d0 | ||
|
|
c0760f18e0 | ||
|
|
c884affb0b | ||
|
|
f7e7f57941 | ||
|
|
d1210d1d6e | ||
|
|
d5c2eff246 | ||
|
|
b59b91bb6e | ||
|
|
63e75f2e38 | ||
|
|
69dc1147ba | ||
|
|
3d9d5d34ff | ||
|
|
701d80ffa0 | ||
|
|
88f06d2beb | ||
|
|
daa938e7f0 | ||
|
|
ed45e93ed8 | ||
|
|
74d757ab92 | ||
|
|
4be25f1591 | ||
|
|
b7008317cf | ||
|
|
3f66ed1c8b | ||
|
|
58dce15432 | ||
|
|
e6970f2ed0 | ||
|
|
b9866ce4da | ||
|
|
b32ba448c8 | ||
|
|
5844cd0cfa | ||
|
|
0fc1a97d9f | ||
|
|
84b6f48351 | ||
|
|
b6a70d99a6 | ||
|
|
66d35de779 | ||
|
|
5e5b240715 | ||
|
|
aaf7be2c4b | ||
|
|
0ea80316a9 | ||
|
|
09b2117db7 | ||
|
|
78fc5ce865 | ||
|
|
766ffc1523 | ||
|
|
06a2f464b1 | ||
|
|
15ab9127f5 | ||
|
|
32f18df511 | ||
|
|
19f8d30b9c | ||
|
|
7b106ce5f0 | ||
|
|
b5c15946a1 | ||
|
|
980929ba0b | ||
|
|
4c3791f08d | ||
|
|
a8355549a5 | ||
|
|
2883204382 | ||
|
|
825b9e4ef4 | ||
|
|
57339f0421 | ||
|
|
963c0cf62f | ||
|
|
6a1e01f060 | ||
|
|
4cecb5a248 | ||
|
|
76c97f6a39 | ||
|
|
e4ef7aa1c9 | ||
|
|
3557477440 | ||
|
|
4b412c9eca | ||
|
|
fa7f94f217 | ||
|
|
d854cc9e5a | ||
|
|
2dfb4daf9b | ||
|
|
cc904af579 | ||
|
|
716c50b877 | ||
|
|
9f41bcaae8 | ||
|
|
1ccbf4bb8b | ||
|
|
a69f6fa569 | ||
|
|
3757d84e90 | ||
|
|
cac4f75e15 | ||
|
|
fc7ddd2818 | ||
|
|
0ffdf37212 | ||
|
|
9e55edfc29 | ||
|
|
d39a6b7ca9 | ||
|
|
d287d66a69 | ||
|
|
ea451a17d7 | ||
|
|
24b1e65f04 | ||
|
|
7ad28769d6 | ||
|
|
57d4ee2b82 | ||
|
|
d8a9ec00b8 | ||
|
|
872e1b86c4 | ||
|
|
ad4c2c7a57 | ||
|
|
0785dec2c8 | ||
|
|
e1828f4f07 | ||
|
|
a816bf3eac | ||
|
|
2ce6476804 | ||
|
|
457b6d1e72 | ||
|
|
79ebbdb36a | ||
|
|
0aa2ac9063 | ||
|
|
e7d79012ae | ||
|
|
eb4a4d73bc | ||
|
|
dee96b5a07 | ||
|
|
4bfeeafb00 | ||
|
|
c18cf8cb26 | ||
|
|
54b982ae70 | ||
|
|
cf2e198269 | ||
|
|
af4483a0ab | ||
|
|
674fd9acbc | ||
|
|
6fedd4d1d6 | ||
|
|
abe1baa044 | ||
|
|
33285af04d | ||
|
|
cd7f95831e | ||
|
|
1b9a8440cd | ||
|
|
aead559e00 | ||
|
|
92b69b7f09 | ||
|
|
6e303f08d6 | ||
|
|
3dfc01e247 | ||
|
|
1503820f54 | ||
|
|
bc9bb28004 | ||
|
|
16c4a35041 | ||
|
|
f0451dba71 | ||
|
|
a9f37dee0c | ||
|
|
4b0979fcf3 | ||
|
|
cc35239e1b | ||
|
|
2e2cbb3fad | ||
|
|
adb4edee47 | ||
|
|
65490badba | ||
|
|
8b044b8540 | ||
|
|
0704bc9b8e | ||
|
|
2b7c2ef124 | ||
|
|
48e38d301e | ||
|
|
560757768c | ||
|
|
238b8134ec | ||
|
|
483642486d | ||
|
|
146ad4c8d0 | ||
|
|
f2a4c94506 | ||
|
|
65fae038b9 | ||
|
|
e1cb5fb523 | ||
|
|
64fabbb49f | ||
|
|
3b2925a060 | ||
|
|
83bcf86639 | ||
|
|
8639df64a6 | ||
|
|
377bd7c9a2 | ||
|
|
b4a7a230f1 | ||
|
|
c1586e58fe | ||
|
|
50766eee39 | ||
|
|
dc3b81cd67 | ||
|
|
c555896775 | ||
|
|
35f61cb998 | ||
|
|
9291f914de | ||
|
|
ff1581dddb | ||
|
|
4b9170b2c0 | ||
|
|
523a9eafdc | ||
|
|
bcdf932ed9 | ||
|
|
e2aabb3dc6 | ||
|
|
e8ebe4b0c7 | ||
|
|
9043475828 | ||
|
|
d80a86e0b5 | ||
|
|
cfc3acf242 | ||
|
|
93337ac41c | ||
|
|
0d7803637b | ||
|
|
a62c863ec3 | ||
|
|
1e883de90c | ||
|
|
efcff8cd5c | ||
|
|
3e85a00236 | ||
|
|
f85c981ac1 | ||
|
|
5cb10dae3c | ||
|
|
26e1ca45ba | ||
|
|
8888e43b2c | ||
|
|
d9ca2df2aa | ||
|
|
e8def3ff6e | ||
|
|
76e734e5ed | ||
|
|
b8b4a730a0 | ||
|
|
b9d2d2a881 | ||
|
|
78986eff74 | ||
|
|
1393a78454 | ||
|
|
de11686376 | ||
|
|
badfc69c26 | ||
|
|
fb28699f95 | ||
|
|
6b307af66c | ||
|
|
dad56b10d3 | ||
|
|
5f1ff7cd74 | ||
|
|
b6cac93afa | ||
|
|
86d5a1ed5c | ||
|
|
97e9ee3ad5 | ||
|
|
d81e5db73f | ||
|
|
029806c785 | ||
|
|
a2874a4e5d | ||
|
|
d54387b4bc | ||
|
|
a4c22fa4bf | ||
|
|
0d214b93b0 | ||
|
|
3c5d71ca8b | ||
|
|
d61c57b70c | ||
|
|
ea57e0a3c4 | ||
|
|
57c429f305 | ||
|
|
239e5c1a9a | ||
|
|
ae9b5e5a4f | ||
|
|
7ae1c5929e | ||
|
|
1d708336d4 | ||
|
|
705131d1de | ||
|
|
5c2a5a8970 | ||
|
|
6b784f8552 | ||
|
|
32a1edfccd | ||
|
|
63cf44e7ac | ||
|
|
9507085cf3 | ||
|
|
8d3c8c3643 | ||
|
|
16c9da79ef | ||
|
|
d0132d6bec | ||
|
|
1306676ce3 | ||
|
|
e18cda8b5e | ||
|
|
ddf896eb8e | ||
|
|
9aadbdf371 | ||
|
|
f1b769ff28 | ||
|
|
94ff2b9475 | ||
|
|
470d206b2e | ||
|
|
08f0a4e409 | ||
|
|
00fda01856 | ||
|
|
bf31619762 | ||
|
|
31a743b2bb | ||
|
|
48b43d9d83 | ||
|
|
4b9e71f993 | ||
|
|
16cd214585 | ||
|
|
f2c7ab2c1f | ||
|
|
2c377512c2 | ||
|
|
74c3b26d85 |
@@ -1,3 +1,9 @@
|
||||
Copyright 1994, 1995, 1996, 1999, 2000, 2001 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
This file is free documentation; the Free Software Foundation gives
|
||||
unlimited permission to copy, distribute and modify it.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
@@ -8,20 +14,27 @@ various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, a file
|
||||
`config.cache' that saves the results of its tests to speed up
|
||||
reconfiguring, and a file `config.log' containing compiler output
|
||||
(useful mainly for debugging `configure').
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. (Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.)
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If at some point `config.cache'
|
||||
contains results you don't want to keep, you may remove or edit it.
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.in' is used to create `configure' by a program
|
||||
called `autoconf'. You only need `configure.in' if you want to change
|
||||
it or regenerate `configure' using a newer version of `autoconf'.
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You only need
|
||||
`configure.ac' if you want to change it or regenerate `configure' using
|
||||
a newer version of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
@@ -55,14 +68,15 @@ Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. You can give `configure'
|
||||
initial values for variables by setting them in the environment. Using
|
||||
a Bourne-compatible shell, you can do that on the command line like
|
||||
this:
|
||||
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
|
||||
the `configure' script does not know about. Run `./configure --help'
|
||||
for details on some of the pertinent environment variables.
|
||||
|
||||
Or on systems that have the `env' program, you can do it like this:
|
||||
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
|
||||
You can give `configure' initial values for variables by setting
|
||||
them in the environment. You can do that on the command line like this:
|
||||
|
||||
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
|
||||
|
||||
*Note Defining Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
@@ -75,11 +89,11 @@ directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
If you have to use a `make' that does not supports the `VPATH'
|
||||
variable, you have to compile the package for one architecture at a time
|
||||
in the source code directory. After you have installed the package for
|
||||
one architecture, use `make distclean' before reconfiguring for another
|
||||
architecture.
|
||||
If you have to use a `make' that does not support the `VPATH'
|
||||
variable, you have to compile the package for one architecture at a
|
||||
time in the source code directory. After you have installed the
|
||||
package for one architecture, use `make distclean' before reconfiguring
|
||||
for another architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
@@ -122,22 +136,35 @@ you can use the `configure' options `--x-includes=DIR' and
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' can not figure out
|
||||
There may be some features `configure' cannot figure out
|
||||
automatically, but needs to determine by the type of host the package
|
||||
will run on. Usually `configure' can figure that out, but if it prints
|
||||
a message saying it can not guess the host type, give it the
|
||||
`--host=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name with three fields:
|
||||
a message saying it cannot guess the host type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the host type.
|
||||
|
||||
If you are building compiler tools for cross-compiling, you can also
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the `--target=TYPE' option to select the type of system they will
|
||||
produce code for and the `--build=TYPE' option to select the type of
|
||||
system on which you are compiling the package.
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the host
|
||||
platform (i.e., that on which the generated programs will eventually be
|
||||
run) with `--host=TYPE'. In this case, you should also specify the
|
||||
build platform with `--build=TYPE', because, in this case, it may not
|
||||
be possible to guess the build platform (it sometimes involves
|
||||
compiling and running simple test programs, and this can't be done if
|
||||
the compiler is a cross compiler).
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
@@ -150,20 +177,44 @@ default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Operation Controls
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
will cause the specified gcc to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Use and save the results of the tests in FILE instead of
|
||||
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
|
||||
debugging `configure'.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
@@ -175,8 +226,6 @@ operates.
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`--version'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options.
|
||||
|
||||
+15
@@ -1,3 +1,18 @@
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
## the Free Software Foundation; either version 2 of the License, or
|
||||
## (at your option) any later version.
|
||||
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
## GNU General Public License for more details.
|
||||
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with this program; if not, write to the Free Software
|
||||
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
## 02111-1307 USA
|
||||
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
AUTOMAKE_OPTIONS = 1.5 check-news readme-alpha dist-bzip2
|
||||
|
||||
|
||||
+85
-68
@@ -1,6 +1,7 @@
|
||||
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.5c from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
# Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@@ -12,7 +13,6 @@
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
@@ -43,9 +43,11 @@ AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = @program_transform_name@
|
||||
@@ -57,7 +59,12 @@ PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
|
||||
EXEEXT = @EXEEXT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOM4TE = @AUTOM4TE@
|
||||
AWK = @AWK@
|
||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||
CATALOGS = @CATALOGS@
|
||||
@@ -66,7 +73,7 @@ CC = @CC@
|
||||
CPP = @CPP@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEPDIR = @DEPDIR@
|
||||
EXEEXT = @EXEEXT@
|
||||
GCC = @GCC@
|
||||
GENCAT = @GENCAT@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMOFILES = @GMOFILES@
|
||||
@@ -77,12 +84,10 @@ INTLBISON = @INTLBISON@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||
LIB = @LIB@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
M4 = @M4@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
POFILES = @POFILES@
|
||||
POSUB = @POSUB@
|
||||
@@ -92,6 +97,7 @@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
WARNING_CFLAGS = @WARNING_CFLAGS@
|
||||
WERROR_CFLAGS = @WERROR_CFLAGS@
|
||||
am__include = @am__include@
|
||||
am__quote = @am__quote@
|
||||
install_sh = @install_sh@
|
||||
@@ -132,9 +138,9 @@ RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
|
||||
uninstall-info-recursive all-recursive install-data-recursive \
|
||||
install-exec-recursive installdirs-recursive install-recursive \
|
||||
uninstall-recursive check-recursive installcheck-recursive
|
||||
DIST_COMMON = README ./stamp-h.in ABOUT-NLS AUTHORS COPYING ChangeLog \
|
||||
INSTALL Makefile.am Makefile.in NEWS README-alpha THANKS \
|
||||
aclocal.m4 config.hin configure configure.in
|
||||
DIST_COMMON = README ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL \
|
||||
Makefile.am Makefile.in NEWS THANKS aclocal.m4 config.hin \
|
||||
configure configure.in
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
@@ -144,44 +150,34 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && \
|
||||
CONFIG_HEADERS= CONFIG_LINKS= \
|
||||
CONFIG_FILES=$@ $(SHELL) ./config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
|
||||
|
||||
$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
|
||||
$(ACLOCAL_M4): configure.in m4/c-bs-a.m4 m4/codeset.m4 m4/dmalloc.m4 m4/error.m4 m4/gettext.m4 m4/glibc21.m4 m4/iconv.m4 m4/isc-posix.m4 m4/lcmessage.m4 m4/m4.m4 m4/malloc.m4 m4/mbrtowc.m4 m4/mbstate_t.m4 m4/prereq.m4 m4/progtest.m4 m4/realloc.m4 m4/strerror_r.m4 m4/warning.m4
|
||||
$(ACLOCAL_M4): configure.in m4/c-bs-a.m4 m4/codeset.m4 m4/dmalloc.m4 m4/error.m4 m4/gettext.m4 m4/glibc21.m4 m4/iconv.m4 m4/isc-posix.m4 m4/lcmessage.m4 m4/malloc.m4 m4/mbrtowc.m4 m4/mbstate_t.m4 m4/prereq.m4 m4/progtest.m4 m4/realloc.m4 m4/strerror_r.m4 m4/warning.m4
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
config.h: stamp-h
|
||||
|
||||
config.h: stamp-h1
|
||||
@if test ! -f $@; then \
|
||||
rm -f stamp-h; \
|
||||
$(MAKE) stamp-h; \
|
||||
rm -f stamp-h1; \
|
||||
$(MAKE) stamp-h1; \
|
||||
else :; fi
|
||||
stamp-h: $(srcdir)/config.hin $(top_builddir)/config.status
|
||||
@rm -f stamp-h stamp-hT
|
||||
@echo timestamp > stamp-hT 2> /dev/null
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES= CONFIG_HEADERS=config.h:config.hin \
|
||||
$(SHELL) ./config.status
|
||||
@mv stamp-hT stamp-h
|
||||
$(srcdir)/config.hin: $(srcdir)/./stamp-h.in
|
||||
@if test ! -f $@; then \
|
||||
rm -f $(srcdir)/./stamp-h.in; \
|
||||
$(MAKE) $(srcdir)/./stamp-h.in; \
|
||||
else :; fi
|
||||
$(srcdir)/./stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
@rm -f $(srcdir)/./stamp-h.in $(srcdir)/./stamp-h.inT
|
||||
@echo timestamp > $(srcdir)/./stamp-h.inT 2> /dev/null
|
||||
|
||||
stamp-h1: $(srcdir)/config.hin $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status config.h
|
||||
|
||||
$(srcdir)/config.hin: $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOHEADER)
|
||||
@mv $(srcdir)/./stamp-h.inT $(srcdir)/./stamp-h.in
|
||||
touch $(srcdir)/config.hin
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h
|
||||
intl/Makefile: $(top_builddir)/config.status $(top_srcdir)/intl/Makefile.in
|
||||
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
uninstall-info-am:
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
@@ -239,16 +235,19 @@ tags-recursive:
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
|
||||
ETAGS = etags
|
||||
ETAGSFLAGS =
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique $(LISP)
|
||||
mkid -fID $$unique
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.hin $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
@@ -259,30 +258,35 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.hin $(TAGS_DEPENDENCIES) \
|
||||
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
|
||||
list='$(SOURCES) $(HEADERS) config.hin $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)config.hin$$unique$(LISP)$$tags" \
|
||||
|| etags $(ETAGS_ARGS) $$tags config.hin $$unique $(LISP)
|
||||
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|
||||
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`CDPATH=: && cd $(top_builddir) && pwd` \
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
top_distdir = .
|
||||
# Avoid unsightly `./'.
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
|
||||
am__remove_distdir = \
|
||||
{ test ! -d $(distdir) \
|
||||
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr $(distdir); }; }
|
||||
|
||||
GZIP_ENV = --best
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@if sed 15q $(srcdir)/NEWS | fgrep -e "$(VERSION)" >/dev/null; \
|
||||
@@ -290,17 +294,20 @@ distdir: $(DISTFILES)
|
||||
echo "NEWS not updated; not releasing" 1>&2; \
|
||||
exit 1; \
|
||||
fi
|
||||
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
|
||||
$(am__remove_distdir)
|
||||
mkdir $(distdir)
|
||||
$(mkinstalldirs) $(distdir)/intl $(distdir)/po $(distdir)/tests
|
||||
@for file in $(DISTFILES); do \
|
||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
$(mkinstalldirs) "$(distdir)/$$dir"; \
|
||||
dir="/$$dir"; \
|
||||
$(mkinstalldirs) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
cp -pR $$d/$$file $(distdir)$$dir \
|
||||
|| exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
@@ -308,7 +315,7 @@ distdir: $(DISTFILES)
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
for subdir in $(SUBDIRS); do \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d $(distdir)/$$subdir \
|
||||
|| mkdir $(distdir)/$$subdir \
|
||||
@@ -326,28 +333,34 @@ distdir: $(DISTFILES)
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r $(distdir)
|
||||
dist: distdir
|
||||
dist-gzip: distdir
|
||||
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
$(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
|
||||
$(am__remove_distdir)
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/=build
|
||||
mkdir $(distdir)/=inst
|
||||
chmod a-w $(distdir)
|
||||
dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \
|
||||
dc_install_base=`$(am__cd) $(distdir)/=inst && pwd` \
|
||||
&& cd $(distdir)/=build \
|
||||
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
|
||||
--with-included-gettext \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
@@ -355,17 +368,24 @@ distcheck: dist
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& (test `find $$dc_install_base -type f -print | wc -l` -le 1 \
|
||||
|| (echo "Error: files left after uninstall" 1>&2; \
|
||||
exit 1) ) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distclean \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
find $$dc_install_base -type f -print ; \
|
||||
exit 1; } >&2 ) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
|
||||
&& rm -f $(distdir).tar.gz \
|
||||
&& (test `find . -type f -print | wc -l` -eq 0 \
|
||||
|| (echo "Error: files left after distclean" 1>&2; \
|
||||
exit 1) )
|
||||
-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
|
||||
$(am__remove_distdir)
|
||||
@echo "$(distdir).tar.gz is ready for distribution" | \
|
||||
sed 'h;s/./=/g;p;x;p;x'
|
||||
distcleancheck: distclean
|
||||
if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile config.h
|
||||
@@ -383,6 +403,7 @@ install-am: all-am
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
@@ -400,10 +421,6 @@ clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
dist-all: distdir
|
||||
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
|
||||
distclean: distclean-recursive
|
||||
-rm -f config.status config.cache config.log
|
||||
distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
|
||||
@@ -440,10 +457,10 @@ uninstall-info: uninstall-info-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \
|
||||
clean-generic clean-recursive dist dist-all dist-bzip2 \
|
||||
distcheck distclean distclean-generic distclean-hdr \
|
||||
distclean-recursive distclean-tags distdir dvi dvi-am \
|
||||
dvi-recursive info info-am info-recursive install install-am \
|
||||
install-data install-data-am install-data-recursive \
|
||||
dist-gzip distcheck distclean distclean-generic distclean-hdr \
|
||||
distclean-recursive distclean-tags distcleancheck distdir dvi \
|
||||
dvi-am dvi-recursive info info-am info-recursive install \
|
||||
install-am install-data install-data-am install-data-recursive \
|
||||
install-exec install-exec-am install-exec-recursive \
|
||||
install-info install-info-am install-info-recursive install-man \
|
||||
install-recursive install-strip installcheck installcheck-am \
|
||||
|
||||
@@ -1,7 +1,99 @@
|
||||
Bison News
|
||||
----------
|
||||
|
||||
Changes in version 1.29c:
|
||||
Changes in version 1.32, 2002-01-23:
|
||||
|
||||
* Fix Yacc output file names
|
||||
|
||||
* Portability fixes
|
||||
|
||||
* Italian, Dutch translations
|
||||
|
||||
Changes in version 1.31, 2002-01-14:
|
||||
|
||||
* Many Bug Fixes
|
||||
|
||||
* GNU Gettext and %expect
|
||||
GNU Gettext asserts 10 s/r conflicts, but there are 7. Now that
|
||||
Bison dies on incorrect %expectations, we fear there will be
|
||||
too many bug reports for Gettext, so _for the time being_, %expect
|
||||
does not trigger an error when the input file is named `plural.y'.
|
||||
|
||||
* Use of alloca in parsers
|
||||
If YYSTACK_USE_ALLOCA is defined to 0, then the parsers will use
|
||||
malloc exclusively. Since 1.29, but was not NEWS'ed.
|
||||
|
||||
alloca is used only when compiled with GCC, to avoid portability
|
||||
problems as on AIX.
|
||||
|
||||
* When the generated parser lacks debugging code, YYDEBUG is now 0
|
||||
(as POSIX requires) instead of being undefined.
|
||||
|
||||
* User Actions
|
||||
Bison has always permitted actions such as { $$ = $1 }: it adds the
|
||||
ending semicolon. Now if in Yacc compatibility mode, the semicolon
|
||||
is no longer output: one has to write { $$ = $1; }.
|
||||
|
||||
* Better C++ compliance
|
||||
The output parsers try to respect C++ namespaces.
|
||||
|
||||
* Reduced Grammars
|
||||
Fixed bugs when reporting useless nonterminals.
|
||||
|
||||
* 64 bit hosts
|
||||
The parsers work properly on 64 bit hosts.
|
||||
|
||||
* Error messages
|
||||
Some calls to strerror resulted in scrambled or missing error messages.
|
||||
|
||||
* %expect
|
||||
When the number of shift/reduce conflicts is correct, don't issue
|
||||
any warning.
|
||||
|
||||
* The verbose report includes the rule line numbers.
|
||||
|
||||
* Rule line numbers are fixed in traces.
|
||||
|
||||
* Swedish translation
|
||||
|
||||
* Parse errors
|
||||
Verbose parse error messages from the parsers are better looking.
|
||||
Before: parse error: unexpected `'/'', expecting `"number"' or `'-'' or `'(''
|
||||
Now: parse error: unexpected '/', expecting "number" or '-' or '('
|
||||
|
||||
* Fixed parser memory leaks.
|
||||
When the generated parser was using malloc to extend its stacks, the
|
||||
previous allocations were not freed.
|
||||
|
||||
* Fixed verbose output file.
|
||||
Some newlines were missing.
|
||||
Some conflicts in state descriptions were missing.
|
||||
|
||||
* Fixed conflict report.
|
||||
Option -v was needed to get the result.
|
||||
|
||||
* %expect
|
||||
Was not used.
|
||||
Mismatches are errors, not warnings.
|
||||
|
||||
* Fixed incorrect processing of some invalid input.
|
||||
|
||||
* Fixed CPP guards: 9foo.h uses BISON_9FOO_H instead of 9FOO_H.
|
||||
|
||||
* Fixed some typos in the documentation.
|
||||
|
||||
* %token MY_EOF 0 is supported.
|
||||
Before, MY_EOF was silently renumbered as 257.
|
||||
|
||||
* doc/refcard.tex is updated.
|
||||
|
||||
* %output, %file-prefix, %name-prefix.
|
||||
New.
|
||||
|
||||
* --output
|
||||
New, aliasing `--output-file'.
|
||||
|
||||
Changes in version 1.30, 2001-10-26:
|
||||
|
||||
* `--defines' and `--graph' have now an optionnal argument which is the
|
||||
output file name. `-d' and `-g' do not change, they do not take any
|
||||
@@ -10,13 +102,14 @@ Changes in version 1.29c:
|
||||
* `%source_extension' and `%header_extension' are removed, failed
|
||||
experiment.
|
||||
|
||||
* The test suite is more portable.
|
||||
* Portability fixes.
|
||||
|
||||
Changes in version 1.29, 2001-09-07:
|
||||
|
||||
* Better portability.
|
||||
|
||||
Changes in version 1.29:
|
||||
|
||||
* Output file does not redefine const; that is now config.h's job.
|
||||
* The output file does not define const, as this caused problems when used
|
||||
with common autoconfiguration schemes. If you still use ancient compilers
|
||||
that lack const, compile with the equivalent of the C compiler option
|
||||
`-Dconst='. autoconf's AC_C_CONST macro provides one way to do this.
|
||||
|
||||
* Added `-g' and `--graph'.
|
||||
|
||||
@@ -42,8 +135,11 @@ Changes in version 1.29:
|
||||
* New directives.
|
||||
`%yacc', `%fixed_output_files', `%defines', `%no_parser', `%verbose',
|
||||
`%debug', `%source_extension' and `%header_extension'.
|
||||
|
||||
* @$
|
||||
Automatic location tracking.
|
||||
|
||||
Changes in version 1.28:
|
||||
Changes in version 1.28, 1999-07-06:
|
||||
|
||||
* Should compile better now with K&R compilers.
|
||||
|
||||
@@ -75,7 +171,7 @@ Changes in version 1.26:
|
||||
* Generated parsers should now work even on operating systems which do
|
||||
not provide alloca().
|
||||
|
||||
Changes in version 1.25:
|
||||
Changes in version 1.25, 1995-10-16:
|
||||
|
||||
* Errors in the input grammar are not fatal; Bison keeps reading
|
||||
the grammar file, and reports all the errors found in it.
|
||||
@@ -116,3 +212,7 @@ Changes in version 1.22:
|
||||
Changes in version 1.20:
|
||||
|
||||
Output file does not redefine const for C++.
|
||||
|
||||
Local Variables:
|
||||
mode: outline
|
||||
End:
|
||||
|
||||
@@ -1,27 +1,44 @@
|
||||
Bison was originally written by Robert Corbett. It would not be what
|
||||
it is today without the invaluable help of these people:
|
||||
|
||||
Akim Demaille akim@epita.fr
|
||||
Airy Andre Airy.Andre@edf.fr
|
||||
Akim Demaille [email protected]
|
||||
Albert Chin-A-Young [email protected]
|
||||
Alexander Belopolsky [email protected]
|
||||
Arnold Robbins [email protected]
|
||||
Cris van Pelt [email protected]
|
||||
Daniel Hagerty [email protected]
|
||||
David J. MacKenzie [email protected]
|
||||
Dick Streefland [email protected]
|
||||
Enrico Scholz [email protected]
|
||||
Evgeny Stambulchik [email protected]
|
||||
Fabrice Bauzac [email protected]
|
||||
H. Merijn Brand [email protected]
|
||||
Hans Aberg [email protected]
|
||||
Jesse Thilo [email protected]
|
||||
Jim Meyering [email protected]
|
||||
Juan Manuel Guerrero [email protected]
|
||||
Kees Zeelenberg [email protected]
|
||||
Keith Browne [email protected]
|
||||
Laurent Mascherpa [email protected]
|
||||
Marc Autret [email protected]
|
||||
Mike Castle [email protected]
|
||||
Neil Booth [email protected]
|
||||
Nelson H. F. Beebe [email protected]
|
||||
Noah Friedman [email protected]
|
||||
Pascal Bart [email protected]
|
||||
Paul Eggert [email protected]
|
||||
Per Allansson [email protected]
|
||||
Peter Hámorský [email protected]
|
||||
Piotr Gackiewicz [email protected]
|
||||
Richard Stallman [email protected]
|
||||
Robert Anisko [email protected]
|
||||
Shura [email protected]
|
||||
Tom Lane [email protected]
|
||||
Tom Tromey [email protected]
|
||||
Wayne Green [email protected]
|
||||
Wolfram Wagner [email protected]
|
||||
Wwp [email protected]
|
||||
|
||||
Many people are not named here because we lost track of them. We
|
||||
thank them! Please, help us keeping this list up to date.
|
||||
|
||||
Vendored
+529
-253
File diff suppressed because it is too large
Load Diff
+102
-74
@@ -5,97 +5,110 @@
|
||||
*/
|
||||
#undef CRAY_STACKSEG_END
|
||||
|
||||
/* Define if using `alloca.c'. */
|
||||
/* Define to 1 if using `alloca.c'. */
|
||||
#undef C_ALLOCA
|
||||
|
||||
/* Define to 1 if translation of program messages to the user's native
|
||||
language is requested. */
|
||||
#undef ENABLE_NLS
|
||||
|
||||
/* Define if you have `alloca', as a function or macro. */
|
||||
/* Define to 1 if you have `alloca', as a function or macro. */
|
||||
#undef HAVE_ALLOCA
|
||||
|
||||
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
|
||||
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
||||
*/
|
||||
#undef HAVE_ALLOCA_H
|
||||
|
||||
/* Define if you have the <argz.h> header file. */
|
||||
/* Define to 1 if you have the <argz.h> header file. */
|
||||
#undef HAVE_ARGZ_H
|
||||
|
||||
/* Define if you have the <ctype.h> header file. */
|
||||
/* Define to 1 if you have the <ctype.h> header file. */
|
||||
#undef HAVE_CTYPE_H
|
||||
|
||||
/* Define if backslash-a works in C strings. */
|
||||
#undef HAVE_C_BACKSLASH_A
|
||||
|
||||
/* Define if you have the `dcgettext' function. */
|
||||
/* Define to 1 if you have the `dcgettext' function. */
|
||||
#undef HAVE_DCGETTEXT
|
||||
|
||||
/* Define to 1 if you have the declaration of `memchr', and to 0 if you don't.
|
||||
*/
|
||||
#undef HAVE_DECL_MEMCHR
|
||||
|
||||
/* Define to 1 if you have the declaration of `memrchr', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_MEMRCHR
|
||||
|
||||
/* Define to 1 if you have the declaration of `stpcpy', and to 0 if you don't.
|
||||
*/
|
||||
#undef HAVE_DECL_STPCPY
|
||||
|
||||
/* Define to 1 if you have the declaration of `strchr', and to 0 if you don't.
|
||||
*/
|
||||
#undef HAVE_DECL_STRCHR
|
||||
|
||||
/* Define to 1 if you have the declaration of `strerror', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_STRERROR
|
||||
|
||||
/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_STRERROR_R
|
||||
|
||||
/* Define to 1 if you have the declaration of `strndup', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_STRNDUP
|
||||
|
||||
/* Define to 1 if you have the declaration of `strnlen', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_STRNLEN
|
||||
|
||||
/* Define to 1 if you have the declaration of `strspn', and to 0 if you don't.
|
||||
*/
|
||||
#undef HAVE_DECL_STRSPN
|
||||
|
||||
/* Define if the malloc check has been performed. */
|
||||
#undef HAVE_DONE_WORKING_MALLOC_CHECK
|
||||
|
||||
/* Define if the realloc check has been performed. */
|
||||
#undef HAVE_DONE_WORKING_REALLOC_CHECK
|
||||
|
||||
/* Define if you have the `doprnt' function. */
|
||||
/* Define to 1 if you have the `doprnt' function. */
|
||||
#undef HAVE_DOPRNT
|
||||
|
||||
/* Define if you have the `feof_unlocked' function. */
|
||||
/* Define to 1 if you have the `feof_unlocked' function. */
|
||||
#undef HAVE_FEOF_UNLOCKED
|
||||
|
||||
/* Define if you have the `fgets_unlocked' function. */
|
||||
/* Define to 1 if you have the `fgets_unlocked' function. */
|
||||
#undef HAVE_FGETS_UNLOCKED
|
||||
|
||||
/* Define if you have the `getcwd' function. */
|
||||
/* Define to 1 if you have the `getcwd' function. */
|
||||
#undef HAVE_GETCWD
|
||||
|
||||
/* Define if you have the `getegid' function. */
|
||||
/* Define to 1 if you have the `getegid' function. */
|
||||
#undef HAVE_GETEGID
|
||||
|
||||
/* Define if you have the `geteuid' function. */
|
||||
/* Define to 1 if you have the `geteuid' function. */
|
||||
#undef HAVE_GETEUID
|
||||
|
||||
/* Define if you have the `getgid' function. */
|
||||
/* Define to 1 if you have the `getgid' function. */
|
||||
#undef HAVE_GETGID
|
||||
|
||||
/* Define if you have the `getpagesize' function. */
|
||||
/* Define to 1 if you have the `getpagesize' function. */
|
||||
#undef HAVE_GETPAGESIZE
|
||||
|
||||
/* Define if the GNU gettext() function is already present or preinstalled. */
|
||||
#undef HAVE_GETTEXT
|
||||
|
||||
/* Define if you have the `getuid' function. */
|
||||
/* Define to 1 if you have the `getuid' function. */
|
||||
#undef HAVE_GETUID
|
||||
|
||||
/* Define if you have the iconv() function. */
|
||||
#undef HAVE_ICONV
|
||||
|
||||
/* Define if you have the <inttypes.h> header file. */
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define if you have the `isascii' function. */
|
||||
/* Define to 1 if you have the `isascii' function. */
|
||||
#undef HAVE_ISASCII
|
||||
|
||||
/* Define if you have the `iswprint' function. */
|
||||
/* Define to 1 if you have the `iswprint' function. */
|
||||
#undef HAVE_ISWPRINT
|
||||
|
||||
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
|
||||
@@ -104,130 +117,127 @@
|
||||
/* Define if your <locale.h> file defines LC_MESSAGES. */
|
||||
#undef HAVE_LC_MESSAGES
|
||||
|
||||
/* Define if you have the <limits.h> header file. */
|
||||
/* Define to 1 if you have the <limits.h> header file. */
|
||||
#undef HAVE_LIMITS_H
|
||||
|
||||
/* Define if you have the <locale.h> header file. */
|
||||
/* Define to 1 if you have the <locale.h> header file. */
|
||||
#undef HAVE_LOCALE_H
|
||||
|
||||
/* Define if you have the <malloc.h> header file. */
|
||||
/* Define to 1 if you have the <malloc.h> header file. */
|
||||
#undef HAVE_MALLOC_H
|
||||
|
||||
/* Define to 1 if mbrtowc and mbstate_t are properly declared. */
|
||||
#undef HAVE_MBRTOWC
|
||||
|
||||
/* Define if you have the `mbsinit' function. */
|
||||
/* Define to 1 if you have the `mbsinit' function. */
|
||||
#undef HAVE_MBSINIT
|
||||
|
||||
/* Define if you have the `memchr' function. */
|
||||
/* Define to 1 if you have the `memchr' function. */
|
||||
#undef HAVE_MEMCHR
|
||||
|
||||
/* Define if you have the <memory.h> header file. */
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define if you have the `mempcpy' function. */
|
||||
/* Define to 1 if you have the `mempcpy' function. */
|
||||
#undef HAVE_MEMPCPY
|
||||
|
||||
/* Define if you have the `mkstemp' function. */
|
||||
/* Define to 1 if you have the `memrchr' function. */
|
||||
#undef HAVE_MEMRCHR
|
||||
|
||||
/* Define to 1 if you have the `mkstemp' function. */
|
||||
#undef HAVE_MKSTEMP
|
||||
|
||||
/* Define if you have a working `mmap' system call. */
|
||||
/* Define to 1 if you have a working `mmap' system call. */
|
||||
#undef HAVE_MMAP
|
||||
|
||||
/* Define if you have the `munmap' function. */
|
||||
/* Define to 1 if you have the `munmap' function. */
|
||||
#undef HAVE_MUNMAP
|
||||
|
||||
/* Define if you have the <nl_types.h> header file. */
|
||||
/* Define to 1 if you have the <nl_types.h> header file. */
|
||||
#undef HAVE_NL_TYPES_H
|
||||
|
||||
/* Define if you have the `putenv' function. */
|
||||
/* Define to 1 if libc includes obstacks. */
|
||||
#undef HAVE_OBSTACK
|
||||
|
||||
/* Define to 1 if you have the `putenv' function. */
|
||||
#undef HAVE_PUTENV
|
||||
|
||||
/* Define if you have the `setenv' function. */
|
||||
/* Define to 1 if you have the `setenv' function. */
|
||||
#undef HAVE_SETENV
|
||||
|
||||
/* Define if you have the `setlocale' function. */
|
||||
/* Define to 1 if you have the `setlocale' function. */
|
||||
#undef HAVE_SETLOCALE
|
||||
|
||||
/* Define if you have the <stddef.h> header file. */
|
||||
/* Define to 1 if you have the <stddef.h> header file. */
|
||||
#undef HAVE_STDDEF_H
|
||||
|
||||
/* Define if you have the <stdint.h> header file. */
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define if you have the <stdlib.h> header file. */
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define if you have the `stpcpy' function. */
|
||||
/* Define to 1 if you have the `stpcpy' function. */
|
||||
#undef HAVE_STPCPY
|
||||
|
||||
/* Define if you have the `strcasecmp' function. */
|
||||
/* Define to 1 if you have the `strcasecmp' function. */
|
||||
#undef HAVE_STRCASECMP
|
||||
|
||||
/* Define if you have the `strchr' function. */
|
||||
/* Define to 1 if you have the `strchr' function. */
|
||||
#undef HAVE_STRCHR
|
||||
|
||||
/* Define if you have the `strdup' function. */
|
||||
/* Define to 1 if you have the `strdup' function. */
|
||||
#undef HAVE_STRDUP
|
||||
|
||||
/* Define if you have the `strerror' function. */
|
||||
/* Define to 1 if you have the `strerror' function. */
|
||||
#undef HAVE_STRERROR
|
||||
|
||||
/* Define if you have the `strerror_r' function. */
|
||||
/* Define to 1 if you have the `strerror_r' function. */
|
||||
#undef HAVE_STRERROR_R
|
||||
|
||||
/* Define if you have the <strings.h> header file. */
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define if you have the <string.h> header file. */
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define if you have the `strndup' function. */
|
||||
#undef HAVE_STRNDUP
|
||||
|
||||
/* Define if you have the `strnlen' function. */
|
||||
#undef HAVE_STRNLEN
|
||||
|
||||
/* Define if you have the `strspn' function. */
|
||||
/* Define to 1 if you have the `strspn' function. */
|
||||
#undef HAVE_STRSPN
|
||||
|
||||
/* Define if you have the `strtoul' function. */
|
||||
/* Define to 1 if you have the `strtoul' function. */
|
||||
#undef HAVE_STRTOUL
|
||||
|
||||
/* Define if you have the <sys/param.h> header file. */
|
||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||
#undef HAVE_SYS_PARAM_H
|
||||
|
||||
/* Define if you have the <sys/stat.h> header file. */
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define if you have the <sys/types.h> header file. */
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define if you have the `tsearch' function. */
|
||||
/* Define to 1 if you have the `tsearch' function. */
|
||||
#undef HAVE_TSEARCH
|
||||
|
||||
/* Define if you have the <unistd.h> header file. */
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define if you have the `vprintf' function. */
|
||||
/* Define to 1 if you have the `vprintf' function. */
|
||||
#undef HAVE_VPRINTF
|
||||
|
||||
/* Define if you have the <wchar.h> header file. */
|
||||
/* Define to 1 if you have the <wchar.h> header file. */
|
||||
#undef HAVE_WCHAR_H
|
||||
|
||||
/* Define if you have the <wctype.h> header file. */
|
||||
/* Define to 1 if you have the <wctype.h> header file. */
|
||||
#undef HAVE_WCTYPE_H
|
||||
|
||||
/* Define to 1 if `strerror_r' returns a string. */
|
||||
#undef HAVE_WORKING_STRERROR_R
|
||||
|
||||
/* Define if you have the `__argz_count' function. */
|
||||
/* Define to 1 if you have the `__argz_count' function. */
|
||||
#undef HAVE___ARGZ_COUNT
|
||||
|
||||
/* Define if you have the `__argz_next' function. */
|
||||
/* Define to 1 if you have the `__argz_next' function. */
|
||||
#undef HAVE___ARGZ_NEXT
|
||||
|
||||
/* Define if you have the `__argz_stringify' function. */
|
||||
/* Define to 1 if you have the `__argz_stringify' function. */
|
||||
#undef HAVE___ARGZ_STRINGIFY
|
||||
|
||||
/* Define as const if the declaration of iconv() needs const. */
|
||||
@@ -236,6 +246,21 @@
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define if compiler has function prototypes */
|
||||
#undef PROTOTYPES
|
||||
|
||||
@@ -247,9 +272,12 @@
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
#undef STACK_DIRECTION
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define to 1 if strerror_r returns char *. */
|
||||
#undef STRERROR_R_CHAR_P
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
@@ -259,14 +287,14 @@
|
||||
/* Define to 1 for GNU C library extensions. */
|
||||
#undef _GNU_SOURCE
|
||||
|
||||
/* Define if on MINIX. */
|
||||
/* Define to 1 if on MINIX. */
|
||||
#undef _MINIX
|
||||
|
||||
/* Define if the system does not provide POSIX.1 features except with this
|
||||
defined. */
|
||||
/* Define to 2 if the system does not provide POSIX.1 features except with
|
||||
this defined. */
|
||||
#undef _POSIX_1_SOURCE
|
||||
|
||||
/* Define if you need to in order for `stat' and other things to work. */
|
||||
/* Define to 1 if you need to in order for `stat' and other things to work. */
|
||||
#undef _POSIX_SOURCE
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
|
||||
+21
-15
@@ -1,6 +1,7 @@
|
||||
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.5c from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
# Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@@ -12,7 +13,6 @@
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
@@ -43,9 +43,11 @@ AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = @program_transform_name@
|
||||
@@ -57,7 +59,12 @@ PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
|
||||
EXEEXT = @EXEEXT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOM4TE = @AUTOM4TE@
|
||||
AWK = @AWK@
|
||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||
CATALOGS = @CATALOGS@
|
||||
@@ -66,7 +73,7 @@ CC = @CC@
|
||||
CPP = @CPP@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEPDIR = @DEPDIR@
|
||||
EXEEXT = @EXEEXT@
|
||||
GCC = @GCC@
|
||||
GENCAT = @GENCAT@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMOFILES = @GMOFILES@
|
||||
@@ -77,12 +84,10 @@ INTLBISON = @INTLBISON@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||
LIB = @LIB@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
M4 = @M4@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
POFILES = @POFILES@
|
||||
POSUB = @POSUB@
|
||||
@@ -92,10 +97,10 @@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
WARNING_CFLAGS = @WARNING_CFLAGS@
|
||||
WERROR_CFLAGS = @WERROR_CFLAGS@
|
||||
am__include = @am__include@
|
||||
am__quote = @am__quote@
|
||||
install_sh = @install_sh@
|
||||
|
||||
EXTRA_DIST = move-if-change prev-version.txt
|
||||
subdir = config
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||
@@ -111,14 +116,11 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu config/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && \
|
||||
CONFIG_HEADERS= CONFIG_LINKS= \
|
||||
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
||||
uninstall-info-am:
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
top_distdir = ..
|
||||
@@ -126,13 +128,16 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
$(mkinstalldirs) "$(distdir)/$$dir"; \
|
||||
dir="/$$dir"; \
|
||||
$(mkinstalldirs) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
cp -pR $$d/$$file $(distdir)$$dir \
|
||||
|| exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
@@ -157,6 +162,7 @@ install-am: all-am
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
Vendored
+80
-64
@@ -1,9 +1,9 @@
|
||||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Free Software Foundation, Inc.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2001-09-13'
|
||||
timestamp='2002-01-23'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@@ -24,8 +24,9 @@ timestamp='2001-09-13'
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Written by Per Bothner <bothner@cygnus.com>.
|
||||
# Please send patches to <[email protected]>.
|
||||
# Originally written by Per Bothner <per@bothner.com>.
|
||||
# Please send patches to <[email protected]>. Submit a context
|
||||
# diff and a properly formatted ChangeLog entry.
|
||||
#
|
||||
# This script attempts to guess a canonical system name similar to
|
||||
# config.sub. If it succeeds, it prints the system name on stdout, and
|
||||
@@ -134,23 +135,21 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
# object file format. This provides both forward
|
||||
# compatibility and a consistent mechanism for selecting the
|
||||
# object file format.
|
||||
# Determine the machine/vendor (is the vendor relevant).
|
||||
case "${UNAME_MACHINE}" in
|
||||
amiga) machine=m68k-unknown ;;
|
||||
arm32) machine=arm-unknown ;;
|
||||
atari*) machine=m68k-atari ;;
|
||||
sun3*) machine=m68k-sun ;;
|
||||
mac68k) machine=m68k-apple ;;
|
||||
macppc) machine=powerpc-apple ;;
|
||||
hp3[0-9][05]) machine=m68k-hp ;;
|
||||
ibmrt|romp-ibm) machine=romp-ibm ;;
|
||||
sparc*) machine=`uname -p`-unknown ;;
|
||||
*) machine=${UNAME_MACHINE}-unknown ;;
|
||||
#
|
||||
# Note: NetBSD doesn't particularly care about the vendor
|
||||
# portion of the name. We always set it to "unknown".
|
||||
UNAME_MACHINE_ARCH=`(uname -p) 2>/dev/null` || \
|
||||
UNAME_MACHINE_ARCH=unknown
|
||||
case "${UNAME_MACHINE_ARCH}" in
|
||||
arm*) machine=arm-unknown ;;
|
||||
sh3el) machine=shl-unknown ;;
|
||||
sh3eb) machine=sh-unknown ;;
|
||||
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
|
||||
esac
|
||||
# The Operating System including object format, if it has switched
|
||||
# to ELF recently, or will in the future.
|
||||
case "${UNAME_MACHINE}" in
|
||||
i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
|
||||
case "${UNAME_MACHINE_ARCH}" in
|
||||
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
|
||||
eval $set_cc_for_build
|
||||
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep __ELF__ >/dev/null
|
||||
@@ -290,6 +289,9 @@ EOF
|
||||
*:[Aa]miga[Oo][Ss]:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-amigaos
|
||||
exit 0 ;;
|
||||
*:[Mm]orph[Oo][Ss]:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-morphos
|
||||
exit 0 ;;
|
||||
*:OS/390:*:*)
|
||||
echo i370-ibm-openedition
|
||||
exit 0 ;;
|
||||
@@ -547,10 +549,8 @@ EOF
|
||||
9000/31? ) HP_ARCH=m68000 ;;
|
||||
9000/[34]?? ) HP_ARCH=m68k ;;
|
||||
9000/[678][0-9][0-9])
|
||||
case "${HPUX_REV}" in
|
||||
11.[0-9][0-9])
|
||||
if [ -x /usr/bin/getconf ]; then
|
||||
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
|
||||
if [ -x /usr/bin/getconf ]; then
|
||||
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
|
||||
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
|
||||
case "${sc_cpu_version}" in
|
||||
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
|
||||
@@ -559,13 +559,13 @@ EOF
|
||||
case "${sc_kernel_bits}" in
|
||||
32) HP_ARCH="hppa2.0n" ;;
|
||||
64) HP_ARCH="hppa2.0w" ;;
|
||||
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
|
||||
esac ;;
|
||||
esac
|
||||
fi ;;
|
||||
esac
|
||||
if [ "${HP_ARCH}" = "" ]; then
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
fi
|
||||
if [ "${HP_ARCH}" = "" ]; then
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
|
||||
#define _HPUX_SOURCE
|
||||
#include <stdlib.h>
|
||||
@@ -598,10 +598,10 @@ EOF
|
||||
exit (0);
|
||||
}
|
||||
EOF
|
||||
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
|
||||
if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
|
||||
rm -f $dummy.c $dummy
|
||||
fi ;;
|
||||
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy`
|
||||
if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
|
||||
rm -f $dummy.c $dummy
|
||||
fi ;;
|
||||
esac
|
||||
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
|
||||
exit 0 ;;
|
||||
@@ -737,6 +737,9 @@ EOF
|
||||
i*:PW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-pw32
|
||||
exit 0 ;;
|
||||
x86:Interix*:3*)
|
||||
echo i386-pc-interix3
|
||||
exit 0 ;;
|
||||
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
|
||||
# How do we know it's Interix rather than the generic POSIX subsystem?
|
||||
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
|
||||
@@ -768,10 +771,24 @@ EOF
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit 0 ;;
|
||||
mips:Linux:*:*)
|
||||
case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in
|
||||
big) echo mips-unknown-linux-gnu && exit 0 ;;
|
||||
little) echo mipsel-unknown-linux-gnu && exit 0 ;;
|
||||
esac
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#undef CPU
|
||||
#undef mips
|
||||
#undef mipsel
|
||||
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
|
||||
CPU=mipsel
|
||||
#else
|
||||
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
|
||||
CPU=mips
|
||||
#else
|
||||
CPU=
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
|
||||
rm -f $dummy.c
|
||||
test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
|
||||
;;
|
||||
ppc:Linux:*:*)
|
||||
echo powerpc-unknown-linux-gnu
|
||||
@@ -820,7 +837,9 @@ EOF
|
||||
# The BFD linker knows what the default object file format is, so
|
||||
# first see if it will tell us. cd to the root directory to prevent
|
||||
# problems with other programs or directories called `ld' in the path.
|
||||
ld_supported_targets=`cd /; ld --help 2>&1 \
|
||||
# Export LANG=C to prevent ld from outputting information in other
|
||||
# languages.
|
||||
ld_supported_targets=`LANG=C; export LANG; cd /; ld --help 2>&1 \
|
||||
| sed -ne '/supported targets:/!d
|
||||
s/[ ][ ]*/ /g
|
||||
s/.*supported targets: *//
|
||||
@@ -844,32 +863,29 @@ EOF
|
||||
esac
|
||||
# Determine whether the default compiler is a.out or elf
|
||||
eval $set_cc_for_build
|
||||
cat >$dummy.c <<EOF
|
||||
#include <features.h>
|
||||
#ifdef __cplusplus
|
||||
#include <stdio.h> /* for printf() prototype */
|
||||
int main (int argc, char *argv[]) {
|
||||
#else
|
||||
int main (argc, argv) int argc; char *argv[]; {
|
||||
#endif
|
||||
#ifdef __ELF__
|
||||
# ifdef __GLIBC__
|
||||
# if __GLIBC__ >= 2
|
||||
printf ("%s-pc-linux-gnu\n", argv[1]);
|
||||
# else
|
||||
printf ("%s-pc-linux-gnulibc1\n", argv[1]);
|
||||
# endif
|
||||
# else
|
||||
printf ("%s-pc-linux-gnulibc1\n", argv[1]);
|
||||
# endif
|
||||
#else
|
||||
printf ("%s-pc-linux-gnuaout\n", argv[1]);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#include <features.h>
|
||||
#ifdef __ELF__
|
||||
# ifdef __GLIBC__
|
||||
# if __GLIBC__ >= 2
|
||||
LIBC=gnu
|
||||
# else
|
||||
LIBC=gnulibc1
|
||||
# endif
|
||||
# else
|
||||
LIBC=gnulibc1
|
||||
# endif
|
||||
#else
|
||||
#ifdef __INTEL_COMPILER
|
||||
LIBC=gnu
|
||||
#else
|
||||
LIBC=gnuaout
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
|
||||
rm -f $dummy.c
|
||||
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
|
||||
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
|
||||
;;
|
||||
i*86:DYNIX/ptx:4*:*)
|
||||
@@ -948,7 +964,7 @@ EOF
|
||||
exit 0 ;;
|
||||
M68*:*:R3V[567]*:*)
|
||||
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
|
||||
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
|
||||
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
|
||||
OS_REL=''
|
||||
test -r /etc/.relid \
|
||||
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
|
||||
@@ -1057,7 +1073,7 @@ EOF
|
||||
*:QNX:*:4*)
|
||||
echo i386-pc-qnx
|
||||
exit 0 ;;
|
||||
NSR-[KW]:NONSTOP_KERNEL:*:*)
|
||||
NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*)
|
||||
echo nsr-tandem-nsk${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:NonStop-UX:*:*)
|
||||
|
||||
Vendored
+45
-17
@@ -1,9 +1,9 @@
|
||||
#! /bin/sh
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Free Software Foundation, Inc.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2001-09-14'
|
||||
timestamp='2002-01-02'
|
||||
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
@@ -29,7 +29,8 @@ timestamp='2001-09-14'
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Please send patches to <[email protected]>.
|
||||
# Please send patches to <[email protected]>. Submit a context
|
||||
# diff and a properly formatted ChangeLog entry.
|
||||
#
|
||||
# Configuration subroutine to validate and canonicalize a configuration type.
|
||||
# Supply the specified configuration type as an argument.
|
||||
@@ -226,6 +227,7 @@ case $basic_machine in
|
||||
1750a | 580 \
|
||||
| a29k \
|
||||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
|
||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
||||
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
|
||||
| c4x | clipper \
|
||||
| d10v | d30v | dsp16xx \
|
||||
@@ -244,14 +246,13 @@ case $basic_machine in
|
||||
| pdp10 | pdp11 | pj | pjl \
|
||||
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
|
||||
| pyramid \
|
||||
| s390 | s390x \
|
||||
| sh | sh[34] | sh[34]eb | shbe | shle \
|
||||
| sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \
|
||||
| stormy16 | strongarm \
|
||||
| strongarm \
|
||||
| tahoe | thumb | tic80 | tron \
|
||||
| v850 \
|
||||
| v850 | v850e \
|
||||
| we32k \
|
||||
| x86 | xscale \
|
||||
| x86 | xscale | xstormy16 | xtensa \
|
||||
| z8k)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
@@ -278,7 +279,8 @@ case $basic_machine in
|
||||
580-* \
|
||||
| a29k-* \
|
||||
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
|
||||
| alphapca5[67]-* | arc-* \
|
||||
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
|
||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
|
||||
| arm-* | armbe-* | armle-* | armv*-* \
|
||||
| avr-* \
|
||||
| bs2000-* \
|
||||
@@ -303,14 +305,14 @@ case $basic_machine in
|
||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
||||
| pyramid-* \
|
||||
| romp-* | rs6000-* \
|
||||
| s390-* | s390x-* \
|
||||
| sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \
|
||||
| sparc-* | sparc64-* | sparc86x-* | sparclite-* \
|
||||
| sparcv9-* | sparcv9b-* | stormy16-* | strongarm-* | sv1-* \
|
||||
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* \
|
||||
| t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
|
||||
| v850-* | vax-* \
|
||||
| v850-* | v850e-* | vax-* \
|
||||
| we32k-* \
|
||||
| x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \
|
||||
| x86-* | x86_64-* | xmp-* | xps100-* | xscale-* | xstormy16-* \
|
||||
| xtensa-* \
|
||||
| ymp-* \
|
||||
| z8k-*)
|
||||
;;
|
||||
@@ -419,6 +421,14 @@ case $basic_machine in
|
||||
decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
|
||||
basic_machine=mips-dec
|
||||
;;
|
||||
decsystem10* | dec10*)
|
||||
basic_machine=pdp10-dec
|
||||
os=-tops10
|
||||
;;
|
||||
decsystem20* | dec20*)
|
||||
basic_machine=pdp10-dec
|
||||
os=-tops20
|
||||
;;
|
||||
delta | 3300 | motorola-3300 | motorola-delta \
|
||||
| 3300-motorola | delta-motorola)
|
||||
basic_machine=m68k-motorola
|
||||
@@ -621,6 +631,10 @@ case $basic_machine in
|
||||
basic_machine=m68k-rom68k
|
||||
os=-coff
|
||||
;;
|
||||
morphos)
|
||||
basic_machine=powerpc-unknown
|
||||
os=-morphos
|
||||
;;
|
||||
msdos)
|
||||
basic_machine=i386-pc
|
||||
os=-msdos
|
||||
@@ -725,7 +739,7 @@ case $basic_machine in
|
||||
pc532 | pc532-*)
|
||||
basic_machine=ns32k-pc532
|
||||
;;
|
||||
pentium | p5 | k5 | k6 | nexgen)
|
||||
pentium | p5 | k5 | k6 | nexgen | viac3)
|
||||
basic_machine=i586-pc
|
||||
;;
|
||||
pentiumpro | p6 | 6x86 | athlon)
|
||||
@@ -734,7 +748,7 @@ case $basic_machine in
|
||||
pentiumii | pentium2)
|
||||
basic_machine=i686-pc
|
||||
;;
|
||||
pentium-* | p5-* | k5-* | k6-* | nexgen-*)
|
||||
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
|
||||
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentiumpro-* | p6-* | 6x86-* | athlon-*)
|
||||
@@ -785,6 +799,12 @@ case $basic_machine in
|
||||
rtpc | rtpc-*)
|
||||
basic_machine=romp-ibm
|
||||
;;
|
||||
s390 | s390-*)
|
||||
basic_machine=s390-ibm
|
||||
;;
|
||||
s390x | s390x-*)
|
||||
basic_machine=s390x-ibm
|
||||
;;
|
||||
sa29200)
|
||||
basic_machine=a29k-amd
|
||||
os=-udi
|
||||
@@ -796,7 +816,7 @@ case $basic_machine in
|
||||
basic_machine=sh-hitachi
|
||||
os=-hms
|
||||
;;
|
||||
sparclite-wrs)
|
||||
sparclite-wrs | simso-wrs)
|
||||
basic_machine=sparclite-wrs
|
||||
os=-vxworks
|
||||
;;
|
||||
@@ -876,6 +896,10 @@ case $basic_machine in
|
||||
tx39el)
|
||||
basic_machine=mipstx39el-unknown
|
||||
;;
|
||||
toad1)
|
||||
basic_machine=pdp10-xkl
|
||||
os=-tops20
|
||||
;;
|
||||
tower | tower-32)
|
||||
basic_machine=m68k-ncr
|
||||
;;
|
||||
@@ -1069,7 +1093,7 @@ case $os in
|
||||
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
|
||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
||||
| -os2* | -vos*)
|
||||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* | -morphos*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-qnx*)
|
||||
@@ -1121,6 +1145,9 @@ case $os in
|
||||
-acis*)
|
||||
os=-aos
|
||||
;;
|
||||
-atheos*)
|
||||
os=-atheos
|
||||
;;
|
||||
-386bsd)
|
||||
os=-bsd
|
||||
;;
|
||||
@@ -1201,6 +1228,7 @@ case $basic_machine in
|
||||
arm*-semi)
|
||||
os=-aout
|
||||
;;
|
||||
# This must come before the *-dec entry.
|
||||
pdp10-*)
|
||||
os=-tops20
|
||||
;;
|
||||
|
||||
+28
-3
@@ -31,7 +31,16 @@ if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
fi
|
||||
# `libtool' can also be set to `yes' or `no'.
|
||||
|
||||
depfile=${depfile-`echo "$object" | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`}
|
||||
if test -z "$depfile"; then
|
||||
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
|
||||
dir=`echo "$object" | sed 's,/.*$,/,'`
|
||||
if test "$dir" = "$object"; then
|
||||
dir=
|
||||
fi
|
||||
# FIXME: should be _deps on DOS.
|
||||
depfile="$dir.deps/$base"
|
||||
fi
|
||||
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
@@ -204,8 +213,9 @@ tru64)
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
|
||||
tmpdepfile1="$object.d"
|
||||
tmpdepfile2=`echo "$object" | sed -e 's/.o$/.d/'`
|
||||
base=`echo "$object" | sed -e 's/\.o$/.d/' -e 's/\.lo$/.d/'`
|
||||
tmpdepfile1="$base.o.d"
|
||||
tmpdepfile2="$base.d"
|
||||
if test "$libtool" = yes; then
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
@@ -382,6 +392,21 @@ msvisualcpp)
|
||||
done
|
||||
;;
|
||||
esac
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||
) &
|
||||
|
||||
+6
-1
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
# Get modification time of a file or directory and pretty-print it.
|
||||
# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
# Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
# written by Ulrich Drepper <[email protected]>, June 1995
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
@@ -17,6 +17,11 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Prevent date giving response in another language.
|
||||
LANG=C
|
||||
export LANG
|
||||
|
||||
+2
-2
@@ -87,7 +87,7 @@ Supported PROGRAM values:
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aclocal)
|
||||
aclocal*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
@@ -139,7 +139,7 @@ WARNING: \`$1' is missing on your system. You should only need it if
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake)
|
||||
automake*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
|
||||
+66
-5
@@ -7,6 +7,52 @@
|
||||
# $Id$
|
||||
|
||||
errstatus=0
|
||||
dirmode=""
|
||||
|
||||
usage="\
|
||||
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
|
||||
|
||||
# process command line arguments
|
||||
while test $# -gt 0 ; do
|
||||
case "${1}" in
|
||||
-h | --help | --h* ) # -h for help
|
||||
echo "${usage}" 1>&2; exit 0 ;;
|
||||
-m ) # -m PERM arg
|
||||
shift
|
||||
test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
|
||||
dirmode="${1}"
|
||||
shift ;;
|
||||
-- ) shift; break ;; # stop option processing
|
||||
-* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option
|
||||
* ) break ;; # first non-opt arg
|
||||
esac
|
||||
done
|
||||
|
||||
for file
|
||||
do
|
||||
if test -d "$file"; then
|
||||
shift
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
case $# in
|
||||
0) exit 0 ;;
|
||||
esac
|
||||
|
||||
case $dirmode in
|
||||
'')
|
||||
if mkdir -p -- . 2>/dev/null; then
|
||||
echo "mkdir -p -- $*"
|
||||
exec mkdir -p -- "$@"
|
||||
fi ;;
|
||||
*)
|
||||
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
|
||||
echo "mkdir -m $dirmode -p -- $*"
|
||||
exec mkdir -m "$dirmode" -p -- "$@"
|
||||
fi ;;
|
||||
esac
|
||||
|
||||
for file
|
||||
do
|
||||
@@ -22,13 +68,24 @@ do
|
||||
esac
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp"
|
||||
echo "mkdir $pathcomp"
|
||||
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
else
|
||||
if test ! -z "$dirmode"; then
|
||||
echo "chmod $dirmode $pathcomp"
|
||||
|
||||
lasterr=""
|
||||
chmod "$dirmode" "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -z "$lasterr"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
pathcomp="$pathcomp/"
|
||||
@@ -37,4 +94,8 @@ done
|
||||
|
||||
exit $errstatus
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 3
|
||||
# End:
|
||||
# mkinstalldirs ends here
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.29b
|
||||
1.31
|
||||
|
||||
+51
-34
@@ -3,7 +3,7 @@
|
||||
% Load plain if necessary, i.e., if running under initex.
|
||||
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
|
||||
%
|
||||
\def\texinfoversion{2001-07-25.07}
|
||||
\def\texinfoversion{2002-01-04.07}
|
||||
%
|
||||
% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
|
||||
% 2000, 01 Free Software Foundation, Inc.
|
||||
@@ -30,14 +30,17 @@
|
||||
% Please try the latest version of texinfo.tex before submitting bug
|
||||
% reports; you can get the latest version from:
|
||||
% ftp://ftp.gnu.org/gnu/texinfo.tex
|
||||
% (and all GNU mirrors, see http://www.gnu.org/order/ftp.html)
|
||||
% ftp://texinfo.org/tex/texinfo.tex
|
||||
% ftp://us.ctan.org/macros/texinfo/texinfo.tex
|
||||
% (and all CTAN mirrors, finger [email protected] for a list).
|
||||
% /home/gd/gnu/doc/texinfo.tex on the GNU machines.
|
||||
% (and all GNU mirrors, see http://www.gnu.org/order/ftp.html)
|
||||
% ftp://texinfo.org/texinfo/texinfo.tex
|
||||
% ftp://tug.org/tex/texinfo.tex
|
||||
% (and all CTAN mirrors, see http://www.ctan.org),
|
||||
% and /home/gd/gnu/doc/texinfo.tex on the GNU machines.
|
||||
%
|
||||
% The texinfo.tex in any given Texinfo distribution could well be out
|
||||
% of date, so if that's what you're using, please check.
|
||||
% Texinfo has a small home page at http://texinfo.org/.
|
||||
%
|
||||
% Texinfo has a small home page at http://texinfo.org/ and also
|
||||
% http://www.gnu.org/software/texinfo.
|
||||
%
|
||||
% Send bug reports to [email protected]. Please include including a
|
||||
% complete document in each bug report with which we can reproduce the
|
||||
@@ -927,10 +930,12 @@ where each line of input produces a line of output.}
|
||||
\def\dopdfimage#1#2#3{%
|
||||
\def\imagewidth{#2}%
|
||||
\def\imageheight{#3}%
|
||||
% without \immediate, pdftex seg faults when the same image is
|
||||
% included twice. (Version 3.14159-pre-1.0-unofficial-20010704.)
|
||||
\ifnum\pdftexversion < 14
|
||||
\pdfimage
|
||||
\immediate\pdfimage
|
||||
\else
|
||||
\pdfximage
|
||||
\immediate\pdfximage
|
||||
\fi
|
||||
\ifx\empty\imagewidth\else width \imagewidth \fi
|
||||
\ifx\empty\imageheight\else height \imageheight \fi
|
||||
@@ -943,7 +948,7 @@ where each line of input produces a line of output.}
|
||||
\pdfrefximage \pdflastximage
|
||||
\fi}
|
||||
\def\pdfmkdest#1{{\normalturnoffactive \pdfdest name{#1} xyz}}
|
||||
\def\pdfmkpgn#1{#1@}
|
||||
\def\pdfmkpgn#1{#1}
|
||||
\let\linkcolor = \Blue % was Cyan, but that seems light?
|
||||
\def\endlink{\Black\pdfendlink}
|
||||
% Adding outlines to PDF; macros for calculating structure of outlines
|
||||
@@ -5799,8 +5804,15 @@ width0pt\relax} \fi
|
||||
%
|
||||
\smallfonts \rm
|
||||
%
|
||||
% Hang the footnote text off the number.
|
||||
\hang
|
||||
% Because we use hanging indentation in footnotes, a @noindent appears
|
||||
% to exdent this text, so make it be a no-op. makeinfo does not use
|
||||
% hanging indentation so @noindent can still be needed within footnote
|
||||
% text after an @example or the like (not that this is good style).
|
||||
\let\noindent = \relax
|
||||
%
|
||||
% Hang the footnote text off the number. Use \everypar in case the
|
||||
% footnote extends for more than one paragraph.
|
||||
\everypar = {\hang}%
|
||||
\textindent{\thisfootno}%
|
||||
%
|
||||
% Don't crash into the line above the footnote text. Since this
|
||||
@@ -5881,7 +5893,7 @@ width0pt\relax} \fi
|
||||
\global\warnednoepsftrue
|
||||
\fi
|
||||
\else
|
||||
\imagexxx #1,,,\finish
|
||||
\imagexxx #1,,,,,\finish
|
||||
\fi
|
||||
}
|
||||
%
|
||||
@@ -5891,33 +5903,34 @@ width0pt\relax} \fi
|
||||
% #4 is (ignored optional) html alt text.
|
||||
% #5 is (ignored optional) extension.
|
||||
% #6 is just the usual extra ignored arg for parsing this stuff.
|
||||
\def\imagexxx#1,#2,#3,#4,#5,#6\finish{%
|
||||
\newif\ifimagevmode
|
||||
\def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup \loggingall
|
||||
\catcode`\^^M = 5 % in case we're inside an example
|
||||
\normalturnoffactive % allow _ et al. in names
|
||||
% If the image is by itself, center it.
|
||||
\ifvmode
|
||||
\imagevmodetrue
|
||||
\nobreak\bigskip
|
||||
% Usually we'll have text after the image which will insert
|
||||
% \parskip glue, so insert it here too to equalize the space
|
||||
% above and below.
|
||||
\nobreak\vskip\parskip
|
||||
\nobreak
|
||||
\line\bgroup\hss
|
||||
\fi
|
||||
%
|
||||
% Output the image.
|
||||
\ifpdf
|
||||
\centerline{\dopdfimage{#1}{#2}{#3}}%
|
||||
\dopdfimage{#1}{#2}{#3}%
|
||||
\else
|
||||
% \epsfbox itself resets \epsf?size at each figure.
|
||||
\setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
|
||||
\setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
|
||||
\begingroup
|
||||
\catcode`\^^M = 5 % in case we're inside an example
|
||||
\normalturnoffactive % allow _ et al. in names
|
||||
% If the image is by itself, center it.
|
||||
\ifvmode
|
||||
\nobreak\bigskip
|
||||
% Usually we'll have text after the image which will insert
|
||||
% \parskip glue, so insert it here too to equalize the space
|
||||
% above and below.
|
||||
\nobreak\vskip\parskip
|
||||
\nobreak
|
||||
\centerline{\epsfbox{#1.eps}}%
|
||||
\bigbreak
|
||||
\else
|
||||
% In the middle of a paragraph, no extra space.
|
||||
\epsfbox{#1.eps}%
|
||||
\fi
|
||||
\endgroup
|
||||
\epsfbox{#1.eps}%
|
||||
\fi
|
||||
}
|
||||
%
|
||||
\ifimagevmode \hss \egroup \bigbreak \fi % space after the image
|
||||
\endgroup}
|
||||
|
||||
|
||||
\message{localization,}
|
||||
@@ -6087,6 +6100,10 @@ should work if nowhere else does.}
|
||||
%
|
||||
\afourpaper
|
||||
\internalpagesizes{237mm}{150mm}{3.6mm}{3.6mm}{3mm}{7mm}%
|
||||
%
|
||||
% Must explicitly reset to 0 because we call \afourpaper, apparently,
|
||||
% although this does not entirely make sense.
|
||||
\globaldefs = 0
|
||||
}}
|
||||
|
||||
% Use @afourwide to print on European A4 paper in wide format.
|
||||
|
||||
+22
-18
@@ -1,5 +1,7 @@
|
||||
# Configure template for GNU Bison. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright 2001, 2002 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
@@ -16,17 +18,20 @@
|
||||
# 02111-1307 USA
|
||||
|
||||
# We need a recent Autoconf to run a recent Autotest.
|
||||
AC_PREREQ(2.52e)
|
||||
AC_PREREQ(2.52g)
|
||||
|
||||
AC_INIT([GNU Bison], [1.29c], [[email protected]])
|
||||
AC_INIT([GNU Bison], [1.32], [[email protected]])
|
||||
AC_CONFIG_AUX_DIR(config)
|
||||
|
||||
AM_INIT_AUTOMAKE([bison], [1.29c])
|
||||
AM_INIT_AUTOMAKE([bison], [1.32])
|
||||
AM_CONFIG_HEADER(config.h:config.hin)
|
||||
|
||||
# Initialize the test suite.
|
||||
AC_CONFIG_TESTDIR(tests)
|
||||
AC_CONFIG_FILES([tests/bison], [chmod +x tests/bison])
|
||||
AC_CONFIG_FILES([tests/Makefile tests/atlocal])
|
||||
# Needed by tests/atlocal.in.
|
||||
AC_SUBST([GCC])
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
@@ -34,12 +39,7 @@ AC_MINIX
|
||||
AC_ISC_POSIX
|
||||
AM_PROG_CC_STDC
|
||||
AC_PROG_RANLIB
|
||||
# GNU M4 is needed to build the testsuite.
|
||||
BISON_AC_PROG_GNU_M4
|
||||
if test "$ac_cv_prog_gnu_m4" != yes; then
|
||||
missing_dir=`cd $ac_aux_dir && pwd`
|
||||
M4="$missing_dir/missing m4"
|
||||
fi
|
||||
AM_MISSING_PROG([AUTOM4TE], [autom4te])
|
||||
|
||||
AC_ARG_ENABLE(gcc-warnings,
|
||||
[ --enable-gcc-warnings turn on lots of GCC warnings (not recommended)],
|
||||
@@ -49,6 +49,9 @@ AC_ARG_ENABLE(gcc-warnings,
|
||||
esac],
|
||||
[enableval=no])
|
||||
if test "${enableval}" = yes; then
|
||||
BISON_WARNING(-Werror)
|
||||
AC_SUBST([WERROR_CFLAGS], [$WARNING_CFLAGS])
|
||||
WARNING_CFLAGS=
|
||||
BISON_WARNING(-Wall)
|
||||
BISON_WARNING(-W)
|
||||
BISON_WARNING(-Wbad-function-cast)
|
||||
@@ -61,7 +64,6 @@ if test "${enableval}" = yes; then
|
||||
BISON_WARNING(-Wshadow)
|
||||
BISON_WARNING(-Wstrict-prototypes)
|
||||
BISON_WARNING(-Wwrite-strings)
|
||||
CFLAGS="$CFLAGS $WARNING_CFLAGS"
|
||||
fi
|
||||
|
||||
# Checks for libraries.
|
||||
@@ -82,26 +84,28 @@ AM_C_PROTOTYPES
|
||||
|
||||
# Checks for library functions.
|
||||
AC_FUNC_ALLOCA
|
||||
AC_FUNC_OBSTACK
|
||||
AC_FUNC_ERROR_AT_LINE
|
||||
AC_FUNC_STRNLEN
|
||||
AC_CHECK_FUNCS(mkstemp setlocale)
|
||||
AC_CHECK_DECLS([stpcpy, strndup, strnlen, memchr])
|
||||
AC_REPLACE_FUNCS(stpcpy strndup strnlen strspn memchr)
|
||||
AC_CHECK_DECLS([stpcpy, strchr, strspn, strnlen, memchr, memrchr])
|
||||
AC_REPLACE_FUNCS(stpcpy strchr strspn memchr memrchr)
|
||||
jm_FUNC_MALLOC
|
||||
jm_FUNC_REALLOC
|
||||
jm_PREREQ_QUOTEARG
|
||||
jm_PREREQ_ERROR
|
||||
AM_WITH_DMALLOC
|
||||
|
||||
ALL_LINGUAS="de es et fr ja nl tr ru"
|
||||
AM_GNU_GETTEXT
|
||||
ALL_LINGUAS="de es et fr it ja nl ru sv tr"
|
||||
AM_GNU_GETTEXT(, need-ngettext)
|
||||
|
||||
# This is necessary so that .o files in LIBOBJS are also built via
|
||||
# the ANSI2KNR-filtering rules.
|
||||
LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'`
|
||||
AC_SUBST(LIBOBJS)
|
||||
LIB@&t@OBJS=`echo $LIB@&t@OBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'`
|
||||
AC_SUBST(LIB@&t@OBJS)
|
||||
|
||||
AC_OUTPUT([Makefile
|
||||
config/Makefile
|
||||
intl/Makefile po/Makefile.in
|
||||
lib/Makefile src/Makefile doc/Makefile
|
||||
m4/Makefile
|
||||
tests/Makefile])
|
||||
m4/Makefile])
|
||||
|
||||
+4
-8
@@ -1,16 +1,12 @@
|
||||
Makefile
|
||||
bison.aux
|
||||
Makefile Makefile.in
|
||||
*.aux *.dvi *.log *.info* *.pdf *.ps
|
||||
stamp-*
|
||||
auto
|
||||
bison.cp
|
||||
bison.cps
|
||||
bison.dvi
|
||||
bison.fn
|
||||
bison.ky
|
||||
bison.log
|
||||
bison.pg
|
||||
bison.ps
|
||||
bison.toc
|
||||
bison.tp
|
||||
bison.vr
|
||||
refcard.dvi
|
||||
refcard.log
|
||||
refcard.ps
|
||||
|
||||
-398
@@ -1,398 +0,0 @@
|
||||
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = @program_transform_name@
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AMTAR = @AMTAR@
|
||||
AWK = @AWK@
|
||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CPP = @CPP@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEPDIR = @DEPDIR@
|
||||
EXEEXT = @EXEEXT@
|
||||
GENCAT = @GENCAT@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMOFILES = @GMOFILES@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLBISON = @INTLBISON@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
M4 = @M4@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
POFILES = @POFILES@
|
||||
POSUB = @POSUB@
|
||||
RANLIB = @RANLIB@
|
||||
U = @U@
|
||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
WARNING_CFLAGS = @WARNING_CFLAGS@
|
||||
am__include = @am__include@
|
||||
am__quote = @am__quote@
|
||||
install_sh = @install_sh@
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.4
|
||||
|
||||
info_TEXINFOS = bison.texinfo
|
||||
man_MANS = bison.1
|
||||
bison_TEXINFOS = gpl.texi fdl.texi
|
||||
|
||||
EXTRA_DIST = FAQ bison.1 bison.rnh refcard.tex
|
||||
|
||||
CLEANFILES = refcard.dvi refcard.log refcard.ps
|
||||
subdir = doc
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
DIST_SOURCES =
|
||||
TEXINFO_TEX = $(top_srcdir)/config/texinfo.tex
|
||||
INFO_DEPS = bison.info
|
||||
DVIS = bison.dvi
|
||||
TEXINFOS = bison.texinfo
|
||||
|
||||
NROFF = nroff
|
||||
MANS = $(man_MANS)
|
||||
DIST_COMMON = $(bison_TEXINFOS) Makefile.am Makefile.in stamp-vti \
|
||||
version.texi
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .dvi .info .ps .texinfo
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu doc/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && \
|
||||
CONFIG_HEADERS= CONFIG_LINKS= \
|
||||
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
|
||||
|
||||
$(srcdir)/version.texi: $(srcdir)/stamp-vti
|
||||
@:
|
||||
$(srcdir)/stamp-vti: bison.texinfo $(top_srcdir)/configure.in
|
||||
@(set `$(SHELL) $(top_srcdir)/config/mdate-sh $(srcdir)/bison.texinfo`; \
|
||||
echo "@set UPDATED $$1 $$2 $$3"; \
|
||||
echo "@set UPDATED-MONTH $$2 $$3"; \
|
||||
echo "@set EDITION $(VERSION)"; \
|
||||
echo "@set VERSION $(VERSION)") > vti.tmp
|
||||
@cmp -s vti.tmp $(srcdir)/version.texi \
|
||||
|| (echo "Updating $(srcdir)/version.texi"; \
|
||||
cp vti.tmp $(srcdir)/version.texi)
|
||||
-@rm -f vti.tmp
|
||||
@cp $(srcdir)/version.texi $@
|
||||
|
||||
mostlyclean-vti:
|
||||
-rm -f vti.tmp
|
||||
|
||||
maintainer-clean-vti:
|
||||
-rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi
|
||||
|
||||
bison.info: bison.texinfo $(srcdir)/version.texi $(bison_TEXINFOS)
|
||||
bison.dvi: bison.texinfo $(srcdir)/version.texi $(bison_TEXINFOS)
|
||||
|
||||
.texinfo.info:
|
||||
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
|
||||
cd $(srcdir) \
|
||||
&& $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
|
||||
`echo $< | sed 's,.*/,,'`
|
||||
|
||||
.texinfo.dvi:
|
||||
TEXINPUTS=$(top_srcdir)/config:$$TEXINPUTS \
|
||||
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
|
||||
$(TEXI2DVI) $<
|
||||
|
||||
.texinfo:
|
||||
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
|
||||
cd $(srcdir) \
|
||||
&& $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
|
||||
`echo $< | sed 's,.*/,,'`
|
||||
|
||||
MAKEINFO = @MAKEINFO@
|
||||
TEXI2DVI = texi2dvi
|
||||
DVIPS = dvips
|
||||
.dvi.ps:
|
||||
$(DVIPS) $< -o $@
|
||||
|
||||
uninstall-info-am:
|
||||
$(PRE_UNINSTALL)
|
||||
@if (install-info --version && \
|
||||
install-info --version | fgrep -i -v debian) >/dev/null 2>&1; then \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file"; \
|
||||
install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file; \
|
||||
done; \
|
||||
else :; fi
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
(if cd $(DESTDIR)$(infodir); then \
|
||||
echo " rm -f $$file $$file-[0-9] $$file-[0-9][0-9])"; \
|
||||
rm -f $$file $$file-[0-9] $$file-[0-9][0-9]; \
|
||||
else :; fi); \
|
||||
done
|
||||
|
||||
dist-info: $(INFO_DEPS)
|
||||
list='$(INFO_DEPS)'; \
|
||||
for base in $$list; do \
|
||||
d=$(srcdir); \
|
||||
for file in `CDPATH=: && cd $$d && eval echo $$base*`; do \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file; \
|
||||
done; \
|
||||
done
|
||||
|
||||
mostlyclean-aminfo:
|
||||
-rm -f bison.aux bison.cp bison.cps bison.dvi bison.fn bison.ky bison.log \
|
||||
bison.pg bison.ps bison.toc bison.tp bison.vr
|
||||
|
||||
maintainer-clean-aminfo:
|
||||
cd $(srcdir) && \
|
||||
for i in $(INFO_DEPS); do \
|
||||
rm -f $$i; \
|
||||
if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \
|
||||
rm -f $$i-[0-9]*; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
man1dir = $(mandir)/man1
|
||||
install-man1: $(man1_MANS) $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(man1dir)
|
||||
@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.1*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
|
||||
else file=$$i; fi; \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
|
||||
$(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
|
||||
done
|
||||
uninstall-man1:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.1*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
|
||||
rm -f $(DESTDIR)$(man1dir)/$$inst; \
|
||||
done
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
top_distdir = ..
|
||||
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
$(mkinstalldirs) "$(distdir)/$$dir"; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
|| exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="${top_distdir}" distdir="$(distdir)" \
|
||||
dist-info
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(INFO_DEPS) $(MANS)
|
||||
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(infodir) $(DESTDIR)$(man1dir)
|
||||
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am: $(DVIS)
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am: $(INFO_DEPS)
|
||||
|
||||
install-data-am: install-info-am install-man
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am: $(INFO_DEPS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(infodir)
|
||||
@list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
d=$(srcdir); \
|
||||
for ifile in `CDPATH=: && cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
|
||||
if test -f $$d/$$ifile; then \
|
||||
echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
|
||||
$(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
|
||||
else : ; fi; \
|
||||
done; \
|
||||
done
|
||||
@$(POST_INSTALL)
|
||||
@if (install-info --version && \
|
||||
install-info --version | fgrep -i -v debian) >/dev/null 2>&1; then \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
|
||||
install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
|
||||
done; \
|
||||
else : ; fi
|
||||
install-man: install-man1
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
maintainer-clean-am: distclean-am maintainer-clean-aminfo \
|
||||
maintainer-clean-generic maintainer-clean-vti
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-aminfo mostlyclean-generic mostlyclean-vti
|
||||
|
||||
uninstall-am: uninstall-info-am uninstall-man
|
||||
|
||||
uninstall-man: uninstall-man1
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic dist-info \
|
||||
distclean distclean-generic distdir dvi dvi-am info info-am \
|
||||
install install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-man1 install-strip installcheck installcheck-am \
|
||||
installdirs maintainer-clean maintainer-clean-aminfo \
|
||||
maintainer-clean-generic maintainer-clean-vti mostlyclean \
|
||||
mostlyclean-aminfo mostlyclean-generic mostlyclean-vti \
|
||||
uninstall uninstall-am uninstall-info-am uninstall-man \
|
||||
uninstall-man1
|
||||
|
||||
|
||||
refcard.dvi: refcard.tex
|
||||
tex refcard.tex
|
||||
|
||||
refcard.ps: refcard.dvi
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
+2
-2
@@ -262,9 +262,9 @@ and so on.
|
||||
.ns
|
||||
.TP
|
||||
.B \-\-debug
|
||||
Output a definition of the macro
|
||||
In the parser file, define the macro
|
||||
.B YYDEBUG
|
||||
into the parser file,
|
||||
to 1 if it is not already defined,
|
||||
so that the debugging facilities are compiled.
|
||||
.TP
|
||||
.B \-v
|
||||
|
||||
-145
@@ -1,145 +0,0 @@
|
||||
Ceci est le fichier Info bison.info, produit par Makeinfo version 4.0b
|
||||
à partir bison.texinfo.
|
||||
|
||||
START-INFO-DIR-ENTRY
|
||||
* bison: (bison). GNU Project parser generator (yacc replacement).
|
||||
END-INFO-DIR-ENTRY
|
||||
|
||||
This file documents the Bison parser generator.
|
||||
|
||||
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1995, 1998, 1999,
|
||||
2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of
|
||||
this manual under the conditions for verbatim copying, provided also
|
||||
that the sections entitled "GNU General Public License" and "Conditions
|
||||
for Using Bison" are included exactly as in the original, and provided
|
||||
that the entire resulting derived work is distributed under the terms
|
||||
of a permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this
|
||||
manual into another language, under the above conditions for modified
|
||||
versions, except that the sections entitled "GNU General Public
|
||||
License", "Conditions for Using Bison" and this permission notice may be
|
||||
included in translations approved by the Free Software Foundation
|
||||
instead of in the original English.
|
||||
|
||||
|
||||
Indirect:
|
||||
bison.info-1: 1313
|
||||
bison.info-2: 50691
|
||||
bison.info-3: 100581
|
||||
bison.info-4: 150131
|
||||
bison.info-5: 197908
|
||||
|
||||
Tag Table:
|
||||
(Indirect)
|
||||
Node: Top1313
|
||||
Node: Introduction8969
|
||||
Node: Conditions10244
|
||||
Node: Copying11708
|
||||
Node: Concepts30911
|
||||
Node: Language and Grammar31990
|
||||
Node: Grammar in Bison37006
|
||||
Node: Semantic Values38930
|
||||
Node: Semantic Actions41031
|
||||
Node: Locations Overview42220
|
||||
Node: Bison Parser43667
|
||||
Node: Stages45979
|
||||
Node: Grammar Layout47262
|
||||
Node: Examples48519
|
||||
Node: RPN Calc49717
|
||||
Node: Rpcalc Decls50691
|
||||
Node: Rpcalc Rules52278
|
||||
Node: Rpcalc Input54078
|
||||
Node: Rpcalc Line55539
|
||||
Node: Rpcalc Expr56654
|
||||
Node: Rpcalc Lexer58599
|
||||
Node: Rpcalc Main61171
|
||||
Node: Rpcalc Error61569
|
||||
Node: Rpcalc Gen62577
|
||||
Node: Rpcalc Compile63726
|
||||
Node: Infix Calc64601
|
||||
Node: Simple Error Recovery67308
|
||||
Node: Location Tracking Calc69197
|
||||
Node: Ltcalc Decls69927
|
||||
Node: Ltcalc Rules70836
|
||||
Node: Ltcalc Lexer72897
|
||||
Node: Multi-function Calc75235
|
||||
Node: Mfcalc Decl76802
|
||||
Node: Mfcalc Rules78825
|
||||
Node: Mfcalc Symtab80205
|
||||
Node: Exercises86578
|
||||
Node: Grammar File87084
|
||||
Node: Grammar Outline87932
|
||||
Node: C Declarations88666
|
||||
Node: Bison Declarations89246
|
||||
Node: Grammar Rules89658
|
||||
Node: C Code90118
|
||||
Node: Symbols91048
|
||||
Node: Rules96129
|
||||
Node: Recursion97768
|
||||
Node: Semantics99487
|
||||
Node: Value Type100581
|
||||
Node: Multiple Types101253
|
||||
Node: Actions102270
|
||||
Node: Action Types105055
|
||||
Node: Mid-Rule Actions106358
|
||||
Node: Locations111928
|
||||
Node: Location Type112576
|
||||
Node: Actions and Locations113134
|
||||
Node: Location Default Action115290
|
||||
Node: Declarations116753
|
||||
Node: Token Decl118072
|
||||
Node: Precedence Decl120085
|
||||
Node: Union Decl121636
|
||||
Node: Type Decl122480
|
||||
Node: Expect Decl123386
|
||||
Node: Start Decl124932
|
||||
Node: Pure Decl125310
|
||||
Node: Decl Summary126987
|
||||
Node: Multiple Parsers132370
|
||||
Node: Interface133864
|
||||
Node: Parser Function134736
|
||||
Node: Lexical135571
|
||||
Node: Calling Convention136977
|
||||
Node: Token Values139748
|
||||
Node: Token Positions140897
|
||||
Node: Pure Calling141782
|
||||
Node: Error Reporting144714
|
||||
Node: Action Features146836
|
||||
Node: Algorithm150131
|
||||
Node: Look-Ahead152424
|
||||
Node: Shift/Reduce154556
|
||||
Node: Precedence157468
|
||||
Node: Why Precedence158119
|
||||
Node: Using Precedence159984
|
||||
Node: Precedence Examples160952
|
||||
Node: How Precedence161653
|
||||
Node: Contextual Precedence162802
|
||||
Node: Parser States164593
|
||||
Node: Reduce/Reduce165836
|
||||
Node: Mystery Conflicts169397
|
||||
Node: Stack Overflow172783
|
||||
Node: Error Recovery174156
|
||||
Node: Context Dependency179292
|
||||
Node: Semantic Tokens180140
|
||||
Node: Lexical Tie-ins183157
|
||||
Node: Tie-in Recovery184705
|
||||
Node: Debugging186877
|
||||
Node: Invocation190178
|
||||
Node: Bison Options191430
|
||||
Node: Environment Variables195398
|
||||
Node: Option Cross Key196246
|
||||
Node: VMS Invocation197124
|
||||
Node: Table of Symbols197908
|
||||
Node: Glossary205547
|
||||
Node: Copying This Manual211851
|
||||
Node: GNU Free Documentation License212060
|
||||
Node: Index231925
|
||||
|
||||
End Tag Table
|
||||
-1076
File diff suppressed because it is too large
Load Diff
-1427
File diff suppressed because it is too large
Load Diff
-1317
File diff suppressed because it is too large
Load Diff
-1261
File diff suppressed because it is too large
Load Diff
-1036
File diff suppressed because it is too large
Load Diff
+2
-1
@@ -56,7 +56,8 @@ foo_tab.c.
|
||||
.indent -1
|
||||
2 /DEBUG
|
||||
.skip
|
||||
Output a definition of the macro YYDEBUG into the parser file,
|
||||
In the parser file,
|
||||
define the macro YYDEBUG to 1 if it is not already defined,
|
||||
so that the debugging facilities are compiled.
|
||||
.skip
|
||||
.indent -1
|
||||
|
||||
+259
-198
@@ -447,16 +447,26 @@ lexicography, not grammar.)
|
||||
|
||||
Here is a simple C function subdivided into tokens:
|
||||
|
||||
@ifinfo
|
||||
@example
|
||||
int /* @r{keyword `int'} */
|
||||
square (x) /* @r{identifier, open-paren,} */
|
||||
/* @r{identifier, close-paren} */
|
||||
int x; /* @r{keyword `int', identifier, semicolon} */
|
||||
square (int x) /* @r{identifier, open-paren, identifier,}
|
||||
@r{identifier, close-paren} */
|
||||
@{ /* @r{open-brace} */
|
||||
return x * x; /* @r{keyword `return', identifier,} */
|
||||
/* @r{asterisk, identifier, semicolon} */
|
||||
return x * x; /* @r{keyword `return', identifier, asterisk,
|
||||
identifier, semicolon} */
|
||||
@} /* @r{close-brace} */
|
||||
@end example
|
||||
@end ifinfo
|
||||
@ifnotinfo
|
||||
@example
|
||||
int /* @r{keyword `int'} */
|
||||
square (int x) /* @r{identifier, open-paren, identifier, identifier, close-paren} */
|
||||
@{ /* @r{open-brace} */
|
||||
return x * x; /* @r{keyword `return', identifier, asterisk, identifier, semicolon} */
|
||||
@} /* @r{close-brace} */
|
||||
@end example
|
||||
@end ifnotinfo
|
||||
|
||||
The syntactic groupings of C include the expression, the statement, the
|
||||
declaration, and the function definition. These are represented in the
|
||||
@@ -683,7 +693,7 @@ arrange for it to call @code{yyparse} or the parser will never run.
|
||||
@xref{Interface, ,Parser C-Language Interface}.
|
||||
|
||||
Aside from the token type names and the symbols in the actions you
|
||||
write, all variable and function names used in the Bison parser file
|
||||
write, all symbols defined in the Bison parser file itself
|
||||
begin with @samp{yy} or @samp{YY}. This includes interface functions
|
||||
such as the lexical analyzer function @code{yylex}, the error reporting
|
||||
function @code{yyerror} and the parser function @code{yyparse} itself.
|
||||
@@ -692,6 +702,15 @@ Therefore, you should avoid using C identifiers starting with @samp{yy}
|
||||
or @samp{YY} in the Bison grammar file except for the ones defined in
|
||||
this manual.
|
||||
|
||||
In some cases the Bison parser file includes system headers, and in
|
||||
those cases your code should respect the identifiers reserved by those
|
||||
headers. On some non-@sc{gnu} hosts, @code{<alloca.h>},
|
||||
@code{<stddef.h>}, and @code{<stdlib.h>} are included as needed to
|
||||
declare memory allocators and related types. In the same situation,
|
||||
C++ parsers may include @code{<cstddef>} and @code{<cstdlib>} instead.
|
||||
Other system headers may be included if you define @code{YYDEBUG} to a
|
||||
nonzero value (@pxref{Debugging, ,Debugging Your Parser}).
|
||||
|
||||
@node Stages
|
||||
@section Stages in Using Bison
|
||||
@cindex stages in using Bison
|
||||
@@ -855,11 +874,12 @@ The C declarations section (@pxref{C Declarations, ,The C Declarations Section})
|
||||
preprocessor directives.
|
||||
|
||||
The @code{#define} directive defines the macro @code{YYSTYPE}, thus
|
||||
specifying the C data type for semantic values of both tokens and groupings
|
||||
(@pxref{Value Type, ,Data Types of Semantic Values}). The Bison parser will use whatever type
|
||||
@code{YYSTYPE} is defined as; if you don't define it, @code{int} is the
|
||||
default. Because we specify @code{double}, each token and each expression
|
||||
has an associated value, which is a floating point number.
|
||||
specifying the C data type for semantic values of both tokens and
|
||||
groupings (@pxref{Value Type, ,Data Types of Semantic Values}). The
|
||||
Bison parser will use whatever type @code{YYSTYPE} is defined as; if you
|
||||
don't define it, @code{int} is the default. Because we specify
|
||||
@code{double}, each token and each expression has an associated value,
|
||||
which is a floating point number.
|
||||
|
||||
The @code{#include} directive is used to declare the exponentiation
|
||||
function @code{pow}.
|
||||
@@ -1066,10 +1086,11 @@ token type is an identifier, that identifier is defined by Bison as a C
|
||||
macro whose definition is the appropriate number. In this example,
|
||||
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 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 defined
|
||||
at the beginning of the grammar; @pxref{Rpcalc Decls, ,Declarations for @code{rpcalc}}.)
|
||||
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
|
||||
for it. (The C data type of @code{yylval} is @code{YYSTYPE}, which was
|
||||
defined at the beginning of the grammar; @pxref{Rpcalc Decls,
|
||||
,Declarations for @code{rpcalc}}.)
|
||||
|
||||
A token type code of zero is returned if the end-of-file is encountered.
|
||||
(Bison recognizes any nonpositive value as indicating the end of the
|
||||
@@ -1202,19 +1223,19 @@ Here is how to compile and run the parser file:
|
||||
@example
|
||||
@group
|
||||
# @r{List files in current directory.}
|
||||
% ls
|
||||
$ @kbd{ls}
|
||||
rpcalc.tab.c rpcalc.y
|
||||
@end group
|
||||
|
||||
@group
|
||||
# @r{Compile the Bison parser.}
|
||||
# @r{@samp{-lm} tells compiler to search math library for @code{pow}.}
|
||||
% cc rpcalc.tab.c -lm -o rpcalc
|
||||
$ @kbd{cc rpcalc.tab.c -lm -o rpcalc}
|
||||
@end group
|
||||
|
||||
@group
|
||||
# @r{List files again.}
|
||||
% ls
|
||||
$ @kbd{ls}
|
||||
rpcalc rpcalc.tab.c rpcalc.y
|
||||
@end group
|
||||
@end example
|
||||
@@ -1223,19 +1244,19 @@ The file @file{rpcalc} now contains the executable code. Here is an
|
||||
example session using @code{rpcalc}.
|
||||
|
||||
@example
|
||||
% rpcalc
|
||||
4 9 +
|
||||
$ @kbd{rpcalc}
|
||||
@kbd{4 9 +}
|
||||
13
|
||||
3 7 + 3 4 5 *+-
|
||||
@kbd{3 7 + 3 4 5 *+-}
|
||||
-13
|
||||
3 7 + 3 4 5 * + - n @r{Note the unary minus, @samp{n}}
|
||||
@kbd{3 7 + 3 4 5 * + - n} @r{Note the unary minus, @samp{n}}
|
||||
13
|
||||
5 6 / 4 n +
|
||||
@kbd{5 6 / 4 n +}
|
||||
-3.166666667
|
||||
3 4 ^ @r{Exponentiation}
|
||||
@kbd{3 4 ^} @r{Exponentiation}
|
||||
81
|
||||
^D @r{End-of-file indicator}
|
||||
%
|
||||
@kbd{^D} @r{End-of-file indicator}
|
||||
$
|
||||
@end example
|
||||
|
||||
@node Infix Calc
|
||||
@@ -1315,12 +1336,12 @@ Here is a sample run of @file{calc.y}:
|
||||
|
||||
@need 500
|
||||
@example
|
||||
% calc
|
||||
4 + 4.5 - (34/(8*3+-3))
|
||||
$ @kbd{calc}
|
||||
@kbd{4 + 4.5 - (34/(8*3+-3))}
|
||||
6.880952381
|
||||
-56 + 2
|
||||
@kbd{-56 + 2}
|
||||
-54
|
||||
3 ^ 2
|
||||
@kbd{3 ^ 2}
|
||||
9
|
||||
@end example
|
||||
|
||||
@@ -1372,13 +1393,11 @@ Bison programs.
|
||||
@cindex @code{ltcalc}
|
||||
@cindex calculator, location tracking
|
||||
|
||||
This example extends the infix notation calculator with location tracking.
|
||||
This feature will be used to improve error reporting, and provide better
|
||||
error messages.
|
||||
|
||||
For the sake of clarity, we will switch for this example to an integer
|
||||
calculator, since most of the work needed to use locations will be done
|
||||
in the lexical analyser.
|
||||
This example extends the infix notation calculator with location
|
||||
tracking. This feature will be used to improve the error messages. For
|
||||
the sake of clarity, this example is a simple integer calculator, since
|
||||
most of the work needed to use locations will be done in the lexical
|
||||
analyser.
|
||||
|
||||
@menu
|
||||
* Decls: Ltcalc Decls. Bison and C declarations for ltcalc.
|
||||
@@ -1389,8 +1408,8 @@ in the lexical analyser.
|
||||
@node Ltcalc Decls
|
||||
@subsection Declarations for @code{ltcalc}
|
||||
|
||||
The C and Bison declarations for the location tracking calculator are the same
|
||||
as the declarations for the infix notation calculator.
|
||||
The C and Bison declarations for the location tracking calculator are
|
||||
the same as the declarations for the infix notation calculator.
|
||||
|
||||
@example
|
||||
/* Location tracking calculator. */
|
||||
@@ -1411,22 +1430,24 @@ as the declarations for the infix notation calculator.
|
||||
%% /* Grammar follows */
|
||||
@end example
|
||||
|
||||
In the code above, there are no declarations specific to locations. Defining
|
||||
a data type for storing locations is not needed: we will use the type provided
|
||||
by default (@pxref{Location Type, ,Data Types of Locations}), which is a four
|
||||
member structure with the following integer fields: @code{first_line},
|
||||
@code{first_column}, @code{last_line} and @code{last_column}.
|
||||
@noindent
|
||||
Note there are no declarations specific to locations. Defining a data
|
||||
type for storing locations is not needed: we will use the type provided
|
||||
by default (@pxref{Location Type, ,Data Types of Locations}), which is a
|
||||
four member structure with the following integer fields:
|
||||
@code{first_line}, @code{first_column}, @code{last_line} and
|
||||
@code{last_column}.
|
||||
|
||||
@node Ltcalc Rules
|
||||
@subsection Grammar Rules for @code{ltcalc}
|
||||
|
||||
Whether you choose to handle locations or not has no effect on the syntax of
|
||||
your language. Therefore, grammar rules for this example will be very close to
|
||||
those of the previous example: we will only modify them to benefit from the new
|
||||
informations we will have.
|
||||
Whether handling locations or not has no effect on the syntax of your
|
||||
language. Therefore, grammar rules for this example will be very close
|
||||
to those of the previous example: we will only modify them to benefit
|
||||
from the new information.
|
||||
|
||||
Here, we will use locations to report divisions by zero, and locate the wrong
|
||||
expressions or subexpressions.
|
||||
Here, we will use locations to report divisions by zero, and locate the
|
||||
wrong expressions or subexpressions.
|
||||
|
||||
@example
|
||||
@group
|
||||
@@ -1447,17 +1468,17 @@ exp : NUM @{ $$ = $1; @}
|
||||
| exp '-' exp @{ $$ = $1 - $3; @}
|
||||
| exp '*' exp @{ $$ = $1 * $3; @}
|
||||
@end group
|
||||
| exp '/' exp
|
||||
@group
|
||||
| exp '/' exp
|
||||
@{
|
||||
if ($3)
|
||||
$$ = $1 / $3;
|
||||
else
|
||||
@{
|
||||
$$ = 1;
|
||||
printf("Division by zero, l%d,c%d-l%d,c%d",
|
||||
@@3.first_line, @@3.first_column,
|
||||
@@3.last_line, @@3.last_column);
|
||||
fprintf (stderr, "%d.%d-%d.%d: division by zero",
|
||||
@@3.first_line, @@3.first_column,
|
||||
@@3.last_line, @@3.last_column);
|
||||
@}
|
||||
@}
|
||||
@end group
|
||||
@@ -1472,25 +1493,24 @@ This code shows how to reach locations inside of semantic actions, by
|
||||
using the pseudo-variables @code{@@@var{n}} for rule components, and the
|
||||
pseudo-variable @code{@@$} for groupings.
|
||||
|
||||
In this example, we never assign a value to @code{@@$}, because the
|
||||
output parser can do this automatically. By default, before executing
|
||||
the C code of each action, @code{@@$} is set to range from the beginning
|
||||
of @code{@@1} to the end of @code{@@@var{n}}, for a rule with @var{n}
|
||||
components.
|
||||
|
||||
Of course, this behavior can be redefined (@pxref{Location Default
|
||||
Action, , Default Action for Locations}), and for very specific rules,
|
||||
@code{@@$} can be computed by hand.
|
||||
We don't need to assign a value to @code{@@$}: the output parser does it
|
||||
automatically. By default, before executing the C code of each action,
|
||||
@code{@@$} is set to range from the beginning of @code{@@1} to the end
|
||||
of @code{@@@var{n}}, for a rule with @var{n} components. This behavior
|
||||
can be redefined (@pxref{Location Default Action, , Default Action for
|
||||
Locations}), and for very specific rules, @code{@@$} can be computed by
|
||||
hand.
|
||||
|
||||
@node Ltcalc Lexer
|
||||
@subsection The @code{ltcalc} Lexical Analyzer.
|
||||
|
||||
Until now, we relied on Bison's defaults to enable location tracking. The next
|
||||
step is to rewrite the lexical analyser, and make it able to feed the parser
|
||||
with locations of tokens, as he already does for semantic values.
|
||||
Until now, we relied on Bison's defaults to enable location
|
||||
tracking. The next step is to rewrite the lexical analyser, and make it
|
||||
able to feed the parser with the token locations, as it already does for
|
||||
semantic values.
|
||||
|
||||
To do so, we must take into account every single character of the input text,
|
||||
to avoid the computed locations of being fuzzy or wrong:
|
||||
To this end, we must take into account every single character of the
|
||||
input text, to avoid the computed locations of being fuzzy or wrong:
|
||||
|
||||
@example
|
||||
@group
|
||||
@@ -1540,17 +1560,18 @@ yylex (void)
|
||||
@}
|
||||
@end example
|
||||
|
||||
Basically, the lexical analyzer does the same processing as before: it skips
|
||||
blanks and tabs, and reads numbers or single-character tokens. In addition
|
||||
to this, it updates the @code{yylloc} global variable (of type @code{YYLTYPE}),
|
||||
where the location of tokens is stored.
|
||||
Basically, the lexical analyzer performs the same processing as before:
|
||||
it skips blanks and tabs, and reads numbers or single-character tokens.
|
||||
In addition, it updates @code{yylloc}, the global variable (of type
|
||||
@code{YYLTYPE}) containing the token's location.
|
||||
|
||||
Now, each time this function returns a token, the parser has it's number as
|
||||
well as it's semantic value, and it's position in the text. The last needed
|
||||
change is to initialize @code{yylloc}, for example in the controlling
|
||||
function:
|
||||
Now, each time this function returns a token, the parser has its number
|
||||
as well as its semantic value, and its location in the text. The last
|
||||
needed change is to initialize @code{yylloc}, for example in the
|
||||
controlling function:
|
||||
|
||||
@example
|
||||
@group
|
||||
int
|
||||
main (void)
|
||||
@{
|
||||
@@ -1558,11 +1579,12 @@ main (void)
|
||||
yylloc.first_column = yylloc.last_column = 0;
|
||||
return yyparse ();
|
||||
@}
|
||||
@end group
|
||||
@end example
|
||||
|
||||
Remember that computing locations is not a matter of syntax. Every character
|
||||
must be associated to a location update, whether it is in valid input, in
|
||||
comments, in literal strings, and so on...
|
||||
Remember that computing locations is not a matter of syntax. Every
|
||||
character must be associated to a location update, whether it is in
|
||||
valid input, in comments, in literal strings, and so on.
|
||||
|
||||
@node Multi-function Calc
|
||||
@section Multi-Function Calculator: @code{mfcalc}
|
||||
@@ -1592,20 +1614,20 @@ to create named variables, store values in them, and use them later.
|
||||
Here is a sample session with the multi-function calculator:
|
||||
|
||||
@example
|
||||
% mfcalc
|
||||
pi = 3.141592653589
|
||||
$ @kbd{mfcalc}
|
||||
@kbd{pi = 3.141592653589}
|
||||
3.1415926536
|
||||
sin(pi)
|
||||
@kbd{sin(pi)}
|
||||
0.0000000000
|
||||
alpha = beta1 = 2.3
|
||||
@kbd{alpha = beta1 = 2.3}
|
||||
2.3000000000
|
||||
alpha
|
||||
@kbd{alpha}
|
||||
2.3000000000
|
||||
ln(alpha)
|
||||
@kbd{ln(alpha)}
|
||||
0.8329091229
|
||||
exp(ln(beta1))
|
||||
@kbd{exp(ln(beta1))}
|
||||
2.3000000000
|
||||
%
|
||||
$
|
||||
@end example
|
||||
|
||||
Note that multiple assignment and nested function calls are permitted.
|
||||
@@ -2374,7 +2396,8 @@ the numbers associated with @var{x} and @var{y}.
|
||||
|
||||
In a simple program it may be sufficient to use the same data type for
|
||||
the semantic values of all language constructs. This was true in the
|
||||
RPN and infix calculator examples (@pxref{RPN Calc, ,Reverse Polish Notation Calculator}).
|
||||
RPN and infix calculator examples (@pxref{RPN Calc, ,Reverse Polish
|
||||
Notation Calculator}).
|
||||
|
||||
Bison's default is to use type @code{int} for all semantic values. To
|
||||
specify some other type, define @code{YYSTYPE} as a macro, like this:
|
||||
@@ -3067,11 +3090,11 @@ terminal symbol. All kinds of token declarations allow
|
||||
@findex %expect
|
||||
|
||||
Bison normally warns if there are any conflicts in the grammar
|
||||
(@pxref{Shift/Reduce, ,Shift/Reduce Conflicts}), but most real grammars have harmless shift/reduce
|
||||
conflicts which are resolved in a predictable way and would be difficult to
|
||||
eliminate. It is desirable to suppress the warning about these conflicts
|
||||
unless the number of conflicts changes. You can do this with the
|
||||
@code{%expect} declaration.
|
||||
(@pxref{Shift/Reduce, ,Shift/Reduce Conflicts}), but most real grammars
|
||||
have harmless shift/reduce conflicts which are resolved in a predictable
|
||||
way and would be difficult to eliminate. It is desirable to suppress
|
||||
the warning about these conflicts unless the number of conflicts
|
||||
changes. You can do this with the @code{%expect} declaration.
|
||||
|
||||
The declaration looks like this:
|
||||
|
||||
@@ -3079,10 +3102,11 @@ The declaration looks like this:
|
||||
%expect @var{n}
|
||||
@end example
|
||||
|
||||
Here @var{n} is a decimal integer. The declaration says there should be no
|
||||
warning if there are @var{n} shift/reduce conflicts and no reduce/reduce
|
||||
conflicts. The usual warning is given if there are either more or fewer
|
||||
conflicts, or if there are any reduce/reduce conflicts.
|
||||
Here @var{n} is a decimal integer. The declaration says there should be
|
||||
no warning if there are @var{n} shift/reduce conflicts and no
|
||||
reduce/reduce conflicts. An error, instead of the usual warning, is
|
||||
given if there are either more or fewer conflicts, or if there are any
|
||||
reduce/reduce conflicts.
|
||||
|
||||
In general, using @code{%expect} involves these steps:
|
||||
|
||||
@@ -3167,7 +3191,7 @@ valid grammar.
|
||||
@cindex declaration summary
|
||||
@cindex summary, Bison declaration
|
||||
|
||||
Here is a summary of all Bison declarations:
|
||||
Here is a summary of the declarations used to define a grammar:
|
||||
|
||||
@table @code
|
||||
@item %union
|
||||
@@ -3202,44 +3226,18 @@ Start-Symbol}).
|
||||
@item %expect
|
||||
Declare the expected number of shift-reduce conflicts
|
||||
(@pxref{Expect Decl, ,Suppressing Conflict Warnings}).
|
||||
@end table
|
||||
|
||||
@item %yacc
|
||||
@itemx %fixed_output_files
|
||||
Pretend the option @option{--yacc} was given, i.e., imitate Yacc,
|
||||
including its naming conventions. @xref{Bison Options}, for more.
|
||||
|
||||
@item %locations
|
||||
Generate the code processing the locations (@pxref{Action Features,
|
||||
,Special Features for Use in Actions}). This mode is enabled as soon as
|
||||
the grammar uses the special @samp{@@@var{n}} tokens, but if your
|
||||
grammar does not use it, using @samp{%locations} allows for more
|
||||
accurate parse error messages.
|
||||
|
||||
@item %pure_parser
|
||||
Request a pure (reentrant) parser program (@pxref{Pure Decl, ,A Pure
|
||||
(Reentrant) Parser}).
|
||||
|
||||
@item %no_parser
|
||||
Do not include any C code in the parser file; generate tables only. The
|
||||
parser file contains just @code{#define} directives and static variable
|
||||
declarations.
|
||||
|
||||
This option also tells Bison to write the C code for the grammar actions
|
||||
into a file named @file{@var{filename}.act}, in the form of a
|
||||
brace-surrounded body fit for a @code{switch} statement.
|
||||
|
||||
@item %no_lines
|
||||
Don't generate any @code{#line} preprocessor commands in the parser
|
||||
file. Ordinarily Bison writes these commands in the parser file so that
|
||||
the C compiler and debuggers will associate errors and object code with
|
||||
your source file (the grammar file). This directive causes them to
|
||||
associate errors with the parser file, treating it an independent source
|
||||
file in its own right.
|
||||
@sp 1
|
||||
@noindent
|
||||
In order to change the behavior of @command{bison}, use the following
|
||||
directives:
|
||||
|
||||
@table @code
|
||||
@item %debug
|
||||
Output a definition of the macro @code{YYDEBUG} into the parser file, so
|
||||
that the debugging facilities are compiled. @xref{Debugging, ,Debugging
|
||||
Your Parser}.
|
||||
In the parser file, define the macro @code{YYDEBUG} to 1 if it is not
|
||||
already defined, so that the debugging facilities are compiled.
|
||||
@xref{Debugging, ,Debugging Your Parser}.
|
||||
|
||||
@item %defines
|
||||
Write an extra output file containing macro definitions for the token
|
||||
@@ -3254,35 +3252,64 @@ This output file is essential if you wish to put the definition of
|
||||
be able to refer to token type codes and the variable
|
||||
@code{yylval}. @xref{Token Values, ,Semantic Values of Tokens}.@refill
|
||||
|
||||
@item %file-prefix="@var{prefix}"
|
||||
Specify a prefix to use for all Bison output file names. The names are
|
||||
chosen as if the input file were named @file{@var{prefix}.y}.
|
||||
|
||||
@c @item %header_extension
|
||||
@c Specify the extension of the parser header file generated when
|
||||
@c @code{%define} or @samp{-d} are used.
|
||||
@c
|
||||
@c For example, a grammar file named @file{foo.ypp} and containing a
|
||||
@c @code{%header_extension .hh} directive will produce a header file
|
||||
@c named @file{foo.tab.hh}
|
||||
|
||||
@item %locations
|
||||
Generate the code processing the locations (@pxref{Action Features,
|
||||
,Special Features for Use in Actions}). This mode is enabled as soon as
|
||||
the grammar uses the special @samp{@@@var{n}} tokens, but if your
|
||||
grammar does not use it, using @samp{%locations} allows for more
|
||||
accurate parse error messages.
|
||||
|
||||
@item %name-prefix="@var{prefix}"
|
||||
Rename the external symbols used in the parser so that they start with
|
||||
@var{prefix} instead of @samp{yy}. The precise list of symbols renamed
|
||||
is @code{yyparse}, @code{yylex}, @code{yyerror}, @code{yynerrs},
|
||||
@code{yylval}, @code{yychar} and @code{yydebug}. For example, if you
|
||||
use @samp{%name-prefix="c_"}, the names become @code{c_parse},
|
||||
@code{c_lex}, and so on. @xref{Multiple Parsers, ,Multiple Parsers in
|
||||
the Same Program}.
|
||||
|
||||
@item %no-parser
|
||||
Do not include any C code in the parser file; generate tables only. The
|
||||
parser file contains just @code{#define} directives and static variable
|
||||
declarations.
|
||||
|
||||
This option also tells Bison to write the C code for the grammar actions
|
||||
into a file named @file{@var{filename}.act}, in the form of a
|
||||
brace-surrounded body fit for a @code{switch} statement.
|
||||
|
||||
@item %no-lines
|
||||
Don't generate any @code{#line} preprocessor commands in the parser
|
||||
file. Ordinarily Bison writes these commands in the parser file so that
|
||||
the C compiler and debuggers will associate errors and object code with
|
||||
your source file (the grammar file). This directive causes them to
|
||||
associate errors with the parser file, treating it an independent source
|
||||
file in its own right.
|
||||
|
||||
@item %output="@var{filename}"
|
||||
Specify the @var{filename} for the parser file.
|
||||
|
||||
@item %pure-parser
|
||||
Request a pure (reentrant) parser program (@pxref{Pure Decl, ,A Pure
|
||||
(Reentrant) Parser}).
|
||||
|
||||
@c @item %source_extension
|
||||
@c Specify the extension of the parser output file.
|
||||
@c
|
||||
@c For example, a grammar file named @file{foo.yy} and containing a
|
||||
@c @code{%source_extension .cpp} directive will produce a parser file
|
||||
@c named @file{foo.tab.cpp}
|
||||
@c
|
||||
@c @item %header_extension
|
||||
@c Specify the extension of the parser header file generated when
|
||||
@c @code{%define} or @samp{-d} are used.
|
||||
@c
|
||||
@c For example, a garmmar file named @file{foo.ypp} and containing a
|
||||
@c @code{%header_extension .hh} directive will produce a header file
|
||||
@c named @file{foo.tab.hh}
|
||||
|
||||
@item %verbose
|
||||
Write an extra output file containing verbose descriptions of the
|
||||
parser states and what is done for each type of look-ahead token in
|
||||
that state.
|
||||
|
||||
This file also describes all the conflicts, both those resolved by
|
||||
operator precedence and the unresolved ones.
|
||||
|
||||
The file's name is made by removing @samp{.tab.c} or @samp{.c} from
|
||||
the parser output file name, and adding @samp{.output} instead.@refill
|
||||
|
||||
Therefore, if the input file is @file{foo.y}, then the parser file is
|
||||
called @file{foo.tab.c} by default. As a consequence, the verbose
|
||||
output file is called @file{foo.output}.@refill
|
||||
|
||||
@item %token_table
|
||||
Generate an array of token names in the parser file. The name of the
|
||||
@@ -3316,8 +3343,31 @@ The number of grammar rules,
|
||||
@item YYNSTATES
|
||||
The number of parser states (@pxref{Parser States}).
|
||||
@end table
|
||||
|
||||
@item %verbose
|
||||
Write an extra output file containing verbose descriptions of the
|
||||
parser states and what is done for each type of look-ahead token in
|
||||
that state.
|
||||
|
||||
This file also describes all the conflicts, both those resolved by
|
||||
operator precedence and the unresolved ones.
|
||||
|
||||
The file's name is made by removing @samp{.tab.c} or @samp{.c} from
|
||||
the parser output file name, and adding @samp{.output} instead.@refill
|
||||
|
||||
Therefore, if the input file is @file{foo.y}, then the parser file is
|
||||
called @file{foo.tab.c} by default. As a consequence, the verbose
|
||||
output file is called @file{foo.output}.@refill
|
||||
|
||||
@item %yacc
|
||||
@itemx %fixed-output-files
|
||||
Pretend the option @option{--yacc} was given, i.e., imitate Yacc,
|
||||
including its naming conventions. @xref{Bison Options}, for more.
|
||||
@end table
|
||||
|
||||
|
||||
|
||||
|
||||
@node Multiple Parsers
|
||||
@section Multiple Parsers in the Same Program
|
||||
|
||||
@@ -4875,15 +4925,23 @@ If a Bison grammar compiles properly but doesn't do what you want when it
|
||||
runs, the @code{yydebug} parser-trace feature can help you figure out why.
|
||||
|
||||
To enable compilation of trace facilities, you must define the macro
|
||||
@code{YYDEBUG} when you compile the parser. You could use
|
||||
@samp{-DYYDEBUG=1} as a compiler option or you could put @samp{#define
|
||||
YYDEBUG 1} in the C declarations section of the grammar file
|
||||
(@pxref{C Declarations, ,The C Declarations Section}). Alternatively, use the @samp{-t} option when
|
||||
you run Bison (@pxref{Invocation, ,Invoking Bison}). We always define @code{YYDEBUG} so that
|
||||
debugging is always possible.
|
||||
@code{YYDEBUG} to a nonzero value when you compile the parser. You
|
||||
could use @samp{-DYYDEBUG=1} as a compiler option or you could put
|
||||
@samp{#define YYDEBUG 1} in the C declarations section of the grammar
|
||||
file (@pxref{C Declarations, ,The C Declarations Section}).
|
||||
Alternatively, use the @samp{-t} option when you run Bison
|
||||
(@pxref{Invocation, ,Invoking Bison}) or the @code{%debug} declaration
|
||||
(@pxref{Decl Summary, ,Bison Declaration Summary}). We suggest that
|
||||
you always define @code{YYDEBUG} so that debugging is always possible.
|
||||
|
||||
The trace facility uses @code{stderr}, so you must add @w{@code{#include
|
||||
<stdio.h>}} to the C declarations section unless it is already there.
|
||||
The trace facility outputs messages with macro calls of the form
|
||||
@code{YYFPRINTF (stderr, @var{format}, @var{args})} where
|
||||
@var{format} and @var{args} are the usual @code{printf} format and
|
||||
arguments. If you define @code{YYDEBUG} to a nonzero value but do not
|
||||
define @code{YYFPRINTF}, @code{<stdio.h>} is automatically included
|
||||
and @code{YYPRINTF} is defined to @code{fprintf}. In the same
|
||||
situation, C++ parsers include @code{<cstdio>} and use
|
||||
@code{std::fprintf} instead.
|
||||
|
||||
Once you have compiled the program with trace facilities, the way to
|
||||
request a trace is to store a nonzero value in the variable @code{yydebug}.
|
||||
@@ -4962,7 +5020,7 @@ Here @var{infile} is the grammar file name, which usually ends in
|
||||
@samp{.y}. The parser file's name is made by replacing the @samp{.y}
|
||||
with @samp{.tab.c}. Thus, the @samp{bison foo.y} filename yields
|
||||
@file{foo.tab.c}, and the @samp{bison hack/foo.y} filename yields
|
||||
@file{hack/foo.tab.c}. It's is also possible, in case you are writting
|
||||
@file{hack/foo.tab.c}. It's is also possible, in case you are writing
|
||||
C++ code instead of C in your grammar file, to name it @file{foo.ypp}
|
||||
or @file{foo.y++}. Then, the output files will take an extention like
|
||||
the given one as input (repectively @file{foo.tab.cpp} and @file{foo.tab.c++}).
|
||||
@@ -5044,24 +5102,17 @@ you are developing Bison.
|
||||
|
||||
@item -t
|
||||
@itemx --debug
|
||||
Output a definition of the macro @code{YYDEBUG} into the parser file, so
|
||||
that the debugging facilities are compiled. @xref{Debugging, ,Debugging
|
||||
Your Parser}.
|
||||
In the parser file, define the macro @code{YYDEBUG} to 1 if it is not
|
||||
already defined, so that the debugging facilities are compiled.
|
||||
@xref{Debugging, ,Debugging Your Parser}.
|
||||
|
||||
@item --locations
|
||||
Pretend that @code{%locactions} was specified. @xref{Decl Summary}.
|
||||
Pretend that @code{%locations} was specified. @xref{Decl Summary}.
|
||||
|
||||
@item -p @var{prefix}
|
||||
@itemx --name-prefix=@var{prefix}
|
||||
Rename the external symbols used in the parser so that they start with
|
||||
@var{prefix} instead of @samp{yy}. The precise list of symbols renamed
|
||||
is @code{yyparse}, @code{yylex}, @code{yyerror}, @code{yynerrs},
|
||||
@code{yylval}, @code{yychar} and @code{yydebug}.
|
||||
|
||||
For example, if you use @samp{-p c}, the names become @code{cparse},
|
||||
@code{clex}, and so on.
|
||||
|
||||
@xref{Multiple Parsers, ,Multiple Parsers in the Same Program}.
|
||||
Pretend that @code{%name-prefix="@var{prefix}"} was specified.
|
||||
@xref{Decl Summary}.
|
||||
|
||||
@item -l
|
||||
@itemx --no-lines
|
||||
@@ -5073,11 +5124,11 @@ parser file, treating it as an independent source file in its own right.
|
||||
|
||||
@item -n
|
||||
@itemx --no-parser
|
||||
Pretend that @code{%no_parser} was specified. @xref{Decl Summary}.
|
||||
Pretend that @code{%no-parser} was specified. @xref{Decl Summary}.
|
||||
|
||||
@item -k
|
||||
@itemx --token-table
|
||||
Pretend that @code{%token_table} was specified. @xref{Decl Summary}.
|
||||
Pretend that @code{%token-table} was specified. @xref{Decl Summary}.
|
||||
@end table
|
||||
|
||||
@noindent
|
||||
@@ -5085,33 +5136,32 @@ Adjust the output:
|
||||
|
||||
@table @option
|
||||
@item -d
|
||||
Pretend that @code{%verbose} was specified, i.e., write an extra output
|
||||
@itemx --defines
|
||||
Pretend that @code{%defines} was specified, i.e., write an extra output
|
||||
file containing macro definitions for the token type names defined in
|
||||
the grammar and the semantic value type @code{YYSTYPE}, as well as a few
|
||||
@code{extern} variable declarations. @xref{Decl Summary}.
|
||||
|
||||
@item --defines=@var{defines-file}
|
||||
The behaviour of @var{--defines} is the same than @samp{-d}. The only
|
||||
difference is that it has an optionnal argument which is the name of
|
||||
the output filename.
|
||||
Same as above, but save in the file @var{defines-file}.
|
||||
|
||||
@item -b @var{file-prefix}
|
||||
@itemx --file-prefix=@var{prefix}
|
||||
Specify a prefix to use for all Bison output file names. The names are
|
||||
chosen as if the input file were named @file{@var{prefix}.c}.
|
||||
Pretend that @code{%verbose} was specified, i.e, specify prefix to use
|
||||
for all Bison output file names. @xref{Decl Summary}.
|
||||
|
||||
@item -v
|
||||
@itemx --verbose
|
||||
Pretend that @code{%verbose} was specified, i.e, write an extra output
|
||||
file containing verbose descriptions of the grammar and
|
||||
parser. @xref{Decl Summary}, for more.
|
||||
parser. @xref{Decl Summary}.
|
||||
|
||||
@item -o @var{outfile}
|
||||
@itemx --output-file=@var{outfile}
|
||||
Specify the name @var{outfile} for the parser file.
|
||||
@item -o @var{filename}
|
||||
@itemx --output=@var{filename}
|
||||
Specify the @var{filename} for the parser file.
|
||||
|
||||
The other output files' names are constructed from @var{outfile}
|
||||
as described under the @samp{-v} and @samp{-d} options.
|
||||
The other output files' names are constructed from @var{filename} as
|
||||
described under the @samp{-v} and @samp{-d} options.
|
||||
|
||||
@item -g
|
||||
Output a VCG definition of the LALR(1) grammar automaton computed by
|
||||
@@ -5119,7 +5169,7 @@ Bison. If the grammar file is @file{foo.y}, the VCG output file will
|
||||
be @file{foo.vcg}.
|
||||
|
||||
@item --graph=@var{graph-file}
|
||||
The behaviour of @var{--graph} is the same than @samp{-g}. The only
|
||||
The behaviour of @var{--graph} is the same than @samp{-g}. The only
|
||||
difference is that it has an optionnal argument which is the name of
|
||||
the output graph filename.
|
||||
@end table
|
||||
@@ -5168,7 +5218,7 @@ the corresponding short option.
|
||||
\line{ --name-prefix \leaderfill -p}
|
||||
\line{ --no-lines \leaderfill -l}
|
||||
\line{ --no-parser \leaderfill -n}
|
||||
\line{ --output-file \leaderfill -o}
|
||||
\line{ --output \leaderfill -o}
|
||||
\line{ --token-table \leaderfill -k}
|
||||
\line{ --verbose \leaderfill -v}
|
||||
\line{ --version \leaderfill -V}
|
||||
@@ -5187,7 +5237,7 @@ the corresponding short option.
|
||||
--name-prefix=@var{prefix} -p @var{name-prefix}
|
||||
--no-lines -l
|
||||
--no-parser -n
|
||||
--output-file=@var{outfile} -o @var{outfile}
|
||||
--output=@var{outfile} -o @var{outfile}
|
||||
--token-table -k
|
||||
--verbose -v
|
||||
--version -V
|
||||
@@ -5361,6 +5411,10 @@ Equip the parser for debugging. @xref{Decl Summary}.
|
||||
Bison declaration to create a header file meant for the scanner.
|
||||
@xref{Decl Summary}.
|
||||
|
||||
@item %file-prefix="@var{prefix}"
|
||||
Bison declaration to set tge prefix of the output files. @xref{Decl
|
||||
Summary}.
|
||||
|
||||
@c @item %source_extension
|
||||
@c Bison declaration to specify the generated parser output file extension.
|
||||
@c @xref{Decl Summary}.
|
||||
@@ -5373,7 +5427,10 @@ Bison declaration to create a header file meant for the scanner.
|
||||
Bison declaration to assign left associativity to token(s).
|
||||
@xref{Precedence Decl, ,Operator Precedence}.
|
||||
|
||||
@item %no_lines
|
||||
@item %name-prefix="@var{prefix}"
|
||||
Bison declaration to rename the external symbols. @xref{Decl Summary}.
|
||||
|
||||
@item %no-lines
|
||||
Bison declaration to avoid generating @code{#line} directives in the
|
||||
parser file. @xref{Decl Summary}.
|
||||
|
||||
@@ -5381,11 +5438,15 @@ parser file. @xref{Decl Summary}.
|
||||
Bison declaration to assign non-associativity to token(s).
|
||||
@xref{Precedence Decl, ,Operator Precedence}.
|
||||
|
||||
@item %output="@var{filename}"
|
||||
Bison declaration to set the name of the parser file. @xref{Decl
|
||||
Summary}.
|
||||
|
||||
@item %prec
|
||||
Bison declaration to assign a precedence to a specific rule.
|
||||
@xref{Contextual Precedence, ,Context-Dependent Precedence}.
|
||||
|
||||
@item %pure_parser
|
||||
@item %pure-parser
|
||||
Bison declaration to request a pure (reentrant) parser.
|
||||
@xref{Pure Decl, ,A Pure (Reentrant) Parser}.
|
||||
|
||||
@@ -5400,7 +5461,7 @@ Bison declaration to specify the start symbol. @xref{Start Decl, ,The Start-Sym
|
||||
Bison declaration to declare token(s) without specifying precedence.
|
||||
@xref{Token Decl, ,Token Type Names}.
|
||||
|
||||
@item %token_table
|
||||
@item %token-table
|
||||
Bison declaration to include a token name table in the parser file.
|
||||
@xref{Decl Summary}.
|
||||
|
||||
|
||||
+44
-38
@@ -6,7 +6,7 @@
|
||||
% This file can be printed with 1 or 2 columns per page (see below).
|
||||
% Specify how many you want here. Nothing else needs to be changed
|
||||
% unless you are maintaining the documentation.
|
||||
% For printing reference cards to use in books, specify one column
|
||||
% For printing reference cards to use in books, specify one column
|
||||
% per page and reduce to 80%.
|
||||
% Note that if columnsperpage is set to 2, there will be a few overfull
|
||||
% boxes, but they are not serious. Just uncomment \finalout.
|
||||
@@ -19,7 +19,7 @@
|
||||
\def\finalout{\overfullrule=0pt}
|
||||
%\finalout
|
||||
|
||||
% Copyright (c) 1998 Free Software Foundation, Inc.
|
||||
% Copyright (c) 1998, 2001 Free Software Foundation, Inc.
|
||||
%
|
||||
% This file is part of Bison.
|
||||
%
|
||||
@@ -51,11 +51,11 @@
|
||||
% Which mode to use is controlled by setting \columnsperpage above.
|
||||
%
|
||||
% Authors:
|
||||
% Brendan Kehoe
|
||||
% Brendan Kehoe
|
||||
% UUCP: widener!brendan
|
||||
% Internet: [email protected]
|
||||
% Internet: [email protected]
|
||||
%
|
||||
% Gavin Nicol
|
||||
% Gavin Nicol
|
||||
% Internet: [email protected]
|
||||
%
|
||||
% This refcard format was created by Steve Gildea.
|
||||
@@ -66,12 +66,12 @@
|
||||
% We only change the following to change the version numbers and
|
||||
% such.
|
||||
|
||||
\def\bisonversion{1.20} % the bison version
|
||||
\def\bisonversion{1.31} % the bison version
|
||||
|
||||
\def\refcardversion{0.4a} % reference card version
|
||||
\def\month{August} % month
|
||||
\def\year{1998} % year
|
||||
\def\version{\month\ \year, Bison Refcard Version \refcardversion}
|
||||
\def\refcardversion{0.5} % reference card version
|
||||
\def\month{November} % month
|
||||
\def\year{2001} % year
|
||||
\def\version{\month\ \year, Bison Refcard Version \refcardversion}
|
||||
|
||||
% for copyright notices
|
||||
\def\small{\smallfont\textfont2=\smallsy\baselineskip=.8\baselineskip}
|
||||
@@ -90,7 +90,7 @@
|
||||
|
||||
Permission is granted to make and distribute copies of this card
|
||||
provided the copyright notice and this permission notice
|
||||
are preserved on all copies.
|
||||
are preserved on all copies.
|
||||
\vskip .2\baselineskip
|
||||
For information, write to the:
|
||||
\vskip .2\baselineskip
|
||||
@@ -115,7 +115,7 @@ For information, write to the:
|
||||
|
||||
Permission is granted to make and distribute copies of this card
|
||||
provided the copyright notice and this permission notice
|
||||
are preserved on all copies.
|
||||
are preserved on all copies.
|
||||
\vskip .2\baselineskip
|
||||
For information, write to the:
|
||||
\vskip .2\baselineskip
|
||||
@@ -136,7 +136,7 @@ For information, write to the:
|
||||
|
||||
\def\ncolumns{\the\columnsperpage}
|
||||
|
||||
\message{[\ncolumns\space
|
||||
\message{[\ncolumns\space
|
||||
column\if 1\ncolumns\else s\fi\space per page]}
|
||||
|
||||
\def\scaledmag#1{ scaled \magstep #1}
|
||||
@@ -227,7 +227,7 @@ For information, write to the:
|
||||
\def\bye{\par\vfill\supereject
|
||||
\if a\abc \else\null\vfill\eject\fi
|
||||
\if a\abc \else\null\vfill\eject\fi
|
||||
\end}
|
||||
\end}
|
||||
\fi
|
||||
|
||||
% we won't be using math mode much, so redefine some of the characters
|
||||
@@ -316,41 +316,44 @@ Options can be used as: \kbd{bison {\it options} {\it filename}}
|
||||
\section{Command Line Options}
|
||||
%*****************************
|
||||
|
||||
\key{Display usage information.} {-h}
|
||||
\key{Display version information.} {-V}
|
||||
\key{Generate token and {\tt YYSTYPE} definitions.} {-d}
|
||||
\key{Prepend a prefix to external symbols.} {-p {\it prefix}}
|
||||
\key{Don't put {\tt \#line} directives in the parser.} {-l}
|
||||
\key{Specify the output file.} {-o {\it filename}}
|
||||
\key{Debug or {\it trace} mode.} {-t}
|
||||
\key{Debug or {\it trace} mode.} {-t}
|
||||
\key{Verbose description of the parser.} {-v}
|
||||
\key{Emulate {\tt yacc} (generate {\tt y.tab.*} files).} {-y}
|
||||
|
||||
\vskip .10truein
|
||||
{\bf Note:} The token and {\tt YYSTYPE} definitions are generated
|
||||
to a file called {\tt y.tab.h} if the {\tt -y} option is used,
|
||||
{\bf Note:} The token and {\tt YYSTYPE} definitions are generated
|
||||
to a file called {\tt y.tab.h} if the {\tt -y} option is used,
|
||||
otherwise it will have the format {\tt {\it name}.tab.h}, where
|
||||
{\it name} is the leading part of the parser definition filename.
|
||||
|
||||
\section{Definitions}
|
||||
%********************
|
||||
|
||||
\key{Declare a terminal symbol.}{\%token <{\it t\/}>
|
||||
\key{Declare a terminal symbol.}{\%token <{\it t\/}>
|
||||
{\it n}}
|
||||
|
||||
\key{Declare a terminal symbol, and define its association.}
|
||||
\key{Declare a terminal symbol, and define its association.}
|
||||
{{\it association} <{\it t\/}> {\it n}}
|
||||
|
||||
\vskip .2\baselineskip
|
||||
\key{Generate a reentrant (pure) parser.}
|
||||
\key{Generate a reentrant (pure) parser.}
|
||||
{\%pure_parser}
|
||||
|
||||
\key{Define the union of all data types used in the parser.}
|
||||
\key{Define the union of all data types used in the parser.}
|
||||
{\%union\{{\it field list}\} }
|
||||
|
||||
\vskip .2\baselineskip
|
||||
\key{Tell {\tt bison} where to start parsing.}
|
||||
{\%start {\it m}}
|
||||
\key{Tell {\tt bison} where to start parsing.}
|
||||
{\%start {\it m}}
|
||||
|
||||
\key{Tell {\tt bison} the data type of symbols.}
|
||||
{\%type <{\it t\/}> {\it s1}\dots{\it sn}}
|
||||
\key{Tell {\tt bison} the data type of symbols.}
|
||||
{\%type <{\it t\/}> {\it s1}\dots{\it sn}}
|
||||
|
||||
\vskip .10truein
|
||||
|
||||
@@ -362,8 +365,8 @@ definition, {\it n} is a {\it terminal} symbol name, {\it m} is a
|
||||
\vskip .10truein
|
||||
|
||||
The {\tt <{\it t\/}>} after {\tt \%token, \%left, \%right} and {\tt
|
||||
\%nonassoc} is optional. Additionally, precedence may be overridden with
|
||||
embedded {\tt \%prec} commands.
|
||||
\%nonassoc} is optional. Additionally, precedence may be overridden
|
||||
in the rules with {\tt \%prec} commands.
|
||||
|
||||
\section{Parser Definition Files}
|
||||
%*********************************
|
||||
@@ -379,7 +382,7 @@ The general form for a parser definition is:
|
||||
|
||||
\%\%
|
||||
|
||||
Rule definition 1
|
||||
Rule definition 1
|
||||
\vdots
|
||||
Rule definition {\it n}
|
||||
|
||||
@@ -397,8 +400,9 @@ The general form for a parser definition is:
|
||||
|
||||
Rules take the form:
|
||||
|
||||
\vskip -\baselineskip
|
||||
\beginexample
|
||||
non-terminal : {\it statement} 1
|
||||
non-terminal : {\it statement} 1
|
||||
| {\it statement} 2
|
||||
\vdots
|
||||
| {\it statement n}
|
||||
@@ -406,12 +410,12 @@ Rules take the form:
|
||||
\endexample
|
||||
|
||||
Where {\it statements} can be either empty, or contain
|
||||
a mixture of C code (enclosed in {\tt \{...\}}), and the
|
||||
a mixture of C code (enclosed in {\tt \{...\}}), and the
|
||||
symbols that make up the non-terminal. For example:
|
||||
|
||||
\vskip -\baselineskip
|
||||
\beginexample
|
||||
expression : number '$+$' number \{ \$\$ $=$ \$1 $+$ \$3 \}
|
||||
expression : number '$+$' number \{ \$\$ $=$ \$1 $+$ \$3 \}
|
||||
| number '$-$' number \{ \$\$ $=$ \$1 $-$ \$3 \}
|
||||
| number '$/$' number \{ \$\$ $=$ \$1 $/$ \$3 \}
|
||||
| number '$*$' number \{ \$\$ $=$ \$1 $*$ \$3 \}
|
||||
@@ -428,7 +432,7 @@ For altering the precedence of a symbol use:
|
||||
For example:
|
||||
\vskip -\baselineskip
|
||||
\beginexample
|
||||
foo : gnu bar gnu \%prec bar
|
||||
foo : gnu bar gnu \%prec bar
|
||||
;
|
||||
\endexample
|
||||
|
||||
@@ -438,16 +442,18 @@ For example:
|
||||
\key{Recognize an error \& continue parsing.}{error}
|
||||
\key{Access data associated with a symbol.} {\$\$, \$0\dots\${\it n}}
|
||||
\key{Access a field of the data union.} {\$\$.{\it t},
|
||||
\$0.{\it t}\dots\${\it n}.{\it t}}
|
||||
\key{Access data's line position.} {@{\it n}.{\it line\_spec}}
|
||||
\key{Access data's column position.} {@{\it n}.{\it column\_spec}}
|
||||
\$0.{\it t}\dots\${\it n}.{\it t}}
|
||||
\key{Access symbol's location.} {@\$, @0\dots@{\it n}}
|
||||
\key{Access data's line location.} {@{\it x}.{\it line\_spec}}
|
||||
\key{Access data's column location.} {@{\it x}.{\it column\_spec}}
|
||||
|
||||
|
||||
\vskip .10truein
|
||||
%
|
||||
Where {\it t} is a type defined in the {\tt \%union}, {\it n} is a
|
||||
number, {\it line\_spec} one of {\tt first_line} and {\tt last_line},
|
||||
and {\it column\_spec} is specified as either {\tt first_column} or {\tt
|
||||
last_column}.
|
||||
number, {\it x} is a number or \$, {\it line\_spec} one of {\tt
|
||||
first_line} and {\tt last_line}, and {\it column\_spec} is specified
|
||||
as either {\tt first_column} or {\tt last_column}.
|
||||
|
||||
\section {Variables and Types}
|
||||
%*****************************
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
@set UPDATED 20 September 2001
|
||||
@set UPDATED-MONTH September 2001
|
||||
@set EDITION 1.29c
|
||||
@set VERSION 1.29c
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
@set UPDATED 20 September 2001
|
||||
@set UPDATED-MONTH September 2001
|
||||
@set EDITION 1.29c
|
||||
@set VERSION 1.29c
|
||||
@set UPDATED 5 January 2002
|
||||
@set UPDATED-MONTH January 2002
|
||||
@set EDITION 1.32
|
||||
@set VERSION 1.32
|
||||
|
||||
+24
-8
@@ -1,22 +1,38 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
## Copyright 2001, 2002 Free Software Foundation, Inc.
|
||||
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
## the Free Software Foundation; either version 2 of the License, or
|
||||
## (at your option) any later version.
|
||||
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
## GNU General Public License for more details.
|
||||
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with this program; if not, write to the Free Software
|
||||
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
## 02111-1307 USA
|
||||
|
||||
AUTOMAKE_OPTIONS = ansi2knr
|
||||
|
||||
CFLAGS = @CFLAGS@ $(WARNING_CFLAGS)
|
||||
|
||||
noinst_LIBRARIES = libbison.a
|
||||
|
||||
INCLUDES = -I.. -I$(srcdir) -I../intl
|
||||
|
||||
# Heck, we are still using an old version of Automake which does not
|
||||
# understand LIBOBJ additions using $objext...
|
||||
|
||||
EXTRA_DIST = malloc.c realloc.c
|
||||
# understand inner AC_LIBOBJ (i.e., from Autoconf itself, not from
|
||||
# configure.in).
|
||||
EXTRA_DIST = malloc.c realloc.c strnlen.c
|
||||
|
||||
libbison_a_SOURCES = \
|
||||
error.c error.h \
|
||||
basename.c dirname.h dirname.c \
|
||||
getopt.h getopt.c getopt1.c \
|
||||
obstack.h obstack.c \
|
||||
quote.h quote.c quotearg.h quotearg.c \
|
||||
xalloc.h xmalloc.c xstrdup.c
|
||||
xalloc.h xmalloc.c xstrdup.c xstrndup.c
|
||||
|
||||
libbison_a_LIBADD = @LIBOBJS@
|
||||
libbison_a_LIBADD = @LIBOBJS@ @ALLOCA@
|
||||
libbison_a_DEPENDENCIES = $(libbison_a_LIBADD)
|
||||
|
||||
+103
-76
@@ -1,6 +1,7 @@
|
||||
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.5c from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
# Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@@ -12,7 +13,6 @@
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
@@ -43,9 +43,11 @@ AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = @program_transform_name@
|
||||
@@ -57,7 +59,12 @@ PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
|
||||
EXEEXT = @EXEEXT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOM4TE = @AUTOM4TE@
|
||||
AWK = @AWK@
|
||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||
CATALOGS = @CATALOGS@
|
||||
@@ -66,7 +73,7 @@ CC = @CC@
|
||||
CPP = @CPP@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEPDIR = @DEPDIR@
|
||||
EXEEXT = @EXEEXT@
|
||||
GCC = @GCC@
|
||||
GENCAT = @GENCAT@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMOFILES = @GMOFILES@
|
||||
@@ -77,12 +84,10 @@ INTLBISON = @INTLBISON@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||
LIB = @LIB@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
M4 = @M4@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
POFILES = @POFILES@
|
||||
POSUB = @POSUB@
|
||||
@@ -92,30 +97,32 @@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
WARNING_CFLAGS = @WARNING_CFLAGS@
|
||||
WERROR_CFLAGS = @WERROR_CFLAGS@
|
||||
am__include = @am__include@
|
||||
am__quote = @am__quote@
|
||||
install_sh = @install_sh@
|
||||
|
||||
AUTOMAKE_OPTIONS = ansi2knr
|
||||
|
||||
CFLAGS = @CFLAGS@ $(WARNING_CFLAGS)
|
||||
|
||||
noinst_LIBRARIES = libbison.a
|
||||
|
||||
INCLUDES = -I.. -I$(srcdir) -I../intl
|
||||
|
||||
|
||||
# Heck, we are still using an old version of Automake which does not
|
||||
# understand LIBOBJ additions using $objext...
|
||||
EXTRA_DIST = malloc.c realloc.c
|
||||
# understand inner AC_LIBOBJ (i.e., from Autoconf itself, not from
|
||||
# configure.in).
|
||||
EXTRA_DIST = malloc.c realloc.c strnlen.c
|
||||
|
||||
libbison_a_SOURCES = \
|
||||
error.c error.h \
|
||||
basename.c dirname.h dirname.c \
|
||||
getopt.h getopt.c getopt1.c \
|
||||
obstack.h obstack.c \
|
||||
quote.h quote.c quotearg.h quotearg.c \
|
||||
xalloc.h xmalloc.c xstrdup.c
|
||||
xalloc.h xmalloc.c xstrdup.c xstrndup.c
|
||||
|
||||
|
||||
libbison_a_LIBADD = @LIBOBJS@
|
||||
libbison_a_LIBADD = @LIBOBJS@ @ALLOCA@
|
||||
libbison_a_DEPENDENCIES = $(libbison_a_LIBADD)
|
||||
subdir = lib
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||
@@ -124,9 +131,10 @@ CONFIG_CLEAN_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
|
||||
libbison_a_AR = $(AR) cru
|
||||
am_libbison_a_OBJECTS = error$U.$(OBJEXT) getopt$U.$(OBJEXT) \
|
||||
getopt1$U.$(OBJEXT) obstack$U.$(OBJEXT) quote$U.$(OBJEXT) \
|
||||
quotearg$U.$(OBJEXT) xmalloc$U.$(OBJEXT) xstrdup$U.$(OBJEXT)
|
||||
am_libbison_a_OBJECTS = basename$U.$(OBJEXT) dirname$U.$(OBJEXT) \
|
||||
getopt$U.$(OBJEXT) getopt1$U.$(OBJEXT) quote$U.$(OBJEXT) \
|
||||
quotearg$U.$(OBJEXT) xmalloc$U.$(OBJEXT) xstrdup$U.$(OBJEXT) \
|
||||
xstrndup$U.$(OBJEXT)
|
||||
libbison_a_OBJECTS = $(am_libbison_a_OBJECTS)
|
||||
|
||||
DEFS = @DEFS@
|
||||
@@ -135,22 +143,25 @@ CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
|
||||
@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/error$U.Po $(DEPDIR)/getopt$U.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/getopt1$U.Po $(DEPDIR)/malloc.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/memchr.Po $(DEPDIR)/obstack$U.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/quote$U.Po $(DEPDIR)/quotearg$U.Po \
|
||||
am__depfiles_maybe = depfiles
|
||||
@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/alloca.Po $(DEPDIR)/error.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/malloc.Po $(DEPDIR)/memchr.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/memrchr.Po $(DEPDIR)/obstack.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/realloc.Po $(DEPDIR)/stpcpy.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/strndup.Po $(DEPDIR)/strnlen.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/strspn.Po $(DEPDIR)/xmalloc$U.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/xstrdup$U.Po
|
||||
@AMDEP_TRUE@ $(DEPDIR)/strchr.Po $(DEPDIR)/strspn.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/basename$U.Po ./$(DEPDIR)/dirname$U.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/getopt$U.Po ./$(DEPDIR)/getopt1$U.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/quote$U.Po ./$(DEPDIR)/quotearg$U.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/xmalloc$U.Po ./$(DEPDIR)/xstrdup$U.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/xstrndup$U.Po
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
CFLAGS = @CFLAGS@
|
||||
DIST_SOURCES = $(libbison_a_SOURCES)
|
||||
DIST_COMMON = Makefile.am Makefile.in ansi2knr.1 ansi2knr.c malloc.c \
|
||||
memchr.c realloc.c stpcpy.c strndup.c strnlen.c strspn.c
|
||||
DIST_COMMON = Makefile.am Makefile.in alloca.c ansi2knr.1 ansi2knr.c \
|
||||
error.c error.h malloc.c memchr.c memrchr.c obstack.c obstack.h \
|
||||
realloc.c stpcpy.c strchr.c strspn.c
|
||||
SOURCES = $(libbison_a_SOURCES)
|
||||
|
||||
all: all-am
|
||||
@@ -161,9 +172,7 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu lib/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && \
|
||||
CONFIG_HEADERS= CONFIG_LINKS= \
|
||||
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
||||
|
||||
AR = ar
|
||||
|
||||
@@ -189,23 +198,27 @@ clean-krextra:
|
||||
-rm -f ansi2knr
|
||||
|
||||
mostlyclean-kr:
|
||||
-rm -f *_.c
|
||||
-test "$U" = "" || rm -f *_.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/error$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt1$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/alloca.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/error.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/malloc.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/memchr.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/obstack$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/quote$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/quotearg$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/memrchr.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/obstack.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/realloc.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/stpcpy.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strndup.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strnlen.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strchr.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strspn.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/xmalloc$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/xstrdup$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quote$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quotearg$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloc$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrdup$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrndup$U.Po@am__quote@
|
||||
|
||||
distclean-depend:
|
||||
-rm -rf $(DEPDIR)
|
||||
@@ -222,77 +235,87 @@ distclean-depend:
|
||||
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
$(COMPILE) -c `cygpath -w $<`
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
alloca_.c: alloca.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/alloca.c; then echo $(srcdir)/alloca.c; else echo alloca.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > alloca_.c || rm -f alloca_.c
|
||||
error_.c: error.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/error.c; then echo $(srcdir)/error.c; else echo error.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > error_.c || rm -f error_.c
|
||||
alloca_.c: lib/alloca.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lib/alloca.c; then echo $(srcdir)/lib/alloca.c; else echo lib/alloca.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > alloca_.c || rm -f alloca_.c
|
||||
basename_.c: basename.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/basename.c; then echo $(srcdir)/basename.c; else echo basename.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > basename_.c || rm -f basename_.c
|
||||
dirname_.c: dirname.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/dirname.c; then echo $(srcdir)/dirname.c; else echo dirname.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > dirname_.c || rm -f dirname_.c
|
||||
error_.c: lib/error.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lib/error.c; then echo $(srcdir)/lib/error.c; else echo lib/error.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > error_.c || rm -f error_.c
|
||||
getopt_.c: getopt.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getopt.c; then echo $(srcdir)/getopt.c; else echo getopt.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > getopt_.c || rm -f getopt_.c
|
||||
getopt1_.c: getopt1.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getopt1.c; then echo $(srcdir)/getopt1.c; else echo getopt1.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > getopt1_.c || rm -f getopt1_.c
|
||||
malloc_.c: malloc.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/malloc.c; then echo $(srcdir)/malloc.c; else echo malloc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > malloc_.c || rm -f malloc_.c
|
||||
memchr_.c: memchr.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/memchr.c; then echo $(srcdir)/memchr.c; else echo memchr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > memchr_.c || rm -f memchr_.c
|
||||
obstack_.c: obstack.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/obstack.c; then echo $(srcdir)/obstack.c; else echo obstack.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > obstack_.c || rm -f obstack_.c
|
||||
malloc_.c: lib/malloc.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lib/malloc.c; then echo $(srcdir)/lib/malloc.c; else echo lib/malloc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > malloc_.c || rm -f malloc_.c
|
||||
memchr_.c: lib/memchr.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lib/memchr.c; then echo $(srcdir)/lib/memchr.c; else echo lib/memchr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > memchr_.c || rm -f memchr_.c
|
||||
memrchr_.c: lib/memrchr.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lib/memrchr.c; then echo $(srcdir)/lib/memrchr.c; else echo lib/memrchr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > memrchr_.c || rm -f memrchr_.c
|
||||
obstack_.c: lib/obstack.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lib/obstack.c; then echo $(srcdir)/lib/obstack.c; else echo lib/obstack.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > obstack_.c || rm -f obstack_.c
|
||||
quote_.c: quote.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/quote.c; then echo $(srcdir)/quote.c; else echo quote.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > quote_.c || rm -f quote_.c
|
||||
quotearg_.c: quotearg.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/quotearg.c; then echo $(srcdir)/quotearg.c; else echo quotearg.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > quotearg_.c || rm -f quotearg_.c
|
||||
realloc_.c: realloc.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/realloc.c; then echo $(srcdir)/realloc.c; else echo realloc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > realloc_.c || rm -f realloc_.c
|
||||
stpcpy_.c: stpcpy.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/stpcpy.c; then echo $(srcdir)/stpcpy.c; else echo stpcpy.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > stpcpy_.c || rm -f stpcpy_.c
|
||||
strndup_.c: strndup.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strndup.c; then echo $(srcdir)/strndup.c; else echo strndup.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strndup_.c || rm -f strndup_.c
|
||||
strnlen_.c: strnlen.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strnlen.c; then echo $(srcdir)/strnlen.c; else echo strnlen.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strnlen_.c || rm -f strnlen_.c
|
||||
strspn_.c: strspn.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strspn.c; then echo $(srcdir)/strspn.c; else echo strspn.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strspn_.c || rm -f strspn_.c
|
||||
realloc_.c: lib/realloc.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lib/realloc.c; then echo $(srcdir)/lib/realloc.c; else echo lib/realloc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > realloc_.c || rm -f realloc_.c
|
||||
stpcpy_.c: lib/stpcpy.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lib/stpcpy.c; then echo $(srcdir)/lib/stpcpy.c; else echo lib/stpcpy.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > stpcpy_.c || rm -f stpcpy_.c
|
||||
strchr_.c: lib/strchr.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lib/strchr.c; then echo $(srcdir)/lib/strchr.c; else echo lib/strchr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strchr_.c || rm -f strchr_.c
|
||||
strspn_.c: lib/strspn.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lib/strspn.c; then echo $(srcdir)/lib/strspn.c; else echo lib/strspn.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strspn_.c || rm -f strspn_.c
|
||||
xmalloc_.c: xmalloc.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xmalloc.c; then echo $(srcdir)/xmalloc.c; else echo xmalloc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xmalloc_.c || rm -f xmalloc_.c
|
||||
xstrdup_.c: xstrdup.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xstrdup.c; then echo $(srcdir)/xstrdup.c; else echo xstrdup.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xstrdup_.c || rm -f xstrdup_.c
|
||||
alloca_.$(OBJEXT) error_.$(OBJEXT) getopt_.$(OBJEXT) getopt1_.$(OBJEXT) \
|
||||
malloc_.$(OBJEXT) memchr_.$(OBJEXT) obstack_.$(OBJEXT) quote_.$(OBJEXT) \
|
||||
quotearg_.$(OBJEXT) realloc_.$(OBJEXT) stpcpy_.$(OBJEXT) \
|
||||
strndup_.$(OBJEXT) strnlen_.$(OBJEXT) strspn_.$(OBJEXT) \
|
||||
xmalloc_.$(OBJEXT) xstrdup_.$(OBJEXT) : $(ANSI2KNR)
|
||||
xstrndup_.c: xstrndup.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xstrndup.c; then echo $(srcdir)/xstrndup.c; else echo xstrndup.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xstrndup_.c || rm -f xstrndup_.c
|
||||
alloca_.$(OBJEXT) basename_.$(OBJEXT) dirname_.$(OBJEXT) \
|
||||
error_.$(OBJEXT) getopt_.$(OBJEXT) getopt1_.$(OBJEXT) malloc_.$(OBJEXT) \
|
||||
memchr_.$(OBJEXT) memrchr_.$(OBJEXT) obstack_.$(OBJEXT) \
|
||||
quote_.$(OBJEXT) quotearg_.$(OBJEXT) realloc_.$(OBJEXT) \
|
||||
stpcpy_.$(OBJEXT) strchr_.$(OBJEXT) strspn_.$(OBJEXT) \
|
||||
xmalloc_.$(OBJEXT) xstrdup_.$(OBJEXT) xstrndup_.$(OBJEXT) : $(ANSI2KNR)
|
||||
uninstall-info-am:
|
||||
|
||||
ETAGS = etags
|
||||
ETAGSFLAGS =
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique $(LISP)
|
||||
mkid -fID $$unique
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||
|| etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
|
||||
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|
||||
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`CDPATH=: && cd $(top_builddir) && pwd` \
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
top_distdir = ..
|
||||
@@ -300,13 +323,16 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
$(mkinstalldirs) "$(distdir)/$$dir"; \
|
||||
dir="/$$dir"; \
|
||||
$(mkinstalldirs) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
cp -pR $$d/$$file $(distdir)$$dir \
|
||||
|| exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
@@ -331,6 +357,7 @@ install-am: all-am
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
+66
-66
@@ -22,18 +22,18 @@
|
||||
your main control loop, etc. to force garbage collection. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#if HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#endif
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#if HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifdef emacs
|
||||
#include "blockinput.h"
|
||||
# include "blockinput.h"
|
||||
#endif
|
||||
|
||||
/* If compiling with GCC 2, this file's not needed. */
|
||||
@@ -41,41 +41,41 @@
|
||||
|
||||
/* If someone has defined alloca as a macro,
|
||||
there must be some other way alloca is supposed to work. */
|
||||
#ifndef alloca
|
||||
# ifndef alloca
|
||||
|
||||
#ifdef emacs
|
||||
#ifdef static
|
||||
# ifdef emacs
|
||||
# ifdef static
|
||||
/* actually, only want this if static is defined as ""
|
||||
-- this is for usg, in which emacs must undefine static
|
||||
in order to make unexec workable
|
||||
*/
|
||||
#ifndef STACK_DIRECTION
|
||||
# ifndef STACK_DIRECTION
|
||||
you
|
||||
lose
|
||||
-- must know STACK_DIRECTION at compile-time
|
||||
#endif /* STACK_DIRECTION undefined */
|
||||
#endif /* static */
|
||||
#endif /* emacs */
|
||||
# endif /* STACK_DIRECTION undefined */
|
||||
# endif /* static */
|
||||
# endif /* emacs */
|
||||
|
||||
/* If your stack is a linked list of frames, you have to
|
||||
provide an "address metric" ADDRESS_FUNCTION macro. */
|
||||
|
||||
#if defined (CRAY) && defined (CRAY_STACKSEG_END)
|
||||
# if defined (CRAY) && defined (CRAY_STACKSEG_END)
|
||||
long i00afunc ();
|
||||
#define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg))
|
||||
#else
|
||||
#define ADDRESS_FUNCTION(arg) &(arg)
|
||||
#endif
|
||||
# define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg))
|
||||
# else
|
||||
# define ADDRESS_FUNCTION(arg) &(arg)
|
||||
# endif
|
||||
|
||||
#if __STDC__
|
||||
# if __STDC__
|
||||
typedef void *pointer;
|
||||
#else
|
||||
# else
|
||||
typedef char *pointer;
|
||||
#endif
|
||||
# endif
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
# ifndef NULL
|
||||
# define NULL 0
|
||||
# endif
|
||||
|
||||
/* Different portions of Emacs need to call different versions of
|
||||
malloc. The Emacs executable needs alloca to call xmalloc, because
|
||||
@@ -83,13 +83,14 @@ typedef char *pointer;
|
||||
hand, the utilities in lib-src need alloca to call malloc; some of
|
||||
them are very simple, and don't have an xmalloc routine.
|
||||
|
||||
Non-Emacs programs expect this to call use xmalloc.
|
||||
Non-Emacs programs expect this to call xmalloc.
|
||||
|
||||
Callers below should use malloc. */
|
||||
|
||||
#ifndef emacs
|
||||
#define malloc xmalloc
|
||||
#endif
|
||||
# ifndef emacs
|
||||
# undef malloc
|
||||
# define malloc xmalloc
|
||||
# endif
|
||||
extern pointer malloc ();
|
||||
|
||||
/* Define STACK_DIRECTION if you know the direction of stack
|
||||
@@ -100,18 +101,18 @@ extern pointer malloc ();
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
|
||||
#ifndef STACK_DIRECTION
|
||||
#define STACK_DIRECTION 0 /* Direction unknown. */
|
||||
#endif
|
||||
# ifndef STACK_DIRECTION
|
||||
# define STACK_DIRECTION 0 /* Direction unknown. */
|
||||
# endif
|
||||
|
||||
#if STACK_DIRECTION != 0
|
||||
# if STACK_DIRECTION != 0
|
||||
|
||||
#define STACK_DIR STACK_DIRECTION /* Known at compile-time. */
|
||||
# define STACK_DIR STACK_DIRECTION /* Known at compile-time. */
|
||||
|
||||
#else /* STACK_DIRECTION == 0; need run-time code. */
|
||||
# else /* STACK_DIRECTION == 0; need run-time code. */
|
||||
|
||||
static int stack_dir; /* 1 or -1 once known. */
|
||||
#define STACK_DIR stack_dir
|
||||
# define STACK_DIR stack_dir
|
||||
|
||||
static void
|
||||
find_stack_direction ()
|
||||
@@ -135,7 +136,7 @@ find_stack_direction ()
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* STACK_DIRECTION == 0 */
|
||||
# endif /* STACK_DIRECTION == 0 */
|
||||
|
||||
/* An "alloca header" is used to:
|
||||
(a) chain together all alloca'ed blocks;
|
||||
@@ -144,9 +145,9 @@ find_stack_direction ()
|
||||
It is very important that sizeof(header) agree with malloc
|
||||
alignment chunk size. The following default should work okay. */
|
||||
|
||||
#ifndef ALIGN_SIZE
|
||||
#define ALIGN_SIZE sizeof(double)
|
||||
#endif
|
||||
# ifndef ALIGN_SIZE
|
||||
# define ALIGN_SIZE sizeof(double)
|
||||
# endif
|
||||
|
||||
typedef union hdr
|
||||
{
|
||||
@@ -168,16 +169,15 @@ static header *last_alloca_header = NULL; /* -> last alloca header. */
|
||||
implementations of C, for example under Gould's UTX/32. */
|
||||
|
||||
pointer
|
||||
alloca (size)
|
||||
unsigned size;
|
||||
alloca (size_t size)
|
||||
{
|
||||
auto char probe; /* Probes stack depth: */
|
||||
register char *depth = ADDRESS_FUNCTION (probe);
|
||||
|
||||
#if STACK_DIRECTION == 0
|
||||
# if STACK_DIRECTION == 0
|
||||
if (STACK_DIR == 0) /* Unknown growth direction. */
|
||||
find_stack_direction ();
|
||||
#endif
|
||||
# endif
|
||||
|
||||
/* Reclaim garbage, defined as all alloca'd storage that
|
||||
was allocated from deeper in the stack than currently. */
|
||||
@@ -185,9 +185,9 @@ alloca (size)
|
||||
{
|
||||
register header *hp; /* Traverses linked list. */
|
||||
|
||||
#ifdef emacs
|
||||
# ifdef emacs
|
||||
BLOCK_INPUT;
|
||||
#endif
|
||||
# endif
|
||||
|
||||
for (hp = last_alloca_header; hp != NULL;)
|
||||
if ((STACK_DIR > 0 && hp->h.deep > depth)
|
||||
@@ -204,9 +204,9 @@ alloca (size)
|
||||
|
||||
last_alloca_header = hp; /* -> last valid storage. */
|
||||
|
||||
#ifdef emacs
|
||||
# ifdef emacs
|
||||
UNBLOCK_INPUT;
|
||||
#endif
|
||||
# endif
|
||||
}
|
||||
|
||||
if (size == 0)
|
||||
@@ -232,15 +232,15 @@ alloca (size)
|
||||
}
|
||||
}
|
||||
|
||||
#if defined (CRAY) && defined (CRAY_STACKSEG_END)
|
||||
# if defined (CRAY) && defined (CRAY_STACKSEG_END)
|
||||
|
||||
#ifdef DEBUG_I00AFUNC
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
# ifdef DEBUG_I00AFUNC
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
|
||||
#ifndef CRAY_STACK
|
||||
#define CRAY_STACK
|
||||
#ifndef CRAY2
|
||||
# ifndef CRAY_STACK
|
||||
# define CRAY_STACK
|
||||
# ifndef CRAY2
|
||||
/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */
|
||||
struct stack_control_header
|
||||
{
|
||||
@@ -292,7 +292,7 @@ struct stack_segment_linkage
|
||||
long sss7;
|
||||
};
|
||||
|
||||
#else /* CRAY2 */
|
||||
# else /* CRAY2 */
|
||||
/* The following structure defines the vector of words
|
||||
returned by the STKSTAT library routine. */
|
||||
struct stk_stat
|
||||
@@ -345,10 +345,10 @@ struct stk_trailer
|
||||
long unknown14;
|
||||
};
|
||||
|
||||
#endif /* CRAY2 */
|
||||
#endif /* not CRAY_STACK */
|
||||
# endif /* CRAY2 */
|
||||
# endif /* not CRAY_STACK */
|
||||
|
||||
#ifdef CRAY2
|
||||
# ifdef CRAY2
|
||||
/* Determine a "stack measure" for an arbitrary ADDRESS.
|
||||
I doubt that "lint" will like this much. */
|
||||
|
||||
@@ -419,7 +419,7 @@ i00afunc (long *address)
|
||||
return (result);
|
||||
}
|
||||
|
||||
#else /* not CRAY2 */
|
||||
# else /* not CRAY2 */
|
||||
/* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP.
|
||||
Determine the number of the cell within the stack,
|
||||
given the address of the cell. The purpose of this
|
||||
@@ -464,9 +464,9 @@ i00afunc (long address)
|
||||
|
||||
while (!(this_segment <= address && address <= stkl))
|
||||
{
|
||||
#ifdef DEBUG_I00AFUNC
|
||||
# ifdef DEBUG_I00AFUNC
|
||||
fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl);
|
||||
#endif
|
||||
# endif
|
||||
if (pseg == 0)
|
||||
break;
|
||||
stkl = stkl - pseg;
|
||||
@@ -485,9 +485,9 @@ i00afunc (long address)
|
||||
|
||||
while (pseg != 0)
|
||||
{
|
||||
#ifdef DEBUG_I00AFUNC
|
||||
# ifdef DEBUG_I00AFUNC
|
||||
fprintf (stderr, "%011o %011o\n", pseg, size);
|
||||
#endif
|
||||
# endif
|
||||
stkl = stkl - pseg;
|
||||
ssptr = (struct stack_segment_linkage *) stkl;
|
||||
size = ssptr->sssize;
|
||||
@@ -497,8 +497,8 @@ i00afunc (long address)
|
||||
return (result);
|
||||
}
|
||||
|
||||
#endif /* not CRAY2 */
|
||||
#endif /* CRAY */
|
||||
# endif /* not CRAY2 */
|
||||
# endif /* CRAY */
|
||||
|
||||
#endif /* no alloca */
|
||||
# endif /* no alloca */
|
||||
#endif /* not GCC version 2 */
|
||||
|
||||
+182
-52
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1989, 1997, 1998 Aladdin Enterprises. All rights reserved. */
|
||||
/* Copyright (C) 1989, 2000 Aladdin Enterprises. All rights reserved. */
|
||||
|
||||
/*$Id$*/
|
||||
/* Convert ANSI C function definitions to K&R ("traditional C") syntax */
|
||||
@@ -37,27 +37,62 @@ program under the GPL.
|
||||
* There are no error messages.
|
||||
*
|
||||
* ansi2knr recognizes function definitions by seeing a non-keyword
|
||||
* identifier at the left margin, followed by a left parenthesis,
|
||||
* with a right parenthesis as the last character on the line,
|
||||
* and with a left brace as the first token on the following line
|
||||
* (ignoring possible intervening comments), except that a line
|
||||
* identifier at the left margin, followed by a left parenthesis, with a
|
||||
* right parenthesis as the last character on the line, and with a left
|
||||
* brace as the first token on the following line (ignoring possible
|
||||
* intervening comments and/or preprocessor directives), except that a line
|
||||
* consisting of only
|
||||
* identifier1(identifier2)
|
||||
* will not be considered a function definition unless identifier2 is
|
||||
* the word "void". ansi2knr will recognize a multi-line header provided
|
||||
* that no intervening line ends with a left or right brace or a semicolon.
|
||||
* These algorithms ignore whitespace and comments, except that
|
||||
* the function name must be the first thing on the line.
|
||||
* The following constructs will confuse it:
|
||||
* the word "void", and a line consisting of
|
||||
* identifier1(identifier2, <<arbitrary>>)
|
||||
* will not be considered a function definition.
|
||||
* ansi2knr will recognize a multi-line header provided that no intervening
|
||||
* line ends with a left or right brace or a semicolon. These algorithms
|
||||
* ignore whitespace, comments, and preprocessor directives, except that
|
||||
* the function name must be the first thing on the line. The following
|
||||
* constructs will confuse it:
|
||||
* - Any other construct that starts at the left margin and
|
||||
* follows the above syntax (such as a macro or function call).
|
||||
* - Some macros that tinker with the syntax of the function header.
|
||||
* - Some macros that tinker with the syntax of function headers.
|
||||
*/
|
||||
|
||||
/*
|
||||
* The original and principal author of ansi2knr is L. Peter Deutsch
|
||||
* <[email protected]>. Other authors are noted in the change history
|
||||
* that follows (in reverse chronological order):
|
||||
|
||||
lpd 2000-04-12 backs out Eggert's changes because of bugs:
|
||||
- concatlits didn't declare the type of its bufend argument;
|
||||
- concatlits didn't't recognize when it was inside a comment;
|
||||
- scanstring could scan backward past the beginning of the string; when
|
||||
- the check for \ + newline in scanstring was unnecessary.
|
||||
|
||||
2000-03-05 Paul Eggert <[email protected]>
|
||||
|
||||
Add support for concatenated string literals.
|
||||
* ansi2knr.c (concatlits): New decl.
|
||||
(main): Invoke concatlits to concatenate string literals.
|
||||
(scanstring): Handle backslash-newline correctly. Work with
|
||||
character constants. Fix bug when scanning backwards through
|
||||
backslash-quote. Check for unterminated strings.
|
||||
(convert1): Parse character constants, too.
|
||||
(appendline, concatlits): New functions.
|
||||
* ansi2knr.1: Document this.
|
||||
|
||||
lpd 1999-08-17 added code to allow preprocessor directives
|
||||
wherever comments are allowed
|
||||
lpd 1999-04-12 added minor fixes from Pavel Roskin
|
||||
<[email protected]> for clean compilation with
|
||||
gcc -W -Wall
|
||||
lpd 1999-03-22 added hack to recognize lines consisting of
|
||||
identifier1(identifier2, xxx) as *not* being procedures
|
||||
lpd 1999-02-03 made indentation of preprocessor commands consistent
|
||||
lpd 1999-01-28 fixed two bugs: a '/' in an argument list caused an
|
||||
endless loop; quoted strings within an argument list
|
||||
confused the parser
|
||||
lpd 1999-01-24 added a check for write errors on the output,
|
||||
suggested by Jim Meyering <[email protected]>
|
||||
lpd 1998-11-09 added further hack to recognize identifier(void)
|
||||
as being a procedure
|
||||
lpd 1998-10-23 added hack to recognize lines consisting of
|
||||
@@ -153,19 +188,24 @@ program under the GPL.
|
||||
|
||||
#endif
|
||||
|
||||
/* Define NULL (for *very* old compilers). */
|
||||
#ifndef NULL
|
||||
# define NULL (0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The ctype macros don't always handle 8-bit characters correctly.
|
||||
* Compensate for this here.
|
||||
*/
|
||||
#ifdef isascii
|
||||
# undef HAVE_ISASCII /* just in case */
|
||||
# define HAVE_ISASCII 1
|
||||
# undef HAVE_ISASCII /* just in case */
|
||||
# define HAVE_ISASCII 1
|
||||
#else
|
||||
#endif
|
||||
#if STDC_HEADERS || !HAVE_ISASCII
|
||||
# define is_ascii(c) 1
|
||||
# define is_ascii(c) 1
|
||||
#else
|
||||
# define is_ascii(c) isascii(c)
|
||||
# define is_ascii(c) isascii(c)
|
||||
#endif
|
||||
|
||||
#define is_space(c) (is_ascii(c) && isspace(c))
|
||||
@@ -177,7 +217,10 @@ program under the GPL.
|
||||
#define isidfirstchar(ch) (is_alpha(ch) || (ch) == '_')
|
||||
|
||||
/* Forward references */
|
||||
char *ppdirforward();
|
||||
char *ppdirbackward();
|
||||
char *skipspace();
|
||||
char *scanstring();
|
||||
int writeblanks();
|
||||
int test1();
|
||||
int convert1();
|
||||
@@ -190,6 +233,8 @@ main(argc, argv)
|
||||
{ FILE *in = stdin;
|
||||
FILE *out = stdout;
|
||||
char *filename = 0;
|
||||
char *program_name = argv[0];
|
||||
char *output_name = 0;
|
||||
#define bufsize 5000 /* arbitrary size */
|
||||
char *buf;
|
||||
char *line;
|
||||
@@ -205,6 +250,7 @@ main(argc, argv)
|
||||
* check for this switch for backward compatibility.
|
||||
*/
|
||||
int convert_varargs = 1;
|
||||
int output_error;
|
||||
|
||||
while ( argc > 1 && argv[1][0] == '-' ) {
|
||||
if ( !strcmp(argv[1], "--varargs") ) {
|
||||
@@ -219,7 +265,8 @@ main(argc, argv)
|
||||
argv += 2;
|
||||
continue;
|
||||
}
|
||||
fprintf(stderr, "Unrecognized switch: %s\n", argv[1]);
|
||||
fprintf(stderr, "%s: Unrecognized switch: %s\n", program_name,
|
||||
argv[1]);
|
||||
fprintf(stderr, usage);
|
||||
exit(1);
|
||||
}
|
||||
@@ -229,16 +276,19 @@ main(argc, argv)
|
||||
fprintf(stderr, usage);
|
||||
exit(0);
|
||||
case 3:
|
||||
out = fopen(argv[2], "w");
|
||||
output_name = argv[2];
|
||||
out = fopen(output_name, "w");
|
||||
if ( out == NULL ) {
|
||||
fprintf(stderr, "Cannot open output file %s\n", argv[2]);
|
||||
fprintf(stderr, "%s: Cannot open output file %s\n",
|
||||
program_name, output_name);
|
||||
exit(1);
|
||||
}
|
||||
/* falls through */
|
||||
case 2:
|
||||
in = fopen(argv[1], "r");
|
||||
if ( in == NULL ) {
|
||||
fprintf(stderr, "Cannot open input file %s\n", argv[1]);
|
||||
fprintf(stderr, "%s: Cannot open input file %s\n",
|
||||
program_name, argv[1]);
|
||||
exit(1);
|
||||
}
|
||||
if ( filename == 0 )
|
||||
@@ -250,6 +300,11 @@ main(argc, argv)
|
||||
if ( filename )
|
||||
fprintf(out, "#line 1 \"%s\"\n", filename);
|
||||
buf = malloc(bufsize);
|
||||
if ( buf == NULL )
|
||||
{
|
||||
fprintf(stderr, "Unable to allocate read buffer!\n");
|
||||
exit(1);
|
||||
}
|
||||
line = buf;
|
||||
while ( fgets(line, (unsigned)(buf + bufsize - line), in) != NULL )
|
||||
{
|
||||
@@ -266,7 +321,7 @@ f: if ( line >= buf + (bufsize - 1) ) /* overflow check */
|
||||
goto wl;
|
||||
if ( fgets(line, (unsigned)(buf + bufsize - line), in) == NULL )
|
||||
goto wl;
|
||||
switch ( *skipspace(more, 1) )
|
||||
switch ( *skipspace(ppdirforward(more), 1) )
|
||||
{
|
||||
case '{':
|
||||
/* Definitely a function header. */
|
||||
@@ -300,32 +355,91 @@ wl: fputs(buf, out);
|
||||
if ( line != buf )
|
||||
fputs(buf, out);
|
||||
free(buf);
|
||||
if ( out != stdout )
|
||||
fclose(out);
|
||||
if ( output_name ) {
|
||||
output_error = ferror(out);
|
||||
output_error |= fclose(out);
|
||||
} else { /* out == stdout */
|
||||
fflush(out);
|
||||
output_error = ferror(out);
|
||||
}
|
||||
if ( output_error ) {
|
||||
fprintf(stderr, "%s: error writing to %s\n", program_name,
|
||||
(output_name ? output_name : "stdout"));
|
||||
exit(1);
|
||||
}
|
||||
if ( in != stdin )
|
||||
fclose(in);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Skip over space and comments, in either direction. */
|
||||
/*
|
||||
* Skip forward or backward over one or more preprocessor directives.
|
||||
*/
|
||||
char *
|
||||
ppdirforward(p)
|
||||
char *p;
|
||||
{
|
||||
for (; *p == '#'; ++p) {
|
||||
for (; *p != '\r' && *p != '\n'; ++p)
|
||||
if (*p == 0)
|
||||
return p;
|
||||
if (*p == '\r' && p[1] == '\n')
|
||||
++p;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
char *
|
||||
ppdirbackward(p, limit)
|
||||
char *p;
|
||||
char *limit;
|
||||
{
|
||||
char *np = p;
|
||||
|
||||
for (;; p = --np) {
|
||||
if (*np == '\n' && np[-1] == '\r')
|
||||
--np;
|
||||
for (; np > limit && np[-1] != '\r' && np[-1] != '\n'; --np)
|
||||
if (np[-1] == 0)
|
||||
return np;
|
||||
if (*np != '#')
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Skip over whitespace, comments, and preprocessor directives,
|
||||
* in either direction.
|
||||
*/
|
||||
char *
|
||||
skipspace(p, dir)
|
||||
register char *p;
|
||||
register int dir; /* 1 for forward, -1 for backward */
|
||||
{ for ( ; ; )
|
||||
{ while ( is_space(*p) )
|
||||
p += dir;
|
||||
if ( !(*p == '/' && p[dir] == '*') )
|
||||
break;
|
||||
p += dir; p += dir;
|
||||
while ( !(*p == '*' && p[dir] == '/') )
|
||||
{ if ( *p == 0 )
|
||||
return p; /* multi-line comment?? */
|
||||
p += dir;
|
||||
}
|
||||
p += dir; p += dir;
|
||||
}
|
||||
return p;
|
||||
char *p;
|
||||
int dir; /* 1 for forward, -1 for backward */
|
||||
{
|
||||
for ( ; ; ) {
|
||||
while ( is_space(*p) )
|
||||
p += dir;
|
||||
if ( !(*p == '/' && p[dir] == '*') )
|
||||
break;
|
||||
p += dir; p += dir;
|
||||
while ( !(*p == '*' && p[dir] == '/') ) {
|
||||
if ( *p == 0 )
|
||||
return p; /* multi-line comment?? */
|
||||
p += dir;
|
||||
}
|
||||
p += dir; p += dir;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
/* Scan over a quoted string, in either direction. */
|
||||
char *
|
||||
scanstring(p, dir)
|
||||
char *p;
|
||||
int dir;
|
||||
{
|
||||
for (p += dir; ; p += dir)
|
||||
if (*p == '"' && p[-dir] != '\\')
|
||||
return p + dir;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -359,14 +473,14 @@ writeblanks(start, end)
|
||||
int
|
||||
test1(buf)
|
||||
char *buf;
|
||||
{ register char *p = buf;
|
||||
{ char *p = buf;
|
||||
char *bend;
|
||||
char *endfn;
|
||||
int contin;
|
||||
|
||||
if ( !isidfirstchar(*p) )
|
||||
return 0; /* no name at left margin */
|
||||
bend = skipspace(buf + strlen(buf) - 1, -1);
|
||||
bend = skipspace(ppdirbackward(buf + strlen(buf) - 1, buf), -1);
|
||||
switch ( *bend )
|
||||
{
|
||||
case ';': contin = 0 /*2*/; break;
|
||||
@@ -396,7 +510,7 @@ test1(buf)
|
||||
};
|
||||
char **key = words;
|
||||
char *kp;
|
||||
int len = endfn - buf;
|
||||
unsigned len = endfn - buf;
|
||||
|
||||
while ( (kp = *key) != 0 )
|
||||
{ if ( strlen(kp) == len && !strncmp(kp, buf, len) )
|
||||
@@ -409,14 +523,16 @@ test1(buf)
|
||||
int len;
|
||||
/*
|
||||
* Check for identifier1(identifier2) and not
|
||||
* identifier1(void).
|
||||
* identifier1(void), or identifier1(identifier2, xxxx).
|
||||
*/
|
||||
|
||||
while ( isidchar(*p) )
|
||||
p++;
|
||||
len = p - id;
|
||||
p = skipspace(p, 1);
|
||||
if ( *p == ')' && (len != 4 || strncmp(id, "void", 4)) )
|
||||
if (*p == ',' ||
|
||||
(*p == ')' && (len != 4 || strncmp(id, "void", 4)))
|
||||
)
|
||||
return 0; /* not a function */
|
||||
}
|
||||
/*
|
||||
@@ -443,7 +559,7 @@ convert1(buf, out, header, convert_varargs)
|
||||
int header; /* Boolean */
|
||||
int convert_varargs; /* Boolean */
|
||||
{ char *endfn;
|
||||
register char *p;
|
||||
char *p;
|
||||
/*
|
||||
* The breaks table contains pointers to the beginning and end
|
||||
* of each argument.
|
||||
@@ -461,7 +577,7 @@ convert1(buf, out, header, convert_varargs)
|
||||
;
|
||||
top: p = endfn;
|
||||
breaks = (char **)malloc(sizeof(char *) * num_breaks * 2);
|
||||
if ( breaks == 0 )
|
||||
if ( breaks == NULL )
|
||||
{ /* Couldn't allocate break table, give up */
|
||||
fprintf(stderr, "Unable to allocate break table!\n");
|
||||
fputs(buf, out);
|
||||
@@ -473,7 +589,7 @@ top: p = endfn;
|
||||
do
|
||||
{ int level = 0;
|
||||
char *lp = NULL;
|
||||
char *rp;
|
||||
char *rp = NULL;
|
||||
char *end = NULL;
|
||||
|
||||
if ( bp >= btop )
|
||||
@@ -500,14 +616,18 @@ top: p = endfn;
|
||||
else rp = p;
|
||||
break;
|
||||
case '/':
|
||||
p = skipspace(p, 1) - 1;
|
||||
if (p[1] == '*')
|
||||
p = skipspace(p, 1) - 1;
|
||||
break;
|
||||
case '"':
|
||||
p = scanstring(p, 1) - 1;
|
||||
break;
|
||||
default:
|
||||
;
|
||||
}
|
||||
}
|
||||
/* Erase any embedded prototype parameters. */
|
||||
if ( lp )
|
||||
if ( lp && rp )
|
||||
writeblanks(lp + 1, rp);
|
||||
p--; /* back up over terminator */
|
||||
/* Find the name being declared. */
|
||||
@@ -523,9 +643,19 @@ top: p = endfn;
|
||||
while ( level )
|
||||
switch ( *--p )
|
||||
{
|
||||
case ']': case ')': level++; break;
|
||||
case '[': case '(': level--; break;
|
||||
case '/': p = skipspace(p, -1) + 1; break;
|
||||
case ']': case ')':
|
||||
level++;
|
||||
break;
|
||||
case '[': case '(':
|
||||
level--;
|
||||
break;
|
||||
case '/':
|
||||
if (p > buf && p[-1] == '*')
|
||||
p = skipspace(p, -1) + 1;
|
||||
break;
|
||||
case '"':
|
||||
p = scanstring(p, -1) + 1;
|
||||
break;
|
||||
default: ;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/* basename.c -- return the last element in a path
|
||||
Copyright (C) 1990, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
|
||||
#ifndef FILESYSTEM_PREFIX_LEN
|
||||
# define FILESYSTEM_PREFIX_LEN(Filename) 0
|
||||
#endif
|
||||
|
||||
#ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef ISSLASH
|
||||
# define ISSLASH(C) ((C) == '/')
|
||||
#endif
|
||||
|
||||
char *base_name PARAMS ((char const *name));
|
||||
|
||||
/* In general, we can't use the builtin `basename' function if available,
|
||||
since it has different meanings in different environments.
|
||||
In some environments the builtin `basename' modifies its argument.
|
||||
If NAME is all slashes, be sure to return `/'. */
|
||||
|
||||
char *
|
||||
base_name (char const *name)
|
||||
{
|
||||
char const *base = name += FILESYSTEM_PREFIX_LEN (name);
|
||||
int all_slashes = 1;
|
||||
char const *p;
|
||||
|
||||
for (p = name; *p; p++)
|
||||
{
|
||||
if (ISSLASH (*p))
|
||||
base = p + 1;
|
||||
else
|
||||
all_slashes = 0;
|
||||
}
|
||||
|
||||
/* If NAME is all slashes, arrange to return `/'. */
|
||||
if (*base == '\0' && ISSLASH (*name) && all_slashes)
|
||||
--base;
|
||||
|
||||
/* Make sure the last byte is not a slash. */
|
||||
assert (all_slashes || !ISSLASH (*(p - 1)));
|
||||
|
||||
return (char *) base;
|
||||
}
|
||||
+189
@@ -0,0 +1,189 @@
|
||||
/* dirname.c -- return all but the last element in a path
|
||||
Copyright (C) 1990, 1998, 2000 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
#else
|
||||
char *malloc ();
|
||||
#endif
|
||||
#if defined STDC_HEADERS || defined HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#else
|
||||
# include <strings.h>
|
||||
# ifndef strrchr
|
||||
# define strrchr rindex
|
||||
# endif
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
#ifndef HAVE_DECL_MEMRCHR
|
||||
"this configure-time declaration test was not run"
|
||||
#endif
|
||||
#if !HAVE_DECL_MEMRCHR
|
||||
void *memrchr ();
|
||||
#endif
|
||||
|
||||
#include "dirname.h"
|
||||
|
||||
#ifndef FILESYSTEM_PREFIX_LEN
|
||||
# define FILESYSTEM_PREFIX_LEN(Filename) 0
|
||||
#endif
|
||||
|
||||
#ifndef ISSLASH
|
||||
# define ISSLASH(C) ((C) == '/')
|
||||
#endif
|
||||
|
||||
#define BACKSLASH_IS_PATH_SEPARATOR ISSLASH ('\\')
|
||||
|
||||
/* Return the length of `dirname (PATH)' and set *RESULT to point
|
||||
to PATH or to `"."', as appropriate. Works properly even if
|
||||
there are trailing slashes (by effectively ignoring them).
|
||||
WARNING: This function doesn't work for cwd-relative names like
|
||||
`a:foo' that are specified with a drive-letter prefix. That case
|
||||
is handled in the caller. */
|
||||
static size_t
|
||||
dir_name_r (char const *path, char const **result)
|
||||
{
|
||||
char const *slash;
|
||||
size_t length; /* Length of result, not including NUL. */
|
||||
|
||||
slash = strrchr (path, '/');
|
||||
if (BACKSLASH_IS_PATH_SEPARATOR)
|
||||
{
|
||||
char const *b = strrchr (path, '\\');
|
||||
if (b && slash < b)
|
||||
slash = b;
|
||||
}
|
||||
|
||||
/* If the last byte of PATH is a slash, decrement SLASH until it's
|
||||
pointing at the leftmost in a sequence of trailing slashes. */
|
||||
if (slash && slash[1] == 0)
|
||||
{
|
||||
while (path < slash && ISSLASH (slash[-1]))
|
||||
{
|
||||
--slash;
|
||||
}
|
||||
|
||||
if (path < slash)
|
||||
{
|
||||
size_t len = slash - path;
|
||||
slash = memrchr (path, '/', len);
|
||||
if (BACKSLASH_IS_PATH_SEPARATOR)
|
||||
{
|
||||
char const *b = memrchr (path, '\\', len);
|
||||
if (b && slash < b)
|
||||
slash = b;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (slash == 0)
|
||||
{
|
||||
/* File is in the current directory. */
|
||||
|
||||
length = FILESYSTEM_PREFIX_LEN (path);
|
||||
|
||||
if (length == 0)
|
||||
{
|
||||
path = ".";
|
||||
length = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Remove any trailing slashes from the result. If we have a
|
||||
canonicalized "d:/path", leave alone the root case "d:/". */
|
||||
char const *lim = path + FILESYSTEM_PREFIX_LEN (path);
|
||||
|
||||
while (lim < slash && ISSLASH (*slash))
|
||||
--slash;
|
||||
|
||||
length = slash - path + 1;
|
||||
}
|
||||
|
||||
*result = path;
|
||||
return length;
|
||||
}
|
||||
|
||||
/* Return the leading directories part of PATH,
|
||||
allocated with malloc. If out of memory, return 0.
|
||||
Works properly even if there are trailing slashes
|
||||
(by effectively ignoring them). */
|
||||
|
||||
char *
|
||||
dir_name (char const *path)
|
||||
{
|
||||
char const *result;
|
||||
size_t length = dir_name_r (path, &result);
|
||||
int append_dot = (length && length == FILESYSTEM_PREFIX_LEN (newpath));
|
||||
char *newpath = (char *) malloc (length + append_dot + 1);
|
||||
if (newpath == 0)
|
||||
return 0;
|
||||
strncpy (newpath, result, length);
|
||||
/* If PATH is "d:foo", return "d:.", the CWD on drive d: */
|
||||
if (append_dot)
|
||||
newpath[length++] = '.';
|
||||
newpath[length] = 0;
|
||||
return newpath;
|
||||
}
|
||||
|
||||
#ifdef TEST_DIRNAME
|
||||
/*
|
||||
|
||||
Run the test like this (expect no output):
|
||||
gcc -DHAVE_CONFIG_H -DTEST_DIRNAME -I.. -O -Wall memrchr.c dirname.c
|
||||
sed -n '/^BEGIN-DATA$/,/^END-DATA$/p' dirname.c|grep -v DATA|./a.out
|
||||
|
||||
BEGIN-DATA
|
||||
foo//// .
|
||||
bar/foo//// bar
|
||||
foo/ .
|
||||
/ /
|
||||
. .
|
||||
a .
|
||||
END-DATA
|
||||
|
||||
*/
|
||||
|
||||
# define MAX_BUFF_LEN 1024
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
char buff[MAX_BUFF_LEN + 1];
|
||||
|
||||
buff[MAX_BUFF_LEN] = 0;
|
||||
while (fgets (buff, MAX_BUFF_LEN, stdin) && buff[0])
|
||||
{
|
||||
char path[MAX_BUFF_LEN];
|
||||
char expected_result[MAX_BUFF_LEN];
|
||||
char const *result;
|
||||
sscanf (buff, "%s %s", path, expected_result);
|
||||
result = dir_name (path);
|
||||
if (strcmp (result, expected_result))
|
||||
printf ("%s: got %s, expected %s\n", path, result, expected_result);
|
||||
}
|
||||
exit (0);
|
||||
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,31 @@
|
||||
/* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef DIRNAME_H_
|
||||
# define DIRNAME_H_ 1
|
||||
|
||||
# ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
# endif
|
||||
|
||||
char *
|
||||
dir_name PARAMS ((const char *path));
|
||||
|
||||
#endif /* not DIRNAME_H_ */
|
||||
+198
-74
@@ -1,23 +1,22 @@
|
||||
/* Error handler for noninteractive utilities
|
||||
Copyright (C) 1990-1998, 2000 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 1990-1998, 2000, 2001 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library. Its master source is NOT part of
|
||||
the C library, however. The master source lives in /gd/gnu/lib.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
/* Written by David MacKenzie <[email protected]>. */
|
||||
|
||||
@@ -29,6 +28,10 @@
|
||||
#if HAVE_LIBINTL_H
|
||||
# include <libintl.h>
|
||||
#endif
|
||||
#ifdef _LIBC
|
||||
# include <wchar.h>
|
||||
# define mbsrtowcs __mbsrtowcs
|
||||
#endif
|
||||
|
||||
#if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC
|
||||
# if __STDC__
|
||||
@@ -52,13 +55,6 @@ void exit ();
|
||||
|
||||
#include "error.h"
|
||||
|
||||
#ifndef HAVE_DECL_STRERROR_R
|
||||
"this configure-time declaration test was not run"
|
||||
#endif
|
||||
#if !HAVE_DECL_STRERROR_R
|
||||
char *strerror_r ();
|
||||
#endif
|
||||
|
||||
#ifndef _
|
||||
# define _(String) String
|
||||
#endif
|
||||
@@ -83,6 +79,12 @@ unsigned int error_message_count;
|
||||
|
||||
/* In GNU libc we want do not want to use the common name `error' directly.
|
||||
Instead make it a weak alias. */
|
||||
extern void __error (int status, int errnum, const char *message, ...)
|
||||
__attribute__ ((__format__ (__printf__, 3, 4)));
|
||||
extern void __error_at_line (int status, int errnum, const char *file_name,
|
||||
unsigned int line_number, const char *message,
|
||||
...)
|
||||
__attribute__ ((__format__ (__printf__, 5, 6)));;
|
||||
# define error __error
|
||||
# define error_at_line __error_at_line
|
||||
|
||||
@@ -93,21 +95,30 @@ unsigned int error_message_count;
|
||||
|
||||
#else /* not _LIBC */
|
||||
|
||||
# if !HAVE_DECL_STRERROR_R && STRERROR_R_CHAR_P
|
||||
# ifndef HAVE_DECL_STRERROR_R
|
||||
"this configure-time declaration test was not run"
|
||||
# endif
|
||||
char *strerror_r ();
|
||||
# endif
|
||||
|
||||
/* The calling program should define program_name and set it to the
|
||||
name of the executing program. */
|
||||
extern char *program_name;
|
||||
|
||||
# ifdef HAVE_STRERROR_R
|
||||
# if HAVE_STRERROR_R || defined strerror_r
|
||||
# define __strerror_r strerror_r
|
||||
# else
|
||||
# if HAVE_STRERROR
|
||||
# ifndef strerror /* On some systems, strerror is a macro */
|
||||
# ifndef HAVE_DECL_STRERROR
|
||||
"this configure-time declaration test was not run"
|
||||
# endif
|
||||
# if !HAVE_DECL_STRERROR
|
||||
char *strerror ();
|
||||
# endif
|
||||
# else
|
||||
static char *
|
||||
private_strerror (errnum)
|
||||
int errnum;
|
||||
private_strerror (int errnum)
|
||||
{
|
||||
extern char *sys_errlist[];
|
||||
extern int sys_nerr;
|
||||
@@ -118,15 +129,118 @@ private_strerror (errnum)
|
||||
}
|
||||
# define strerror private_strerror
|
||||
# endif /* HAVE_STRERROR */
|
||||
# endif /* HAVE_STRERROR_R */
|
||||
# endif /* HAVE_STRERROR_R || defined strerror_r */
|
||||
#endif /* not _LIBC */
|
||||
|
||||
static void
|
||||
print_errno_message (int errnum)
|
||||
{
|
||||
char const *s;
|
||||
|
||||
#if defined HAVE_STRERROR_R || _LIBC
|
||||
char errbuf[1024];
|
||||
# if STRERROR_R_CHAR_P || _LIBC
|
||||
s = __strerror_r (errnum, errbuf, sizeof errbuf);
|
||||
# else
|
||||
if (__strerror_r (errnum, errbuf, sizeof errbuf) == 0)
|
||||
s = errbuf;
|
||||
else
|
||||
s = 0;
|
||||
# endif
|
||||
#else
|
||||
s = strerror (errnum);
|
||||
#endif
|
||||
|
||||
#if !_LIBC
|
||||
if (! s)
|
||||
s = _("Unknown system error");
|
||||
#endif
|
||||
|
||||
#if _LIBC && USE_IN_LIBIO
|
||||
if (_IO_fwide (stderr, 0) > 0)
|
||||
{
|
||||
__fwprintf (stderr, L": %s", s);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
fprintf (stderr, ": %s", s);
|
||||
}
|
||||
|
||||
#ifdef VA_START
|
||||
static void
|
||||
error_tail (int status, int errnum, const char *message, va_list args)
|
||||
{
|
||||
# if HAVE_VPRINTF || _LIBC
|
||||
# if _LIBC && USE_IN_LIBIO
|
||||
if (_IO_fwide (stderr, 0) > 0)
|
||||
{
|
||||
# define ALLOCA_LIMIT 2000
|
||||
size_t len = strlen (message) + 1;
|
||||
wchar_t *wmessage = NULL;
|
||||
mbstate_t st;
|
||||
size_t res;
|
||||
const char *tmp;
|
||||
|
||||
do
|
||||
{
|
||||
if (len < ALLOCA_LIMIT)
|
||||
wmessage = (wchar_t *) alloca (len * sizeof (wchar_t));
|
||||
else
|
||||
{
|
||||
if (wmessage != NULL && len / 2 < ALLOCA_LIMIT)
|
||||
wmessage = NULL;
|
||||
|
||||
wmessage = (wchar_t *) realloc (wmessage,
|
||||
len * sizeof (wchar_t));
|
||||
|
||||
if (wmessage == NULL)
|
||||
{
|
||||
fputws_unlocked (L"out of memory\n", stderr);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
memset (&st, '\0', sizeof (st));
|
||||
tmp =message;
|
||||
}
|
||||
while ((res = mbsrtowcs (wmessage, &tmp, len, &st)) == len);
|
||||
|
||||
if (res == (size_t) -1)
|
||||
/* The string cannot be converted. */
|
||||
wmessage = (wchar_t *) L"???";
|
||||
|
||||
__vfwprintf (stderr, wmessage, args);
|
||||
}
|
||||
else
|
||||
# endif
|
||||
vfprintf (stderr, message, args);
|
||||
# else
|
||||
_doprnt (message, args, stderr);
|
||||
# endif
|
||||
va_end (args);
|
||||
|
||||
++error_message_count;
|
||||
if (errnum)
|
||||
print_errno_message (errnum);
|
||||
# if _LIBC && USE_IN_LIBIO
|
||||
if (_IO_fwide (stderr, 0) > 0)
|
||||
putwc (L'\n', stderr);
|
||||
else
|
||||
# endif
|
||||
putc ('\n', stderr);
|
||||
fflush (stderr);
|
||||
if (status)
|
||||
exit (status);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* Print the program name and error message MESSAGE, which is a printf-style
|
||||
format string with optional args.
|
||||
If ERRNUM is nonzero, print its corresponding system error message.
|
||||
Exit with status STATUS if it is nonzero. */
|
||||
/* VARARGS */
|
||||
|
||||
void
|
||||
#if defined VA_START && __STDC__
|
||||
error (int status, int errnum, const char *message, ...)
|
||||
@@ -142,47 +256,48 @@ error (status, errnum, message, va_alist)
|
||||
va_list args;
|
||||
#endif
|
||||
|
||||
fflush (stdout);
|
||||
#ifdef _LIBC
|
||||
# ifdef USE_IN_LIBIO
|
||||
_IO_flockfile (stderr);
|
||||
# else
|
||||
__flockfile (stderr);
|
||||
# endif
|
||||
#endif
|
||||
if (error_print_progname)
|
||||
(*error_print_progname) ();
|
||||
else
|
||||
{
|
||||
fflush (stdout);
|
||||
fprintf (stderr, "%s: ", program_name);
|
||||
#if _LIBC && USE_IN_LIBIO
|
||||
if (_IO_fwide (stderr, 0) > 0)
|
||||
__fwprintf (stderr, L"%s: ", program_name);
|
||||
else
|
||||
#endif
|
||||
fprintf (stderr, "%s: ", program_name);
|
||||
}
|
||||
|
||||
#ifdef VA_START
|
||||
VA_START (args, message);
|
||||
# if HAVE_VPRINTF || _LIBC
|
||||
vfprintf (stderr, message, args);
|
||||
# else
|
||||
_doprnt (message, args, stderr);
|
||||
# endif
|
||||
va_end (args);
|
||||
error_tail (status, errnum, message, args);
|
||||
#else
|
||||
fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
|
||||
#endif
|
||||
|
||||
++error_message_count;
|
||||
if (errnum)
|
||||
{
|
||||
#if defined HAVE_STRERROR_R || _LIBC
|
||||
char errbuf[1024];
|
||||
# if HAVE_WORKING_STRERROR_R || _LIBC
|
||||
fprintf (stderr, ": %s", __strerror_r (errnum, errbuf, sizeof errbuf));
|
||||
# else
|
||||
/* Don't use __strerror_r's return value because on some systems
|
||||
(at least DEC UNIX 4.0[A-D]) strerror_r returns `int'. */
|
||||
__strerror_r (errnum, errbuf, sizeof errbuf);
|
||||
fprintf (stderr, ": %s", errbuf);
|
||||
# endif
|
||||
#else
|
||||
fprintf (stderr, ": %s", strerror (errnum));
|
||||
#endif
|
||||
}
|
||||
print_errno_message (errnum);
|
||||
putc ('\n', stderr);
|
||||
fflush (stderr);
|
||||
if (status)
|
||||
exit (status);
|
||||
#endif
|
||||
|
||||
#ifdef _LIBC
|
||||
# ifdef USE_IN_LIBIO
|
||||
_IO_funlockfile (stderr);
|
||||
# else
|
||||
__funlockfile (stderr);
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Sometimes we want to have at most one error per line. This
|
||||
@@ -212,8 +327,9 @@ error_at_line (status, errnum, file_name, line_number, message, va_alist)
|
||||
static const char *old_file_name;
|
||||
static unsigned int old_line_number;
|
||||
|
||||
if (old_line_number == line_number &&
|
||||
(file_name == old_file_name || !strcmp (old_file_name, file_name)))
|
||||
if (old_line_number == line_number
|
||||
&& (file_name == old_file_name
|
||||
|| strcmp (old_file_name, file_name) == 0))
|
||||
/* Simply return and print nothing. */
|
||||
return;
|
||||
|
||||
@@ -221,50 +337,58 @@ error_at_line (status, errnum, file_name, line_number, message, va_alist)
|
||||
old_line_number = line_number;
|
||||
}
|
||||
|
||||
fflush (stdout);
|
||||
#ifdef _LIBC
|
||||
# ifdef USE_IN_LIBIO
|
||||
_IO_flockfile (stderr);
|
||||
# else
|
||||
__flockfile (stderr);
|
||||
# endif
|
||||
#endif
|
||||
if (error_print_progname)
|
||||
(*error_print_progname) ();
|
||||
else
|
||||
{
|
||||
fflush (stdout);
|
||||
fprintf (stderr, "%s:", program_name);
|
||||
#if _LIBC && USE_IN_LIBIO
|
||||
if (_IO_fwide (stderr, 0) > 0)
|
||||
__fwprintf (stderr, L"%s: ", program_name);
|
||||
else
|
||||
#endif
|
||||
fprintf (stderr, "%s:", program_name);
|
||||
}
|
||||
|
||||
if (file_name != NULL)
|
||||
fprintf (stderr, "%s:%d: ", file_name, line_number);
|
||||
{
|
||||
#if _LIBC && USE_IN_LIBIO
|
||||
if (_IO_fwide (stderr, 0) > 0)
|
||||
__fwprintf (stderr, L"%s:%d: ", file_name, line_number);
|
||||
else
|
||||
#endif
|
||||
fprintf (stderr, "%s:%d: ", file_name, line_number);
|
||||
}
|
||||
|
||||
#ifdef VA_START
|
||||
VA_START (args, message);
|
||||
# if HAVE_VPRINTF || _LIBC
|
||||
vfprintf (stderr, message, args);
|
||||
# else
|
||||
_doprnt (message, args, stderr);
|
||||
# endif
|
||||
va_end (args);
|
||||
error_tail (status, errnum, message, args);
|
||||
#else
|
||||
fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
|
||||
#endif
|
||||
|
||||
++error_message_count;
|
||||
if (errnum)
|
||||
{
|
||||
#if defined HAVE_STRERROR_R || _LIBC
|
||||
char errbuf[1024];
|
||||
# if HAVE_WORKING_STRERROR_R || _LIBC
|
||||
fprintf (stderr, ": %s", __strerror_r (errnum, errbuf, sizeof errbuf));
|
||||
# else
|
||||
/* Don't use __strerror_r's return value because on some systems
|
||||
(at least DEC UNIX 4.0[A-D]) strerror_r returns `int'. */
|
||||
__strerror_r (errnum, errbuf, sizeof errbuf);
|
||||
fprintf (stderr, ": %s", errbuf);
|
||||
# endif
|
||||
#else
|
||||
fprintf (stderr, ": %s", strerror (errnum));
|
||||
#endif
|
||||
}
|
||||
print_errno_message (errnum);
|
||||
putc ('\n', stderr);
|
||||
fflush (stderr);
|
||||
if (status)
|
||||
exit (status);
|
||||
#endif
|
||||
|
||||
#ifdef _LIBC
|
||||
# ifdef USE_IN_LIBIO
|
||||
_IO_funlockfile (stderr);
|
||||
# else
|
||||
__funlockfile (stderr);
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef _LIBC
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@
|
||||
|
||||
#ifndef __attribute__
|
||||
/* This feature is available in gcc versions 2.5 and later. */
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
|
||||
# define __attribute__(Spec) /* empty */
|
||||
# endif
|
||||
/* The __-protected variants of `format' and `printf' attributes
|
||||
|
||||
+59
-40
@@ -1,23 +1,25 @@
|
||||
/* Getopt for GNU.
|
||||
NOTE: The canonical source of this file is maintained with the GNU
|
||||
C Library. Bugs can be reported to bug-glibc@gnu.org.
|
||||
|
||||
Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99
|
||||
NOTE: getopt is now part of the C library, so if you don't know what
|
||||
"Keep this file name-space clean" means, talk to drepper@gnu.org
|
||||
before changing it!
|
||||
Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
|
||||
Ditto for AIX 3.2 and <stdlib.h>. */
|
||||
@@ -27,13 +29,13 @@
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#else
|
||||
# if !defined __STDC__ || !__STDC__
|
||||
#endif
|
||||
|
||||
#if !defined __STDC__ || !__STDC__
|
||||
/* This is a separate conditional since some stdc systems
|
||||
reject `defined (const)'. */
|
||||
# ifndef const
|
||||
# define const
|
||||
# endif
|
||||
# ifndef const
|
||||
# define const
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -75,11 +77,12 @@
|
||||
#endif
|
||||
|
||||
#ifndef _
|
||||
/* This is for other GNU distributions with internationalized messages.
|
||||
When compiling libc, the _ macro is predefined. */
|
||||
# ifdef HAVE_LIBINTL_H
|
||||
/* This is for other GNU distributions with internationalized messages. */
|
||||
# if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC
|
||||
# include <libintl.h>
|
||||
# define _(msgid) gettext (msgid)
|
||||
# ifndef _
|
||||
# define _(msgid) gettext (msgid)
|
||||
# endif
|
||||
# else
|
||||
# define _(msgid) (msgid)
|
||||
# endif
|
||||
@@ -250,11 +253,13 @@ static int last_nonopt;
|
||||
/* Bash 2.0 gives us an environment variable containing flags
|
||||
indicating ARGV elements that should not be considered arguments. */
|
||||
|
||||
#ifdef USE_NONOPTION_FLAGS
|
||||
/* Defined in getopt_init.c */
|
||||
extern char *__getopt_nonoption_flags;
|
||||
|
||||
static int nonoption_flags_max_len;
|
||||
static int nonoption_flags_len;
|
||||
#endif
|
||||
|
||||
static int original_argc;
|
||||
static char *const *original_argv;
|
||||
@@ -275,13 +280,17 @@ store_args_and_env (int argc, char *const *argv)
|
||||
text_set_element (__libc_subinit, store_args_and_env);
|
||||
# endif /* text_set_element */
|
||||
|
||||
# define SWAP_FLAGS(ch1, ch2) \
|
||||
# ifdef USE_NONOPTION_FLAGS
|
||||
# define SWAP_FLAGS(ch1, ch2) \
|
||||
if (nonoption_flags_len > 0) \
|
||||
{ \
|
||||
char __tmp = __getopt_nonoption_flags[ch1]; \
|
||||
__getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \
|
||||
__getopt_nonoption_flags[ch2] = __tmp; \
|
||||
}
|
||||
# else
|
||||
# define SWAP_FLAGS(ch1, ch2)
|
||||
# endif
|
||||
#else /* !_LIBC */
|
||||
# define SWAP_FLAGS(ch1, ch2)
|
||||
#endif /* _LIBC */
|
||||
@@ -313,7 +322,7 @@ exchange (argv)
|
||||
It leaves the longer segment in the right place overall,
|
||||
but it consists of two parts that need to be swapped next. */
|
||||
|
||||
#ifdef _LIBC
|
||||
#if defined _LIBC && defined USE_NONOPTION_FLAGS
|
||||
/* First make sure the handling of the `__getopt_nonoption_flags'
|
||||
string can work normally. Our top argument must be in the range
|
||||
of the string. */
|
||||
@@ -417,7 +426,7 @@ _getopt_initialize (argc, argv, optstring)
|
||||
else
|
||||
ordering = PERMUTE;
|
||||
|
||||
#ifdef _LIBC
|
||||
#if defined _LIBC && defined USE_NONOPTION_FLAGS
|
||||
if (posixly_correct == NULL
|
||||
&& argc == original_argc && argv == original_argv)
|
||||
{
|
||||
@@ -515,6 +524,13 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
int *longind;
|
||||
int long_only;
|
||||
{
|
||||
int print_errors = opterr;
|
||||
if (optstring[0] == ':')
|
||||
print_errors = 0;
|
||||
|
||||
if (argc < 1)
|
||||
return -1;
|
||||
|
||||
optarg = NULL;
|
||||
|
||||
if (optind == 0 || !__getopt_initialized)
|
||||
@@ -529,7 +545,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
Either it does not have option syntax, or there is an environment flag
|
||||
from the shell indicating it is not an option. The later information
|
||||
is only used when the used in the GNU libc. */
|
||||
#ifdef _LIBC
|
||||
#if defined _LIBC && defined USE_NONOPTION_FLAGS
|
||||
# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \
|
||||
|| (optind < nonoption_flags_len \
|
||||
&& __getopt_nonoption_flags[optind] == '1'))
|
||||
@@ -664,14 +680,17 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
pfound = p;
|
||||
indfound = option_index;
|
||||
}
|
||||
else
|
||||
else if (long_only
|
||||
|| pfound->has_arg != p->has_arg
|
||||
|| pfound->flag != p->flag
|
||||
|| pfound->val != p->val)
|
||||
/* Second or later nonexact match found. */
|
||||
ambig = 1;
|
||||
}
|
||||
|
||||
if (ambig && !exact)
|
||||
{
|
||||
if (opterr)
|
||||
if (print_errors)
|
||||
fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
|
||||
argv[0], argv[optind]);
|
||||
nextchar += strlen (nextchar);
|
||||
@@ -692,7 +711,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
optarg = nameend + 1;
|
||||
else
|
||||
{
|
||||
if (opterr)
|
||||
if (print_errors)
|
||||
{
|
||||
if (argv[optind - 1][1] == '-')
|
||||
/* --option */
|
||||
@@ -718,7 +737,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
optarg = argv[optind++];
|
||||
else
|
||||
{
|
||||
if (opterr)
|
||||
if (print_errors)
|
||||
fprintf (stderr,
|
||||
_("%s: option `%s' requires an argument\n"),
|
||||
argv[0], argv[optind - 1]);
|
||||
@@ -745,7 +764,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
if (!long_only || argv[optind][1] == '-'
|
||||
|| my_index (optstring, *nextchar) == NULL)
|
||||
{
|
||||
if (opterr)
|
||||
if (print_errors)
|
||||
{
|
||||
if (argv[optind][1] == '-')
|
||||
/* --option */
|
||||
@@ -775,7 +794,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
|
||||
if (temp == NULL || c == ':')
|
||||
{
|
||||
if (opterr)
|
||||
if (print_errors)
|
||||
{
|
||||
if (posixly_correct)
|
||||
/* 1003.2 specifies the format of this message. */
|
||||
@@ -809,7 +828,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
}
|
||||
else if (optind == argc)
|
||||
{
|
||||
if (opterr)
|
||||
if (print_errors)
|
||||
{
|
||||
/* 1003.2 specifies the format of this message. */
|
||||
fprintf (stderr, _("%s: option requires an argument -- %c\n"),
|
||||
@@ -858,7 +877,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
}
|
||||
if (ambig && !exact)
|
||||
{
|
||||
if (opterr)
|
||||
if (print_errors)
|
||||
fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
|
||||
argv[0], argv[optind]);
|
||||
nextchar += strlen (nextchar);
|
||||
@@ -876,7 +895,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
optarg = nameend + 1;
|
||||
else
|
||||
{
|
||||
if (opterr)
|
||||
if (print_errors)
|
||||
fprintf (stderr, _("\
|
||||
%s: option `-W %s' doesn't allow an argument\n"),
|
||||
argv[0], pfound->name);
|
||||
@@ -891,7 +910,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
optarg = argv[optind++];
|
||||
else
|
||||
{
|
||||
if (opterr)
|
||||
if (print_errors)
|
||||
fprintf (stderr,
|
||||
_("%s: option `%s' requires an argument\n"),
|
||||
argv[0], argv[optind - 1]);
|
||||
@@ -938,12 +957,12 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
}
|
||||
else if (optind == argc)
|
||||
{
|
||||
if (opterr)
|
||||
if (print_errors)
|
||||
{
|
||||
/* 1003.2 specifies the format of this message. */
|
||||
fprintf (stderr,
|
||||
_("%s: option requires an argument -- %c\n"),
|
||||
argv[0], c);
|
||||
_("%s: option requires an argument -- %c\n"),
|
||||
argv[0], c);
|
||||
}
|
||||
optopt = c;
|
||||
if (optstring[0] == ':')
|
||||
|
||||
+27
-16
@@ -1,21 +1,21 @@
|
||||
/* Declarations for getopt.
|
||||
Copyright (C) 1989,90,91,92,93,94,96,97,98 Free Software Foundation, Inc.
|
||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||
Bugs can be reported to [email protected].
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
Copyright (C) 1989-1994, 1996-1999, 2001 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA. */
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#ifndef _GETOPT_H
|
||||
|
||||
@@ -23,6 +23,17 @@
|
||||
# define _GETOPT_H 1
|
||||
#endif
|
||||
|
||||
/* If __GNU_LIBRARY__ is not already defined, either we are being used
|
||||
standalone, or this is the first header included in the source file.
|
||||
If we are being used with glibc, we need to include <features.h>, but
|
||||
that does not exist if we are standalone. So: if __GNU_LIBRARY__ is
|
||||
not defined, include <ctype.h>, which will pull in <features.h> for us
|
||||
if it's from glibc. (Why ctype.h? It's guaranteed to exist and it
|
||||
doesn't flood the namespace with stuff the way some other headers do.) */
|
||||
#if !defined __GNU_LIBRARY__
|
||||
# include <ctype.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -82,7 +93,7 @@ extern int optopt;
|
||||
|
||||
struct option
|
||||
{
|
||||
# if defined __STDC__ && __STDC__
|
||||
# if (defined __STDC__ && __STDC__) || defined __cplusplus
|
||||
const char *name;
|
||||
# else
|
||||
char *name;
|
||||
@@ -126,7 +137,7 @@ struct option
|
||||
arguments to the option '\0'. This behavior is specific to the GNU
|
||||
`getopt'. */
|
||||
|
||||
#if defined __STDC__ && __STDC__
|
||||
#if (defined __STDC__ && __STDC__) || defined __cplusplus
|
||||
# ifdef __GNU_LIBRARY__
|
||||
/* Many other libraries have conflicting prototypes for getopt, with
|
||||
differences in the consts, in stdlib.h. To avoid compilation
|
||||
|
||||
+16
-16
@@ -1,26 +1,29 @@
|
||||
/* getopt_long and getopt_long_only entry points for GNU getopt.
|
||||
Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98
|
||||
Free Software Foundation, Inc.
|
||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||
Bugs can be reported to [email protected].
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#else
|
||||
#endif
|
||||
|
||||
#include "getopt.h"
|
||||
|
||||
#if !defined __STDC__ || !__STDC__
|
||||
/* This is a separate conditional since some stdc systems
|
||||
reject `defined (const)'. */
|
||||
@@ -28,9 +31,6 @@
|
||||
#define const
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "getopt.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
+209
@@ -0,0 +1,209 @@
|
||||
/* memrchr -- find the last occurrence of a byte in a memory block
|
||||
Copyright (C) 1991, 93, 96, 97, 99, 2000 Free Software Foundation, Inc.
|
||||
Based on strlen implementation by Torbjorn Granlund ([email protected]),
|
||||
with help from Dan Sahlin ([email protected]) and
|
||||
commentary by Jim Blandy ([email protected]);
|
||||
adaptation to memchr suggested by Dick Karpinski ([email protected]),
|
||||
and implemented by Roland McGrath ([email protected]).
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#undef __ptr_t
|
||||
#if defined (__cplusplus) || (defined (__STDC__) && __STDC__)
|
||||
# define __ptr_t void *
|
||||
#else /* Not C++ or ANSI C. */
|
||||
# define __ptr_t char *
|
||||
#endif /* C++ or ANSI C. */
|
||||
|
||||
#if defined (_LIBC)
|
||||
# include <string.h>
|
||||
# include <memcopy.h>
|
||||
#else
|
||||
# define reg_char char
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_LIMITS_H) || defined (_LIBC)
|
||||
# include <limits.h>
|
||||
#endif
|
||||
|
||||
#define LONG_MAX_32_BITS 2147483647
|
||||
|
||||
#ifndef LONG_MAX
|
||||
# define LONG_MAX LONG_MAX_32_BITS
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#undef __memrchr
|
||||
#undef memrchr
|
||||
|
||||
#ifndef weak_alias
|
||||
# define __memrchr memrchr
|
||||
#endif
|
||||
|
||||
/* Search no more than N bytes of S for C. */
|
||||
__ptr_t
|
||||
__memrchr (s, c_in, n)
|
||||
const __ptr_t s;
|
||||
int c_in;
|
||||
size_t n;
|
||||
{
|
||||
const unsigned char *char_ptr;
|
||||
const unsigned long int *longword_ptr;
|
||||
unsigned long int longword, magic_bits, charmask;
|
||||
unsigned reg_char c;
|
||||
|
||||
c = (unsigned char) c_in;
|
||||
|
||||
/* Handle the last few characters by reading one character at a time.
|
||||
Do this until CHAR_PTR is aligned on a longword boundary. */
|
||||
for (char_ptr = (const unsigned char *) s + n;
|
||||
n > 0 && ((unsigned long int) char_ptr
|
||||
& (sizeof (longword) - 1)) != 0;
|
||||
--n)
|
||||
if (*--char_ptr == c)
|
||||
return (__ptr_t) char_ptr;
|
||||
|
||||
/* All these elucidatory comments refer to 4-byte longwords,
|
||||
but the theory applies equally well to 8-byte longwords. */
|
||||
|
||||
longword_ptr = (unsigned long int *) char_ptr;
|
||||
|
||||
/* Bits 31, 24, 16, and 8 of this number are zero. Call these bits
|
||||
the "holes." Note that there is a hole just to the left of
|
||||
each byte, with an extra at the end:
|
||||
|
||||
bits: 01111110 11111110 11111110 11111111
|
||||
bytes: AAAAAAAA BBBBBBBB CCCCCCCC DDDDDDDD
|
||||
|
||||
The 1-bits make sure that carries propagate to the next 0-bit.
|
||||
The 0-bits provide holes for carries to fall into. */
|
||||
|
||||
if (sizeof (longword) != 4 && sizeof (longword) != 8)
|
||||
abort ();
|
||||
|
||||
#if LONG_MAX <= LONG_MAX_32_BITS
|
||||
magic_bits = 0x7efefeff;
|
||||
#else
|
||||
magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff;
|
||||
#endif
|
||||
|
||||
/* Set up a longword, each of whose bytes is C. */
|
||||
charmask = c | (c << 8);
|
||||
charmask |= charmask << 16;
|
||||
#if LONG_MAX > LONG_MAX_32_BITS
|
||||
charmask |= charmask << 32;
|
||||
#endif
|
||||
|
||||
/* Instead of the traditional loop which tests each character,
|
||||
we will test a longword at a time. The tricky part is testing
|
||||
if *any of the four* bytes in the longword in question are zero. */
|
||||
while (n >= sizeof (longword))
|
||||
{
|
||||
/* We tentatively exit the loop if adding MAGIC_BITS to
|
||||
LONGWORD fails to change any of the hole bits of LONGWORD.
|
||||
|
||||
1) Is this safe? Will it catch all the zero bytes?
|
||||
Suppose there is a byte with all zeros. Any carry bits
|
||||
propagating from its left will fall into the hole at its
|
||||
least significant bit and stop. Since there will be no
|
||||
carry from its most significant bit, the LSB of the
|
||||
byte to the left will be unchanged, and the zero will be
|
||||
detected.
|
||||
|
||||
2) Is this worthwhile? Will it ignore everything except
|
||||
zero bytes? Suppose every byte of LONGWORD has a bit set
|
||||
somewhere. There will be a carry into bit 8. If bit 8
|
||||
is set, this will carry into bit 16. If bit 8 is clear,
|
||||
one of bits 9-15 must be set, so there will be a carry
|
||||
into bit 16. Similarly, there will be a carry into bit
|
||||
24. If one of bits 24-30 is set, there will be a carry
|
||||
into bit 31, so all of the hole bits will be changed.
|
||||
|
||||
The one misfire occurs when bits 24-30 are clear and bit
|
||||
31 is set; in this case, the hole at bit 31 is not
|
||||
changed. If we had access to the processor carry flag,
|
||||
we could close this loophole by putting the fourth hole
|
||||
at bit 32!
|
||||
|
||||
So it ignores everything except 128's, when they're aligned
|
||||
properly.
|
||||
|
||||
3) But wait! Aren't we looking for C, not zero?
|
||||
Good point. So what we do is XOR LONGWORD with a longword,
|
||||
each of whose bytes is C. This turns each byte that is C
|
||||
into a zero. */
|
||||
|
||||
longword = *--longword_ptr ^ charmask;
|
||||
|
||||
/* Add MAGIC_BITS to LONGWORD. */
|
||||
if ((((longword + magic_bits)
|
||||
|
||||
/* Set those bits that were unchanged by the addition. */
|
||||
^ ~longword)
|
||||
|
||||
/* Look at only the hole bits. If any of the hole bits
|
||||
are unchanged, most likely one of the bytes was a
|
||||
zero. */
|
||||
& ~magic_bits) != 0)
|
||||
{
|
||||
/* Which of the bytes was C? If none of them were, it was
|
||||
a misfire; continue the search. */
|
||||
|
||||
const unsigned char *cp = (const unsigned char *) longword_ptr;
|
||||
|
||||
#if LONG_MAX > 2147483647
|
||||
if (cp[7] == c)
|
||||
return (__ptr_t) &cp[7];
|
||||
if (cp[6] == c)
|
||||
return (__ptr_t) &cp[6];
|
||||
if (cp[5] == c)
|
||||
return (__ptr_t) &cp[5];
|
||||
if (cp[4] == c)
|
||||
return (__ptr_t) &cp[4];
|
||||
#endif
|
||||
if (cp[3] == c)
|
||||
return (__ptr_t) &cp[3];
|
||||
if (cp[2] == c)
|
||||
return (__ptr_t) &cp[2];
|
||||
if (cp[1] == c)
|
||||
return (__ptr_t) &cp[1];
|
||||
if (cp[0] == c)
|
||||
return (__ptr_t) cp;
|
||||
}
|
||||
|
||||
n -= sizeof (longword);
|
||||
}
|
||||
|
||||
char_ptr = (const unsigned char *) longword_ptr;
|
||||
|
||||
while (n-- > 0)
|
||||
{
|
||||
if (*--char_ptr == c)
|
||||
return (__ptr_t) char_ptr;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#ifdef weak_alias
|
||||
weak_alias (__memrchr, memrchr)
|
||||
#endif
|
||||
+94
-75
@@ -1,26 +1,25 @@
|
||||
/* obstack.c - subroutines used implicitly by object stack macros
|
||||
Copyright (C) 1988-1994,96,97,98,99,2000 Free Software Foundation, Inc.
|
||||
|
||||
Copyright (C) 1988-1994,96,97,98,99,2000,2001 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library. Its master source is NOT part of
|
||||
the C library, however. The master source lives in /gd/gnu/lib.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "obstack.h"
|
||||
@@ -40,40 +39,43 @@
|
||||
files, it is simpler to just do this in the source for each such file. */
|
||||
|
||||
#include <stdio.h> /* Random thing to get __GNU_LIBRARY__. */
|
||||
#if !defined (_LIBC) && defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1
|
||||
#include <gnu-versions.h>
|
||||
#if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION
|
||||
#define ELIDE_CODE
|
||||
#endif
|
||||
#if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
|
||||
# include <gnu-versions.h>
|
||||
# if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION
|
||||
# define ELIDE_CODE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined _LIBC && defined USE_IN_LIBIO
|
||||
# include <wchar.h>
|
||||
#endif
|
||||
|
||||
#ifndef ELIDE_CODE
|
||||
|
||||
|
||||
#if defined (__STDC__) && __STDC__
|
||||
#define POINTER void *
|
||||
#else
|
||||
#define POINTER char *
|
||||
#endif
|
||||
# if defined __STDC__ && __STDC__
|
||||
# define POINTER void *
|
||||
# else
|
||||
# define POINTER char *
|
||||
# endif
|
||||
|
||||
/* Determine default alignment. */
|
||||
struct fooalign {char x; double d;};
|
||||
#define DEFAULT_ALIGNMENT \
|
||||
# define DEFAULT_ALIGNMENT \
|
||||
((PTR_INT_TYPE) ((char *) &((struct fooalign *) 0)->d - (char *) 0))
|
||||
/* If malloc were really smart, it would round addresses to DEFAULT_ALIGNMENT.
|
||||
But in fact it might be less smart and round addresses to as much as
|
||||
DEFAULT_ROUNDING. So we prepare for it to do that. */
|
||||
union fooround {long x; double d;};
|
||||
#define DEFAULT_ROUNDING (sizeof (union fooround))
|
||||
# define DEFAULT_ROUNDING (sizeof (union fooround))
|
||||
|
||||
/* When we copy a long block of data, this is the unit to do it with.
|
||||
On some machines, copying successive ints does not work;
|
||||
in such a case, redefine COPYING_UNIT to `long' (if that works)
|
||||
or `char' as a last resort. */
|
||||
#ifndef COPYING_UNIT
|
||||
#define COPYING_UNIT int
|
||||
#endif
|
||||
# ifndef COPYING_UNIT
|
||||
# define COPYING_UNIT int
|
||||
# endif
|
||||
|
||||
|
||||
/* The functions allocating more room by calling `obstack_chunk_alloc'
|
||||
@@ -82,21 +84,21 @@ union fooround {long x; double d;};
|
||||
abort gracefully or use longjump - but shouldn't return. This
|
||||
variable by default points to the internal function
|
||||
`print_and_abort'. */
|
||||
#if defined (__STDC__) && __STDC__
|
||||
# if defined __STDC__ && __STDC__
|
||||
static void print_and_abort (void);
|
||||
void (*obstack_alloc_failed_handler) (void) = print_and_abort;
|
||||
#else
|
||||
# else
|
||||
static void print_and_abort ();
|
||||
void (*obstack_alloc_failed_handler) () = print_and_abort;
|
||||
#endif
|
||||
# endif
|
||||
|
||||
/* Exit value used when `print_and_abort' is used. */
|
||||
#if defined __GNU_LIBRARY__ || defined HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#ifndef EXIT_FAILURE
|
||||
#define EXIT_FAILURE 1
|
||||
#endif
|
||||
# if defined __GNU_LIBRARY__ || defined HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
# endif
|
||||
# ifndef EXIT_FAILURE
|
||||
# define EXIT_FAILURE 1
|
||||
# endif
|
||||
int obstack_exit_failure = EXIT_FAILURE;
|
||||
|
||||
/* The non-GNU-C macros copy the obstack into this global variable
|
||||
@@ -110,33 +112,33 @@ struct obstack *_obstack;
|
||||
For free, do not use ?:, since some compilers, like the MIPS compilers,
|
||||
do not allow (expr) ? void : void. */
|
||||
|
||||
#if defined (__STDC__) && __STDC__
|
||||
#define CALL_CHUNKFUN(h, size) \
|
||||
# if defined __STDC__ && __STDC__
|
||||
# define CALL_CHUNKFUN(h, size) \
|
||||
(((h) -> use_extra_arg) \
|
||||
? (*(h)->chunkfun) ((h)->extra_arg, (size)) \
|
||||
: (*(struct _obstack_chunk *(*) (long)) (h)->chunkfun) ((size)))
|
||||
|
||||
#define CALL_FREEFUN(h, old_chunk) \
|
||||
# define CALL_FREEFUN(h, old_chunk) \
|
||||
do { \
|
||||
if ((h) -> use_extra_arg) \
|
||||
(*(h)->freefun) ((h)->extra_arg, (old_chunk)); \
|
||||
else \
|
||||
(*(void (*) (void *)) (h)->freefun) ((old_chunk)); \
|
||||
} while (0)
|
||||
#else
|
||||
#define CALL_CHUNKFUN(h, size) \
|
||||
# else
|
||||
# define CALL_CHUNKFUN(h, size) \
|
||||
(((h) -> use_extra_arg) \
|
||||
? (*(h)->chunkfun) ((h)->extra_arg, (size)) \
|
||||
: (*(struct _obstack_chunk *(*) ()) (h)->chunkfun) ((size)))
|
||||
|
||||
#define CALL_FREEFUN(h, old_chunk) \
|
||||
# define CALL_FREEFUN(h, old_chunk) \
|
||||
do { \
|
||||
if ((h) -> use_extra_arg) \
|
||||
(*(h)->freefun) ((h)->extra_arg, (old_chunk)); \
|
||||
else \
|
||||
(*(void (*) ()) (h)->freefun) ((old_chunk)); \
|
||||
} while (0)
|
||||
#endif
|
||||
# endif
|
||||
|
||||
|
||||
/* Initialize an obstack H for use. Specify chunk size SIZE (0 means default).
|
||||
@@ -152,13 +154,13 @@ _obstack_begin (h, size, alignment, chunkfun, freefun)
|
||||
struct obstack *h;
|
||||
int size;
|
||||
int alignment;
|
||||
#if defined (__STDC__) && __STDC__
|
||||
# if defined __STDC__ && __STDC__
|
||||
POINTER (*chunkfun) (long);
|
||||
void (*freefun) (void *);
|
||||
#else
|
||||
# else
|
||||
POINTER (*chunkfun) ();
|
||||
void (*freefun) ();
|
||||
#endif
|
||||
# endif
|
||||
{
|
||||
register struct _obstack_chunk *chunk; /* points to new chunk */
|
||||
|
||||
@@ -181,13 +183,13 @@ _obstack_begin (h, size, alignment, chunkfun, freefun)
|
||||
size = 4096 - extra;
|
||||
}
|
||||
|
||||
#if defined (__STDC__) && __STDC__
|
||||
# if defined __STDC__ && __STDC__
|
||||
h->chunkfun = (struct _obstack_chunk * (*)(void *, long)) chunkfun;
|
||||
h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
|
||||
#else
|
||||
# else
|
||||
h->chunkfun = (struct _obstack_chunk * (*)()) chunkfun;
|
||||
h->freefun = freefun;
|
||||
#endif
|
||||
# endif
|
||||
h->chunk_size = size;
|
||||
h->alignment_mask = alignment - 1;
|
||||
h->use_extra_arg = 0;
|
||||
@@ -210,13 +212,13 @@ _obstack_begin_1 (h, size, alignment, chunkfun, freefun, arg)
|
||||
struct obstack *h;
|
||||
int size;
|
||||
int alignment;
|
||||
#if defined (__STDC__) && __STDC__
|
||||
# if defined __STDC__ && __STDC__
|
||||
POINTER (*chunkfun) (POINTER, long);
|
||||
void (*freefun) (POINTER, POINTER);
|
||||
#else
|
||||
# else
|
||||
POINTER (*chunkfun) ();
|
||||
void (*freefun) ();
|
||||
#endif
|
||||
# endif
|
||||
POINTER arg;
|
||||
{
|
||||
register struct _obstack_chunk *chunk; /* points to new chunk */
|
||||
@@ -240,13 +242,13 @@ _obstack_begin_1 (h, size, alignment, chunkfun, freefun, arg)
|
||||
size = 4096 - extra;
|
||||
}
|
||||
|
||||
#if defined(__STDC__) && __STDC__
|
||||
# if defined __STDC__ && __STDC__
|
||||
h->chunkfun = (struct _obstack_chunk * (*)(void *,long)) chunkfun;
|
||||
h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
|
||||
#else
|
||||
# else
|
||||
h->chunkfun = (struct _obstack_chunk * (*)()) chunkfun;
|
||||
h->freefun = freefun;
|
||||
#endif
|
||||
# endif
|
||||
h->chunk_size = size;
|
||||
h->alignment_mask = alignment - 1;
|
||||
h->extra_arg = arg;
|
||||
@@ -341,11 +343,11 @@ _obstack_newchunk (h, length)
|
||||
This is here for debugging.
|
||||
If you use it in a program, you are probably losing. */
|
||||
|
||||
#if defined (__STDC__) && __STDC__
|
||||
# if defined __STDC__ && __STDC__
|
||||
/* Suppress -Wmissing-prototypes warning. We don't want to declare this in
|
||||
obstack.h because it is just for debugging. */
|
||||
int _obstack_allocated_p (struct obstack *h, POINTER obj);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
int
|
||||
_obstack_allocated_p (h, obj)
|
||||
@@ -370,7 +372,7 @@ _obstack_allocated_p (h, obj)
|
||||
/* Free objects in obstack H, including OBJ and everything allocate
|
||||
more recently than OBJ. If OBJ is zero, free everything in H. */
|
||||
|
||||
#undef obstack_free
|
||||
# undef obstack_free
|
||||
|
||||
/* This function has two names with identical definitions.
|
||||
This is the first one, called from non-ANSI code. */
|
||||
@@ -456,37 +458,54 @@ _obstack_memory_used (h)
|
||||
}
|
||||
|
||||
/* Define the error handler. */
|
||||
#ifndef _
|
||||
# if defined HAVE_LIBINTL_H || defined _LIBC
|
||||
# include <libintl.h>
|
||||
# ifndef _
|
||||
# define _(Str) gettext (Str)
|
||||
# ifndef _
|
||||
# if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC
|
||||
# include <libintl.h>
|
||||
# ifndef _
|
||||
# define _(Str) gettext (Str)
|
||||
# endif
|
||||
# else
|
||||
# define _(Str) (Str)
|
||||
# endif
|
||||
# endif
|
||||
# if defined _LIBC && defined USE_IN_LIBIO
|
||||
# include <libio/iolibio.h>
|
||||
# define fputs(s, f) _IO_fputs (s, f)
|
||||
# endif
|
||||
|
||||
# ifndef __attribute__
|
||||
/* This feature is available in gcc versions 2.5 and later. */
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
|
||||
# define __attribute__(Spec) /* empty */
|
||||
# endif
|
||||
# else
|
||||
# define _(Str) (Str)
|
||||
# endif
|
||||
#endif
|
||||
#if defined _LIBC && defined USE_IN_LIBIO
|
||||
# include <libio/iolibio.h>
|
||||
# define fputs(s, f) _IO_fputs (s, f)
|
||||
#endif
|
||||
|
||||
static void
|
||||
__attribute__ ((noreturn))
|
||||
print_and_abort ()
|
||||
{
|
||||
fputs (_("memory exhausted"), stderr);
|
||||
fputc ('\n', stderr);
|
||||
/* Don't change any of these strings. Yes, it would be possible to add
|
||||
the newline to the string and use fputs or so. But this must not
|
||||
happen because the "memory exhausted" message appears in other places
|
||||
like this and the translation should be reused instead of creating
|
||||
a very similar string which requires a separate translation. */
|
||||
# if defined _LIBC && defined USE_IN_LIBIO
|
||||
if (_IO_fwide (stderr, 0) > 0)
|
||||
__fwprintf (stderr, L"%s\n", _("memory exhausted"));
|
||||
else
|
||||
# endif
|
||||
fprintf (stderr, "%s\n", _("memory exhausted"));
|
||||
exit (obstack_exit_failure);
|
||||
}
|
||||
|
||||
#if 0
|
||||
# if 0
|
||||
/* These are now turned off because the applications do not use it
|
||||
and it uses bcopy via obstack_grow, which causes trouble on sysV. */
|
||||
|
||||
/* Now define the functional versions of the obstack macros.
|
||||
Define them to simply use the corresponding macros to do the job. */
|
||||
|
||||
#if defined (__STDC__) && __STDC__
|
||||
# if defined __STDC__ && __STDC__
|
||||
/* These function definitions do not work with non-ANSI preprocessors;
|
||||
they won't pass through the macro names in parentheses. */
|
||||
|
||||
@@ -597,8 +616,8 @@ POINTER (obstack_copy0) (obstack, address, length)
|
||||
return obstack_copy0 (obstack, address, length);
|
||||
}
|
||||
|
||||
#endif /* __STDC__ */
|
||||
# endif /* __STDC__ */
|
||||
|
||||
#endif /* 0 */
|
||||
# endif /* 0 */
|
||||
|
||||
#endif /* !ELIDE_CODE */
|
||||
|
||||
+11
-8
@@ -4,20 +4,23 @@
|
||||
This file is part of the GNU C Library. Its master source is NOT part of
|
||||
the C library, however. The master source lives in /gd/gnu/lib.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||
Bugs can be reported to [email protected].
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA. */
|
||||
|
||||
/* Summary:
|
||||
|
||||
|
||||
+22
-2
@@ -1,12 +1,32 @@
|
||||
/* quote.c - quote arguments for output
|
||||
Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Written by Paul Eggert <[email protected]> */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_STDDEF_H
|
||||
# include <stddef.h> /* For the definition of size_t on windows w/MSVC. */
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <quotearg.h>
|
||||
#include <quote.h>
|
||||
#include "quotearg.h"
|
||||
#include "quote.h"
|
||||
|
||||
/* Return an unambiguous printable representated, allocated in slot N,
|
||||
for NAME, suitable for diagnostics. */
|
||||
|
||||
+17
-1
@@ -1,4 +1,20 @@
|
||||
/* prototypes for quote.c */
|
||||
/* quote.h - prototypes for quote.c
|
||||
Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
#ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
|
||||
+25
-12
@@ -25,8 +25,8 @@
|
||||
# include <stddef.h> /* For the definition of size_t on windows w/MSVC. */
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <quotearg.h>
|
||||
#include <xalloc.h>
|
||||
#include "quotearg.h"
|
||||
#include "xalloc.h"
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
@@ -44,9 +44,15 @@
|
||||
#ifndef CHAR_BIT
|
||||
# define CHAR_BIT 8
|
||||
#endif
|
||||
#ifndef SIZE_MAX
|
||||
# define SIZE_MAX ((size_t) -1)
|
||||
#endif
|
||||
#ifndef UCHAR_MAX
|
||||
# define UCHAR_MAX ((unsigned char) -1)
|
||||
#endif
|
||||
#ifndef UINT_MAX
|
||||
# define UINT_MAX ((unsigned int) -1)
|
||||
#endif
|
||||
|
||||
#if HAVE_C_BACKSLASH_A
|
||||
# define ALERT_CHAR '\a'
|
||||
@@ -539,6 +545,7 @@ quotearg_n_options (int n, char const *arg,
|
||||
one small component of a "memory exhausted" message in slot 0. */
|
||||
static char slot0[256];
|
||||
static unsigned int nslots = 1;
|
||||
unsigned int n0 = n;
|
||||
struct slotvec
|
||||
{
|
||||
size_t size;
|
||||
@@ -547,20 +554,26 @@ quotearg_n_options (int n, char const *arg,
|
||||
static struct slotvec slotvec0 = {sizeof slot0, slot0};
|
||||
static struct slotvec *slotvec = &slotvec0;
|
||||
|
||||
if (nslots <= n)
|
||||
if (n < 0)
|
||||
abort ();
|
||||
|
||||
if (nslots <= n0)
|
||||
{
|
||||
int n1 = n + 1;
|
||||
size_t s = n1 * sizeof (struct slotvec);
|
||||
if (! (0 < n1 && n1 == s / sizeof (struct slotvec)))
|
||||
abort ();
|
||||
unsigned int n1 = n0 + 1;
|
||||
size_t s = n1 * sizeof *slotvec;
|
||||
|
||||
if (SIZE_MAX / UINT_MAX <= sizeof *slotvec
|
||||
&& n1 != s / sizeof *slotvec)
|
||||
xalloc_die ();
|
||||
|
||||
if (slotvec == &slotvec0)
|
||||
{
|
||||
slotvec = (struct slotvec *) xmalloc (sizeof (struct slotvec));
|
||||
slotvec = (struct slotvec *) xmalloc (sizeof *slotvec);
|
||||
*slotvec = slotvec0;
|
||||
}
|
||||
slotvec = (struct slotvec *) xrealloc (slotvec, s);
|
||||
memset (slotvec + nslots, 0, (n1 - nslots) * sizeof (struct slotvec));
|
||||
nslots = n;
|
||||
memset (slotvec + nslots, 0, (n1 - nslots) * sizeof *slotvec);
|
||||
nslots = n1;
|
||||
}
|
||||
|
||||
{
|
||||
@@ -580,7 +593,7 @@ quotearg_n_options (int n, char const *arg,
|
||||
}
|
||||
|
||||
char *
|
||||
quotearg_n (unsigned int n, char const *arg)
|
||||
quotearg_n (int n, char const *arg)
|
||||
{
|
||||
return quotearg_n_options (n, arg, &default_quoting_options);
|
||||
}
|
||||
@@ -592,7 +605,7 @@ quotearg (char const *arg)
|
||||
}
|
||||
|
||||
char *
|
||||
quotearg_n_style (unsigned int n, enum quoting_style s, char const *arg)
|
||||
quotearg_n_style (int n, enum quoting_style s, char const *arg)
|
||||
{
|
||||
struct quoting_options o;
|
||||
o.style = s;
|
||||
|
||||
+2
-3
@@ -89,7 +89,7 @@ size_t quotearg_buffer PARAMS ((char *buffer, size_t buffersize,
|
||||
The returned value points to static storage that can be
|
||||
reused by the next call to this function with the same value of N.
|
||||
N must be nonnegative. */
|
||||
char *quotearg_n PARAMS ((unsigned int n, char const *arg));
|
||||
char *quotearg_n PARAMS ((int n, char const *arg));
|
||||
|
||||
/* Equivalent to quotearg_n (0, ARG). */
|
||||
char *quotearg PARAMS ((char const *arg));
|
||||
@@ -97,8 +97,7 @@ char *quotearg PARAMS ((char const *arg));
|
||||
/* Use style S and storage slot N to return a quoted version of the string ARG.
|
||||
This is like quotearg_n (N, ARG), except that it uses S with no other
|
||||
options to specify the quoting method. */
|
||||
char *quotearg_n_style PARAMS ((unsigned int n, enum quoting_style s,
|
||||
char const *arg));
|
||||
char *quotearg_n_style PARAMS ((int n, enum quoting_style s, char const *arg));
|
||||
|
||||
/* Equivalent to quotearg_n_style (0, S, ARG). */
|
||||
char *quotearg_style PARAMS ((enum quoting_style s, char const *arg));
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/* Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License
|
||||
as published by the Free Software Foundation; either version 2 of
|
||||
the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place -
|
||||
Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#else
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
char *
|
||||
strchr (const char *s, int c)
|
||||
{
|
||||
return index (s, c);
|
||||
}
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/* Find the length of STRING, but scan at most MAXLEN characters.
|
||||
Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -51,7 +51,7 @@ size_t
|
||||
__strnlen (const char *string, size_t maxlen)
|
||||
{
|
||||
const char *end = memchr (string, '\0', maxlen);
|
||||
return end ? end - string : maxlen;
|
||||
return end ? (size_t) (end - string) : maxlen;
|
||||
}
|
||||
#ifdef weak_alias
|
||||
weak_alias (__strnlen, strnlen)
|
||||
|
||||
+2
-2
@@ -47,11 +47,11 @@ void free ();
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DONE_WORKING_MALLOC_CHECK
|
||||
you must run the autoconf test for a properly working malloc -- see malloc.m4
|
||||
"you must run the autoconf test for a properly working malloc -- see malloc.m4"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DONE_WORKING_REALLOC_CHECK
|
||||
you must run the autoconf test for a properly working realloc -- see realloc.m4
|
||||
"you must run the autoconf test for a properly working realloc --see realloc.m4"
|
||||
#endif
|
||||
|
||||
/* Exit value when the requested amount of memory is not available.
|
||||
|
||||
+2
-10
@@ -1,5 +1,5 @@
|
||||
/* xstrdup.c -- copy a string with out of memory checking
|
||||
Copyright (C) 1990, 1996, 1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990, 1996, 1998, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -19,14 +19,6 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if STDC_HEADERS || HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#else
|
||||
@@ -35,7 +27,7 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
char *xmalloc PARAMS ((size_t n));
|
||||
#include "xalloc.h"
|
||||
|
||||
/* Return a newly allocated copy of STRING. */
|
||||
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
/* Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
|
||||
|
||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
|
||||
/* Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
@@ -17,20 +14,20 @@
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#if defined _LIBC || defined STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
#if STDC_HEADERS || HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#else
|
||||
char *malloc ();
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "xalloc.h"
|
||||
|
||||
#ifndef HAVE_DECL_STRNLEN
|
||||
"this configure-time declaration test was not run"
|
||||
#endif
|
||||
@@ -38,18 +35,13 @@ char *malloc ();
|
||||
size_t strnlen ();
|
||||
#endif
|
||||
|
||||
#undef __strndup
|
||||
#undef strndup
|
||||
|
||||
#ifndef weak_alias
|
||||
# define __strndup strndup
|
||||
#endif
|
||||
char *xstrndup (const char *s, size_t n);
|
||||
|
||||
char *
|
||||
__strndup (const char *s, size_t n)
|
||||
xstrndup (const char *s, size_t n)
|
||||
{
|
||||
size_t len = strnlen (s, n);
|
||||
char *new = malloc (len + 1);
|
||||
char *new = xmalloc (len + 1);
|
||||
|
||||
if (new == NULL)
|
||||
return NULL;
|
||||
@@ -57,6 +49,3 @@ __strndup (const char *s, size_t n)
|
||||
new[len] = '\0';
|
||||
return (char *) memcpy (new, s, len);
|
||||
}
|
||||
#ifdef weak_alias
|
||||
weak_alias (__strndup, strndup)
|
||||
#endif
|
||||
@@ -9,7 +9,6 @@ glibc21.m4 \
|
||||
iconv.m4 \
|
||||
isc-posix.m4 \
|
||||
lcmessage.m4 \
|
||||
m4.m4 \
|
||||
malloc.m4 \
|
||||
mbrtowc.m4 \
|
||||
mbstate_t.m4 \
|
||||
|
||||
+21
-16
@@ -1,6 +1,7 @@
|
||||
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.5c from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
# Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@@ -12,7 +13,6 @@
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
@@ -43,9 +43,11 @@ AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = @program_transform_name@
|
||||
@@ -57,7 +59,12 @@ PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
|
||||
EXEEXT = @EXEEXT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOM4TE = @AUTOM4TE@
|
||||
AWK = @AWK@
|
||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||
CATALOGS = @CATALOGS@
|
||||
@@ -66,7 +73,7 @@ CC = @CC@
|
||||
CPP = @CPP@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEPDIR = @DEPDIR@
|
||||
EXEEXT = @EXEEXT@
|
||||
GCC = @GCC@
|
||||
GENCAT = @GENCAT@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMOFILES = @GMOFILES@
|
||||
@@ -77,12 +84,10 @@ INTLBISON = @INTLBISON@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||
LIB = @LIB@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
M4 = @M4@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
POFILES = @POFILES@
|
||||
POSUB = @POSUB@
|
||||
@@ -92,10 +97,10 @@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
WARNING_CFLAGS = @WARNING_CFLAGS@
|
||||
WERROR_CFLAGS = @WERROR_CFLAGS@
|
||||
am__include = @am__include@
|
||||
am__quote = @am__quote@
|
||||
install_sh = @install_sh@
|
||||
|
||||
EXTRA_DIST = \
|
||||
c-bs-a.m4 \
|
||||
codeset.m4 \
|
||||
@@ -106,7 +111,6 @@ glibc21.m4 \
|
||||
iconv.m4 \
|
||||
isc-posix.m4 \
|
||||
lcmessage.m4 \
|
||||
m4.m4 \
|
||||
malloc.m4 \
|
||||
mbrtowc.m4 \
|
||||
mbstate_t.m4 \
|
||||
@@ -129,14 +133,11 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu m4/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && \
|
||||
CONFIG_HEADERS= CONFIG_LINKS= \
|
||||
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
||||
uninstall-info-am:
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
top_distdir = ..
|
||||
@@ -144,13 +145,16 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
$(mkinstalldirs) "$(distdir)/$$dir"; \
|
||||
dir="/$$dir"; \
|
||||
$(mkinstalldirs) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
cp -pR $$d/$$file $(distdir)$$dir \
|
||||
|| exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
@@ -175,6 +179,7 @@ install-am: all-am
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
#serial 3
|
||||
#serial 4
|
||||
|
||||
dnl From Paul Eggert.
|
||||
|
||||
AC_DEFUN(AC_C_BACKSLASH_A,
|
||||
AC_DEFUN([AC_C_BACKSLASH_A],
|
||||
[
|
||||
AC_CACHE_CHECK([whether backslash-a works in strings], ac_cv_c_backslash_a,
|
||||
[AC_TRY_COMPILE([],
|
||||
|
||||
+5
-4
@@ -1,12 +1,13 @@
|
||||
#serial 1
|
||||
#serial 4
|
||||
|
||||
dnl FIXME: put these prerequisite-only *.m4 files in a separate
|
||||
dnl directory -- otherwise, they'll conflict with existing files.
|
||||
|
||||
dnl These are the prerequisite macros for GNU's error.c file.
|
||||
AC_DEFUN(jm_PREREQ_ERROR,
|
||||
AC_DEFUN([jm_PREREQ_ERROR],
|
||||
[
|
||||
AC_CHECK_FUNCS(strerror strerror_r vprintf doprnt)
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_FUNCS(strerror vprintf doprnt)
|
||||
AC_CHECK_DECLS([strerror])
|
||||
AC_FUNC_STRERROR_R
|
||||
AC_HEADER_STDC
|
||||
])
|
||||
|
||||
+7
-5
@@ -3,10 +3,12 @@
|
||||
#
|
||||
# This file can be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU General Public
|
||||
# License but which still want to provide support for the GNU gettext
|
||||
# functionality.
|
||||
# Please note that the actual code of GNU gettext is covered by the GNU
|
||||
# General Public License and is *not* in the public domain.
|
||||
# License or the GNU Library General Public License but which still want
|
||||
# to provide support for the GNU gettext functionality.
|
||||
# Please note that the actual code of the GNU gettext library is covered
|
||||
# by the GNU Library General Public License, and the rest of the GNU
|
||||
# gettext package package is covered by the GNU General Public License.
|
||||
# They are *not* in the public domain.
|
||||
|
||||
# serial 10
|
||||
|
||||
@@ -241,7 +243,7 @@ return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", ""
|
||||
dnl Found it, now check the version.
|
||||
AC_MSG_CHECKING([version of bison])
|
||||
changequote(<<,>>)dnl
|
||||
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison .* \([0-9]*\.[0-9.]*\).*$/\1/p'`
|
||||
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
|
||||
case $ac_prog_version in
|
||||
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
|
||||
1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
|
||||
|
||||
+6
-4
@@ -3,10 +3,12 @@
|
||||
#
|
||||
# This file can be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU General Public
|
||||
# License but which still want to provide support for the GNU gettext
|
||||
# functionality.
|
||||
# Please note that the actual code of GNU gettext is covered by the GNU
|
||||
# General Public License and is *not* in the public domain.
|
||||
# License or the GNU Library General Public License but which still want
|
||||
# to provide support for the GNU gettext functionality.
|
||||
# Please note that the actual code of the GNU gettext library is covered
|
||||
# by the GNU Library General Public License, and the rest of the GNU
|
||||
# gettext package package is covered by the GNU General Public License.
|
||||
# They are *not* in the public domain.
|
||||
|
||||
# serial 2
|
||||
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
# serial 1 -*- Autoconf -*-
|
||||
|
||||
# BISON_AC_PROG_GNU_M4
|
||||
# --------------------
|
||||
# Check for GNU m4, at least 1.3 (supports frozen files).
|
||||
AC_DEFUN([BISON_AC_PROG_GNU_M4],
|
||||
[AC_PATH_PROGS(M4, gm4 gnum4 m4, m4)
|
||||
AC_CACHE_CHECK([whether m4 supports frozen files],
|
||||
[ac_cv_prog_gnu_m4],
|
||||
[ac_cv_prog_gnu_m4=no
|
||||
if test x"$M4" != x; then
|
||||
case `$M4 --help < /dev/null 2>&1` in
|
||||
*reload-state*) ac_cv_prog_gnu_m4=yes ;;
|
||||
esac
|
||||
fi])
|
||||
])# BISON_AC_PROG_GNU_M4
|
||||
+6
-7
@@ -1,16 +1,16 @@
|
||||
#serial 3
|
||||
#serial 5
|
||||
|
||||
dnl From Jim Meyering.
|
||||
dnl Determine whether malloc accepts 0 as its argument.
|
||||
dnl If it doesn't, arrange to use the replacement function.
|
||||
dnl
|
||||
|
||||
AC_DEFUN(jm_FUNC_MALLOC,
|
||||
AC_DEFUN([jm_FUNC_MALLOC],
|
||||
[
|
||||
dnl xmalloc.c requires that this symbol be defined so it doesn't
|
||||
dnl mistakenly use a broken malloc -- as it might if this test were omitted.
|
||||
AC_DEFINE_UNQUOTED(HAVE_DONE_WORKING_MALLOC_CHECK, 1,
|
||||
[Define if the malloc check has been performed. ])
|
||||
AC_DEFINE(HAVE_DONE_WORKING_MALLOC_CHECK, 1,
|
||||
[Define if the malloc check has been performed. ])
|
||||
|
||||
AC_CACHE_CHECK([for working malloc], jm_cv_func_working_malloc,
|
||||
[AC_TRY_RUN([
|
||||
@@ -27,9 +27,8 @@ AC_DEFUN(jm_FUNC_MALLOC,
|
||||
jm_cv_func_working_malloc=no)
|
||||
])
|
||||
if test $jm_cv_func_working_malloc = no; then
|
||||
AC_SUBST(LIBOBJS)
|
||||
LIBOBJS="$LIBOBJS malloc.$ac_objext"
|
||||
AC_DEFINE_UNQUOTED(malloc, rpl_malloc,
|
||||
AC_LIBOBJ(malloc)
|
||||
AC_DEFINE(malloc, rpl_malloc,
|
||||
[Define to rpl_malloc if the replacement function should be used.])
|
||||
fi
|
||||
])
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
# serial 8
|
||||
# serial 9
|
||||
|
||||
# From Paul Eggert.
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
# (at least glibc-2.1.3) because the "_XOPEN_SOURCE 500" definition elicits
|
||||
# a syntax error in wchar.h due to the use of undefined __int32_t.
|
||||
|
||||
AC_DEFUN(AC_MBSTATE_T,
|
||||
AC_DEFUN([AC_MBSTATE_T],
|
||||
[
|
||||
AC_CHECK_HEADERS(stdlib.h)
|
||||
|
||||
|
||||
+6
-4
@@ -3,10 +3,12 @@
|
||||
#
|
||||
# This file can be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU General Public
|
||||
# License but which still want to provide support for the GNU gettext
|
||||
# functionality.
|
||||
# Please note that the actual code of GNU gettext is covered by the GNU
|
||||
# General Public License and is *not* in the public domain.
|
||||
# License or the GNU Library General Public License but which still want
|
||||
# to provide support for the GNU gettext functionality.
|
||||
# Please note that the actual code of the GNU gettext library is covered
|
||||
# by the GNU Library General Public License, and the rest of the GNU
|
||||
# gettext package package is covered by the GNU General Public License.
|
||||
# They are *not* in the public domain.
|
||||
|
||||
# serial 2
|
||||
|
||||
|
||||
+6
-7
@@ -1,16 +1,16 @@
|
||||
#serial 3
|
||||
#serial 5
|
||||
|
||||
dnl From Jim Meyering.
|
||||
dnl Determine whether realloc works when both arguments are 0.
|
||||
dnl If it doesn't, arrange to use the replacement function.
|
||||
dnl
|
||||
|
||||
AC_DEFUN(jm_FUNC_REALLOC,
|
||||
AC_DEFUN([jm_FUNC_REALLOC],
|
||||
[
|
||||
dnl xmalloc.c requires that this symbol be defined so it doesn't
|
||||
dnl mistakenly use a broken realloc -- as it might if this test were omitted.
|
||||
AC_DEFINE_UNQUOTED(HAVE_DONE_WORKING_REALLOC_CHECK, 1,
|
||||
[Define if the realloc check has been performed. ])
|
||||
AC_DEFINE(HAVE_DONE_WORKING_REALLOC_CHECK, 1,
|
||||
[Define if the realloc check has been performed. ])
|
||||
|
||||
AC_CACHE_CHECK([for working realloc], jm_cv_func_working_realloc,
|
||||
[AC_TRY_RUN([
|
||||
@@ -27,9 +27,8 @@ AC_DEFUN(jm_FUNC_REALLOC,
|
||||
jm_cv_func_working_realloc=no)
|
||||
])
|
||||
if test $jm_cv_func_working_realloc = no; then
|
||||
AC_SUBST(LIBOBJS)
|
||||
LIBOBJS="$LIBOBJS realloc.$ac_objext"
|
||||
AC_DEFINE_UNQUOTED(realloc, rpl_realloc,
|
||||
AC_LIBOBJ(realloc)
|
||||
AC_DEFINE(realloc, rpl_realloc,
|
||||
[Define to rpl_realloc if the replacement function should be used.])
|
||||
fi
|
||||
])
|
||||
|
||||
+38
-45
@@ -1,9 +1,23 @@
|
||||
#serial 1002
|
||||
#serial 1003
|
||||
# Experimental replacement for the function in the latest CVS autoconf.
|
||||
# If the compile-test says strerror_r doesn't work, then resort to a
|
||||
# `run'-test that works on BeOS and segfaults on DEC Unix.
|
||||
# Use with the error.c file in ../lib.
|
||||
|
||||
# Copyright 2001 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
undefine([AC_FUNC_STRERROR_R])
|
||||
|
||||
# AC_FUNC_STRERROR_R
|
||||
@@ -11,56 +25,35 @@ undefine([AC_FUNC_STRERROR_R])
|
||||
AC_DEFUN([AC_FUNC_STRERROR_R],
|
||||
[AC_CHECK_DECLS([strerror_r])
|
||||
AC_CHECK_FUNCS([strerror_r])
|
||||
if test $ac_cv_func_strerror_r = yes; then
|
||||
AC_CHECK_HEADERS(string.h)
|
||||
AC_CACHE_CHECK([for working strerror_r],
|
||||
ac_cv_func_strerror_r_works,
|
||||
AC_CACHE_CHECK([whether strerror_r returns char *],
|
||||
ac_cv_func_strerror_r_char_p,
|
||||
[
|
||||
AC_TRY_COMPILE(
|
||||
[
|
||||
# include <stdio.h>
|
||||
# if HAVE_STRING_H
|
||||
# include <string.h>
|
||||
# endif
|
||||
],
|
||||
[
|
||||
char buf[100];
|
||||
char x = *strerror_r (0, buf, sizeof buf);
|
||||
],
|
||||
ac_cv_func_strerror_r_works=yes,
|
||||
ac_cv_func_strerror_r_works=no
|
||||
)
|
||||
if test $ac_cv_func_strerror_r_works = no; then
|
||||
# strerror_r seems not to work, but now we have to choose between
|
||||
ac_cv_func_strerror_r_char_p=no
|
||||
if test $ac_cv_have_decl_strerror_r = yes; then
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
|
||||
[[
|
||||
char buf[100];
|
||||
char x = *strerror_r (0, buf, sizeof buf);
|
||||
char *p = strerror_r (0, buf, sizeof buf);
|
||||
]])],
|
||||
ac_cv_func_strerror_r_char_p=yes)
|
||||
else
|
||||
# strerror_r is not declared. Choose between
|
||||
# systems that have relatively inaccessible declarations for the
|
||||
# function. BeOS and DEC UNIX 4.0 fall in this category, but the
|
||||
# former has a strerror_r that returns char*, while the latter
|
||||
# has a strerror_r that returns `int'.
|
||||
# This test should segfault on the DEC system.
|
||||
AC_TRY_RUN(
|
||||
[
|
||||
# include <stdio.h>
|
||||
# include <string.h>
|
||||
# include <ctype.h>
|
||||
|
||||
extern char *strerror_r ();
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
char buf[100];
|
||||
AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT
|
||||
extern char *strerror_r ();],
|
||||
[[char buf[100];
|
||||
char x = *strerror_r (0, buf, sizeof buf);
|
||||
exit (!isalpha (x));
|
||||
}
|
||||
],
|
||||
ac_cv_func_strerror_r_works=yes,
|
||||
ac_cv_func_strerror_r_works=no,
|
||||
ac_cv_func_strerror_r_works=no)
|
||||
exit (!isalpha (x));]])],
|
||||
ac_cv_func_strerror_r_char_p=yes, , :)
|
||||
fi
|
||||
])
|
||||
if test $ac_cv_func_strerror_r_works = yes; then
|
||||
AC_DEFINE_UNQUOTED(HAVE_WORKING_STRERROR_R, 1,
|
||||
[Define to 1 if `strerror_r' returns a string.])
|
||||
fi
|
||||
if test $ac_cv_func_strerror_r_char_p = yes; then
|
||||
AC_DEFINE([STRERROR_R_CHAR_P], 1,
|
||||
[Define to 1 if strerror_r returns char *.])
|
||||
fi
|
||||
])# AC_FUNC_STRERROR_R
|
||||
|
||||
+1
-2
@@ -1,6 +1,5 @@
|
||||
ChangeLog
|
||||
Makefile
|
||||
Makefile.in
|
||||
Makefile Makefile.in
|
||||
POTFILES
|
||||
bison.pot
|
||||
stamp-cat-id
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
2002-01-21 gettextize <[email protected]>
|
||||
|
||||
* Makefile.in.in: Upgrade to gettext-0.10.40.
|
||||
|
||||
2001-09-27 gettextize <[email protected]>
|
||||
|
||||
* Makefile.in.in: Upgrade to gettext-0.10.40.
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
src/LR0.c
|
||||
src/complain.c
|
||||
src/conflicts.c
|
||||
src/derives.c
|
||||
src/files.c
|
||||
src/getargs.c
|
||||
src/lalr.c
|
||||
src/lex.c
|
||||
src/main.c
|
||||
src/nullable.c
|
||||
src/output.c
|
||||
src/print.c
|
||||
src/print_graph.c
|
||||
|
||||
-188
@@ -1,188 +0,0 @@
|
||||
/* Automatically generated by po2tbl.sed from bison.pot. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "libgettext.h"
|
||||
|
||||
const struct _msg_ent _msg_tbl[] = {
|
||||
{"", 1},
|
||||
{"too many states (max %d)", 2},
|
||||
{"Conflict in state %d between rule %d and token %s resolved as %s.\n", 3},
|
||||
{"reduce", 4},
|
||||
{"shift", 5},
|
||||
{"an error", 6},
|
||||
{" 1 shift/reduce conflict", 7},
|
||||
{" %d shift/reduce conflicts", 8},
|
||||
{" and", 9},
|
||||
{" 1 reduce/reduce conflict", 10},
|
||||
{" %d reduce/reduce conflicts", 11},
|
||||
{"State %d contains", 12},
|
||||
{"conflicts: ", 13},
|
||||
{" %d shift/reduce", 14},
|
||||
{" %d reduce/reduce", 15},
|
||||
{"%s contains", 16},
|
||||
{" %-4s\t[reduce using rule %d (%s)]\n", 17},
|
||||
{"\
|
||||
$default\treduce using rule %d (%s)\n\
|
||||
\n", 18},
|
||||
{" %-4s\treduce using rule %d (%s)\n", 19},
|
||||
{" $default\treduce using rule %d (%s)\n", 20},
|
||||
{"DERIVES", 21},
|
||||
{"%s derives", 22},
|
||||
{"GNU bison generates parsers for LALR(1) grammars.\n", 23},
|
||||
{"Usage: %s [OPTION]... FILE\n", 24},
|
||||
{"\
|
||||
If a long option shows an argument as mandatory, then it is mandatory\n\
|
||||
for the equivalent short option also. Similarly for optional arguments.\n", 25},
|
||||
{"\
|
||||
Operation modes:\n\
|
||||
-h, --help display this help and exit\n\
|
||||
-V, --version output version information and exit\n\
|
||||
-y, --yacc emulate POSIX yacc\n", 26},
|
||||
{"\
|
||||
Parser:\n\
|
||||
-S, --skeleton=FILE specify the skeleton to use\n\
|
||||
-t, --debug instrument the parser for debugging\n\
|
||||
--locations enable locations computation\n\
|
||||
-p, --name-prefix=PREFIX prepend PREFIX to the external symbols\n\
|
||||
-l, --no-lines don't generate `#line' directives\n\
|
||||
-n, --no-parser generate the tables only\n\
|
||||
-r, --raw number the tokens from 3\n\
|
||||
-k, --token-table include a table of token names\n", 27},
|
||||
{"\
|
||||
Output:\n\
|
||||
-d, --defines also produce a header file\n\
|
||||
-v, --verbose also produce an explanation of the automaton\n\
|
||||
-b, --file-prefix=PREFIX specify a PREFIX for output files\n\
|
||||
-o, --output-file=FILE leave output to FILE\n", 28},
|
||||
{"Report bugs to <[email protected]>.\n", 29},
|
||||
{"bison (GNU Bison) %s", 30},
|
||||
{"\
|
||||
Copyright 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, Inc.\n", 31},
|
||||
{"\
|
||||
This is free software; see the source for copying conditions. There is NO\n\
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n", 32},
|
||||
{"Try `%s --help' for more information.\n", 33},
|
||||
{"%s: no grammar file given\n", 34},
|
||||
{"%s: extra arguments ignored after `%s'\n", 35},
|
||||
{"too many gotos (max %d)", 36},
|
||||
{"unexpected `/' found and ignored", 37},
|
||||
{"unterminated comment", 38},
|
||||
{"unexpected end of file", 39},
|
||||
{"unescaped newline in constant", 40},
|
||||
{"octal value outside range 0...255: `\\%o'", 41},
|
||||
{"hexadecimal value above 255: `\\x%x'", 42},
|
||||
{"unknown escape sequence: `\\' followed by `%s'", 43},
|
||||
{"unterminated type name at end of file", 44},
|
||||
{"unterminated type name", 45},
|
||||
{"use \"...\" for multi-character literal tokens", 46},
|
||||
{"%s: internal error: %s\n", 47},
|
||||
{"Entering set_nullable", 48},
|
||||
{"maximum table size (%d) exceeded", 49},
|
||||
{" type %d is %s\n", 50},
|
||||
{" (rule %d)", 51},
|
||||
{" $default\taccept\n", 52},
|
||||
{" NO ACTIONS\n", 53},
|
||||
{" $ \tgo to state %d\n", 54},
|
||||
{" %-4s\tshift, and go to state %d\n", 55},
|
||||
{" %-4s\terror (nonassociative)\n", 56},
|
||||
{" %-4s\tgo to state %d\n", 57},
|
||||
{"state %d", 58},
|
||||
{"Grammar", 59},
|
||||
{"rule %-4d %s ->", 60},
|
||||
{"\t\t/* empty */", 61},
|
||||
{"Terminals, with rules where they appear", 62},
|
||||
{"Nonterminals, with rules where they appear", 63},
|
||||
{" on left:", 64},
|
||||
{" on right:", 65},
|
||||
{" Skipping to next \\n", 66},
|
||||
{" Skipping to next %c", 67},
|
||||
{"invalid $ value", 68},
|
||||
{"unterminated string at end of file", 69},
|
||||
{"unterminated string", 70},
|
||||
{"%s is invalid", 71},
|
||||
{"$$ of `%s' has no declared type", 72},
|
||||
{"$%d of `%s' has no declared type", 73},
|
||||
{"unterminated `%{' definition", 74},
|
||||
{"Premature EOF after %s", 75},
|
||||
{"symbol `%s' used more than once as a literal string", 76},
|
||||
{"symbol `%s' given more than one literal string", 77},
|
||||
{"symbol %s redefined", 78},
|
||||
{"type redeclaration for %s", 79},
|
||||
{"`%s' is invalid in %s", 80},
|
||||
{"multiple %s declarations", 81},
|
||||
{"invalid %s declaration", 82},
|
||||
{"%type declaration has no <typename>", 83},
|
||||
{"invalid %%type declaration due to item: %s", 84},
|
||||
{"redefining precedence of %s", 85},
|
||||
{"invalid text (%s) - number should be after identifier", 86},
|
||||
{"unexpected item: %s", 87},
|
||||
{"unmatched %s", 88},
|
||||
{"argument of %%expect is not an integer", 89},
|
||||
{"unrecognized item %s, expected an identifier", 90},
|
||||
{"expected string constant instead of %s", 91},
|
||||
{"unrecognized: %s", 92},
|
||||
{"no input grammar", 93},
|
||||
{"unknown character: %s", 94},
|
||||
{"unterminated %guard clause", 95},
|
||||
{"ill-formed rule: initial symbol not followed by colon", 96},
|
||||
{"grammar starts with vertical bar", 97},
|
||||
{"rule given for %s, which is a token", 98},
|
||||
{"two @prec's in a row", 99},
|
||||
{"%%guard present but %%semantic_parser not specified", 100},
|
||||
{"two actions at end of one rule", 101},
|
||||
{"type clash (`%s' `%s') on default action", 102},
|
||||
{"empty rule for typed nonterminal, and no action", 103},
|
||||
{"invalid input: %s", 104},
|
||||
{"too many symbols (tokens plus nonterminals); maximum %d", 105},
|
||||
{"no rules in the input grammar", 106},
|
||||
{"symbol %s is used, but is not defined as a token and has no rules", 107},
|
||||
{"conflicting precedences for %s and %s", 108},
|
||||
{"conflicting assoc values for %s and %s", 109},
|
||||
{"tokens %s and %s both assigned number %d", 110},
|
||||
{"the start symbol %s is undefined", 111},
|
||||
{"the start symbol %s is a token", 112},
|
||||
{"Useless nonterminals:", 113},
|
||||
{"Terminals which are not used:", 114},
|
||||
{"Useless rules:", 115},
|
||||
{"\
|
||||
Variables\n\
|
||||
---------\n\
|
||||
\n", 116},
|
||||
{"Value Sprec Sassoc Tag\n", 117},
|
||||
{"\
|
||||
Rules\n\
|
||||
-----\n\
|
||||
\n", 118},
|
||||
{"\
|
||||
Rules interpreted\n\
|
||||
-----------------\n\
|
||||
\n", 119},
|
||||
{"%d rules never reduced\n", 120},
|
||||
{"%s contains ", 121},
|
||||
{"%d useless nonterminal%s", 122},
|
||||
{" and ", 123},
|
||||
{"%d useless rule%s", 124},
|
||||
{"Start symbol %s does not derive any sentence", 125},
|
||||
{"\
|
||||
reduced %s defines %d terminal%s, %d nonterminal%s, and %d production%s.\n", 126},
|
||||
{"Unknown system error", 127},
|
||||
{"%s: option `%s' is ambiguous\n", 128},
|
||||
{"%s: option `--%s' doesn't allow an argument\n", 129},
|
||||
{"%s: option `%c%s' doesn't allow an argument\n", 130},
|
||||
{"%s: option `%s' requires an argument\n", 131},
|
||||
{"%s: unrecognized option `--%s'\n", 132},
|
||||
{"%s: unrecognized option `%c%s'\n", 133},
|
||||
{"%s: illegal option -- %c\n", 134},
|
||||
{"%s: invalid option -- %c\n", 135},
|
||||
{"%s: option requires an argument -- %c\n", 136},
|
||||
{"%s: option `-W %s' is ambiguous\n", 137},
|
||||
{"%s: option `-W %s' doesn't allow an argument\n", 138},
|
||||
{"memory exhausted", 139},
|
||||
{"`", 140},
|
||||
{"'", 141},
|
||||
};
|
||||
|
||||
int _msg_tbl_length = 141;
|
||||
@@ -4,21 +4,21 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: bison 1.28d\n"
|
||||
"POT-Creation-Date: 2001-10-02 18:30+0200\n"
|
||||
"PO-Revision-Date: 2001-08-29 17:06+02:00\n"
|
||||
"Project-Id-Version: bison 1.30f\n"
|
||||
"POT-Creation-Date: 2002-01-23 14:12+0100\n"
|
||||
"PO-Revision-Date: 2002-01-23 14:14+0100\n"
|
||||
"Last-Translator: Toomas Soome <[email protected]>\n"
|
||||
"Language-Team: Estonian <[email protected]>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=ISO-8859-15\n"
|
||||
"Content-Transfer-Encoding: 8-bit\n"
|
||||
|
||||
#: src/LR0.c:207
|
||||
#: src/LR0.c:189
|
||||
#, c-format
|
||||
msgid "too many states (max %d)"
|
||||
msgstr "liiga palju olekuid (maks %d)"
|
||||
|
||||
#: lib/error.c:117 src/complain.c:96
|
||||
#: lib/error.c:128 lib/error.c:156 src/complain.c:99
|
||||
msgid "Unknown system error"
|
||||
msgstr "Tundmatu süsteemi viga"
|
||||
|
||||
@@ -26,81 +26,84 @@ msgstr "Tundmatu s
|
||||
msgid "warning: "
|
||||
msgstr "hoiatus: "
|
||||
|
||||
#: src/complain.c:238 src/complain.c:279
|
||||
#: src/complain.c:238
|
||||
msgid "fatal error: "
|
||||
msgstr "fataalne viga: "
|
||||
|
||||
#: src/conflicts.c:48
|
||||
#: src/conflicts.c:44
|
||||
#, c-format
|
||||
msgid "Conflict in state %d between rule %d and token %s resolved as %s.\n"
|
||||
msgstr "Konflikt olekus %d reegli %d ja märgi %s vahel lahendatud, kui %s.\n"
|
||||
|
||||
#: src/conflicts.c:114 src/conflicts.c:137
|
||||
#: src/conflicts.c:94 src/conflicts.c:119
|
||||
msgid "reduce"
|
||||
msgstr "redutseerimine"
|
||||
|
||||
#: src/conflicts.c:120 src/conflicts.c:133
|
||||
#: src/conflicts.c:101 src/conflicts.c:115
|
||||
msgid "shift"
|
||||
msgstr "nihutamine"
|
||||
|
||||
#: src/conflicts.c:141
|
||||
#: src/conflicts.c:123
|
||||
msgid "an error"
|
||||
msgstr "viga"
|
||||
|
||||
#: src/conflicts.c:421
|
||||
msgid " 1 shift/reduce conflict"
|
||||
msgstr " 1 nihutamine/redutseerimine konflikt"
|
||||
|
||||
#: src/conflicts.c:426
|
||||
#: src/conflicts.c:302
|
||||
#, c-format
|
||||
msgid " %d shift/reduce conflicts"
|
||||
msgstr " %d nihutamine/redutseerimine konflikti"
|
||||
msgid "%d shift/reduce conflict"
|
||||
msgid_plural "%d shift/reduce conflicts"
|
||||
msgstr[0] "%d nihutamine/redutseerimine konflikt"
|
||||
msgstr[1] "%d nihutamine/redutseerimine konflikti"
|
||||
|
||||
#: src/conflicts.c:432
|
||||
msgid " and"
|
||||
msgstr " ja"
|
||||
#: src/conflicts.c:309
|
||||
msgid "and"
|
||||
msgstr "ja"
|
||||
|
||||
#: src/conflicts.c:438
|
||||
msgid " 1 reduce/reduce conflict"
|
||||
msgstr " 1 redutseerimine/redutseerimine konflikt"
|
||||
|
||||
#: src/conflicts.c:443
|
||||
#: src/conflicts.c:315
|
||||
#, c-format
|
||||
msgid " %d reduce/reduce conflicts"
|
||||
msgstr " %d redutseerimine/redutseerimine konflikti"
|
||||
msgid "%d reduce/reduce conflict"
|
||||
msgid_plural "%d reduce/reduce conflicts"
|
||||
msgstr[0] "%d redutseerimine/redutseerimine konflikt"
|
||||
msgstr[1] "%d redutseerimine/redutseerimine konflikti"
|
||||
|
||||
#: src/conflicts.c:480
|
||||
#: src/conflicts.c:340
|
||||
#, c-format
|
||||
msgid "State %d contains"
|
||||
msgstr "Olek %d sisaldab"
|
||||
msgid "State %d contains "
|
||||
msgstr "Olek %d sisaldab "
|
||||
|
||||
#. If invoked with `--yacc', use the output format specified by
|
||||
#. POSIX.
|
||||
#: src/conflicts.c:491
|
||||
#: src/conflicts.c:387
|
||||
msgid "conflicts: "
|
||||
msgstr "konfliktid: "
|
||||
|
||||
#: src/conflicts.c:493
|
||||
#: src/conflicts.c:389
|
||||
#, c-format
|
||||
msgid " %d shift/reduce"
|
||||
msgstr " %d nihutamine/redutseerimine"
|
||||
|
||||
#: src/conflicts.c:497
|
||||
#: src/conflicts.c:393
|
||||
#, c-format
|
||||
msgid " %d reduce/reduce"
|
||||
msgstr " %d redutseerimine/redutseerimine"
|
||||
|
||||
#: src/conflicts.c:502
|
||||
#: src/conflicts.c:398 src/reduce.c:508
|
||||
#, c-format
|
||||
msgid "%s contains"
|
||||
msgstr "%s sisaldab"
|
||||
msgid "%s contains "
|
||||
msgstr "%s sisaldab "
|
||||
|
||||
#: src/conflicts.c:588 src/conflicts.c:709
|
||||
#: src/conflicts.c:412
|
||||
#, c-format
|
||||
msgid "expected %d shift/reduce conflict\n"
|
||||
msgid_plural "expected %d shift/reduce conflicts\n"
|
||||
msgstr[0] "eeldasime %d nihutamine/redutseerimine konflikti\n"
|
||||
msgstr[1] "eeldasime %d nihutamine/redutseerimine konflikti\n"
|
||||
|
||||
#: src/conflicts.c:463 src/conflicts.c:540
|
||||
#, c-format
|
||||
msgid " %-4s\t[reduce using rule %d (%s)]\n"
|
||||
msgstr " %-4s\t[redutseerin, kasutades reeglit %d (%s)]\n"
|
||||
|
||||
#: src/conflicts.c:600 src/print.c:171
|
||||
#: src/conflicts.c:467 src/print.c:154
|
||||
#, c-format
|
||||
msgid ""
|
||||
" $default\treduce using rule %d (%s)\n"
|
||||
@@ -109,46 +112,37 @@ msgstr ""
|
||||
" $default\tredutseerin kasutades reeglit %d (%s)\n"
|
||||
"\n"
|
||||
|
||||
#: src/conflicts.c:689 src/conflicts.c:703
|
||||
#: src/conflicts.c:521 src/conflicts.c:534
|
||||
#, c-format
|
||||
msgid " %-4s\treduce using rule %d (%s)\n"
|
||||
msgstr " %-4s\tredutseerin kasutades reeglit %d (%s)\n"
|
||||
|
||||
#: src/conflicts.c:730
|
||||
#: src/conflicts.c:550
|
||||
#, c-format
|
||||
msgid " $default\treduce using rule %d (%s)\n"
|
||||
msgstr " $default\tredutseerin kasutades reeglit %d (%s)\n"
|
||||
|
||||
#: src/derives.c:43
|
||||
msgid "DERIVES"
|
||||
msgstr "DERIVES"
|
||||
|
||||
#: src/derives.c:48
|
||||
#, c-format
|
||||
msgid "%s derives"
|
||||
msgstr "%s derives"
|
||||
|
||||
#: src/files.c:133
|
||||
#: src/files.c:150
|
||||
#, c-format
|
||||
msgid "cannot open file `%s'"
|
||||
msgstr "faili `%s' ei saa avada"
|
||||
|
||||
#: src/files.c:152
|
||||
#: src/files.c:169
|
||||
msgid "cannot close file"
|
||||
msgstr "faili ei õnnestu sulgeda"
|
||||
|
||||
#. Some efforts were made to ease the translators' task, please
|
||||
#. continue.
|
||||
#: src/getargs.c:83
|
||||
#: src/getargs.c:84
|
||||
msgid "GNU bison generates parsers for LALR(1) grammars.\n"
|
||||
msgstr "GNU bison genereerib parsereid LALR(1) grammatikatele.\n"
|
||||
|
||||
#: src/getargs.c:87
|
||||
#: src/getargs.c:88
|
||||
#, c-format
|
||||
msgid "Usage: %s [OPTION]... FILE\n"
|
||||
msgstr "Kasuta: %s [VÕTI]...FAIL\n"
|
||||
|
||||
#: src/getargs.c:91
|
||||
#: src/getargs.c:92
|
||||
msgid ""
|
||||
"If a long option shows an argument as mandatory, then it is mandatory\n"
|
||||
"for the equivalent short option also. Similarly for optional arguments.\n"
|
||||
@@ -156,7 +150,7 @@ msgstr ""
|
||||
"Kui pikk võti näitab, et argument on kohustuslik, siis on see kohustuslik \n"
|
||||
"ka lühikese võtme korral. Sama ka vabalt valitavate võtmete korral.\n"
|
||||
|
||||
#: src/getargs.c:97
|
||||
#: src/getargs.c:98
|
||||
msgid ""
|
||||
"Operation modes:\n"
|
||||
" -h, --help display this help and exit\n"
|
||||
@@ -168,7 +162,7 @@ msgstr ""
|
||||
" -V, --version esita versiooniinfo ja lõpeta töö\n"
|
||||
" -y, --yacc emuleeri POSIX yacc\n"
|
||||
|
||||
#: src/getargs.c:104
|
||||
#: src/getargs.c:105
|
||||
msgid ""
|
||||
"Parser:\n"
|
||||
" -S, --skeleton=FILE specify the skeleton to use\n"
|
||||
@@ -188,14 +182,14 @@ msgstr ""
|
||||
" -n, --no-parser genereeri ainult tabelid\n"
|
||||
" -k, --token-table lisa ka sümbolite nimede tabel\n"
|
||||
|
||||
#: src/getargs.c:116
|
||||
#: src/getargs.c:117
|
||||
msgid ""
|
||||
"Output:\n"
|
||||
" -d, --defines also produce a header file\n"
|
||||
" -v, --verbose also produce an explanation of the automaton\n"
|
||||
" -b, --file-prefix=PREFIX specify a PREFIX for output files\n"
|
||||
" -o, --output-file=FILE leave output to FILE\n"
|
||||
" -g, --graph also produce a VCG graph description of the "
|
||||
" -o, --output=FILE leave output to FILE\n"
|
||||
" -g, --graph also produce a VCG description of the "
|
||||
"automaton\n"
|
||||
msgstr ""
|
||||
"Väljund:\n"
|
||||
@@ -205,25 +199,26 @@ msgstr ""
|
||||
" -o, --output-file=FAIL jäta väljund FAILi\n"
|
||||
" -g, --graph loo automaadi kirjeldus VCG graafina\n"
|
||||
|
||||
#: src/getargs.c:126
|
||||
#: src/getargs.c:127
|
||||
msgid "Report bugs to <[email protected]>.\n"
|
||||
msgstr "Teatage palun vigadest aadressil <[email protected]>.\n"
|
||||
|
||||
#. Some efforts were made to ease the translators' task, please
|
||||
#. continue.
|
||||
#: src/getargs.c:140
|
||||
#: src/getargs.c:141
|
||||
#, c-format
|
||||
msgid "bison (GNU Bison) %s"
|
||||
msgstr "bison (GNU Bison) %s"
|
||||
|
||||
#: src/getargs.c:145
|
||||
#: src/getargs.c:146
|
||||
msgid ""
|
||||
"Copyright 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, Inc.\n"
|
||||
"Copyright 1984, 1986, 1989, 1992, 2000, 2001, 2002\n"
|
||||
"Free Software Foundation, Inc.\n"
|
||||
msgstr ""
|
||||
"Autoriõigus 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, "
|
||||
"Inc.\n"
|
||||
"Autoriõigus 1984, 1986, 1989, 1992, 2000, 2001, 2002\n"
|
||||
"Free Software Foundation, Inc.\n"
|
||||
|
||||
#: src/getargs.c:149
|
||||
#: src/getargs.c:151
|
||||
msgid ""
|
||||
"This is free software; see the source for copying conditions. There is NO\n"
|
||||
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
|
||||
@@ -231,541 +226,514 @@ msgstr ""
|
||||
"See on vaba tarkvara; kopeerimistingimused leiate lähtetekstidest. Garantii\n"
|
||||
"PUUDUB; ka müügiks või mingil eesmärgil kasutamiseks.\n"
|
||||
|
||||
#: src/getargs.c:214 src/lex.c:650
|
||||
#: src/getargs.c:224 src/lex.c:705
|
||||
#, c-format
|
||||
msgid "`%s' is no longer supported"
|
||||
msgstr "`%s' ei ole enam toetatud"
|
||||
|
||||
#: src/getargs.c:238
|
||||
#: src/getargs.c:248
|
||||
#, c-format
|
||||
msgid "Try `%s --help' for more information.\n"
|
||||
msgstr "Lisainfo saamiseks proovige `%s --help'.\n"
|
||||
|
||||
#: src/getargs.c:245
|
||||
#: src/getargs.c:255
|
||||
#, c-format
|
||||
msgid "%s: no grammar file given\n"
|
||||
msgstr "%s: puudub grammatikafail\n"
|
||||
|
||||
#: src/getargs.c:249
|
||||
#: src/getargs.c:259
|
||||
#, c-format
|
||||
msgid "%s: extra arguments ignored after `%s'\n"
|
||||
msgstr "%s: ignoreerin lisaargumente peale `%s'\n"
|
||||
|
||||
#: src/lalr.c:311
|
||||
#: src/lalr.c:256
|
||||
#, c-format
|
||||
msgid "too many gotos (max %d)"
|
||||
msgstr "liiga palju gotosid (maks %d)"
|
||||
|
||||
#: src/lex.c:78
|
||||
#: src/lex.c:76
|
||||
msgid "unexpected `/' found and ignored"
|
||||
msgstr "leidsin ja ignoreerin ootamatu `/'"
|
||||
|
||||
#: src/lex.c:107 src/reader.c:269
|
||||
#: src/lex.c:105 src/reader.c:280
|
||||
msgid "unterminated comment"
|
||||
msgstr "lõpetamata kommentaar"
|
||||
|
||||
#: src/lex.c:139
|
||||
#: src/lex.c:137
|
||||
msgid "unexpected end of file"
|
||||
msgstr "ootamatu faililõpp"
|
||||
|
||||
#: src/lex.c:168
|
||||
#: src/lex.c:166
|
||||
msgid "unescaped newline in constant"
|
||||
msgstr "paojadata reavahetus konstandis"
|
||||
|
||||
#: src/lex.c:210
|
||||
#: src/lex.c:208
|
||||
#, c-format
|
||||
msgid "octal value outside range 0...255: `\\%o'"
|
||||
msgstr "kaheksandväärtus väljaspool piire 0...255: `\\%o'"
|
||||
|
||||
#: src/lex.c:235
|
||||
#: src/lex.c:233
|
||||
#, c-format
|
||||
msgid "hexadecimal value above 255: `\\x%x'"
|
||||
msgstr "kuueteistkümnendväärtus suurem, kui above 255: `\\x%x'"
|
||||
|
||||
#: src/lex.c:247
|
||||
#: src/lex.c:245
|
||||
#, c-format
|
||||
msgid "unknown escape sequence: `\\' followed by `%s'"
|
||||
msgstr "tundmatu paojada: `\\' järgneb `%s'"
|
||||
|
||||
#: src/lex.c:343
|
||||
#: src/lex.c:342
|
||||
msgid "unterminated type name at end of file"
|
||||
msgstr "lõpetamata tüübinimi faili lõpus"
|
||||
|
||||
#: src/lex.c:346
|
||||
#: src/lex.c:345
|
||||
msgid "unterminated type name"
|
||||
msgstr "lõpetamata tüübinimi"
|
||||
|
||||
#: src/lex.c:437
|
||||
#: src/lex.c:438
|
||||
msgid "use \"...\" for multi-character literal tokens"
|
||||
msgstr "kasuta mitmesümboliliste literaalidega \"...\" konstruktsiooni"
|
||||
|
||||
#: src/main.c:125
|
||||
#: src/lex.c:678
|
||||
#, c-format
|
||||
msgid "%s: internal error: %s\n"
|
||||
msgstr "%s: sisemine viga: %s\n"
|
||||
msgid "`%s' supports no argument: %s"
|
||||
msgstr "`%s' ei toeta argumente: %s"
|
||||
|
||||
#: src/nullable.c:51
|
||||
msgid "Entering set_nullable"
|
||||
msgstr "Entering set_nullable"
|
||||
#: src/lex.c:694
|
||||
#, c-format
|
||||
msgid "`%s' requires an argument"
|
||||
msgstr "võti `%s' nõuab argumenti"
|
||||
|
||||
#: src/output.c:986
|
||||
#: src/output.c:951
|
||||
#, c-format
|
||||
msgid "maximum table size (%d) exceeded"
|
||||
msgstr "ületati maksimaalset tabelisuurust (%d)"
|
||||
|
||||
#: src/print.c:37
|
||||
#: src/print.c:39
|
||||
#, c-format
|
||||
msgid " type %d is %s\n"
|
||||
msgstr " tüüp %d on %s\n"
|
||||
|
||||
#: src/print.c:85
|
||||
#: src/print.c:88
|
||||
#, c-format
|
||||
msgid " (rule %d)"
|
||||
msgstr " (reegel %d)"
|
||||
|
||||
#: src/print.c:111
|
||||
#: src/print.c:108
|
||||
msgid " $default\taccept\n"
|
||||
msgstr " $default\taktsepteerin\n"
|
||||
|
||||
#: src/print.c:113
|
||||
#: src/print.c:110
|
||||
msgid " NO ACTIONS\n"
|
||||
msgstr " TEGEVUSI POLE\n"
|
||||
|
||||
#: src/print.c:132
|
||||
#: src/print.c:124
|
||||
#, c-format
|
||||
msgid " $ \tgo to state %d\n"
|
||||
msgstr " $ \tliigu olekule %d\n"
|
||||
|
||||
#: src/print.c:135
|
||||
#: src/print.c:127
|
||||
#, c-format
|
||||
msgid " %-4s\tshift, and go to state %d\n"
|
||||
msgstr " %-4s\tnihuta ja liigu olekule %d\n"
|
||||
|
||||
#: src/print.c:159
|
||||
#: src/print.c:142
|
||||
#, c-format
|
||||
msgid " %-4s\terror (nonassociative)\n"
|
||||
msgstr " %-4s\tviga (mitteassotsiatiivne)\n"
|
||||
|
||||
#: src/print.c:187
|
||||
#: src/print.c:169
|
||||
#, c-format
|
||||
msgid " %-4s\tgo to state %d\n"
|
||||
msgstr " %-4s\tliigu olekule %d\n"
|
||||
|
||||
#: src/print.c:199
|
||||
#: src/print.c:180
|
||||
#, c-format
|
||||
msgid "state %d"
|
||||
msgstr "olek %d"
|
||||
|
||||
#. rule # : LHS -> RHS
|
||||
#: src/print.c:229
|
||||
#: src/print.c:211
|
||||
msgid "Grammar"
|
||||
msgstr "Grammatika"
|
||||
|
||||
#: src/print.c:234
|
||||
#, c-format
|
||||
msgid "rule %-4d %s ->"
|
||||
msgstr "reegel %-4d %s ->"
|
||||
#: src/print.c:212
|
||||
msgid "Number, Line, Rule"
|
||||
msgstr "Number, rida, reegel"
|
||||
|
||||
#: src/print.c:240
|
||||
#: src/print.c:217
|
||||
#, c-format
|
||||
msgid " %3d %3d %s ->"
|
||||
msgstr " %3d %3d %s ->"
|
||||
|
||||
#: src/print.c:224
|
||||
msgid "empty"
|
||||
msgstr ""
|
||||
msgstr "tühi"
|
||||
|
||||
#. TERMINAL (type #) : rule #s terminal is on RHS
|
||||
#: src/print.c:244
|
||||
#: src/print.c:231
|
||||
msgid "Terminals, with rules where they appear"
|
||||
msgstr "Terminalid, koos reeglitega, kus nad ilmuvad"
|
||||
|
||||
#: src/print.c:268
|
||||
#: src/print.c:256
|
||||
msgid "Nonterminals, with rules where they appear"
|
||||
msgstr "Mitteterminalid, koos reeglitega, kus nad ilmuvad"
|
||||
|
||||
#: src/print.c:294
|
||||
#: src/print.c:282
|
||||
msgid " on left:"
|
||||
msgstr " vasakul:"
|
||||
|
||||
#: src/print.c:309
|
||||
#: src/print.c:297
|
||||
msgid " on right:"
|
||||
msgstr " paremal:"
|
||||
|
||||
#: src/print_graph.c:174
|
||||
#. If something has been added in the NODE_OBSTACK after
|
||||
#. the declaration of the label, then we need a `\n'.
|
||||
#. if (obstack_object_size (node_obstack) > node_output_size)
|
||||
#. obstack_sgrow (node_obstack, "\n");
|
||||
#.
|
||||
#: src/print_graph.c:146
|
||||
#, c-format
|
||||
msgid "%-4s\terror (nonassociative)"
|
||||
msgstr "%-4s\tviga (mitteassotsiatiivne)"
|
||||
|
||||
#: src/print_graph.c:187
|
||||
#.
|
||||
#. if (obstack_object_size (node_obstack) > node_output_size)
|
||||
#. obstack_sgrow (node_obstack, "\n");
|
||||
#.
|
||||
#: src/print_graph.c:161
|
||||
#, c-format
|
||||
msgid "$default\treduce using rule %d (%s)"
|
||||
msgstr "$default\tredutseerin kasutades reeglit %d (%s)"
|
||||
|
||||
#: src/reader.c:78
|
||||
#: src/reader.c:89
|
||||
msgid " Skipping to next \\n"
|
||||
msgstr " Liigun järgmisele \\n"
|
||||
|
||||
#: src/reader.c:80
|
||||
#: src/reader.c:91
|
||||
#, c-format
|
||||
msgid " Skipping to next %c"
|
||||
msgstr " Liigun järgmisele %c"
|
||||
|
||||
#: src/reader.c:131 src/reader.c:143
|
||||
#: src/reader.c:142 src/reader.c:154
|
||||
msgid "invalid $ value"
|
||||
msgstr "vigane $ väärtus"
|
||||
|
||||
#: src/reader.c:169 src/reader.c:184
|
||||
#: src/reader.c:180 src/reader.c:195
|
||||
msgid "unterminated string at end of file"
|
||||
msgstr "lõpetamata sõne faili lõpus"
|
||||
|
||||
#: src/reader.c:172
|
||||
#: src/reader.c:183
|
||||
msgid "unterminated string"
|
||||
msgstr "lõpetamata sõne"
|
||||
|
||||
#: src/reader.c:325 src/reader.c:389
|
||||
#: src/reader.c:336 src/reader.c:400
|
||||
#, c-format
|
||||
msgid "%s is invalid"
|
||||
msgstr "%s on vigane"
|
||||
|
||||
#: src/reader.c:365
|
||||
#: src/reader.c:376
|
||||
#, c-format
|
||||
msgid "$$ of `%s' has no declared type"
|
||||
msgstr "`%s' $$ ei oma deklareeritud tüüpi"
|
||||
|
||||
#: src/reader.c:382
|
||||
#: src/reader.c:393
|
||||
#, c-format
|
||||
msgid "$%d of `%s' has no declared type"
|
||||
msgstr "$%d `%s' ei oma deklareeritud tüüpi"
|
||||
|
||||
#: src/reader.c:436
|
||||
#: src/reader.c:447
|
||||
msgid "unterminated `%{' definition"
|
||||
msgstr "lõpetamata `%{' definitsioon"
|
||||
|
||||
#: src/reader.c:481 src/reader.c:595 src/reader.c:645
|
||||
#: src/reader.c:492 src/reader.c:607 src/reader.c:657
|
||||
#, c-format
|
||||
msgid "Premature EOF after %s"
|
||||
msgstr "Enneaegne EOF peale %s"
|
||||
|
||||
#: src/reader.c:498
|
||||
#: src/reader.c:509
|
||||
#, c-format
|
||||
msgid "symbol `%s' used more than once as a literal string"
|
||||
msgstr "sümbolit `%s' on kasutatud enam kui kord literaal sõnena"
|
||||
|
||||
#: src/reader.c:501
|
||||
#: src/reader.c:512
|
||||
#, c-format
|
||||
msgid "symbol `%s' given more than one literal string"
|
||||
msgstr "sümbolile `%s' on antud enam kui üks literaal sõne"
|
||||
|
||||
#: src/reader.c:522 src/reader.c:664
|
||||
#: src/reader.c:533 src/reader.c:676
|
||||
#, c-format
|
||||
msgid "symbol %s redefined"
|
||||
msgstr "sümbol %s on uuesti defineeritud"
|
||||
|
||||
#: src/reader.c:532 src/reader.c:610 src/reader.c:671 src/reader.c:1285
|
||||
#: src/reader.c:543 src/reader.c:622 src/reader.c:683 src/reader.c:1298
|
||||
#, c-format
|
||||
msgid "type redeclaration for %s"
|
||||
msgstr "%s tüübi uuesti deklareerimine"
|
||||
|
||||
#: src/reader.c:541
|
||||
#: src/reader.c:552
|
||||
#, c-format
|
||||
msgid "`%s' is invalid in %s"
|
||||
msgstr "`%s' ei ole %s sees lubatud"
|
||||
|
||||
#: src/reader.c:558 src/reader.c:717
|
||||
#: src/reader.c:570 src/reader.c:735
|
||||
#, c-format
|
||||
msgid "multiple %s declarations"
|
||||
msgstr "korduvad %s deklaratsioonid"
|
||||
|
||||
#: src/reader.c:560 src/reader.c:897 src/reader.c:922 src/reader.c:1263
|
||||
#: src/reader.c:572 src/reader.c:914 src/reader.c:939 src/reader.c:1276
|
||||
#, c-format
|
||||
msgid "invalid %s declaration"
|
||||
msgstr "vigane %s deklaratsioon"
|
||||
|
||||
#: src/reader.c:580
|
||||
#: src/reader.c:592
|
||||
msgid "%type declaration has no <typename>"
|
||||
msgstr "%type deklaratsioonis puudub <tüübinimi>"
|
||||
|
||||
#: src/reader.c:615
|
||||
#: src/reader.c:627
|
||||
#, c-format
|
||||
msgid "invalid %%type declaration due to item: %s"
|
||||
msgstr "vigane %%type deklaratsioon, element: %s"
|
||||
|
||||
#: src/reader.c:660
|
||||
#: src/reader.c:672
|
||||
#, c-format
|
||||
msgid "redefining precedence of %s"
|
||||
msgstr "%s prioriteedi uus definitsioon"
|
||||
|
||||
#: src/reader.c:683
|
||||
#: src/reader.c:695
|
||||
#, c-format
|
||||
msgid "invalid text (%s) - number should be after identifier"
|
||||
msgstr "vigane tekst (%s) - number peab olema peale identifikaatorit"
|
||||
|
||||
#: src/reader.c:693
|
||||
#: src/reader.c:705
|
||||
#, c-format
|
||||
msgid "unexpected item: %s"
|
||||
msgstr "ootamatu element: %s"
|
||||
|
||||
#: src/reader.c:760 src/reader.c:1089 src/reader.c:1160
|
||||
#: src/reader.c:778 src/reader.c:1110 src/reader.c:1187
|
||||
#, c-format
|
||||
msgid "unmatched %s"
|
||||
msgstr "puudub %s"
|
||||
|
||||
#: src/reader.c:792
|
||||
#: src/reader.c:810
|
||||
#, c-format
|
||||
msgid "argument of %%expect is not an integer"
|
||||
msgstr "%%expect argument ei ole täisarv"
|
||||
|
||||
#: src/reader.c:838
|
||||
#: src/reader.c:856
|
||||
#, c-format
|
||||
msgid "unrecognized item %s, expected an identifier"
|
||||
msgstr "tundmatu element %s, eeldasin identifikaatorit"
|
||||
|
||||
#: src/reader.c:862
|
||||
#: src/reader.c:878
|
||||
#, c-format
|
||||
msgid "expected string constant instead of %s"
|
||||
msgstr "eeldasin %s asemel sõnekonstanti"
|
||||
|
||||
#: src/reader.c:1005
|
||||
#: src/reader.c:1026
|
||||
#, c-format
|
||||
msgid "unrecognized: %s"
|
||||
msgstr "tundmatu: %s"
|
||||
|
||||
#: src/reader.c:1010
|
||||
#: src/reader.c:1031
|
||||
msgid "no input grammar"
|
||||
msgstr "sisendgrammatikat pole"
|
||||
|
||||
#: src/reader.c:1015
|
||||
#: src/reader.c:1036
|
||||
#, c-format
|
||||
msgid "unknown character: %s"
|
||||
msgstr "tundmatu sümbol: %s"
|
||||
|
||||
#: src/reader.c:1183
|
||||
#: src/reader.c:1210
|
||||
#, c-format
|
||||
msgid "unterminated %guard clause"
|
||||
msgstr "lõpetamata %guard klausel"
|
||||
|
||||
#: src/reader.c:1350
|
||||
#: src/reader.c:1363
|
||||
msgid "ill-formed rule: initial symbol not followed by colon"
|
||||
msgstr "vigaselt formeeritud reegel: algsümbolile ei järgne koolonit"
|
||||
|
||||
#: src/reader.c:1357
|
||||
#: src/reader.c:1370
|
||||
msgid "grammar starts with vertical bar"
|
||||
msgstr "grammatika algab püstkriipsuga"
|
||||
|
||||
#: src/reader.c:1388
|
||||
#: src/reader.c:1398
|
||||
#, c-format
|
||||
msgid "rule given for %s, which is a token"
|
||||
msgstr "%s jaoks on antud reegel, aga see on märk"
|
||||
|
||||
#: src/reader.c:1490
|
||||
#: src/reader.c:1498
|
||||
msgid "two @prec's in a row"
|
||||
msgstr "kaks @prec ühel real"
|
||||
|
||||
#: src/reader.c:1498
|
||||
#: src/reader.c:1506
|
||||
#, c-format
|
||||
msgid "%%guard present but %%semantic_parser not specified"
|
||||
msgstr "%%guard on määratud, aga %%semantic_parser ei ole"
|
||||
|
||||
#: src/reader.c:1507
|
||||
#: src/reader.c:1515
|
||||
msgid "two actions at end of one rule"
|
||||
msgstr "kaks tegevust ühe reegli lõpus"
|
||||
|
||||
#: src/reader.c:1521
|
||||
#: src/reader.c:1529
|
||||
#, c-format
|
||||
msgid "type clash (`%s' `%s') on default action"
|
||||
msgstr "vaikimisi tegevuse tüübikonflikt (`%s' `%s')"
|
||||
|
||||
#: src/reader.c:1527
|
||||
#: src/reader.c:1535
|
||||
msgid "empty rule for typed nonterminal, and no action"
|
||||
msgstr "tüübiga mitteterminalil on tühi reegel ja puudub tegevus"
|
||||
|
||||
#: src/reader.c:1571
|
||||
#: src/reader.c:1579
|
||||
#, c-format
|
||||
msgid "invalid input: %s"
|
||||
msgstr "vigane sisend: %s"
|
||||
|
||||
#: src/reader.c:1579
|
||||
#: src/reader.c:1587
|
||||
#, c-format
|
||||
msgid "too many symbols (tokens plus nonterminals); maximum %d"
|
||||
msgstr "liiga palju sümboleid (märgid ja mitteterminalid); maksimaalne on %d"
|
||||
|
||||
#: src/reader.c:1582
|
||||
#: src/reader.c:1590
|
||||
msgid "no rules in the input grammar"
|
||||
msgstr "sisendgrammatikas pole reegleid"
|
||||
|
||||
#: src/reader.c:1606
|
||||
#: src/reader.c:1614
|
||||
#, c-format
|
||||
msgid "symbol %s is used, but is not defined as a token and has no rules"
|
||||
msgstr ""
|
||||
"kasutatakse sümbolit %s, mis ei ole defineeritud märgina ja millel puuduvad "
|
||||
"reeglid"
|
||||
|
||||
#: src/reader.c:1712
|
||||
#, c-format
|
||||
msgid "conflicting precedences for %s and %s"
|
||||
msgstr "%s ja %s omavad konfliktseid prioriteete"
|
||||
|
||||
#: src/reader.c:1724
|
||||
#, c-format
|
||||
msgid "conflicting assoc values for %s and %s"
|
||||
msgstr "%s ja %s omavad konfliktseid assotsiatiivseid väärtuseid"
|
||||
|
||||
#: src/reader.c:1770
|
||||
#: src/reader.c:1749
|
||||
#, c-format
|
||||
msgid "tokens %s and %s both assigned number %d"
|
||||
msgstr "märkidele %s ja %s on mõlemale omistatud number %d"
|
||||
|
||||
#: src/reader.c:1782
|
||||
#: src/reader.c:1802
|
||||
#, c-format
|
||||
msgid "conflicting precedences for %s and %s"
|
||||
msgstr "%s ja %s omavad konfliktseid prioriteete"
|
||||
|
||||
#: src/reader.c:1814
|
||||
#, c-format
|
||||
msgid "conflicting assoc values for %s and %s"
|
||||
msgstr "%s ja %s omavad konfliktseid assotsiatiivseid väärtuseid"
|
||||
|
||||
#: src/reader.c:1853
|
||||
#, c-format
|
||||
msgid "the start symbol %s is undefined"
|
||||
msgstr "stardisümbol %s ei ole defineeritud"
|
||||
|
||||
#: src/reader.c:1784
|
||||
#: src/reader.c:1855
|
||||
#, c-format
|
||||
msgid "the start symbol %s is a token"
|
||||
msgstr "stardisümbol %s on märk"
|
||||
|
||||
#: src/reduce.c:401
|
||||
#: src/reduce.c:409
|
||||
msgid "Useless nonterminals:"
|
||||
msgstr "Kasutamata mitteterminalid:"
|
||||
|
||||
#: src/reduce.c:416
|
||||
#: src/reduce.c:422
|
||||
msgid "Terminals which are not used:"
|
||||
msgstr "Terminalid, mida ei kasutatud:"
|
||||
|
||||
#: src/reduce.c:427
|
||||
#: src/reduce.c:433
|
||||
msgid "Useless rules:"
|
||||
msgstr "Kasutamata reeglid:"
|
||||
|
||||
#: src/reduce.c:456
|
||||
msgid ""
|
||||
"Variables\n"
|
||||
"---------\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Muutujad\n"
|
||||
"--------\n"
|
||||
"\n"
|
||||
|
||||
#: src/reduce.c:458
|
||||
msgid "Value Sprec Sassoc Tag\n"
|
||||
msgstr "Value Sprec Sassoc Tag\n"
|
||||
|
||||
#: src/reduce.c:463
|
||||
msgid ""
|
||||
"Rules\n"
|
||||
"-----\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Reeglid\n"
|
||||
"-------\n"
|
||||
"\n"
|
||||
|
||||
#: src/reduce.c:474
|
||||
msgid ""
|
||||
"Rules interpreted\n"
|
||||
"-----------------\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Interpreteeritud reeglid\n"
|
||||
"------------------------\n"
|
||||
"\n"
|
||||
|
||||
#: src/reduce.c:491
|
||||
#: src/reduce.c:503
|
||||
#, c-format
|
||||
msgid "%d rules never reduced\n"
|
||||
msgstr "%d reeglit ei redutseeritud\n"
|
||||
msgid "%d rule never reduced\n"
|
||||
msgid_plural "%d rules never reduced\n"
|
||||
msgstr[0] "%d reegel ei redutseeru\n"
|
||||
msgstr[1] "%d reeglit ei redutseeru\n"
|
||||
|
||||
#: src/reduce.c:493
|
||||
#: src/reduce.c:511
|
||||
#, c-format
|
||||
msgid "%s contains "
|
||||
msgstr "%s sisaldab "
|
||||
msgid "%d useless nonterminal"
|
||||
msgid_plural "%d useless nonterminals"
|
||||
msgstr[0] "%d kasutamata mitteterminal"
|
||||
msgstr[1] "%d kasutamata mitteterminali"
|
||||
|
||||
#: src/reduce.c:497
|
||||
#, c-format
|
||||
msgid "%d useless nonterminal%s"
|
||||
msgstr "%d kasutamata mitteterminali%s"
|
||||
|
||||
#: src/reduce.c:502
|
||||
#: src/reduce.c:517
|
||||
msgid " and "
|
||||
msgstr " ja "
|
||||
|
||||
#: src/reduce.c:506
|
||||
#: src/reduce.c:520
|
||||
#, c-format
|
||||
msgid "%d useless rule%s"
|
||||
msgstr "%d kasutamata reeglit%s"
|
||||
msgid "%d useless rule"
|
||||
msgid_plural "%d useless rules"
|
||||
msgstr[0] "%d kasutamata reegel"
|
||||
msgstr[1] "%d kasutamata reeglit"
|
||||
|
||||
#: src/reduce.c:539
|
||||
#: src/reduce.c:551
|
||||
#, c-format
|
||||
msgid "Start symbol %s does not derive any sentence"
|
||||
msgstr "Stardisümbolist %s ei tuletata ühtegi lauset"
|
||||
|
||||
#: src/reduce.c:552
|
||||
#, c-format
|
||||
msgid ""
|
||||
"reduced %s defines %d terminal%s, %d nonterminal%s, and %d production%s.\n"
|
||||
msgstr ""
|
||||
"redutseeritud %s defineerib %d terminali%s, %d mitteterminali%s ja %d reeglit"
|
||||
"%s.\n"
|
||||
|
||||
#: lib/getopt.c:675
|
||||
#: lib/getopt.c:694
|
||||
#, c-format
|
||||
msgid "%s: option `%s' is ambiguous\n"
|
||||
msgstr "%s: võti `%s' on segane\n"
|
||||
|
||||
#: lib/getopt.c:700
|
||||
#: lib/getopt.c:719
|
||||
#, c-format
|
||||
msgid "%s: option `--%s' doesn't allow an argument\n"
|
||||
msgstr "%s: võti `--%s' ei luba argumenti\n"
|
||||
|
||||
#: lib/getopt.c:705
|
||||
#: lib/getopt.c:724
|
||||
#, c-format
|
||||
msgid "%s: option `%c%s' doesn't allow an argument\n"
|
||||
msgstr "%s: võti `%c%s' ei luba argumenti\n"
|
||||
|
||||
#: lib/getopt.c:723 lib/getopt.c:896
|
||||
#: lib/getopt.c:742 lib/getopt.c:915
|
||||
#, c-format
|
||||
msgid "%s: option `%s' requires an argument\n"
|
||||
msgstr "%s: võti `%s' nõuab argumenti\n"
|
||||
|
||||
#. --option
|
||||
#: lib/getopt.c:752
|
||||
#: lib/getopt.c:771
|
||||
#, c-format
|
||||
msgid "%s: unrecognized option `--%s'\n"
|
||||
msgstr "%s: tundmatu võti `--%s'\n"
|
||||
|
||||
#. +option or -option
|
||||
#: lib/getopt.c:756
|
||||
#: lib/getopt.c:775
|
||||
#, c-format
|
||||
msgid "%s: unrecognized option `%c%s'\n"
|
||||
msgstr "%s: tundmatu võti `%c%s'\n"
|
||||
|
||||
#. 1003.2 specifies the format of this message.
|
||||
#: lib/getopt.c:782
|
||||
#: lib/getopt.c:801
|
||||
#, c-format
|
||||
msgid "%s: illegal option -- %c\n"
|
||||
msgstr "%s: lubamatu võti -- %c\n"
|
||||
|
||||
#: lib/getopt.c:785
|
||||
#: lib/getopt.c:804
|
||||
#, c-format
|
||||
msgid "%s: invalid option -- %c\n"
|
||||
msgstr "%s: vigane võti -- %c\n"
|
||||
|
||||
#. 1003.2 specifies the format of this message.
|
||||
#: lib/getopt.c:815 lib/getopt.c:945
|
||||
#: lib/getopt.c:834 lib/getopt.c:964
|
||||
#, c-format
|
||||
msgid "%s: option requires an argument -- %c\n"
|
||||
msgstr "%s: võti nõuab argumenti -- %c\n"
|
||||
|
||||
#: lib/getopt.c:862
|
||||
#: lib/getopt.c:881
|
||||
#, c-format
|
||||
msgid "%s: option `-W %s' is ambiguous\n"
|
||||
msgstr "%s: võti `-W %s' on segane\n"
|
||||
|
||||
#: lib/getopt.c:880
|
||||
#: lib/getopt.c:899
|
||||
#, c-format
|
||||
msgid "%s: option `-W %s' doesn't allow an argument\n"
|
||||
msgstr "%s: võti `-W %s' ei luba argumenti\n"
|
||||
|
||||
#. If XALLOC_FAIL_FUNC is NULL, or does return, display this message
|
||||
#. before exiting when memory is exhausted. Goes through gettext.
|
||||
#: lib/obstack.c:477 lib/xmalloc.c:66
|
||||
#: lib/obstack.c:494 lib/obstack.c:497 lib/xmalloc.c:66
|
||||
msgid "memory exhausted"
|
||||
msgstr "mälu on otsas"
|
||||
|
||||
@@ -783,19 +751,10 @@ msgstr "m
|
||||
#. MARK). A British English Unicode locale should instead
|
||||
#. translate these to U+2018 (LEFT SINGLE QUOTATION MARK) and
|
||||
#. U+2019 (RIGHT SINGLE QUOTATION MARK), respectively.
|
||||
#: lib/quotearg.c:268
|
||||
#: lib/quotearg.c:274
|
||||
msgid "`"
|
||||
msgstr "`"
|
||||
|
||||
#: lib/quotearg.c:269
|
||||
#: lib/quotearg.c:275
|
||||
msgid "'"
|
||||
msgstr "'"
|
||||
|
||||
#~ msgid "\t\t/* empty */"
|
||||
#~ msgstr "\t\t/* tühi */"
|
||||
|
||||
#~ msgid "multiple %%header_extension declarations"
|
||||
#~ msgstr "korduvad %%header_extension eklaratsioonid"
|
||||
|
||||
#~ msgid "multiple %%source_extension declarations"
|
||||
#~ msgstr "korduvad %%source_extension deklaratsioonid"
|
||||
|
||||
@@ -0,0 +1,768 @@
|
||||
# Italian translation for message of GNU bison.
|
||||
# Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
# Paolo Bonzini <[email protected]>, 2002.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: bison 1.31\n"
|
||||
"POT-Creation-Date: 2002-01-23 14:12+0100\n"
|
||||
"PO-Revision-Date: 2002-01-23 14:16+0100\n"
|
||||
"Last-Translator: Paolo Bonzini <[email protected]>\n"
|
||||
"Language-Team: Italian <[email protected]>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=ISO-8859-1\n"
|
||||
"Content-Transfer-Encoding: 8-bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: src/LR0.c:189
|
||||
#, c-format
|
||||
msgid "too many states (max %d)"
|
||||
msgstr "troppi stati (massimo %d)"
|
||||
|
||||
#: lib/error.c:128 lib/error.c:156 src/complain.c:99
|
||||
msgid "Unknown system error"
|
||||
msgstr "Errore di sistema sconosciuto"
|
||||
|
||||
#: src/complain.c:150
|
||||
msgid "warning: "
|
||||
msgstr "attenzione: "
|
||||
|
||||
#: src/complain.c:238
|
||||
msgid "fatal error: "
|
||||
msgstr "errore fatale: "
|
||||
|
||||
#: src/conflicts.c:44
|
||||
#, c-format
|
||||
msgid "Conflict in state %d between rule %d and token %s resolved as %s.\n"
|
||||
msgstr ""
|
||||
"Conflitto nello stato %d tra la regola %d e il token %s risolto come %s.\n"
|
||||
|
||||
#: src/conflicts.c:94 src/conflicts.c:119
|
||||
msgid "reduce"
|
||||
msgstr "riduzione"
|
||||
|
||||
#: src/conflicts.c:101 src/conflicts.c:115
|
||||
msgid "shift"
|
||||
msgstr "shift"
|
||||
|
||||
#: src/conflicts.c:123
|
||||
msgid "an error"
|
||||
msgstr "un errore"
|
||||
|
||||
#: src/conflicts.c:302
|
||||
#, c-format
|
||||
msgid "%d shift/reduce conflict"
|
||||
msgid_plural "%d shift/reduce conflicts"
|
||||
msgstr[0] "%d conflitto shift/riduzione"
|
||||
msgstr[1] "%d conflitti shift/riduzione"
|
||||
|
||||
#: src/conflicts.c:309
|
||||
msgid "and"
|
||||
msgstr "e"
|
||||
|
||||
#: src/conflicts.c:315
|
||||
#, c-format
|
||||
msgid "%d reduce/reduce conflict"
|
||||
msgid_plural "%d reduce/reduce conflicts"
|
||||
msgstr[0] "%d conflitto riduzione/riduzione"
|
||||
msgstr[1] "%d conflitti riduzione/riduzione"
|
||||
|
||||
#: src/conflicts.c:340
|
||||
#, c-format
|
||||
msgid "State %d contains "
|
||||
msgstr "Lo stato %d contiene"
|
||||
|
||||
#. If invoked with `--yacc', use the output format specified by
|
||||
#. POSIX.
|
||||
#: src/conflicts.c:387
|
||||
msgid "conflicts: "
|
||||
msgstr "conflitti: "
|
||||
|
||||
#: src/conflicts.c:389
|
||||
#, c-format
|
||||
msgid " %d shift/reduce"
|
||||
msgstr " %d shift/riduzione"
|
||||
|
||||
#: src/conflicts.c:393
|
||||
#, c-format
|
||||
msgid " %d reduce/reduce"
|
||||
msgstr " %d riduzione/riduzione"
|
||||
|
||||
#: src/conflicts.c:398 src/reduce.c:508
|
||||
#, c-format
|
||||
msgid "%s contains "
|
||||
msgstr "%s contiene "
|
||||
|
||||
#: src/conflicts.c:412
|
||||
#, c-format
|
||||
msgid "expected %d shift/reduce conflict\n"
|
||||
msgid_plural "expected %d shift/reduce conflicts\n"
|
||||
msgstr[0] "atteso %d conflitto shift/riduzione\n"
|
||||
msgstr[1] "attesi %d conflitti shift/riduzione\n"
|
||||
|
||||
#: src/conflicts.c:463 src/conflicts.c:540
|
||||
#, c-format
|
||||
msgid " %-4s\t[reduce using rule %d (%s)]\n"
|
||||
msgstr " %-4s\t[riduzione con la regole %d (%s)]\n"
|
||||
|
||||
#: src/conflicts.c:467 src/print.c:154
|
||||
#, c-format
|
||||
msgid ""
|
||||
" $default\treduce using rule %d (%s)\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
" $default\triduzione con la regola %d (%s)\n"
|
||||
"\n"
|
||||
|
||||
#: src/conflicts.c:521 src/conflicts.c:534
|
||||
#, c-format
|
||||
msgid " %-4s\treduce using rule %d (%s)\n"
|
||||
msgstr " %-4s\triduzione con la regola %d (%s)\n"
|
||||
|
||||
#: src/conflicts.c:550
|
||||
#, c-format
|
||||
msgid " $default\treduce using rule %d (%s)\n"
|
||||
msgstr " $default\triduzione con la regola %d (%s)\n"
|
||||
|
||||
#: src/files.c:150
|
||||
#, c-format
|
||||
msgid "cannot open file `%s'"
|
||||
msgstr "impossibile aprire il file `%s'"
|
||||
|
||||
#: src/files.c:169
|
||||
msgid "cannot close file"
|
||||
msgstr "impossibile chiudere il file `%s'"
|
||||
|
||||
#. Some efforts were made to ease the translators' task, please
|
||||
#. continue.
|
||||
#: src/getargs.c:84
|
||||
msgid "GNU bison generates parsers for LALR(1) grammars.\n"
|
||||
msgstr "GNU bison genera parser per grammatiche LALR(1).\n"
|
||||
|
||||
#: src/getargs.c:88
|
||||
#, c-format
|
||||
msgid "Usage: %s [OPTION]... FILE\n"
|
||||
msgstr "Utilizzo: %s [OPZIONE]... FILE\n"
|
||||
|
||||
#: src/getargs.c:92
|
||||
msgid ""
|
||||
"If a long option shows an argument as mandatory, then it is mandatory\n"
|
||||
"for the equivalent short option also. Similarly for optional arguments.\n"
|
||||
msgstr ""
|
||||
"Se un argomento è indicato come obbligatorio in un'opzione lunga, allora\n"
|
||||
"è obbligatorio anche per l'equivalente opzione corta. Analogamente per\n"
|
||||
"gli argomenti opzionali.\n"
|
||||
|
||||
#: src/getargs.c:98
|
||||
msgid ""
|
||||
"Operation modes:\n"
|
||||
" -h, --help display this help and exit\n"
|
||||
" -V, --version output version information and exit\n"
|
||||
" -y, --yacc emulate POSIX yacc\n"
|
||||
msgstr ""
|
||||
"Modalità operative:\n"
|
||||
" -h, --help mostra questo aiuto ed esce\n"
|
||||
" -V, --version mostra informazioni sulla versione ed esce\n"
|
||||
" -y, --yacc emula il comportamento di POSIX yacc\n"
|
||||
|
||||
#: src/getargs.c:105
|
||||
msgid ""
|
||||
"Parser:\n"
|
||||
" -S, --skeleton=FILE specify the skeleton to use\n"
|
||||
" -t, --debug instrument the parser for debugging\n"
|
||||
" --locations enable locations computation\n"
|
||||
" -p, --name-prefix=PREFIX prepend PREFIX to the external symbols\n"
|
||||
" -l, --no-lines don't generate `#line' directives\n"
|
||||
" -n, --no-parser generate the tables only\n"
|
||||
" -k, --token-table include a table of token names\n"
|
||||
msgstr ""
|
||||
" -S, --skeleton=FILE specifica lo scheletro da usare\n"
|
||||
" -t, --debug aggiunge informazioni di debug al parser\n"
|
||||
" --locations abilita il calcolo delle locazioni (@N)\n"
|
||||
" -p, --name-prefix=PREFIX prepone PREFIX ai simboli globali\n"
|
||||
" -l, --no-lines non genera direttive `#line'\n"
|
||||
" -n, --no-parser genera le sole tabelle\n"
|
||||
" -k, --token-table include una tabella di nomi dei token\n"
|
||||
|
||||
#: src/getargs.c:117
|
||||
msgid ""
|
||||
"Output:\n"
|
||||
" -d, --defines also produce a header file\n"
|
||||
" -v, --verbose also produce an explanation of the automaton\n"
|
||||
" -b, --file-prefix=PREFIX specify a PREFIX for output files\n"
|
||||
" -o, --output=FILE leave output to FILE\n"
|
||||
" -g, --graph also produce a VCG description of the "
|
||||
"automaton\n"
|
||||
msgstr ""
|
||||
"Output:\n"
|
||||
" -d, --defines produce anche uno header\n"
|
||||
" -v, --verbose produce anche una spiegazione dell'automa\n"
|
||||
" -b, --file-prefix=PREFIX specifica un prefisso per il file di output\n"
|
||||
" -o, --output=FILE lascia l'output in FILE\n"
|
||||
" -g, --graph produce anche una descrizione VCG dell'automa\n"
|
||||
|
||||
#: src/getargs.c:127
|
||||
msgid "Report bugs to <[email protected]>.\n"
|
||||
msgstr "Segnalare eventuali bug a <[email protected]>.\n"
|
||||
|
||||
#. Some efforts were made to ease the translators' task, please
|
||||
#. continue.
|
||||
#: src/getargs.c:141
|
||||
#, c-format
|
||||
msgid "bison (GNU Bison) %s"
|
||||
msgstr "bison (GNU Bison) %s"
|
||||
|
||||
#: src/getargs.c:146
|
||||
msgid ""
|
||||
"Copyright 1984, 1986, 1989, 1992, 2000, 2001, 2002\n"
|
||||
"Free Software Foundation, Inc.\n"
|
||||
msgstr ""
|
||||
"Copyright 1984, 1986, 1989, 1992, 2000, 2001, 2002\n"
|
||||
"Free Software Foundation, Inc.\n"
|
||||
|
||||
#: src/getargs.c:151
|
||||
msgid ""
|
||||
"This is free software; see the source for copying conditions. There is NO\n"
|
||||
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
|
||||
msgstr ""
|
||||
"Questo e' software libero; vedere il sorgente per le condizioni cui e'\n"
|
||||
"sottoposta la copia. NON c'è ALCUNA garanzia, neanche di\n"
|
||||
"COMMERCIABILITA` o di ADEGUATEZZA AD UN PARTICOLARE SCOPO.\n"
|
||||
|
||||
#: src/getargs.c:224 src/lex.c:705
|
||||
#, c-format
|
||||
msgid "`%s' is no longer supported"
|
||||
msgstr "`%s' non è più supportato"
|
||||
|
||||
#: src/getargs.c:248
|
||||
#, c-format
|
||||
msgid "Try `%s --help' for more information.\n"
|
||||
msgstr "Provare `%s --help' per ulteriori informazioni.\n"
|
||||
|
||||
#: src/getargs.c:255
|
||||
#, c-format
|
||||
msgid "%s: no grammar file given\n"
|
||||
msgstr "%s: nessun file grammatica specificato\n"
|
||||
|
||||
#: src/getargs.c:259
|
||||
#, c-format
|
||||
msgid "%s: extra arguments ignored after `%s'\n"
|
||||
msgstr "%s: ignorati gli argomenti successivi a `%s'\n"
|
||||
|
||||
#: src/lalr.c:256
|
||||
#, c-format
|
||||
msgid "too many gotos (max %d)"
|
||||
msgstr "troppi goto (max %d)"
|
||||
|
||||
#: src/lex.c:76
|
||||
msgid "unexpected `/' found and ignored"
|
||||
msgstr "`/' inatteso, trovato e ignorato"
|
||||
|
||||
#: src/lex.c:105 src/reader.c:280
|
||||
msgid "unterminated comment"
|
||||
msgstr "commento non terminato"
|
||||
|
||||
#: src/lex.c:137
|
||||
msgid "unexpected end of file"
|
||||
msgstr "fine del file inattesa"
|
||||
|
||||
# Oder soll man den Begriff "Escapezeichen" verwenden?
|
||||
#: src/lex.c:166
|
||||
msgid "unescaped newline in constant"
|
||||
msgstr "fine di linea non preceduta da `\\' in una costante"
|
||||
|
||||
#: src/lex.c:208
|
||||
#, c-format
|
||||
msgid "octal value outside range 0...255: `\\%o'"
|
||||
msgstr "valore ottale fuori dall'intervallo 0...255: `\\%o'"
|
||||
|
||||
#: src/lex.c:233
|
||||
#, c-format
|
||||
msgid "hexadecimal value above 255: `\\x%x'"
|
||||
msgstr "valore esadecimale superiore a 255: `\\x%x'"
|
||||
|
||||
#: src/lex.c:245
|
||||
#, c-format
|
||||
msgid "unknown escape sequence: `\\' followed by `%s'"
|
||||
msgstr "sequenza di escape sconosciuta: `\\' seguito da `%s'"
|
||||
|
||||
#: src/lex.c:342
|
||||
msgid "unterminated type name at end of file"
|
||||
msgstr "nome di tipo non terminato a fine file"
|
||||
|
||||
#: src/lex.c:345
|
||||
msgid "unterminated type name"
|
||||
msgstr "nome di tipo non terminato"
|
||||
|
||||
#: src/lex.c:438
|
||||
msgid "use \"...\" for multi-character literal tokens"
|
||||
msgstr "usa \"...\" per token letterali di più caratteri"
|
||||
|
||||
#: src/lex.c:678
|
||||
#, c-format
|
||||
msgid "`%s' supports no argument: %s"
|
||||
msgstr "`%s' non supporta argomenti: %s"
|
||||
|
||||
#: src/lex.c:694
|
||||
#, c-format
|
||||
msgid "`%s' requires an argument"
|
||||
msgstr "`%s' richiede un argomento"
|
||||
|
||||
#: src/output.c:951
|
||||
#, c-format
|
||||
msgid "maximum table size (%d) exceeded"
|
||||
msgstr "ecceduta la dimensione massima di una tabella (%d)"
|
||||
|
||||
#: src/print.c:39
|
||||
#, c-format
|
||||
msgid " type %d is %s\n"
|
||||
msgstr " il tipo %d è %s\n"
|
||||
|
||||
#: src/print.c:88
|
||||
#, c-format
|
||||
msgid " (rule %d)"
|
||||
msgstr " (regola %d)"
|
||||
|
||||
#: src/print.c:108
|
||||
msgid " $default\taccept\n"
|
||||
msgstr " $default\taccetta\n"
|
||||
|
||||
#: src/print.c:110
|
||||
msgid " NO ACTIONS\n"
|
||||
msgstr " NESSUNA AZIONE\n"
|
||||
|
||||
#: src/print.c:124
|
||||
#, c-format
|
||||
msgid " $ \tgo to state %d\n"
|
||||
msgstr " $ \tprosecuzione allo stato %d\n"
|
||||
|
||||
#: src/print.c:127
|
||||
#, c-format
|
||||
msgid " %-4s\tshift, and go to state %d\n"
|
||||
msgstr " %-4s\tshift e prosecuzione allo stato %d\n"
|
||||
|
||||
#: src/print.c:142
|
||||
#, c-format
|
||||
msgid " %-4s\terror (nonassociative)\n"
|
||||
msgstr " %-4s\terrore (non associativo)\n"
|
||||
|
||||
#: src/print.c:169
|
||||
#, c-format
|
||||
msgid " %-4s\tgo to state %d\n"
|
||||
msgstr " %-4s\tprosecuzione allo stato %d\n"
|
||||
|
||||
#: src/print.c:180
|
||||
#, c-format
|
||||
msgid "state %d"
|
||||
msgstr "stato %d"
|
||||
|
||||
#. rule # : LHS -> RHS
|
||||
#: src/print.c:211
|
||||
msgid "Grammar"
|
||||
msgstr "Grammatica"
|
||||
|
||||
#: src/print.c:212
|
||||
msgid "Number, Line, Rule"
|
||||
msgstr "Numero, Linea, Regola"
|
||||
|
||||
#: src/print.c:217
|
||||
#, c-format
|
||||
msgid " %3d %3d %s ->"
|
||||
msgstr " %3d %3d %s ->"
|
||||
|
||||
#: src/print.c:224
|
||||
msgid "empty"
|
||||
msgstr "vuoto"
|
||||
|
||||
#. TERMINAL (type #) : rule #s terminal is on RHS
|
||||
#: src/print.c:231
|
||||
msgid "Terminals, with rules where they appear"
|
||||
msgstr "Simboli terminali e regole in cui appaiono"
|
||||
|
||||
#: src/print.c:256
|
||||
msgid "Nonterminals, with rules where they appear"
|
||||
msgstr "Simboli nonterminali e regole in cui appaiono"
|
||||
|
||||
#: src/print.c:282
|
||||
msgid " on left:"
|
||||
msgstr " nel primo membro:"
|
||||
|
||||
#: src/print.c:297
|
||||
msgid " on right:"
|
||||
msgstr " nel secondo membro:"
|
||||
|
||||
#. If something has been added in the NODE_OBSTACK after
|
||||
#. the declaration of the label, then we need a `\n'.
|
||||
#. if (obstack_object_size (node_obstack) > node_output_size)
|
||||
#. obstack_sgrow (node_obstack, "\n");
|
||||
#.
|
||||
#: src/print_graph.c:146
|
||||
#, c-format
|
||||
msgid "%-4s\terror (nonassociative)"
|
||||
msgstr "%-4s\terrore (non associativo)"
|
||||
|
||||
#.
|
||||
#. if (obstack_object_size (node_obstack) > node_output_size)
|
||||
#. obstack_sgrow (node_obstack, "\n");
|
||||
#.
|
||||
#: src/print_graph.c:161
|
||||
#, c-format
|
||||
msgid "$default\treduce using rule %d (%s)"
|
||||
msgstr "$default\triduzione con la regola %d (%s)"
|
||||
|
||||
#: src/reader.c:89
|
||||
msgid " Skipping to next \\n"
|
||||
msgstr " Passo al successivo \\n"
|
||||
|
||||
#: src/reader.c:91
|
||||
#, c-format
|
||||
msgid " Skipping to next %c"
|
||||
msgstr " Passo al successivo %c"
|
||||
|
||||
#: src/reader.c:142 src/reader.c:154
|
||||
msgid "invalid $ value"
|
||||
msgstr "valore $ non valido"
|
||||
|
||||
#: src/reader.c:180 src/reader.c:195
|
||||
msgid "unterminated string at end of file"
|
||||
msgstr "stringa non terminata alla fine del file"
|
||||
|
||||
#: src/reader.c:183
|
||||
msgid "unterminated string"
|
||||
msgstr "stringa non terminata"
|
||||
|
||||
#: src/reader.c:336 src/reader.c:400
|
||||
#, c-format
|
||||
msgid "%s is invalid"
|
||||
msgstr "%s non è valido"
|
||||
|
||||
#: src/reader.c:376
|
||||
#, c-format
|
||||
msgid "$$ of `%s' has no declared type"
|
||||
msgstr "Manca una dichiarazione di tipo per $$ di `%s'"
|
||||
|
||||
#: src/reader.c:393
|
||||
#, c-format
|
||||
msgid "$%d of `%s' has no declared type"
|
||||
msgstr "Manca una dichiarazione di tipo per $%d di `%s'"
|
||||
|
||||
#: src/reader.c:447
|
||||
msgid "unterminated `%{' definition"
|
||||
msgstr "definizione `%{' non terminata"
|
||||
|
||||
#: src/reader.c:492 src/reader.c:607 src/reader.c:657
|
||||
#, c-format
|
||||
msgid "Premature EOF after %s"
|
||||
msgstr "Fine di file prematura dopo %s"
|
||||
|
||||
#: src/reader.c:509
|
||||
#, c-format
|
||||
msgid "symbol `%s' used more than once as a literal string"
|
||||
msgstr "simbolo `%s' usato più di una volta in una stringa letterale"
|
||||
|
||||
#: src/reader.c:512
|
||||
#, c-format
|
||||
msgid "symbol `%s' given more than one literal string"
|
||||
msgstr "il simbolo `%s' dà pi` di una stringa letterale"
|
||||
|
||||
#: src/reader.c:533 src/reader.c:676
|
||||
#, c-format
|
||||
msgid "symbol %s redefined"
|
||||
msgstr "simbolo %s ridefinito"
|
||||
|
||||
#: src/reader.c:543 src/reader.c:622 src/reader.c:683 src/reader.c:1298
|
||||
#, c-format
|
||||
msgid "type redeclaration for %s"
|
||||
msgstr "tipo dichiarato due volte per %s"
|
||||
|
||||
#: src/reader.c:552
|
||||
#, c-format
|
||||
msgid "`%s' is invalid in %s"
|
||||
msgstr "`%s' non è valido in %s"
|
||||
|
||||
#: src/reader.c:570 src/reader.c:735
|
||||
#, c-format
|
||||
msgid "multiple %s declarations"
|
||||
msgstr "dichiarazioni multiple per %s"
|
||||
|
||||
#: src/reader.c:572 src/reader.c:914 src/reader.c:939 src/reader.c:1276
|
||||
#, c-format
|
||||
msgid "invalid %s declaration"
|
||||
msgstr "dichiarazione %s non valida"
|
||||
|
||||
#: src/reader.c:592
|
||||
msgid "%type declaration has no <typename>"
|
||||
msgstr "dichiarazione %type senza <nome di tipo>"
|
||||
|
||||
#: src/reader.c:627
|
||||
#, c-format
|
||||
msgid "invalid %%type declaration due to item: %s"
|
||||
msgstr "dichiarazione %%type non valida per la presenza di `%s'"
|
||||
|
||||
#: src/reader.c:672
|
||||
#, c-format
|
||||
msgid "redefining precedence of %s"
|
||||
msgstr "precedenza di `%s' definita due volte"
|
||||
|
||||
#: src/reader.c:695
|
||||
#, c-format
|
||||
msgid "invalid text (%s) - number should be after identifier"
|
||||
msgstr "testo non valido (%s) - il numero dovrebbe seguire l'identificatore"
|
||||
|
||||
#: src/reader.c:705
|
||||
#, c-format
|
||||
msgid "unexpected item: %s"
|
||||
msgstr "elemento inatteso: %s"
|
||||
|
||||
#: src/reader.c:778 src/reader.c:1110 src/reader.c:1187
|
||||
#, c-format
|
||||
msgid "unmatched %s"
|
||||
msgstr "%s non bilanciato"
|
||||
|
||||
#: src/reader.c:810
|
||||
#, c-format
|
||||
msgid "argument of %%expect is not an integer"
|
||||
msgstr "L'argomento di %%expect non è un intero"
|
||||
|
||||
#: src/reader.c:856
|
||||
#, c-format
|
||||
msgid "unrecognized item %s, expected an identifier"
|
||||
msgstr "elemento %s non riconosciuto, atteso un identificatore"
|
||||
|
||||
#: src/reader.c:878
|
||||
#, c-format
|
||||
msgid "expected string constant instead of %s"
|
||||
msgstr "attesa una costante stringa invece di %s"
|
||||
|
||||
#: src/reader.c:1026
|
||||
#, c-format
|
||||
msgid "unrecognized: %s"
|
||||
msgstr "non riconosciuto: %s"
|
||||
|
||||
#: src/reader.c:1031
|
||||
msgid "no input grammar"
|
||||
msgstr "nessuna grammatica di input"
|
||||
|
||||
#: src/reader.c:1036
|
||||
#, c-format
|
||||
msgid "unknown character: %s"
|
||||
msgstr "carattere sconosciuto: %s"
|
||||
|
||||
#: src/reader.c:1210
|
||||
#, c-format
|
||||
msgid "unterminated %guard clause"
|
||||
msgstr "clausola %guard non terminata"
|
||||
|
||||
#: src/reader.c:1363
|
||||
msgid "ill-formed rule: initial symbol not followed by colon"
|
||||
msgstr "regola malformata: simbolo iniziale non seguito da `:'"
|
||||
|
||||
#: src/reader.c:1370
|
||||
msgid "grammar starts with vertical bar"
|
||||
msgstr "la grammatica comincia con un `|'"
|
||||
|
||||
#: src/reader.c:1398
|
||||
#, c-format
|
||||
msgid "rule given for %s, which is a token"
|
||||
msgstr "fornita una regola per il token %s"
|
||||
|
||||
#: src/reader.c:1498
|
||||
msgid "two @prec's in a row"
|
||||
msgstr "due @prec di seguito"
|
||||
|
||||
#: src/reader.c:1506
|
||||
#, c-format
|
||||
msgid "%%guard present but %%semantic_parser not specified"
|
||||
msgstr "trovato %%guard senza che sia specificato %%semantic_parser"
|
||||
|
||||
#: src/reader.c:1515
|
||||
msgid "two actions at end of one rule"
|
||||
msgstr "due azioni alla fine di una regola"
|
||||
|
||||
#: src/reader.c:1529
|
||||
#, c-format
|
||||
msgid "type clash (`%s' `%s') on default action"
|
||||
msgstr "conflitto di tipo (`%s' e `%s') nell'azione di default"
|
||||
|
||||
#: src/reader.c:1535
|
||||
msgid "empty rule for typed nonterminal, and no action"
|
||||
msgstr "regola vuota e nessuna azione per un nonterminale con tipo"
|
||||
|
||||
#: src/reader.c:1579
|
||||
#, c-format
|
||||
msgid "invalid input: %s"
|
||||
msgstr "input non valido: %s"
|
||||
|
||||
#: src/reader.c:1587
|
||||
#, c-format
|
||||
msgid "too many symbols (tokens plus nonterminals); maximum %d"
|
||||
msgstr "troppi simboli (token e nonterminali); il massimo è %d"
|
||||
|
||||
#: src/reader.c:1590
|
||||
msgid "no rules in the input grammar"
|
||||
msgstr "nessuna regola nella grammatica di input"
|
||||
|
||||
#: src/reader.c:1614
|
||||
#, c-format
|
||||
msgid "symbol %s is used, but is not defined as a token and has no rules"
|
||||
msgstr "usato il simbolo %s, ma non è un token e non ha regole"
|
||||
|
||||
#: src/reader.c:1749
|
||||
#, c-format
|
||||
msgid "tokens %s and %s both assigned number %d"
|
||||
msgstr "i token %s e %s hanno lo stesso numero %d"
|
||||
|
||||
#: src/reader.c:1802
|
||||
#, c-format
|
||||
msgid "conflicting precedences for %s and %s"
|
||||
msgstr "precedenze in conflitto per %s und %s"
|
||||
|
||||
#: src/reader.c:1814
|
||||
#, c-format
|
||||
msgid "conflicting assoc values for %s and %s"
|
||||
msgstr "associatività in conflitto per %s e %s"
|
||||
|
||||
#: src/reader.c:1853
|
||||
#, c-format
|
||||
msgid "the start symbol %s is undefined"
|
||||
msgstr "simbolo iniziale %s non definito"
|
||||
|
||||
#: src/reader.c:1855
|
||||
#, c-format
|
||||
msgid "the start symbol %s is a token"
|
||||
msgstr "specificato il token %s come simbolo iniziale"
|
||||
|
||||
#: src/reduce.c:409
|
||||
msgid "Useless nonterminals:"
|
||||
msgstr "Simboli nonterminali inutili:"
|
||||
|
||||
#: src/reduce.c:422
|
||||
msgid "Terminals which are not used:"
|
||||
msgstr "Simboli terminali inutilizzati:"
|
||||
|
||||
#: src/reduce.c:433
|
||||
msgid "Useless rules:"
|
||||
msgstr "Regole inutili:"
|
||||
|
||||
#: src/reduce.c:503
|
||||
#, c-format
|
||||
msgid "%d rule never reduced\n"
|
||||
msgid_plural "%d rules never reduced\n"
|
||||
msgstr[0] "%d regola non applicata\n"
|
||||
msgstr[1] "%d regole non applicate\n"
|
||||
|
||||
#: src/reduce.c:511
|
||||
#, c-format
|
||||
msgid "%d useless nonterminal"
|
||||
msgid_plural "%d useless nonterminals"
|
||||
msgstr[0] "%d simbolo nonterminale inutilizzato"
|
||||
msgstr[1] "%d simboli nonterminali inutilizzati"
|
||||
|
||||
#: src/reduce.c:517
|
||||
msgid " and "
|
||||
msgstr " e "
|
||||
|
||||
#: src/reduce.c:520
|
||||
#, c-format
|
||||
msgid "%d useless rule"
|
||||
msgid_plural "%d useless rules"
|
||||
msgstr[0] "%d regola inutile"
|
||||
msgstr[1] "%d regole inutili"
|
||||
|
||||
#: src/reduce.c:551
|
||||
#, c-format
|
||||
msgid "Start symbol %s does not derive any sentence"
|
||||
msgstr "dal simbolo iniziale %s non deriva alcuna frase"
|
||||
|
||||
#: lib/getopt.c:694
|
||||
#, c-format
|
||||
msgid "%s: option `%s' is ambiguous\n"
|
||||
msgstr "%s: l'opzione `%s' è ambigua\n"
|
||||
|
||||
#: lib/getopt.c:719
|
||||
#, c-format
|
||||
msgid "%s: option `--%s' doesn't allow an argument\n"
|
||||
msgstr "%s: l'opzione `--%s' non ammette argomenti\n"
|
||||
|
||||
#: lib/getopt.c:724
|
||||
#, c-format
|
||||
msgid "%s: option `%c%s' doesn't allow an argument\n"
|
||||
msgstr "%s: l'opzione `%c%s' non ammette argomenti\n"
|
||||
|
||||
#: lib/getopt.c:742 lib/getopt.c:915
|
||||
#, c-format
|
||||
msgid "%s: option `%s' requires an argument\n"
|
||||
msgstr "%s: l'opzione `%s' richiede un argomento\n"
|
||||
|
||||
#. --option
|
||||
#: lib/getopt.c:771
|
||||
#, c-format
|
||||
msgid "%s: unrecognized option `--%s'\n"
|
||||
msgstr "%s: opzione sconosciuta `--%s'\n"
|
||||
|
||||
#. +option or -option
|
||||
#: lib/getopt.c:775
|
||||
#, c-format
|
||||
msgid "%s: unrecognized option `%c%s'\n"
|
||||
msgstr "%s: opzione sconosciuta `%c%s'\n"
|
||||
|
||||
#. 1003.2 specifies the format of this message.
|
||||
#: lib/getopt.c:801
|
||||
#, c-format
|
||||
msgid "%s: illegal option -- %c\n"
|
||||
msgstr "%s: opzione non valida -- %c\n"
|
||||
|
||||
#: lib/getopt.c:804
|
||||
#, c-format
|
||||
msgid "%s: invalid option -- %c\n"
|
||||
msgstr "%s: opzione non valida -- %c\n"
|
||||
|
||||
#. 1003.2 specifies the format of this message.
|
||||
#: lib/getopt.c:834 lib/getopt.c:964
|
||||
#, c-format
|
||||
msgid "%s: option requires an argument -- %c\n"
|
||||
msgstr "%s: l'opzione richiede un argomento -- %c\n"
|
||||
|
||||
#: lib/getopt.c:881
|
||||
#, c-format
|
||||
msgid "%s: option `-W %s' is ambiguous\n"
|
||||
msgstr "%s: l'opzione `-W %s' è ambigua\n"
|
||||
|
||||
#: lib/getopt.c:899
|
||||
#, c-format
|
||||
msgid "%s: option `-W %s' doesn't allow an argument\n"
|
||||
msgstr "%s: l'opzione `-W %s' non ammette un argomento\n"
|
||||
|
||||
#. If XALLOC_FAIL_FUNC is NULL, or does return, display this message
|
||||
#. before exiting when memory is exhausted. Goes through gettext.
|
||||
#: lib/obstack.c:494 lib/obstack.c:497 lib/xmalloc.c:66
|
||||
msgid "memory exhausted"
|
||||
msgstr "memoria esaurita"
|
||||
|
||||
#. Get translations for open and closing quotation marks.
|
||||
#.
|
||||
#. The message catalog should translate "`" to a left
|
||||
#. quotation mark suitable for the locale, and similarly for
|
||||
#. "'". If the catalog has no translation,
|
||||
#. locale_quoting_style quotes `like this', and
|
||||
#. clocale_quoting_style quotes "like this".
|
||||
#.
|
||||
#. For example, an American English Unicode locale should
|
||||
#. translate "`" to U+201C (LEFT DOUBLE QUOTATION MARK), and
|
||||
#. should translate "'" to U+201D (RIGHT DOUBLE QUOTATION
|
||||
#. MARK). A British English Unicode locale should instead
|
||||
#. translate these to U+2018 (LEFT SINGLE QUOTATION MARK) and
|
||||
#. U+2019 (RIGHT SINGLE QUOTATION MARK), respectively.
|
||||
#: lib/quotearg.c:274
|
||||
msgid "`"
|
||||
msgstr "`"
|
||||
|
||||
#: lib/quotearg.c:275
|
||||
msgid "'"
|
||||
msgstr "'"
|
||||
|
||||
#~ msgid "invalid value: %s%d"
|
||||
#~ msgstr "valore non valido: %s%d"
|
||||
|
||||
#~ msgid "too many items (max %d)"
|
||||
#~ msgstr "troppi elementi (max %d)"
|
||||
@@ -0,0 +1,770 @@
|
||||
# Swedish messages for bison.
|
||||
# Copyright © 2001 Free Software Foundation, Inc.
|
||||
# Göran Uddeborg <[email protected]>, 2001.
|
||||
# $Revision$
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: bison 1.30f\n"
|
||||
"POT-Creation-Date: 2002-01-23 14:12+0100\n"
|
||||
"PO-Revision-Date: 2001-12-06 22:33+0100\n"
|
||||
"Last-Translator: Göran Uddeborg <[email protected]>\n"
|
||||
"Language-Team: Swedish <[email protected]>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=iso-8859-1\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: src/LR0.c:189
|
||||
#, c-format
|
||||
msgid "too many states (max %d)"
|
||||
msgstr "för många tillstånd (max %d)"
|
||||
|
||||
#: lib/error.c:128 lib/error.c:156 src/complain.c:99
|
||||
msgid "Unknown system error"
|
||||
msgstr "Okänt systemfel"
|
||||
|
||||
#: src/complain.c:150
|
||||
msgid "warning: "
|
||||
msgstr "varning: "
|
||||
|
||||
#: src/complain.c:238
|
||||
msgid "fatal error: "
|
||||
msgstr "ödesdigert fel: "
|
||||
|
||||
#: src/conflicts.c:44
|
||||
#, c-format
|
||||
msgid "Conflict in state %d between rule %d and token %s resolved as %s.\n"
|
||||
msgstr ""
|
||||
"Konflikt i tillstånd %d mellan regel %d och element %s, löstes med %s.\n"
|
||||
|
||||
#: src/conflicts.c:94 src/conflicts.c:119
|
||||
msgid "reduce"
|
||||
msgstr "reducera"
|
||||
|
||||
#: src/conflicts.c:101 src/conflicts.c:115
|
||||
msgid "shift"
|
||||
msgstr "skifta"
|
||||
|
||||
#: src/conflicts.c:123
|
||||
msgid "an error"
|
||||
msgstr "ett fel"
|
||||
|
||||
#: src/conflicts.c:302
|
||||
#, c-format
|
||||
msgid "%d shift/reduce conflict"
|
||||
msgid_plural "%d shift/reduce conflicts"
|
||||
msgstr[0] "%d skifta/reducerakonflikt"
|
||||
msgstr[1] "%d skifta/reducerakonflikter"
|
||||
|
||||
#: src/conflicts.c:309
|
||||
msgid "and"
|
||||
msgstr "och"
|
||||
|
||||
#: src/conflicts.c:315
|
||||
#, c-format
|
||||
msgid "%d reduce/reduce conflict"
|
||||
msgid_plural "%d reduce/reduce conflicts"
|
||||
msgstr[0] "%d reducera/reducerakonflikt"
|
||||
msgstr[1] "%d reducera/reducerakonflikter"
|
||||
|
||||
#: src/conflicts.c:340
|
||||
#, c-format
|
||||
msgid "State %d contains "
|
||||
msgstr "Tillstånd %d innehåller "
|
||||
|
||||
#. If invoked with `--yacc', use the output format specified by
|
||||
#. POSIX.
|
||||
#: src/conflicts.c:387
|
||||
msgid "conflicts: "
|
||||
msgstr "konflikter: "
|
||||
|
||||
#: src/conflicts.c:389
|
||||
#, c-format
|
||||
msgid " %d shift/reduce"
|
||||
msgstr " %d skifta/reducera"
|
||||
|
||||
#: src/conflicts.c:393
|
||||
#, c-format
|
||||
msgid " %d reduce/reduce"
|
||||
msgstr " %d reducera/reducera"
|
||||
|
||||
#: src/conflicts.c:398 src/reduce.c:508
|
||||
#, c-format
|
||||
msgid "%s contains "
|
||||
msgstr "%s innehåller "
|
||||
|
||||
#: src/conflicts.c:412
|
||||
#, c-format
|
||||
msgid "expected %d shift/reduce conflict\n"
|
||||
msgid_plural "expected %d shift/reduce conflicts\n"
|
||||
msgstr[0] "förväntade %d skifta/reducerakonflikt\n"
|
||||
msgstr[1] "förväntade %d skifta/reducerakonflikter\n"
|
||||
|
||||
#: src/conflicts.c:463 src/conflicts.c:540
|
||||
#, c-format
|
||||
msgid " %-4s\t[reduce using rule %d (%s)]\n"
|
||||
msgstr " %-4s\t[reducera med regel %d (%s)]\n"
|
||||
|
||||
#: src/conflicts.c:467 src/print.c:154
|
||||
#, c-format
|
||||
msgid ""
|
||||
" $default\treduce using rule %d (%s)\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
" $standard\treducera med regel %d (%s)\n"
|
||||
"\n"
|
||||
|
||||
#: src/conflicts.c:521 src/conflicts.c:534
|
||||
#, c-format
|
||||
msgid " %-4s\treduce using rule %d (%s)\n"
|
||||
msgstr " %-4s\treducera med regel %d (%s)\n"
|
||||
|
||||
#: src/conflicts.c:550
|
||||
#, c-format
|
||||
msgid " $default\treduce using rule %d (%s)\n"
|
||||
msgstr " $standard\treducera med regel %d (%s)\n"
|
||||
|
||||
#: src/files.c:150
|
||||
#, c-format
|
||||
msgid "cannot open file `%s'"
|
||||
msgstr "kan inte öppna filen \"%s\""
|
||||
|
||||
#: src/files.c:169
|
||||
msgid "cannot close file"
|
||||
msgstr "kan inte stänga fil"
|
||||
|
||||
#. Some efforts were made to ease the translators' task, please
|
||||
#. continue.
|
||||
#: src/getargs.c:84
|
||||
msgid "GNU bison generates parsers for LALR(1) grammars.\n"
|
||||
msgstr "GNU bison genererar parsrar för LALR(1)-grammatiker.\n"
|
||||
|
||||
#: src/getargs.c:88
|
||||
#, c-format
|
||||
msgid "Usage: %s [OPTION]... FILE\n"
|
||||
msgstr "Användning: %s [FLAGGA]... FIL\n"
|
||||
|
||||
#: src/getargs.c:92
|
||||
msgid ""
|
||||
"If a long option shows an argument as mandatory, then it is mandatory\n"
|
||||
"for the equivalent short option also. Similarly for optional arguments.\n"
|
||||
msgstr ""
|
||||
"Om en lång flagga visar ett argument som obligatoriskt är det\n"
|
||||
"obligatoriskt för den motsvarande korta flaggan också. Motsvarande\n"
|
||||
"för valfria argument.\n"
|
||||
|
||||
#: src/getargs.c:98
|
||||
msgid ""
|
||||
"Operation modes:\n"
|
||||
" -h, --help display this help and exit\n"
|
||||
" -V, --version output version information and exit\n"
|
||||
" -y, --yacc emulate POSIX yacc\n"
|
||||
msgstr ""
|
||||
"Arbetslägen:\n"
|
||||
" -h, --help visa denna hjälptext och avsluta\n"
|
||||
" -V, --version visa versionsinformation och avsluta\n"
|
||||
" -y, --yacc emulera POSIX-yacc\n"
|
||||
|
||||
#: src/getargs.c:105
|
||||
msgid ""
|
||||
"Parser:\n"
|
||||
" -S, --skeleton=FILE specify the skeleton to use\n"
|
||||
" -t, --debug instrument the parser for debugging\n"
|
||||
" --locations enable locations computation\n"
|
||||
" -p, --name-prefix=PREFIX prepend PREFIX to the external symbols\n"
|
||||
" -l, --no-lines don't generate `#line' directives\n"
|
||||
" -n, --no-parser generate the tables only\n"
|
||||
" -k, --token-table include a table of token names\n"
|
||||
msgstr ""
|
||||
"Tolk:\n"
|
||||
" -S, --skeleton=FIL ange skelettfilen som skall användas\n"
|
||||
" -t, --debug instrumentera tolken för felsökning\n"
|
||||
" --locations aktivera lägesberäkning\n"
|
||||
" -p, --name-prefix=PREFIX lägg till PREFIX före externa symboler\n"
|
||||
" -l, --no-lines generera inte \"#line\"-direktiv\n"
|
||||
" -n, --no-parser generera endast tabellerna\n"
|
||||
" -k, --token-table inkludera en tabell över elementnamn\n"
|
||||
|
||||
#: src/getargs.c:117
|
||||
msgid ""
|
||||
"Output:\n"
|
||||
" -d, --defines also produce a header file\n"
|
||||
" -v, --verbose also produce an explanation of the automaton\n"
|
||||
" -b, --file-prefix=PREFIX specify a PREFIX for output files\n"
|
||||
" -o, --output=FILE leave output to FILE\n"
|
||||
" -g, --graph also produce a VCG description of the "
|
||||
"automaton\n"
|
||||
msgstr ""
|
||||
"Utdata:\n"
|
||||
" -d, --defines skapa också en huvudfil\n"
|
||||
" -v, --verbose skapa också en förklaring av automaten\n"
|
||||
" -b, --file-prefix=PREFIX ange ett PREFIX för utdatafiler\n"
|
||||
" -o, --output=FIL lägg utdata i FIL\n"
|
||||
" -g, --graph skapa också en VCG-beskrivning av automaten\n"
|
||||
|
||||
#: src/getargs.c:127
|
||||
msgid "Report bugs to <[email protected]>.\n"
|
||||
msgstr ""
|
||||
"Rapportera fel till <[email protected]>.\n"
|
||||
"Rapportera anmärkningar på översättningen till <[email protected]>.\n"
|
||||
|
||||
#. Some efforts were made to ease the translators' task, please
|
||||
#. continue.
|
||||
#: src/getargs.c:141
|
||||
#, c-format
|
||||
msgid "bison (GNU Bison) %s"
|
||||
msgstr "bison (GNU Bison) %s"
|
||||
|
||||
#: src/getargs.c:146
|
||||
msgid ""
|
||||
"Copyright 1984, 1986, 1989, 1992, 2000, 2001, 2002\n"
|
||||
"Free Software Foundation, Inc.\n"
|
||||
msgstr ""
|
||||
"Copyright 1984, 1986, 1989, 1992, 2000, 2001, 2002\n"
|
||||
"Free Software Foundation, Inc.\n"
|
||||
|
||||
#: src/getargs.c:151
|
||||
msgid ""
|
||||
"This is free software; see the source for copying conditions. There is NO\n"
|
||||
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
|
||||
msgstr ""
|
||||
"Detta är fri programvara, se källkoden för kopieringsvillkor. Det\n"
|
||||
"finns INGEN garanti, inte ens för SÄLJBARHET eller LÄMPLIGHET FÖR ETT\n"
|
||||
"SPECIELLT ÄNDAMÅL.\n"
|
||||
|
||||
#: src/getargs.c:224 src/lex.c:705
|
||||
#, c-format
|
||||
msgid "`%s' is no longer supported"
|
||||
msgstr "\"%s\" stöds inte längre"
|
||||
|
||||
#: src/getargs.c:248
|
||||
#, c-format
|
||||
msgid "Try `%s --help' for more information.\n"
|
||||
msgstr "Försök med \"%s --help\" för mer information.\n"
|
||||
|
||||
#: src/getargs.c:255
|
||||
#, c-format
|
||||
msgid "%s: no grammar file given\n"
|
||||
msgstr "%s: ingen grammatikfil angiven\n"
|
||||
|
||||
#: src/getargs.c:259
|
||||
#, c-format
|
||||
msgid "%s: extra arguments ignored after `%s'\n"
|
||||
msgstr "%s: extra argument ignorerade efter \"%s\"\n"
|
||||
|
||||
#: src/lalr.c:256
|
||||
#, c-format
|
||||
msgid "too many gotos (max %d)"
|
||||
msgstr "för många goto (max %d)"
|
||||
|
||||
#: src/lex.c:76
|
||||
msgid "unexpected `/' found and ignored"
|
||||
msgstr "oväntat \"/\" hittat och ignorerat"
|
||||
|
||||
#: src/lex.c:105 src/reader.c:280
|
||||
msgid "unterminated comment"
|
||||
msgstr "oavslutad kommentar"
|
||||
|
||||
#: src/lex.c:137
|
||||
msgid "unexpected end of file"
|
||||
msgstr "oväntat filslut"
|
||||
|
||||
#: src/lex.c:166
|
||||
msgid "unescaped newline in constant"
|
||||
msgstr "oskyddat nyradstecken i konstant"
|
||||
|
||||
#: src/lex.c:208
|
||||
#, c-format
|
||||
msgid "octal value outside range 0...255: `\\%o'"
|
||||
msgstr "oktalt värde utanför intervallet 0-255: \"\\%o\""
|
||||
|
||||
#: src/lex.c:233
|
||||
#, c-format
|
||||
msgid "hexadecimal value above 255: `\\x%x'"
|
||||
msgstr "hexadecimalt värde över 255: \"\\x%x\""
|
||||
|
||||
#: src/lex.c:245
|
||||
#, c-format
|
||||
msgid "unknown escape sequence: `\\' followed by `%s'"
|
||||
msgstr "okänd specialsekvens: \"\\\" följt av \"%s\""
|
||||
|
||||
#: src/lex.c:342
|
||||
msgid "unterminated type name at end of file"
|
||||
msgstr "oavslutat typnamn vid filslut"
|
||||
|
||||
#: src/lex.c:345
|
||||
msgid "unterminated type name"
|
||||
msgstr "oavslutat typnamn"
|
||||
|
||||
#: src/lex.c:438
|
||||
msgid "use \"...\" for multi-character literal tokens"
|
||||
msgstr "använd \"...\" för bokstavliga element med mer än ett tecken"
|
||||
|
||||
#: src/lex.c:678
|
||||
#, c-format
|
||||
msgid "`%s' supports no argument: %s"
|
||||
msgstr "\"%s\" stödjer inga argument: %s"
|
||||
|
||||
#: src/lex.c:694
|
||||
#, c-format
|
||||
msgid "`%s' requires an argument"
|
||||
msgstr "\"%s\" behöver ett argument"
|
||||
|
||||
#: src/output.c:951
|
||||
#, c-format
|
||||
msgid "maximum table size (%d) exceeded"
|
||||
msgstr "maximal tabellstorlek (%d) överskriden"
|
||||
|
||||
#: src/print.c:39
|
||||
#, c-format
|
||||
msgid " type %d is %s\n"
|
||||
msgstr " typ %d är %s\n"
|
||||
|
||||
#: src/print.c:88
|
||||
#, c-format
|
||||
msgid " (rule %d)"
|
||||
msgstr " (regel %d)"
|
||||
|
||||
#: src/print.c:108
|
||||
msgid " $default\taccept\n"
|
||||
msgstr " $standard\tacceptera\n"
|
||||
|
||||
#: src/print.c:110
|
||||
msgid " NO ACTIONS\n"
|
||||
msgstr " INGA ÅTGÄRDER\n"
|
||||
|
||||
#: src/print.c:124
|
||||
#, c-format
|
||||
msgid " $ \tgo to state %d\n"
|
||||
msgstr " $ \tgå till tillstånd %d\n"
|
||||
|
||||
#: src/print.c:127
|
||||
#, c-format
|
||||
msgid " %-4s\tshift, and go to state %d\n"
|
||||
msgstr " %-4s\tskifta, och gå till tillstånd %d\n"
|
||||
|
||||
#: src/print.c:142
|
||||
#, c-format
|
||||
msgid " %-4s\terror (nonassociative)\n"
|
||||
msgstr " %-4s\tfel (ickeassociativ)\n"
|
||||
|
||||
#: src/print.c:169
|
||||
#, c-format
|
||||
msgid " %-4s\tgo to state %d\n"
|
||||
msgstr " %-4s\tgå till tillstånd %d\n"
|
||||
|
||||
#: src/print.c:180
|
||||
#, c-format
|
||||
msgid "state %d"
|
||||
msgstr "tillstånd %d"
|
||||
|
||||
#. rule # : LHS -> RHS
|
||||
#: src/print.c:211
|
||||
msgid "Grammar"
|
||||
msgstr "Grammatik"
|
||||
|
||||
#: src/print.c:212
|
||||
msgid "Number, Line, Rule"
|
||||
msgstr "Nummer, Rad, Regel"
|
||||
|
||||
#: src/print.c:217
|
||||
#, c-format
|
||||
msgid " %3d %3d %s ->"
|
||||
msgstr " %3d %3d %s ->"
|
||||
|
||||
#: src/print.c:224
|
||||
msgid "empty"
|
||||
msgstr "tom"
|
||||
|
||||
#. TERMINAL (type #) : rule #s terminal is on RHS
|
||||
#: src/print.c:231
|
||||
msgid "Terminals, with rules where they appear"
|
||||
msgstr "Terminaler, med regler där de förekommer"
|
||||
|
||||
#: src/print.c:256
|
||||
msgid "Nonterminals, with rules where they appear"
|
||||
msgstr "Icketerminaler, med regler där de förekommer"
|
||||
|
||||
#: src/print.c:282
|
||||
msgid " on left:"
|
||||
msgstr " till vänster:"
|
||||
|
||||
#: src/print.c:297
|
||||
msgid " on right:"
|
||||
msgstr " till höger:"
|
||||
|
||||
#. If something has been added in the NODE_OBSTACK after
|
||||
#. the declaration of the label, then we need a `\n'.
|
||||
#. if (obstack_object_size (node_obstack) > node_output_size)
|
||||
#. obstack_sgrow (node_obstack, "\n");
|
||||
#.
|
||||
#: src/print_graph.c:146
|
||||
#, c-format
|
||||
msgid "%-4s\terror (nonassociative)"
|
||||
msgstr "%-4s\tfel (ickeassociativ)"
|
||||
|
||||
#.
|
||||
#. if (obstack_object_size (node_obstack) > node_output_size)
|
||||
#. obstack_sgrow (node_obstack, "\n");
|
||||
#.
|
||||
#: src/print_graph.c:161
|
||||
#, c-format
|
||||
msgid "$default\treduce using rule %d (%s)"
|
||||
msgstr "$standard\treducera med regel %d (%s)"
|
||||
|
||||
#: src/reader.c:89
|
||||
msgid " Skipping to next \\n"
|
||||
msgstr " Hoppar över till nästa \\n"
|
||||
|
||||
#: src/reader.c:91
|
||||
#, c-format
|
||||
msgid " Skipping to next %c"
|
||||
msgstr " Hoppar över till nästa %c"
|
||||
|
||||
#: src/reader.c:142 src/reader.c:154
|
||||
msgid "invalid $ value"
|
||||
msgstr "felaktigt $-värde"
|
||||
|
||||
#: src/reader.c:180 src/reader.c:195
|
||||
msgid "unterminated string at end of file"
|
||||
msgstr "oavslutad sträng vid filslut"
|
||||
|
||||
#: src/reader.c:183
|
||||
msgid "unterminated string"
|
||||
msgstr "oavslutad sträng"
|
||||
|
||||
#: src/reader.c:336 src/reader.c:400
|
||||
#, c-format
|
||||
msgid "%s is invalid"
|
||||
msgstr "%s är felaktigt"
|
||||
|
||||
#: src/reader.c:376
|
||||
#, c-format
|
||||
msgid "$$ of `%s' has no declared type"
|
||||
msgstr "$$ för \"%s\" har ingen deklarerad typ"
|
||||
|
||||
#: src/reader.c:393
|
||||
#, c-format
|
||||
msgid "$%d of `%s' has no declared type"
|
||||
msgstr "$%d för \"%s\" har ingen deklarerad typ"
|
||||
|
||||
#: src/reader.c:447
|
||||
msgid "unterminated `%{' definition"
|
||||
msgstr "oavslutad \"%{\"-definition"
|
||||
|
||||
#: src/reader.c:492 src/reader.c:607 src/reader.c:657
|
||||
#, c-format
|
||||
msgid "Premature EOF after %s"
|
||||
msgstr "Förtida filslut efter %s"
|
||||
|
||||
#: src/reader.c:509
|
||||
#, c-format
|
||||
msgid "symbol `%s' used more than once as a literal string"
|
||||
msgstr "symbolen \"%s\" används mer än en gång som en bokstavlig sträng"
|
||||
|
||||
#: src/reader.c:512
|
||||
#, c-format
|
||||
msgid "symbol `%s' given more than one literal string"
|
||||
msgstr "symbolen \"%s\" har fått mer än en bokstavlig sträng"
|
||||
|
||||
#: src/reader.c:533 src/reader.c:676
|
||||
#, c-format
|
||||
msgid "symbol %s redefined"
|
||||
msgstr "symbolen %s omdefinierad"
|
||||
|
||||
#: src/reader.c:543 src/reader.c:622 src/reader.c:683 src/reader.c:1298
|
||||
#, c-format
|
||||
msgid "type redeclaration for %s"
|
||||
msgstr "typen omdeklarerad för %s"
|
||||
|
||||
#: src/reader.c:552
|
||||
#, c-format
|
||||
msgid "`%s' is invalid in %s"
|
||||
msgstr "\"%s\" är felaktig i %s"
|
||||
|
||||
#: src/reader.c:570 src/reader.c:735
|
||||
#, c-format
|
||||
msgid "multiple %s declarations"
|
||||
msgstr "flera %s-deklarationer"
|
||||
|
||||
#: src/reader.c:572 src/reader.c:914 src/reader.c:939 src/reader.c:1276
|
||||
#, c-format
|
||||
msgid "invalid %s declaration"
|
||||
msgstr "felaktig %s-deklaration"
|
||||
|
||||
#: src/reader.c:592
|
||||
msgid "%type declaration has no <typename>"
|
||||
msgstr "%type-deklaration har inget <typnamn>"
|
||||
|
||||
#: src/reader.c:627
|
||||
#, c-format
|
||||
msgid "invalid %%type declaration due to item: %s"
|
||||
msgstr "felaktig %%type-deklaration på grund av objekt: %s"
|
||||
|
||||
#: src/reader.c:672
|
||||
#, c-format
|
||||
msgid "redefining precedence of %s"
|
||||
msgstr "omdefinition av precedens för %s"
|
||||
|
||||
#: src/reader.c:695
|
||||
#, c-format
|
||||
msgid "invalid text (%s) - number should be after identifier"
|
||||
msgstr "felaktig text (%s) - tal skulle följa efter identifierare"
|
||||
|
||||
#: src/reader.c:705
|
||||
#, c-format
|
||||
msgid "unexpected item: %s"
|
||||
msgstr "oväntat objekt: %s"
|
||||
|
||||
#: src/reader.c:778 src/reader.c:1110 src/reader.c:1187
|
||||
#, c-format
|
||||
msgid "unmatched %s"
|
||||
msgstr "ensam %s"
|
||||
|
||||
#: src/reader.c:810
|
||||
#, c-format
|
||||
msgid "argument of %%expect is not an integer"
|
||||
msgstr "argument till %%expect är inte ett heltal"
|
||||
|
||||
#: src/reader.c:856
|
||||
#, c-format
|
||||
msgid "unrecognized item %s, expected an identifier"
|
||||
msgstr "oväntat objekt %s, förväntade en identifierare"
|
||||
|
||||
#: src/reader.c:878
|
||||
#, c-format
|
||||
msgid "expected string constant instead of %s"
|
||||
msgstr "förväntade strängkonstant istället för %s"
|
||||
|
||||
#: src/reader.c:1026
|
||||
#, c-format
|
||||
msgid "unrecognized: %s"
|
||||
msgstr "okänt: %s"
|
||||
|
||||
#: src/reader.c:1031
|
||||
msgid "no input grammar"
|
||||
msgstr "ingen ingrammatik"
|
||||
|
||||
#: src/reader.c:1036
|
||||
#, c-format
|
||||
msgid "unknown character: %s"
|
||||
msgstr "okänt tecken: %s"
|
||||
|
||||
#: src/reader.c:1210
|
||||
#, c-format
|
||||
msgid "unterminated %guard clause"
|
||||
msgstr "oavlutad %guard-sats"
|
||||
|
||||
#: src/reader.c:1363
|
||||
msgid "ill-formed rule: initial symbol not followed by colon"
|
||||
msgstr "felskriven regel: första symbolen följs inte av ett kolon"
|
||||
|
||||
#: src/reader.c:1370
|
||||
msgid "grammar starts with vertical bar"
|
||||
msgstr "grammatiken startar med ett vertikalt streck"
|
||||
|
||||
#: src/reader.c:1398
|
||||
#, c-format
|
||||
msgid "rule given for %s, which is a token"
|
||||
msgstr "regel given för %s, som är ett element"
|
||||
|
||||
#: src/reader.c:1498
|
||||
msgid "two @prec's in a row"
|
||||
msgstr "två @prec i rad"
|
||||
|
||||
#: src/reader.c:1506
|
||||
#, c-format
|
||||
msgid "%%guard present but %%semantic_parser not specified"
|
||||
msgstr "%%guard finns men %%semantic_parser är inte angiven"
|
||||
|
||||
#: src/reader.c:1515
|
||||
msgid "two actions at end of one rule"
|
||||
msgstr "två åtgärder vid slutet av en regel"
|
||||
|
||||
#: src/reader.c:1529
|
||||
#, c-format
|
||||
msgid "type clash (`%s' `%s') on default action"
|
||||
msgstr "typkonflikt (\"%s\" \"%s\") för standardåtgärd"
|
||||
|
||||
#: src/reader.c:1535
|
||||
msgid "empty rule for typed nonterminal, and no action"
|
||||
msgstr "tom regel för typad icketerminal, och ingen åtgärd"
|
||||
|
||||
#: src/reader.c:1579
|
||||
#, c-format
|
||||
msgid "invalid input: %s"
|
||||
msgstr "felaktig indata: %s"
|
||||
|
||||
#: src/reader.c:1587
|
||||
#, c-format
|
||||
msgid "too many symbols (tokens plus nonterminals); maximum %d"
|
||||
msgstr "för många symboler (element plus icketerminaler); max %d"
|
||||
|
||||
#: src/reader.c:1590
|
||||
msgid "no rules in the input grammar"
|
||||
msgstr "inga regler i ingrammatiken"
|
||||
|
||||
#: src/reader.c:1614
|
||||
#, c-format
|
||||
msgid "symbol %s is used, but is not defined as a token and has no rules"
|
||||
msgstr ""
|
||||
"symbolen %s används, men är inte definierad som ett element och har inga "
|
||||
"regler"
|
||||
|
||||
#: src/reader.c:1749
|
||||
#, c-format
|
||||
msgid "tokens %s and %s both assigned number %d"
|
||||
msgstr "elementen %s och %s har båda fått nummer %d"
|
||||
|
||||
#: src/reader.c:1802
|
||||
#, c-format
|
||||
msgid "conflicting precedences for %s and %s"
|
||||
msgstr "motstridiga precedenser mellan %s och %s"
|
||||
|
||||
#: src/reader.c:1814
|
||||
#, c-format
|
||||
msgid "conflicting assoc values for %s and %s"
|
||||
msgstr "motstridiga assoc-värden mellan %s och %s"
|
||||
|
||||
#: src/reader.c:1853
|
||||
#, c-format
|
||||
msgid "the start symbol %s is undefined"
|
||||
msgstr "startsymbolen %s är odefinierad"
|
||||
|
||||
#: src/reader.c:1855
|
||||
#, c-format
|
||||
msgid "the start symbol %s is a token"
|
||||
msgstr "startsymbolen %s är ett element"
|
||||
|
||||
#: src/reduce.c:409
|
||||
msgid "Useless nonterminals:"
|
||||
msgstr "Oanvändbara icketerminaler:"
|
||||
|
||||
#: src/reduce.c:422
|
||||
msgid "Terminals which are not used:"
|
||||
msgstr "Terminaler som inte används:"
|
||||
|
||||
#: src/reduce.c:433
|
||||
msgid "Useless rules:"
|
||||
msgstr "Oanvändbara regler:"
|
||||
|
||||
#: src/reduce.c:503
|
||||
#, c-format
|
||||
msgid "%d rule never reduced\n"
|
||||
msgid_plural "%d rules never reduced\n"
|
||||
msgstr[0] "%d regel reduceras aldrig\n"
|
||||
msgstr[1] "%d regler reduceras aldrig\n"
|
||||
|
||||
#: src/reduce.c:511
|
||||
#, c-format
|
||||
msgid "%d useless nonterminal"
|
||||
msgid_plural "%d useless nonterminals"
|
||||
msgstr[0] "%d oanvändbar icketerminal"
|
||||
msgstr[1] "%d oanvändbara icketerminaler"
|
||||
|
||||
#: src/reduce.c:517
|
||||
msgid " and "
|
||||
msgstr " och "
|
||||
|
||||
#: src/reduce.c:520
|
||||
#, c-format
|
||||
msgid "%d useless rule"
|
||||
msgid_plural "%d useless rules"
|
||||
msgstr[0] "%d oanvändbar regel"
|
||||
msgstr[1] "%d oanvändbara regler"
|
||||
|
||||
#: src/reduce.c:551
|
||||
#, c-format
|
||||
msgid "Start symbol %s does not derive any sentence"
|
||||
msgstr "Startsymbolen %s genererar inga meningar"
|
||||
|
||||
#: lib/getopt.c:694
|
||||
#, c-format
|
||||
msgid "%s: option `%s' is ambiguous\n"
|
||||
msgstr "%s: flaggan \"%s\" är tvetydig\n"
|
||||
|
||||
#: lib/getopt.c:719
|
||||
#, c-format
|
||||
msgid "%s: option `--%s' doesn't allow an argument\n"
|
||||
msgstr "%s: flaggan \"--%s\" tar inget argument\n"
|
||||
|
||||
#: lib/getopt.c:724
|
||||
#, c-format
|
||||
msgid "%s: option `%c%s' doesn't allow an argument\n"
|
||||
msgstr "%s: flaggan \"%c%s\" tar inget argument\n"
|
||||
|
||||
#: lib/getopt.c:742 lib/getopt.c:915
|
||||
#, c-format
|
||||
msgid "%s: option `%s' requires an argument\n"
|
||||
msgstr "%s: flaggan \"%s\" behöver ett argument\n"
|
||||
|
||||
#. --option
|
||||
#: lib/getopt.c:771
|
||||
#, c-format
|
||||
msgid "%s: unrecognized option `--%s'\n"
|
||||
msgstr "%s: okänd flagga \"--%s\"\n"
|
||||
|
||||
#. +option or -option
|
||||
#: lib/getopt.c:775
|
||||
#, c-format
|
||||
msgid "%s: unrecognized option `%c%s'\n"
|
||||
msgstr "%s: okänd flagga \"%c%s\"\n"
|
||||
|
||||
#. 1003.2 specifies the format of this message.
|
||||
#: lib/getopt.c:801
|
||||
#, c-format
|
||||
msgid "%s: illegal option -- %c\n"
|
||||
msgstr "%s: otillåten flagga -- %c\n"
|
||||
|
||||
#: lib/getopt.c:804
|
||||
#, c-format
|
||||
msgid "%s: invalid option -- %c\n"
|
||||
msgstr "%s: ogiltig flagga --%c\n"
|
||||
|
||||
#. 1003.2 specifies the format of this message.
|
||||
#: lib/getopt.c:834 lib/getopt.c:964
|
||||
#, c-format
|
||||
msgid "%s: option requires an argument -- %c\n"
|
||||
msgstr "%s: flaggan behöver ett argument -- %c\n"
|
||||
|
||||
#: lib/getopt.c:881
|
||||
#, c-format
|
||||
msgid "%s: option `-W %s' is ambiguous\n"
|
||||
msgstr "%s: flaggan \"-W %s\" är tvetydig\n"
|
||||
|
||||
#: lib/getopt.c:899
|
||||
#, c-format
|
||||
msgid "%s: option `-W %s' doesn't allow an argument\n"
|
||||
msgstr "%s: flaggan \"-W %s\" tar inget argument\n"
|
||||
|
||||
#. If XALLOC_FAIL_FUNC is NULL, or does return, display this message
|
||||
#. before exiting when memory is exhausted. Goes through gettext.
|
||||
#: lib/obstack.c:494 lib/obstack.c:497 lib/xmalloc.c:66
|
||||
msgid "memory exhausted"
|
||||
msgstr "minnet slut"
|
||||
|
||||
# När vi går över till Unicode mer allmänt kanske vi bör översätta båda dessa
|
||||
# med U+201D (RIGHT DOUBLE QUOTATION MARK) på svenska. Eller?
|
||||
#
|
||||
#. Get translations for open and closing quotation marks.
|
||||
#.
|
||||
#. The message catalog should translate "`" to a left
|
||||
#. quotation mark suitable for the locale, and similarly for
|
||||
#. "'". If the catalog has no translation,
|
||||
#. locale_quoting_style quotes `like this', and
|
||||
#. clocale_quoting_style quotes "like this".
|
||||
#.
|
||||
#. For example, an American English Unicode locale should
|
||||
#. translate "`" to U+201C (LEFT DOUBLE QUOTATION MARK), and
|
||||
#. should translate "'" to U+201D (RIGHT DOUBLE QUOTATION
|
||||
#. MARK). A British English Unicode locale should instead
|
||||
#. translate these to U+2018 (LEFT SINGLE QUOTATION MARK) and
|
||||
#. U+2019 (RIGHT SINGLE QUOTATION MARK), respectively.
|
||||
#: lib/quotearg.c:274
|
||||
msgid "`"
|
||||
msgstr "\""
|
||||
|
||||
#: lib/quotearg.c:275
|
||||
msgid "'"
|
||||
msgstr "\""
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Generate the nondeterministic finite state machine for bison,
|
||||
Copyright 1984, 1986, 1989, 2000 Free Software Foundation, Inc.
|
||||
Copyright 1984, 1986, 1989, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
@@ -23,12 +23,14 @@
|
||||
The entry point is generate_states. */
|
||||
|
||||
#include "system.h"
|
||||
#include "getargs.h"
|
||||
#include "reader.h"
|
||||
#include "gram.h"
|
||||
#include "state.h"
|
||||
#include "complain.h"
|
||||
#include "closure.h"
|
||||
#include "LR0.h"
|
||||
|
||||
#include "reduce.h"
|
||||
|
||||
int nstates;
|
||||
int final_state;
|
||||
@@ -48,7 +50,7 @@ static short *redset = NULL;
|
||||
static short *shiftset = NULL;
|
||||
|
||||
static short **kernel_base = NULL;
|
||||
static short **kernel_end = NULL;
|
||||
static int *kernel_size = NULL;
|
||||
static short *kernel_items = NULL;
|
||||
|
||||
/* hash table for states, to recognize equivalent ones. */
|
||||
@@ -60,26 +62,21 @@ static core **state_table = NULL;
|
||||
static void
|
||||
allocate_itemsets (void)
|
||||
{
|
||||
short *itemp = NULL;
|
||||
int symbol;
|
||||
int i;
|
||||
int count;
|
||||
short *symbol_count = NULL;
|
||||
|
||||
count = 0;
|
||||
symbol_count = XCALLOC (short, nsyms);
|
||||
/* Count the number of occurrences of all the symbols in RITEMS.
|
||||
Note that useless productions (hence useless nonterminals) are
|
||||
browsed too, hence we need to allocate room for _all_ the
|
||||
symbols. */
|
||||
int count = 0;
|
||||
short *symbol_count = XCALLOC (short, nsyms + nuseless_nonterminals);
|
||||
|
||||
itemp = ritem;
|
||||
symbol = *itemp++;
|
||||
while (symbol)
|
||||
{
|
||||
if (symbol > 0)
|
||||
{
|
||||
count++;
|
||||
symbol_count[symbol]++;
|
||||
}
|
||||
symbol = *itemp++;
|
||||
}
|
||||
for (i = 0; ritem[i]; ++i)
|
||||
if (ritem[i] > 0)
|
||||
{
|
||||
count++;
|
||||
symbol_count[ritem[i]]++;
|
||||
}
|
||||
|
||||
/* See comments before new_itemsets. All the vectors of items
|
||||
live inside KERNEL_ITEMS. The number of active items after
|
||||
@@ -98,8 +95,8 @@ allocate_itemsets (void)
|
||||
count += symbol_count[i];
|
||||
}
|
||||
|
||||
shift_symbol = symbol_count;
|
||||
kernel_end = XCALLOC (short *, nsyms);
|
||||
free (symbol_count);
|
||||
kernel_size = XCALLOC (int, nsyms);
|
||||
}
|
||||
|
||||
|
||||
@@ -117,13 +114,13 @@ allocate_storage (void)
|
||||
static void
|
||||
free_storage (void)
|
||||
{
|
||||
XFREE (shift_symbol);
|
||||
XFREE (redset);
|
||||
XFREE (shiftset);
|
||||
XFREE (kernel_base);
|
||||
XFREE (kernel_end);
|
||||
free (shift_symbol);
|
||||
free (redset);
|
||||
free (shiftset);
|
||||
free (kernel_base);
|
||||
free (kernel_size);
|
||||
XFREE (kernel_items);
|
||||
XFREE (state_table);
|
||||
free (state_table);
|
||||
}
|
||||
|
||||
|
||||
@@ -137,50 +134,39 @@ free_storage (void)
|
||||
| shift_symbol is set to a vector of the symbols that can be |
|
||||
| shifted. For each symbol in the grammar, kernel_base[symbol] |
|
||||
| points to a vector of item numbers activated if that symbol is |
|
||||
| shifted, and kernel_end[symbol] points after the end of that |
|
||||
| vector. |
|
||||
| shifted, and kernel_size[symbol] is their numbers. |
|
||||
`----------------------------------------------------------------*/
|
||||
|
||||
static void
|
||||
new_itemsets (void)
|
||||
{
|
||||
int i;
|
||||
int shiftcount;
|
||||
short *isp;
|
||||
short *ksp;
|
||||
int symbol;
|
||||
|
||||
#if TRACE
|
||||
fprintf (stderr, "Entering new_itemsets\n");
|
||||
#endif
|
||||
if (trace_flag)
|
||||
fprintf (stderr, "Entering new_itemsets, state = %d\n",
|
||||
this_state->number);
|
||||
|
||||
for (i = 0; i < nsyms; i++)
|
||||
kernel_end[i] = NULL;
|
||||
kernel_size[i] = 0;
|
||||
|
||||
shiftcount = 0;
|
||||
shift_symbol = XCALLOC (short, nsyms);
|
||||
nshifts = 0;
|
||||
|
||||
isp = itemset;
|
||||
|
||||
while (isp < itemsetend)
|
||||
for (i = 0; i < nitemset; ++i)
|
||||
{
|
||||
i = *isp++;
|
||||
symbol = ritem[i];
|
||||
int symbol = ritem[itemset[i]];
|
||||
if (symbol > 0)
|
||||
{
|
||||
ksp = kernel_end[symbol];
|
||||
|
||||
if (!ksp)
|
||||
if (!kernel_size[symbol])
|
||||
{
|
||||
shift_symbol[shiftcount++] = symbol;
|
||||
ksp = kernel_base[symbol];
|
||||
shift_symbol[nshifts] = symbol;
|
||||
nshifts++;
|
||||
}
|
||||
|
||||
*ksp++ = i + 1;
|
||||
kernel_end[symbol] = ksp;
|
||||
kernel_base[symbol][kernel_size[symbol]] = itemset[i] + 1;
|
||||
kernel_size[symbol]++;
|
||||
}
|
||||
}
|
||||
|
||||
nshifts = shiftcount;
|
||||
}
|
||||
|
||||
|
||||
@@ -193,36 +179,24 @@ new_itemsets (void)
|
||||
static core *
|
||||
new_state (int symbol)
|
||||
{
|
||||
int n;
|
||||
core *p;
|
||||
short *isp1;
|
||||
short *isp2;
|
||||
short *iend;
|
||||
|
||||
#if TRACE
|
||||
fprintf (stderr, "Entering new_state, symbol = %d\n", symbol);
|
||||
#endif
|
||||
if (trace_flag)
|
||||
fprintf (stderr, "Entering new_state, state = %d, symbol = %d (%s)\n",
|
||||
this_state->number, symbol, tags[symbol]);
|
||||
|
||||
if (nstates >= MAXSHORT)
|
||||
fatal (_("too many states (max %d)"), MAXSHORT);
|
||||
|
||||
isp1 = kernel_base[symbol];
|
||||
iend = kernel_end[symbol];
|
||||
n = iend - isp1;
|
||||
|
||||
p =
|
||||
(core *) xcalloc ((unsigned) (sizeof (core) + (n - 1) * sizeof (short)), 1);
|
||||
p = CORE_ALLOC (kernel_size[symbol]);
|
||||
p->accessing_symbol = symbol;
|
||||
p->number = nstates;
|
||||
p->nitems = n;
|
||||
p->nitems = kernel_size[symbol];
|
||||
|
||||
isp2 = p->items;
|
||||
while (isp1 < iend)
|
||||
*isp2++ = *isp1++;
|
||||
shortcpy (p->items, kernel_base[symbol], kernel_size[symbol]);
|
||||
|
||||
last_state->next = p;
|
||||
last_state = p;
|
||||
|
||||
nstates++;
|
||||
|
||||
return p;
|
||||
@@ -232,54 +206,39 @@ new_state (int symbol)
|
||||
/*--------------------------------------------------------------.
|
||||
| Find the state number for the state we would get to (from the |
|
||||
| current state) by shifting symbol. Create a new state if no |
|
||||
| equivalent one exists already. Used by append_states. |
|
||||
| equivalent one exists already. Used by append_states. |
|
||||
`--------------------------------------------------------------*/
|
||||
|
||||
static int
|
||||
get_state (int symbol)
|
||||
{
|
||||
int key;
|
||||
short *isp1;
|
||||
short *isp2;
|
||||
short *iend;
|
||||
int i;
|
||||
core *sp;
|
||||
int found;
|
||||
|
||||
int n;
|
||||
if (trace_flag)
|
||||
fprintf (stderr, "Entering get_state, state = %d, symbol = %d (%s)\n",
|
||||
this_state->number, symbol, tags[symbol]);
|
||||
|
||||
#if TRACE
|
||||
fprintf (stderr, "Entering get_state, symbol = %d\n", symbol);
|
||||
#endif
|
||||
|
||||
isp1 = kernel_base[symbol];
|
||||
iend = kernel_end[symbol];
|
||||
n = iend - isp1;
|
||||
|
||||
/* add up the target state's active item numbers to get a hash key */
|
||||
/* Add up the target state's active item numbers to get a hash key.
|
||||
*/
|
||||
key = 0;
|
||||
while (isp1 < iend)
|
||||
key += *isp1++;
|
||||
|
||||
for (i = 0; i < kernel_size[symbol]; ++i)
|
||||
key += kernel_base[symbol][i];
|
||||
key = key % STATE_TABLE_SIZE;
|
||||
|
||||
sp = state_table[key];
|
||||
|
||||
if (sp)
|
||||
{
|
||||
found = 0;
|
||||
int found = 0;
|
||||
while (!found)
|
||||
{
|
||||
if (sp->nitems == n)
|
||||
if (sp->nitems == kernel_size[symbol])
|
||||
{
|
||||
found = 1;
|
||||
isp1 = kernel_base[symbol];
|
||||
isp2 = sp->items;
|
||||
|
||||
while (found && isp1 < iend)
|
||||
{
|
||||
if (*isp1++ != *isp2++)
|
||||
found = 0;
|
||||
}
|
||||
for (i = 0; i < kernel_size[symbol]; ++i)
|
||||
if (kernel_base[symbol][i] != sp->items[i])
|
||||
found = 0;
|
||||
}
|
||||
|
||||
if (!found)
|
||||
@@ -301,6 +260,9 @@ get_state (int symbol)
|
||||
state_table[key] = sp = new_state (symbol);
|
||||
}
|
||||
|
||||
if (trace_flag)
|
||||
fprintf (stderr, "Exiting get_state => %d\n", sp->number);
|
||||
|
||||
return sp->number;
|
||||
}
|
||||
|
||||
@@ -318,9 +280,9 @@ append_states (void)
|
||||
int j;
|
||||
int symbol;
|
||||
|
||||
#if TRACE
|
||||
fprintf (stderr, "Entering append_states\n");
|
||||
#endif
|
||||
if (trace_flag)
|
||||
fprintf (stderr, "Entering append_states, state = %d\n",
|
||||
this_state->number);
|
||||
|
||||
/* first sort shift_symbol into increasing order */
|
||||
|
||||
@@ -337,55 +299,36 @@ append_states (void)
|
||||
}
|
||||
|
||||
for (i = 0; i < nshifts; i++)
|
||||
{
|
||||
symbol = shift_symbol[i];
|
||||
shiftset[i] = get_state (symbol);
|
||||
}
|
||||
shiftset[i] = get_state (shift_symbol[i]);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
new_states (void)
|
||||
{
|
||||
core *p;
|
||||
|
||||
p = (core *) xcalloc ((unsigned) (sizeof (core) - sizeof (short)), 1);
|
||||
first_state = last_state = this_state = p;
|
||||
first_state = last_state = this_state = CORE_ALLOC (0);
|
||||
nstates = 1;
|
||||
}
|
||||
|
||||
|
||||
/*------------------------------------------------------------.
|
||||
| Save the NSHIFTS of SHIFTSET into the current linked list. |
|
||||
`------------------------------------------------------------*/
|
||||
|
||||
static void
|
||||
save_shifts (void)
|
||||
{
|
||||
shifts *p;
|
||||
short *sp1;
|
||||
short *sp2;
|
||||
short *send;
|
||||
|
||||
p = (shifts *) xcalloc ((unsigned) (sizeof (shifts) +
|
||||
(nshifts - 1) * sizeof (short)), 1);
|
||||
shifts *p = shifts_new (nshifts);
|
||||
|
||||
p->number = this_state->number;
|
||||
p->nshifts = nshifts;
|
||||
|
||||
sp1 = shiftset;
|
||||
sp2 = p->shifts;
|
||||
send = shiftset + nshifts;
|
||||
|
||||
while (sp1 < send)
|
||||
*sp2++ = *sp1++;
|
||||
shortcpy (p->shifts, shiftset, nshifts);
|
||||
|
||||
if (last_shift)
|
||||
{
|
||||
last_shift->next = p;
|
||||
last_shift = p;
|
||||
}
|
||||
last_shift->next = p;
|
||||
else
|
||||
{
|
||||
first_shift = p;
|
||||
last_shift = p;
|
||||
}
|
||||
first_shift = p;
|
||||
last_shift = p;
|
||||
}
|
||||
|
||||
|
||||
@@ -400,7 +343,7 @@ insert_start_shift (void)
|
||||
core *statep;
|
||||
shifts *sp;
|
||||
|
||||
statep = (core *) xcalloc ((unsigned) (sizeof (core) - sizeof (short)), 1);
|
||||
statep = CORE_ALLOC (0);
|
||||
statep->number = nstates;
|
||||
statep->accessing_symbol = start_symbol;
|
||||
|
||||
@@ -408,9 +351,8 @@ insert_start_shift (void)
|
||||
last_state = statep;
|
||||
|
||||
/* Make a shift from this state to (what will be) the final state. */
|
||||
sp = XCALLOC (shifts, 1);
|
||||
sp = shifts_new (1);
|
||||
sp->number = nstates++;
|
||||
sp->nshifts = 1;
|
||||
sp->shifts[0] = nstates;
|
||||
|
||||
last_shift->next = sp;
|
||||
@@ -429,135 +371,18 @@ insert_start_shift (void)
|
||||
static void
|
||||
augment_automaton (void)
|
||||
{
|
||||
int i;
|
||||
int k;
|
||||
core *statep;
|
||||
shifts *sp;
|
||||
shifts *sp2;
|
||||
shifts *sp1 = NULL;
|
||||
|
||||
sp = first_shift;
|
||||
|
||||
if (sp)
|
||||
if (!sp->nshifts)
|
||||
{
|
||||
if (sp->number == 0)
|
||||
{
|
||||
k = sp->nshifts;
|
||||
statep = first_state->next;
|
||||
/* There are no shifts for any state. Make one shift, from the
|
||||
initial state to the next-to-final state. */
|
||||
|
||||
/* The states reached by shifts from first_state are numbered 1...K.
|
||||
Look for one reached by start_symbol. */
|
||||
while (statep->accessing_symbol < start_symbol
|
||||
&& statep->number < k)
|
||||
statep = statep->next;
|
||||
|
||||
if (statep->accessing_symbol == start_symbol)
|
||||
{
|
||||
/* We already have a next-to-final state.
|
||||
Make sure it has a shift to what will be the final state. */
|
||||
k = statep->number;
|
||||
|
||||
while (sp && sp->number < k)
|
||||
{
|
||||
sp1 = sp;
|
||||
sp = sp->next;
|
||||
}
|
||||
|
||||
if (sp && sp->number == k)
|
||||
{
|
||||
sp2 = (shifts *) xcalloc ((unsigned) (sizeof (shifts)
|
||||
+
|
||||
sp->nshifts *
|
||||
sizeof (short)), 1);
|
||||
sp2->number = k;
|
||||
sp2->nshifts = sp->nshifts + 1;
|
||||
sp2->shifts[0] = nstates;
|
||||
for (i = sp->nshifts; i > 0; i--)
|
||||
sp2->shifts[i] = sp->shifts[i - 1];
|
||||
|
||||
/* Patch sp2 into the chain of shifts in place of sp,
|
||||
following sp1. */
|
||||
sp2->next = sp->next;
|
||||
sp1->next = sp2;
|
||||
if (sp == last_shift)
|
||||
last_shift = sp2;
|
||||
XFREE (sp);
|
||||
}
|
||||
else
|
||||
{
|
||||
sp2 = XCALLOC (shifts, 1);
|
||||
sp2->number = k;
|
||||
sp2->nshifts = 1;
|
||||
sp2->shifts[0] = nstates;
|
||||
|
||||
/* Patch sp2 into the chain of shifts between sp1 and sp. */
|
||||
sp2->next = sp;
|
||||
sp1->next = sp2;
|
||||
if (sp == 0)
|
||||
last_shift = sp2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* There is no next-to-final state as yet. */
|
||||
/* Add one more shift in first_shift,
|
||||
going to the next-to-final state (yet to be made). */
|
||||
sp = first_shift;
|
||||
|
||||
sp2 = (shifts *) xcalloc (sizeof (shifts)
|
||||
+ sp->nshifts * sizeof (short), 1);
|
||||
sp2->nshifts = sp->nshifts + 1;
|
||||
|
||||
/* Stick this shift into the vector at the proper place. */
|
||||
statep = first_state->next;
|
||||
for (k = 0, i = 0; i < sp->nshifts; k++, i++)
|
||||
{
|
||||
if (statep->accessing_symbol > start_symbol && i == k)
|
||||
sp2->shifts[k++] = nstates;
|
||||
sp2->shifts[k] = sp->shifts[i];
|
||||
statep = statep->next;
|
||||
}
|
||||
if (i == k)
|
||||
sp2->shifts[k++] = nstates;
|
||||
|
||||
/* Patch sp2 into the chain of shifts
|
||||
in place of sp, at the beginning. */
|
||||
sp2->next = sp->next;
|
||||
first_shift = sp2;
|
||||
if (last_shift == sp)
|
||||
last_shift = sp2;
|
||||
|
||||
XFREE (sp);
|
||||
|
||||
/* Create the next-to-final state, with shift to
|
||||
what will be the final state. */
|
||||
insert_start_shift ();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* The initial state didn't even have any shifts.
|
||||
Give it one shift, to the next-to-final state. */
|
||||
sp = XCALLOC (shifts, 1);
|
||||
sp->nshifts = 1;
|
||||
sp->shifts[0] = nstates;
|
||||
|
||||
/* Patch sp into the chain of shifts at the beginning. */
|
||||
sp->next = first_shift;
|
||||
first_shift = sp;
|
||||
|
||||
/* Create the next-to-final state, with shift to
|
||||
what will be the final state. */
|
||||
insert_start_shift ();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* There are no shifts for any state.
|
||||
Make one shift, from the initial state to the next-to-final state. */
|
||||
|
||||
sp = XCALLOC (shifts, 1);
|
||||
sp->nshifts = 1;
|
||||
sp = shifts_new (1);
|
||||
sp->shifts[0] = nstates;
|
||||
|
||||
/* Initialize the chain of shifts with sp. */
|
||||
@@ -568,19 +393,121 @@ augment_automaton (void)
|
||||
what will be the final state. */
|
||||
insert_start_shift ();
|
||||
}
|
||||
else if (sp->number == 0)
|
||||
{
|
||||
statep = first_state->next;
|
||||
|
||||
/* The states reached by shifts from FIRST_STATE are numbered
|
||||
1..(SP->NSHIFTS). Look for one reached by START_SYMBOL. */
|
||||
while (statep->accessing_symbol < start_symbol
|
||||
&& statep->number < sp->nshifts)
|
||||
statep = statep->next;
|
||||
|
||||
if (statep->accessing_symbol == start_symbol)
|
||||
{
|
||||
/* We already have a next-to-final state.
|
||||
Make sure it has a shift to what will be the final state. */
|
||||
while (sp && sp->number < statep->number)
|
||||
{
|
||||
sp1 = sp;
|
||||
sp = sp->next;
|
||||
}
|
||||
|
||||
if (sp && sp->number == statep->number)
|
||||
{
|
||||
int i;
|
||||
shifts *sp2 = shifts_new (sp->nshifts + 1);
|
||||
sp2->number = statep->number;
|
||||
sp2->shifts[0] = nstates;
|
||||
for (i = sp->nshifts; i > 0; i--)
|
||||
sp2->shifts[i] = sp->shifts[i - 1];
|
||||
|
||||
/* Patch sp2 into the chain of shifts in place of sp,
|
||||
following sp1. */
|
||||
sp2->next = sp->next;
|
||||
sp1->next = sp2;
|
||||
if (sp == last_shift)
|
||||
last_shift = sp2;
|
||||
XFREE (sp);
|
||||
}
|
||||
else
|
||||
{
|
||||
shifts *sp2 = shifts_new (1);
|
||||
sp2->number = statep->number;
|
||||
sp2->shifts[0] = nstates;
|
||||
|
||||
/* Patch sp2 into the chain of shifts between sp1 and sp. */
|
||||
sp2->next = sp;
|
||||
sp1->next = sp2;
|
||||
if (sp == 0)
|
||||
last_shift = sp2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
int i, k;
|
||||
shifts *sp2;
|
||||
|
||||
/* There is no next-to-final state as yet. */
|
||||
/* Add one more shift in first_shift,
|
||||
going to the next-to-final state (yet to be made). */
|
||||
sp = first_shift;
|
||||
|
||||
sp2 = shifts_new (sp->nshifts + 1);
|
||||
|
||||
/* Stick this shift into the vector at the proper place. */
|
||||
statep = first_state->next;
|
||||
for (k = 0, i = 0; i < sp->nshifts; k++, i++)
|
||||
{
|
||||
if (statep->accessing_symbol > start_symbol && i == k)
|
||||
sp2->shifts[k++] = nstates;
|
||||
sp2->shifts[k] = sp->shifts[i];
|
||||
statep = statep->next;
|
||||
}
|
||||
if (i == k)
|
||||
sp2->shifts[k++] = nstates;
|
||||
|
||||
/* Patch sp2 into the chain of shifts
|
||||
in place of sp, at the beginning. */
|
||||
sp2->next = sp->next;
|
||||
first_shift = sp2;
|
||||
if (last_shift == sp)
|
||||
last_shift = sp2;
|
||||
|
||||
XFREE (sp);
|
||||
|
||||
/* Create the next-to-final state, with shift to
|
||||
what will be the final state. */
|
||||
insert_start_shift ();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* The initial state didn't even have any shifts.
|
||||
Give it one shift, to the next-to-final state. */
|
||||
sp = shifts_new (1);
|
||||
sp->shifts[0] = nstates;
|
||||
|
||||
/* Patch sp into the chain of shifts at the beginning. */
|
||||
sp->next = first_shift;
|
||||
first_shift = sp;
|
||||
|
||||
/* Create the next-to-final state, with shift to
|
||||
what will be the final state. */
|
||||
insert_start_shift ();
|
||||
}
|
||||
|
||||
/* Make the final state--the one that follows a shift from the
|
||||
next-to-final state.
|
||||
The symbol for that shift is 0 (end-of-file). */
|
||||
statep = (core *) xcalloc ((unsigned) (sizeof (core) - sizeof (short)), 1);
|
||||
statep = CORE_ALLOC (0);
|
||||
statep->number = nstates;
|
||||
last_state->next = statep;
|
||||
last_state = statep;
|
||||
|
||||
/* Make the shift from the final state to the termination state. */
|
||||
sp = XCALLOC (shifts, 1);
|
||||
sp = shifts_new (1);
|
||||
sp->number = nstates++;
|
||||
sp->nshifts = 1;
|
||||
sp->shifts[0] = nstates;
|
||||
last_shift->next = sp;
|
||||
last_shift = sp;
|
||||
@@ -590,7 +517,7 @@ augment_automaton (void)
|
||||
final_state = nstates;
|
||||
|
||||
/* Make the termination state. */
|
||||
statep = (core *) xcalloc ((unsigned) (sizeof (core) - sizeof (short)), 1);
|
||||
statep = CORE_ALLOC (0);
|
||||
statep->number = nstates++;
|
||||
last_state->next = statep;
|
||||
last_state = statep;
|
||||
@@ -606,21 +533,15 @@ augment_automaton (void)
|
||||
static void
|
||||
save_reductions (void)
|
||||
{
|
||||
short *isp;
|
||||
short *rp1;
|
||||
short *rp2;
|
||||
int item;
|
||||
int count;
|
||||
reductions *p;
|
||||
|
||||
short *rend;
|
||||
int i;
|
||||
|
||||
/* Find and count the active items that represent ends of rules. */
|
||||
|
||||
count = 0;
|
||||
for (isp = itemset; isp < itemsetend; isp++)
|
||||
for (i = 0; i < nitemset; ++i)
|
||||
{
|
||||
item = ritem[*isp];
|
||||
int item = ritem[itemset[i]];
|
||||
if (item < 0)
|
||||
redset[count++] = -item;
|
||||
}
|
||||
@@ -629,29 +550,18 @@ save_reductions (void)
|
||||
|
||||
if (count)
|
||||
{
|
||||
p = (reductions *) xcalloc ((unsigned) (sizeof (reductions) +
|
||||
(count - 1) * sizeof (short)), 1);
|
||||
reductions *p = REDUCTIONS_ALLOC (count);
|
||||
|
||||
p->number = this_state->number;
|
||||
p->nreds = count;
|
||||
|
||||
rp1 = redset;
|
||||
rp2 = p->rules;
|
||||
rend = rp1 + count;
|
||||
|
||||
for (/* nothing */; rp1 < rend; ++rp1, ++rp2)
|
||||
*rp2 = *rp1;
|
||||
shortcpy (p->rules, redset, count);
|
||||
|
||||
if (last_reduction)
|
||||
{
|
||||
last_reduction->next = p;
|
||||
last_reduction = p;
|
||||
}
|
||||
last_reduction->next = p;
|
||||
else
|
||||
{
|
||||
first_reduction = p;
|
||||
last_reduction = p;
|
||||
}
|
||||
first_reduction = p;
|
||||
last_reduction = p;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -670,6 +580,9 @@ generate_states (void)
|
||||
|
||||
while (this_state)
|
||||
{
|
||||
if (trace_flag)
|
||||
fprintf (stderr, "Processing state %d (reached by %s)\n",
|
||||
this_state->number, tags[this_state->accessing_symbol]);
|
||||
/* Set up ruleset and itemset for the transitions out of this
|
||||
state. ruleset gets a 1 bit for each rule that could reduce
|
||||
now. itemset gets a vector of all the items that could be
|
||||
@@ -684,8 +597,7 @@ generate_states (void)
|
||||
|
||||
/* create the shifts structures for the shifts to those states,
|
||||
now that the state numbers transitioning to are known */
|
||||
if (nshifts > 0)
|
||||
save_shifts ();
|
||||
save_shifts ();
|
||||
|
||||
/* states are queued when they are created; process them all */
|
||||
this_state = this_state->next;
|
||||
|
||||
+31
-6
@@ -1,19 +1,45 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
AUTOMAKE_OPTIONS = 1.4 ../lib/ansi2knr
|
||||
## Copyright 2001, 2002 Free Software Foundation, Inc.
|
||||
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
## the Free Software Foundation; either version 2 of the License, or
|
||||
## (at your option) any later version.
|
||||
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
## GNU General Public License for more details.
|
||||
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with this program; if not, write to the Free Software
|
||||
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
## 02111-1307 USA
|
||||
|
||||
AUTOMAKE_OPTIONS = ../lib/ansi2knr
|
||||
|
||||
DEFS = @DEFS@ \
|
||||
-DBISON_SIMPLE=\"$(pkgdatadir)/bison.simple\" \
|
||||
-DBISON_HAIRY=\"$(pkgdatadir)/bison.hairy\" \
|
||||
-DLOCALEDIR=\"$(datadir)/locale\"
|
||||
|
||||
INCLUDES = -I../intl -I$(top_srcdir)/lib -I..
|
||||
LDADD = @INTLLIBS@ ../lib/libbison.a
|
||||
CFLAGS = @CFLAGS@ $(WARNING_CFLAGS) $(WERROR_CFLAGS)
|
||||
|
||||
# libintl.h in is build/intl, intl/libgettext.h in src/,
|
||||
# config.h in build/.
|
||||
INCLUDES = -I$(top_builddir)/intl \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)/intl \
|
||||
-I$(top_srcdir)/lib
|
||||
|
||||
LDADD = $(INTLLIBS) ../lib/libbison.a
|
||||
|
||||
bin_PROGRAMS = bison
|
||||
|
||||
bison_SOURCES = LR0.c closure.c complain.c conflicts.c \
|
||||
derives.c \
|
||||
files.c getargs.c gram.c lalr.c lex.c main.c nullable.c \
|
||||
output.c \
|
||||
output.h output.c \
|
||||
state.h state.c \
|
||||
print.c reader.c reduce.c symtab.c warshall.c vcg.c print_graph.c
|
||||
|
||||
EXTRA_bison_SOURCES = vmsgetargs.c
|
||||
@@ -21,7 +47,6 @@ EXTRA_bison_SOURCES = vmsgetargs.c
|
||||
noinst_HEADERS = LR0.h closure.h complain.h conflicts.h \
|
||||
derives.h \
|
||||
files.h getargs.h gram.h lalr.h lex.h nullable.h \
|
||||
output.h state.h \
|
||||
print.h reader.h reduce.h symtab.h warshall.h system.h types.h \
|
||||
vcg.h vcg_defaults.h print_graph.h
|
||||
|
||||
|
||||
+92
-65
@@ -1,6 +1,7 @@
|
||||
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.5c from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
# Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@@ -12,7 +13,6 @@
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
@@ -43,9 +43,11 @@ AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = @program_transform_name@
|
||||
@@ -57,7 +59,12 @@ PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
|
||||
EXEEXT = @EXEEXT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOM4TE = @AUTOM4TE@
|
||||
AWK = @AWK@
|
||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||
CATALOGS = @CATALOGS@
|
||||
@@ -66,7 +73,7 @@ CC = @CC@
|
||||
CPP = @CPP@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEPDIR = @DEPDIR@
|
||||
EXEEXT = @EXEEXT@
|
||||
GCC = @GCC@
|
||||
GENCAT = @GENCAT@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMOFILES = @GMOFILES@
|
||||
@@ -77,12 +84,10 @@ INTLBISON = @INTLBISON@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||
LIB = @LIB@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
M4 = @M4@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
POFILES = @POFILES@
|
||||
POSUB = @POSUB@
|
||||
@@ -92,26 +97,38 @@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
WARNING_CFLAGS = @WARNING_CFLAGS@
|
||||
WERROR_CFLAGS = @WERROR_CFLAGS@
|
||||
am__include = @am__include@
|
||||
am__quote = @am__quote@
|
||||
install_sh = @install_sh@
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.4 ../lib/ansi2knr
|
||||
AUTOMAKE_OPTIONS = ../lib/ansi2knr
|
||||
|
||||
DEFS = @DEFS@ \
|
||||
-DBISON_SIMPLE=\"$(pkgdatadir)/bison.simple\" \
|
||||
-DBISON_HAIRY=\"$(pkgdatadir)/bison.hairy\" \
|
||||
-DLOCALEDIR=\"$(datadir)/locale\"
|
||||
|
||||
|
||||
INCLUDES = -I../intl -I$(top_srcdir)/lib -I..
|
||||
LDADD = @INTLLIBS@ ../lib/libbison.a
|
||||
CFLAGS = @CFLAGS@ $(WARNING_CFLAGS) $(WERROR_CFLAGS)
|
||||
|
||||
# libintl.h in is build/intl, intl/libgettext.h in src/,
|
||||
# config.h in build/.
|
||||
INCLUDES = -I$(top_builddir)/intl \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)/intl \
|
||||
-I$(top_srcdir)/lib
|
||||
|
||||
|
||||
LDADD = $(INTLLIBS) ../lib/libbison.a
|
||||
|
||||
bin_PROGRAMS = bison
|
||||
|
||||
bison_SOURCES = LR0.c closure.c complain.c conflicts.c \
|
||||
derives.c \
|
||||
files.c getargs.c gram.c lalr.c lex.c main.c nullable.c \
|
||||
output.c \
|
||||
output.h output.c \
|
||||
state.h state.c \
|
||||
print.c reader.c reduce.c symtab.c warshall.c vcg.c print_graph.c
|
||||
|
||||
|
||||
@@ -120,7 +137,6 @@ EXTRA_bison_SOURCES = vmsgetargs.c
|
||||
noinst_HEADERS = LR0.h closure.h complain.h conflicts.h \
|
||||
derives.h \
|
||||
files.h getargs.h gram.h lalr.h lex.h nullable.h \
|
||||
output.h state.h \
|
||||
print.h reader.h reduce.h symtab.h warshall.h system.h types.h \
|
||||
vcg.h vcg_defaults.h print_graph.h
|
||||
|
||||
@@ -139,9 +155,10 @@ am_bison_OBJECTS = LR0$U.$(OBJEXT) closure$U.$(OBJEXT) \
|
||||
complain$U.$(OBJEXT) conflicts$U.$(OBJEXT) derives$U.$(OBJEXT) \
|
||||
files$U.$(OBJEXT) getargs$U.$(OBJEXT) gram$U.$(OBJEXT) \
|
||||
lalr$U.$(OBJEXT) lex$U.$(OBJEXT) main$U.$(OBJEXT) \
|
||||
nullable$U.$(OBJEXT) output$U.$(OBJEXT) print$U.$(OBJEXT) \
|
||||
reader$U.$(OBJEXT) reduce$U.$(OBJEXT) symtab$U.$(OBJEXT) \
|
||||
warshall$U.$(OBJEXT) vcg$U.$(OBJEXT) print_graph$U.$(OBJEXT)
|
||||
nullable$U.$(OBJEXT) output$U.$(OBJEXT) state$U.$(OBJEXT) \
|
||||
print$U.$(OBJEXT) reader$U.$(OBJEXT) reduce$U.$(OBJEXT) \
|
||||
symtab$U.$(OBJEXT) warshall$U.$(OBJEXT) vcg$U.$(OBJEXT) \
|
||||
print_graph$U.$(OBJEXT)
|
||||
bison_OBJECTS = $(am_bison_OBJECTS)
|
||||
bison_LDADD = $(LDADD)
|
||||
bison_DEPENDENCIES = ../lib/libbison.a
|
||||
@@ -151,22 +168,23 @@ CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
|
||||
@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/LR0$U.Po $(DEPDIR)/closure$U.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/complain$U.Po $(DEPDIR)/conflicts$U.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/derives$U.Po $(DEPDIR)/files$U.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/getargs$U.Po $(DEPDIR)/gram$U.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/lalr$U.Po $(DEPDIR)/lex$U.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/main$U.Po $(DEPDIR)/nullable$U.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/output$U.Po $(DEPDIR)/print$U.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/print_graph$U.Po $(DEPDIR)/reader$U.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/reduce$U.Po $(DEPDIR)/symtab$U.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/vcg$U.Po $(DEPDIR)/vmsgetargs$U.Po \
|
||||
@AMDEP_TRUE@ $(DEPDIR)/warshall$U.Po
|
||||
am__depfiles_maybe = depfiles
|
||||
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/LR0$U.Po ./$(DEPDIR)/closure$U.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/complain$U.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/conflicts$U.Po ./$(DEPDIR)/derives$U.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/files$U.Po ./$(DEPDIR)/getargs$U.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/gram$U.Po ./$(DEPDIR)/lalr$U.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/lex$U.Po ./$(DEPDIR)/main$U.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/nullable$U.Po ./$(DEPDIR)/output$U.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/print$U.Po ./$(DEPDIR)/print_graph$U.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/reader$U.Po ./$(DEPDIR)/reduce$U.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/state$U.Po ./$(DEPDIR)/symtab$U.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/vcg$U.Po ./$(DEPDIR)/vmsgetargs$U.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/warshall$U.Po
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
CFLAGS = @CFLAGS@
|
||||
DIST_SOURCES = $(bison_SOURCES) $(EXTRA_bison_SOURCES)
|
||||
DATA = $(pkgdata_DATA)
|
||||
|
||||
@@ -183,9 +201,7 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu src/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && \
|
||||
CONFIG_HEADERS= CONFIG_LINKS= \
|
||||
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
||||
@@ -224,29 +240,30 @@ ANSI2KNR = ../lib/ansi2knr
|
||||
cd ../lib && $(MAKE) $(AM_MAKEFLAGS) ansi2knr
|
||||
|
||||
mostlyclean-kr:
|
||||
-rm -f *_.c
|
||||
-test "$U" = "" || rm -f *_.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/LR0$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/closure$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/complain$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/conflicts$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/derives$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/files$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getargs$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/gram$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/lalr$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/lex$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/main$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/nullable$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/output$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/print$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/print_graph$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/reader$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/reduce$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/symtab$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/vcg$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/vmsgetargs$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/warshall$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LR0$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/closure$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/complain$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conflicts$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/derives$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/files$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getargs$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gram$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lalr$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lex$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nullable$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print_graph$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reader$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reduce$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/state$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symtab$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcg$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmsgetargs$U.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/warshall$U.Po@am__quote@
|
||||
|
||||
distclean-depend:
|
||||
-rm -rf $(DEPDIR)
|
||||
@@ -297,6 +314,8 @@ reader_.c: reader.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/reader.c; then echo $(srcdir)/reader.c; else echo reader.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > reader_.c || rm -f reader_.c
|
||||
reduce_.c: reduce.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/reduce.c; then echo $(srcdir)/reduce.c; else echo reduce.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > reduce_.c || rm -f reduce_.c
|
||||
state_.c: state.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/state.c; then echo $(srcdir)/state.c; else echo state.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > state_.c || rm -f state_.c
|
||||
symtab_.c: symtab.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/symtab.c; then echo $(srcdir)/symtab.c; else echo symtab.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > symtab_.c || rm -f symtab_.c
|
||||
vcg_.c: vcg.c $(ANSI2KNR)
|
||||
@@ -310,17 +329,18 @@ conflicts_.$(OBJEXT) derives_.$(OBJEXT) files_.$(OBJEXT) \
|
||||
getargs_.$(OBJEXT) gram_.$(OBJEXT) lalr_.$(OBJEXT) lex_.$(OBJEXT) \
|
||||
main_.$(OBJEXT) nullable_.$(OBJEXT) output_.$(OBJEXT) print_.$(OBJEXT) \
|
||||
print_graph_.$(OBJEXT) reader_.$(OBJEXT) reduce_.$(OBJEXT) \
|
||||
symtab_.$(OBJEXT) vcg_.$(OBJEXT) vmsgetargs_.$(OBJEXT) \
|
||||
state_.$(OBJEXT) symtab_.$(OBJEXT) vcg_.$(OBJEXT) vmsgetargs_.$(OBJEXT) \
|
||||
warshall_.$(OBJEXT) : $(ANSI2KNR)
|
||||
uninstall-info-am:
|
||||
pkgdataDATA_INSTALL = $(INSTALL_DATA)
|
||||
install-pkgdataDATA: $(pkgdata_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
|
||||
@list='$(pkgdata_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f="`echo $$p | sed -e 's|^.*/||'`"; \
|
||||
echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f"; \
|
||||
$(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f; \
|
||||
echo " $(pkgdataDATA_INSTALL) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f"; \
|
||||
$(pkgdataDATA_INSTALL) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f; \
|
||||
done
|
||||
|
||||
uninstall-pkgdataDATA:
|
||||
@@ -331,38 +351,41 @@ uninstall-pkgdataDATA:
|
||||
rm -f $(DESTDIR)$(pkgdatadir)/$$f; \
|
||||
done
|
||||
|
||||
ETAGS = etags
|
||||
ETAGSFLAGS =
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique $(LISP)
|
||||
mkid -fID $$unique
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||
|| etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
|
||||
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|
||||
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`CDPATH=: && cd $(top_builddir) && pwd` \
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
top_distdir = ..
|
||||
@@ -370,13 +393,16 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
$(mkinstalldirs) "$(distdir)/$$dir"; \
|
||||
dir="/$$dir"; \
|
||||
$(mkinstalldirs) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pR $$d/$$file $(distdir) \
|
||||
cp -pR $$d/$$file $(distdir)$$dir \
|
||||
|| exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
@@ -402,6 +428,7 @@ install-am: all-am
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
+323
-201
@@ -1,7 +1,7 @@
|
||||
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
|
||||
#line
|
||||
/* Skeleton output parser for bison,
|
||||
Copyright 1984, 1989, 1990, 2000, 2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -28,54 +28,120 @@
|
||||
It was written by Richard Stallman by simplifying the hairy parser
|
||||
used when %semantic_parser is specified. */
|
||||
|
||||
#ifndef YYSTACK_USE_ALLOCA
|
||||
# ifdef alloca
|
||||
# define YYSTACK_USE_ALLOCA 1
|
||||
# else /* alloca not defined */
|
||||
# ifdef __GNUC__
|
||||
# define YYSTACK_USE_ALLOCA 1
|
||||
# define alloca __builtin_alloca
|
||||
# else /* not GNU C. */
|
||||
# if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
|
||||
# define YYSTACK_USE_ALLOCA 1
|
||||
# include <alloca.h>
|
||||
# else /* not sparc */
|
||||
/* We think this test detects Watcom and Microsoft C. */
|
||||
/* This used to test MSDOS, but that is a bad idea since that
|
||||
symbol is in the user namespace. */
|
||||
# if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
|
||||
# if 0
|
||||
/* No need for malloc.h, which pollutes the namespace; instead,
|
||||
just don't use alloca. */
|
||||
# include <malloc.h>
|
||||
# endif
|
||||
# else /* not MSDOS, or __TURBOC__ */
|
||||
# if defined(_AIX)
|
||||
/* I don't know what this was needed for, but it pollutes the
|
||||
namespace. So I turned it off. rms, 2 May 1997. */
|
||||
/* #include <malloc.h> */
|
||||
#pragma alloca
|
||||
# define YYSTACK_USE_ALLOCA 1
|
||||
# else /* not MSDOS, or __TURBOC__, or _AIX */
|
||||
# if 0
|
||||
/* [email protected] says this works for HPUX 9.05 and up, and on
|
||||
HPUX 10. Eventually we can turn this on. */
|
||||
# ifdef __hpux
|
||||
# define YYSTACK_USE_ALLOCA 1
|
||||
# define alloca __builtin_alloca
|
||||
# endif /* __hpux */
|
||||
# endif
|
||||
# endif /* not _AIX */
|
||||
# endif /* not MSDOS, or __TURBOC__ */
|
||||
# endif /* not sparc */
|
||||
# endif /* not GNU C */
|
||||
# endif /* alloca not defined */
|
||||
#endif /* YYSTACK_USE_ALLOCA not defined */
|
||||
/* All symbols defined below should begin with yy or YY, to avoid
|
||||
infringing on user name space. This should be done even for local
|
||||
variables, as they might otherwise be expanded by user macros.
|
||||
There are some unavoidable exceptions within include files to
|
||||
define necessary library symbols; they are noted "INFRINGES ON
|
||||
USER NAME SPACE" below. */
|
||||
|
||||
#if YYSTACK_USE_ALLOCA
|
||||
# define YYSTACK_ALLOC alloca
|
||||
#ifdef __cplusplus
|
||||
# define YYSTD(x) std::x
|
||||
#else
|
||||
# define YYSTACK_ALLOC malloc
|
||||
# define YYSTD(x) x
|
||||
#endif
|
||||
|
||||
#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
|
||||
|
||||
/* The parser invokes alloca or malloc; define the necessary symbols. */
|
||||
|
||||
# if YYSTACK_USE_ALLOCA
|
||||
# define YYSTACK_ALLOC alloca
|
||||
# define YYSIZE_T YYSTD (size_t)
|
||||
# else
|
||||
# ifndef YYSTACK_USE_ALLOCA
|
||||
# if defined (alloca) || defined (_ALLOCA_H)
|
||||
# define YYSTACK_ALLOC alloca
|
||||
# define YYSIZE_T YYSTD (size_t)
|
||||
# else
|
||||
# ifdef __GNUC__
|
||||
# define YYSTACK_ALLOC __builtin_alloca
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifdef YYSTACK_ALLOC
|
||||
/* Pacify GCC's `empty if-body' warning. */
|
||||
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
|
||||
# else
|
||||
# ifdef __cplusplus
|
||||
# include <cstdlib> /* INFRINGES ON USER NAME SPACE */
|
||||
# define YYSIZE_T std::size_t
|
||||
# else
|
||||
# ifdef __STDC__
|
||||
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
|
||||
# define YYSIZE_T size_t
|
||||
# endif
|
||||
# endif
|
||||
# define YYSTACK_ALLOC YYSTD (malloc)
|
||||
# define YYSTACK_FREE YYSTD (free)
|
||||
# endif
|
||||
|
||||
/* A type that is properly aligned for any stack member. */
|
||||
union yyalloc
|
||||
{
|
||||
short yyss;
|
||||
YYSTYPE yyvs;
|
||||
# if YYLSP_NEEDED
|
||||
YYLTYPE yyls;
|
||||
# endif
|
||||
};
|
||||
|
||||
/* The size of the maximum gap between one aligned stack and the next. */
|
||||
# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
|
||||
|
||||
/* The size of an array large to enough to hold all stacks, each with
|
||||
N elements. */
|
||||
# if YYLSP_NEEDED
|
||||
# define YYSTACK_BYTES(N) \
|
||||
((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
|
||||
+ 2 * YYSTACK_GAP_MAX)
|
||||
# else
|
||||
# define YYSTACK_BYTES(N) \
|
||||
((N) * (sizeof (short) + sizeof (YYSTYPE)) \
|
||||
+ YYSTACK_GAP_MAX)
|
||||
# endif
|
||||
|
||||
/* Relocate the TYPE STACK from its old location to the new one. The
|
||||
local variables YYSIZE and YYSTACKSIZE give the old and new number of
|
||||
elements in the stack, and YYPTR gives the new location of the
|
||||
stack. Advance YYPTR to a properly aligned location for the next
|
||||
stack. */
|
||||
# define YYSTACK_RELOCATE(Type, Stack) \
|
||||
do \
|
||||
{ \
|
||||
YYSIZE_T yynewbytes; \
|
||||
yymemcpy ((char *) yyptr, (char *) (Stack), \
|
||||
yysize * (YYSIZE_T) sizeof (Type)); \
|
||||
Stack = &yyptr->Stack; \
|
||||
yynewbytes = yystacksize * sizeof (Type) + YYSTACK_GAP_MAX; \
|
||||
yyptr += yynewbytes / sizeof (*yyptr); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
|
||||
|
||||
|
||||
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
|
||||
# define YYSIZE_T __SIZE_TYPE__
|
||||
#endif
|
||||
#if ! defined (YYSIZE_T) && defined (size_t)
|
||||
# define YYSIZE_T size_t
|
||||
#endif
|
||||
#if ! defined (YYSIZE_T)
|
||||
# ifdef __cplusplus
|
||||
# include <cstddef> /* INFRINGES ON USER NAME SPACE */
|
||||
# define YYSIZE_T std::size_t
|
||||
# else
|
||||
# ifdef __STDC__
|
||||
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
|
||||
# define YYSIZE_T size_t
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#if ! defined (YYSIZE_T)
|
||||
# define YYSIZE_T unsigned int
|
||||
#endif
|
||||
|
||||
#define yyerrok (yyerrstatus = 0)
|
||||
@@ -148,10 +214,20 @@ while (0)
|
||||
|
||||
/* Enable debugging if requested. */
|
||||
#if YYDEBUG
|
||||
|
||||
# ifndef YYFPRINTF
|
||||
# ifdef __cplusplus
|
||||
# include <cstdio> /* INFRINGES ON USER NAME SPACE */
|
||||
# else
|
||||
# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
|
||||
# endif
|
||||
# define YYFPRINTF YYSTD (fprintf)
|
||||
# endif
|
||||
|
||||
# define YYDPRINTF(Args) \
|
||||
do { \
|
||||
if (yydebug) \
|
||||
fprintf Args; \
|
||||
YYFPRINTF Args; \
|
||||
} while (0)
|
||||
/* Nonzero means print parse trace. [The following comment makes no
|
||||
sense to me. Could someone clarify it? --akim] Since this is
|
||||
@@ -168,7 +244,12 @@ int yydebug;
|
||||
#endif
|
||||
|
||||
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
|
||||
if the built-in stack extension method is used). */
|
||||
if the built-in stack extension method is used).
|
||||
|
||||
Do not make this value too large; the results are undefined if
|
||||
SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
|
||||
evaluated with infinite-precision integer arithmetic. */
|
||||
|
||||
#if YYMAXDEPTH == 0
|
||||
# undef YYMAXDEPTH
|
||||
#endif
|
||||
@@ -177,35 +258,83 @@ int yydebug;
|
||||
# define YYMAXDEPTH 10000
|
||||
#endif
|
||||
|
||||
/* Define __yy_memcpy. Note that the size argument
|
||||
should be passed with type unsigned int, because that is what the non-GCC
|
||||
definitions require. With GCC, __builtin_memcpy takes an arg
|
||||
of type size_t, but it can handle unsigned int. */
|
||||
|
||||
#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
|
||||
# define __yy_memcpy(To, From, Count) __builtin_memcpy (To, From, Count)
|
||||
#else /* not GNU C or C++ */
|
||||
#if ! defined (yyoverflow) && ! defined (yymemcpy)
|
||||
# if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
|
||||
# define yymemcpy __builtin_memcpy
|
||||
# else /* not GNU C or C++ */
|
||||
|
||||
/* This is the most reliable way to avoid incompatibilities
|
||||
in available built-in functions on various systems. */
|
||||
static void
|
||||
# ifndef __cplusplus
|
||||
__yy_memcpy (to, from, count)
|
||||
char *to;
|
||||
const char *from;
|
||||
unsigned int count;
|
||||
# else /* __cplusplus */
|
||||
__yy_memcpy (char *to, const char *from, unsigned int count)
|
||||
# endif
|
||||
# if defined (__STDC__) || defined (__cplusplus)
|
||||
yymemcpy (char *yyto, const char *yyfrom, YYSIZE_T yycount)
|
||||
# else
|
||||
yymemcpy (yyto, yyfrom, yycount)
|
||||
char *yyto;
|
||||
const char *yyfrom;
|
||||
YYSIZE_T yycount;
|
||||
# endif
|
||||
{
|
||||
register const char *f = from;
|
||||
register char *t = to;
|
||||
register int i = count;
|
||||
register const char *yyf = yyfrom;
|
||||
register char *yyt = yyto;
|
||||
register YYSIZE_T yyi = yycount;
|
||||
|
||||
while (i-- > 0)
|
||||
*t++ = *f++;
|
||||
while (yyi-- != 0)
|
||||
*yyt++ = *yyf++;
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef YYERROR_VERBOSE
|
||||
|
||||
# ifndef yystrlen
|
||||
# if defined (__GLIBC__) && defined (_STRING_H)
|
||||
# define yystrlen strlen
|
||||
# else
|
||||
/* Return the length of YYSTR. */
|
||||
static YYSIZE_T
|
||||
# if defined (__STDC__) || defined (__cplusplus)
|
||||
yystrlen (const char *yystr)
|
||||
# else
|
||||
yystrlen (yystr)
|
||||
const char *yystr;
|
||||
# endif
|
||||
{
|
||||
register const char *yys = yystr;
|
||||
|
||||
while (*yys++ != '\0')
|
||||
continue;
|
||||
|
||||
return yys - yystr - 1;
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifndef yystpcpy
|
||||
# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
|
||||
# define yystpcpy stpcpy
|
||||
# else
|
||||
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
|
||||
YYDEST. */
|
||||
static char *
|
||||
# if defined (__STDC__) || defined (__cplusplus)
|
||||
yystpcpy (char *yydest, const char *yysrc)
|
||||
# else
|
||||
yystpcpy (yydest, yysrc)
|
||||
char *yydest;
|
||||
const char *yysrc;
|
||||
# endif
|
||||
{
|
||||
register char *yyd = yydest;
|
||||
register const char *yys = yysrc;
|
||||
|
||||
while ((*yyd++ = *yys++) != '\0')
|
||||
continue;
|
||||
|
||||
return yyd - 1;
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#line
|
||||
@@ -241,7 +370,7 @@ int yyparse (void);
|
||||
/* YY_DECL_VARIABLES -- depending whether we use a pure parser,
|
||||
variables are global, or local to YYPARSE. */
|
||||
|
||||
#define _YY_DECL_VARIABLES \
|
||||
#define YY_DECL_NON_LSP_VARIABLES \
|
||||
/* The lookahead symbol. */ \
|
||||
int yychar; \
|
||||
\
|
||||
@@ -253,13 +382,13 @@ int yynerrs;
|
||||
|
||||
#if YYLSP_NEEDED
|
||||
# define YY_DECL_VARIABLES \
|
||||
_YY_DECL_VARIABLES \
|
||||
YY_DECL_NON_LSP_VARIABLES \
|
||||
\
|
||||
/* Location data for the lookahead symbol. */ \
|
||||
YYLTYPE yylloc;
|
||||
#else
|
||||
# define YY_DECL_VARIABLES \
|
||||
_YY_DECL_VARIABLES
|
||||
YY_DECL_NON_LSP_VARIABLES
|
||||
#endif
|
||||
|
||||
|
||||
@@ -280,6 +409,7 @@ yyparse (YYPARSE_PARAM_ARG)
|
||||
|
||||
register int yystate;
|
||||
register int yyn;
|
||||
int yyresult;
|
||||
/* Number of tokens to shift before error messages enabled. */
|
||||
int yyerrstatus;
|
||||
/* Lookahead token as an internal (translated) token number. */
|
||||
@@ -287,7 +417,7 @@ yyparse (YYPARSE_PARAM_ARG)
|
||||
|
||||
/* Three stacks and their tools:
|
||||
`yyss': related to states,
|
||||
`yysv': related to semantic values,
|
||||
`yyvs': related to semantic values,
|
||||
`yyls': related to locations.
|
||||
|
||||
Refer to the stacks thru separate pointers, to allow yyoverflow
|
||||
@@ -316,16 +446,15 @@ yyparse (YYPARSE_PARAM_ARG)
|
||||
# define YYPOPSTACK (yyvsp--, yyssp--)
|
||||
#endif
|
||||
|
||||
int yystacksize = YYINITDEPTH;
|
||||
int yyfree_stacks = 0;
|
||||
YYSIZE_T yystacksize = YYINITDEPTH;
|
||||
|
||||
|
||||
/* The variables used to return semantic value and location from the
|
||||
action routines. */
|
||||
YYSTYPE yyval;
|
||||
# if YYLSP_NEEDED
|
||||
#if YYLSP_NEEDED
|
||||
YYLTYPE yyloc;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* When reducing, the number of symbols on the RHS of the reduced
|
||||
rule. */
|
||||
@@ -358,87 +487,77 @@ yyparse (YYPARSE_PARAM_ARG)
|
||||
have just been pushed. so pushing a state here evens the stacks.
|
||||
*/
|
||||
yyssp++;
|
||||
|
||||
|
||||
yysetstate:
|
||||
*yyssp = yystate;
|
||||
|
||||
if (yyssp >= yyss + yystacksize - 1)
|
||||
{
|
||||
/* Give user a chance to reallocate the stack. Use copies of
|
||||
these so that the &'s don't force the real ones into memory.
|
||||
*/
|
||||
YYSTYPE *yyvs1 = yyvs;
|
||||
short *yyss1 = yyss;
|
||||
#if YYLSP_NEEDED
|
||||
YYLTYPE *yyls1 = yyls;
|
||||
#endif
|
||||
|
||||
/* Get the current used size of the three stacks, in elements. */
|
||||
int size = yyssp - yyss + 1;
|
||||
YYSIZE_T yysize = yyssp - yyss + 1;
|
||||
|
||||
#ifdef yyoverflow
|
||||
/* Each stack pointer address is followed by the size of the
|
||||
data in use in that stack, in bytes. */
|
||||
# if YYLSP_NEEDED
|
||||
/* This used to be a conditional around just the two extra args,
|
||||
but that might be undefined if yyoverflow is a macro. */
|
||||
yyoverflow ("parser stack overflow",
|
||||
&yyss1, size * sizeof (*yyssp),
|
||||
&yyvs1, size * sizeof (*yyvsp),
|
||||
&yyls1, size * sizeof (*yylsp),
|
||||
&yystacksize);
|
||||
# else
|
||||
yyoverflow ("parser stack overflow",
|
||||
&yyss1, size * sizeof (*yyssp),
|
||||
&yyvs1, size * sizeof (*yyvsp),
|
||||
&yystacksize);
|
||||
# endif
|
||||
{
|
||||
/* Give user a chance to reallocate the stack. Use copies of
|
||||
these so that the &'s don't force the real ones into
|
||||
memory. */
|
||||
YYSTYPE *yyvs1 = yyvs;
|
||||
short *yyss1 = yyss;
|
||||
|
||||
yyss = yyss1; yyvs = yyvs1;
|
||||
/* Each stack pointer address is followed by the size of the
|
||||
data in use in that stack, in bytes. */
|
||||
# if YYLSP_NEEDED
|
||||
yyls = yyls1;
|
||||
YYLTYPE *yyls1 = yyls;
|
||||
/* This used to be a conditional around just the two extra args,
|
||||
but that might be undefined if yyoverflow is a macro. */
|
||||
yyoverflow ("parser stack overflow",
|
||||
&yyss1, yysize * sizeof (*yyssp),
|
||||
&yyvs1, yysize * sizeof (*yyvsp),
|
||||
&yyls1, yysize * sizeof (*yylsp),
|
||||
&yystacksize);
|
||||
yyls = yyls1;
|
||||
# else
|
||||
yyoverflow ("parser stack overflow",
|
||||
&yyss1, yysize * sizeof (*yyssp),
|
||||
&yyvs1, yysize * sizeof (*yyvsp),
|
||||
&yystacksize);
|
||||
# endif
|
||||
yyss = yyss1;
|
||||
yyvs = yyvs1;
|
||||
}
|
||||
#else /* no yyoverflow */
|
||||
/* Extend the stack our own way. */
|
||||
if (yystacksize >= YYMAXDEPTH)
|
||||
{
|
||||
yyerror ("parser stack overflow");
|
||||
if (yyfree_stacks)
|
||||
{
|
||||
free (yyss);
|
||||
free (yyvs);
|
||||
# if YYLSP_NEEDED
|
||||
free (yyls);
|
||||
# endif
|
||||
}
|
||||
return 2;
|
||||
}
|
||||
goto yyoverflowlab;
|
||||
yystacksize *= 2;
|
||||
if (yystacksize > YYMAXDEPTH)
|
||||
yystacksize = YYMAXDEPTH;
|
||||
# ifndef YYSTACK_USE_ALLOCA
|
||||
yyfree_stacks = 1;
|
||||
# endif
|
||||
yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
|
||||
__yy_memcpy ((char *)yyss, (char *)yyss1,
|
||||
size * (unsigned int) sizeof (*yyssp));
|
||||
yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
|
||||
__yy_memcpy ((char *)yyvs, (char *)yyvs1,
|
||||
size * (unsigned int) sizeof (*yyvsp));
|
||||
|
||||
{
|
||||
short *yyss1 = yyss;
|
||||
union yyalloc *yyptr =
|
||||
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
|
||||
if (! yyptr)
|
||||
goto yyoverflowlab;
|
||||
YYSTACK_RELOCATE (short, yyss);
|
||||
YYSTACK_RELOCATE (YYSTYPE, yyvs);
|
||||
# if YYLSP_NEEDED
|
||||
yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
|
||||
__yy_memcpy ((char *)yyls, (char *)yyls1,
|
||||
size * (unsigned int) sizeof (*yylsp));
|
||||
YYSTACK_RELOCATE (YYLTYPE, yyls);
|
||||
# endif
|
||||
# undef YYSTACK_RELOCATE
|
||||
if (yyss1 != yyssa)
|
||||
YYSTACK_FREE (yyss1);
|
||||
}
|
||||
#endif /* no yyoverflow */
|
||||
|
||||
yyssp = yyss + size - 1;
|
||||
yyvsp = yyvs + size - 1;
|
||||
yyssp = yyss + yysize - 1;
|
||||
yyvsp = yyvs + yysize - 1;
|
||||
#if YYLSP_NEEDED
|
||||
yylsp = yyls + size - 1;
|
||||
yylsp = yyls + yysize - 1;
|
||||
#endif
|
||||
|
||||
YYDPRINTF ((stderr, "Stack size increased to %d\n", yystacksize));
|
||||
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
|
||||
(unsigned long int) yystacksize));
|
||||
|
||||
if (yyssp >= yyss + yystacksize - 1)
|
||||
YYABORT;
|
||||
@@ -493,13 +612,14 @@ yybackup:
|
||||
which are defined only if `YYDEBUG' is set. */
|
||||
if (yydebug)
|
||||
{
|
||||
fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
|
||||
YYFPRINTF (stderr, "Next token is %d (%s",
|
||||
yychar, yytname[yychar1]);
|
||||
/* Give the individual parser a way to print the precise
|
||||
meaning of a token, for further debugging info. */
|
||||
# ifdef YYPRINT
|
||||
YYPRINT (stderr, yychar, yylval);
|
||||
# endif
|
||||
fprintf (stderr, ")\n");
|
||||
YYFPRINTF (stderr, ")\n");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -531,7 +651,8 @@ yybackup:
|
||||
YYACCEPT;
|
||||
|
||||
/* Shift the lookahead token. */
|
||||
YYDPRINTF ((stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]));
|
||||
YYDPRINTF ((stderr, "Shifting token %d (%s), ",
|
||||
yychar, yytname[yychar1]));
|
||||
|
||||
/* Discard the token being shifted unless it is eof. */
|
||||
if (yychar != YYEOF)
|
||||
@@ -590,15 +711,15 @@ yyreduce:
|
||||
are defined only if `YYDEBUG' is set. */
|
||||
if (yydebug)
|
||||
{
|
||||
int i;
|
||||
int yyi;
|
||||
|
||||
fprintf (stderr, "Reducing via rule %d (line %d), ",
|
||||
yyn, yyrline[yyn]);
|
||||
YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
|
||||
yyn, yyrline[yyn]);
|
||||
|
||||
/* Print the symbols being reduced, and their result. */
|
||||
for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
|
||||
fprintf (stderr, "%s ", yytname[yyrhs[i]]);
|
||||
fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
|
||||
for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
|
||||
YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
|
||||
YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
|
||||
}
|
||||
#endif
|
||||
%% actions /* The action file replaces this line. */
|
||||
@@ -613,11 +734,11 @@ yyreduce:
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
{
|
||||
short *ssp1 = yyss - 1;
|
||||
fprintf (stderr, "state stack now");
|
||||
while (ssp1 != yyssp)
|
||||
fprintf (stderr, " %d", *++ssp1);
|
||||
fprintf (stderr, "\n");
|
||||
short *yyssp1 = yyss - 1;
|
||||
YYFPRINTF (stderr, "state stack now");
|
||||
while (yyssp1 != yyssp)
|
||||
YYFPRINTF (stderr, " %d", *++yyssp1);
|
||||
YYFPRINTF (stderr, "\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -655,46 +776,47 @@ yyerrlab:
|
||||
|
||||
if (yyn > YYFLAG && yyn < YYLAST)
|
||||
{
|
||||
int size = 0;
|
||||
char *msg;
|
||||
int x, count;
|
||||
YYSIZE_T yysize = 0;
|
||||
char *yymsg;
|
||||
int yyx, yycount;
|
||||
|
||||
count = 0;
|
||||
/* Start X at -yyn if nec to avoid negative indexes in yycheck. */
|
||||
for (x = (yyn < 0 ? -yyn : 0);
|
||||
x < (int) (sizeof (yytname) / sizeof (char *)); x++)
|
||||
if (yycheck[x + yyn] == x)
|
||||
size += strlen (yytname[x]) + 15, count++;
|
||||
size += strlen ("parse error, unexpected `") + 1;
|
||||
size += strlen (yytname[YYTRANSLATE (yychar)]);
|
||||
msg = (char *) malloc (size);
|
||||
if (msg != 0)
|
||||
yycount = 0;
|
||||
/* Start YYX at -YYN if negative to avoid negative indexes in
|
||||
YYCHECK. */
|
||||
for (yyx = yyn < 0 ? -yyn : 0;
|
||||
yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
|
||||
if (yycheck[yyx + yyn] == yyx)
|
||||
yysize += yystrlen (yytname[yyx]) + 15, yycount++;
|
||||
yysize += yystrlen ("parse error, unexpected ") + 1;
|
||||
yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
|
||||
yymsg = (char *) YYSTACK_ALLOC (yysize);
|
||||
if (yymsg != 0)
|
||||
{
|
||||
strcpy (msg, "parse error, unexpected `");
|
||||
strcat (msg, yytname[YYTRANSLATE (yychar)]);
|
||||
strcat (msg, "'");
|
||||
char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
|
||||
yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
|
||||
|
||||
if (count < 5)
|
||||
if (yycount < 5)
|
||||
{
|
||||
count = 0;
|
||||
for (x = (yyn < 0 ? -yyn : 0);
|
||||
x < (int) (sizeof (yytname) / sizeof (char *)); x++)
|
||||
if (yycheck[x + yyn] == x)
|
||||
yycount = 0;
|
||||
for (yyx = yyn < 0 ? -yyn : 0;
|
||||
yyx < (int) (sizeof (yytname) / sizeof (char *));
|
||||
yyx++)
|
||||
if (yycheck[yyx + yyn] == yyx)
|
||||
{
|
||||
strcat (msg, count == 0 ? ", expecting `" : " or `");
|
||||
strcat (msg, yytname[x]);
|
||||
strcat (msg, "'");
|
||||
count++;
|
||||
const char *yyq = ! yycount ? ", expecting " : " or ";
|
||||
yyp = yystpcpy (yyp, yyq);
|
||||
yyp = yystpcpy (yyp, yytname[yyx]);
|
||||
yycount++;
|
||||
}
|
||||
}
|
||||
yyerror (msg);
|
||||
free (msg);
|
||||
yyerror (yymsg);
|
||||
YYSTACK_FREE (yymsg);
|
||||
}
|
||||
else
|
||||
yyerror ("parse error; also virtual memory exceeded");
|
||||
yyerror ("parse error; also virtual memory exhausted");
|
||||
}
|
||||
else
|
||||
#endif /* YYERROR_VERBOSE */
|
||||
#endif /* defined (YYERROR_VERBOSE) */
|
||||
yyerror ("parse error");
|
||||
}
|
||||
goto yyerrlab1;
|
||||
@@ -757,11 +879,11 @@ yyerrpop:
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
{
|
||||
short *ssp1 = yyss - 1;
|
||||
fprintf (stderr, "Error: state stack now");
|
||||
while (ssp1 != yyssp)
|
||||
fprintf (stderr, " %d", *++ssp1);
|
||||
fprintf (stderr, "\n");
|
||||
short *yyssp1 = yyss - 1;
|
||||
YYFPRINTF (stderr, "Error: state stack now");
|
||||
while (yyssp1 != yyssp)
|
||||
YYFPRINTF (stderr, " %d", *++yyssp1);
|
||||
YYFPRINTF (stderr, "\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -806,28 +928,28 @@ yyerrhandle:
|
||||
| yyacceptlab -- YYACCEPT comes here. |
|
||||
`-------------------------------------*/
|
||||
yyacceptlab:
|
||||
if (yyfree_stacks)
|
||||
{
|
||||
free (yyss);
|
||||
free (yyvs);
|
||||
#if YYLSP_NEEDED
|
||||
free (yyls);
|
||||
#endif
|
||||
}
|
||||
return 0;
|
||||
|
||||
yyresult = 0;
|
||||
goto yyreturn;
|
||||
|
||||
/*-----------------------------------.
|
||||
| yyabortlab -- YYABORT comes here. |
|
||||
`-----------------------------------*/
|
||||
yyabortlab:
|
||||
if (yyfree_stacks)
|
||||
{
|
||||
free (yyss);
|
||||
free (yyvs);
|
||||
#if YYLSP_NEEDED
|
||||
free (yyls);
|
||||
yyresult = 1;
|
||||
goto yyreturn;
|
||||
|
||||
/*---------------------------------------------.
|
||||
| yyoverflowab -- parser overflow comes here. |
|
||||
`---------------------------------------------*/
|
||||
yyoverflowlab:
|
||||
yyerror ("parser stack overflow");
|
||||
yyresult = 2;
|
||||
/* Fall through. */
|
||||
|
||||
yyreturn:
|
||||
#ifndef yyoverflow
|
||||
if (yyss != yyssa)
|
||||
YYSTACK_FREE (yyss);
|
||||
#endif
|
||||
}
|
||||
return 1;
|
||||
return yyresult;
|
||||
}
|
||||
|
||||
+99
-160
@@ -1,5 +1,5 @@
|
||||
/* Subroutines for bison
|
||||
Copyright 1984, 1989, 2000 Free Software Foundation, Inc.
|
||||
Copyright 1984, 1989, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
@@ -19,61 +19,69 @@
|
||||
02111-1307, USA. */
|
||||
|
||||
#include "system.h"
|
||||
#include "getargs.h"
|
||||
#include "gram.h"
|
||||
#include "reader.h"
|
||||
#include "closure.h"
|
||||
#include "derives.h"
|
||||
#include "warshall.h"
|
||||
|
||||
/* NITEMSET is the size of the array ITEMSET. */
|
||||
short *itemset;
|
||||
short *itemsetend;
|
||||
int nitemset;
|
||||
|
||||
static unsigned *ruleset;
|
||||
|
||||
/* internal data. See comments before set_fderives and set_firsts. */
|
||||
static unsigned *fderives;
|
||||
static unsigned *firsts;
|
||||
|
||||
/* Retrieve the FDERIVES/FIRSTS sets of the nonterminals numbered Var. */
|
||||
#define FDERIVES(Var) (fderives + ((Var) - ntokens) * rulesetsize)
|
||||
#define FIRSTS(Var) (firsts + ((Var) - ntokens) * varsetsize)
|
||||
|
||||
/* number of words required to hold a bit for each rule */
|
||||
static int rulesetsize;
|
||||
|
||||
/* number of words required to hold a bit for each variable */
|
||||
static int varsetsize;
|
||||
|
||||
#if DEBUG
|
||||
|
||||
/*-----------------.
|
||||
| Debugging code. |
|
||||
`-----------------*/
|
||||
|
||||
static void
|
||||
print_closure (int n)
|
||||
print_closure (const char *title, short *array, size_t size)
|
||||
{
|
||||
short *isp;
|
||||
|
||||
printf ("\n\nn = %d\n\n", n);
|
||||
for (isp = itemset; isp < itemsetend; isp++)
|
||||
printf (" %d\n", *isp);
|
||||
size_t i;
|
||||
fprintf (stderr, "Closure: %s\n", title);
|
||||
for (i = 0; i < size; ++i)
|
||||
{
|
||||
short *rp;
|
||||
fprintf (stderr, " %2d: .", array[i]);
|
||||
for (rp = &ritem[array[i]]; *rp > 0; ++rp)
|
||||
fprintf (stderr, " %s", tags[*rp]);
|
||||
fprintf (stderr, " (rule %d)\n", -*rp);
|
||||
}
|
||||
fputs ("\n\n", stderr);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
print_firsts (void)
|
||||
{
|
||||
int i;
|
||||
int j;
|
||||
unsigned *rowp;
|
||||
|
||||
printf ("\n\n\nFIRSTS\n\n");
|
||||
int i, j;
|
||||
|
||||
fprintf (stderr, "FIRSTS\n");
|
||||
for (i = ntokens; i < nsyms; i++)
|
||||
{
|
||||
printf ("\n\n%s firsts\n\n", tags[i]);
|
||||
|
||||
rowp = firsts + ((i - ntokens) * varsetsize);
|
||||
|
||||
fprintf (stderr, "\t%s firsts\n", tags[i]);
|
||||
for (j = 0; j < nvars; j++)
|
||||
if (BITISSET (rowp, j))
|
||||
printf (" %s\n", tags[j + ntokens]);
|
||||
if (BITISSET (FIRSTS (i), j))
|
||||
fprintf (stderr, "\t\t%d (%s)\n", j + ntokens, tags[j + ntokens]);
|
||||
}
|
||||
fprintf (stderr, "\n\n");
|
||||
}
|
||||
|
||||
|
||||
@@ -82,23 +90,24 @@ print_fderives (void)
|
||||
{
|
||||
int i;
|
||||
int j;
|
||||
unsigned *rp;
|
||||
|
||||
printf ("\n\n\nFDERIVES\n");
|
||||
fprintf (stderr, "FDERIVES\n");
|
||||
|
||||
for (i = ntokens; i < nsyms; i++)
|
||||
{
|
||||
printf ("\n\n%s derives\n\n", tags[i]);
|
||||
rp = fderives + i * rulesetsize;
|
||||
|
||||
fprintf (stderr, "\t%s derives\n", tags[i]);
|
||||
for (j = 0; j <= nrules; j++)
|
||||
if (BITISSET (rp, j))
|
||||
printf (" %d\n", j);
|
||||
if (BITISSET (FDERIVES (i), j))
|
||||
{
|
||||
short *rhsp;
|
||||
fprintf (stderr, "\t\t%d:", j);
|
||||
for (rhsp = ritem + rule_table[j].rhs; *rhsp > 0; ++rhsp)
|
||||
fprintf (stderr, " %s", tags[*rhsp]);
|
||||
fputc ('\n', stderr);
|
||||
}
|
||||
}
|
||||
|
||||
fflush (stdout);
|
||||
fprintf (stderr, "\n\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------.
|
||||
| Set FIRSTS to be an NVARS by NVARS bit matrix indicating which |
|
||||
@@ -113,39 +122,24 @@ print_fderives (void)
|
||||
static void
|
||||
set_firsts (void)
|
||||
{
|
||||
unsigned *row;
|
||||
int symbol;
|
||||
short *sp;
|
||||
int rowsize;
|
||||
int i, j;
|
||||
|
||||
int i;
|
||||
varsetsize = WORDSIZE (nvars);
|
||||
|
||||
varsetsize = rowsize = WORDSIZE (nvars);
|
||||
firsts = XCALLOC (unsigned, nvars * varsetsize);
|
||||
|
||||
firsts = XCALLOC (unsigned, nvars * rowsize);
|
||||
|
||||
row = firsts;
|
||||
for (i = ntokens; i < nsyms; i++)
|
||||
{
|
||||
sp = derives[i];
|
||||
while (*sp >= 0)
|
||||
{
|
||||
symbol = ritem[rrhs[*sp++]];
|
||||
if (ISVAR (symbol))
|
||||
{
|
||||
symbol -= ntokens;
|
||||
SETBIT (row, symbol);
|
||||
}
|
||||
}
|
||||
|
||||
row += rowsize;
|
||||
}
|
||||
for (j = 0; derives[i][j] >= 0; ++j)
|
||||
{
|
||||
int symbol = ritem[rule_table[derives[i][j]].rhs];
|
||||
if (ISVAR (symbol))
|
||||
SETBIT (FIRSTS (i), symbol - ntokens);
|
||||
}
|
||||
|
||||
RTC (firsts, nvars);
|
||||
|
||||
#ifdef DEBUG
|
||||
print_firsts ();
|
||||
#endif
|
||||
if (trace_flag)
|
||||
print_firsts ();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------.
|
||||
@@ -161,52 +155,20 @@ set_firsts (void)
|
||||
static void
|
||||
set_fderives (void)
|
||||
{
|
||||
unsigned *rrow;
|
||||
unsigned *vrow;
|
||||
int j;
|
||||
unsigned cword;
|
||||
short *rp;
|
||||
int b;
|
||||
int i, j, k;
|
||||
|
||||
int ruleno;
|
||||
int i;
|
||||
|
||||
fderives = XCALLOC (unsigned, nvars * rulesetsize) - ntokens * rulesetsize;
|
||||
fderives = XCALLOC (unsigned, nvars * rulesetsize);
|
||||
|
||||
set_firsts ();
|
||||
|
||||
rrow = fderives + ntokens * rulesetsize;
|
||||
for (i = ntokens; i < nsyms; ++i)
|
||||
for (j = ntokens; j < nsyms; ++j)
|
||||
if (BITISSET (FIRSTS (i), j - ntokens))
|
||||
for (k = 0; derives[j][k] > 0; ++k)
|
||||
SETBIT (FDERIVES (i), derives[j][k]);
|
||||
|
||||
for (i = ntokens; i < nsyms; i++)
|
||||
{
|
||||
vrow = firsts + ((i - ntokens) * varsetsize);
|
||||
cword = *vrow++;
|
||||
b = 0;
|
||||
for (j = ntokens; j < nsyms; j++)
|
||||
{
|
||||
if (cword & (1 << b))
|
||||
{
|
||||
rp = derives[j];
|
||||
while ((ruleno = *rp++) > 0)
|
||||
{
|
||||
SETBIT (rrow, ruleno);
|
||||
}
|
||||
}
|
||||
|
||||
b++;
|
||||
if (b >= BITS_PER_WORD && j + 1 < nsyms)
|
||||
{
|
||||
cword = *vrow++;
|
||||
b = 0;
|
||||
}
|
||||
}
|
||||
|
||||
rrow += rulesetsize;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
print_fderives ();
|
||||
#endif
|
||||
if (trace_flag)
|
||||
print_fderives ();
|
||||
|
||||
XFREE (firsts);
|
||||
}
|
||||
@@ -228,82 +190,59 @@ new_closure (int n)
|
||||
void
|
||||
closure (short *core, int n)
|
||||
{
|
||||
/* Index over CORE. */
|
||||
int c;
|
||||
|
||||
/* Index over RULESET. */
|
||||
int r;
|
||||
|
||||
/* A bit index over RULESET. */
|
||||
int ruleno;
|
||||
unsigned word;
|
||||
short *csp;
|
||||
unsigned *dsp;
|
||||
unsigned *rsp;
|
||||
|
||||
short *csend;
|
||||
unsigned *rsend;
|
||||
int symbol;
|
||||
int itemno;
|
||||
|
||||
rsp = ruleset;
|
||||
rsend = ruleset + rulesetsize;
|
||||
csend = core + n;
|
||||
if (trace_flag)
|
||||
print_closure ("input", core, n);
|
||||
|
||||
if (n == 0)
|
||||
{
|
||||
dsp = fderives + start_symbol * rulesetsize;
|
||||
while (rsp < rsend)
|
||||
*rsp++ = *dsp++;
|
||||
for (r = 0; r < rulesetsize; ++r)
|
||||
ruleset[r] = FDERIVES (start_symbol)[r];
|
||||
}
|
||||
else
|
||||
{
|
||||
while (rsp < rsend)
|
||||
*rsp++ = 0;
|
||||
for (r = 0; r < rulesetsize; ++r)
|
||||
ruleset[r] = 0;
|
||||
|
||||
csp = core;
|
||||
while (csp < csend)
|
||||
{
|
||||
symbol = ritem[*csp++];
|
||||
if (ISVAR (symbol))
|
||||
{
|
||||
dsp = fderives + symbol * rulesetsize;
|
||||
rsp = ruleset;
|
||||
while (rsp < rsend)
|
||||
*rsp++ |= *dsp++;
|
||||
}
|
||||
}
|
||||
for (c = 0; c < n; ++c)
|
||||
if (ISVAR (ritem[core[c]]))
|
||||
for (r = 0; r < rulesetsize; ++r)
|
||||
ruleset[r] |= FDERIVES (ritem[core[c]])[r];
|
||||
}
|
||||
|
||||
ruleno = 0;
|
||||
itemsetend = itemset;
|
||||
csp = core;
|
||||
rsp = ruleset;
|
||||
while (rsp < rsend)
|
||||
nitemset = 0;
|
||||
c = 0;
|
||||
for (ruleno = 0; ruleno < rulesetsize * BITS_PER_WORD; ++ruleno)
|
||||
if (BITISSET (ruleset, ruleno))
|
||||
{
|
||||
int itemno = rule_table[ruleno].rhs;
|
||||
while (c < n && core[c] < itemno)
|
||||
{
|
||||
itemset[nitemset] = core[c];
|
||||
nitemset++;
|
||||
c++;
|
||||
}
|
||||
itemset[nitemset] = itemno;
|
||||
nitemset++;
|
||||
}
|
||||
|
||||
while (c < n)
|
||||
{
|
||||
word = *rsp++;
|
||||
if (word == 0)
|
||||
{
|
||||
ruleno += BITS_PER_WORD;
|
||||
}
|
||||
else
|
||||
{
|
||||
int b;
|
||||
|
||||
for (b = 0; b < BITS_PER_WORD; b++)
|
||||
{
|
||||
if (word & (1 << b))
|
||||
{
|
||||
itemno = rrhs[ruleno];
|
||||
while (csp < csend && *csp < itemno)
|
||||
*itemsetend++ = *csp++;
|
||||
*itemsetend++ = itemno;
|
||||
}
|
||||
|
||||
ruleno++;
|
||||
}
|
||||
}
|
||||
itemset[nitemset] = core[c];
|
||||
nitemset++;
|
||||
c++;
|
||||
}
|
||||
|
||||
while (csp < csend)
|
||||
*itemsetend++ = *csp++;
|
||||
|
||||
#if DEBUG
|
||||
print_closure (n);
|
||||
#endif
|
||||
if (trace_flag)
|
||||
print_closure ("output", itemset, nitemset);
|
||||
}
|
||||
|
||||
|
||||
@@ -312,5 +251,5 @@ free_closure (void)
|
||||
{
|
||||
XFREE (itemset);
|
||||
XFREE (ruleset);
|
||||
XFREE (fderives + ntokens * rulesetsize);
|
||||
XFREE (fderives);
|
||||
}
|
||||
|
||||
+10
-9
@@ -1,5 +1,5 @@
|
||||
/* Subroutines for bison
|
||||
Copyright 1984, 1989, 2000 Free Software Foundation, Inc.
|
||||
Copyright 1984, 1989, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
@@ -30,18 +30,19 @@
|
||||
void new_closure PARAMS ((int n));
|
||||
|
||||
|
||||
/* Given a vector of item numbers ITEMS, of length N, set up ruleset
|
||||
and itemset to indicate what rules could be run and which items
|
||||
could be accepted when those items are the active ones.
|
||||
/* Given the kernel (aka core) of a state (a vector of item numbers
|
||||
ITEMS, of length N), set up ruleset and itemset to indicate what
|
||||
rules could be run and which items could be accepted when those
|
||||
items are the active ones.
|
||||
|
||||
ruleset contains a bit for each rule. closure sets the bits for
|
||||
all rules which could potentially describe the next input to be
|
||||
read.
|
||||
|
||||
itemset is a vector of item numbers; itemsetend points to just
|
||||
beyond the end of the part of it that is significant. closure
|
||||
places there the indices of all items which represent units of
|
||||
input that could arrive next. */
|
||||
ITEMSET is a vector of item numbers; NITEMSET is its size
|
||||
9actually, points to just beyond the end of the part of it that is
|
||||
significant). closure places there the indices of all items which
|
||||
represent units of input that could arrive next. */
|
||||
|
||||
void closure PARAMS ((short *items, int n));
|
||||
|
||||
@@ -51,6 +52,6 @@ void closure PARAMS ((short *items, int n));
|
||||
void free_closure PARAMS ((void));
|
||||
|
||||
extern short *itemset;
|
||||
extern short *itemsetend;
|
||||
extern int nitemset;
|
||||
|
||||
#endif /* !CLOSURE_H_ */
|
||||
|
||||
+4
-63
@@ -1,5 +1,5 @@
|
||||
/* Declaration for error-reporting function for Bison.
|
||||
Copyright 2000 Free Software Foundation, Inc.
|
||||
Copyright 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
@@ -41,6 +41,9 @@
|
||||
void exit ();
|
||||
#endif
|
||||
|
||||
/* To get error_one_per_line. */
|
||||
#include "error.h"
|
||||
|
||||
#include "complain.h"
|
||||
|
||||
#ifndef HAVE_DECL_STRERROR_R
|
||||
@@ -106,9 +109,6 @@ unsigned int warn_message_count;
|
||||
/* This variable is incremented each time `complain' is called. */
|
||||
unsigned int complain_message_count;
|
||||
|
||||
/* Sometimes we want to have at most one error per line. This
|
||||
variable controls whether this mode is selected or not. */
|
||||
int error_one_per_line;
|
||||
|
||||
/*--------------------------------.
|
||||
| Report a warning, and proceed. |
|
||||
@@ -248,62 +248,3 @@ fatal (message, va_alist)
|
||||
fflush (stderr);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------.
|
||||
| A severe error has occurred, we cannot proceed. Exit with STATUS, |
|
||||
| and report the error message of the errno ERRNUM. |
|
||||
`------------------------------------------------------------------*/
|
||||
|
||||
void
|
||||
#if defined VA_START && defined __STDC__
|
||||
error (int status, int errnum,
|
||||
const char *message, ...)
|
||||
#else
|
||||
error (status, errnum, message, va_alist)
|
||||
int status;
|
||||
int errnum;
|
||||
char *message;
|
||||
va_dcl
|
||||
#endif
|
||||
{
|
||||
#ifdef VA_START
|
||||
va_list args;
|
||||
#endif
|
||||
|
||||
fflush (stdout);
|
||||
if (infile != NULL)
|
||||
fprintf (stderr, "%s:%d: ", infile, lineno);
|
||||
else
|
||||
fprintf (stderr, "%s:", program_name);
|
||||
|
||||
fputs (_("fatal error: "), stderr);
|
||||
|
||||
#ifdef VA_START
|
||||
VA_START (args, message);
|
||||
vfprintf (stderr, message, args);
|
||||
va_end (args);
|
||||
#else
|
||||
fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
|
||||
#endif
|
||||
|
||||
if (errnum)
|
||||
{
|
||||
#if defined HAVE_STRERROR_R || _LIBC
|
||||
char errbuf[1024];
|
||||
# if HAVE_WORKING_STRERROR_R || _LIBC
|
||||
fprintf (stderr, ": %s", __strerror_r (errnum, errbuf, sizeof errbuf));
|
||||
# else
|
||||
/* Don't use __strerror_r's return value because on some systems
|
||||
(at least DEC UNIX 4.0[A-D]) strerror_r returns `int'. */
|
||||
__strerror_r (errnum, errbuf, sizeof errbuf);
|
||||
fprintf (stderr, ": %s", errbuf);
|
||||
# endif
|
||||
#else
|
||||
fprintf (stderr, ": %s", strerror (errnum));
|
||||
#endif
|
||||
}
|
||||
putc ('\n', stderr);
|
||||
fflush (stderr);
|
||||
if (status)
|
||||
exit (status);
|
||||
}
|
||||
|
||||
+2
-14
@@ -1,5 +1,5 @@
|
||||
/* Declaration for error-reporting function for Bison.
|
||||
Copyright 2000 Free Software Foundation, Inc.
|
||||
Copyright 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
@@ -40,18 +40,10 @@ extern void complain (const char *format, ...)
|
||||
extern void fatal (const char *format, ...)
|
||||
__attribute__ ((__format__ (__printf__, 1, 2)));
|
||||
|
||||
/* Print a message with `fprintf (stderr, FORMAT, ...)';
|
||||
if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
|
||||
If STATUS is nonzero, terminate the program with `exit (STATUS)'. */
|
||||
|
||||
extern void error (int status, int errnum,
|
||||
const char *format, ...)
|
||||
__attribute__ ((__format__ (__printf__, 3, 4)));
|
||||
|
||||
#else
|
||||
void warn ();
|
||||
void complain ();
|
||||
void error ();
|
||||
void fatal ();
|
||||
#endif
|
||||
|
||||
/* Position in the current input file. */
|
||||
@@ -64,10 +56,6 @@ extern unsigned int warn_message_count;
|
||||
/* This variable is incremented each time `complain' is called. */
|
||||
extern unsigned int complain_message_count;
|
||||
|
||||
/* Sometimes we want to have at most one error per line. This
|
||||
variable controls whether this mode is selected or not. */
|
||||
extern int error_one_per_line;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
+253
-435
@@ -19,6 +19,7 @@
|
||||
02111-1307, USA. */
|
||||
|
||||
#include "system.h"
|
||||
#include "complain.h"
|
||||
#include "getargs.h"
|
||||
#include "files.h"
|
||||
#include "gram.h"
|
||||
@@ -28,17 +29,12 @@
|
||||
#include "reader.h"
|
||||
#include "LR0.h"
|
||||
|
||||
int any_conflicts = 0;
|
||||
errs **err_table = NULL;
|
||||
int expected_conflicts;
|
||||
/* -1 stands for not specified. */
|
||||
int expected_conflicts = -1;
|
||||
static char *conflicts = NULL;
|
||||
|
||||
static unsigned *shiftset = NULL;
|
||||
static unsigned *lookaheadset = NULL;
|
||||
static int src_total;
|
||||
static int rrc_total;
|
||||
static int src_count;
|
||||
static int rrc_count;
|
||||
|
||||
|
||||
static inline void
|
||||
@@ -60,21 +56,12 @@ Conflict in state %d between rule %d and token %s resolved as %s.\n"),
|
||||
static void
|
||||
flush_shift (int state, int token)
|
||||
{
|
||||
shifts *shiftp;
|
||||
int k, i;
|
||||
shifts *shiftp = state_table[state].shifts;
|
||||
int i;
|
||||
|
||||
shiftp = shift_table[state];
|
||||
|
||||
if (shiftp)
|
||||
{
|
||||
k = shiftp->nshifts;
|
||||
for (i = 0; i < k; i++)
|
||||
{
|
||||
if (shiftp->shifts[i]
|
||||
&& token == accessing_symbol[shiftp->shifts[i]])
|
||||
(shiftp->shifts[i]) = 0;
|
||||
}
|
||||
}
|
||||
for (i = 0; i < shiftp->nshifts; i++)
|
||||
if (!SHIFT_IS_DISABLED (shiftp, i) && SHIFT_SYMBOL (shiftp, i) == token)
|
||||
SHIFT_DISABLE (shiftp, i);
|
||||
}
|
||||
|
||||
|
||||
@@ -89,95 +76,79 @@ static void
|
||||
resolve_sr_conflict (int state, int lookaheadnum)
|
||||
{
|
||||
int i;
|
||||
int mask;
|
||||
unsigned *fp1;
|
||||
unsigned *fp2;
|
||||
int redprec;
|
||||
errs *errp = (errs *) xcalloc (sizeof (errs) + ntokens * sizeof (short), 1);
|
||||
/* find the rule to reduce by to get precedence of reduction */
|
||||
int redprec = rule_table[LAruleno[lookaheadnum]].prec;
|
||||
errs *errp = ERRS_ALLOC (ntokens + 1);
|
||||
short *errtokens = errp->errs;
|
||||
|
||||
/* find the rule to reduce by to get precedence of reduction */
|
||||
redprec = rprec[LAruleno[lookaheadnum]];
|
||||
|
||||
mask = 1;
|
||||
fp1 = LA + lookaheadnum * tokensetsize;
|
||||
fp2 = lookaheadset;
|
||||
for (i = 0; i < ntokens; i++)
|
||||
{
|
||||
if ((mask & *fp2 & *fp1) && sprec[i])
|
||||
/* Shift-reduce conflict occurs for token number i
|
||||
and it has a precedence.
|
||||
The precedence of shifting is that of token i. */
|
||||
{
|
||||
if (sprec[i] < redprec)
|
||||
{
|
||||
log_resolution (state, lookaheadnum, i, _("reduce"));
|
||||
*fp2 &= ~mask; /* flush the shift for this token */
|
||||
flush_shift (state, i);
|
||||
}
|
||||
else if (sprec[i] > redprec)
|
||||
{
|
||||
log_resolution (state, lookaheadnum, i, _("shift"));
|
||||
*fp1 &= ~mask; /* flush the reduce for this token */
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Matching precedence levels.
|
||||
For left association, keep only the reduction.
|
||||
For right association, keep only the shift.
|
||||
For nonassociation, keep neither. */
|
||||
if (BITISSET (LA (lookaheadnum), i)
|
||||
&& BITISSET (lookaheadset, i)
|
||||
&& sprec[i])
|
||||
/* Shift-reduce conflict occurs for token number i
|
||||
and it has a precedence.
|
||||
The precedence of shifting is that of token i. */
|
||||
{
|
||||
if (sprec[i] < redprec)
|
||||
{
|
||||
log_resolution (state, lookaheadnum, i, _("reduce"));
|
||||
/* flush the shift for this token */
|
||||
RESETBIT (lookaheadset, i);
|
||||
flush_shift (state, i);
|
||||
}
|
||||
else if (sprec[i] > redprec)
|
||||
{
|
||||
log_resolution (state, lookaheadnum, i, _("shift"));
|
||||
/* flush the reduce for this token */
|
||||
RESETBIT (LA (lookaheadnum), i);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Matching precedence levels.
|
||||
For left association, keep only the reduction.
|
||||
For right association, keep only the shift.
|
||||
For nonassociation, keep neither. */
|
||||
|
||||
switch (sassoc[i])
|
||||
{
|
||||
case right_assoc:
|
||||
log_resolution (state, lookaheadnum, i, _("shift"));
|
||||
break;
|
||||
switch (sassoc[i])
|
||||
{
|
||||
case right_assoc:
|
||||
log_resolution (state, lookaheadnum, i, _("shift"));
|
||||
break;
|
||||
|
||||
case left_assoc:
|
||||
log_resolution (state, lookaheadnum, i, _("reduce"));
|
||||
break;
|
||||
case left_assoc:
|
||||
log_resolution (state, lookaheadnum, i, _("reduce"));
|
||||
break;
|
||||
|
||||
case non_assoc:
|
||||
log_resolution (state, lookaheadnum, i, _("an error"));
|
||||
break;
|
||||
}
|
||||
case non_assoc:
|
||||
log_resolution (state, lookaheadnum, i, _("an error"));
|
||||
break;
|
||||
}
|
||||
|
||||
if (sassoc[i] != right_assoc)
|
||||
{
|
||||
*fp2 &= ~mask; /* flush the shift for this token */
|
||||
flush_shift (state, i);
|
||||
}
|
||||
if (sassoc[i] != left_assoc)
|
||||
{
|
||||
*fp1 &= ~mask; /* flush the reduce for this token */
|
||||
}
|
||||
if (sassoc[i] == non_assoc)
|
||||
{
|
||||
/* Record an explicit error for this token. */
|
||||
*errtokens++ = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (sassoc[i] != right_assoc)
|
||||
{
|
||||
/* flush the shift for this token */
|
||||
RESETBIT (lookaheadset, i);
|
||||
flush_shift (state, i);
|
||||
}
|
||||
if (sassoc[i] != left_assoc)
|
||||
{
|
||||
/* flush the reduce for this token */
|
||||
RESETBIT (LA (lookaheadnum), i);
|
||||
}
|
||||
if (sassoc[i] == non_assoc)
|
||||
{
|
||||
/* Record an explicit error for this token. */
|
||||
*errtokens++ = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mask <<= 1;
|
||||
if (mask == 0)
|
||||
{
|
||||
mask = 1;
|
||||
fp2++;
|
||||
fp1++;
|
||||
}
|
||||
}
|
||||
errp->nerrs = errtokens - errp->errs;
|
||||
if (errp->nerrs)
|
||||
{
|
||||
/* Some tokens have been explicitly made errors. Allocate
|
||||
a permanent errs structure for this state, to record them. */
|
||||
i = (char *) errtokens - (char *) errp;
|
||||
err_table[state] = (errs *) xcalloc ((unsigned int) i, 1);
|
||||
bcopy (errp, err_table[state], i);
|
||||
}
|
||||
else
|
||||
err_table[state] = 0;
|
||||
/* Some tokens have been explicitly made errors. Allocate a
|
||||
permanent errs structure for this state, to record them. */
|
||||
i = (char *) errtokens - (char *) errp;
|
||||
state_table[state].errs = ERRS_ALLOC (i + 1);
|
||||
memcpy (state_table[state].errs, errp, i);
|
||||
free (errp);
|
||||
}
|
||||
|
||||
@@ -185,80 +156,47 @@ resolve_sr_conflict (int state, int lookaheadnum)
|
||||
static void
|
||||
set_conflicts (int state)
|
||||
{
|
||||
int i;
|
||||
int k;
|
||||
int i, j;
|
||||
shifts *shiftp;
|
||||
unsigned *fp2;
|
||||
unsigned *fp3;
|
||||
unsigned *fp4;
|
||||
unsigned *fp1;
|
||||
int symbol;
|
||||
|
||||
if (consistent[state])
|
||||
if (state_table[state].consistent)
|
||||
return;
|
||||
|
||||
for (i = 0; i < tokensetsize; i++)
|
||||
lookaheadset[i] = 0;
|
||||
|
||||
shiftp = shift_table[state];
|
||||
if (shiftp)
|
||||
{
|
||||
k = shiftp->nshifts;
|
||||
for (i = 0; i < k; i++)
|
||||
{
|
||||
symbol = accessing_symbol[shiftp->shifts[i]];
|
||||
if (ISVAR (symbol))
|
||||
break;
|
||||
SETBIT (lookaheadset, symbol);
|
||||
}
|
||||
}
|
||||
|
||||
k = lookaheads[state + 1];
|
||||
fp4 = lookaheadset + tokensetsize;
|
||||
shiftp = state_table[state].shifts;
|
||||
for (i = 0; i < shiftp->nshifts && SHIFT_IS_SHIFT (shiftp, i); i++)
|
||||
if (!SHIFT_IS_DISABLED (shiftp, i))
|
||||
SETBIT (lookaheadset, SHIFT_SYMBOL (shiftp, i));
|
||||
|
||||
/* Loop over all rules which require lookahead in this state. First
|
||||
check for shift-reduce conflict, and try to resolve using
|
||||
precedence */
|
||||
for (i = lookaheads[state]; i < k; i++)
|
||||
if (rprec[LAruleno[i]])
|
||||
{
|
||||
fp1 = LA + i * tokensetsize;
|
||||
fp2 = fp1;
|
||||
fp3 = lookaheadset;
|
||||
|
||||
while (fp3 < fp4)
|
||||
for (i = state_table[state].lookaheads;
|
||||
i < state_table[state + 1].lookaheads;
|
||||
++i)
|
||||
if (rule_table[LAruleno[i]].prec)
|
||||
for (j = 0; j < tokensetsize; ++j)
|
||||
if (LA (i)[j] & lookaheadset[j])
|
||||
{
|
||||
if (*fp2++ & *fp3++)
|
||||
{
|
||||
resolve_sr_conflict (state, i);
|
||||
break;
|
||||
}
|
||||
resolve_sr_conflict (state, i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Loop over all rules which require lookahead in this state. Check
|
||||
for conflicts not resolved above. */
|
||||
for (i = lookaheads[state]; i < k; i++)
|
||||
for (i = state_table[state].lookaheads;
|
||||
i < state_table[state + 1].lookaheads;
|
||||
++i)
|
||||
{
|
||||
fp1 = LA + i * tokensetsize;
|
||||
fp2 = fp1;
|
||||
fp3 = lookaheadset;
|
||||
for (j = 0; j < tokensetsize; ++j)
|
||||
if (LA (i)[j] & lookaheadset[j])
|
||||
conflicts[state] = 1;
|
||||
|
||||
while (fp3 < fp4)
|
||||
{
|
||||
if (*fp2++ & *fp3++)
|
||||
{
|
||||
conflicts[state] = 1;
|
||||
any_conflicts = 1;
|
||||
}
|
||||
}
|
||||
|
||||
fp2 = fp1;
|
||||
fp3 = lookaheadset;
|
||||
|
||||
while (fp3 < fp4)
|
||||
*fp3++ |= *fp2++;
|
||||
for (j = 0; j < tokensetsize; ++j)
|
||||
lookaheadset[j] |= LA (i)[j];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -271,10 +209,6 @@ solve_conflicts (void)
|
||||
shiftset = XCALLOC (unsigned, tokensetsize);
|
||||
lookaheadset = XCALLOC (unsigned, tokensetsize);
|
||||
|
||||
err_table = XCALLOC (errs *, nstates);
|
||||
|
||||
any_conflicts = 0;
|
||||
|
||||
for (i = 0; i < nstates; i++)
|
||||
set_conflicts (i);
|
||||
}
|
||||
@@ -284,23 +218,15 @@ solve_conflicts (void)
|
||||
| Count the number of shift/reduce conflicts. |
|
||||
`---------------------------------------------*/
|
||||
|
||||
static void
|
||||
static int
|
||||
count_sr_conflicts (int state)
|
||||
{
|
||||
int i;
|
||||
int k;
|
||||
int mask;
|
||||
shifts *shiftp;
|
||||
unsigned *fp1;
|
||||
unsigned *fp2;
|
||||
unsigned *fp3;
|
||||
int symbol;
|
||||
int i, k;
|
||||
int src_count = 0;
|
||||
shifts *shiftp = state_table[state].shifts;
|
||||
|
||||
src_count = 0;
|
||||
|
||||
shiftp = shift_table[state];
|
||||
if (!shiftp)
|
||||
return;
|
||||
return 0;
|
||||
|
||||
for (i = 0; i < tokensetsize; i++)
|
||||
{
|
||||
@@ -308,49 +234,24 @@ count_sr_conflicts (int state)
|
||||
lookaheadset[i] = 0;
|
||||
}
|
||||
|
||||
k = shiftp->nshifts;
|
||||
for (i = 0; i < k; i++)
|
||||
{
|
||||
if (!shiftp->shifts[i])
|
||||
continue;
|
||||
symbol = accessing_symbol[shiftp->shifts[i]];
|
||||
if (ISVAR (symbol))
|
||||
break;
|
||||
SETBIT (shiftset, symbol);
|
||||
}
|
||||
for (i = 0; i < shiftp->nshifts && SHIFT_IS_SHIFT (shiftp, i); i++)
|
||||
if (!SHIFT_IS_DISABLED (shiftp, i))
|
||||
SETBIT (shiftset, SHIFT_SYMBOL (shiftp, i));
|
||||
|
||||
k = lookaheads[state + 1];
|
||||
fp3 = lookaheadset + tokensetsize;
|
||||
for (i = state_table[state].lookaheads;
|
||||
i < state_table[state + 1].lookaheads;
|
||||
++i)
|
||||
for (k = 0; k < tokensetsize; ++k)
|
||||
lookaheadset[k] |= LA (i)[k];
|
||||
|
||||
for (i = lookaheads[state]; i < k; i++)
|
||||
{
|
||||
fp1 = LA + i * tokensetsize;
|
||||
fp2 = lookaheadset;
|
||||
for (k = 0; k < tokensetsize; ++k)
|
||||
lookaheadset[k] &= shiftset[k];
|
||||
|
||||
while (fp2 < fp3)
|
||||
*fp2++ |= *fp1++;
|
||||
}
|
||||
|
||||
fp1 = shiftset;
|
||||
fp2 = lookaheadset;
|
||||
|
||||
while (fp2 < fp3)
|
||||
*fp2++ &= *fp1++;
|
||||
|
||||
mask = 1;
|
||||
fp2 = lookaheadset;
|
||||
for (i = 0; i < ntokens; i++)
|
||||
{
|
||||
if (mask & *fp2)
|
||||
src_count++;
|
||||
if (BITISSET (lookaheadset, i))
|
||||
src_count++;
|
||||
|
||||
mask <<= 1;
|
||||
if (mask == 0)
|
||||
{
|
||||
mask = 1;
|
||||
fp2++;
|
||||
}
|
||||
}
|
||||
return src_count;
|
||||
}
|
||||
|
||||
|
||||
@@ -358,51 +259,31 @@ count_sr_conflicts (int state)
|
||||
| Count the number of reduce/reduce conflicts. |
|
||||
`----------------------------------------------*/
|
||||
|
||||
static void
|
||||
static int
|
||||
count_rr_conflicts (int state)
|
||||
{
|
||||
int i;
|
||||
int j;
|
||||
int count;
|
||||
unsigned mask;
|
||||
unsigned *baseword;
|
||||
unsigned *wordp;
|
||||
int m;
|
||||
int n;
|
||||
int rrc_count = 0;
|
||||
|
||||
rrc_count = 0;
|
||||
|
||||
m = lookaheads[state];
|
||||
n = lookaheads[state + 1];
|
||||
int m = state_table[state].lookaheads;
|
||||
int n = state_table[state + 1].lookaheads;
|
||||
|
||||
if (n - m < 2)
|
||||
return;
|
||||
return 0;
|
||||
|
||||
mask = 1;
|
||||
baseword = LA + m * tokensetsize;
|
||||
for (i = 0; i < ntokens; i++)
|
||||
{
|
||||
wordp = baseword;
|
||||
|
||||
count = 0;
|
||||
int count = 0;
|
||||
int j;
|
||||
for (j = m; j < n; j++)
|
||||
{
|
||||
if (mask & *wordp)
|
||||
count++;
|
||||
|
||||
wordp += tokensetsize;
|
||||
}
|
||||
if (BITISSET (LA (j), i))
|
||||
count++;
|
||||
|
||||
if (count >= 2)
|
||||
rrc_count++;
|
||||
|
||||
mask <<= 1;
|
||||
if (mask == 0)
|
||||
{
|
||||
mask = 1;
|
||||
baseword++;
|
||||
}
|
||||
}
|
||||
|
||||
return rrc_count;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------.
|
||||
@@ -416,31 +297,23 @@ conflict_report (int src_num, int rrc_num)
|
||||
static char res[4096];
|
||||
char *cp = res;
|
||||
|
||||
if (src_num == 1)
|
||||
if (src_num >= 1)
|
||||
{
|
||||
sprintf (cp, _(" 1 shift/reduce conflict"));
|
||||
cp += strlen (cp);
|
||||
}
|
||||
else if (src_num > 1)
|
||||
{
|
||||
sprintf (cp, _(" %d shift/reduce conflicts"), src_num);
|
||||
sprintf (cp, ngettext ("%d shift/reduce conflict",
|
||||
"%d shift/reduce conflicts", src_num), src_num);
|
||||
cp += strlen (cp);
|
||||
}
|
||||
|
||||
if (src_num > 0 && rrc_num > 0)
|
||||
{
|
||||
sprintf (cp, _(" and"));
|
||||
sprintf (cp, " %s ", _("and"));
|
||||
cp += strlen (cp);
|
||||
}
|
||||
|
||||
if (rrc_num == 1)
|
||||
if (rrc_num >= 1)
|
||||
{
|
||||
sprintf (cp, _(" 1 reduce/reduce conflict"));
|
||||
cp += strlen (cp);
|
||||
}
|
||||
else if (rrc_num > 1)
|
||||
{
|
||||
sprintf (cp, _(" %d reduce/reduce conflicts"), rrc_num);
|
||||
sprintf (cp, ngettext ("%d reduce/reduce conflict",
|
||||
"%d reduce/reduce conflicts", rrc_num), rrc_num);
|
||||
cp += strlen (cp);
|
||||
}
|
||||
|
||||
@@ -452,36 +325,59 @@ conflict_report (int src_num, int rrc_num)
|
||||
}
|
||||
|
||||
|
||||
/*---------------------------------------------.
|
||||
| Compute and give a report on the conflicts. |
|
||||
`---------------------------------------------*/
|
||||
/*-----------------------------------------------------------.
|
||||
| Output the detailed description of states with conflicts. |
|
||||
`-----------------------------------------------------------*/
|
||||
|
||||
void
|
||||
print_conflicts (FILE *out)
|
||||
conflicts_output (FILE *out)
|
||||
{
|
||||
bool printed_sth = FALSE;
|
||||
int i;
|
||||
for (i = 0; i < nstates; i++)
|
||||
if (conflicts[i])
|
||||
{
|
||||
fprintf (out, _("State %d contains "), i);
|
||||
fputs (conflict_report (count_sr_conflicts (i),
|
||||
count_rr_conflicts (i)), out);
|
||||
printed_sth = TRUE;
|
||||
}
|
||||
if (printed_sth)
|
||||
fputs ("\n\n", out);
|
||||
}
|
||||
|
||||
|
||||
/*------------------------------------------.
|
||||
| Reporting the total number of conflicts. |
|
||||
`------------------------------------------*/
|
||||
|
||||
void
|
||||
conflicts_print (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
src_total = 0;
|
||||
rrc_total = 0;
|
||||
/* Is the number of SR conflicts OK? Either EXPECTED_CONFLICTS is
|
||||
not set, and then we want 0 SR, or else it is specified, in which
|
||||
case we want equality. */
|
||||
int src_ok = 0;
|
||||
|
||||
/* Count the total number of conflicts, and if wanted, give a
|
||||
detailed report in FOUTPUT. */
|
||||
int src_total = 0;
|
||||
int rrc_total = 0;
|
||||
|
||||
/* Conflicts by state. */
|
||||
for (i = 0; i < nstates; i++)
|
||||
{
|
||||
if (conflicts[i])
|
||||
{
|
||||
count_sr_conflicts (i);
|
||||
count_rr_conflicts (i);
|
||||
src_total += src_count;
|
||||
rrc_total += rrc_count;
|
||||
if (conflicts[i])
|
||||
{
|
||||
src_total += count_sr_conflicts (i);
|
||||
rrc_total += count_rr_conflicts (i);
|
||||
}
|
||||
|
||||
if (verbose_flag)
|
||||
{
|
||||
fprintf (out, _("State %d contains"), i);
|
||||
fputs (conflict_report (src_count, rrc_count), out);
|
||||
}
|
||||
}
|
||||
}
|
||||
src_ok = src_total == (expected_conflicts == -1 ? 0 : expected_conflicts);
|
||||
|
||||
/* If there are no RR conflicts, and as many SR conflicts as
|
||||
expected, then there is nothing to report. */
|
||||
if (!rrc_total && src_ok)
|
||||
return;
|
||||
|
||||
/* Report the total number of conflicts on STDERR. */
|
||||
if (yacc_flag)
|
||||
@@ -499,31 +395,34 @@ print_conflicts (FILE *out)
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf (stderr, _("%s contains"), infile);
|
||||
fprintf (stderr, _("%s contains "), infile);
|
||||
fputs (conflict_report (src_total, rrc_total), stderr);
|
||||
}
|
||||
|
||||
if (expected_conflicts != -1 && !src_ok)
|
||||
{
|
||||
/* FIXME: BIG ATTROCIOUS HACK. For flames, complaints and so
|
||||
on, see Bruno Haible. GNU Gettext's plural.y's %expect is
|
||||
wrong, and newer Bison reject it. But then, Bruno will be
|
||||
overwhelmed by bug reports, until a fixed Gettext is
|
||||
released. So for the 1.3x generation only, we leave a puke
|
||||
puke hack. */
|
||||
if (!strsuffix (infile, "plural.y"))
|
||||
complain_message_count++;
|
||||
fprintf (stderr, ngettext ("expected %d shift/reduce conflict\n",
|
||||
"expected %d shift/reduce conflicts\n",
|
||||
expected_conflicts),
|
||||
expected_conflicts);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
print_reductions (int state)
|
||||
print_reductions (FILE *out, int state)
|
||||
{
|
||||
int i;
|
||||
int j;
|
||||
int k;
|
||||
unsigned *fp1;
|
||||
unsigned *fp2;
|
||||
unsigned *fp3;
|
||||
unsigned *fp4;
|
||||
int rule;
|
||||
int symbol;
|
||||
unsigned mask;
|
||||
int m;
|
||||
int n;
|
||||
int default_LA;
|
||||
int default_rule = 0;
|
||||
int cmax;
|
||||
int count;
|
||||
shifts *shiftp;
|
||||
errs *errp;
|
||||
int nodefault = 0;
|
||||
@@ -531,106 +430,61 @@ print_reductions (int state)
|
||||
for (i = 0; i < tokensetsize; i++)
|
||||
shiftset[i] = 0;
|
||||
|
||||
shiftp = shift_table[state];
|
||||
if (shiftp)
|
||||
{
|
||||
k = shiftp->nshifts;
|
||||
for (i = 0; i < k; i++)
|
||||
{
|
||||
if (!shiftp->shifts[i])
|
||||
continue;
|
||||
symbol = accessing_symbol[shiftp->shifts[i]];
|
||||
if (ISVAR (symbol))
|
||||
break;
|
||||
/* if this state has a shift for the error token,
|
||||
don't use a default rule. */
|
||||
if (symbol == error_token_number)
|
||||
nodefault = 1;
|
||||
SETBIT (shiftset, symbol);
|
||||
}
|
||||
}
|
||||
shiftp = state_table[state].shifts;
|
||||
for (i = 0; i < shiftp->nshifts && SHIFT_IS_SHIFT (shiftp, i); i++)
|
||||
if (!SHIFT_IS_DISABLED (shiftp, i))
|
||||
{
|
||||
/* if this state has a shift for the error token, don't use a
|
||||
default rule. */
|
||||
if (SHIFT_IS_ERROR (shiftp, i))
|
||||
nodefault = 1;
|
||||
SETBIT (shiftset, SHIFT_SYMBOL (shiftp, i));
|
||||
}
|
||||
|
||||
errp = err_table[state];
|
||||
errp = state_table[state].errs;
|
||||
if (errp)
|
||||
{
|
||||
k = errp->nerrs;
|
||||
for (i = 0; i < k; i++)
|
||||
{
|
||||
if (!errp->errs[i])
|
||||
continue;
|
||||
symbol = errp->errs[i];
|
||||
SETBIT (shiftset, symbol);
|
||||
}
|
||||
}
|
||||
for (i = 0; i < errp->nerrs; i++)
|
||||
if (errp->errs[i])
|
||||
SETBIT (shiftset, errp->errs[i]);
|
||||
|
||||
m = lookaheads[state];
|
||||
n = lookaheads[state + 1];
|
||||
m = state_table[state].lookaheads;
|
||||
n = state_table[state + 1].lookaheads;
|
||||
|
||||
if (n - m == 1 && !nodefault)
|
||||
{
|
||||
default_rule = LAruleno[m];
|
||||
int k;
|
||||
int default_rule = LAruleno[m];
|
||||
|
||||
fp1 = LA + m * tokensetsize;
|
||||
fp2 = shiftset;
|
||||
fp3 = lookaheadset;
|
||||
fp4 = lookaheadset + tokensetsize;
|
||||
|
||||
while (fp3 < fp4)
|
||||
*fp3++ = *fp1++ & *fp2++;
|
||||
|
||||
mask = 1;
|
||||
fp3 = lookaheadset;
|
||||
for (k = 0; k < tokensetsize; ++k)
|
||||
lookaheadset[k] = LA (m)[k] & shiftset[k];
|
||||
|
||||
for (i = 0; i < ntokens; i++)
|
||||
{
|
||||
if (mask & *fp3)
|
||||
obstack_fgrow3 (&output_obstack,
|
||||
_(" %-4s\t[reduce using rule %d (%s)]\n"),
|
||||
tags[i], default_rule, tags[rlhs[default_rule]]);
|
||||
if (BITISSET (lookaheadset, i))
|
||||
fprintf (out, _(" %-4s\t[reduce using rule %d (%s)]\n"),
|
||||
tags[i], default_rule,
|
||||
tags[rule_table[default_rule].lhs]);
|
||||
|
||||
mask <<= 1;
|
||||
if (mask == 0)
|
||||
{
|
||||
mask = 1;
|
||||
fp3++;
|
||||
}
|
||||
}
|
||||
|
||||
obstack_fgrow2 (&output_obstack,
|
||||
_(" $default\treduce using rule %d (%s)\n\n"),
|
||||
default_rule, tags[rlhs[default_rule]]);
|
||||
fprintf (out, _(" $default\treduce using rule %d (%s)\n\n"),
|
||||
default_rule, tags[rule_table[default_rule].lhs]);
|
||||
}
|
||||
else if (n - m >= 1)
|
||||
{
|
||||
cmax = 0;
|
||||
default_LA = -1;
|
||||
fp4 = lookaheadset + tokensetsize;
|
||||
int cmax = 0;
|
||||
int default_LA = -1;
|
||||
int default_rule = 0;
|
||||
|
||||
if (!nodefault)
|
||||
for (i = m; i < n; i++)
|
||||
{
|
||||
fp1 = LA + i * tokensetsize;
|
||||
fp2 = shiftset;
|
||||
fp3 = lookaheadset;
|
||||
int count = 0;
|
||||
int j, k;
|
||||
|
||||
while (fp3 < fp4)
|
||||
*fp3++ = *fp1++ & (~(*fp2++));
|
||||
for (k = 0; k < tokensetsize; ++k)
|
||||
lookaheadset[k] = LA (i)[k] & ~shiftset[k];
|
||||
|
||||
count = 0;
|
||||
mask = 1;
|
||||
fp3 = lookaheadset;
|
||||
for (j = 0; j < ntokens; j++)
|
||||
{
|
||||
if (mask & *fp3)
|
||||
count++;
|
||||
|
||||
mask <<= 1;
|
||||
if (mask == 0)
|
||||
{
|
||||
mask = 1;
|
||||
fp3++;
|
||||
}
|
||||
}
|
||||
if (BITISSET (lookaheadset, j))
|
||||
count++;
|
||||
|
||||
if (count > cmax)
|
||||
{
|
||||
@@ -639,56 +493,35 @@ print_reductions (int state)
|
||||
default_rule = LAruleno[i];
|
||||
}
|
||||
|
||||
fp2 = shiftset;
|
||||
fp3 = lookaheadset;
|
||||
|
||||
while (fp3 < fp4)
|
||||
*fp2++ |= *fp3++;
|
||||
for (k = 0; k < tokensetsize; ++k)
|
||||
shiftset[k] |= lookaheadset[k];
|
||||
}
|
||||
|
||||
for (i = 0; i < tokensetsize; i++)
|
||||
shiftset[i] = 0;
|
||||
|
||||
if (shiftp)
|
||||
{
|
||||
k = shiftp->nshifts;
|
||||
for (i = 0; i < k; i++)
|
||||
{
|
||||
if (!shiftp->shifts[i])
|
||||
continue;
|
||||
symbol = accessing_symbol[shiftp->shifts[i]];
|
||||
if (ISVAR (symbol))
|
||||
break;
|
||||
SETBIT (shiftset, symbol);
|
||||
}
|
||||
}
|
||||
for (i = 0; i < shiftp->nshifts && SHIFT_IS_SHIFT (shiftp, i); i++)
|
||||
if (!SHIFT_IS_DISABLED (shiftp, i))
|
||||
SETBIT (shiftset, SHIFT_SYMBOL (shiftp, i));
|
||||
|
||||
mask = 1;
|
||||
fp1 = LA + m * tokensetsize;
|
||||
fp2 = shiftset;
|
||||
for (i = 0; i < ntokens; i++)
|
||||
{
|
||||
int j;
|
||||
int defaulted = 0;
|
||||
int count = BITISSET (shiftset, i);
|
||||
|
||||
if (mask & *fp2)
|
||||
count = 1;
|
||||
else
|
||||
count = 0;
|
||||
|
||||
fp3 = fp1;
|
||||
for (j = m; j < n; j++)
|
||||
{
|
||||
if (mask & *fp3)
|
||||
if (BITISSET (LA (j), i))
|
||||
{
|
||||
if (count == 0)
|
||||
{
|
||||
if (j != default_LA)
|
||||
{
|
||||
rule = LAruleno[j];
|
||||
obstack_fgrow3 (&output_obstack,
|
||||
_(" %-4s\treduce using rule %d (%s)\n"),
|
||||
tags[i], rule, tags[rlhs[rule]]);
|
||||
}
|
||||
fprintf (out,
|
||||
_(" %-4s\treduce using rule %d (%s)\n"),
|
||||
tags[i],
|
||||
LAruleno[j],
|
||||
tags[rule_table[LAruleno[j]].lhs]);
|
||||
else
|
||||
defaulted = 1;
|
||||
|
||||
@@ -697,40 +530,25 @@ print_reductions (int state)
|
||||
else
|
||||
{
|
||||
if (defaulted)
|
||||
{
|
||||
rule = LAruleno[default_LA];
|
||||
obstack_fgrow3 (&output_obstack,
|
||||
_(" %-4s\treduce using rule %d (%s)\n"),
|
||||
tags[i], rule, tags[rlhs[rule]]);
|
||||
defaulted = 0;
|
||||
}
|
||||
rule = LAruleno[j];
|
||||
obstack_fgrow3 (&output_obstack,
|
||||
fprintf (out,
|
||||
_(" %-4s\treduce using rule %d (%s)\n"),
|
||||
tags[i],
|
||||
LAruleno[default_LA],
|
||||
tags[rule_table[LAruleno[default_LA]].lhs]);
|
||||
defaulted = 0;
|
||||
fprintf (out,
|
||||
_(" %-4s\t[reduce using rule %d (%s)]\n"),
|
||||
tags[i], rule, tags[rlhs[rule]]);
|
||||
tags[i],
|
||||
LAruleno[j],
|
||||
tags[rule_table[LAruleno[j]].lhs]);
|
||||
}
|
||||
}
|
||||
|
||||
fp3 += tokensetsize;
|
||||
}
|
||||
|
||||
mask <<= 1;
|
||||
if (mask == 0)
|
||||
{
|
||||
mask = 1;
|
||||
/* We tried incrementing just fp1, and just fp2; both seem wrong.
|
||||
It seems necessary to increment both in sync. */
|
||||
fp1++;
|
||||
fp2++;
|
||||
}
|
||||
}
|
||||
|
||||
if (default_LA >= 0)
|
||||
obstack_fgrow2 (&output_obstack,
|
||||
_(" $default\treduce using rule %d (%s)\n"),
|
||||
default_rule, tags[rlhs[default_rule]]);
|
||||
|
||||
obstack_1grow (&output_obstack, '\n');
|
||||
fprintf (out, _(" $default\treduce using rule %d (%s)\n"),
|
||||
default_rule, tags[rule_table[default_rule].lhs]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-5
@@ -1,5 +1,5 @@
|
||||
/* Find and resolve or report look-ahead conflicts for bison,
|
||||
Copyright 2000 Free Software Foundation, Inc.
|
||||
Copyright 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
@@ -23,12 +23,11 @@
|
||||
# include "state.h"
|
||||
|
||||
void solve_conflicts PARAMS ((void));
|
||||
void print_conflicts PARAMS ((FILE *out));
|
||||
void print_reductions PARAMS ((int));
|
||||
void conflicts_print PARAMS ((void));
|
||||
void conflicts_output PARAMS ((FILE *out));
|
||||
void print_reductions PARAMS ((FILE*out, int state));
|
||||
void free_conflicts PARAMS ((void));
|
||||
|
||||
/* Were there conflicts? */
|
||||
extern int any_conflicts;
|
||||
extern errs **err_table;
|
||||
extern int expected_conflicts;
|
||||
#endif /* !CONFLICTS_H_ */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user