mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-08-14 05:05:14 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d2e00347cb | ||
|
|
3e2bf5adf6 | ||
|
|
8ae7664ea0 | ||
|
|
6822137867 | ||
|
|
6ed6122606 | ||
|
|
2411ba6bea | ||
|
|
6d42748fae | ||
|
|
0f3e47c1b3 | ||
|
|
dad49092a9 | ||
|
|
66a69320b2 | ||
|
|
86b7964abb | ||
|
|
8a278a045d | ||
|
|
e0d27f5f08 | ||
|
|
3114db31fd | ||
|
|
4723d52125 | ||
|
|
8ebbae2a91 | ||
|
|
eba41a1d10 | ||
|
|
3dcf6735ff | ||
|
|
e5335b7401 | ||
|
|
f9b730cd59 | ||
|
|
bbcb769c0e | ||
|
|
ca1d9e53ce | ||
|
|
1c7aefa94e | ||
|
|
7903d3b5de | ||
|
|
59b31ad972 | ||
|
|
5aafad1ddf | ||
|
|
e7ae9cfb47 | ||
|
|
5c31c3c2c8 | ||
|
|
e569a4351c | ||
|
|
9eceb6c6d3 | ||
|
|
315f05ae6c | ||
|
|
f35167cb24 | ||
|
|
8cd0d0f2ce | ||
|
|
f51dbca105 | ||
|
|
97088b85c5 | ||
|
|
8d57fff0a9 | ||
|
|
cbbe75051d | ||
|
|
2686a6e713 | ||
|
|
a693bf18ef | ||
|
|
29620c5d9c | ||
|
|
2d97f5ccb7 | ||
|
|
c49a8e71ce | ||
|
|
c9c4ffaa5d | ||
|
|
74a53b4b48 | ||
|
|
a889d44ce2 | ||
|
|
e6011337c3 | ||
|
|
d2729d44ab | ||
|
|
4be07551f5 | ||
|
|
0308924772 | ||
|
|
3202e65182 | ||
|
|
bd088c911c | ||
|
|
118fb2053c | ||
|
|
7bb4d91420 | ||
|
|
bd2a2393ed | ||
|
|
bd773d7399 | ||
|
|
de4d0c7525 | ||
|
|
792d6b7cda | ||
|
|
df1af54c81 | ||
|
|
c55c697eb1 | ||
|
|
9e4e995adb | ||
|
|
604cc97b12 | ||
|
|
5b2a15fd2f | ||
|
|
f310d2132a | ||
|
|
6f82addcd5 | ||
|
|
4562bb7764 | ||
|
|
341a3cfb10 | ||
|
|
5b2e3c8982 | ||
|
|
d968a24b6e | ||
|
|
6f515a274e | ||
|
|
5c9ba6311a | ||
|
|
bc77bc1cd2 | ||
|
|
11443f4acf | ||
|
|
ab1375029c | ||
|
|
b059f9990f |
+11
@@ -0,0 +1,11 @@
|
||||
ChangeLog
|
||||
Makefile
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
config.cache
|
||||
config.h
|
||||
config.hin
|
||||
config.log
|
||||
config.status
|
||||
configure
|
||||
stamp-h
|
||||
@@ -0,0 +1,8 @@
|
||||
Authors of GNU Bison.
|
||||
|
||||
Bison was written primarily by Robert Corbett.
|
||||
|
||||
Richard Stallman made it Yacc-compatible.
|
||||
|
||||
Wilfred Hansen of Carnegie Mellon University added multicharacter
|
||||
string literals and other features.
|
||||
@@ -0,0 +1,8 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
AUTOMAKE_OPTIONS = 1.4
|
||||
|
||||
SUBDIRS = intl po src doc
|
||||
|
||||
EXTRA_DIST = REFERENCES configure.bat OChangeLog
|
||||
|
||||
DISTCLEANFILES = intl/libintl.h
|
||||
-200
@@ -1,200 +0,0 @@
|
||||
# Makefile for bison
|
||||
# Copyright (C) 1988, 1989, 1991, 1993 Bob Corbett and Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is part of Bison, the GNU Compiler Compiler.
|
||||
#
|
||||
# Bison is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# Bison is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Bison; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
#### Start of system configuration section. ####
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
CC = @CC@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
MAKEINFO = makeinfo
|
||||
|
||||
# Things you might add to DEFS:
|
||||
# -DSTDC_HEADERS If you have ANSI C headers and libraries.
|
||||
# -DHAVE_STRING_H If you don't have ANSI C headers but have string.h.
|
||||
# -DHAVE_MEMORY_H If you don't have ANSI C headers and have memory.h.
|
||||
# -DHAVE_STRERROR If you have strerror function.
|
||||
DEFS = @DEFS@
|
||||
|
||||
CFLAGS = @CFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
|
||||
LIBS = @LIBS@
|
||||
|
||||
# Some System V machines do not come with libPW. If this is true, use
|
||||
# the GNU alloca.o here.
|
||||
ALLOCA = @ALLOCA@
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
# where the installed binary goes
|
||||
bindir = $(exec_prefix)/bin
|
||||
|
||||
# where the parsers go
|
||||
datadir = $(prefix)/share
|
||||
|
||||
# where the info files go
|
||||
infodir = $(prefix)/info
|
||||
|
||||
# where manual pages go and what their extensions should be
|
||||
mandir = $(prefix)/man/man$(manext)
|
||||
manext = 1
|
||||
|
||||
# hope this works on non-gnu makes.
|
||||
bison_version = `sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q version.c`
|
||||
|
||||
#### End of system configuration section. ####
|
||||
|
||||
DISTFILES = COPYING ChangeLog Makefile.in configure configure.in \
|
||||
REFERENCES bison.1 bison.rnh configure.bat \
|
||||
bison.simple bison.hairy \
|
||||
LR0.c allocate.c closure.c conflicts.c derives.c \
|
||||
files.c getargs.c gram.c lalr.c lex.c main.c nullable.c \
|
||||
output.c print.c reader.c reduce.c symtab.c version.c \
|
||||
warshall.c files.h gram.h lex.h machine.h alloc.h state.h \
|
||||
symtab.h system.h types.h bison.cld build.com vmsgetargs.c \
|
||||
vmshlp.mar README INSTALL NEWS bison.texinfo bison.info* texinfo.tex \
|
||||
getopt.c getopt.h getopt1.c alloca.c mkinstalldirs install-sh
|
||||
|
||||
|
||||
SHELL = /bin/sh
|
||||
|
||||
# This rule allows us to supply the necessary -D options
|
||||
# in addition to whatever the user asks for.
|
||||
.c.o:
|
||||
$(CC) -c $(DEFS) -I$(srcdir)/../include $(CPPFLAGS) $(CFLAGS) $<
|
||||
|
||||
# names of parser files
|
||||
PFILE = bison.simple
|
||||
PFILE1 = bison.hairy
|
||||
|
||||
PFILES = -DXPFILE=\"$(datadir)/$(PFILE)\" \
|
||||
-DXPFILE1=\"$(datadir)/$(PFILE1)\"
|
||||
|
||||
OBJECTS = LR0.o allocate.o closure.o conflicts.o derives.o files.o \
|
||||
getargs.o gram.o lalr.o lex.o \
|
||||
main.o nullable.o output.o print.o reader.o reduce.o symtab.o \
|
||||
warshall.o version.o \
|
||||
getopt.o getopt1.o $(ALLOCA)
|
||||
|
||||
all: bison bison.info bison.s1
|
||||
|
||||
Makefile: config.status Makefile.in
|
||||
CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
|
||||
|
||||
config.status: configure
|
||||
./config.status --recheck
|
||||
|
||||
configure: configure.in
|
||||
cd $(srcdir) && autoconf
|
||||
|
||||
# Copy bison.simple, inserting directory name into the #line commands.
|
||||
bison.s1: bison.simple
|
||||
-rm -f bison.s1
|
||||
sed -e "/^#line/ s|bison|$(datadir)/bison|" -e "s/@bison_version@/$(bison_version)/" < $(srcdir)/$(PFILE) > $@-tmp
|
||||
mv $@-tmp $@
|
||||
|
||||
clean:
|
||||
rm -f *.o core bison bison.s1 config.status config.log
|
||||
|
||||
mostlyclean: clean
|
||||
|
||||
distclean: clean
|
||||
rm -f Makefile
|
||||
|
||||
realclean: distclean
|
||||
rm -f TAGS *.info*
|
||||
|
||||
# Most of these deps are in case using RCS.
|
||||
install: all bison.1 $(srcdir)/$(PFILE) $(srcdir)/$(PFILE1) installdirs uninstall
|
||||
$(INSTALL_PROGRAM) bison $(bindir)/bison
|
||||
$(INSTALL_DATA) bison.s1 $(datadir)/$(PFILE)
|
||||
$(INSTALL_DATA) $(srcdir)/$(PFILE1) $(datadir)/$(PFILE1)
|
||||
cd $(srcdir); for f in bison.info*; \
|
||||
do $(INSTALL_DATA) $$f $(infodir)/$$f; done
|
||||
-$(INSTALL_DATA) $(srcdir)/bison.1 $(mandir)/bison.$(manext)
|
||||
|
||||
# Make sure all installation directories, e.g. $(bindir) actually exist by
|
||||
# making them if necessary.
|
||||
installdirs:
|
||||
-sh $(srcdir)/mkinstalldirs $(bindir) $(datadir) $(libdir) $(infodir) $(mandir)
|
||||
|
||||
uninstall:
|
||||
rm -f $(bindir)/bison
|
||||
-cd $(datadir); rm -f $(PFILE) $(PFILE1)
|
||||
rm -f $(mandir)/bison.$(manext) $(infodir)/bison.info*
|
||||
|
||||
check:
|
||||
@echo "No checks implemented (yet)."
|
||||
|
||||
bison: $(OBJECTS)
|
||||
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJECTS) $(LIBS)
|
||||
|
||||
# We don't use $(srcdir) in this rule
|
||||
# because it is normally used in the master source dir
|
||||
# in which configure has not been run.
|
||||
dist: bison.info
|
||||
echo bison-$(bison_version) > .fname
|
||||
-rm -rf `cat .fname`
|
||||
mkdir `cat .fname`
|
||||
dst=`cat .fname`; for f in $(DISTFILES); do \
|
||||
if test -L $$f; then \
|
||||
cp $$f $$dst/$$f; chmod a-w $$dst/$$f; \
|
||||
else \
|
||||
ln $$f $$dst/$$f; \
|
||||
fi \
|
||||
done
|
||||
tar --gzip -chf `cat .fname`.tar.gz `cat .fname`
|
||||
-rm -rf `cat .fname` .fname
|
||||
|
||||
bison.info: bison.texinfo
|
||||
$(MAKEINFO) $(srcdir)/bison.texinfo
|
||||
|
||||
TAGS: *.c *.h
|
||||
etags *.c *.h
|
||||
|
||||
# This file is different to pass the parser file names to the compiler.
|
||||
files.o: files.c
|
||||
$(CC) -c $(PFILES) $(DEFS) $(CPPFLAGS) $(CFLAGS) \
|
||||
$(srcdir)/files.c $(OUTPUT_OPTION)
|
||||
|
||||
LR0.o: system.h machine.h alloc.h gram.h state.h
|
||||
allocate.o: system.h
|
||||
closure.o: system.h machine.h alloc.h gram.h
|
||||
conflicts.o: system.h machine.h alloc.h files.h gram.h state.h
|
||||
derives.o: system.h alloc.h types.h gram.h
|
||||
files.o: system.h files.h alloc.h gram.h
|
||||
getargs.o: system.h files.h
|
||||
lalr.o: system.h machine.h types.h state.h alloc.h gram.h
|
||||
lex.o: system.h files.h symtab.h lex.h
|
||||
main.o: system.h machine.h
|
||||
nullable.o: system.h types.h gram.h alloc.h
|
||||
output.o: system.h machine.h alloc.h files.h gram.h state.h
|
||||
print.o: system.h machine.h alloc.h files.h gram.h state.h
|
||||
reader.o: system.h files.h alloc.h symtab.h lex.h gram.h
|
||||
reduce.o: system.h machine.h files.h alloc.h gram.h
|
||||
symtab.o: system.h alloc.h symtab.h gram.h
|
||||
warshall.o: system.h machine.h
|
||||
|
||||
# Prevent GNU make v3 from overflowing arg limit on SysV.
|
||||
.NOEXPORT:
|
||||
@@ -1,7 +1,39 @@
|
||||
Bison News
|
||||
----------
|
||||
|
||||
Change in version 1.25:
|
||||
Changes in version 1.28:
|
||||
|
||||
* Should compile better now with K&R compilers.
|
||||
|
||||
* Added NLS.
|
||||
|
||||
* Fixed a problem with escaping the double quote character.
|
||||
|
||||
* There is now a FAQ.
|
||||
|
||||
Changes in version 1.27:
|
||||
|
||||
* The make rule which prevented bison.simple from being created on
|
||||
some systems has been fixed.
|
||||
|
||||
Changes in version 1.26:
|
||||
|
||||
* Bison now uses automake.
|
||||
|
||||
* New mailing lists: <[email protected]> and <[email protected]>.
|
||||
|
||||
* Token numbers now start at 257 as previously documented, not 258.
|
||||
|
||||
* Bison honors the TMPDIR environment variable.
|
||||
|
||||
* A couple of buffer overruns have been fixed.
|
||||
|
||||
* Problems when closing files should now be reported.
|
||||
|
||||
* Generated parsers should now work even on operating systems which do
|
||||
not provide alloca().
|
||||
|
||||
Changes in version 1.25:
|
||||
|
||||
* Errors in the input grammar are not fatal; Bison keeps reading
|
||||
the grammar file, and reports all the errors found in it.
|
||||
|
||||
+1430
File diff suppressed because it is too large
Load Diff
-20
@@ -1,20 +0,0 @@
|
||||
# List of files which contain translatable strings.
|
||||
# Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
|
||||
# Package source files
|
||||
allocate.c
|
||||
closure.c
|
||||
conflicts.c
|
||||
derives.c
|
||||
getargs.c
|
||||
lalr.c
|
||||
lex.c
|
||||
main.c
|
||||
nullable.c
|
||||
output.c
|
||||
print.c
|
||||
reader.c
|
||||
reduce.c
|
||||
|
||||
# Common library files
|
||||
getopt.c
|
||||
@@ -1,6 +1,7 @@
|
||||
This directory contains the Bison parser generator.
|
||||
|
||||
See the file INSTALL for compilation and installation instructions.
|
||||
See the file doc/FAQ for frequently asked questions.
|
||||
|
||||
It was once true that, when installing Bison on Sequent (or Pyramid?)
|
||||
systems, you had to be in the Berkeley universe. This may no longer
|
||||
@@ -10,6 +11,13 @@ On VMS, you will probably have to create Makefile from Makefile.in by
|
||||
hand. Remember to do `SET COMMAND BISON' to install the data in
|
||||
`BISON.CLD'.
|
||||
|
||||
Send bug reports to [email protected]. Please include the
|
||||
version number from `bison --version', and a complete, self-contained
|
||||
test case in each bug report.
|
||||
VMS and MS-DOS builds are probably broken right now. If you are able
|
||||
to build Bison on either platform and you need to make changes to do
|
||||
so, please submit those changes as a bug report.
|
||||
|
||||
Send bug reports to [email protected]. Please include the version
|
||||
number from `bison --version', and a complete, self-contained test
|
||||
case in each bug report.
|
||||
|
||||
If you have questions about using Bison which the documentation does
|
||||
not answer, send mail to [email protected].
|
||||
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
@TOP@
|
||||
|
||||
/* Name of package. */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Version of package. */
|
||||
#undef VERSION
|
||||
|
||||
/* Version string. */
|
||||
#undef VERSION_STRING
|
||||
|
||||
/* Define if the compiler understands prototypes. */
|
||||
#undef PROTOTYPES
|
||||
|
||||
/* Define to 1 if NLS is requested. */
|
||||
#undef ENABLE_NLS
|
||||
|
||||
/* Define as 1 if you have catgets and don't want to use GNU gettext. */
|
||||
#undef HAVE_CATGETS
|
||||
|
||||
/* Define as 1 if you have gettext and don't want to use GNU gettext. */
|
||||
#undef HAVE_GETTEXT
|
||||
|
||||
/* Define if your locale.h file contains LC_MESSAGES. */
|
||||
#undef HAVE_LC_MESSAGES
|
||||
|
||||
/* Define to 1 if you have the stpcpy function. */
|
||||
#undef HAVE_STPCPY
|
||||
|
||||
/* The location of the simple parser (bison.simple). */
|
||||
#undef XPFILE
|
||||
|
||||
/* The location of the semantic parser (bison.hairy). */
|
||||
#undef XPFILE1
|
||||
|
||||
/* The location of the local directory. */
|
||||
#undef LOCALEDIR
|
||||
|
||||
/* Define as 1 if realloc must be declared even if <stdlib.h> is
|
||||
included. */
|
||||
#undef NEED_DECLARATION_REALLOC
|
||||
|
||||
/* Define as 1 if calloc must be declared even if <stdlib.h> is
|
||||
included. */
|
||||
#undef NEED_DECLARATION_CALLOC
|
||||
@BOTTOM@
|
||||
|
||||
#if defined(PROTOTYPES) || defined(__cplusplus)
|
||||
# define PARAMS(p) p
|
||||
#else
|
||||
# define PARAMS(p) ()
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_H */
|
||||
@@ -0,0 +1,60 @@
|
||||
dnl BISON_DEFINE_FILE(VARNAME, FILE)
|
||||
dnl Defines (with AC_DEFINE) VARNAME to the expansion of the FILE
|
||||
dnl variable, expanding ${prefix} and such.
|
||||
dnl Example: BISON_DEFINE_FILE(DATADIR, datadir)
|
||||
dnl By Alexandre Oliva <[email protected]>
|
||||
AC_DEFUN(BISON_DEFINE_FILE, [
|
||||
ac_expanded=`(
|
||||
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
|
||||
test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
|
||||
eval echo \""[$]$2"\"
|
||||
)`
|
||||
AC_DEFINE_UNQUOTED($1, "$ac_expanded")
|
||||
])
|
||||
|
||||
dnl See whether we need a declaration for a function.
|
||||
dnl BISON_NEED_DECLARATION(FUNCTION [, EXTRA-HEADER-FILES])
|
||||
AC_DEFUN(BISON_NEED_DECLARATION,
|
||||
[AC_MSG_CHECKING([whether $1 must be declared])
|
||||
AC_CACHE_VAL(bison_cv_decl_needed_$1,
|
||||
[AC_TRY_COMPILE([
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#else
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
#endif
|
||||
#endif
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifndef HAVE_RINDEX
|
||||
#define rindex strrchr
|
||||
#endif
|
||||
#ifndef HAVE_INDEX
|
||||
#define index strchr
|
||||
#endif
|
||||
$2],
|
||||
[char *(*pfn) = (char *(*)) $1],
|
||||
eval "bison_cv_decl_needed_$1=no", eval "bison_cv_decl_needed_$1=yes")])
|
||||
if eval "test \"`echo '$bison_cv_decl_needed_'$1`\" = yes"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
bison_tr_decl=NEED_DECLARATION_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
|
||||
AC_DEFINE_UNQUOTED($bison_tr_decl)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
])dnl
|
||||
|
||||
dnl Check multiple functions to see whether each needs a declaration.
|
||||
dnl BISON_NEED_DECLARATIONS(FUNCTION... [, EXTRA-HEADER-FILES])
|
||||
AC_DEFUN(BISON_NEED_DECLARATIONS,
|
||||
[for ac_func in $1
|
||||
do
|
||||
BISON_NEED_DECLARATION($ac_func, $2)
|
||||
done
|
||||
])
|
||||
-760
@@ -1,760 +0,0 @@
|
||||
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
|
||||
#line 3 "bison.simple"
|
||||
/* This file comes from bison-@bison_version@. */
|
||||
|
||||
/* Skeleton output parser for bison,
|
||||
Copyright (C) 1984, 1989, 1990 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., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
/* As a special exception, when this file is copied by Bison into a
|
||||
Bison output file, you may use that output file without restriction.
|
||||
This special exception was added by the Free Software Foundation
|
||||
in version 1.24 of Bison. */
|
||||
|
||||
/* This is the parser code that is written into each bison parser
|
||||
when the %semantic_parser declaration is not specified in the grammar.
|
||||
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
|
||||
#else /* alloca not defined */
|
||||
#ifdef __GNUC__
|
||||
#define YYSTACK_USE_ALLOCA
|
||||
#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
|
||||
#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
|
||||
#else /* not MSDOS, or __TURBOC__, or _AIX */
|
||||
#if 0
|
||||
#ifdef __hpux /* [email protected] says this works for HPUX 9.05 and up,
|
||||
and on HPUX 10. Eventually we can turn this on. */
|
||||
#define YYSTACK_USE_ALLOCA
|
||||
#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 */
|
||||
|
||||
#ifdef YYSTACK_USE_ALLOCA
|
||||
#define YYSTACK_ALLOC alloca
|
||||
#else
|
||||
#define YYSTACK_ALLOC malloc
|
||||
#endif
|
||||
|
||||
/* Note: there must be only one dollar sign in this file.
|
||||
It is replaced by the list of actions, each action
|
||||
as one case of the switch. */
|
||||
|
||||
#define yyerrok (yyerrstatus = 0)
|
||||
#define yyclearin (yychar = YYEMPTY)
|
||||
#define YYEMPTY -2
|
||||
#define YYEOF 0
|
||||
#define YYACCEPT goto yyacceptlab
|
||||
#define YYABORT goto yyabortlab
|
||||
#define YYERROR goto yyerrlab1
|
||||
/* Like YYERROR except do call yyerror.
|
||||
This remains here temporarily to ease the
|
||||
transition to the new meaning of YYERROR, for GCC.
|
||||
Once GCC version 2 has supplanted version 1, this can go. */
|
||||
#define YYFAIL goto yyerrlab
|
||||
#define YYRECOVERING() (!!yyerrstatus)
|
||||
#define YYBACKUP(token, value) \
|
||||
do \
|
||||
if (yychar == YYEMPTY && yylen == 1) \
|
||||
{ yychar = (token), yylval = (value); \
|
||||
yychar1 = YYTRANSLATE (yychar); \
|
||||
YYPOPSTACK; \
|
||||
goto yybackup; \
|
||||
} \
|
||||
else \
|
||||
{ yyerror ("syntax error: cannot back up"); YYERROR; } \
|
||||
while (0)
|
||||
|
||||
#define YYTERROR 1
|
||||
#define YYERRCODE 256
|
||||
|
||||
#ifndef YYPURE
|
||||
#define YYLEX yylex()
|
||||
#endif
|
||||
|
||||
#ifdef YYPURE
|
||||
#ifdef YYLSP_NEEDED
|
||||
#ifdef YYLEX_PARAM
|
||||
#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
|
||||
#else
|
||||
#define YYLEX yylex(&yylval, &yylloc)
|
||||
#endif
|
||||
#else /* not YYLSP_NEEDED */
|
||||
#ifdef YYLEX_PARAM
|
||||
#define YYLEX yylex(&yylval, YYLEX_PARAM)
|
||||
#else
|
||||
#define YYLEX yylex(&yylval)
|
||||
#endif
|
||||
#endif /* not YYLSP_NEEDED */
|
||||
#endif
|
||||
|
||||
/* If nonreentrant, generate the variables here */
|
||||
|
||||
#ifndef YYPURE
|
||||
|
||||
int yychar; /* the lookahead symbol */
|
||||
YYSTYPE yylval; /* the semantic value of the */
|
||||
/* lookahead symbol */
|
||||
|
||||
#ifdef YYLSP_NEEDED
|
||||
YYLTYPE yylloc; /* location data for the lookahead */
|
||||
/* symbol */
|
||||
#endif
|
||||
|
||||
int yynerrs; /* number of parse errors so far */
|
||||
#endif /* not YYPURE */
|
||||
|
||||
#if YYDEBUG != 0
|
||||
int yydebug; /* nonzero means print parse trace */
|
||||
/* Since this is uninitialized, it does not stop multiple parsers
|
||||
from coexisting. */
|
||||
#endif
|
||||
|
||||
/* YYINITDEPTH indicates the initial size of the parser's stacks */
|
||||
|
||||
#ifndef YYINITDEPTH
|
||||
#define YYINITDEPTH 200
|
||||
#endif
|
||||
|
||||
/* YYMAXDEPTH is the maximum size the stacks can grow to
|
||||
(effective only if the built-in stack extension method is used). */
|
||||
|
||||
#if YYMAXDEPTH == 0
|
||||
#undef YYMAXDEPTH
|
||||
#endif
|
||||
|
||||
#ifndef YYMAXDEPTH
|
||||
#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++ */
|
||||
#ifndef __cplusplus
|
||||
|
||||
/* This is the most reliable way to avoid incompatibilities
|
||||
in available built-in functions on various systems. */
|
||||
static void
|
||||
__yy_memcpy (to, from, count)
|
||||
char *to;
|
||||
char *from;
|
||||
unsigned int count;
|
||||
{
|
||||
register char *f = from;
|
||||
register char *t = to;
|
||||
register int i = count;
|
||||
|
||||
while (i-- > 0)
|
||||
*t++ = *f++;
|
||||
}
|
||||
|
||||
#else /* __cplusplus */
|
||||
|
||||
/* This is the most reliable way to avoid incompatibilities
|
||||
in available built-in functions on various systems. */
|
||||
static void
|
||||
__yy_memcpy (char *to, char *from, unsigned int count)
|
||||
{
|
||||
register char *t = to;
|
||||
register char *f = from;
|
||||
register int i = count;
|
||||
|
||||
while (i-- > 0)
|
||||
*t++ = *f++;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#line 216 "bison.simple"
|
||||
|
||||
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
|
||||
into yyparse. The argument should have type void *.
|
||||
It should actually point to an object.
|
||||
Grammar actions can access the variable by casting it
|
||||
to the proper pointer type. */
|
||||
|
||||
#ifdef YYPARSE_PARAM
|
||||
#ifdef __cplusplus
|
||||
#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
|
||||
#define YYPARSE_PARAM_DECL
|
||||
#else /* not __cplusplus */
|
||||
#define YYPARSE_PARAM_ARG YYPARSE_PARAM
|
||||
#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
|
||||
#endif /* not __cplusplus */
|
||||
#else /* not YYPARSE_PARAM */
|
||||
#define YYPARSE_PARAM_ARG
|
||||
#define YYPARSE_PARAM_DECL
|
||||
#endif /* not YYPARSE_PARAM */
|
||||
|
||||
/* Prevent warning if -Wstrict-prototypes. */
|
||||
#ifdef __GNUC__
|
||||
#ifdef YYPARSE_PARAM
|
||||
int yyparse (void *);
|
||||
#else
|
||||
int yyparse (void);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
int
|
||||
yyparse(YYPARSE_PARAM_ARG)
|
||||
YYPARSE_PARAM_DECL
|
||||
{
|
||||
register int yystate;
|
||||
register int yyn;
|
||||
register short *yyssp;
|
||||
register YYSTYPE *yyvsp;
|
||||
int yyerrstatus; /* number of tokens to shift before error messages enabled */
|
||||
int yychar1 = 0; /* lookahead token as an internal (translated) token number */
|
||||
|
||||
short yyssa[YYINITDEPTH]; /* the state stack */
|
||||
YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
|
||||
|
||||
short *yyss = yyssa; /* refer to the stacks thru separate pointers */
|
||||
YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
|
||||
|
||||
#ifdef YYLSP_NEEDED
|
||||
YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
|
||||
YYLTYPE *yyls = yylsa;
|
||||
YYLTYPE *yylsp;
|
||||
|
||||
#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
|
||||
#else
|
||||
#define YYPOPSTACK (yyvsp--, yyssp--)
|
||||
#endif
|
||||
|
||||
int yystacksize = YYINITDEPTH;
|
||||
int yyfree_stacks = 0;
|
||||
|
||||
#ifdef YYPURE
|
||||
int yychar;
|
||||
YYSTYPE yylval;
|
||||
int yynerrs;
|
||||
#ifdef YYLSP_NEEDED
|
||||
YYLTYPE yylloc;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
YYSTYPE yyval; /* the variable used to return */
|
||||
/* semantic values from the action */
|
||||
/* routines */
|
||||
|
||||
int yylen;
|
||||
|
||||
#if YYDEBUG != 0
|
||||
if (yydebug)
|
||||
fprintf(stderr, "Starting parse\n");
|
||||
#endif
|
||||
|
||||
yystate = 0;
|
||||
yyerrstatus = 0;
|
||||
yynerrs = 0;
|
||||
yychar = YYEMPTY; /* Cause a token to be read. */
|
||||
|
||||
/* Initialize stack pointers.
|
||||
Waste one element of value and location stack
|
||||
so that they stay on the same level as the state stack.
|
||||
The wasted elements are never initialized. */
|
||||
|
||||
yyssp = yyss - 1;
|
||||
yyvsp = yyvs;
|
||||
#ifdef YYLSP_NEEDED
|
||||
yylsp = yyls;
|
||||
#endif
|
||||
|
||||
/* Push a new state, which is found in yystate . */
|
||||
/* In all cases, when you get here, the value and location stacks
|
||||
have just been pushed. so pushing a state here evens the stacks. */
|
||||
yynewstate:
|
||||
|
||||
*++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;
|
||||
#ifdef YYLSP_NEEDED
|
||||
YYLTYPE *yyls1 = yyls;
|
||||
#endif
|
||||
|
||||
/* Get the current used size of the three stacks, in elements. */
|
||||
int size = yyssp - yyss + 1;
|
||||
|
||||
#ifdef yyoverflow
|
||||
/* Each stack pointer address is followed by the size of
|
||||
the data in use in that stack, in bytes. */
|
||||
#ifdef 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
|
||||
|
||||
yyss = yyss1; yyvs = yyvs1;
|
||||
#ifdef YYLSP_NEEDED
|
||||
yyls = yyls1;
|
||||
#endif
|
||||
#else /* no yyoverflow */
|
||||
/* Extend the stack our own way. */
|
||||
if (yystacksize >= YYMAXDEPTH)
|
||||
{
|
||||
yyerror("parser stack overflow");
|
||||
if (yyfree_stacks)
|
||||
{
|
||||
free (yyss);
|
||||
free (yyvs);
|
||||
#ifdef YYLSP_NEEDED
|
||||
free (yyls);
|
||||
#endif
|
||||
}
|
||||
return 2;
|
||||
}
|
||||
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));
|
||||
#ifdef YYLSP_NEEDED
|
||||
yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
|
||||
__yy_memcpy ((char *)yyls, (char *)yyls1,
|
||||
size * (unsigned int) sizeof (*yylsp));
|
||||
#endif
|
||||
#endif /* no yyoverflow */
|
||||
|
||||
yyssp = yyss + size - 1;
|
||||
yyvsp = yyvs + size - 1;
|
||||
#ifdef YYLSP_NEEDED
|
||||
yylsp = yyls + size - 1;
|
||||
#endif
|
||||
|
||||
#if YYDEBUG != 0
|
||||
if (yydebug)
|
||||
fprintf(stderr, "Stack size increased to %d\n", yystacksize);
|
||||
#endif
|
||||
|
||||
if (yyssp >= yyss + yystacksize - 1)
|
||||
YYABORT;
|
||||
}
|
||||
|
||||
#if YYDEBUG != 0
|
||||
if (yydebug)
|
||||
fprintf(stderr, "Entering state %d\n", yystate);
|
||||
#endif
|
||||
|
||||
goto yybackup;
|
||||
yybackup:
|
||||
|
||||
/* Do appropriate processing given the current state. */
|
||||
/* Read a lookahead token if we need one and don't already have one. */
|
||||
/* yyresume: */
|
||||
|
||||
/* First try to decide what to do without reference to lookahead token. */
|
||||
|
||||
yyn = yypact[yystate];
|
||||
if (yyn == YYFLAG)
|
||||
goto yydefault;
|
||||
|
||||
/* Not known => get a lookahead token if don't already have one. */
|
||||
|
||||
/* yychar is either YYEMPTY or YYEOF
|
||||
or a valid token in external form. */
|
||||
|
||||
if (yychar == YYEMPTY)
|
||||
{
|
||||
#if YYDEBUG != 0
|
||||
if (yydebug)
|
||||
fprintf(stderr, "Reading a token: ");
|
||||
#endif
|
||||
yychar = YYLEX;
|
||||
}
|
||||
|
||||
/* Convert token to internal form (in yychar1) for indexing tables with */
|
||||
|
||||
if (yychar <= 0) /* This means end of input. */
|
||||
{
|
||||
yychar1 = 0;
|
||||
yychar = YYEOF; /* Don't call YYLEX any more */
|
||||
|
||||
#if YYDEBUG != 0
|
||||
if (yydebug)
|
||||
fprintf(stderr, "Now at end of input.\n");
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
yychar1 = YYTRANSLATE(yychar);
|
||||
|
||||
#if YYDEBUG != 0
|
||||
if (yydebug)
|
||||
{
|
||||
fprintf (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");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
yyn += yychar1;
|
||||
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
|
||||
goto yydefault;
|
||||
|
||||
yyn = yytable[yyn];
|
||||
|
||||
/* yyn is what to do for this token type in this state.
|
||||
Negative => reduce, -yyn is rule number.
|
||||
Positive => shift, yyn is new state.
|
||||
New state is final state => don't bother to shift,
|
||||
just return success.
|
||||
0, or most negative number => error. */
|
||||
|
||||
if (yyn < 0)
|
||||
{
|
||||
if (yyn == YYFLAG)
|
||||
goto yyerrlab;
|
||||
yyn = -yyn;
|
||||
goto yyreduce;
|
||||
}
|
||||
else if (yyn == 0)
|
||||
goto yyerrlab;
|
||||
|
||||
if (yyn == YYFINAL)
|
||||
YYACCEPT;
|
||||
|
||||
/* Shift the lookahead token. */
|
||||
|
||||
#if YYDEBUG != 0
|
||||
if (yydebug)
|
||||
fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
|
||||
#endif
|
||||
|
||||
/* Discard the token being shifted unless it is eof. */
|
||||
if (yychar != YYEOF)
|
||||
yychar = YYEMPTY;
|
||||
|
||||
*++yyvsp = yylval;
|
||||
#ifdef YYLSP_NEEDED
|
||||
*++yylsp = yylloc;
|
||||
#endif
|
||||
|
||||
/* count tokens shifted since error; after three, turn off error status. */
|
||||
if (yyerrstatus) yyerrstatus--;
|
||||
|
||||
yystate = yyn;
|
||||
goto yynewstate;
|
||||
|
||||
/* Do the default action for the current state. */
|
||||
yydefault:
|
||||
|
||||
yyn = yydefact[yystate];
|
||||
if (yyn == 0)
|
||||
goto yyerrlab;
|
||||
|
||||
/* Do a reduction. yyn is the number of a rule to reduce with. */
|
||||
yyreduce:
|
||||
yylen = yyr2[yyn];
|
||||
if (yylen > 0)
|
||||
yyval = yyvsp[1-yylen]; /* implement default value of the action */
|
||||
|
||||
#if YYDEBUG != 0
|
||||
if (yydebug)
|
||||
{
|
||||
int i;
|
||||
|
||||
fprintf (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]]);
|
||||
}
|
||||
#endif
|
||||
|
||||
$ /* the action file gets copied in in place of this dollarsign */
|
||||
#line 542 "bison.simple"
|
||||
|
||||
yyvsp -= yylen;
|
||||
yyssp -= yylen;
|
||||
#ifdef YYLSP_NEEDED
|
||||
yylsp -= yylen;
|
||||
#endif
|
||||
|
||||
#if YYDEBUG != 0
|
||||
if (yydebug)
|
||||
{
|
||||
short *ssp1 = yyss - 1;
|
||||
fprintf (stderr, "state stack now");
|
||||
while (ssp1 != yyssp)
|
||||
fprintf (stderr, " %d", *++ssp1);
|
||||
fprintf (stderr, "\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
*++yyvsp = yyval;
|
||||
|
||||
#ifdef YYLSP_NEEDED
|
||||
yylsp++;
|
||||
if (yylen == 0)
|
||||
{
|
||||
yylsp->first_line = yylloc.first_line;
|
||||
yylsp->first_column = yylloc.first_column;
|
||||
yylsp->last_line = (yylsp-1)->last_line;
|
||||
yylsp->last_column = (yylsp-1)->last_column;
|
||||
yylsp->text = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
yylsp->last_line = (yylsp+yylen-1)->last_line;
|
||||
yylsp->last_column = (yylsp+yylen-1)->last_column;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Now "shift" the result of the reduction.
|
||||
Determine what state that goes to,
|
||||
based on the state we popped back to
|
||||
and the rule number reduced by. */
|
||||
|
||||
yyn = yyr1[yyn];
|
||||
|
||||
yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
|
||||
if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
|
||||
yystate = yytable[yystate];
|
||||
else
|
||||
yystate = yydefgoto[yyn - YYNTBASE];
|
||||
|
||||
goto yynewstate;
|
||||
|
||||
yyerrlab: /* here on detecting error */
|
||||
|
||||
if (! yyerrstatus)
|
||||
/* If not already recovering from an error, report this error. */
|
||||
{
|
||||
++yynerrs;
|
||||
|
||||
#ifdef YYERROR_VERBOSE
|
||||
yyn = yypact[yystate];
|
||||
|
||||
if (yyn > YYFLAG && yyn < YYLAST)
|
||||
{
|
||||
int size = 0;
|
||||
char *msg;
|
||||
int x, count;
|
||||
|
||||
count = 0;
|
||||
/* Start X at -yyn if nec to avoid negative indexes in yycheck. */
|
||||
for (x = (yyn < 0 ? -yyn : 0);
|
||||
x < (sizeof(yytname) / sizeof(char *)); x++)
|
||||
if (yycheck[x + yyn] == x)
|
||||
size += strlen(yytname[x]) + 15, count++;
|
||||
msg = (char *) malloc(size + 15);
|
||||
if (msg != 0)
|
||||
{
|
||||
strcpy(msg, "parse error");
|
||||
|
||||
if (count < 5)
|
||||
{
|
||||
count = 0;
|
||||
for (x = (yyn < 0 ? -yyn : 0);
|
||||
x < (sizeof(yytname) / sizeof(char *)); x++)
|
||||
if (yycheck[x + yyn] == x)
|
||||
{
|
||||
strcat(msg, count == 0 ? ", expecting `" : " or `");
|
||||
strcat(msg, yytname[x]);
|
||||
strcat(msg, "'");
|
||||
count++;
|
||||
}
|
||||
}
|
||||
yyerror(msg);
|
||||
free(msg);
|
||||
}
|
||||
else
|
||||
yyerror ("parse error; also virtual memory exceeded");
|
||||
}
|
||||
else
|
||||
#endif /* YYERROR_VERBOSE */
|
||||
yyerror("parse error");
|
||||
}
|
||||
|
||||
goto yyerrlab1;
|
||||
yyerrlab1: /* here on error raised explicitly by an action */
|
||||
|
||||
if (yyerrstatus == 3)
|
||||
{
|
||||
/* if just tried and failed to reuse lookahead token after an error, discard it. */
|
||||
|
||||
/* return failure if at end of input */
|
||||
if (yychar == YYEOF)
|
||||
YYABORT;
|
||||
|
||||
#if YYDEBUG != 0
|
||||
if (yydebug)
|
||||
fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
|
||||
#endif
|
||||
|
||||
yychar = YYEMPTY;
|
||||
}
|
||||
|
||||
/* Else will try to reuse lookahead token
|
||||
after shifting the error token. */
|
||||
|
||||
yyerrstatus = 3; /* Each real token shifted decrements this */
|
||||
|
||||
goto yyerrhandle;
|
||||
|
||||
yyerrdefault: /* current state does not do anything special for the error token. */
|
||||
|
||||
#if 0
|
||||
/* This is wrong; only states that explicitly want error tokens
|
||||
should shift them. */
|
||||
yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
|
||||
if (yyn) goto yydefault;
|
||||
#endif
|
||||
|
||||
yyerrpop: /* pop the current state because it cannot handle the error token */
|
||||
|
||||
if (yyssp == yyss) YYABORT;
|
||||
yyvsp--;
|
||||
yystate = *--yyssp;
|
||||
#ifdef YYLSP_NEEDED
|
||||
yylsp--;
|
||||
#endif
|
||||
|
||||
#if YYDEBUG != 0
|
||||
if (yydebug)
|
||||
{
|
||||
short *ssp1 = yyss - 1;
|
||||
fprintf (stderr, "Error: state stack now");
|
||||
while (ssp1 != yyssp)
|
||||
fprintf (stderr, " %d", *++ssp1);
|
||||
fprintf (stderr, "\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
yyerrhandle:
|
||||
|
||||
yyn = yypact[yystate];
|
||||
if (yyn == YYFLAG)
|
||||
goto yyerrdefault;
|
||||
|
||||
yyn += YYTERROR;
|
||||
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
|
||||
goto yyerrdefault;
|
||||
|
||||
yyn = yytable[yyn];
|
||||
if (yyn < 0)
|
||||
{
|
||||
if (yyn == YYFLAG)
|
||||
goto yyerrpop;
|
||||
yyn = -yyn;
|
||||
goto yyreduce;
|
||||
}
|
||||
else if (yyn == 0)
|
||||
goto yyerrpop;
|
||||
|
||||
if (yyn == YYFINAL)
|
||||
YYACCEPT;
|
||||
|
||||
#if YYDEBUG != 0
|
||||
if (yydebug)
|
||||
fprintf(stderr, "Shifting error token, ");
|
||||
#endif
|
||||
|
||||
*++yyvsp = yylval;
|
||||
#ifdef YYLSP_NEEDED
|
||||
*++yylsp = yylloc;
|
||||
#endif
|
||||
|
||||
yystate = yyn;
|
||||
goto yynewstate;
|
||||
|
||||
yyacceptlab:
|
||||
/* YYACCEPT comes here. */
|
||||
if (yyfree_stacks)
|
||||
{
|
||||
free (yyss);
|
||||
free (yyvs);
|
||||
#ifdef YYLSP_NEEDED
|
||||
free (yyls);
|
||||
#endif
|
||||
}
|
||||
return 0;
|
||||
|
||||
yyabortlab:
|
||||
/* YYABORT comes here. */
|
||||
if (yyfree_stacks)
|
||||
{
|
||||
free (yyss);
|
||||
free (yyvs);
|
||||
#ifdef YYLSP_NEEDED
|
||||
free (yyls);
|
||||
#endif
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
+35
-7
@@ -1,22 +1,50 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(reduce.c)
|
||||
AC_INIT(src/reduce.c)
|
||||
AM_INIT_AUTOMAKE(bison,1.28)
|
||||
AM_CONFIG_HEADER(config.h:config.hin)
|
||||
AC_PREREQ(2.13)
|
||||
|
||||
ALL_LINGUAS="de es fr nl"
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
|
||||
AC_MINIX
|
||||
AC_ISC_POSIX
|
||||
AM_PROG_CC_STDC
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_RANLIB
|
||||
|
||||
dnl Checks for libraries.
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(string.h stdlib.h memory.h)
|
||||
AC_CHECK_HEADERS(ctype.h locale.h memory.h stdlib.h string.h unistd.h)
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
dnl Checks for typedefs.
|
||||
|
||||
dnl Checks for structures.
|
||||
|
||||
dnl Checks for compiler characteristics.
|
||||
AC_C_CONST
|
||||
AM_C_PROTOTYPES
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_FUNC_ALLOCA
|
||||
AC_CHECK_FUNCS(strerror)
|
||||
AC_CHECK_FUNCS(mkstemp setlocale)
|
||||
BISON_NEED_DECLARATIONS(calloc realloc)
|
||||
|
||||
AC_OUTPUT(Makefile)
|
||||
AM_GNU_GETTEXT
|
||||
|
||||
# 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_DEFINE_UNQUOTED(VERSION_STRING, "GNU Bison version ${VERSION}")
|
||||
XPFILE="${datadir}/bison.simple"
|
||||
BISON_DEFINE_FILE(XPFILE, XPFILE)
|
||||
XPFILE1="${datadir}/bison.hairy"
|
||||
BISON_DEFINE_FILE(XPFILE1, XPFILE1)
|
||||
LOCALEDIR="${datadir}/locale"
|
||||
BISON_DEFINE_FILE(LOCALEDIR, LOCALEDIR)
|
||||
|
||||
AC_OUTPUT(Makefile intl/Makefile po/Makefile.in src/Makefile doc/Makefile)
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
ChangeLog
|
||||
Makefile
|
||||
Makefile.in
|
||||
bison.aux
|
||||
bison.cp
|
||||
bison.cps
|
||||
bison.dvi
|
||||
bison.fn
|
||||
bison.info
|
||||
bison.info-[0-9]*
|
||||
bison.ky
|
||||
bison.log
|
||||
bison.pg
|
||||
bison.ps
|
||||
bison.toc
|
||||
bison.tp
|
||||
bison.vr
|
||||
stamp-vti
|
||||
version.texi
|
||||
@@ -0,0 +1,96 @@
|
||||
Frequently Asked Questions about Bison:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Q1. Is Bison Y2K compliant?
|
||||
|
||||
A1. If you're looking for a guarantee or certification, I can't
|
||||
provide it. With a little thought you can answer this one for
|
||||
yourself, though. (Hint: does a parser generator rely on the
|
||||
date or time for anything?) If you're still confused, see
|
||||
http://www.gnu.org/software/year2000.html for more information.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Q2. I'm having trouble using Bison. Where can I find help?
|
||||
|
||||
A2. First, read the fine manual which comes with bison. Beyond that,
|
||||
you can send mail to <[email protected]>. This mailing list is
|
||||
intended to be populated with people who are willing to answer
|
||||
questions about using and installing Bison. Please keep in mind
|
||||
that (most of) the people on the list have aspects of their lives
|
||||
which are not related to Bison (!), so you may not receive an
|
||||
answer to your question right away. This can be frustrating, but
|
||||
please try not to honk them off; remember that any help they
|
||||
provide is purely voluntary and out of the kindness of their
|
||||
hearts.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Q3. I found a bug. What should I include in the bug report?
|
||||
|
||||
A3. Before you send a bug report, make sure you are using the latest
|
||||
version. Check ftp://ftp.gnu.org/pub/gnu/bison/ or one of its
|
||||
mirrors. Be sure to include the version number in your bug
|
||||
report. If the bug is present in the latest version but not in a
|
||||
previous version, try to determine the most recent version which
|
||||
did not contain the bug.
|
||||
|
||||
If the bug is parser-related, you should include the smallest
|
||||
grammar you can which demonstrates the bug. The grammar file
|
||||
should also be complete (i.e., I should be able to run it through
|
||||
Bison without having to edit or add anything). The smaller and
|
||||
simpler the grammar, the easier it will be to fix the bug.
|
||||
|
||||
Include information about your compilation environment, including
|
||||
your operating system's name and version and your compiler's name
|
||||
and version. If you have trouble compiling, you should also
|
||||
include a transcript of the build session, starting with the
|
||||
invocation of `configure'. Depending on the nature of the bug,
|
||||
you may be asked to send additional files as well (such as
|
||||
`config.h' or `config.cache').
|
||||
|
||||
Patches are most welcome, but not required. That is, do not
|
||||
hesitate to send a bug report just because you can not provide a
|
||||
fix.
|
||||
|
||||
Send bug reports to <[email protected]>.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Q4. Will Bison ever have C++ support?
|
||||
|
||||
A4. Yes, it's in the works. I will need beta testers, however (and
|
||||
people haven't exactly been lining up for the task). When this
|
||||
feature is ready to be tested, it will be announced on the
|
||||
bug-bison mailing list. If you're interested in testing C++
|
||||
support when it becomes available, please consider subscribing to
|
||||
the list, especially if you are willing to beta test other
|
||||
releases as well.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Q5. What is involved in being a beta tester?
|
||||
|
||||
A5. It's not terribly involved. Basically, you would download a test
|
||||
release, compile it, and use it to build and run a parser or two.
|
||||
After that, you would submit either a bug report or a message
|
||||
saying that everything is okay. It is important to report
|
||||
successes as well as failures because test releases eventually
|
||||
become mainstream releases, but only if they are adequately
|
||||
tested. If no one tests, development is essentially halted.
|
||||
|
||||
Beta testers are particularly needed for operating systems to
|
||||
which I do not have access. I currently have easy access to
|
||||
Linux (x86 glibc 2.1), Solaris (SPARC) 2.6 and 2.7, and HP-UX
|
||||
10.20. Reports about other operating systems are especially
|
||||
welcome.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Q6. How do I join the help-bison and bug-bison mailing lists?
|
||||
|
||||
A6. See http://www.gnu.org/ (the section about "GNU mailing lists")
|
||||
for more information.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
@@ -0,0 +1,7 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
AUTOMAKE_OPTIONS = 1.4
|
||||
|
||||
info_TEXINFOS = bison.texinfo
|
||||
man_MANS = bison.1
|
||||
|
||||
EXTRA_DIST = FAQ bison.1 bison.rnh
|
||||
+11
-4
@@ -320,14 +320,21 @@ bison \-y $*
|
||||
.ft R
|
||||
.sp
|
||||
.RE
|
||||
.PP
|
||||
The long-named options can be introduced with `+' as well as `\-\-',
|
||||
for compatibility with previous releases. Eventually support for `+'
|
||||
will be removed, because it is incompatible with the POSIX.2 standard.
|
||||
.SH FILES
|
||||
/usr/local/lib/bison.simple simple parser
|
||||
.br
|
||||
/usr/local/lib/bison.hairy complicated parser
|
||||
.SH "ENVIRONMENT VARIABLES"
|
||||
.TP
|
||||
.SM BISON_SIMPLE
|
||||
If this is set, it specifies the location in which the
|
||||
.B bison.simple
|
||||
parser can be found.
|
||||
.TP
|
||||
.SM BISON_HAIRY
|
||||
If this is set, it specifies the location in which the
|
||||
.B bison.hairy
|
||||
parser can be found.
|
||||
.SH SEE ALSO
|
||||
.IR yacc (1)
|
||||
.br
|
||||
|
||||
+22
-13
@@ -1,7 +1,8 @@
|
||||
\input texinfo @c -*-texinfo-*-
|
||||
@comment %**start of header
|
||||
@setfilename bison.info
|
||||
@settitle Bison 1.25
|
||||
@include version.texi
|
||||
@settitle Bison @value{VERSION}
|
||||
@setchapternewpage odd
|
||||
|
||||
@iftex
|
||||
@@ -13,8 +14,6 @@
|
||||
@c the smallbook format.
|
||||
@c @smallbook
|
||||
|
||||
@c next time, consider using @set for edition number, etc...
|
||||
|
||||
@c Set following if you have the new `shorttitlepage' command
|
||||
@c @clear shorttitlepage-enabled
|
||||
@c @set shorttitlepage-enabled
|
||||
@@ -36,10 +35,18 @@
|
||||
@end ifinfo
|
||||
@comment %**end of header
|
||||
|
||||
@ifinfo
|
||||
@format
|
||||
START-INFO-DIR-ENTRY
|
||||
* bison: (bison). GNU Project parser generator (yacc replacement).
|
||||
END-INFO-DIR-ENTRY
|
||||
@end format
|
||||
@end ifinfo
|
||||
|
||||
@ifinfo
|
||||
This file documents the Bison parser generator.
|
||||
|
||||
Copyright (C) 1988, 89, 90, 91, 92, 93, 1995 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988, 89, 90, 91, 92, 93, 95, 98, 1999 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of
|
||||
this manual provided the copyright notice and this permission notice
|
||||
@@ -73,13 +80,13 @@ instead of in the original English.
|
||||
@titlepage
|
||||
@title Bison
|
||||
@subtitle The YACC-compatible Parser Generator
|
||||
@subtitle November 1995, Bison Version 1.25
|
||||
@subtitle @value{UPDATED}, Bison Version @value{VERSION}
|
||||
|
||||
@author by Charles Donnelly and Richard Stallman
|
||||
|
||||
@page
|
||||
@vskip 0pt plus 1filll
|
||||
Copyright @copyright{} 1988, 89, 90, 91, 92, 93, 1995 Free Software
|
||||
Copyright @copyright{} 1988, 89, 90, 91, 92, 93, 95, 98, 1999 Free Software
|
||||
Foundation
|
||||
|
||||
@sp 2
|
||||
@@ -121,7 +128,7 @@ Cover art by Etienne Suvasa.
|
||||
@node Top, Introduction, (dir), (dir)
|
||||
|
||||
@ifinfo
|
||||
This manual documents version 1.25 of Bison.
|
||||
This manual documents version @value{VERSION} of Bison.
|
||||
@end ifinfo
|
||||
|
||||
@menu
|
||||
@@ -310,7 +317,7 @@ Bison was written primarily by Robert Corbett; Richard Stallman made it
|
||||
Yacc-compatible. Wilfred Hansen of Carnegie Mellon University added
|
||||
multicharacter string literals and other features.
|
||||
|
||||
This edition corresponds to version 1.25 of Bison.
|
||||
This edition corresponds to version @value{VERSION} of Bison.
|
||||
|
||||
@node Conditions, Copying, Introduction, Top
|
||||
@unnumbered Conditions for Using Bison
|
||||
@@ -346,7 +353,7 @@ using the other GNU tools.
|
||||
|
||||
@display
|
||||
Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
|
||||
675 Mass Ave, Cambridge, MA 02139, USA
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
@@ -692,7 +699,8 @@ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
@end smallexample
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
@@ -3391,7 +3399,8 @@ for (i = 0; i < YYNTOKENS; i++)
|
||||
@{
|
||||
if (yytname[i] != 0
|
||||
&& yytname[i][0] == '"'
|
||||
&& strncmp (yytname[i] + 1, token_buffer, strlen (token_buffer))
|
||||
&& strncmp (yytname[i] + 1, token_buffer,
|
||||
strlen (token_buffer))
|
||||
&& yytname[i][strlen (token_buffer) + 1] == '"'
|
||||
&& yytname[i][strlen (token_buffer) + 2] == 0)
|
||||
break;
|
||||
@@ -3726,8 +3735,8 @@ struct @{
|
||||
@};
|
||||
@end example
|
||||
|
||||
Thus, to get the starting line number of the third component, use
|
||||
@samp{@@3.first_line}.
|
||||
Thus, to get the starting line number of the third component, you would
|
||||
use @samp{@@3.first_line}.
|
||||
|
||||
In order for the members of this structure to contain valid information,
|
||||
you must make @code{yylex} supply this information about each token.
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
*.gmo
|
||||
ChangeLog
|
||||
Makefile
|
||||
Makefile.in
|
||||
POTFILES
|
||||
bison.pot
|
||||
cat-id-tbl.c
|
||||
stamp-cat-id
|
||||
@@ -0,0 +1,248 @@
|
||||
# Makefile for program source directory in GNU NLS utilities package.
|
||||
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <[email protected]>
|
||||
#
|
||||
# This file file be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU Public License
|
||||
# but which still want to provide support for the GNU gettext functionality.
|
||||
# Please note that the actual code is *not* freely available.
|
||||
|
||||
PACKAGE = @PACKAGE@
|
||||
VERSION = @VERSION@
|
||||
|
||||
SHELL = /bin/sh
|
||||
@SET_MAKE@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
datadir = $(prefix)/@DATADIRNAME@
|
||||
localedir = $(datadir)/locale
|
||||
gnulocaledir = $(prefix)/share/locale
|
||||
gettextsrcdir = $(prefix)/share/gettext/po
|
||||
subdir = po
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@
|
||||
|
||||
CC = @CC@
|
||||
GENCAT = @GENCAT@
|
||||
GMSGFMT = PATH=../src:$$PATH @GMSGFMT@
|
||||
MSGFMT = @MSGFMT@
|
||||
XGETTEXT = PATH=../src:$$PATH @XGETTEXT@
|
||||
MSGMERGE = PATH=../src:$$PATH msgmerge
|
||||
|
||||
DEFS = @DEFS@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
|
||||
INCLUDES = -I.. -I$(top_srcdir)/intl
|
||||
|
||||
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
|
||||
|
||||
SOURCES = cat-id-tbl.c
|
||||
POFILES = @POFILES@
|
||||
GMOFILES = @GMOFILES@
|
||||
DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
|
||||
stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES)
|
||||
|
||||
POTFILES = \
|
||||
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) $<
|
||||
|
||||
.po.pox:
|
||||
$(MAKE) $(PACKAGE).pot
|
||||
$(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
|
||||
|
||||
.po.mo:
|
||||
$(MSGFMT) -o $@ $<
|
||||
|
||||
.po.gmo:
|
||||
file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
|
||||
&& rm -f $$file && $(GMSGFMT) -o $$file $<
|
||||
|
||||
.po.cat:
|
||||
sed -f ../intl/po2msg.sed < $< > $*.msg \
|
||||
&& rm -f $@ && $(GENCAT) $@ $*.msg
|
||||
|
||||
|
||||
all: all-@USE_NLS@
|
||||
|
||||
all-yes: cat-id-tbl.c $(CATALOGS)
|
||||
all-no:
|
||||
|
||||
$(srcdir)/$(PACKAGE).pot: $(POTFILES)
|
||||
$(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
|
||||
--add-comments --keyword=_ --keyword=N_ \
|
||||
--files-from=$(srcdir)/POTFILES.in \
|
||||
&& test ! -f $(PACKAGE).po \
|
||||
|| ( rm -f $(srcdir)/$(PACKAGE).pot \
|
||||
&& mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot )
|
||||
|
||||
$(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
|
||||
$(srcdir)/stamp-cat-id: $(PACKAGE).pot
|
||||
rm -f cat-id-tbl.tmp
|
||||
sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \
|
||||
| sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp
|
||||
if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \
|
||||
rm cat-id-tbl.tmp; \
|
||||
else \
|
||||
echo cat-id-tbl.c changed; \
|
||||
rm -f $(srcdir)/cat-id-tbl.c; \
|
||||
mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \
|
||||
fi
|
||||
cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id
|
||||
|
||||
|
||||
install: install-exec install-data
|
||||
install-exec:
|
||||
install-data: install-data-@USE_NLS@
|
||||
install-data-no: all
|
||||
install-data-yes: all
|
||||
if test -r "$(MKINSTALLDIRS)"; then \
|
||||
$(MKINSTALLDIRS) $(datadir); \
|
||||
else \
|
||||
$(SHELL) $(top_srcdir)/mkinstalldirs $(datadir); \
|
||||
fi
|
||||
@catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
case "$$cat" in \
|
||||
*.gmo) destdir=$(gnulocaledir);; \
|
||||
*) destdir=$(localedir);; \
|
||||
esac; \
|
||||
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
|
||||
dir=$$destdir/$$lang/LC_MESSAGES; \
|
||||
if test -r "$(MKINSTALLDIRS)"; then \
|
||||
$(MKINSTALLDIRS) $$dir; \
|
||||
else \
|
||||
$(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \
|
||||
fi; \
|
||||
if test -r $$cat; then \
|
||||
$(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
|
||||
echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
|
||||
else \
|
||||
$(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
|
||||
echo "installing $(srcdir)/$$cat as" \
|
||||
"$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
|
||||
fi; \
|
||||
if test -r $$cat.m; then \
|
||||
$(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
|
||||
echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
|
||||
else \
|
||||
if test -r $(srcdir)/$$cat.m ; then \
|
||||
$(INSTALL_DATA) $(srcdir)/$$cat.m \
|
||||
$$dir/$(PACKAGE)$(INSTOBJEXT).m; \
|
||||
echo "installing $(srcdir)/$$cat as" \
|
||||
"$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
|
||||
else \
|
||||
true; \
|
||||
fi; \
|
||||
fi; \
|
||||
done
|
||||
if test "$(PACKAGE)" = "gettext"; then \
|
||||
if test -r "$(MKINSTALLDIRS)"; then \
|
||||
$(MKINSTALLDIRS) $(gettextsrcdir); \
|
||||
else \
|
||||
$(SHELL) $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
|
||||
fi; \
|
||||
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
|
||||
$(gettextsrcdir)/Makefile.in.in; \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
|
||||
# Define this as empty until I found a useful application.
|
||||
installcheck:
|
||||
|
||||
uninstall:
|
||||
catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
|
||||
rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
|
||||
rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
|
||||
rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
|
||||
rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
|
||||
done
|
||||
rm -f $(gettextsrcdir)/po-Makefile.in.in
|
||||
|
||||
check: all
|
||||
|
||||
cat-id-tbl.o: ../intl/libgettext.h
|
||||
|
||||
dvi info tags TAGS ID:
|
||||
|
||||
mostlyclean:
|
||||
rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp
|
||||
rm -fr *.o
|
||||
|
||||
clean: mostlyclean
|
||||
|
||||
distclean: clean
|
||||
rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
|
||||
|
||||
maintainer-clean: distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
rm -f $(GMOFILES)
|
||||
|
||||
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
dist distdir: update-po $(DISTFILES)
|
||||
dists="$(DISTFILES)"; \
|
||||
for file in $$dists; do \
|
||||
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|
||||
|| cp -p $(srcdir)/$$file $(distdir); \
|
||||
done
|
||||
|
||||
update-po: Makefile
|
||||
$(MAKE) $(PACKAGE).pot
|
||||
PATH=`pwd`/../src:$$PATH; \
|
||||
cd $(srcdir); \
|
||||
catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
|
||||
mv $$lang.po $$lang.old.po; \
|
||||
echo "$$lang:"; \
|
||||
if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \
|
||||
rm -f $$lang.old.po; \
|
||||
else \
|
||||
echo "msgmerge for $$cat failed!"; \
|
||||
rm -f $$lang.po; \
|
||||
mv $$lang.old.po $$lang.po; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
POTFILES: POTFILES.in
|
||||
( if test 'x$(srcdir)' != 'x.'; then \
|
||||
posrcprefix='$(top_srcdir)/'; \
|
||||
else \
|
||||
posrcprefix="../"; \
|
||||
fi; \
|
||||
rm -f $@-t $@ \
|
||||
&& (sed -e '/^#/d' -e '/^[ ]*$$/d' \
|
||||
-e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
|
||||
| sed -e '$$s/\\$$//') > $@-t \
|
||||
&& chmod a-w $@-t \
|
||||
&& mv $@-t $@ )
|
||||
|
||||
Makefile: Makefile.in.in ../config.status POTFILES
|
||||
cd .. \
|
||||
&& CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
|
||||
$(SHELL) ./config.status
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make not to export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
@@ -0,0 +1,21 @@
|
||||
src/LR0.c
|
||||
src/allocate.c
|
||||
src/closure.c
|
||||
src/conflicts.c
|
||||
src/derives.c
|
||||
# src/files.c
|
||||
src/getargs.c
|
||||
# src/gram.c
|
||||
src/lalr.c
|
||||
src/lex.c
|
||||
src/main.c
|
||||
src/nullable.c
|
||||
src/output.c
|
||||
src/print.c
|
||||
src/reader.c
|
||||
src/reduce.c
|
||||
# src/symtab.c
|
||||
# src/warshall.c
|
||||
|
||||
src/getopt.c
|
||||
src/getopt1.c
|
||||
@@ -0,0 +1,790 @@
|
||||
# German translation for message of GNU bison.
|
||||
# Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
# Ulrich Drepper <[email protected]>, 1996.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: bison 1.25\n"
|
||||
"POT-Creation-Date: 1999-06-14 18:19-0400\n"
|
||||
"PO-Revision-Date: 1996-10-10 17:54 MET DST\n"
|
||||
"Last-Translator: Ulrich Drepper <[email protected]>\n"
|
||||
"Language-Team: German <[email protected]>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=ISO-8859-1\n"
|
||||
"Content-Transfer-Encoding: 8-bit\n"
|
||||
|
||||
#: src/allocate.c:59 src/allocate.c:75
|
||||
#, c-format
|
||||
msgid "%s: memory exhausted\n"
|
||||
msgstr "%s: Hauptspeicher erschöpft\n"
|
||||
|
||||
#: src/closure.c:315
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"FIRSTS\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/closure.c:319
|
||||
#, c-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"%s firsts\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/closure.c:337
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"FDERIVES\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/closure.c:341
|
||||
#, c-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"%s derives\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/conflicts.c:199 src/conflicts.c:223
|
||||
msgid "reduce"
|
||||
msgstr "durch Reduzierung gelöst"
|
||||
|
||||
#: src/conflicts.c:205 src/conflicts.c:219
|
||||
msgid "shift"
|
||||
msgstr "durch Schieben gelöst"
|
||||
|
||||
#: src/conflicts.c:227
|
||||
msgid "an error"
|
||||
msgstr "als Fehler betrachtet"
|
||||
|
||||
#: src/conflicts.c:299
|
||||
#, c-format
|
||||
msgid "Conflict in state %d between rule %d and token %s resolved as %s.\n"
|
||||
msgstr "Konflikt in Zustand %d zwischen Regel %d and Token %s wurde %s.\n"
|
||||
|
||||
#: src/conflicts.c:344
|
||||
#, c-format
|
||||
msgid "State %d contains"
|
||||
msgstr "Zustand %d enthält"
|
||||
|
||||
#: src/conflicts.c:347 src/conflicts.c:392
|
||||
msgid " 1 shift/reduce conflict"
|
||||
msgstr " 1 Schiebe/Reduziere Konflikt"
|
||||
|
||||
#: src/conflicts.c:349 src/conflicts.c:394
|
||||
#, c-format
|
||||
msgid " %d shift/reduce conflicts"
|
||||
msgstr " %d Schiebe/Reduziere Konflikte"
|
||||
|
||||
#: src/conflicts.c:352 src/conflicts.c:397
|
||||
msgid " and"
|
||||
msgstr " und"
|
||||
|
||||
#: src/conflicts.c:355 src/conflicts.c:400
|
||||
msgid " 1 reduce/reduce conflict"
|
||||
msgstr " 1 Reduziere/Reduziere Konflikt"
|
||||
|
||||
#: src/conflicts.c:357 src/conflicts.c:402
|
||||
#, c-format
|
||||
msgid " %d reduce/reduce conflicts"
|
||||
msgstr " %d Reduziere/Reduziere Konflikte"
|
||||
|
||||
#. If invoked under the name `yacc', use the output format
|
||||
#. specified by POSIX.
|
||||
#: src/conflicts.c:378
|
||||
msgid "conflicts: "
|
||||
msgstr "Konflikte: "
|
||||
|
||||
#: src/conflicts.c:380
|
||||
#, c-format
|
||||
msgid " %d shift/reduce"
|
||||
msgstr " %d Schiebe/Reduziere"
|
||||
|
||||
#: src/conflicts.c:384
|
||||
#, c-format
|
||||
msgid " %d reduce/reduce"
|
||||
msgstr " %d Reduziere/Reduziere"
|
||||
|
||||
#: src/conflicts.c:389
|
||||
#, c-format
|
||||
msgid "%s contains"
|
||||
msgstr "%s enthält"
|
||||
|
||||
#: src/conflicts.c:598 src/conflicts.c:712
|
||||
#, c-format
|
||||
msgid " %-4s\t[reduce using rule %d (%s)]\n"
|
||||
msgstr " %-4s\t[reduziere mit Regel %d (%s)]\n"
|
||||
|
||||
#: src/conflicts.c:609 src/print.c:217
|
||||
#, c-format
|
||||
msgid ""
|
||||
" $default\treduce using rule %d (%s)\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
" $default\treduziere mit Regel %d (%s)\n"
|
||||
"\n"
|
||||
|
||||
#: src/conflicts.c:695 src/conflicts.c:707
|
||||
#, c-format
|
||||
msgid " %-4s\treduce using rule %d (%s)\n"
|
||||
msgstr " %-4s\treduziere mit Tegel %d (%s)\n"
|
||||
|
||||
#: src/conflicts.c:733
|
||||
#, c-format
|
||||
msgid " $default\treduce using rule %d (%s)\n"
|
||||
msgstr " $default\treduziere mit Regel %d (%s)\n"
|
||||
|
||||
#: src/derives.c:106
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"DERIVES\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/derives.c:110
|
||||
#, c-format
|
||||
msgid "%s derives"
|
||||
msgstr "%s leitet ab"
|
||||
|
||||
#: src/getargs.c:68
|
||||
#, fuzzy, c-format
|
||||
msgid ""
|
||||
"Usage: %s [-dhklntvyV] [-b file-prefix] [-o outfile] [-p name-prefix]\n"
|
||||
" [--debug] [--defines] [--fixed-output-files] [--no-lines]\n"
|
||||
" [--verbose] [--version] [--help] [--yacc]\n"
|
||||
" [--no-parser] [--token-table]\n"
|
||||
" [--file-prefix=prefix] [--name-prefix=prefix]\n"
|
||||
" [--output=outfile] grammar-file\n"
|
||||
"\n"
|
||||
"Report bugs to [email protected]\n"
|
||||
msgstr ""
|
||||
"Benutzung: %s [-dhklntvyV] [-b Datei-Präfix] [-o Ausgabe-Datei]\n"
|
||||
" [-p Namen-Präfix] [--debug] [--defines] [--fixed-output-files]\n"
|
||||
" [--no-lines] [--verbose] [--version] [--help] [--yacc]\n"
|
||||
" [--no-parser] [--token-table]\n"
|
||||
" [--file-prefix=Präfix] [--name-prefix=Präfix]\n"
|
||||
" [--output=Ausgabe-Datei] Grammatik-Datei\n"
|
||||
|
||||
#: src/getargs.c:161
|
||||
#, c-format
|
||||
msgid "%s: no grammar file given\n"
|
||||
msgstr "%s: keine Grammatik-Datei angegeben\n"
|
||||
|
||||
#: src/getargs.c:165
|
||||
#, c-format
|
||||
msgid "%s: extra arguments ignored after '%s'\n"
|
||||
msgstr "%s: zusätzliche Argumente nach »%s« werden ignoriert\n"
|
||||
|
||||
#: src/lalr.c:294
|
||||
msgid "gotos"
|
||||
msgstr "»goto« Anweisungen"
|
||||
|
||||
#: src/lex.c:119
|
||||
msgid "unexpected `/' found and ignored"
|
||||
msgstr "»/« wird hier nicht erwartet und wird deshalb ignoriert"
|
||||
|
||||
#: src/lex.c:148 src/reader.c:1105 src/reader.c:1330
|
||||
msgid "unterminated comment"
|
||||
msgstr "unbeendeter Kommentar"
|
||||
|
||||
#: src/lex.c:176
|
||||
msgid "Unexpected end of file"
|
||||
msgstr "Datei endet unerwartet"
|
||||
|
||||
# Oder soll man den Begriff "Escapezeichen" verwenden?
|
||||
#: src/lex.c:197
|
||||
msgid "unescaped newline in constant"
|
||||
msgstr "nicht maskiertes Zeilenendezeichen in Konstante"
|
||||
|
||||
#: src/lex.c:229
|
||||
#, c-format
|
||||
msgid "octal value outside range 0...255: `\\%o'"
|
||||
msgstr "oktaler Zahlenwert außerhalb des Bereichs 0...255: »\\%o«"
|
||||
|
||||
#: src/lex.c:253
|
||||
#, c-format
|
||||
msgid "hexadecimal value above 255: `\\x%x'"
|
||||
msgstr "hexadezimaler Zahlenwert größer als 255: »\\x%x«"
|
||||
|
||||
#: src/lex.c:263
|
||||
#, c-format
|
||||
msgid "unknown escape sequence: `\\' followed by `%s'"
|
||||
msgstr "unbekanntes Fluchtzeichen: »\\« gefolgt von »%s«"
|
||||
|
||||
#: src/lex.c:396
|
||||
msgid "use \"...\" for multi-character literal tokens"
|
||||
msgstr "für Literal mit mehreren Zeichen bitte \"...\" verwenden"
|
||||
|
||||
#: src/lex.c:475
|
||||
msgid "unterminated type name at end of file"
|
||||
msgstr "unerwarteter Typname am Ende der Datei"
|
||||
|
||||
#: src/lex.c:478
|
||||
msgid "unterminated type name"
|
||||
msgstr "unerwarteter Typname"
|
||||
|
||||
#: src/main.c:152
|
||||
#, fuzzy, c-format
|
||||
msgid "%s: fatal error: "
|
||||
msgstr "fataler Fehler: %s\n"
|
||||
|
||||
#: src/main.c:154
|
||||
#, fuzzy, c-format
|
||||
msgid "%s:%d: fatal error: "
|
||||
msgstr "fataler Fehler: %s\n"
|
||||
|
||||
#: src/main.c:185
|
||||
#, c-format
|
||||
msgid "%s: "
|
||||
msgstr ""
|
||||
|
||||
#: src/main.c:187
|
||||
#, c-format
|
||||
msgid "%s:%d: "
|
||||
msgstr ""
|
||||
|
||||
#: src/main.c:252
|
||||
#, c-format
|
||||
msgid "too many %s (max %d)"
|
||||
msgstr ""
|
||||
|
||||
#: src/main.c:262
|
||||
#, fuzzy, c-format
|
||||
msgid "%s: internal error: %s\n"
|
||||
msgstr "interner Fehler, %s\n"
|
||||
|
||||
#: src/nullable.c:55
|
||||
msgid "Entering set_nullable"
|
||||
msgstr "Führe »set_nullable« aus"
|
||||
|
||||
#: src/output.c:1190
|
||||
#, c-format
|
||||
msgid "maximum table size (%s) exceeded"
|
||||
msgstr "maximale Tabellengröße (%s) überschritten"
|
||||
|
||||
#: src/print.c:85
|
||||
#, c-format
|
||||
msgid " type %d is %s\n"
|
||||
msgstr " Typ %d ist %s\n"
|
||||
|
||||
#: src/print.c:92
|
||||
#, c-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"state %d\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Zustand %d\n"
|
||||
"\n"
|
||||
|
||||
#: src/print.c:136
|
||||
#, c-format
|
||||
msgid " (rule %d)"
|
||||
msgstr " (Regel %d)"
|
||||
|
||||
#: src/print.c:163
|
||||
msgid " $default\taccept\n"
|
||||
msgstr " $default\takzeptiere\n"
|
||||
|
||||
#: src/print.c:165
|
||||
msgid " NO ACTIONS\n"
|
||||
msgstr " KEINE AKTIONEN\n"
|
||||
|
||||
#. I.e. strcmp(tags[symbol],"$")==0
|
||||
#: src/print.c:181
|
||||
#, c-format
|
||||
msgid " $ \tgo to state %d\n"
|
||||
msgstr " $ \tgehe zu Zustand %d über\n"
|
||||
|
||||
#: src/print.c:183
|
||||
#, c-format
|
||||
msgid " %-4s\tshift, and go to state %d\n"
|
||||
msgstr " %-4s\tSchiebe und gehe zu Zustand %d über\n"
|
||||
|
||||
#: src/print.c:206
|
||||
#, c-format
|
||||
msgid " %-4s\terror (nonassociative)\n"
|
||||
msgstr " %-4s\tFehler (nicht assoziativ)\n"
|
||||
|
||||
#: src/print.c:232
|
||||
#, c-format
|
||||
msgid " %-4s\tgo to state %d\n"
|
||||
msgstr " %-4s\tgehe zu Zustand %d über\n"
|
||||
|
||||
#. rule # : LHS -> RHS
|
||||
#: src/print.c:253
|
||||
msgid ""
|
||||
"\n"
|
||||
"Grammar\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Grammatik\n"
|
||||
|
||||
#: src/print.c:258
|
||||
#, c-format
|
||||
msgid "rule %-4d %s ->"
|
||||
msgstr "Regel %-4d %s ->"
|
||||
|
||||
#: src/print.c:264
|
||||
msgid "\t\t/* empty */"
|
||||
msgstr "\t\t/* leer */"
|
||||
|
||||
#. TERMINAL (type #) : rule #s terminal is on RHS
|
||||
#: src/print.c:269
|
||||
msgid ""
|
||||
"\n"
|
||||
"Terminals, with rules where they appear\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Terminale und die Regeln un denen sie verwendet werden\n"
|
||||
"\n"
|
||||
|
||||
#: src/print.c:317
|
||||
msgid ""
|
||||
"\n"
|
||||
"Nonterminals, with rules where they appear\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Nicht-Terminal und die Regeln in denen sie verwendet werden\n"
|
||||
"\n"
|
||||
|
||||
#: src/print.c:343
|
||||
msgid " on left:"
|
||||
msgstr " auf der linken Seite:"
|
||||
|
||||
#: src/print.c:358
|
||||
msgid " on right:"
|
||||
msgstr " auf der rechten Seite:"
|
||||
|
||||
#: src/reader.c:145
|
||||
msgid " Skipping to next \\n"
|
||||
msgstr " Überspringe Zeichen bis zum nächsten \\n"
|
||||
|
||||
#: src/reader.c:147
|
||||
#, c-format
|
||||
msgid " Skipping to next %c"
|
||||
msgstr " Überspringe Zeichen bis zum nächten %c"
|
||||
|
||||
#: src/reader.c:323
|
||||
#, c-format
|
||||
msgid "unrecognized: %s"
|
||||
msgstr "unbekannt: %s"
|
||||
|
||||
#: src/reader.c:328
|
||||
msgid "no input grammar"
|
||||
msgstr "keine Eingabe-Grammatik"
|
||||
|
||||
#: src/reader.c:332
|
||||
#, c-format
|
||||
msgid "unknown character: %s"
|
||||
msgstr "unbekanntes Zeichen: %s"
|
||||
|
||||
#: src/reader.c:381 src/reader.c:396 src/reader.c:1041 src/reader.c:1273
|
||||
msgid "unterminated string at end of file"
|
||||
msgstr "unbeendete Zeichenkette am Ende der Datei"
|
||||
|
||||
#: src/reader.c:384 src/reader.c:1044 src/reader.c:1056 src/reader.c:1267
|
||||
#: src/reader.c:1281
|
||||
msgid "unterminated string"
|
||||
msgstr "unbeendete Zeichenkette"
|
||||
|
||||
#: src/reader.c:445
|
||||
msgid "unterminated comment in `%{' definition"
|
||||
msgstr "unbeendeter Kommentar in »%{« Definition"
|
||||
|
||||
#: src/reader.c:456
|
||||
msgid "unterminated `%{' definition"
|
||||
msgstr "unbeendete »%{« Definition"
|
||||
|
||||
#: src/reader.c:534 src/reader.c:755
|
||||
#, c-format
|
||||
msgid "symbol %s redefined"
|
||||
msgstr "Symbol %s noch einmal definiert"
|
||||
|
||||
#: src/reader.c:544 src/reader.c:700 src/reader.c:762 src/reader.c:1804
|
||||
#, c-format
|
||||
msgid "type redeclaration for %s"
|
||||
msgstr "erneute Deklaration des Typs für %s"
|
||||
|
||||
#: src/reader.c:554
|
||||
#, c-format
|
||||
msgid "`%s' is invalid in %s"
|
||||
msgstr "»%s« ist in %s nicht erlaubt"
|
||||
|
||||
#: src/reader.c:602
|
||||
#, c-format
|
||||
msgid "unrecognized item %s, expected an identifier"
|
||||
msgstr "unerwartetes Symbol %s, hier wird ein Bezeichner erwartet"
|
||||
|
||||
#: src/reader.c:624
|
||||
#, c-format
|
||||
msgid "expected string constant instead of %s"
|
||||
msgstr "hier wird eine Zeichenkette erwartet, nicht %s"
|
||||
|
||||
#: src/reader.c:646
|
||||
#, c-format
|
||||
msgid "multiple %start declarations"
|
||||
msgstr "mehr als eine %start Deklaration"
|
||||
|
||||
#: src/reader.c:648
|
||||
#, c-format
|
||||
msgid "invalid %start declaration"
|
||||
msgstr "ungültige %start Deklaration"
|
||||
|
||||
#: src/reader.c:668
|
||||
msgid "%type declaration has no <typename>"
|
||||
msgstr "%type Deklaration hat keinen <Typ-Namen>"
|
||||
|
||||
#: src/reader.c:705
|
||||
msgid "invalid %%type declaration due to item: `%s'"
|
||||
msgstr "ungültige %%type Deklaration wegen »%s«"
|
||||
|
||||
#: src/reader.c:751
|
||||
#, c-format
|
||||
msgid "redefining precedence of %s"
|
||||
msgstr "Stellenwertigkeit von %s wird erneut definiert"
|
||||
|
||||
#: src/reader.c:774
|
||||
#, c-format
|
||||
msgid "invalid text (%s) - number should be after identifier"
|
||||
msgstr "unzulässiger Text (%s) - Nummer sollte nach Bezeichner kommen"
|
||||
|
||||
#: src/reader.c:784
|
||||
#, c-format
|
||||
msgid "unexpected item: %s"
|
||||
msgstr "unerwartetes Symbol: %s"
|
||||
|
||||
#: src/reader.c:808
|
||||
#, c-format
|
||||
msgid "multiple %union declarations"
|
||||
msgstr "erneute %union Definition"
|
||||
|
||||
#: src/reader.c:866
|
||||
msgid "unterminated comment at end of file"
|
||||
msgstr "unbeendeter Kommentar am Dateiende"
|
||||
|
||||
#: src/reader.c:892
|
||||
msgid "unmatched close-brace (`}')"
|
||||
msgstr "schließende geschweifte Klammer (»}«) hat kein Gegenstück"
|
||||
|
||||
#: src/reader.c:936
|
||||
#, c-format
|
||||
msgid "argument of %expect is not an integer"
|
||||
msgstr "Argument von %expect ist keine ganze Zahl"
|
||||
|
||||
#: src/reader.c:947
|
||||
msgid "invalid $ value"
|
||||
msgstr "unzulässiger $ Wert"
|
||||
|
||||
#: src/reader.c:1027
|
||||
msgid "unmatched right brace (`}')"
|
||||
msgstr "schließende geschweifte Klammer (»}«) hat kein Gegenstück"
|
||||
|
||||
#: src/reader.c:1143 src/reader.c:1368
|
||||
#, c-format
|
||||
msgid "$$ of `%s' has no declared type"
|
||||
msgstr "$$ von »%s« hat keine deklarierten Wert"
|
||||
|
||||
#: src/reader.c:1159 src/reader.c:1383
|
||||
#, c-format
|
||||
msgid "$%s of `%s' has no declared type"
|
||||
msgstr "»%s« von »%s« hat keine deklarierten Wert"
|
||||
|
||||
#: src/reader.c:1163 src/reader.c:1388
|
||||
#, c-format
|
||||
msgid "$%s is invalid"
|
||||
msgstr "$%s ist unzulässig"
|
||||
|
||||
#: src/reader.c:1177
|
||||
#, c-format
|
||||
msgid "@%s is invalid"
|
||||
msgstr "@%s ist unzulässig"
|
||||
|
||||
#: src/reader.c:1187
|
||||
msgid "unterminated %%guard clause"
|
||||
msgstr "unbeendeter %%guard Fall"
|
||||
|
||||
#: src/reader.c:1402
|
||||
msgid "invalid @-construct"
|
||||
msgstr "unzulässig @-Konstruktion"
|
||||
|
||||
#: src/reader.c:1412
|
||||
msgid "unmatched `{'"
|
||||
msgstr "»{« hat kein Gegenstück"
|
||||
|
||||
#: src/reader.c:1498
|
||||
msgid "ill-formed rule: initial symbol not followed by colon"
|
||||
msgstr ""
|
||||
"falsch geformte Regel: führendes Symbol wird nicht von einem Semikolon "
|
||||
"gefolgt"
|
||||
|
||||
#: src/reader.c:1505
|
||||
msgid "grammar starts with vertical bar"
|
||||
msgstr "Grammatik fängt mit einem vertikalen Strich (»|«) an"
|
||||
|
||||
#: src/reader.c:1536
|
||||
#, c-format
|
||||
msgid "rule given for %s, which is a token"
|
||||
msgstr "Regel für %s vorhanden, welches aber ein Token ist"
|
||||
|
||||
#: src/reader.c:1634
|
||||
msgid "two @prec's in a row"
|
||||
msgstr "zwei @prec Anweisungen nacheinander"
|
||||
|
||||
#: src/reader.c:1642
|
||||
msgid "%%guard present but %%semantic_parser not specified"
|
||||
msgstr ""
|
||||
"%%guard Anweisung vorhanden, jedoch wird %%semantic_parser nicht angegeben"
|
||||
|
||||
#. This case never occurs -wjh
|
||||
#: src/reader.c:1650
|
||||
msgid "two actions at end of one rule"
|
||||
msgstr "Zwei Aktionen am Ende einer Regel"
|
||||
|
||||
#: src/reader.c:1662
|
||||
#, c-format
|
||||
msgid "type clash (`%s' `%s') on default action"
|
||||
msgstr "Typkonflikt (»%s« »%s«) bei Default Aktion"
|
||||
|
||||
#: src/reader.c:1668
|
||||
msgid "empty rule for typed nonterminal, and no action"
|
||||
msgstr "leere Regel für Nicht-Terminal vmit Typ und keine Aktion"
|
||||
|
||||
#: src/reader.c:1712
|
||||
#, c-format
|
||||
msgid "invalid input: %s"
|
||||
msgstr "ungültige Eingabe: %s"
|
||||
|
||||
#: src/reader.c:1720
|
||||
#, c-format
|
||||
msgid "too many symbols (tokens plus nonterminals); maximum %s"
|
||||
msgstr "zu viele Symbols (Token plus Nicht-Terminal); Maximum %s"
|
||||
|
||||
#: src/reader.c:1723
|
||||
msgid "no rules in the input grammar"
|
||||
msgstr "Eingabegrammatik enthält keine Regeln"
|
||||
|
||||
#: src/reader.c:1741
|
||||
#, c-format
|
||||
msgid "symbol %s is used, but is not defined as a token and has no rules"
|
||||
msgstr ""
|
||||
"Symbol %s wird benutzt, ist aber nicht als Token definiert und hat keine "
|
||||
"Regel"
|
||||
|
||||
#: src/reader.c:1780
|
||||
msgid "ill-formed %type declaration"
|
||||
msgstr "falsch geformte %type Deklaration"
|
||||
|
||||
#: src/reader.c:1859
|
||||
#, c-format
|
||||
msgid "conflicting precedences for %s and %s"
|
||||
msgstr "Vorrangwertigkeiten für %s und %s widersprechen sich"
|
||||
|
||||
#: src/reader.c:1868
|
||||
#, c-format
|
||||
msgid "conflicting assoc values for %s and %s"
|
||||
msgstr "assoc Werte für %s nd %s widersprechen sich"
|
||||
|
||||
#: src/reader.c:1915
|
||||
#, c-format
|
||||
msgid "tokens %s and %s both assigned number %s"
|
||||
msgstr "Token %s und %s haben die selbe nummer %s"
|
||||
|
||||
#: src/reader.c:1929
|
||||
#, c-format
|
||||
msgid "the start symbol %s is undefined"
|
||||
msgstr "das Startsymbol %s ist undefiniert"
|
||||
|
||||
#: src/reader.c:1931
|
||||
#, c-format
|
||||
msgid "the start symbol %s is a token"
|
||||
msgstr "das Startsymbol %s ist ein Token"
|
||||
|
||||
#: src/reduce.c:141
|
||||
#, c-format
|
||||
msgid "Start symbol %s does not derive any sentence"
|
||||
msgstr "es lassen sich keine Sätze vom Startsymbol %s ableiten"
|
||||
|
||||
#: src/reduce.c:154
|
||||
#, c-format
|
||||
msgid ""
|
||||
"reduced %s defines %d terminal%s, %d nonterminal%s, and %d production%s.\n"
|
||||
msgstr ""
|
||||
"Reduzierung von %s definiert %d Terminal, %d Nicht-Terminal und %d "
|
||||
"Produktionen.\n"
|
||||
|
||||
#: src/reduce.c:492
|
||||
msgid ""
|
||||
"Useless nonterminals:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Nutzlose Nicht-Terminale:\n"
|
||||
"\n"
|
||||
|
||||
#: src/reduce.c:504
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Terminals which are not used:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Nicht genutzte Terminale:\n"
|
||||
"\n"
|
||||
|
||||
#: src/reduce.c:513
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Useless rules:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Ungenutzte Regeln:\n"
|
||||
"\n"
|
||||
|
||||
#: src/reduce.c:541
|
||||
msgid ""
|
||||
"Variables\n"
|
||||
"---------\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Variablen\n"
|
||||
"---------\n"
|
||||
"\n"
|
||||
|
||||
#: src/reduce.c:542
|
||||
msgid "Value Sprec Sassoc Tag\n"
|
||||
msgstr "Wert Sprec Sassoc Tag\n"
|
||||
|
||||
#: src/reduce.c:547
|
||||
msgid ""
|
||||
"Rules\n"
|
||||
"-----\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Regeln\n"
|
||||
"------\n"
|
||||
"\n"
|
||||
|
||||
#: src/reduce.c:557
|
||||
msgid ""
|
||||
"Rules interpreted\n"
|
||||
"-----------------\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"interpretierete Regeln\n"
|
||||
"----------------------\n"
|
||||
"\n"
|
||||
|
||||
#: src/reduce.c:573
|
||||
#, c-format
|
||||
msgid "%d rules never reduced\n"
|
||||
msgstr "%d wurde niemals reduziert\n"
|
||||
|
||||
#: src/reduce.c:575
|
||||
#, c-format
|
||||
msgid "%s contains "
|
||||
msgstr "%s enthält "
|
||||
|
||||
#: src/reduce.c:579
|
||||
#, c-format
|
||||
msgid "%d useless nonterminal%s"
|
||||
msgstr "%d ungenutzte Nicht-Terminal"
|
||||
|
||||
#: src/reduce.c:584
|
||||
msgid " and "
|
||||
msgstr " und "
|
||||
|
||||
#: src/reduce.c:588
|
||||
#, c-format
|
||||
msgid "%d useless rule%s"
|
||||
msgstr "%d ungenutzte Regel"
|
||||
|
||||
#: src/getopt.c:680
|
||||
#, c-format
|
||||
msgid "%s: option `%s' is ambiguous\n"
|
||||
msgstr "%s: die Option »%s« ist nicht eindeutig\n"
|
||||
|
||||
#: src/getopt.c:704
|
||||
#, c-format
|
||||
msgid "%s: option `--%s' doesn't allow an argument\n"
|
||||
msgstr "%s: die Option »--%s« erlaubt kein Argument\n"
|
||||
|
||||
#: src/getopt.c:709
|
||||
#, c-format
|
||||
msgid "%s: option `%c%s' doesn't allow an argument\n"
|
||||
msgstr "%s: die Option »%c%s« erlaubt kein Argument\n"
|
||||
|
||||
#: src/getopt.c:726 src/getopt.c:899
|
||||
#, c-format
|
||||
msgid "%s: option `%s' requires an argument\n"
|
||||
msgstr "%s: die Option »%s« erfordert ein Argument\n"
|
||||
|
||||
#. --option
|
||||
#: src/getopt.c:755
|
||||
#, c-format
|
||||
msgid "%s: unrecognized option `--%s'\n"
|
||||
msgstr "%s: unbekannte Option »--%s«\n"
|
||||
|
||||
#. +option or -option
|
||||
#: src/getopt.c:759
|
||||
#, c-format
|
||||
msgid "%s: unrecognized option `%c%s'\n"
|
||||
msgstr "%s: unbekannte Option »%c%s«\n"
|
||||
|
||||
#. 1003.2 specifies the format of this message.
|
||||
#: src/getopt.c:785
|
||||
#, c-format
|
||||
msgid "%s: illegal option -- %c\n"
|
||||
msgstr "%s: die Option ist nicht erlaubt -- %c\n"
|
||||
|
||||
#: src/getopt.c:788
|
||||
#, c-format
|
||||
msgid "%s: invalid option -- %c\n"
|
||||
msgstr "%s: ungültige Option -- %c\n"
|
||||
|
||||
#. 1003.2 specifies the format of this message.
|
||||
#: src/getopt.c:818 src/getopt.c:948
|
||||
#, c-format
|
||||
msgid "%s: option requires an argument -- %c\n"
|
||||
msgstr "%s: die Option benötigt ein Argument -- %c\n"
|
||||
|
||||
#: src/getopt.c:865
|
||||
#, fuzzy, c-format
|
||||
msgid "%s: option `-W %s' is ambiguous\n"
|
||||
msgstr "%s: die Option »%s« ist nicht eindeutig\n"
|
||||
|
||||
#: src/getopt.c:883
|
||||
#, fuzzy, c-format
|
||||
msgid "%s: option `-W %s' doesn't allow an argument\n"
|
||||
msgstr "%s: die Option »--%s« erlaubt kein Argument\n"
|
||||
|
||||
#~ msgid "\"%s\", line %d: %s\n"
|
||||
#~ msgstr "»%s«, Zeile %d: %s\n"
|
||||
|
||||
#~ msgid "error: %s\n"
|
||||
#~ msgstr "Fehler: %s\n"
|
||||
|
||||
#~ msgid "(\"%s\", line %d) error: %s\n"
|
||||
#~ msgstr "(»%s«, Zeile %d) Fehler: %s\n"
|
||||
|
||||
#~ msgid "limit of %d exceeded, too many %s"
|
||||
#~ msgstr "Grenze von %d erreicht, zu viele %s"
|
||||
@@ -0,0 +1,969 @@
|
||||
# Mensajes en español para GNU Bison.
|
||||
# Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
# Nicolás García-Pedrajas <[email protected]>, 1998.
|
||||
#
|
||||
# Corregido por:
|
||||
#
|
||||
# cll - Carlos Linares López [email protected]
|
||||
# [email protected]
|
||||
#
|
||||
# Notas:
|
||||
#
|
||||
# 1. Nicolás, en algunas ocasiones notarás que algunos `msgstr' no están
|
||||
# indentados como los `msgid'. No te preocupes, eso es porque yo utilizo
|
||||
# el `po-mode' de Emacs, ... Él es el responsable de esas indentaciones
|
||||
# del `msgstr' :)
|
||||
#
|
||||
# 2. Todos los comentarios que contengan "Duda:" debieran revisarse.
|
||||
#
|
||||
# --------------------------------------------------------------------
|
||||
# En mi opinión has hecho un excelente trabajo y te animo a que sigas
|
||||
# manteniendo esta traducción y a que lo intentes con otras.
|
||||
#
|
||||
# (¡te lo dice el tío que ha traducido el paquete más grande: 1406
|
||||
# mensajes en el clisp!)
|
||||
#
|
||||
# Carlos Linares
|
||||
# --------------------------------------------------------------------
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: GNU bison 1.25\n"
|
||||
"POT-Creation-Date: 1999-06-14 18:19-0400\n"
|
||||
"PO-Revision-Date: 1998-09-21 10:19+0200\n"
|
||||
"Last-Translator: Nicolás García-Pedrajas <[email protected]>\n"
|
||||
"Language-Team: Spanish <[email protected]>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=ISO-8859-1\n"
|
||||
"Content-Transfer-Encoding: 8-bit\n"
|
||||
|
||||
#: src/allocate.c:59 src/allocate.c:75
|
||||
#, c-format
|
||||
msgid "%s: memory exhausted\n"
|
||||
msgstr "%s: memoria agotada\n"
|
||||
|
||||
# ¿Por qué no lo pones en mayúsculas? Al fin y al cabo, eso es lo que
|
||||
# haces luego con "FDERIVES" que traduces como "FDERIVACIONES", ... -
|
||||
# cll
|
||||
# ok
|
||||
# ngp
|
||||
#
|
||||
#: src/closure.c:315
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"FIRSTS\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"PRIMEROS\n"
|
||||
"\n"
|
||||
|
||||
#: src/closure.c:319
|
||||
#, c-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"%s firsts\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"%s primeros\n"
|
||||
"\n"
|
||||
|
||||
#: src/closure.c:337
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"FDERIVES\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"FDERIVACIONES\n"
|
||||
|
||||
#: src/closure.c:341
|
||||
#, c-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"%s derives\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"%s deriva\n"
|
||||
|
||||
#: src/conflicts.c:199 src/conflicts.c:223
|
||||
msgid "reduce"
|
||||
msgstr "reduce"
|
||||
|
||||
#: src/conflicts.c:205 src/conflicts.c:219
|
||||
msgid "shift"
|
||||
msgstr "desplaza"
|
||||
|
||||
#: src/conflicts.c:227
|
||||
msgid "an error"
|
||||
msgstr "un error"
|
||||
|
||||
#: src/conflicts.c:299
|
||||
#, c-format
|
||||
msgid "Conflict in state %d between rule %d and token %s resolved as %s.\n"
|
||||
msgstr ""
|
||||
"El conflicto en el estado %s entre la regla %d y el terminal %s se resuelve "
|
||||
"como %s.\n"
|
||||
|
||||
#: src/conflicts.c:344
|
||||
#, c-format
|
||||
msgid "State %d contains"
|
||||
msgstr "El estado %d contiene"
|
||||
|
||||
#: src/conflicts.c:347 src/conflicts.c:392
|
||||
msgid " 1 shift/reduce conflict"
|
||||
msgstr " 1 conflicto desplazamiento/reducción"
|
||||
|
||||
#: src/conflicts.c:349 src/conflicts.c:394
|
||||
#, c-format
|
||||
msgid " %d shift/reduce conflicts"
|
||||
msgstr " %d conflictos desplazamiento/reducción"
|
||||
|
||||
#: src/conflicts.c:352 src/conflicts.c:397
|
||||
msgid " and"
|
||||
msgstr " y"
|
||||
|
||||
#: src/conflicts.c:355 src/conflicts.c:400
|
||||
msgid " 1 reduce/reduce conflict"
|
||||
msgstr " 1 conflicto reducción/reducción"
|
||||
|
||||
#: src/conflicts.c:357 src/conflicts.c:402
|
||||
#, c-format
|
||||
msgid " %d reduce/reduce conflicts"
|
||||
msgstr " %d conflictos reducción/reducción"
|
||||
|
||||
#. If invoked under the name `yacc', use the output format
|
||||
#. specified by POSIX.
|
||||
#: src/conflicts.c:378
|
||||
msgid "conflicts: "
|
||||
msgstr "conflictos: "
|
||||
|
||||
# Date cuenta de que `%d' puede ser cualquier número decimal. Podría
|
||||
# ocurrir, por lo tanto, que tu mensaje en ejecución se vea luego como:
|
||||
#
|
||||
# 23845789243789 desplazamiento/reducción
|
||||
#
|
||||
# (¡estoy exagerando!, por supuesto :)
|
||||
#
|
||||
# Te sugiero por lo tanto que añadas el caso (s) tal y como se hace en
|
||||
# español habitualmente.
|
||||
# ok
|
||||
# ngp
|
||||
#
|
||||
#: src/conflicts.c:380
|
||||
#, c-format
|
||||
msgid " %d shift/reduce"
|
||||
msgstr " %d desplazamiento(s)/reducción(ones)"
|
||||
|
||||
# Date cuenta de que `%d' puede ser cualquier número decimal. Podría
|
||||
# ocurrir, por lo tanto, que tu mensaje en ejecución se vea luego como:
|
||||
#
|
||||
# 23845789243789 reducción/reducción
|
||||
#
|
||||
# (¡estoy exagerando!, por supuesto :)
|
||||
#
|
||||
# Te sugiero por lo tanto que añadas el caso (s) tal y como se hace en
|
||||
# español habitualmente.
|
||||
#
|
||||
# ok
|
||||
# ngp
|
||||
#: src/conflicts.c:384
|
||||
#, c-format
|
||||
msgid " %d reduce/reduce"
|
||||
msgstr " %d reducción(ones)/reducción(ones)"
|
||||
|
||||
#: src/conflicts.c:389
|
||||
#, c-format
|
||||
msgid "%s contains"
|
||||
msgstr "%s contiene"
|
||||
|
||||
#: src/conflicts.c:598 src/conflicts.c:712
|
||||
#, c-format
|
||||
msgid " %-4s\t[reduce using rule %d (%s)]\n"
|
||||
msgstr " %-4s\t[reduce usando la regla %d (%s)]\n"
|
||||
|
||||
#: src/conflicts.c:609 src/print.c:217
|
||||
#, c-format
|
||||
msgid ""
|
||||
" $default\treduce using rule %d (%s)\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
" $default\treduce usando la regla %d (%s)\n"
|
||||
"\n"
|
||||
|
||||
#: src/conflicts.c:695 src/conflicts.c:707
|
||||
#, c-format
|
||||
msgid " %-4s\treduce using rule %d (%s)\n"
|
||||
msgstr " %-4s\treduce usando la regla %d (%s)\n"
|
||||
|
||||
#: src/conflicts.c:733
|
||||
#, c-format
|
||||
msgid " $default\treduce using rule %d (%s)\n"
|
||||
msgstr " $default\treduce usando la regla %d (%s)\n"
|
||||
|
||||
#: src/derives.c:106
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"DERIVES\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"DERIVACIONES\n"
|
||||
|
||||
#: src/derives.c:110
|
||||
#, c-format
|
||||
msgid "%s derives"
|
||||
msgstr "%s deriva"
|
||||
|
||||
#: src/getargs.c:68
|
||||
#, fuzzy, c-format
|
||||
msgid ""
|
||||
"Usage: %s [-dhklntvyV] [-b file-prefix] [-o outfile] [-p name-prefix]\n"
|
||||
" [--debug] [--defines] [--fixed-output-files] [--no-lines]\n"
|
||||
" [--verbose] [--version] [--help] [--yacc]\n"
|
||||
" [--no-parser] [--token-table]\n"
|
||||
" [--file-prefix=prefix] [--name-prefix=prefix]\n"
|
||||
" [--output=outfile] grammar-file\n"
|
||||
"\n"
|
||||
"Report bugs to [email protected]\n"
|
||||
msgstr ""
|
||||
"Uso: %s [-dhklntvyV] [-b prefijo-ficheros] [-o fichero-salida] [-p "
|
||||
"prefijo-nombres]\n"
|
||||
" [--debug] [--defines] [--fixed-output-files] [--no-lines]\n"
|
||||
" [--verbose] [--version] [--help] [--yacc]\n"
|
||||
" [--no-parser] [--token-table]\n"
|
||||
" [--file-prefix=prefijo] [--name-prefix=prefijo]\n"
|
||||
" [--output=fichero-salida ] fichero-de-gramática\n"
|
||||
|
||||
# Me parece menos "computadora" decir "ningún fichero de gramática" - cll
|
||||
#
|
||||
#: src/getargs.c:161
|
||||
#, c-format
|
||||
msgid "%s: no grammar file given\n"
|
||||
msgstr "%s: no se ha especificado ningún fichero de gramática\n"
|
||||
|
||||
# Ignorar es no saber, to ignore es no hacer caso, que no es lo mismo. sv
|
||||
#: src/getargs.c:165
|
||||
#, c-format
|
||||
msgid "%s: extra arguments ignored after '%s'\n"
|
||||
msgstr "%s: los argumentos extra después de '%s' no se tendrán en cuenta\n"
|
||||
|
||||
# Duda: desconozco en qué caso se emplea esto. Estúdialo bien y
|
||||
# comprueba que realmente es necesario emplear una palabra no
|
||||
# española. Recuerda que el acuerdo que existe en la lista de correo en
|
||||
# español es, en el peor de los casos, poner algo en español y luego en
|
||||
# inglés a modo de recordatorio. Por ejemplo: "tubería (pipe)" - cll
|
||||
#
|
||||
# miré el código, lo que indica es el número de gotos del código
|
||||
# ngp
|
||||
#
|
||||
#: src/lalr.c:294
|
||||
msgid "gotos"
|
||||
msgstr "saltos (gotos)"
|
||||
|
||||
# to ignore no es ignorar. Pon otra cosa, please. sv
|
||||
#: src/lex.c:119
|
||||
msgid "unexpected `/' found and ignored"
|
||||
msgstr "se ha encontrado `/' cuando no se esperaba, no se tendrán en cuenta"
|
||||
|
||||
#: src/lex.c:148 src/reader.c:1105 src/reader.c:1330
|
||||
msgid "unterminated comment"
|
||||
msgstr "comentario sin terminar"
|
||||
|
||||
#: src/lex.c:176
|
||||
msgid "Unexpected end of file"
|
||||
msgstr "Fin de fichero inesperado"
|
||||
|
||||
# ¿unescaped?
|
||||
#: src/lex.c:197
|
||||
msgid "unescaped newline in constant"
|
||||
msgstr "salto de línea en constante sin secuencia de escape"
|
||||
|
||||
#: src/lex.c:229
|
||||
#, c-format
|
||||
msgid "octal value outside range 0...255: `\\%o'"
|
||||
msgstr "valor octal fuera del rango 0...255: `\\%o'"
|
||||
|
||||
#: src/lex.c:253
|
||||
#, c-format
|
||||
msgid "hexadecimal value above 255: `\\x%x'"
|
||||
msgstr "valor hexadecimal mayor que 255: `\\x%x'"
|
||||
|
||||
#: src/lex.c:263
|
||||
#, c-format
|
||||
msgid "unknown escape sequence: `\\' followed by `%s'"
|
||||
msgstr "secuencia de escape desconocida: `\\' seguido de `%s'"
|
||||
|
||||
# ¿multicarácter o multicaracteres? sv
|
||||
#: src/lex.c:396
|
||||
msgid "use \"...\" for multi-character literal tokens"
|
||||
msgstr "use \"...\" para terminales literales multicarácter"
|
||||
|
||||
#: src/lex.c:475
|
||||
msgid "unterminated type name at end of file"
|
||||
msgstr "nombre de tipo sin terminar al final del fichero"
|
||||
|
||||
#: src/lex.c:478
|
||||
msgid "unterminated type name"
|
||||
msgstr "nombre de tipo sin terminar"
|
||||
|
||||
# Duda: desconozco cuál será el convenio en la lista de correo a
|
||||
# propósito de "fatal". Por favor, comprueba que "error grave" es
|
||||
# preferido por todos los miembros a "error fatal" - cll
|
||||
# veremos que dice la mayoría, como hay otros 2 revisores
|
||||
# La verdad es que a mi lo de error fatal me suena fatal
|
||||
# ngp
|
||||
#
|
||||
#: src/main.c:152
|
||||
#, fuzzy, c-format
|
||||
msgid "%s: fatal error: "
|
||||
msgstr "error grave: %s\n"
|
||||
|
||||
# Duda: desconozco cuál será el convenio en la lista de correo a
|
||||
# propósito de "fatal". Por favor, comprueba que "error grave" es
|
||||
# preferido por todos los miembros a "error fatal" - cll
|
||||
# veremos que dice la mayoría, como hay otros 2 revisores
|
||||
# La verdad es que a mi lo de error fatal me suena fatal
|
||||
# ngp
|
||||
#
|
||||
#: src/main.c:154
|
||||
#, fuzzy, c-format
|
||||
msgid "%s:%d: fatal error: "
|
||||
msgstr "error grave: %s\n"
|
||||
|
||||
#: src/main.c:185
|
||||
#, c-format
|
||||
msgid "%s: "
|
||||
msgstr ""
|
||||
|
||||
#: src/main.c:187
|
||||
#, c-format
|
||||
msgid "%s:%d: "
|
||||
msgstr ""
|
||||
|
||||
#: src/main.c:252
|
||||
#, c-format
|
||||
msgid "too many %s (max %d)"
|
||||
msgstr ""
|
||||
|
||||
#: src/main.c:262
|
||||
#, fuzzy, c-format
|
||||
msgid "%s: internal error: %s\n"
|
||||
msgstr "error interno, %s\n"
|
||||
|
||||
#: src/nullable.c:55
|
||||
msgid "Entering set_nullable"
|
||||
msgstr "Entrando set_nullable"
|
||||
|
||||
# Únicamente cambio la posición del adjetivo `máximo'. En vez de después
|
||||
# de `tabla', después de `tamaño' - cll
|
||||
# en inglés era así, pero quizás en español sea mejor como dices
|
||||
# ngp
|
||||
#
|
||||
#: src/output.c:1190
|
||||
#, c-format
|
||||
msgid "maximum table size (%s) exceeded"
|
||||
msgstr "excedido el tamaño máximo de la tabla (%s)"
|
||||
|
||||
#: src/print.c:85
|
||||
#, c-format
|
||||
msgid " type %d is %s\n"
|
||||
msgstr " el tipo %d es %s\n"
|
||||
|
||||
#: src/print.c:92
|
||||
#, c-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"state %d\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"estado %d\n"
|
||||
"\n"
|
||||
|
||||
#: src/print.c:136
|
||||
#, c-format
|
||||
msgid " (rule %d)"
|
||||
msgstr " (regla %d)"
|
||||
|
||||
#: src/print.c:163
|
||||
msgid " $default\taccept\n"
|
||||
msgstr " $default\taceptar\n"
|
||||
|
||||
#: src/print.c:165
|
||||
msgid " NO ACTIONS\n"
|
||||
msgstr " SIN ACCIONES\n"
|
||||
|
||||
#. I.e. strcmp(tags[symbol],"$")==0
|
||||
#: src/print.c:181
|
||||
#, c-format
|
||||
msgid " $ \tgo to state %d\n"
|
||||
msgstr " $ \tir al estado %d\n"
|
||||
|
||||
#: src/print.c:183
|
||||
#, c-format
|
||||
msgid " %-4s\tshift, and go to state %d\n"
|
||||
msgstr " %-4s\tdesplazar e ir al estado %d\n"
|
||||
|
||||
#: src/print.c:206
|
||||
#, c-format
|
||||
msgid " %-4s\terror (nonassociative)\n"
|
||||
msgstr " %-4s\terror (no asociativo)\n"
|
||||
|
||||
#: src/print.c:232
|
||||
#, c-format
|
||||
msgid " %-4s\tgo to state %d\n"
|
||||
msgstr " %-4s\tir al estado %d\n"
|
||||
|
||||
#. rule # : LHS -> RHS
|
||||
#: src/print.c:253
|
||||
msgid ""
|
||||
"\n"
|
||||
"Grammar\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Gramática\n"
|
||||
|
||||
#: src/print.c:258
|
||||
#, c-format
|
||||
msgid "rule %-4d %s ->"
|
||||
msgstr "regla %-4d %s ->"
|
||||
|
||||
# Duda: ¿Estás seguro de que no será `vacío'? Si no lo estás o, si por
|
||||
# el contrario, pudiera cualquiera de los casos, debieras traducirlo
|
||||
# como `vacía/o' - cll
|
||||
# según el código indica reglas vacías por eso lo puse así
|
||||
# ngp
|
||||
#: src/print.c:264
|
||||
msgid "\t\t/* empty */"
|
||||
msgstr "\t\t/* vacía */"
|
||||
|
||||
#. TERMINAL (type #) : rule #s terminal is on RHS
|
||||
#: src/print.c:269
|
||||
msgid ""
|
||||
"\n"
|
||||
"Terminals, with rules where they appear\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Terminales con las reglas donde aparecen\n"
|
||||
"\n"
|
||||
|
||||
#: src/print.c:317
|
||||
msgid ""
|
||||
"\n"
|
||||
"Nonterminals, with rules where they appear\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"No terminales con las reglas donde aparecen\n"
|
||||
|
||||
#: src/print.c:343
|
||||
msgid " on left:"
|
||||
msgstr " en la izquierda:"
|
||||
|
||||
#: src/print.c:358
|
||||
msgid " on right:"
|
||||
msgstr " en la derecha:"
|
||||
|
||||
#: src/reader.c:145
|
||||
msgid " Skipping to next \\n"
|
||||
msgstr " Saltando al siguiente \\n"
|
||||
|
||||
#: src/reader.c:147
|
||||
#, c-format
|
||||
msgid " Skipping to next %c"
|
||||
msgstr " Saltando al siguiente %c"
|
||||
|
||||
#: src/reader.c:323
|
||||
#, c-format
|
||||
msgid "unrecognized: %s"
|
||||
msgstr "no reconocido: %s"
|
||||
|
||||
#: src/reader.c:328
|
||||
msgid "no input grammar"
|
||||
msgstr "no hay gramática de entrada"
|
||||
|
||||
#: src/reader.c:332
|
||||
#, c-format
|
||||
msgid "unknown character: %s"
|
||||
msgstr "carácter desconocido: %s"
|
||||
|
||||
#: src/reader.c:381 src/reader.c:396 src/reader.c:1041 src/reader.c:1273
|
||||
msgid "unterminated string at end of file"
|
||||
msgstr "cadena sin terminar al final del fichero"
|
||||
|
||||
#: src/reader.c:384 src/reader.c:1044 src/reader.c:1056 src/reader.c:1267
|
||||
#: src/reader.c:1281
|
||||
msgid "unterminated string"
|
||||
msgstr "cadena sin terminar"
|
||||
|
||||
#: src/reader.c:445
|
||||
msgid "unterminated comment in `%{' definition"
|
||||
msgstr "comentario sin terminar en la definición `%{'"
|
||||
|
||||
#: src/reader.c:456
|
||||
msgid "unterminated `%{' definition"
|
||||
msgstr "definición `%{' sin terminar"
|
||||
|
||||
#: src/reader.c:534 src/reader.c:755
|
||||
#, c-format
|
||||
msgid "symbol %s redefined"
|
||||
msgstr "redefinido el símbolo %s"
|
||||
|
||||
#: src/reader.c:544 src/reader.c:700 src/reader.c:762 src/reader.c:1804
|
||||
#, c-format
|
||||
msgid "type redeclaration for %s"
|
||||
msgstr "redeclaración del tipo de %s"
|
||||
|
||||
#: src/reader.c:554
|
||||
#, c-format
|
||||
msgid "`%s' is invalid in %s"
|
||||
msgstr "`%s' no es válido en %s"
|
||||
|
||||
# No te recomiendo que emplees participios para expresar acciones (¡si
|
||||
# me oyera mi antigua profesora de lengua, lloraría de emoción! :). En
|
||||
# vez de eso, emplea las conjugaciones habituales, que para eso están :)
|
||||
# - cll
|
||||
# ok - ngp
|
||||
#
|
||||
#: src/reader.c:602
|
||||
#, c-format
|
||||
msgid "unrecognized item %s, expected an identifier"
|
||||
msgstr "no se reconoce el ítem %s, se esperaba un identificador"
|
||||
|
||||
#: src/reader.c:624
|
||||
#, c-format
|
||||
msgid "expected string constant instead of %s"
|
||||
msgstr "se esperaba una cadena constante en lugar de %s"
|
||||
|
||||
#: src/reader.c:646
|
||||
#, c-format
|
||||
msgid "multiple %start declarations"
|
||||
msgstr "múltiples declaraciones de %start"
|
||||
|
||||
#: src/reader.c:648
|
||||
#, c-format
|
||||
msgid "invalid %start declaration"
|
||||
msgstr "declaración de %start no válida"
|
||||
|
||||
#: src/reader.c:668
|
||||
msgid "%type declaration has no <typename>"
|
||||
msgstr "la declaración %type no tiene <nombre-tipo>"
|
||||
|
||||
#: src/reader.c:705
|
||||
msgid "invalid %%type declaration due to item: `%s'"
|
||||
msgstr "declaración de %%type no válida debido al ítem: `%s'"
|
||||
|
||||
#: src/reader.c:751
|
||||
#, c-format
|
||||
msgid "redefining precedence of %s"
|
||||
msgstr "redefinición de la precedencia de %s"
|
||||
|
||||
# Una corrección menor: en realidad, `should' es el pasado y condicional
|
||||
# de "to must" y aquí se emplea en su forma condicional. Por eso, he
|
||||
# cambiado `debe' por `debería' - cll
|
||||
# ahí me has pillado en un olvido del inglés - ngp
|
||||
#: src/reader.c:774
|
||||
#, c-format
|
||||
msgid "invalid text (%s) - number should be after identifier"
|
||||
msgstr ""
|
||||
"texto no válido (%s) - el número debería estar después del identificador"
|
||||
|
||||
# En unas ocasiones, has traducido `unexpected' como `no esperado' y, en
|
||||
# otras, como `inesperado'. Cualquiera es correcta, por supuesto y, en
|
||||
# este caso, la segunda me parece más apropiada - cll
|
||||
# ok - ngp
|
||||
#: src/reader.c:784
|
||||
#, c-format
|
||||
msgid "unexpected item: %s"
|
||||
msgstr "ítem inesperado: %s"
|
||||
|
||||
#: src/reader.c:808
|
||||
#, c-format
|
||||
msgid "multiple %union declarations"
|
||||
msgstr "declaraciones múltiples de %union"
|
||||
|
||||
#: src/reader.c:866
|
||||
msgid "unterminated comment at end of file"
|
||||
msgstr "comentario sin terminar al final del fichero"
|
||||
|
||||
#: src/reader.c:892
|
||||
msgid "unmatched close-brace (`}')"
|
||||
msgstr "llave de cierre (`}') desemparejada"
|
||||
|
||||
#: src/reader.c:936
|
||||
#, c-format
|
||||
msgid "argument of %expect is not an integer"
|
||||
msgstr "el argumento de %expect no es un entero"
|
||||
|
||||
#: src/reader.c:947
|
||||
msgid "invalid $ value"
|
||||
msgstr "valor $ no válido"
|
||||
|
||||
#: src/reader.c:1027
|
||||
msgid "unmatched right brace (`}')"
|
||||
msgstr "llave derecha (`}') desemparejada"
|
||||
|
||||
#: src/reader.c:1143 src/reader.c:1368
|
||||
#, c-format
|
||||
msgid "$$ of `%s' has no declared type"
|
||||
msgstr "$$ de `%s' no tiene tipo declarado"
|
||||
|
||||
#: src/reader.c:1159 src/reader.c:1383
|
||||
#, c-format
|
||||
msgid "$%s of `%s' has no declared type"
|
||||
msgstr "$%s de `%s' no tiene tipo declarado"
|
||||
|
||||
#: src/reader.c:1163 src/reader.c:1388
|
||||
#, c-format
|
||||
msgid "$%s is invalid"
|
||||
msgstr "$%s no es válida"
|
||||
|
||||
#: src/reader.c:1177
|
||||
#, c-format
|
||||
msgid "@%s is invalid"
|
||||
msgstr "@%s no es válido"
|
||||
|
||||
# Tal vez pueda parecer pedante, pero `inconclusa' me suena muchísimo
|
||||
# mejor que `sin terminar' que me parece más "computerizado" - cll
|
||||
# quizás un poco cacofónico lo de claúsula inconclusa - ngp
|
||||
#
|
||||
#: src/reader.c:1187
|
||||
msgid "unterminated %%guard clause"
|
||||
msgstr "cláusula %%guard sin terminar"
|
||||
|
||||
# Duda: ¿`construct' no se refiere a `construcción'? Si es así, el
|
||||
# mensaje debiera ser "@-construcción no válida" - cll
|
||||
# O incluso "construcción @" sv
|
||||
# en ese caso supongo que sería @-construction ngp
|
||||
#: src/reader.c:1402
|
||||
msgid "invalid @-construct"
|
||||
msgstr "@-constructo no válido"
|
||||
|
||||
# Cambio el orden y el sexo. Ahora está "en español". sv
|
||||
#: src/reader.c:1412
|
||||
msgid "unmatched `{'"
|
||||
msgstr "`{' desemparejada"
|
||||
|
||||
#: src/reader.c:1498
|
||||
msgid "ill-formed rule: initial symbol not followed by colon"
|
||||
msgstr "regla mal formada: el símbolo inicial no está seguido por :"
|
||||
|
||||
#: src/reader.c:1505
|
||||
msgid "grammar starts with vertical bar"
|
||||
msgstr "la gramática comienza con una barra vertical"
|
||||
|
||||
#: src/reader.c:1536
|
||||
#, c-format
|
||||
msgid "rule given for %s, which is a token"
|
||||
msgstr "se ha dado una regla para %s, que es un terminal"
|
||||
|
||||
#: src/reader.c:1634
|
||||
msgid "two @prec's in a row"
|
||||
msgstr "dos @prec en una línea"
|
||||
|
||||
# Insisto, el empleo de participios a secas me parece como hablar en
|
||||
# indio. Por favor, permíteme que añada un "está" :) - cll
|
||||
# ok - ngp
|
||||
#: src/reader.c:1642
|
||||
msgid "%%guard present but %%semantic_parser not specified"
|
||||
msgstr "%%guard presente pero %%semantic_parser está sin especificar"
|
||||
|
||||
#. This case never occurs -wjh
|
||||
#: src/reader.c:1650
|
||||
msgid "two actions at end of one rule"
|
||||
msgstr "dos acciones al final de una regla"
|
||||
|
||||
#: src/reader.c:1662
|
||||
#, c-format
|
||||
msgid "type clash (`%s' `%s') on default action"
|
||||
msgstr "los tipos (`%s' `%s') no concuerdan en la acción por defecto"
|
||||
|
||||
#: src/reader.c:1668
|
||||
msgid "empty rule for typed nonterminal, and no action"
|
||||
msgstr "regla vacía para un no terminal con tipo y no hay ninguna acción"
|
||||
|
||||
#: src/reader.c:1712
|
||||
#, c-format
|
||||
msgid "invalid input: %s"
|
||||
msgstr "entrada no válida: %s"
|
||||
|
||||
#: src/reader.c:1720
|
||||
#, c-format
|
||||
msgid "too many symbols (tokens plus nonterminals); maximum %s"
|
||||
msgstr "demasiados símbolos (terminales y no terminales); máximo %s"
|
||||
|
||||
#: src/reader.c:1723
|
||||
msgid "no rules in the input grammar"
|
||||
msgstr "no hay reglas en la gramática de entrada"
|
||||
|
||||
# `token' se debe traducir como `literal' - cll
|
||||
# en terminología de compiladores token es más un terminal - ngp
|
||||
#
|
||||
#: src/reader.c:1741
|
||||
#, c-format
|
||||
msgid "symbol %s is used, but is not defined as a token and has no rules"
|
||||
msgstr ""
|
||||
"se usa el símbolo %s, pero no está definido como terminal y no tiene reglas"
|
||||
|
||||
#: src/reader.c:1780
|
||||
msgid "ill-formed %type declaration"
|
||||
msgstr "declaración %type incorrectamente formada"
|
||||
|
||||
#: src/reader.c:1859
|
||||
#, c-format
|
||||
msgid "conflicting precedences for %s and %s"
|
||||
msgstr "precedencias en conflicto entre %s y %s"
|
||||
|
||||
#: src/reader.c:1868
|
||||
#, c-format
|
||||
msgid "conflicting assoc values for %s and %s"
|
||||
msgstr "conflicto de valores assoc para %s y %s"
|
||||
|
||||
#: src/reader.c:1915
|
||||
#, c-format
|
||||
msgid "tokens %s and %s both assigned number %s"
|
||||
msgstr "los terminales %s y %s tienen asignados ambos el número %s"
|
||||
|
||||
#: src/reader.c:1929
|
||||
#, c-format
|
||||
msgid "the start symbol %s is undefined"
|
||||
msgstr "el símbolo de inicio (axioma) %s no está definido"
|
||||
|
||||
#: src/reader.c:1931
|
||||
#, c-format
|
||||
msgid "the start symbol %s is a token"
|
||||
msgstr "el símbolo de inicio (axioma) %s es un terminal"
|
||||
|
||||
#: src/reduce.c:141
|
||||
#, c-format
|
||||
msgid "Start symbol %s does not derive any sentence"
|
||||
msgstr "El símbolo de inicio (axioma) %s no deriva ninguna sentencia"
|
||||
|
||||
# ¡¡No sé cómo resolver el problema!!
|
||||
#
|
||||
# Como corrector, me veo obligado a hacer una corrección ¡¡a tu comentario!!:
|
||||
#
|
||||
# ¡¡No sé cómo resolver el problema!!
|
||||
#
|
||||
# Esto es: `cómo' va acentuado y, además, `problema' podría ser hebreo,
|
||||
# pero no español - cll
|
||||
#
|
||||
# Te recomiendo `la reducción de %s' en vez de seguir el estilo inglés y
|
||||
# usar participios - cll
|
||||
# un error lo tiene cualquiera - ngp
|
||||
#: src/reduce.c:154
|
||||
#, c-format
|
||||
msgid ""
|
||||
"reduced %s defines %d terminal%s, %d nonterminal%s, and %d production%s.\n"
|
||||
msgstr ""
|
||||
"la reducción de %s define %d terminal%s, %d no terminal%s, y %d "
|
||||
"produccion%s.\n"
|
||||
|
||||
#: src/reduce.c:492
|
||||
msgid ""
|
||||
"Useless nonterminals:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"No terminales sin uso:\n"
|
||||
"\n"
|
||||
|
||||
#: src/reduce.c:504
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Terminals which are not used:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Terminales que no se usan:\n"
|
||||
"\n"
|
||||
|
||||
#: src/reduce.c:513
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Useless rules:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Reglas sin uso:\n"
|
||||
"\n"
|
||||
|
||||
#: src/reduce.c:541
|
||||
msgid ""
|
||||
"Variables\n"
|
||||
"---------\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Variables\n"
|
||||
"---------\n"
|
||||
"\n"
|
||||
|
||||
#: src/reduce.c:542
|
||||
msgid "Value Sprec Sassoc Tag\n"
|
||||
msgstr "Valor Sprec Sasoc Tag\n"
|
||||
|
||||
#: src/reduce.c:547
|
||||
msgid ""
|
||||
"Rules\n"
|
||||
"-----\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Reglas\n"
|
||||
"------\n"
|
||||
"\n"
|
||||
|
||||
#: src/reduce.c:557
|
||||
msgid ""
|
||||
"Rules interpreted\n"
|
||||
"-----------------\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Reglas interpretadas\n"
|
||||
"--------------------\n"
|
||||
"\n"
|
||||
|
||||
#: src/reduce.c:573
|
||||
#, c-format
|
||||
msgid "%d rules never reduced\n"
|
||||
msgstr "%d reglas que nunca se han reducido\n"
|
||||
|
||||
#: src/reduce.c:575
|
||||
#, c-format
|
||||
msgid "%s contains "
|
||||
msgstr "%s contiene "
|
||||
|
||||
#: src/reduce.c:579
|
||||
#, c-format
|
||||
msgid "%d useless nonterminal%s"
|
||||
msgstr "%d no terminales %s sin uso"
|
||||
|
||||
#: src/reduce.c:584
|
||||
msgid " and "
|
||||
msgstr " y "
|
||||
|
||||
#: src/reduce.c:588
|
||||
#, c-format
|
||||
msgid "%d useless rule%s"
|
||||
msgstr "%d regla%s sin uso"
|
||||
|
||||
#: src/getopt.c:680
|
||||
#, c-format
|
||||
msgid "%s: option `%s' is ambiguous\n"
|
||||
msgstr "%s: la opción `%s' es ambigua\n"
|
||||
|
||||
# Pongo esto como en otros .po. sv
|
||||
#: src/getopt.c:704
|
||||
#, c-format
|
||||
msgid "%s: option `--%s' doesn't allow an argument\n"
|
||||
msgstr "%s: la opción `--%s' no admite ningún argumento\n"
|
||||
|
||||
#: src/getopt.c:709
|
||||
#, c-format
|
||||
msgid "%s: option `%c%s' doesn't allow an argument\n"
|
||||
msgstr "%s: la opción `%c%s' no admite ningún argumento\n"
|
||||
|
||||
#: src/getopt.c:726 src/getopt.c:899
|
||||
#, c-format
|
||||
msgid "%s: option `%s' requires an argument\n"
|
||||
msgstr "%s: la opción `%s' requiere un argumento\n"
|
||||
|
||||
#. --option
|
||||
#: src/getopt.c:755
|
||||
#, c-format
|
||||
msgid "%s: unrecognized option `--%s'\n"
|
||||
msgstr "%s: opción `--%s' no reconocida\n"
|
||||
|
||||
#. +option or -option
|
||||
#: src/getopt.c:759
|
||||
#, c-format
|
||||
msgid "%s: unrecognized option `%c%s'\n"
|
||||
msgstr "%s: opción `%c%s' no reconocida\n"
|
||||
|
||||
# ¿Qué encuentras de malo en traducir `illegal' como `ilegal'? Date
|
||||
# cuenta de que el mensaje "opción no válida" parece ambigua y hará
|
||||
# pensar al usuario de que tal vez la ha usado incorrectamente, sin
|
||||
# reparar, por lo tanto, en que la opción misma es ilegal. Esto es, ¡¡no
|
||||
# existe!! (porque imagino que es en este sentido como se ha programado)
|
||||
# - cll
|
||||
# Sobre esto hubo una discusión en la lista hace tiempo,
|
||||
# quizás ilegal queda un poco fuerte, alguien decía que parecía que
|
||||
# ibas a ir a la carcel por usar la opción.
|
||||
# ngp
|
||||
#
|
||||
# Sí, era Enrique a quien no le gustaba la palabra.
|
||||
# No creo que debamos dejar de decir algo por la "corrección política"
|
||||
# Yo creo que si el 386 tiene instrucciones *ilegales*, también puede
|
||||
# haber opciones ilegales, digo yo, y no por eso las CPUs van
|
||||
# a la cárcel (como mucho se cuelgan, je, je, 0ff0 :-). sv
|
||||
#
|
||||
#. 1003.2 specifies the format of this message.
|
||||
#: src/getopt.c:785
|
||||
#, c-format
|
||||
msgid "%s: illegal option -- %c\n"
|
||||
msgstr "%s: opción -- %c ilegal\n"
|
||||
|
||||
# ¡Muy bien traducido! En el grupo de traducción ha habido auténticas
|
||||
# batallas con el tema "invalid - inválido/a" :) - cll
|
||||
# Porque Enrique decía que le recordaba a disminuidos físicos.
|
||||
# Francamente, no creo que haya que andar con estas "fobias".
|
||||
# Pongo inválida. sv
|
||||
#: src/getopt.c:788
|
||||
#, c-format
|
||||
msgid "%s: invalid option -- %c\n"
|
||||
msgstr "%s: opción -- %c inválida\n"
|
||||
|
||||
#. 1003.2 specifies the format of this message.
|
||||
#: src/getopt.c:818 src/getopt.c:948
|
||||
#, c-format
|
||||
msgid "%s: option requires an argument -- %c\n"
|
||||
msgstr "%s: la opción -- %c requiere un argumento\n"
|
||||
|
||||
#: src/getopt.c:865
|
||||
#, fuzzy, c-format
|
||||
msgid "%s: option `-W %s' is ambiguous\n"
|
||||
msgstr "%s: la opción `%s' es ambigua\n"
|
||||
|
||||
# Pongo esto como en otros .po. sv
|
||||
#: src/getopt.c:883
|
||||
#, fuzzy, c-format
|
||||
msgid "%s: option `-W %s' doesn't allow an argument\n"
|
||||
msgstr "%s: la opción `--%s' no admite ningún argumento\n"
|
||||
|
||||
#~ msgid "\"%s\", line %d: %s\n"
|
||||
#~ msgstr "\"%s\", línea %d: %s\n"
|
||||
|
||||
#~ msgid "error: %s\n"
|
||||
#~ msgstr "error: %s\n"
|
||||
|
||||
#~ msgid "(\"%s\", line %d) error: %s\n"
|
||||
#~ msgstr "(\"%s\", línea %d) error: %s\n"
|
||||
|
||||
# OJO: Si quieres cambiar el orden, puedes hacerlo, pero el manual
|
||||
# de gettext dice cómo ha de hacerse, no de cualquier manera. sv
|
||||
#~ msgid "limit of %d exceeded, too many %s"
|
||||
#~ msgstr "excedido el límite de %d, demasiados %s"
|
||||
@@ -0,0 +1,811 @@
|
||||
# Messages français pour Bison.
|
||||
# Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
# Dominique Boucher <[email protected]>, 1996.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: bison 1.25\n"
|
||||
"POT-Creation-Date: 1999-06-14 18:19-0400\n"
|
||||
"PO-Revision-Date: 1996-03-19 20:05 EST\n"
|
||||
"Last-Translator: Dominique Boucher <[email protected]>\n"
|
||||
"Language-Team: French <[email protected]>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=ISO-8859-1\n"
|
||||
"Content-Transfer-Encoding: 8-bit\n"
|
||||
|
||||
#: src/allocate.c:59 src/allocate.c:75
|
||||
#, c-format
|
||||
msgid "%s: memory exhausted\n"
|
||||
msgstr "%s: mémoire épuisée\n"
|
||||
|
||||
#: src/closure.c:315
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"FIRSTS\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"FIRSTS\n"
|
||||
"\n"
|
||||
|
||||
#: src/closure.c:319
|
||||
#, c-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"%s firsts\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"%s firsts\n"
|
||||
"\n"
|
||||
|
||||
#: src/closure.c:337
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"FDERIVES\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"FDERIVES\n"
|
||||
|
||||
#: src/closure.c:341
|
||||
#, c-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"%s derives\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"%s derives\n"
|
||||
"\n"
|
||||
|
||||
#: src/conflicts.c:199 src/conflicts.c:223
|
||||
msgid "reduce"
|
||||
msgstr "réduction"
|
||||
|
||||
#: src/conflicts.c:205 src/conflicts.c:219
|
||||
msgid "shift"
|
||||
msgstr "décalage"
|
||||
|
||||
#: src/conflicts.c:227
|
||||
msgid "an error"
|
||||
msgstr "une erreur"
|
||||
|
||||
#: src/conflicts.c:299
|
||||
#, c-format
|
||||
msgid "Conflict in state %d between rule %d and token %s resolved as %s.\n"
|
||||
msgstr ""
|
||||
"Conflit à l'état %d entre la règle %d et le terminal %s résolu par %s.\n"
|
||||
|
||||
#: src/conflicts.c:344
|
||||
#, c-format
|
||||
msgid "State %d contains"
|
||||
msgstr "L'état %d contient"
|
||||
|
||||
#: src/conflicts.c:347 src/conflicts.c:392
|
||||
msgid " 1 shift/reduce conflict"
|
||||
msgstr " 1 conflit décalage/réduction"
|
||||
|
||||
#: src/conflicts.c:349 src/conflicts.c:394
|
||||
#, c-format
|
||||
msgid " %d shift/reduce conflicts"
|
||||
msgstr " %d conflits décalage/réduction"
|
||||
|
||||
#: src/conflicts.c:352 src/conflicts.c:397
|
||||
msgid " and"
|
||||
msgstr " et"
|
||||
|
||||
#: src/conflicts.c:355 src/conflicts.c:400
|
||||
msgid " 1 reduce/reduce conflict"
|
||||
msgstr "1 conflit réduction/réduction"
|
||||
|
||||
#: src/conflicts.c:357 src/conflicts.c:402
|
||||
#, c-format
|
||||
msgid " %d reduce/reduce conflicts"
|
||||
msgstr " %d conflits réduction/réduction"
|
||||
|
||||
#. If invoked under the name `yacc', use the output format
|
||||
#. specified by POSIX.
|
||||
#: src/conflicts.c:378
|
||||
msgid "conflicts: "
|
||||
msgstr "conflits: "
|
||||
|
||||
#: src/conflicts.c:380
|
||||
#, c-format
|
||||
msgid " %d shift/reduce"
|
||||
msgstr " %d décalage/réduction"
|
||||
|
||||
#: src/conflicts.c:384
|
||||
#, c-format
|
||||
msgid " %d reduce/reduce"
|
||||
msgstr " %d réduction/réduction"
|
||||
|
||||
#: src/conflicts.c:389
|
||||
#, c-format
|
||||
msgid "%s contains"
|
||||
msgstr "%s contient"
|
||||
|
||||
#: src/conflicts.c:598 src/conflicts.c:712
|
||||
#, c-format
|
||||
msgid " %-4s\t[reduce using rule %d (%s)]\n"
|
||||
msgstr " %-4s\t[réduction par la règle %d (%s)\n"
|
||||
|
||||
#: src/conflicts.c:609 src/print.c:217
|
||||
#, c-format
|
||||
msgid ""
|
||||
" $default\treduce using rule %d (%s)\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
" $défaut\tréduction par la règle %d (%s)\n"
|
||||
"\n"
|
||||
|
||||
#: src/conflicts.c:695 src/conflicts.c:707
|
||||
#, c-format
|
||||
msgid " %-4s\treduce using rule %d (%s)\n"
|
||||
msgstr " %-4s\tréduction par la règle %d (%s)\n"
|
||||
|
||||
#: src/conflicts.c:733
|
||||
#, c-format
|
||||
msgid " $default\treduce using rule %d (%s)\n"
|
||||
msgstr " $défaut\tréduction par la règle %d (%s)\n"
|
||||
|
||||
#: src/derives.c:106
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"DERIVES\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"DERIVES\n"
|
||||
"\n"
|
||||
|
||||
#: src/derives.c:110
|
||||
#, c-format
|
||||
msgid "%s derives"
|
||||
msgstr "%s dérive"
|
||||
|
||||
#: src/getargs.c:68
|
||||
#, fuzzy, c-format
|
||||
msgid ""
|
||||
"Usage: %s [-dhklntvyV] [-b file-prefix] [-o outfile] [-p name-prefix]\n"
|
||||
" [--debug] [--defines] [--fixed-output-files] [--no-lines]\n"
|
||||
" [--verbose] [--version] [--help] [--yacc]\n"
|
||||
" [--no-parser] [--token-table]\n"
|
||||
" [--file-prefix=prefix] [--name-prefix=prefix]\n"
|
||||
" [--output=outfile] grammar-file\n"
|
||||
"\n"
|
||||
"Report bugs to [email protected]\n"
|
||||
msgstr ""
|
||||
"Usage: %s [-dhklntvyV] [-b préfixe-de-fichier] [-o sortie] [-p "
|
||||
"préfixe-de-nom]\n"
|
||||
" [--debug] [--defines] [--fixed-output-files] [--no-lines]\n"
|
||||
" [--verbose] [--version] [--help] [--yacc]\n"
|
||||
" [--no-parser] [--token-table]\n"
|
||||
" [--file-prefix=préfixe] [--name-prefix=préfixe]\n"
|
||||
" [--output=outfile] grammaire\n"
|
||||
|
||||
#: src/getargs.c:161
|
||||
#, c-format
|
||||
msgid "%s: no grammar file given\n"
|
||||
msgstr "%s: grammaire manquante\n"
|
||||
|
||||
#: src/getargs.c:165
|
||||
#, c-format
|
||||
msgid "%s: extra arguments ignored after '%s'\n"
|
||||
msgstr "%s: paramètres supplémentaires ignorés après «%s»\n"
|
||||
|
||||
#: src/lalr.c:294
|
||||
msgid "gotos"
|
||||
msgstr "gotos"
|
||||
|
||||
#: src/lex.c:119
|
||||
msgid "unexpected `/' found and ignored"
|
||||
msgstr "`/' inattendu et ignoré"
|
||||
|
||||
#: src/lex.c:148 src/reader.c:1105 src/reader.c:1330
|
||||
msgid "unterminated comment"
|
||||
msgstr "le commentaire ne se termine pas"
|
||||
|
||||
#: src/lex.c:176
|
||||
msgid "Unexpected end of file"
|
||||
msgstr "Fin de fichier inattendue"
|
||||
|
||||
#: src/lex.c:197
|
||||
msgid "unescaped newline in constant"
|
||||
msgstr "retour de chariot sans échappement dans une constante"
|
||||
|
||||
#: src/lex.c:229
|
||||
#, c-format
|
||||
msgid "octal value outside range 0...255: `\\%o'"
|
||||
msgstr "valeur octale à l'extérieur de l'intervalle 0...255: \\%o"
|
||||
|
||||
#: src/lex.c:253
|
||||
#, c-format
|
||||
msgid "hexadecimal value above 255: `\\x%x'"
|
||||
msgstr "valeur hexadécimale supérieure à 255: \\x%x"
|
||||
|
||||
#: src/lex.c:263
|
||||
#, c-format
|
||||
msgid "unknown escape sequence: `\\' followed by `%s'"
|
||||
msgstr "séquence d'échappement inconnue: `\\' suivie de `%s'"
|
||||
|
||||
#: src/lex.c:396
|
||||
msgid "use \"...\" for multi-character literal tokens"
|
||||
msgstr "utilisez \"...\" pour les terminaux litéraux de plusieurs caractères"
|
||||
|
||||
#: src/lex.c:475
|
||||
msgid "unterminated type name at end of file"
|
||||
msgstr "le nom de type ne se termine pas avant la fin de fichier"
|
||||
|
||||
#: src/lex.c:478
|
||||
msgid "unterminated type name"
|
||||
msgstr "le nom de type ne se termine pas"
|
||||
|
||||
#: src/main.c:152
|
||||
#, fuzzy, c-format
|
||||
msgid "%s: fatal error: "
|
||||
msgstr "erreur fatale: %s\n"
|
||||
|
||||
#: src/main.c:154
|
||||
#, fuzzy, c-format
|
||||
msgid "%s:%d: fatal error: "
|
||||
msgstr "erreur fatale: %s\n"
|
||||
|
||||
#: src/main.c:185
|
||||
#, c-format
|
||||
msgid "%s: "
|
||||
msgstr ""
|
||||
|
||||
#: src/main.c:187
|
||||
#, c-format
|
||||
msgid "%s:%d: "
|
||||
msgstr ""
|
||||
|
||||
#: src/main.c:252
|
||||
#, c-format
|
||||
msgid "too many %s (max %d)"
|
||||
msgstr ""
|
||||
|
||||
#: src/main.c:262
|
||||
#, fuzzy, c-format
|
||||
msgid "%s: internal error: %s\n"
|
||||
msgstr "erreur interne, %s\n"
|
||||
|
||||
#: src/nullable.c:55
|
||||
msgid "Entering set_nullable"
|
||||
msgstr "Entré dans set_nullable"
|
||||
|
||||
#: src/output.c:1190
|
||||
#, c-format
|
||||
msgid "maximum table size (%s) exceeded"
|
||||
msgstr "taille maximum des tables (%s) dépassée"
|
||||
|
||||
#: src/print.c:85
|
||||
#, c-format
|
||||
msgid " type %d is %s\n"
|
||||
msgstr " le type %d est %s\n"
|
||||
|
||||
#: src/print.c:92
|
||||
#, c-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"state %d\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"état %d\n"
|
||||
"\n"
|
||||
|
||||
#: src/print.c:136
|
||||
#, c-format
|
||||
msgid " (rule %d)"
|
||||
msgstr " (règle %d)"
|
||||
|
||||
#: src/print.c:163
|
||||
msgid " $default\taccept\n"
|
||||
msgstr " $défaut\taccepter\n"
|
||||
|
||||
#: src/print.c:165
|
||||
msgid " NO ACTIONS\n"
|
||||
msgstr " PAS D'ACTION\n"
|
||||
|
||||
#. I.e. strcmp(tags[symbol],"$")==0
|
||||
#: src/print.c:181
|
||||
#, c-format
|
||||
msgid " $ \tgo to state %d\n"
|
||||
msgstr " $ \taller à l'état %d\n"
|
||||
|
||||
#: src/print.c:183
|
||||
#, c-format
|
||||
msgid " %-4s\tshift, and go to state %d\n"
|
||||
msgstr " %-4s\tdécalage et aller à l'état %d\n"
|
||||
|
||||
#: src/print.c:206
|
||||
#, c-format
|
||||
msgid " %-4s\terror (nonassociative)\n"
|
||||
msgstr " %-4s\terreur (non-associatif)\n"
|
||||
|
||||
#: src/print.c:232
|
||||
#, c-format
|
||||
msgid " %-4s\tgo to state %d\n"
|
||||
msgstr " %-4s\taller à l'état %d\n"
|
||||
|
||||
#. rule # : LHS -> RHS
|
||||
#: src/print.c:253
|
||||
msgid ""
|
||||
"\n"
|
||||
"Grammar\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Grammaire\n"
|
||||
|
||||
#: src/print.c:258
|
||||
#, c-format
|
||||
msgid "rule %-4d %s ->"
|
||||
msgstr "règle %-4d %s ->"
|
||||
|
||||
#: src/print.c:264
|
||||
msgid "\t\t/* empty */"
|
||||
msgstr "\t\t/* epsilon */"
|
||||
|
||||
#. TERMINAL (type #) : rule #s terminal is on RHS
|
||||
#: src/print.c:269
|
||||
msgid ""
|
||||
"\n"
|
||||
"Terminals, with rules where they appear\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Terminaux, suivis des règles où ils apparaissent\n"
|
||||
"\n"
|
||||
|
||||
#: src/print.c:317
|
||||
msgid ""
|
||||
"\n"
|
||||
"Nonterminals, with rules where they appear\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Catégories, suivis des règles où elles apparaissent\n"
|
||||
"\n"
|
||||
|
||||
#: src/print.c:343
|
||||
msgid " on left:"
|
||||
msgstr " à gauche:"
|
||||
|
||||
#: src/print.c:358
|
||||
msgid " on right:"
|
||||
msgstr " à droite:"
|
||||
|
||||
#: src/reader.c:145
|
||||
msgid " Skipping to next \\n"
|
||||
msgstr " Saut jusqu'au prochain \\n"
|
||||
|
||||
#: src/reader.c:147
|
||||
#, c-format
|
||||
msgid " Skipping to next %c"
|
||||
msgstr " Saut jusqu'au prochain %c"
|
||||
|
||||
#: src/reader.c:323
|
||||
#, c-format
|
||||
msgid "unrecognized: %s"
|
||||
msgstr "non reconnu: %s"
|
||||
|
||||
#: src/reader.c:328
|
||||
msgid "no input grammar"
|
||||
msgstr "aucune grammaire en entrée"
|
||||
|
||||
#: src/reader.c:332
|
||||
#, c-format
|
||||
msgid "unknown character: %s"
|
||||
msgstr "caractère inconnu: %s"
|
||||
|
||||
#: src/reader.c:381 src/reader.c:396 src/reader.c:1041 src/reader.c:1273
|
||||
msgid "unterminated string at end of file"
|
||||
msgstr "chaîne de caractères non terminée en fin de fichier"
|
||||
|
||||
#: src/reader.c:384 src/reader.c:1044 src/reader.c:1056 src/reader.c:1267
|
||||
#: src/reader.c:1281
|
||||
msgid "unterminated string"
|
||||
msgstr "chaîne de caractère non terminée"
|
||||
|
||||
#: src/reader.c:445
|
||||
msgid "unterminated comment in `%{' definition"
|
||||
msgstr "le commentaire ne se termine pas dans la section de définition (%{)"
|
||||
|
||||
#: src/reader.c:456
|
||||
msgid "unterminated `%{' definition"
|
||||
msgstr "La section de définition (%{) ne termine pas avant la fin du fichier"
|
||||
|
||||
#: src/reader.c:534 src/reader.c:755
|
||||
#, c-format
|
||||
msgid "symbol %s redefined"
|
||||
msgstr "symbole %s redéfini"
|
||||
|
||||
#: src/reader.c:544 src/reader.c:700 src/reader.c:762 src/reader.c:1804
|
||||
#, c-format
|
||||
msgid "type redeclaration for %s"
|
||||
msgstr "redéclaration du type de %s"
|
||||
|
||||
#: src/reader.c:554
|
||||
#, c-format
|
||||
msgid "`%s' is invalid in %s"
|
||||
msgstr "`%s' n'est pas valide dans %s"
|
||||
|
||||
#: src/reader.c:602
|
||||
#, c-format
|
||||
msgid "unrecognized item %s, expected an identifier"
|
||||
msgstr "item %s non reconnu, un identificateur est attendu"
|
||||
|
||||
#: src/reader.c:624
|
||||
#, c-format
|
||||
msgid "expected string constant instead of %s"
|
||||
msgstr "chaîne de caractères constante attendue plutôt que %s"
|
||||
|
||||
#: src/reader.c:646
|
||||
#, c-format
|
||||
msgid "multiple %start declarations"
|
||||
msgstr "multiples déclarations %start"
|
||||
|
||||
#: src/reader.c:648
|
||||
#, c-format
|
||||
msgid "invalid %start declaration"
|
||||
msgstr "la déclaration %start n'est pas valide"
|
||||
|
||||
#: src/reader.c:668
|
||||
msgid "%type declaration has no <typename>"
|
||||
msgstr "la déclaration %type n'a pas de <nom_de_type>"
|
||||
|
||||
#: src/reader.c:705
|
||||
msgid "invalid %%type declaration due to item: `%s'"
|
||||
msgstr "la déclaration %%type n'est pas valide à cause de l'item: %s"
|
||||
|
||||
#: src/reader.c:751
|
||||
#, c-format
|
||||
msgid "redefining precedence of %s"
|
||||
msgstr "redéfinition du niveau de priorité de %s"
|
||||
|
||||
#: src/reader.c:774
|
||||
#, c-format
|
||||
msgid "invalid text (%s) - number should be after identifier"
|
||||
msgstr ""
|
||||
"le texte n'est pas valide (%s) - le nombre devrait suivre l'identificateur"
|
||||
|
||||
#: src/reader.c:784
|
||||
#, c-format
|
||||
msgid "unexpected item: %s"
|
||||
msgstr "item inattendu: %s"
|
||||
|
||||
#: src/reader.c:808
|
||||
#, c-format
|
||||
msgid "multiple %union declarations"
|
||||
msgstr "multiples déclarations %union"
|
||||
|
||||
#: src/reader.c:866
|
||||
msgid "unterminated comment at end of file"
|
||||
msgstr "le commentaire ne se termine pas avant la fin du fichier"
|
||||
|
||||
#: src/reader.c:892
|
||||
msgid "unmatched close-brace (`}')"
|
||||
msgstr "accolade fermante `}' non appariée"
|
||||
|
||||
#: src/reader.c:936
|
||||
#, c-format
|
||||
msgid "argument of %expect is not an integer"
|
||||
msgstr "le paramètre de %expect n'est pas un entier"
|
||||
|
||||
#: src/reader.c:947
|
||||
msgid "invalid $ value"
|
||||
msgstr "la valeur de symbole $ n'est pas valide"
|
||||
|
||||
#: src/reader.c:1027
|
||||
msgid "unmatched right brace (`}')"
|
||||
msgstr "accolade fermante `}' non appariée"
|
||||
|
||||
#: src/reader.c:1143 src/reader.c:1368
|
||||
#, c-format
|
||||
msgid "$$ of `%s' has no declared type"
|
||||
msgstr "$$ de `%s' n'a pas son type déclaré"
|
||||
|
||||
#: src/reader.c:1159 src/reader.c:1383
|
||||
#, c-format
|
||||
msgid "$%s of `%s' has no declared type"
|
||||
msgstr "$%s cd `%s' n'a pas son type déclaré"
|
||||
|
||||
#: src/reader.c:1163 src/reader.c:1388
|
||||
#, c-format
|
||||
msgid "$%s is invalid"
|
||||
msgstr "$%s n'est pas valide"
|
||||
|
||||
#: src/reader.c:1177
|
||||
#, c-format
|
||||
msgid "@%s is invalid"
|
||||
msgstr "@%s n'est pas valide"
|
||||
|
||||
#: src/reader.c:1187
|
||||
msgid "unterminated %%guard clause"
|
||||
msgstr "clause %%guard non terminée"
|
||||
|
||||
#: src/reader.c:1402
|
||||
msgid "invalid @-construct"
|
||||
msgstr "la construction `@' n'est pas valide"
|
||||
|
||||
#: src/reader.c:1412
|
||||
msgid "unmatched `{'"
|
||||
msgstr "accolade ouvrante `{' non appariée"
|
||||
|
||||
#: src/reader.c:1498
|
||||
msgid "ill-formed rule: initial symbol not followed by colon"
|
||||
msgstr "règle mal formée: le symbole initial n'est pas suivi de `:'"
|
||||
|
||||
#: src/reader.c:1505
|
||||
msgid "grammar starts with vertical bar"
|
||||
msgstr "la grammaire débute par une barre verticale"
|
||||
|
||||
#: src/reader.c:1536
|
||||
#, c-format
|
||||
msgid "rule given for %s, which is a token"
|
||||
msgstr "la règle pour %s, qui est un terminal"
|
||||
|
||||
#: src/reader.c:1634
|
||||
msgid "two @prec's in a row"
|
||||
msgstr "deux @prec de suite"
|
||||
|
||||
#: src/reader.c:1642
|
||||
msgid "%%guard present but %%semantic_parser not specified"
|
||||
msgstr "%%guard est présent mais %%semantic_parser n'est pas spécifié"
|
||||
|
||||
#. This case never occurs -wjh
|
||||
#: src/reader.c:1650
|
||||
msgid "two actions at end of one rule"
|
||||
msgstr "deux actions à la fin d'une même règle"
|
||||
|
||||
#: src/reader.c:1662
|
||||
#, c-format
|
||||
msgid "type clash (`%s' `%s') on default action"
|
||||
msgstr "conflit de type (`%s' `%s') pour l'action par défaut"
|
||||
|
||||
#: src/reader.c:1668
|
||||
msgid "empty rule for typed nonterminal, and no action"
|
||||
msgstr "règle vide pour une catégorie typée et aucune action"
|
||||
|
||||
#: src/reader.c:1712
|
||||
#, c-format
|
||||
msgid "invalid input: %s"
|
||||
msgstr "entrée non valide: %s"
|
||||
|
||||
#: src/reader.c:1720
|
||||
#, c-format
|
||||
msgid "too many symbols (tokens plus nonterminals); maximum %s"
|
||||
msgstr "trop de symboles (terminaux et catégories); maximum de %s"
|
||||
|
||||
#: src/reader.c:1723
|
||||
msgid "no rules in the input grammar"
|
||||
msgstr "la grammaire n'a pas de règles"
|
||||
|
||||
#: src/reader.c:1741
|
||||
#, c-format
|
||||
msgid "symbol %s is used, but is not defined as a token and has no rules"
|
||||
msgstr ""
|
||||
"le symbole %s est utilisé mais ce n'est pas un terminal et il ne possède pas "
|
||||
"de règle"
|
||||
|
||||
#: src/reader.c:1780
|
||||
msgid "ill-formed %type declaration"
|
||||
msgstr "déclaration %type mal formée"
|
||||
|
||||
#: src/reader.c:1859
|
||||
#, c-format
|
||||
msgid "conflicting precedences for %s and %s"
|
||||
msgstr "les priorités pour %s et %s entrent en conflit"
|
||||
|
||||
#: src/reader.c:1868
|
||||
#, c-format
|
||||
msgid "conflicting assoc values for %s and %s"
|
||||
msgstr "les valeurs d'association de %s et %s entrent en conflit"
|
||||
|
||||
#: src/reader.c:1915
|
||||
#, c-format
|
||||
msgid "tokens %s and %s both assigned number %s"
|
||||
msgstr "les terminaux %s et %s se sont vus assigner le nombre %s"
|
||||
|
||||
#: src/reader.c:1929
|
||||
#, c-format
|
||||
msgid "the start symbol %s is undefined"
|
||||
msgstr "le symbole de départ %s n'est pas défini"
|
||||
|
||||
#: src/reader.c:1931
|
||||
#, c-format
|
||||
msgid "the start symbol %s is a token"
|
||||
msgstr "le symbole de départ %s est un terminal"
|
||||
|
||||
#: src/reduce.c:141
|
||||
#, c-format
|
||||
msgid "Start symbol %s does not derive any sentence"
|
||||
msgstr "Aucune phrase ne peut être dérivée du symbole de départ %s"
|
||||
|
||||
#: src/reduce.c:154
|
||||
#, c-format
|
||||
msgid ""
|
||||
"reduced %s defines %d terminal%s, %d nonterminal%s, and %d production%s.\n"
|
||||
msgstr ""
|
||||
"la réduction de %s définit %d terminal%s, %d catégorie%s et %d "
|
||||
"production%s.\n"
|
||||
|
||||
#: src/reduce.c:492
|
||||
msgid ""
|
||||
"Useless nonterminals:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Catégories non productives:\n"
|
||||
"\n"
|
||||
|
||||
#: src/reduce.c:504
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Terminals which are not used:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Terminaux non utilisés:\n"
|
||||
"\n"
|
||||
|
||||
#: src/reduce.c:513
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Useless rules:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Règles non productives:\n"
|
||||
"\n"
|
||||
|
||||
#: src/reduce.c:541
|
||||
msgid ""
|
||||
"Variables\n"
|
||||
"---------\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Variables\n"
|
||||
"---------\n"
|
||||
"\n"
|
||||
|
||||
#: src/reduce.c:542
|
||||
msgid "Value Sprec Sassoc Tag\n"
|
||||
msgstr "Valeur Spréc Sassoc Tag\n"
|
||||
|
||||
#: src/reduce.c:547
|
||||
msgid ""
|
||||
"Rules\n"
|
||||
"-----\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Règles\n"
|
||||
"------\n"
|
||||
"\n"
|
||||
|
||||
#: src/reduce.c:557
|
||||
msgid ""
|
||||
"Rules interpreted\n"
|
||||
"-----------------\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Règles interprétées\n"
|
||||
"-------------------\n"
|
||||
"\n"
|
||||
|
||||
#: src/reduce.c:573
|
||||
#, c-format
|
||||
msgid "%d rules never reduced\n"
|
||||
msgstr "%d règles jamais réduites\n"
|
||||
|
||||
#: src/reduce.c:575
|
||||
#, c-format
|
||||
msgid "%s contains "
|
||||
msgstr "%s contient "
|
||||
|
||||
#: src/reduce.c:579
|
||||
#, c-format
|
||||
msgid "%d useless nonterminal%s"
|
||||
msgstr "%d catégories non productives%s"
|
||||
|
||||
#: src/reduce.c:584
|
||||
msgid " and "
|
||||
msgstr " et "
|
||||
|
||||
#: src/reduce.c:588
|
||||
#, c-format
|
||||
msgid "%d useless rule%s"
|
||||
msgstr "%d règle(s) non productive(s)"
|
||||
|
||||
#: src/getopt.c:680
|
||||
#, c-format
|
||||
msgid "%s: option `%s' is ambiguous\n"
|
||||
msgstr "%s: l'option %s est ambigüe\n"
|
||||
|
||||
#: src/getopt.c:704
|
||||
#, c-format
|
||||
msgid "%s: option `--%s' doesn't allow an argument\n"
|
||||
msgstr "%s: l'option --%s n'admet pas de paramètre\n"
|
||||
|
||||
#: src/getopt.c:709
|
||||
#, c-format
|
||||
msgid "%s: option `%c%s' doesn't allow an argument\n"
|
||||
msgstr "%s: l'option %c%s n'admet pas de paramètre\n"
|
||||
|
||||
#: src/getopt.c:726 src/getopt.c:899
|
||||
#, c-format
|
||||
msgid "%s: option `%s' requires an argument\n"
|
||||
msgstr "%s: l'option %s requiert un paramètre\n"
|
||||
|
||||
#. --option
|
||||
#: src/getopt.c:755
|
||||
#, c-format
|
||||
msgid "%s: unrecognized option `--%s'\n"
|
||||
msgstr "%s: l'option --%s est inconnue\n"
|
||||
|
||||
#. +option or -option
|
||||
#: src/getopt.c:759
|
||||
#, c-format
|
||||
msgid "%s: unrecognized option `%c%s'\n"
|
||||
msgstr "%s: l'option %c%s est inconnue\n"
|
||||
|
||||
#. 1003.2 specifies the format of this message.
|
||||
#: src/getopt.c:785
|
||||
#, c-format
|
||||
msgid "%s: illegal option -- %c\n"
|
||||
msgstr "%s: option illégale -- %c\n"
|
||||
|
||||
#: src/getopt.c:788
|
||||
#, c-format
|
||||
msgid "%s: invalid option -- %c\n"
|
||||
msgstr "%s: option non valide -- %c\n"
|
||||
|
||||
#. 1003.2 specifies the format of this message.
|
||||
#: src/getopt.c:818 src/getopt.c:948
|
||||
#, c-format
|
||||
msgid "%s: option requires an argument -- %c\n"
|
||||
msgstr "%s: Cette option requiert un paramètre -- %c\n"
|
||||
|
||||
#: src/getopt.c:865
|
||||
#, fuzzy, c-format
|
||||
msgid "%s: option `-W %s' is ambiguous\n"
|
||||
msgstr "%s: l'option %s est ambigüe\n"
|
||||
|
||||
#: src/getopt.c:883
|
||||
#, fuzzy, c-format
|
||||
msgid "%s: option `-W %s' doesn't allow an argument\n"
|
||||
msgstr "%s: l'option --%s n'admet pas de paramètre\n"
|
||||
|
||||
#~ msgid "\"%s\", line %d: %s\n"
|
||||
#~ msgstr "\"%s\", ligne %d: %s\n"
|
||||
|
||||
#~ msgid "error: %s\n"
|
||||
#~ msgstr "erreur: %s\n"
|
||||
|
||||
#~ msgid "(\"%s\", line %d) error: %s\n"
|
||||
#~ msgstr "(\"%s\", ligne %d) erreur: %s\n"
|
||||
|
||||
#~ msgid "limit of %d exceeded, too many %s"
|
||||
#~ msgstr "limite de %d dépassée, trop de %s"
|
||||
@@ -0,0 +1,809 @@
|
||||
# Dutch messages for GNU bison.
|
||||
# Copyright (C) 1996 Free Software Foundation, Inc.
|
||||
# Erick Branderhorst <[email protected]>, 1996.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: bison 1.25\n"
|
||||
"POT-Creation-Date: 1999-06-14 18:19-0400\n"
|
||||
"PO-Revision-Date: 1996-08-27 15:34 MET DST\n"
|
||||
"Last-Translator: Erick Branderhorst <[email protected]>\n"
|
||||
"Language-Team: Dutch <[email protected]>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=ISO-8859-1\n"
|
||||
"Content-Transfer-Encoding: 8-bit\n"
|
||||
|
||||
#: src/allocate.c:59 src/allocate.c:75
|
||||
#, c-format
|
||||
msgid "%s: memory exhausted\n"
|
||||
msgstr "%s: geen geheugen meer beschikbaar\n"
|
||||
|
||||
#: src/closure.c:315
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"FIRSTS\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"EERSTEN\n"
|
||||
"\n"
|
||||
|
||||
#: src/closure.c:319
|
||||
#, c-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"%s firsts\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"%s eersten\n"
|
||||
"\n"
|
||||
|
||||
#: src/closure.c:337
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"FDERIVES\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"FAFGELEIDEN\n"
|
||||
|
||||
#: src/closure.c:341
|
||||
#, c-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"%s derives\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"%s afgeleiden\n"
|
||||
"\n"
|
||||
|
||||
#: src/conflicts.c:199 src/conflicts.c:223
|
||||
msgid "reduce"
|
||||
msgstr "reduceer"
|
||||
|
||||
#: src/conflicts.c:205 src/conflicts.c:219
|
||||
msgid "shift"
|
||||
msgstr "verschuif"
|
||||
|
||||
#: src/conflicts.c:227
|
||||
msgid "an error"
|
||||
msgstr "een fout"
|
||||
|
||||
#: src/conflicts.c:299
|
||||
#, c-format
|
||||
msgid "Conflict in state %d between rule %d and token %s resolved as %s.\n"
|
||||
msgstr "Conflict in stadium %d tussen regel %d en teken %s opgelost als %s.\n"
|
||||
|
||||
#: src/conflicts.c:344
|
||||
#, c-format
|
||||
msgid "State %d contains"
|
||||
msgstr "Stadium %d bevat"
|
||||
|
||||
#: src/conflicts.c:347 src/conflicts.c:392
|
||||
msgid " 1 shift/reduce conflict"
|
||||
msgstr " 1 verschuif/reduceer conflict"
|
||||
|
||||
#: src/conflicts.c:349 src/conflicts.c:394
|
||||
#, c-format
|
||||
msgid " %d shift/reduce conflicts"
|
||||
msgstr " %d verschuif/reduceer conflicten"
|
||||
|
||||
#: src/conflicts.c:352 src/conflicts.c:397
|
||||
msgid " and"
|
||||
msgstr " en"
|
||||
|
||||
#: src/conflicts.c:355 src/conflicts.c:400
|
||||
msgid " 1 reduce/reduce conflict"
|
||||
msgstr " 1 reduceer/reduceer conflict"
|
||||
|
||||
#: src/conflicts.c:357 src/conflicts.c:402
|
||||
#, c-format
|
||||
msgid " %d reduce/reduce conflicts"
|
||||
msgstr " %d reduceer/reduceer conflicten"
|
||||
|
||||
#. If invoked under the name `yacc', use the output format
|
||||
#. specified by POSIX.
|
||||
#: src/conflicts.c:378
|
||||
msgid "conflicts: "
|
||||
msgstr "conflictueerd: "
|
||||
|
||||
#: src/conflicts.c:380
|
||||
#, c-format
|
||||
msgid " %d shift/reduce"
|
||||
msgstr " %d vershuif/reduceer"
|
||||
|
||||
#: src/conflicts.c:384
|
||||
#, c-format
|
||||
msgid " %d reduce/reduce"
|
||||
msgstr " %d reduceer/reduceer"
|
||||
|
||||
#: src/conflicts.c:389
|
||||
#, c-format
|
||||
msgid "%s contains"
|
||||
msgstr "%s bevat"
|
||||
|
||||
#: src/conflicts.c:598 src/conflicts.c:712
|
||||
#, c-format
|
||||
msgid " %-4s\t[reduce using rule %d (%s)]\n"
|
||||
msgstr " %-4s\t[reduceer gebruikt regel %d (%s)]\n"
|
||||
|
||||
#: src/conflicts.c:609 src/print.c:217
|
||||
#, c-format
|
||||
msgid ""
|
||||
" $default\treduce using rule %d (%s)\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
" $default\treduce using rule %d (%s)\n"
|
||||
"\n"
|
||||
|
||||
#: src/conflicts.c:695 src/conflicts.c:707
|
||||
#, c-format
|
||||
msgid " %-4s\treduce using rule %d (%s)\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/conflicts.c:733
|
||||
#, c-format
|
||||
msgid " $default\treduce using rule %d (%s)\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/derives.c:106
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"DERIVES\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"AFGELEIDEN\n"
|
||||
"\n"
|
||||
|
||||
#: src/derives.c:110
|
||||
#, c-format
|
||||
msgid "%s derives"
|
||||
msgstr "%s afgeleiden"
|
||||
|
||||
#: src/getargs.c:68
|
||||
#, fuzzy, c-format
|
||||
msgid ""
|
||||
"Usage: %s [-dhklntvyV] [-b file-prefix] [-o outfile] [-p name-prefix]\n"
|
||||
" [--debug] [--defines] [--fixed-output-files] [--no-lines]\n"
|
||||
" [--verbose] [--version] [--help] [--yacc]\n"
|
||||
" [--no-parser] [--token-table]\n"
|
||||
" [--file-prefix=prefix] [--name-prefix=prefix]\n"
|
||||
" [--output=outfile] grammar-file\n"
|
||||
"\n"
|
||||
"Report bugs to [email protected]\n"
|
||||
msgstr ""
|
||||
"Gebruik: %s [-dhklntvyV] [-b file-prefix] [-o outfile] [-p name-prefix]\n"
|
||||
" [--debug] [--defines] [--fixed-output-files] [--no-lines]\n"
|
||||
" [--verbose] [--version] [--help] [--yacc]\n"
|
||||
" [--no-parser] [--token-table]\n"
|
||||
" [--file-prefix=prefix] [--name-prefix=prefix]\n"
|
||||
" [--output=outfile] grammar-bestand\n"
|
||||
|
||||
#: src/getargs.c:161
|
||||
#, c-format
|
||||
msgid "%s: no grammar file given\n"
|
||||
msgstr "%s: geen grammatica bestand gegeven\n"
|
||||
|
||||
#: src/getargs.c:165
|
||||
#, c-format
|
||||
msgid "%s: extra arguments ignored after '%s'\n"
|
||||
msgstr "%s: extra argumenten genegeerd na '%s'\n"
|
||||
|
||||
#: src/lalr.c:294
|
||||
msgid "gotos"
|
||||
msgstr "ganaar"
|
||||
|
||||
#: src/lex.c:119
|
||||
msgid "unexpected `/' found and ignored"
|
||||
msgstr "onverwachte `/' gevonden en genegeerd"
|
||||
|
||||
#: src/lex.c:148 src/reader.c:1105 src/reader.c:1330
|
||||
msgid "unterminated comment"
|
||||
msgstr "ongetermineerd commentaar"
|
||||
|
||||
#: src/lex.c:176
|
||||
msgid "Unexpected end of file"
|
||||
msgstr "Onverwacht bestandseinde"
|
||||
|
||||
#: src/lex.c:197
|
||||
msgid "unescaped newline in constant"
|
||||
msgstr "niet geescapete nieuwe regel in constante"
|
||||
|
||||
#: src/lex.c:229
|
||||
#, c-format
|
||||
msgid "octal value outside range 0...255: `\\%o'"
|
||||
msgstr "octale waarde buiten domein 0...255: `\\%o'"
|
||||
|
||||
#: src/lex.c:253
|
||||
#, c-format
|
||||
msgid "hexadecimal value above 255: `\\x%x'"
|
||||
msgstr "hexadecimale waarde boven 255: `\\x%x'"
|
||||
|
||||
#: src/lex.c:263
|
||||
#, c-format
|
||||
msgid "unknown escape sequence: `\\' followed by `%s'"
|
||||
msgstr "onbekende escape reeks: `\\' gevolgd door `%s'"
|
||||
|
||||
#: src/lex.c:396
|
||||
msgid "use \"...\" for multi-character literal tokens"
|
||||
msgstr "gebruik \"...\" voor meerdere karakters literal tekens"
|
||||
|
||||
#: src/lex.c:475
|
||||
msgid "unterminated type name at end of file"
|
||||
msgstr "niet getermineerd type naam aan het einde van bestand"
|
||||
|
||||
#: src/lex.c:478
|
||||
msgid "unterminated type name"
|
||||
msgstr "niet getermineerd type naam"
|
||||
|
||||
#: src/main.c:152
|
||||
#, fuzzy, c-format
|
||||
msgid "%s: fatal error: "
|
||||
msgstr "fatale fout: %s\n"
|
||||
|
||||
#: src/main.c:154
|
||||
#, fuzzy, c-format
|
||||
msgid "%s:%d: fatal error: "
|
||||
msgstr "fatale fout: %s\n"
|
||||
|
||||
#: src/main.c:185
|
||||
#, c-format
|
||||
msgid "%s: "
|
||||
msgstr ""
|
||||
|
||||
#: src/main.c:187
|
||||
#, c-format
|
||||
msgid "%s:%d: "
|
||||
msgstr ""
|
||||
|
||||
#: src/main.c:252
|
||||
#, c-format
|
||||
msgid "too many %s (max %d)"
|
||||
msgstr ""
|
||||
|
||||
#: src/main.c:262
|
||||
#, fuzzy, c-format
|
||||
msgid "%s: internal error: %s\n"
|
||||
msgstr "interne fout, %s\n"
|
||||
|
||||
#: src/nullable.c:55
|
||||
msgid "Entering set_nullable"
|
||||
msgstr "Inkomende set nullable"
|
||||
|
||||
#: src/output.c:1190
|
||||
#, c-format
|
||||
msgid "maximum table size (%s) exceeded"
|
||||
msgstr "maximale tabel grootte (%s) overschreden"
|
||||
|
||||
#: src/print.c:85
|
||||
#, c-format
|
||||
msgid " type %d is %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/print.c:92
|
||||
#, c-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"state %d\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"stadium %d\n"
|
||||
"\n"
|
||||
|
||||
#: src/print.c:136
|
||||
#, c-format
|
||||
msgid " (rule %d)"
|
||||
msgstr " (regel %d)"
|
||||
|
||||
#: src/print.c:163
|
||||
msgid " $default\taccept\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/print.c:165
|
||||
msgid " NO ACTIONS\n"
|
||||
msgstr " GEEN AKTIES\n"
|
||||
|
||||
#. I.e. strcmp(tags[symbol],"$")==0
|
||||
#: src/print.c:181
|
||||
#, c-format
|
||||
msgid " $ \tgo to state %d\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/print.c:183
|
||||
#, c-format
|
||||
msgid " %-4s\tshift, and go to state %d\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/print.c:206
|
||||
#, c-format
|
||||
msgid " %-4s\terror (nonassociative)\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/print.c:232
|
||||
#, c-format
|
||||
msgid " %-4s\tgo to state %d\n"
|
||||
msgstr ""
|
||||
|
||||
#. rule # : LHS -> RHS
|
||||
#: src/print.c:253
|
||||
msgid ""
|
||||
"\n"
|
||||
"Grammar\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Grammatica\n"
|
||||
|
||||
#: src/print.c:258
|
||||
#, c-format
|
||||
msgid "rule %-4d %s ->"
|
||||
msgstr "regel %-4d %s ->"
|
||||
|
||||
#: src/print.c:264
|
||||
msgid "\t\t/* empty */"
|
||||
msgstr ""
|
||||
|
||||
#. TERMINAL (type #) : rule #s terminal is on RHS
|
||||
#: src/print.c:269
|
||||
msgid ""
|
||||
"\n"
|
||||
"Terminals, with rules where they appear\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Terminals, met regels waar ze voorkomen\n"
|
||||
"\n"
|
||||
|
||||
#: src/print.c:317
|
||||
msgid ""
|
||||
"\n"
|
||||
"Nonterminals, with rules where they appear\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Geen terminals, met regels waar ze voorkomen\n"
|
||||
"\n"
|
||||
|
||||
#: src/print.c:343
|
||||
msgid " on left:"
|
||||
msgstr " links:"
|
||||
|
||||
#: src/print.c:358
|
||||
msgid " on right:"
|
||||
msgstr " rechts:"
|
||||
|
||||
#: src/reader.c:145
|
||||
msgid " Skipping to next \\n"
|
||||
msgstr " Verder naar volgende \\n"
|
||||
|
||||
#: src/reader.c:147
|
||||
#, c-format
|
||||
msgid " Skipping to next %c"
|
||||
msgstr " Verder naar volgende %c"
|
||||
|
||||
#: src/reader.c:323
|
||||
#, c-format
|
||||
msgid "unrecognized: %s"
|
||||
msgstr "onbekend: %s"
|
||||
|
||||
#: src/reader.c:328
|
||||
msgid "no input grammar"
|
||||
msgstr "geen invoer grammatica"
|
||||
|
||||
#: src/reader.c:332
|
||||
#, c-format
|
||||
msgid "unknown character: %s"
|
||||
msgstr "onbekend karakter: %s"
|
||||
|
||||
#: src/reader.c:381 src/reader.c:396 src/reader.c:1041 src/reader.c:1273
|
||||
msgid "unterminated string at end of file"
|
||||
msgstr "niet getermineerde string aan einde van bestand"
|
||||
|
||||
#: src/reader.c:384 src/reader.c:1044 src/reader.c:1056 src/reader.c:1267
|
||||
#: src/reader.c:1281
|
||||
msgid "unterminated string"
|
||||
msgstr "niet getermineerde string"
|
||||
|
||||
#: src/reader.c:445
|
||||
msgid "unterminated comment in `%{' definition"
|
||||
msgstr "niet getermineerd commentaar in `%{' definitie"
|
||||
|
||||
#: src/reader.c:456
|
||||
msgid "unterminated `%{' definition"
|
||||
msgstr "niet getermineerde `%{' definitie"
|
||||
|
||||
#: src/reader.c:534 src/reader.c:755
|
||||
#, c-format
|
||||
msgid "symbol %s redefined"
|
||||
msgstr "symbool %s opnieuw gedefinieerd"
|
||||
|
||||
#: src/reader.c:544 src/reader.c:700 src/reader.c:762 src/reader.c:1804
|
||||
#, c-format
|
||||
msgid "type redeclaration for %s"
|
||||
msgstr "type herdeclaratie voor %s"
|
||||
|
||||
#: src/reader.c:554
|
||||
#, c-format
|
||||
msgid "`%s' is invalid in %s"
|
||||
msgstr "`%s' is onjuist in %s"
|
||||
|
||||
#: src/reader.c:602
|
||||
#, c-format
|
||||
msgid "unrecognized item %s, expected an identifier"
|
||||
msgstr "onbekend item %s, verwacht een identifier"
|
||||
|
||||
#: src/reader.c:624
|
||||
#, c-format
|
||||
msgid "expected string constant instead of %s"
|
||||
msgstr "verwacht string constante in plaats van %s"
|
||||
|
||||
#: src/reader.c:646
|
||||
#, c-format
|
||||
msgid "multiple %start declarations"
|
||||
msgstr "meerdere %start declaraties"
|
||||
|
||||
#: src/reader.c:648
|
||||
#, c-format
|
||||
msgid "invalid %start declaration"
|
||||
msgstr "onjuiste %start declaratie"
|
||||
|
||||
#: src/reader.c:668
|
||||
msgid "%type declaration has no <typename>"
|
||||
msgstr "%type declaratie heeft geen <typenaam>"
|
||||
|
||||
#: src/reader.c:705
|
||||
msgid "invalid %%type declaration due to item: `%s'"
|
||||
msgstr "onjuist %%type declaratie door item: `%s'"
|
||||
|
||||
#: src/reader.c:751
|
||||
#, c-format
|
||||
msgid "redefining precedence of %s"
|
||||
msgstr "herdefinieren voorganger van %s"
|
||||
|
||||
#: src/reader.c:774
|
||||
#, c-format
|
||||
msgid "invalid text (%s) - number should be after identifier"
|
||||
msgstr "onjuiste tekst (%s) - nummer hoort na de identifier"
|
||||
|
||||
#: src/reader.c:784
|
||||
#, c-format
|
||||
msgid "unexpected item: %s"
|
||||
msgstr "onbekend item: %s"
|
||||
|
||||
#: src/reader.c:808
|
||||
#, c-format
|
||||
msgid "multiple %union declarations"
|
||||
msgstr "meerdere %union declaraties"
|
||||
|
||||
#: src/reader.c:866
|
||||
msgid "unterminated comment at end of file"
|
||||
msgstr "niet getermineerd commentaar aan einde van bestand"
|
||||
|
||||
#: src/reader.c:892
|
||||
msgid "unmatched close-brace (`}')"
|
||||
msgstr "niet overeenkomstige afsluit-haakje (`}')"
|
||||
|
||||
#: src/reader.c:936
|
||||
#, c-format
|
||||
msgid "argument of %expect is not an integer"
|
||||
msgstr "argument van %expect is niet een integer"
|
||||
|
||||
#: src/reader.c:947
|
||||
msgid "invalid $ value"
|
||||
msgstr "onjuiste $ waarde"
|
||||
|
||||
#: src/reader.c:1027
|
||||
msgid "unmatched right brace (`}')"
|
||||
msgstr "niet overeenkomstig rechter haakje (`}')"
|
||||
|
||||
#: src/reader.c:1143 src/reader.c:1368
|
||||
#, c-format
|
||||
msgid "$$ of `%s' has no declared type"
|
||||
msgstr "$$ van `%s' heeft geen gedeclareerd type"
|
||||
|
||||
#: src/reader.c:1159 src/reader.c:1383
|
||||
#, c-format
|
||||
msgid "$%s of `%s' has no declared type"
|
||||
msgstr "$%s van `%s' heeft geen gedeclareerd type"
|
||||
|
||||
#: src/reader.c:1163 src/reader.c:1388
|
||||
#, c-format
|
||||
msgid "$%s is invalid"
|
||||
msgstr "$%s is onjuist"
|
||||
|
||||
#: src/reader.c:1177
|
||||
#, c-format
|
||||
msgid "@%s is invalid"
|
||||
msgstr "@%s is onjuist"
|
||||
|
||||
#: src/reader.c:1187
|
||||
msgid "unterminated %%guard clause"
|
||||
msgstr "niet getermineerde %%guard voorwaarde"
|
||||
|
||||
#: src/reader.c:1402
|
||||
msgid "invalid @-construct"
|
||||
msgstr "ongeldige @-constructie"
|
||||
|
||||
#: src/reader.c:1412
|
||||
msgid "unmatched `{'"
|
||||
msgstr "niet overeenkomstige `{'"
|
||||
|
||||
#: src/reader.c:1498
|
||||
msgid "ill-formed rule: initial symbol not followed by colon"
|
||||
msgstr ""
|
||||
"slecht geformuleerde regel: initieel symbool niet gevolgd door dubbele punt"
|
||||
|
||||
#: src/reader.c:1505
|
||||
msgid "grammar starts with vertical bar"
|
||||
msgstr "grammatica start met een verticale bar"
|
||||
|
||||
#: src/reader.c:1536
|
||||
#, c-format
|
||||
msgid "rule given for %s, which is a token"
|
||||
msgstr "regel geven voor %s, welke een teken is"
|
||||
|
||||
#: src/reader.c:1634
|
||||
msgid "two @prec's in a row"
|
||||
msgstr "twee @prec's in een regel"
|
||||
|
||||
#: src/reader.c:1642
|
||||
msgid "%%guard present but %%semantic_parser not specified"
|
||||
msgstr "%%guard aanwezig maar %%semantic_parser niet gespecificeerd"
|
||||
|
||||
#. This case never occurs -wjh
|
||||
#: src/reader.c:1650
|
||||
msgid "two actions at end of one rule"
|
||||
msgstr "twee akties aan het einde van een regel"
|
||||
|
||||
#: src/reader.c:1662
|
||||
#, c-format
|
||||
msgid "type clash (`%s' `%s') on default action"
|
||||
msgstr "type clash (`%s' `%s') bij standaard aktie"
|
||||
|
||||
#: src/reader.c:1668
|
||||
msgid "empty rule for typed nonterminal, and no action"
|
||||
msgstr "lege regel voor getypte niet terminal, en geen aktie"
|
||||
|
||||
#: src/reader.c:1712
|
||||
#, c-format
|
||||
msgid "invalid input: %s"
|
||||
msgstr "ongeldige invoer: %s"
|
||||
|
||||
#: src/reader.c:1720
|
||||
#, c-format
|
||||
msgid "too many symbols (tokens plus nonterminals); maximum %s"
|
||||
msgstr "te veel symbolen (tekens plus nietterminals); maximum %s"
|
||||
|
||||
#: src/reader.c:1723
|
||||
msgid "no rules in the input grammar"
|
||||
msgstr "geen regels voor invoer grammatica"
|
||||
|
||||
#: src/reader.c:1741
|
||||
#, c-format
|
||||
msgid "symbol %s is used, but is not defined as a token and has no rules"
|
||||
msgstr ""
|
||||
"symbool %s is gebruikt, maar is niet gedefinieerd als een teken en\n"
|
||||
"heeft geen regels"
|
||||
|
||||
#: src/reader.c:1780
|
||||
msgid "ill-formed %type declaration"
|
||||
msgstr "slecht geformuleerde %type declaratie"
|
||||
|
||||
#: src/reader.c:1859
|
||||
#, c-format
|
||||
msgid "conflicting precedences for %s and %s"
|
||||
msgstr "conflictuerende precedentein voor %s en %s"
|
||||
|
||||
#: src/reader.c:1868
|
||||
#, c-format
|
||||
msgid "conflicting assoc values for %s and %s"
|
||||
msgstr "conflictuerende associatieve waarden voor %s en %s"
|
||||
|
||||
#: src/reader.c:1915
|
||||
#, c-format
|
||||
msgid "tokens %s and %s both assigned number %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:1929
|
||||
#, c-format
|
||||
msgid "the start symbol %s is undefined"
|
||||
msgstr ""
|
||||
|
||||
#: src/reader.c:1931
|
||||
#, c-format
|
||||
msgid "the start symbol %s is a token"
|
||||
msgstr "het start symbool %s is een token"
|
||||
|
||||
#: src/reduce.c:141
|
||||
#, c-format
|
||||
msgid "Start symbol %s does not derive any sentence"
|
||||
msgstr "Start symbool %s is niet afkomstig uit een zin"
|
||||
|
||||
#: src/reduce.c:154
|
||||
#, c-format
|
||||
msgid ""
|
||||
"reduced %s defines %d terminal%s, %d nonterminal%s, and %d production%s.\n"
|
||||
msgstr ""
|
||||
"gereduceerd %s gedefinieerd %d terminal%s, %d nietterminal%s, en %d "
|
||||
"productie%s.\n"
|
||||
|
||||
#: src/reduce.c:492
|
||||
msgid ""
|
||||
"Useless nonterminals:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Onbruikbare niet terminals:\n"
|
||||
"\n"
|
||||
|
||||
#: src/reduce.c:504
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Terminals which are not used:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Terminals welke niet worden gebruikt:\n"
|
||||
"\n"
|
||||
|
||||
#: src/reduce.c:513
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Useless rules:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Onbruikbare regels:\n"
|
||||
"\n"
|
||||
|
||||
#: src/reduce.c:541
|
||||
msgid ""
|
||||
"Variables\n"
|
||||
"---------\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Variabelen\n"
|
||||
"----------\n"
|
||||
"\n"
|
||||
|
||||
#: src/reduce.c:542
|
||||
msgid "Value Sprec Sassoc Tag\n"
|
||||
msgstr "Waarde Sprec Sassoc Tag\n"
|
||||
|
||||
#: src/reduce.c:547
|
||||
msgid ""
|
||||
"Rules\n"
|
||||
"-----\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Regels\n"
|
||||
"------\n"
|
||||
"\n"
|
||||
|
||||
#: src/reduce.c:557
|
||||
msgid ""
|
||||
"Rules interpreted\n"
|
||||
"-----------------\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Geinterpreteerde regels\n"
|
||||
"-----------------------\n"
|
||||
"\n"
|
||||
|
||||
#: src/reduce.c:573
|
||||
#, c-format
|
||||
msgid "%d rules never reduced\n"
|
||||
msgstr "%d regels nooit gereduceerd\n"
|
||||
|
||||
#: src/reduce.c:575
|
||||
#, c-format
|
||||
msgid "%s contains "
|
||||
msgstr "%s bevat"
|
||||
|
||||
#: src/reduce.c:579
|
||||
#, c-format
|
||||
msgid "%d useless nonterminal%s"
|
||||
msgstr "%d onbruikbare niet terminal%s"
|
||||
|
||||
#: src/reduce.c:584
|
||||
msgid " and "
|
||||
msgstr " en "
|
||||
|
||||
#: src/reduce.c:588
|
||||
#, c-format
|
||||
msgid "%d useless rule%s"
|
||||
msgstr "%d onbruikbare regels%s"
|
||||
|
||||
#: src/getopt.c:680
|
||||
#, c-format
|
||||
msgid "%s: option `%s' is ambiguous\n"
|
||||
msgstr "%s: optie `%s' is niet eenduidig\n"
|
||||
|
||||
#: src/getopt.c:704
|
||||
#, c-format
|
||||
msgid "%s: option `--%s' doesn't allow an argument\n"
|
||||
msgstr "%s: optie `--%s' staat geen argument toe\n"
|
||||
|
||||
#: src/getopt.c:709
|
||||
#, c-format
|
||||
msgid "%s: option `%c%s' doesn't allow an argument\n"
|
||||
msgstr "%s: optie `%c%s' staat geen argument toe\n"
|
||||
|
||||
#: src/getopt.c:726 src/getopt.c:899
|
||||
#, c-format
|
||||
msgid "%s: option `%s' requires an argument\n"
|
||||
msgstr "%s: optie `%s' vereist een argument\n"
|
||||
|
||||
#. --option
|
||||
#: src/getopt.c:755
|
||||
#, c-format
|
||||
msgid "%s: unrecognized option `--%s'\n"
|
||||
msgstr "%s: onbekende optie `--%s'\n"
|
||||
|
||||
#. +option or -option
|
||||
#: src/getopt.c:759
|
||||
#, c-format
|
||||
msgid "%s: unrecognized option `%c%s'\n"
|
||||
msgstr "%s: onbekende optie `%c%s'\n"
|
||||
|
||||
#. 1003.2 specifies the format of this message.
|
||||
#: src/getopt.c:785
|
||||
#, c-format
|
||||
msgid "%s: illegal option -- %c\n"
|
||||
msgstr "%s: ongeldige optie -- %c\n"
|
||||
|
||||
#: src/getopt.c:788
|
||||
#, c-format
|
||||
msgid "%s: invalid option -- %c\n"
|
||||
msgstr "%s: onjuiste optie -- %c\n"
|
||||
|
||||
#. 1003.2 specifies the format of this message.
|
||||
#: src/getopt.c:818 src/getopt.c:948
|
||||
#, c-format
|
||||
msgid "%s: option requires an argument -- %c\n"
|
||||
msgstr "%s: optie vereist een argument -- %c\n"
|
||||
|
||||
#: src/getopt.c:865
|
||||
#, fuzzy, c-format
|
||||
msgid "%s: option `-W %s' is ambiguous\n"
|
||||
msgstr "%s: optie `%s' is niet eenduidig\n"
|
||||
|
||||
#: src/getopt.c:883
|
||||
#, fuzzy, c-format
|
||||
msgid "%s: option `-W %s' doesn't allow an argument\n"
|
||||
msgstr "%s: optie `--%s' staat geen argument toe\n"
|
||||
|
||||
#~ msgid "\"%s\", line %d: %s\n"
|
||||
#~ msgstr "\"%s\", regel %d: %s\n"
|
||||
|
||||
#~ msgid "error: %s\n"
|
||||
#~ msgstr "fout: %s\n"
|
||||
|
||||
#~ msgid "(\"%s\", line %d) error: %s\n"
|
||||
#~ msgstr "(\"%s\", regel %d) fout: %s\n"
|
||||
|
||||
#~ msgid "limit of %d exceeded, too many %s"
|
||||
#~ msgstr "limiet van %d overschreden, te veel %s"
|
||||
@@ -0,0 +1,8 @@
|
||||
*_.c
|
||||
.deps
|
||||
ChangeLog
|
||||
Makefile
|
||||
Makefile.in
|
||||
ansi2knr
|
||||
bison
|
||||
bison.simple
|
||||
@@ -15,7 +15,8 @@ GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bison; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
/* See comments in state.h for the data structures that represent it.
|
||||
@@ -40,20 +41,24 @@ core *first_state;
|
||||
shifts *first_shift;
|
||||
reductions *first_reduction;
|
||||
|
||||
int get_state();
|
||||
core *new_state();
|
||||
int get_state PARAMS((int));
|
||||
core *new_state PARAMS((int));
|
||||
|
||||
void new_itemsets();
|
||||
void append_states();
|
||||
void initialize_states();
|
||||
void save_shifts();
|
||||
void save_reductions();
|
||||
void augment_automaton();
|
||||
void insert_start_shift();
|
||||
extern void initialize_closure();
|
||||
extern void closure();
|
||||
extern void finalize_closure();
|
||||
extern void toomany();
|
||||
void allocate_itemsets PARAMS((void));
|
||||
void allocate_storage PARAMS((void));
|
||||
void free_storage PARAMS((void));
|
||||
void generate_states PARAMS((void));
|
||||
void new_itemsets PARAMS((void));
|
||||
void append_states PARAMS((void));
|
||||
void initialize_states PARAMS((void));
|
||||
void save_shifts PARAMS((void));
|
||||
void save_reductions PARAMS((void));
|
||||
void augment_automaton PARAMS((void));
|
||||
void insert_start_shift PARAMS((void));
|
||||
extern void initialize_closure PARAMS((int));
|
||||
extern void closure PARAMS((short *, int));
|
||||
extern void finalize_closure PARAMS((void));
|
||||
extern void toomany PARAMS((char *));
|
||||
|
||||
static core *this_state;
|
||||
static core *last_state;
|
||||
@@ -78,7 +83,7 @@ static core **state_table;
|
||||
|
||||
|
||||
void
|
||||
allocate_itemsets()
|
||||
allocate_itemsets (void)
|
||||
{
|
||||
register short *itemp;
|
||||
register int symbol;
|
||||
@@ -123,7 +128,7 @@ allocate_itemsets()
|
||||
|
||||
|
||||
void
|
||||
allocate_storage()
|
||||
allocate_storage (void)
|
||||
{
|
||||
allocate_itemsets();
|
||||
|
||||
@@ -134,7 +139,7 @@ allocate_storage()
|
||||
|
||||
|
||||
void
|
||||
free_storage()
|
||||
free_storage (void)
|
||||
{
|
||||
FREE(shift_symbol);
|
||||
FREE(redset);
|
||||
@@ -150,7 +155,7 @@ free_storage()
|
||||
/* compute the nondeterministic finite state machine (see state.h for details)
|
||||
from the grammar. */
|
||||
void
|
||||
generate_states()
|
||||
generate_states (void)
|
||||
{
|
||||
allocate_storage();
|
||||
initialize_closure(nitems);
|
||||
@@ -196,7 +201,7 @@ generate_states()
|
||||
a vector of item numbers activated if that symbol is shifted,
|
||||
and kernel_end[symbol] points after the end of that vector. */
|
||||
void
|
||||
new_itemsets()
|
||||
new_itemsets (void)
|
||||
{
|
||||
register int i;
|
||||
register int shiftcount;
|
||||
@@ -244,7 +249,7 @@ new_itemsets()
|
||||
|
||||
shiftset is set up as a vector of state numbers of those states. */
|
||||
void
|
||||
append_states()
|
||||
append_states (void)
|
||||
{
|
||||
register int i;
|
||||
register int j;
|
||||
@@ -283,8 +288,7 @@ Create a new state if no equivalent one exists already.
|
||||
Used by append_states */
|
||||
|
||||
int
|
||||
get_state(symbol)
|
||||
int symbol;
|
||||
get_state (int symbol)
|
||||
{
|
||||
register int key;
|
||||
register short *isp1;
|
||||
@@ -357,8 +361,7 @@ int symbol;
|
||||
/* subroutine of get_state. create a new state for those items, if necessary. */
|
||||
|
||||
core *
|
||||
new_state(symbol)
|
||||
int symbol;
|
||||
new_state (int symbol)
|
||||
{
|
||||
register int n;
|
||||
register core *p;
|
||||
@@ -396,7 +399,7 @@ int symbol;
|
||||
|
||||
|
||||
void
|
||||
initialize_states()
|
||||
initialize_states (void)
|
||||
{
|
||||
register core *p;
|
||||
/* register unsigned *rp1; JF unused */
|
||||
@@ -410,7 +413,7 @@ initialize_states()
|
||||
|
||||
|
||||
void
|
||||
save_shifts()
|
||||
save_shifts (void)
|
||||
{
|
||||
register shifts *p;
|
||||
register short *sp1;
|
||||
@@ -418,7 +421,7 @@ save_shifts()
|
||||
register short *send;
|
||||
|
||||
p = (shifts *) xmalloc((unsigned) (sizeof(shifts) +
|
||||
(nshifts - 1) * sizeof(short)));
|
||||
(nshifts - 1) * sizeof(short)));
|
||||
|
||||
p->number = this_state->number;
|
||||
p->nshifts = nshifts;
|
||||
@@ -447,7 +450,7 @@ save_shifts()
|
||||
/* find which rules can be used for reduction transitions from the current state
|
||||
and make a reductions structure for the state to record their rule numbers. */
|
||||
void
|
||||
save_reductions()
|
||||
save_reductions (void)
|
||||
{
|
||||
register short *isp;
|
||||
register short *rp1;
|
||||
@@ -475,7 +478,7 @@ save_reductions()
|
||||
if (count)
|
||||
{
|
||||
p = (reductions *) xmalloc((unsigned) (sizeof(reductions) +
|
||||
(count - 1) * sizeof(short)));
|
||||
(count - 1) * sizeof(short)));
|
||||
|
||||
p->number = this_state->number;
|
||||
p->nreds = count;
|
||||
@@ -508,7 +511,7 @@ which has a shift going to the final state, which has a shift
|
||||
to the termination state.
|
||||
Create such states and shifts if they don't happen to exist already. */
|
||||
void
|
||||
augment_automaton()
|
||||
augment_automaton (void)
|
||||
{
|
||||
register int i;
|
||||
register int k;
|
||||
@@ -516,7 +519,7 @@ augment_automaton()
|
||||
register core *statep;
|
||||
register shifts *sp;
|
||||
register shifts *sp2;
|
||||
register shifts *sp1;
|
||||
register shifts *sp1 = NULL;
|
||||
|
||||
sp = first_shift;
|
||||
|
||||
@@ -548,7 +551,7 @@ augment_automaton()
|
||||
if (sp && sp->number == k)
|
||||
{
|
||||
sp2 = (shifts *) xmalloc((unsigned) (sizeof(shifts)
|
||||
+ sp->nshifts * sizeof(short)));
|
||||
+ sp->nshifts * sizeof(short)));
|
||||
sp2->number = k;
|
||||
sp2->nshifts = sp->nshifts + 1;
|
||||
sp2->shifts[0] = nstates;
|
||||
@@ -681,7 +684,7 @@ augment_automaton()
|
||||
Create the next-to-final state, to which a shift has already been made in
|
||||
the initial state. */
|
||||
void
|
||||
insert_start_shift()
|
||||
insert_start_shift (void)
|
||||
{
|
||||
register core *statep;
|
||||
register shifts *sp;
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||
AUTOMAKE_OPTIONS = 1.4 ansi2knr
|
||||
|
||||
bin_PROGRAMS = bison
|
||||
|
||||
bison_SOURCES = LR0.c allocate.c closure.c conflicts.c derives.c \
|
||||
files.c getargs.c gram.c lalr.c lex.c main.c nullable.c output.c \
|
||||
print.c reader.c reduce.c symtab.c warshall.c getopt.c getopt1.c
|
||||
|
||||
EXTRA_bison_SOURCES = vmsgetargs.c
|
||||
|
||||
bison_LDADD = @INTLLIBS@ @ALLOCA@
|
||||
INCLUDES = -I../intl -I$(top_srcdir)/intl
|
||||
|
||||
noinst_HEADERS = alloc.h files.h gram.h lex.h machine.h state.h \
|
||||
symtab.h system.h types.h getopt.h
|
||||
|
||||
data_DATA = bison.simple bison.hairy
|
||||
|
||||
EXTRA_DIST = bison.s1 bison.hairy build.com bison.cld vmshlp.mar
|
||||
|
||||
bison.simple: bison.s1 Makefile
|
||||
-rm -f $@
|
||||
sed -e "/^#line/ s|bison|$(datadir)/bison|" -e "s/@bison_version@/$(VERSION)/" < $(srcdir)/bison.s1 > $@-tmp
|
||||
mv $@-tmp $@
|
||||
|
||||
DISTCLEANFILES = bison.simple
|
||||
+8
-3
@@ -15,9 +15,14 @@ GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bison; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define NEW(t) ((t *) xmalloc((unsigned) sizeof(t)))
|
||||
#define NEW2(n, t) ((t *) xmalloc((unsigned) ((n) * sizeof(t))))
|
||||
|
||||
@@ -27,5 +32,5 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
#define FREE(x) ((x) != 0 && (free ((char *) (x)), 0))
|
||||
#endif
|
||||
|
||||
extern char *xmalloc();
|
||||
extern char *xrealloc();
|
||||
extern char *xmalloc PARAMS((register unsigned));
|
||||
extern char *xrealloc PARAMS((register char *, register unsigned));
|
||||
|
||||
+504
@@ -0,0 +1,504 @@
|
||||
/* alloca.c -- allocate automatically reclaimed memory
|
||||
(Mostly) portable public-domain implementation -- D A Gwyn
|
||||
|
||||
This implementation of the PWB library alloca function,
|
||||
which is used to allocate space off the run-time stack so
|
||||
that it is automatically reclaimed upon procedure exit,
|
||||
was inspired by discussions with J. Q. Johnson of Cornell.
|
||||
J.Otto Tennant <[email protected]> contributed the Cray support.
|
||||
|
||||
There are some preprocessor constants that can
|
||||
be defined when compiling for your specific system, for
|
||||
improved efficiency; however, the defaults should be okay.
|
||||
|
||||
The general concept of this implementation is to keep
|
||||
track of all alloca-allocated blocks, and reclaim any
|
||||
that are found to be deeper in the stack than the current
|
||||
invocation. This heuristic does not reclaim storage as
|
||||
soon as it becomes invalid, but it will do so eventually.
|
||||
|
||||
As a special case, alloca(0) reclaims storage without
|
||||
allocating any. It is a good idea to use alloca(0) in
|
||||
your main control loop, etc. to force garbage collection. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifdef emacs
|
||||
#include "blockinput.h"
|
||||
#endif
|
||||
|
||||
/* If compiling with GCC 2, this file's not needed. */
|
||||
#if !defined (__GNUC__) || __GNUC__ < 2
|
||||
|
||||
/* If someone has defined alloca as a macro,
|
||||
there must be some other way alloca is supposed to work. */
|
||||
#ifndef alloca
|
||||
|
||||
#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
|
||||
you
|
||||
lose
|
||||
-- must know STACK_DIRECTION at compile-time
|
||||
#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)
|
||||
long i00afunc ();
|
||||
#define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg))
|
||||
#else
|
||||
#define ADDRESS_FUNCTION(arg) &(arg)
|
||||
#endif
|
||||
|
||||
#if __STDC__
|
||||
typedef void *pointer;
|
||||
#else
|
||||
typedef char *pointer;
|
||||
#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
|
||||
ordinary malloc isn't protected from input signals. On the other
|
||||
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.
|
||||
|
||||
Callers below should use malloc. */
|
||||
|
||||
#ifndef emacs
|
||||
#define malloc xmalloc
|
||||
#endif
|
||||
extern pointer malloc ();
|
||||
|
||||
/* Define STACK_DIRECTION if you know the direction of stack
|
||||
growth for your system; otherwise it will be automatically
|
||||
deduced at run-time.
|
||||
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
|
||||
#ifndef STACK_DIRECTION
|
||||
#define STACK_DIRECTION 0 /* Direction unknown. */
|
||||
#endif
|
||||
|
||||
#if STACK_DIRECTION != 0
|
||||
|
||||
#define STACK_DIR STACK_DIRECTION /* Known at compile-time. */
|
||||
|
||||
#else /* STACK_DIRECTION == 0; need run-time code. */
|
||||
|
||||
static int stack_dir; /* 1 or -1 once known. */
|
||||
#define STACK_DIR stack_dir
|
||||
|
||||
static void
|
||||
find_stack_direction ()
|
||||
{
|
||||
static char *addr = NULL; /* Address of first `dummy', once known. */
|
||||
auto char dummy; /* To get stack address. */
|
||||
|
||||
if (addr == NULL)
|
||||
{ /* Initial entry. */
|
||||
addr = ADDRESS_FUNCTION (dummy);
|
||||
|
||||
find_stack_direction (); /* Recurse once. */
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Second entry. */
|
||||
if (ADDRESS_FUNCTION (dummy) > addr)
|
||||
stack_dir = 1; /* Stack grew upward. */
|
||||
else
|
||||
stack_dir = -1; /* Stack grew downward. */
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* STACK_DIRECTION == 0 */
|
||||
|
||||
/* An "alloca header" is used to:
|
||||
(a) chain together all alloca'ed blocks;
|
||||
(b) keep track of stack depth.
|
||||
|
||||
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
|
||||
|
||||
typedef union hdr
|
||||
{
|
||||
char align[ALIGN_SIZE]; /* To force sizeof(header). */
|
||||
struct
|
||||
{
|
||||
union hdr *next; /* For chaining headers. */
|
||||
char *deep; /* For stack depth measure. */
|
||||
} h;
|
||||
} header;
|
||||
|
||||
static header *last_alloca_header = NULL; /* -> last alloca header. */
|
||||
|
||||
/* Return a pointer to at least SIZE bytes of storage,
|
||||
which will be automatically reclaimed upon exit from
|
||||
the procedure that called alloca. Originally, this space
|
||||
was supposed to be taken from the current stack frame of the
|
||||
caller, but that method cannot be made to work for some
|
||||
implementations of C, for example under Gould's UTX/32. */
|
||||
|
||||
pointer
|
||||
alloca (size)
|
||||
unsigned size;
|
||||
{
|
||||
auto char probe; /* Probes stack depth: */
|
||||
register char *depth = ADDRESS_FUNCTION (probe);
|
||||
|
||||
#if STACK_DIRECTION == 0
|
||||
if (STACK_DIR == 0) /* Unknown growth direction. */
|
||||
find_stack_direction ();
|
||||
#endif
|
||||
|
||||
/* Reclaim garbage, defined as all alloca'd storage that
|
||||
was allocated from deeper in the stack than currently. */
|
||||
|
||||
{
|
||||
register header *hp; /* Traverses linked list. */
|
||||
|
||||
#ifdef emacs
|
||||
BLOCK_INPUT;
|
||||
#endif
|
||||
|
||||
for (hp = last_alloca_header; hp != NULL;)
|
||||
if ((STACK_DIR > 0 && hp->h.deep > depth)
|
||||
|| (STACK_DIR < 0 && hp->h.deep < depth))
|
||||
{
|
||||
register header *np = hp->h.next;
|
||||
|
||||
free ((pointer) hp); /* Collect garbage. */
|
||||
|
||||
hp = np; /* -> next header. */
|
||||
}
|
||||
else
|
||||
break; /* Rest are not deeper. */
|
||||
|
||||
last_alloca_header = hp; /* -> last valid storage. */
|
||||
|
||||
#ifdef emacs
|
||||
UNBLOCK_INPUT;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (size == 0)
|
||||
return NULL; /* No allocation required. */
|
||||
|
||||
/* Allocate combined header + user data storage. */
|
||||
|
||||
{
|
||||
register pointer new = malloc (sizeof (header) + size);
|
||||
/* Address of header. */
|
||||
|
||||
if (new == 0)
|
||||
abort();
|
||||
|
||||
((header *) new)->h.next = last_alloca_header;
|
||||
((header *) new)->h.deep = depth;
|
||||
|
||||
last_alloca_header = (header *) new;
|
||||
|
||||
/* User storage begins just after header. */
|
||||
|
||||
return (pointer) ((char *) new + sizeof (header));
|
||||
}
|
||||
}
|
||||
|
||||
#if defined (CRAY) && defined (CRAY_STACKSEG_END)
|
||||
|
||||
#ifdef DEBUG_I00AFUNC
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#ifndef CRAY_STACK
|
||||
#define CRAY_STACK
|
||||
#ifndef CRAY2
|
||||
/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */
|
||||
struct stack_control_header
|
||||
{
|
||||
long shgrow:32; /* Number of times stack has grown. */
|
||||
long shaseg:32; /* Size of increments to stack. */
|
||||
long shhwm:32; /* High water mark of stack. */
|
||||
long shsize:32; /* Current size of stack (all segments). */
|
||||
};
|
||||
|
||||
/* The stack segment linkage control information occurs at
|
||||
the high-address end of a stack segment. (The stack
|
||||
grows from low addresses to high addresses.) The initial
|
||||
part of the stack segment linkage control information is
|
||||
0200 (octal) words. This provides for register storage
|
||||
for the routine which overflows the stack. */
|
||||
|
||||
struct stack_segment_linkage
|
||||
{
|
||||
long ss[0200]; /* 0200 overflow words. */
|
||||
long sssize:32; /* Number of words in this segment. */
|
||||
long ssbase:32; /* Offset to stack base. */
|
||||
long:32;
|
||||
long sspseg:32; /* Offset to linkage control of previous
|
||||
segment of stack. */
|
||||
long:32;
|
||||
long sstcpt:32; /* Pointer to task common address block. */
|
||||
long sscsnm; /* Private control structure number for
|
||||
microtasking. */
|
||||
long ssusr1; /* Reserved for user. */
|
||||
long ssusr2; /* Reserved for user. */
|
||||
long sstpid; /* Process ID for pid based multi-tasking. */
|
||||
long ssgvup; /* Pointer to multitasking thread giveup. */
|
||||
long sscray[7]; /* Reserved for Cray Research. */
|
||||
long ssa0;
|
||||
long ssa1;
|
||||
long ssa2;
|
||||
long ssa3;
|
||||
long ssa4;
|
||||
long ssa5;
|
||||
long ssa6;
|
||||
long ssa7;
|
||||
long sss0;
|
||||
long sss1;
|
||||
long sss2;
|
||||
long sss3;
|
||||
long sss4;
|
||||
long sss5;
|
||||
long sss6;
|
||||
long sss7;
|
||||
};
|
||||
|
||||
#else /* CRAY2 */
|
||||
/* The following structure defines the vector of words
|
||||
returned by the STKSTAT library routine. */
|
||||
struct stk_stat
|
||||
{
|
||||
long now; /* Current total stack size. */
|
||||
long maxc; /* Amount of contiguous space which would
|
||||
be required to satisfy the maximum
|
||||
stack demand to date. */
|
||||
long high_water; /* Stack high-water mark. */
|
||||
long overflows; /* Number of stack overflow ($STKOFEN) calls. */
|
||||
long hits; /* Number of internal buffer hits. */
|
||||
long extends; /* Number of block extensions. */
|
||||
long stko_mallocs; /* Block allocations by $STKOFEN. */
|
||||
long underflows; /* Number of stack underflow calls ($STKRETN). */
|
||||
long stko_free; /* Number of deallocations by $STKRETN. */
|
||||
long stkm_free; /* Number of deallocations by $STKMRET. */
|
||||
long segments; /* Current number of stack segments. */
|
||||
long maxs; /* Maximum number of stack segments so far. */
|
||||
long pad_size; /* Stack pad size. */
|
||||
long current_address; /* Current stack segment address. */
|
||||
long current_size; /* Current stack segment size. This
|
||||
number is actually corrupted by STKSTAT to
|
||||
include the fifteen word trailer area. */
|
||||
long initial_address; /* Address of initial segment. */
|
||||
long initial_size; /* Size of initial segment. */
|
||||
};
|
||||
|
||||
/* The following structure describes the data structure which trails
|
||||
any stack segment. I think that the description in 'asdef' is
|
||||
out of date. I only describe the parts that I am sure about. */
|
||||
|
||||
struct stk_trailer
|
||||
{
|
||||
long this_address; /* Address of this block. */
|
||||
long this_size; /* Size of this block (does not include
|
||||
this trailer). */
|
||||
long unknown2;
|
||||
long unknown3;
|
||||
long link; /* Address of trailer block of previous
|
||||
segment. */
|
||||
long unknown5;
|
||||
long unknown6;
|
||||
long unknown7;
|
||||
long unknown8;
|
||||
long unknown9;
|
||||
long unknown10;
|
||||
long unknown11;
|
||||
long unknown12;
|
||||
long unknown13;
|
||||
long unknown14;
|
||||
};
|
||||
|
||||
#endif /* CRAY2 */
|
||||
#endif /* not CRAY_STACK */
|
||||
|
||||
#ifdef CRAY2
|
||||
/* Determine a "stack measure" for an arbitrary ADDRESS.
|
||||
I doubt that "lint" will like this much. */
|
||||
|
||||
static long
|
||||
i00afunc (long *address)
|
||||
{
|
||||
struct stk_stat status;
|
||||
struct stk_trailer *trailer;
|
||||
long *block, size;
|
||||
long result = 0;
|
||||
|
||||
/* We want to iterate through all of the segments. The first
|
||||
step is to get the stack status structure. We could do this
|
||||
more quickly and more directly, perhaps, by referencing the
|
||||
$LM00 common block, but I know that this works. */
|
||||
|
||||
STKSTAT (&status);
|
||||
|
||||
/* Set up the iteration. */
|
||||
|
||||
trailer = (struct stk_trailer *) (status.current_address
|
||||
+ status.current_size
|
||||
- 15);
|
||||
|
||||
/* There must be at least one stack segment. Therefore it is
|
||||
a fatal error if "trailer" is null. */
|
||||
|
||||
if (trailer == 0)
|
||||
abort ();
|
||||
|
||||
/* Discard segments that do not contain our argument address. */
|
||||
|
||||
while (trailer != 0)
|
||||
{
|
||||
block = (long *) trailer->this_address;
|
||||
size = trailer->this_size;
|
||||
if (block == 0 || size == 0)
|
||||
abort ();
|
||||
trailer = (struct stk_trailer *) trailer->link;
|
||||
if ((block <= address) && (address < (block + size)))
|
||||
break;
|
||||
}
|
||||
|
||||
/* Set the result to the offset in this segment and add the sizes
|
||||
of all predecessor segments. */
|
||||
|
||||
result = address - block;
|
||||
|
||||
if (trailer == 0)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
if (trailer->this_size <= 0)
|
||||
abort ();
|
||||
result += trailer->this_size;
|
||||
trailer = (struct stk_trailer *) trailer->link;
|
||||
}
|
||||
while (trailer != 0);
|
||||
|
||||
/* We are done. Note that if you present a bogus address (one
|
||||
not in any segment), you will get a different number back, formed
|
||||
from subtracting the address of the first block. This is probably
|
||||
not what you want. */
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
#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
|
||||
routine is to linearize, in some sense, stack addresses
|
||||
for alloca. */
|
||||
|
||||
static long
|
||||
i00afunc (long address)
|
||||
{
|
||||
long stkl = 0;
|
||||
|
||||
long size, pseg, this_segment, stack;
|
||||
long result = 0;
|
||||
|
||||
struct stack_segment_linkage *ssptr;
|
||||
|
||||
/* Register B67 contains the address of the end of the
|
||||
current stack segment. If you (as a subprogram) store
|
||||
your registers on the stack and find that you are past
|
||||
the contents of B67, you have overflowed the segment.
|
||||
|
||||
B67 also points to the stack segment linkage control
|
||||
area, which is what we are really interested in. */
|
||||
|
||||
stkl = CRAY_STACKSEG_END ();
|
||||
ssptr = (struct stack_segment_linkage *) stkl;
|
||||
|
||||
/* If one subtracts 'size' from the end of the segment,
|
||||
one has the address of the first word of the segment.
|
||||
|
||||
If this is not the first segment, 'pseg' will be
|
||||
nonzero. */
|
||||
|
||||
pseg = ssptr->sspseg;
|
||||
size = ssptr->sssize;
|
||||
|
||||
this_segment = stkl - size;
|
||||
|
||||
/* It is possible that calling this routine itself caused
|
||||
a stack overflow. Discard stack segments which do not
|
||||
contain the target address. */
|
||||
|
||||
while (!(this_segment <= address && address <= stkl))
|
||||
{
|
||||
#ifdef DEBUG_I00AFUNC
|
||||
fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl);
|
||||
#endif
|
||||
if (pseg == 0)
|
||||
break;
|
||||
stkl = stkl - pseg;
|
||||
ssptr = (struct stack_segment_linkage *) stkl;
|
||||
size = ssptr->sssize;
|
||||
pseg = ssptr->sspseg;
|
||||
this_segment = stkl - size;
|
||||
}
|
||||
|
||||
result = address - this_segment;
|
||||
|
||||
/* If you subtract pseg from the current end of the stack,
|
||||
you get the address of the previous stack segment's end.
|
||||
This seems a little convoluted to me, but I'll bet you save
|
||||
a cycle somewhere. */
|
||||
|
||||
while (pseg != 0)
|
||||
{
|
||||
#ifdef DEBUG_I00AFUNC
|
||||
fprintf (stderr, "%011o %011o\n", pseg, size);
|
||||
#endif
|
||||
stkl = stkl - pseg;
|
||||
ssptr = (struct stack_segment_linkage *) stkl;
|
||||
size = ssptr->sssize;
|
||||
pseg = ssptr->sspseg;
|
||||
result += size;
|
||||
}
|
||||
return (result);
|
||||
}
|
||||
|
||||
#endif /* not CRAY2 */
|
||||
#endif /* CRAY */
|
||||
|
||||
#endif /* no alloca */
|
||||
#endif /* not GCC version 2 */
|
||||
+17
-8
@@ -15,27 +15,38 @@ GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bison; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include "system.h"
|
||||
|
||||
#ifdef NEED_DECLARATION_CALLOC
|
||||
#if defined (__STDC__) || defined (_MSC_VER)
|
||||
extern void *calloc ();
|
||||
extern void *realloc ();
|
||||
#else
|
||||
extern char *calloc ();
|
||||
#endif
|
||||
#endif /* NEED_DECLARATION_CALLOC */
|
||||
|
||||
#ifdef NEED_DECLARATION_REALLOC
|
||||
#if defined (__STDC__) || defined (_MSC_VER)
|
||||
extern void *realloc ();
|
||||
#else
|
||||
extern char *realloc ();
|
||||
#endif
|
||||
#endif /* NEED_DECLARATION_REALLOC */
|
||||
|
||||
extern void done ();
|
||||
char *xmalloc PARAMS((register unsigned));
|
||||
char *xrealloc PARAMS((register char *, register unsigned));
|
||||
|
||||
extern void done PARAMS((int));
|
||||
|
||||
extern char *program_name;
|
||||
|
||||
char *
|
||||
xmalloc (n)
|
||||
register unsigned n;
|
||||
xmalloc (register unsigned n)
|
||||
{
|
||||
register char *block;
|
||||
|
||||
@@ -53,9 +64,7 @@ xmalloc (n)
|
||||
}
|
||||
|
||||
char *
|
||||
xrealloc (block, n)
|
||||
register char *block;
|
||||
register unsigned n;
|
||||
xrealloc (register char *block, register unsigned n)
|
||||
{
|
||||
/* Avoid uncertainty about what an arg of 0 will do. */
|
||||
if (n == 0)
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
!
|
||||
! VMS BISON command definition file
|
||||
!
|
||||
DEFINE VERB BISON
|
||||
IMAGE GNU_BISON:[000000]BISON
|
||||
|
||||
PARAMETER P1,Label=BISON$INFILE,Prompt="File"
|
||||
value(required,type=$infile)
|
||||
QUALIFIER VERBOSE,Label=BISON$VERBOSE
|
||||
QUALIFIER DEFINES,Label=BISON$DEFINES
|
||||
QUALIFIER FIXED_OUTFILES,Label=BISON$FIXED_OUTFILES
|
||||
QUALIFIER NOPARSER,Label=BISON$NOPARSER
|
||||
QUALIFIER RAW,LABEL=BISON$RAW
|
||||
QUALIFIER TOKEN_TABLE,LABEL=BISON$TOKEN_TABLE
|
||||
qualifier nolines,Label=BISON$NOLINES
|
||||
qualifier debug,Label=BISON$DEBUG
|
||||
qualifier output,value(type=$outfile),Label=BISON$OUTPUT
|
||||
qualifier version,label=BISON$VERSION
|
||||
qualifier yacc,label=BISON$YACC
|
||||
qualifier file_prefix,value(type=$outfile),label=BISON$FILE_PREFIX
|
||||
qualifier name_prefix,value(type=$outfile),LABEL=BISON$NAME_PREFIX
|
||||
+4
-3
@@ -17,7 +17,8 @@
|
||||
|
||||
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., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* As a special exception, when this file is copied by Bison into a
|
||||
Bison output file, you may use that output file without restriction.
|
||||
@@ -212,7 +213,7 @@ __yy_memcpy (char *to, char *from, unsigned int count)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#line 216 "bison.simple"
|
||||
#line 217 "bison.simple"
|
||||
|
||||
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
|
||||
into yyparse. The argument should have type void *.
|
||||
@@ -538,7 +539,7 @@ yyreduce:
|
||||
#endif
|
||||
|
||||
$ /* the action file gets copied in in place of this dollarsign */
|
||||
#line 542 "bison.simple"
|
||||
#line 543 "bison.simple"
|
||||
|
||||
yyvsp -= yylen;
|
||||
yyssp -= yylen;
|
||||
|
||||
+4
-3
@@ -17,7 +17,8 @@
|
||||
|
||||
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., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* As a special exception, when this file is copied by Bison into a
|
||||
Bison output file, you may use that output file without restriction.
|
||||
@@ -212,7 +213,7 @@ __yy_memcpy (char *to, char *from, unsigned int count)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#line 216 "bison.simple"
|
||||
#line 217 "bison.simple"
|
||||
|
||||
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
|
||||
into yyparse. The argument should have type void *.
|
||||
@@ -538,7 +539,7 @@ yyreduce:
|
||||
#endif
|
||||
|
||||
$ /* the action file gets copied in in place of this dollarsign */
|
||||
#line 542 "bison.simple"
|
||||
#line 543 "bison.simple"
|
||||
|
||||
yyvsp -= yylen;
|
||||
yyssp -= yylen;
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
$! Set the def dir to proper place for use in batch. Works for interactive too.
|
||||
$flnm = f$enviroment("PROCEDURE") ! get current procedure name
|
||||
$set default 'f$parse(flnm,,,"DEVICE")''f$parse(flnm,,,"DIRECTORY")'
|
||||
$!
|
||||
$! This command procedure compiles and links BISON for VMS.
|
||||
$! BISON has been tested with VAXC version 2.3 and VMS version 4.5
|
||||
$! and on VMS 4.5 with GCC 1.12.
|
||||
$!
|
||||
$! Bj|rn Larsen [email protected]
|
||||
$! With some contributions by Gabor Karsai,
|
||||
$! KARSAIG1%[email protected]
|
||||
$! All merged and cleaned by RMS.
|
||||
$!
|
||||
$! Adapted for both VAX-11 "C" and VMS/GCC compilation by
|
||||
$! David L. Kashtan kashtan.iu.ai.sri.com
|
||||
$!
|
||||
$! First we try to sense which C compiler we have available. Sensing logic
|
||||
$! borrowed from Emacs.
|
||||
$!
|
||||
$set noon !do not bomb if an error occurs.
|
||||
$assign nla0: sys$output
|
||||
$assign nla0: sys$error !so we do not get an error message about this.
|
||||
$cc nla0:compiler_check.c
|
||||
$if $status.eq.%x38090 then goto try_gcc
|
||||
$ CC :== CC
|
||||
$ cc_options:="/NOLIST/define=(""index=strchr"",""rindex=strrchr"")"
|
||||
$ extra_linker_files:="VMSHLP,"
|
||||
$goto have_compiler
|
||||
$!
|
||||
$try_gcc:
|
||||
$gcc nla0:compiler_check.c
|
||||
$if $status.eq.%x38090 then goto whoops
|
||||
$ CC :== GCC
|
||||
$ cc_options:="/DEBUG"
|
||||
$ extra_linker_files:="GNU_CC:[000000]GCCLIB/LIB,"
|
||||
$goto have_compiler
|
||||
$!
|
||||
$whoops:
|
||||
$write sys$output "You must have a C compiler to build BISON. Sorry."
|
||||
$deassign sys$output
|
||||
$deassign sys$error
|
||||
$exit %x38090
|
||||
$!
|
||||
$!
|
||||
$have_compiler:
|
||||
$deassign sys$output
|
||||
$deassign sys$error
|
||||
$set on
|
||||
$if f$search("compiler_check.obj").nes."" then dele/nolog compiler_check.obj;
|
||||
$write sys$output "Building BISON with the ''cc' compiler."
|
||||
$!
|
||||
$! Do the compilation (compiler type is all set up)
|
||||
$!
|
||||
$ Compile:
|
||||
$ if "''p1'" .eqs. "LINK" then goto Link
|
||||
$ 'CC' 'cc_options' files.c
|
||||
$ 'CC' 'cc_options' LR0.C
|
||||
$ 'CC' 'cc_options' ALLOCATE.C
|
||||
$ 'CC' 'cc_options' CLOSURE.C
|
||||
$ 'CC' 'cc_options' CONFLICTS.C
|
||||
$ 'CC' 'cc_options' DERIVES.C
|
||||
$ 'CC' 'cc_options' VMSGETARGS.C
|
||||
$ 'CC' 'cc_options' GRAM.C
|
||||
$ 'CC' 'cc_options' LALR.C
|
||||
$ 'CC' 'cc_options' LEX.C
|
||||
$ 'CC' 'cc_options' MAIN.C
|
||||
$ 'CC' 'cc_options' NULLABLE.C
|
||||
$ 'CC' 'cc_options' OUTPUT.C
|
||||
$ 'CC' 'cc_options' PRINT.C
|
||||
$ 'CC' 'cc_options' READER.C
|
||||
$ 'CC' 'cc_options' REDUCE.C
|
||||
$ 'CC' 'cc_options' SYMTAB.C
|
||||
$ 'CC' 'cc_options' WARSHALL.C
|
||||
$ 'CC' 'cc_options' VERSION.C
|
||||
$ if "''CC'" .eqs. "CC" then macro vmshlp.mar
|
||||
$ Link:
|
||||
$ link/exec=bison main,LR0,allocate,closure,conflicts,derives,files,-
|
||||
vmsgetargs,gram,lalr,lex,nullable,output,print,reader,reduce,symtab,warshall,-
|
||||
version,'extra_linker_files'sys$library:vaxcrtl/lib
|
||||
$!
|
||||
$! Generate bison.hlp (for online help).
|
||||
$!
|
||||
$runoff bison.rnh
|
||||
+17
-16
@@ -15,7 +15,8 @@ GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bison; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
/* subroutines of file LR0.c.
|
||||
@@ -58,10 +59,13 @@ Frees itemset, ruleset and internal data.
|
||||
extern short **derives;
|
||||
extern char **tags;
|
||||
|
||||
void set_fderives();
|
||||
void set_firsts();
|
||||
void initialize_closure PARAMS((int));
|
||||
void set_fderives PARAMS((void));
|
||||
void set_firsts PARAMS((void));
|
||||
void closure PARAMS((short *, int));
|
||||
void finalize_closure PARAMS((void));
|
||||
|
||||
extern void RTC();
|
||||
extern void RTC PARAMS((unsigned *, int));
|
||||
|
||||
short *itemset;
|
||||
short *itemsetend;
|
||||
@@ -79,8 +83,7 @@ static int varsetsize;
|
||||
|
||||
|
||||
void
|
||||
initialize_closure(n)
|
||||
int n;
|
||||
initialize_closure (int n)
|
||||
{
|
||||
itemset = NEW2(n, short);
|
||||
|
||||
@@ -98,7 +101,7 @@ int n;
|
||||
the sequence of symbols 8 3 20, and one of the rules for deriving
|
||||
symbol 8 is rule 4, then the [5 - ntokens, 4] bit in fderives is set. */
|
||||
void
|
||||
set_fderives()
|
||||
set_fderives (void)
|
||||
{
|
||||
register unsigned *rrow;
|
||||
register unsigned *vrow;
|
||||
@@ -158,7 +161,7 @@ set_fderives()
|
||||
the symbol 8 can be the beginning of the data for symbol 5,
|
||||
so the bit [8 - ntokens, 5 - ntokens] in firsts is set. */
|
||||
void
|
||||
set_firsts()
|
||||
set_firsts (void)
|
||||
{
|
||||
register unsigned *row;
|
||||
/* register int done; JF unused */
|
||||
@@ -198,9 +201,7 @@ set_firsts()
|
||||
|
||||
|
||||
void
|
||||
closure(core, n)
|
||||
short *core;
|
||||
int n;
|
||||
closure (short *core, int n)
|
||||
{
|
||||
register int ruleno;
|
||||
register unsigned word;
|
||||
@@ -282,7 +283,7 @@ int n;
|
||||
|
||||
|
||||
void
|
||||
finalize_closure()
|
||||
finalize_closure (void)
|
||||
{
|
||||
FREE(itemset);
|
||||
FREE(ruleset);
|
||||
@@ -304,8 +305,8 @@ int n;
|
||||
}
|
||||
|
||||
|
||||
|
||||
print_firsts()
|
||||
void
|
||||
print_firsts (void)
|
||||
{
|
||||
register int i;
|
||||
register int j;
|
||||
@@ -326,8 +327,8 @@ print_firsts()
|
||||
}
|
||||
|
||||
|
||||
|
||||
print_fderives()
|
||||
void
|
||||
print_fderives (void)
|
||||
{
|
||||
register int i;
|
||||
register int j;
|
||||
|
||||
+28
-33
@@ -15,7 +15,8 @@ GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bison; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include "system.h"
|
||||
@@ -35,14 +36,20 @@ extern unsigned *LA;
|
||||
extern short *LAruleno;
|
||||
extern short *lookaheads;
|
||||
extern int verboseflag;
|
||||
extern int fixed_outfiles;
|
||||
|
||||
void set_conflicts();
|
||||
void resolve_sr_conflict();
|
||||
void flush_shift();
|
||||
void log_resolution();
|
||||
void total_conflicts();
|
||||
void count_sr_conflicts();
|
||||
void count_rr_conflicts();
|
||||
void initialize_conflicts PARAMS((void));
|
||||
void set_conflicts PARAMS((int));
|
||||
void resolve_sr_conflict PARAMS((int, int));
|
||||
void flush_shift PARAMS((int, int));
|
||||
void log_resolution PARAMS((int, int, int, char *));
|
||||
void conflict_log PARAMS((void));
|
||||
void verbose_conflict_log PARAMS((void));
|
||||
void total_conflicts PARAMS((void));
|
||||
void count_sr_conflicts PARAMS((int));
|
||||
void count_rr_conflicts PARAMS((int));
|
||||
void print_reductions PARAMS((int));
|
||||
void finalize_conflicts PARAMS((void));
|
||||
|
||||
char any_conflicts;
|
||||
char *conflicts;
|
||||
@@ -59,7 +66,7 @@ static int rrc_count;
|
||||
|
||||
|
||||
void
|
||||
initialize_conflicts()
|
||||
initialize_conflicts (void)
|
||||
{
|
||||
register int i;
|
||||
/* register errs *sp; JF unused */
|
||||
@@ -78,8 +85,7 @@ initialize_conflicts()
|
||||
|
||||
|
||||
void
|
||||
set_conflicts(state)
|
||||
int state;
|
||||
set_conflicts (int state)
|
||||
{
|
||||
register int i;
|
||||
register int k;
|
||||
@@ -165,9 +171,7 @@ A conflict is resolved by modifying the shift or reduce tables
|
||||
so that there is no longer a conflict. */
|
||||
|
||||
void
|
||||
resolve_sr_conflict(state, lookaheadnum)
|
||||
int state;
|
||||
int lookaheadnum;
|
||||
resolve_sr_conflict (int state, int lookaheadnum)
|
||||
{
|
||||
register int i;
|
||||
register int mask;
|
||||
@@ -268,9 +272,7 @@ int lookaheadnum;
|
||||
Used when we resolve a shift-reduce conflict in favor of the reduction. */
|
||||
|
||||
void
|
||||
flush_shift(state, token)
|
||||
int state;
|
||||
int token;
|
||||
flush_shift (int state, int token)
|
||||
{
|
||||
register shifts *shiftp;
|
||||
register int k, i;
|
||||
@@ -291,9 +293,7 @@ int token;
|
||||
|
||||
|
||||
void
|
||||
log_resolution(state, LAno, token, resolution)
|
||||
int state, LAno, token;
|
||||
char *resolution;
|
||||
log_resolution (int state, int LAno, int token, char *resolution)
|
||||
{
|
||||
fprintf(foutput,
|
||||
_("Conflict in state %d between rule %d and token %s resolved as %s.\n"),
|
||||
@@ -302,7 +302,7 @@ char *resolution;
|
||||
|
||||
|
||||
void
|
||||
conflict_log()
|
||||
conflict_log (void)
|
||||
{
|
||||
register int i;
|
||||
|
||||
@@ -325,7 +325,7 @@ conflict_log()
|
||||
|
||||
|
||||
void
|
||||
verbose_conflict_log()
|
||||
verbose_conflict_log (void)
|
||||
{
|
||||
register int i;
|
||||
|
||||
@@ -366,10 +366,8 @@ verbose_conflict_log()
|
||||
|
||||
|
||||
void
|
||||
total_conflicts()
|
||||
total_conflicts (void)
|
||||
{
|
||||
extern int fixed_outfiles;
|
||||
|
||||
if (src_total == expected_conflicts && rrc_total == 0)
|
||||
return;
|
||||
|
||||
@@ -410,8 +408,7 @@ total_conflicts()
|
||||
|
||||
|
||||
void
|
||||
count_sr_conflicts(state)
|
||||
int state;
|
||||
count_sr_conflicts (int state)
|
||||
{
|
||||
register int i;
|
||||
register int k;
|
||||
@@ -478,8 +475,7 @@ int state;
|
||||
|
||||
|
||||
void
|
||||
count_rr_conflicts(state)
|
||||
int state;
|
||||
count_rr_conflicts (int state)
|
||||
{
|
||||
register int i;
|
||||
register int j;
|
||||
@@ -525,8 +521,7 @@ int state;
|
||||
|
||||
|
||||
void
|
||||
print_reductions(state)
|
||||
int state;
|
||||
print_reductions (int state)
|
||||
{
|
||||
register int i;
|
||||
register int j;
|
||||
@@ -541,7 +536,7 @@ int state;
|
||||
register int m;
|
||||
register int n;
|
||||
register int default_LA;
|
||||
register int default_rule;
|
||||
register int default_rule = 0;
|
||||
register int cmax;
|
||||
register int count;
|
||||
register shifts *shiftp;
|
||||
@@ -745,7 +740,7 @@ int state;
|
||||
|
||||
|
||||
void
|
||||
finalize_conflicts()
|
||||
finalize_conflicts (void)
|
||||
{
|
||||
FREE(conflicts);
|
||||
FREE(shiftset);
|
||||
|
||||
+8
-5
@@ -15,7 +15,8 @@ GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bison; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
/* set_derives finds, for each variable (nonterminal), which rules can derive it.
|
||||
@@ -29,11 +30,13 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
#include "types.h"
|
||||
#include "gram.h"
|
||||
|
||||
void set_derives PARAMS((void));
|
||||
void free_derives PARAMS((void));
|
||||
|
||||
short **derives;
|
||||
|
||||
void
|
||||
set_derives()
|
||||
set_derives (void)
|
||||
{
|
||||
register int i;
|
||||
register int lhs;
|
||||
@@ -82,7 +85,7 @@ set_derives()
|
||||
}
|
||||
|
||||
void
|
||||
free_derives()
|
||||
free_derives (void)
|
||||
{
|
||||
FREE(derives[ntokens]);
|
||||
FREE(derives + ntokens);
|
||||
@@ -92,7 +95,8 @@ free_derives()
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
print_derives()
|
||||
void
|
||||
print_derives (void)
|
||||
{
|
||||
register int i;
|
||||
register short *sp;
|
||||
@@ -115,4 +119,3 @@ print_derives()
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
+67
-40
@@ -15,9 +15,12 @@ GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bison; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
#include "system.h"
|
||||
|
||||
#if defined (VMS) & !defined (__VMS_POSIX)
|
||||
#include <ssdef.h>
|
||||
#define unlink delete
|
||||
@@ -39,7 +42,11 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include "system.h"
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "files.h"
|
||||
#include "alloc.h"
|
||||
#include "gram.h"
|
||||
@@ -72,8 +79,13 @@ extern int noparserflag;
|
||||
extern char *mktemp(); /* So the compiler won't complain */
|
||||
extern char *getenv();
|
||||
extern void perror();
|
||||
FILE *tryopen(); /* This might be a good idea */
|
||||
void done();
|
||||
|
||||
char *stringappend PARAMS((char *, int, char *));
|
||||
void openfiles PARAMS((void));
|
||||
void open_extra_files PARAMS((void));
|
||||
FILE *tryopen PARAMS((char *, char *)); /* This might be a good idea */
|
||||
int tryclose PARAMS((FILE *));
|
||||
void done PARAMS((int));
|
||||
|
||||
extern char *program_name;
|
||||
extern int verboseflag;
|
||||
@@ -81,11 +93,8 @@ extern int definesflag;
|
||||
int fixed_outfiles = 0;
|
||||
|
||||
|
||||
char*
|
||||
stringappend(string1, end1, string2)
|
||||
char *string1;
|
||||
int end1;
|
||||
char *string2;
|
||||
char *
|
||||
stringappend (char *string1, int end1, char *string2)
|
||||
{
|
||||
register char *ostring;
|
||||
register char *cp, *cp1;
|
||||
@@ -102,7 +111,8 @@ char *string2;
|
||||
*cp++ = *cp1++;
|
||||
|
||||
cp1 = string2;
|
||||
while (*cp++ = *cp1++) ;
|
||||
while ((*cp++ = *cp1++))
|
||||
;
|
||||
|
||||
return ostring;
|
||||
}
|
||||
@@ -111,10 +121,12 @@ char *string2;
|
||||
/* JF this has been hacked to death. Nowaday it sets up the file names for
|
||||
the output files, and opens the tmp files and the parser */
|
||||
void
|
||||
openfiles()
|
||||
openfiles (void)
|
||||
{
|
||||
char *name_base;
|
||||
#ifdef MSDOS
|
||||
register char *cp;
|
||||
#endif
|
||||
char *filename;
|
||||
int base_length;
|
||||
int short_base_length;
|
||||
@@ -142,6 +154,15 @@ openfiles()
|
||||
strlwr (infile);
|
||||
#endif /* _WIN32 && !__CYGWIN32__ */
|
||||
|
||||
#if (defined(unix) || defined(__unix) || defined(__unix__))
|
||||
{
|
||||
char *tmp_ptr = getenv("TMPDIR");
|
||||
|
||||
if (tmp_ptr != 0)
|
||||
tmp_base = stringappend (tmp_ptr, strlen (tmp_ptr), "/b.");
|
||||
}
|
||||
#endif /* unix || __unix || __unix__ */
|
||||
|
||||
tmp_len = strlen (tmp_base);
|
||||
|
||||
if (spec_outfile)
|
||||
@@ -306,14 +327,16 @@ openfiles()
|
||||
This is done when %semantic_parser is seen in the declarations section. */
|
||||
|
||||
void
|
||||
open_extra_files()
|
||||
open_extra_files (void)
|
||||
{
|
||||
FILE *ftmp;
|
||||
int c;
|
||||
char *filename, *cp;
|
||||
char *filename;
|
||||
#ifdef MSDOS
|
||||
char *cp;
|
||||
#endif
|
||||
|
||||
if (fparser)
|
||||
fclose(fparser);
|
||||
tryclose(fparser);
|
||||
|
||||
if (! noparserflag)
|
||||
{
|
||||
@@ -338,7 +361,7 @@ open_extra_files()
|
||||
rewind(fattrs);
|
||||
while((c=getc(fattrs))!=EOF) /* Thank god for buffering */
|
||||
putc(c,ftmp);
|
||||
fclose(fattrs);
|
||||
tryclose(fattrs);
|
||||
fattrs=ftmp;
|
||||
|
||||
fguard = tryopen(guardfile, "w");
|
||||
@@ -348,9 +371,7 @@ open_extra_files()
|
||||
/* JF to make file opening easier. This func tries to open file
|
||||
NAME with mode MODE, and prints an error message if it fails. */
|
||||
FILE *
|
||||
tryopen(name, mode)
|
||||
char *name;
|
||||
char *mode;
|
||||
tryopen (char *name, char *mode)
|
||||
{
|
||||
FILE *ptr;
|
||||
|
||||
@@ -364,27 +385,33 @@ char *mode;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
void
|
||||
done(k)
|
||||
int k;
|
||||
int
|
||||
tryclose (FILE *ptr)
|
||||
{
|
||||
if (faction)
|
||||
fclose(faction);
|
||||
int result;
|
||||
|
||||
if (fattrs)
|
||||
fclose(fattrs);
|
||||
if (ptr == NULL)
|
||||
return 0;
|
||||
|
||||
if (fguard)
|
||||
fclose(fguard);
|
||||
result = fclose (ptr);
|
||||
if (result == EOF)
|
||||
{
|
||||
fprintf (stderr, "%s: ", program_name);
|
||||
perror ("fclose");
|
||||
done (2);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
if (finput)
|
||||
fclose(finput);
|
||||
|
||||
if (fparser)
|
||||
fclose(fparser);
|
||||
|
||||
if (foutput)
|
||||
fclose(foutput);
|
||||
void
|
||||
done (int k)
|
||||
{
|
||||
tryclose(faction);
|
||||
tryclose(fattrs);
|
||||
tryclose(fguard);
|
||||
tryclose(finput);
|
||||
tryclose(fparser);
|
||||
tryclose(foutput);
|
||||
|
||||
/* JF write out the output file */
|
||||
if (k == 0 && ftable)
|
||||
@@ -396,8 +423,8 @@ int k;
|
||||
rewind(ftable);
|
||||
while((c=getc(ftable)) != EOF)
|
||||
putc(c,ftmp);
|
||||
fclose(ftmp);
|
||||
fclose(ftable);
|
||||
tryclose(ftmp);
|
||||
tryclose(ftable);
|
||||
|
||||
if (definesflag)
|
||||
{
|
||||
@@ -406,8 +433,8 @@ int k;
|
||||
rewind(fdefines);
|
||||
while((c=getc(fdefines)) != EOF)
|
||||
putc(c,ftmp);
|
||||
fclose(ftmp);
|
||||
fclose(fdefines);
|
||||
tryclose(ftmp);
|
||||
tryclose(fdefines);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -15,12 +15,13 @@ GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bison; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
/* These two should be pathnames for opening the sample parser files.
|
||||
When bison is installed, they should be absolute pathnames.
|
||||
XPFILE1 and XPFILE2 normally come from the Makefile. */
|
||||
XPFILE1 and XPFILE2 normally come from config.h. */
|
||||
|
||||
#define PFILE XPFILE /* Simple parser */
|
||||
#define PFILE1 XPFILE1 /* Semantic parser */
|
||||
|
||||
+12
-11
@@ -15,7 +15,8 @@ GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bison; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -34,10 +35,12 @@ char *spec_name_prefix; /* for -p. */
|
||||
char *spec_file_prefix; /* for -b. */
|
||||
extern int fixed_outfiles;/* for -y */
|
||||
|
||||
extern char *program_name;
|
||||
extern char *version_string;
|
||||
void usage PARAMS((FILE *));
|
||||
void getargs PARAMS((int, char *[]));
|
||||
|
||||
extern void warns(); /* main.c */
|
||||
extern char *program_name;
|
||||
|
||||
extern void warns PARAMS((char *, char *)); /* main.c */
|
||||
|
||||
struct option longopts[] =
|
||||
{
|
||||
@@ -60,8 +63,7 @@ struct option longopts[] =
|
||||
};
|
||||
|
||||
void
|
||||
usage (stream)
|
||||
FILE *stream;
|
||||
usage (FILE *stream)
|
||||
{
|
||||
fprintf (stream, _("\
|
||||
Usage: %s [-dhklntvyV] [-b file-prefix] [-o outfile] [-p name-prefix]\n\
|
||||
@@ -69,14 +71,13 @@ Usage: %s [-dhklntvyV] [-b file-prefix] [-o outfile] [-p name-prefix]\n\
|
||||
[--verbose] [--version] [--help] [--yacc]\n\
|
||||
[--no-parser] [--token-table]\n\
|
||||
[--file-prefix=prefix] [--name-prefix=prefix]\n\
|
||||
[--output=outfile] grammar-file\n"),
|
||||
[--output=outfile] grammar-file\n\n\
|
||||
Report bugs to [email protected]\n"),
|
||||
program_name);
|
||||
}
|
||||
|
||||
void
|
||||
getargs(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
getargs (int argc, char *argv[])
|
||||
{
|
||||
register int c;
|
||||
|
||||
@@ -106,7 +107,7 @@ getargs(argc, argv)
|
||||
exit (0);
|
||||
|
||||
case 'V':
|
||||
printf ("%s", version_string);
|
||||
printf ("%s\n", VERSION_STRING);
|
||||
exit (0);
|
||||
|
||||
case 'v':
|
||||
|
||||
+1052
File diff suppressed because it is too large
Load Diff
+133
@@ -0,0 +1,133 @@
|
||||
/* Declarations for getopt.
|
||||
Copyright (C) 1989,90,91,92,93,94,96,97 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.
|
||||
|
||||
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 _GETOPT_H
|
||||
#define _GETOPT_H 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* For communication from `getopt' to the caller.
|
||||
When `getopt' finds an option that takes an argument,
|
||||
the argument value is returned here.
|
||||
Also, when `ordering' is RETURN_IN_ORDER,
|
||||
each non-option ARGV-element is returned here. */
|
||||
|
||||
extern char *optarg;
|
||||
|
||||
/* Index in ARGV of the next element to be scanned.
|
||||
This is used for communication to and from the caller
|
||||
and for communication between successive calls to `getopt'.
|
||||
|
||||
On entry to `getopt', zero means this is the first call; initialize.
|
||||
|
||||
When `getopt' returns -1, this is the index of the first of the
|
||||
non-option elements that the caller should itself scan.
|
||||
|
||||
Otherwise, `optind' communicates from one call to the next
|
||||
how much of ARGV has been scanned so far. */
|
||||
|
||||
extern int optind;
|
||||
|
||||
/* Callers store zero here to inhibit the error message `getopt' prints
|
||||
for unrecognized options. */
|
||||
|
||||
extern int opterr;
|
||||
|
||||
/* Set to an option character which was unrecognized. */
|
||||
|
||||
extern int optopt;
|
||||
|
||||
/* Describe the long-named options requested by the application.
|
||||
The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
|
||||
of `struct option' terminated by an element containing a name which is
|
||||
zero.
|
||||
|
||||
The field `has_arg' is:
|
||||
no_argument (or 0) if the option does not take an argument,
|
||||
required_argument (or 1) if the option requires an argument,
|
||||
optional_argument (or 2) if the option takes an optional argument.
|
||||
|
||||
If the field `flag' is not NULL, it points to a variable that is set
|
||||
to the value given in the field `val' when the option is found, but
|
||||
left unchanged if the option is not found.
|
||||
|
||||
To have a long-named option do something other than set an `int' to
|
||||
a compiled-in constant, such as set a value from `optarg', set the
|
||||
option's `flag' field to zero and its `val' field to a nonzero
|
||||
value (the equivalent single-letter option character, if there is
|
||||
one). For long options that have a zero `flag' field, `getopt'
|
||||
returns the contents of the `val' field. */
|
||||
|
||||
struct option
|
||||
{
|
||||
#if defined (__STDC__) && __STDC__
|
||||
const char *name;
|
||||
#else
|
||||
char *name;
|
||||
#endif
|
||||
/* has_arg can't be an enum because some compilers complain about
|
||||
type mismatches in all the code that assumes it is an int. */
|
||||
int has_arg;
|
||||
int *flag;
|
||||
int val;
|
||||
};
|
||||
|
||||
/* Names for the values of the `has_arg' field of `struct option'. */
|
||||
|
||||
#define no_argument 0
|
||||
#define required_argument 1
|
||||
#define optional_argument 2
|
||||
|
||||
#if defined (__STDC__) && __STDC__
|
||||
#ifdef __GNU_LIBRARY__
|
||||
/* Many other libraries have conflicting prototypes for getopt, with
|
||||
differences in the consts, in stdlib.h. To avoid compilation
|
||||
errors, only prototype getopt for the GNU C library. */
|
||||
extern int getopt (int argc, char *const *argv, const char *shortopts);
|
||||
#else /* not __GNU_LIBRARY__ */
|
||||
extern int getopt ();
|
||||
#endif /* __GNU_LIBRARY__ */
|
||||
extern int getopt_long (int argc, char *const *argv, const char *shortopts,
|
||||
const struct option *longopts, int *longind);
|
||||
extern int getopt_long_only (int argc, char *const *argv,
|
||||
const char *shortopts,
|
||||
const struct option *longopts, int *longind);
|
||||
|
||||
/* Internal only. Users should not call this directly. */
|
||||
extern int _getopt_internal (int argc, char *const *argv,
|
||||
const char *shortopts,
|
||||
const struct option *longopts, int *longind,
|
||||
int long_only);
|
||||
#else /* not __STDC__ */
|
||||
extern int getopt ();
|
||||
extern int getopt_long ();
|
||||
extern int getopt_long_only ();
|
||||
|
||||
extern int _getopt_internal ();
|
||||
#endif /* __STDC__ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* getopt.h */
|
||||
+190
@@ -0,0 +1,190 @@
|
||||
/* 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 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. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "getopt.h"
|
||||
|
||||
#if !defined __STDC__ || !__STDC__
|
||||
/* This is a separate conditional since some stdc systems
|
||||
reject `defined (const)'. */
|
||||
#ifndef const
|
||||
#define const
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/* Comment out all this code if we are using the GNU C Library, and are not
|
||||
actually compiling the library itself. This code is part of the GNU C
|
||||
Library, but also included in many other GNU distributions. Compiling
|
||||
and linking in this code is a waste when using the GNU C library
|
||||
(especially if it is a shared library). Rather than having every GNU
|
||||
program understand `configure --with-gnu-libc' and omit the object files,
|
||||
it is simpler to just do this in the source for each such file. */
|
||||
|
||||
#define GETOPT_INTERFACE_VERSION 2
|
||||
#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
|
||||
#include <gnu-versions.h>
|
||||
#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
|
||||
#define ELIDE_CODE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef ELIDE_CODE
|
||||
|
||||
|
||||
/* This needs to come after some library #include
|
||||
to get __GNU_LIBRARY__ defined. */
|
||||
#ifdef __GNU_LIBRARY__
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
|
||||
int
|
||||
getopt_long (argc, argv, options, long_options, opt_index)
|
||||
int argc;
|
||||
char *const *argv;
|
||||
const char *options;
|
||||
const struct option *long_options;
|
||||
int *opt_index;
|
||||
{
|
||||
return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
|
||||
}
|
||||
|
||||
/* Like getopt_long, but '-' as well as '--' can indicate a long option.
|
||||
If an option that starts with '-' (not '--') doesn't match a long option,
|
||||
but does match a short option, it is parsed as a short option
|
||||
instead. */
|
||||
|
||||
int
|
||||
getopt_long_only (argc, argv, options, long_options, opt_index)
|
||||
int argc;
|
||||
char *const *argv;
|
||||
const char *options;
|
||||
const struct option *long_options;
|
||||
int *opt_index;
|
||||
{
|
||||
return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
|
||||
}
|
||||
|
||||
|
||||
#endif /* Not ELIDE_CODE. */
|
||||
|
||||
#ifdef TEST
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
int
|
||||
main (argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
{
|
||||
int c;
|
||||
int digit_optind = 0;
|
||||
|
||||
while (1)
|
||||
{
|
||||
int this_option_optind = optind ? optind : 1;
|
||||
int option_index = 0;
|
||||
static struct option long_options[] =
|
||||
{
|
||||
{"add", 1, 0, 0},
|
||||
{"append", 0, 0, 0},
|
||||
{"delete", 1, 0, 0},
|
||||
{"verbose", 0, 0, 0},
|
||||
{"create", 0, 0, 0},
|
||||
{"file", 1, 0, 0},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
c = getopt_long (argc, argv, "abc:d:0123456789",
|
||||
long_options, &option_index);
|
||||
if (c == -1)
|
||||
break;
|
||||
|
||||
switch (c)
|
||||
{
|
||||
case 0:
|
||||
printf ("option %s", long_options[option_index].name);
|
||||
if (optarg)
|
||||
printf (" with arg %s", optarg);
|
||||
printf ("\n");
|
||||
break;
|
||||
|
||||
case '0':
|
||||
case '1':
|
||||
case '2':
|
||||
case '3':
|
||||
case '4':
|
||||
case '5':
|
||||
case '6':
|
||||
case '7':
|
||||
case '8':
|
||||
case '9':
|
||||
if (digit_optind != 0 && digit_optind != this_option_optind)
|
||||
printf ("digits occur in two different argv-elements.\n");
|
||||
digit_optind = this_option_optind;
|
||||
printf ("option %c\n", c);
|
||||
break;
|
||||
|
||||
case 'a':
|
||||
printf ("option a\n");
|
||||
break;
|
||||
|
||||
case 'b':
|
||||
printf ("option b\n");
|
||||
break;
|
||||
|
||||
case 'c':
|
||||
printf ("option c with value `%s'\n", optarg);
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
printf ("option d with value `%s'\n", optarg);
|
||||
break;
|
||||
|
||||
case '?':
|
||||
break;
|
||||
|
||||
default:
|
||||
printf ("?? getopt returned character code 0%o ??\n", c);
|
||||
}
|
||||
}
|
||||
|
||||
if (optind < argc)
|
||||
{
|
||||
printf ("non-option ARGV-elements: ");
|
||||
while (optind < argc)
|
||||
printf ("%s ", argv[optind++]);
|
||||
printf ("\n");
|
||||
}
|
||||
|
||||
exit (0);
|
||||
}
|
||||
|
||||
#endif /* TEST */
|
||||
+3
-2
@@ -15,7 +15,8 @@ GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bison; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
/* comments for these variables are in gram.h */
|
||||
@@ -53,6 +54,6 @@ int error_token_number;
|
||||
when the file in question contains data definitions only. */
|
||||
|
||||
void
|
||||
dummy()
|
||||
dummy (void)
|
||||
{
|
||||
}
|
||||
|
||||
+2
-1
@@ -15,7 +15,8 @@ GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bison; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
/* representation of the grammar rules:
|
||||
|
||||
+39
-45
@@ -15,7 +15,8 @@ GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bison; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
/* Compute how to make the finite state machine deterministic;
|
||||
@@ -73,24 +74,26 @@ short *goto_map;
|
||||
short *from_state;
|
||||
short *to_state;
|
||||
|
||||
short **transpose();
|
||||
void set_state_table();
|
||||
void set_accessing_symbol();
|
||||
void set_shift_table();
|
||||
void set_reduction_table();
|
||||
void set_maxrhs();
|
||||
void initialize_LA();
|
||||
void set_goto_map();
|
||||
void initialize_F();
|
||||
void build_relations();
|
||||
void add_lookback_edge();
|
||||
void compute_FOLLOWS();
|
||||
void compute_lookaheads();
|
||||
void digraph();
|
||||
void traverse();
|
||||
void lalr PARAMS((void));
|
||||
short **transpose PARAMS((short **, int));
|
||||
void set_state_table PARAMS((void));
|
||||
void set_accessing_symbol PARAMS((void));
|
||||
void set_shift_table PARAMS((void));
|
||||
void set_reduction_table PARAMS((void));
|
||||
void set_maxrhs PARAMS((void));
|
||||
void initialize_LA PARAMS((void));
|
||||
void set_goto_map PARAMS((void));
|
||||
int map_goto PARAMS((int, int));
|
||||
void initialize_F PARAMS((void));
|
||||
void build_relations PARAMS((void));
|
||||
void add_lookback_edge PARAMS((int, int, int));
|
||||
void compute_FOLLOWS PARAMS((void));
|
||||
void compute_lookaheads PARAMS((void));
|
||||
void digraph PARAMS((short **));
|
||||
void traverse PARAMS((register int));
|
||||
|
||||
extern void toomany();
|
||||
extern void berror();
|
||||
extern void toomany PARAMS((char *));
|
||||
extern void berror PARAMS((char *));
|
||||
|
||||
static int infinity;
|
||||
static int maxrhs;
|
||||
@@ -105,7 +108,7 @@ static int top;
|
||||
|
||||
|
||||
void
|
||||
lalr()
|
||||
lalr (void)
|
||||
{
|
||||
tokensetsize = WORDSIZE(ntokens);
|
||||
|
||||
@@ -124,7 +127,7 @@ lalr()
|
||||
|
||||
|
||||
void
|
||||
set_state_table()
|
||||
set_state_table (void)
|
||||
{
|
||||
register core *sp;
|
||||
|
||||
@@ -136,7 +139,7 @@ set_state_table()
|
||||
|
||||
|
||||
void
|
||||
set_accessing_symbol()
|
||||
set_accessing_symbol (void)
|
||||
{
|
||||
register core *sp;
|
||||
|
||||
@@ -148,7 +151,7 @@ set_accessing_symbol()
|
||||
|
||||
|
||||
void
|
||||
set_shift_table()
|
||||
set_shift_table (void)
|
||||
{
|
||||
register shifts *sp;
|
||||
|
||||
@@ -160,7 +163,7 @@ set_shift_table()
|
||||
|
||||
|
||||
void
|
||||
set_reduction_table()
|
||||
set_reduction_table (void)
|
||||
{
|
||||
register reductions *rp;
|
||||
|
||||
@@ -172,7 +175,7 @@ set_reduction_table()
|
||||
|
||||
|
||||
void
|
||||
set_maxrhs()
|
||||
set_maxrhs (void)
|
||||
{
|
||||
register short *itemp;
|
||||
register int length;
|
||||
@@ -198,7 +201,7 @@ set_maxrhs()
|
||||
|
||||
|
||||
void
|
||||
initialize_LA()
|
||||
initialize_LA (void)
|
||||
{
|
||||
register int i;
|
||||
register int j;
|
||||
@@ -256,7 +259,7 @@ initialize_LA()
|
||||
{
|
||||
if (!consistent[i])
|
||||
{
|
||||
if (rp = reduction_table[i])
|
||||
if ((rp = reduction_table[i]))
|
||||
for (j = 0; j < rp->nreds; j++)
|
||||
*np++ = rp->rules[j];
|
||||
}
|
||||
@@ -265,7 +268,7 @@ initialize_LA()
|
||||
|
||||
|
||||
void
|
||||
set_goto_map()
|
||||
set_goto_map (void)
|
||||
{
|
||||
register shifts *sp;
|
||||
register int i;
|
||||
@@ -335,9 +338,7 @@ set_goto_map()
|
||||
/* Map_goto maps a state/symbol pair into its numeric representation. */
|
||||
|
||||
int
|
||||
map_goto(state, symbol)
|
||||
int state;
|
||||
int symbol;
|
||||
map_goto (int state, int symbol)
|
||||
{
|
||||
register int high;
|
||||
register int low;
|
||||
@@ -366,7 +367,7 @@ int symbol;
|
||||
|
||||
|
||||
void
|
||||
initialize_F()
|
||||
initialize_F (void)
|
||||
{
|
||||
register int i;
|
||||
register int j;
|
||||
@@ -442,7 +443,7 @@ initialize_F()
|
||||
|
||||
|
||||
void
|
||||
build_relations()
|
||||
build_relations (void)
|
||||
{
|
||||
register int i;
|
||||
register int j;
|
||||
@@ -537,10 +538,7 @@ build_relations()
|
||||
|
||||
|
||||
void
|
||||
add_lookback_edge(stateno, ruleno, gotono)
|
||||
int stateno;
|
||||
int ruleno;
|
||||
int gotono;
|
||||
add_lookback_edge (int stateno, int ruleno, int gotono)
|
||||
{
|
||||
register int i;
|
||||
register int k;
|
||||
@@ -570,9 +568,7 @@ int gotono;
|
||||
|
||||
|
||||
short **
|
||||
transpose(R_arg, n)
|
||||
short **R_arg;
|
||||
int n;
|
||||
transpose (short **R_arg, int n)
|
||||
{
|
||||
register short **new_R;
|
||||
register short **temp_R;
|
||||
@@ -627,7 +623,7 @@ int n;
|
||||
|
||||
|
||||
void
|
||||
compute_FOLLOWS()
|
||||
compute_FOLLOWS (void)
|
||||
{
|
||||
register int i;
|
||||
|
||||
@@ -643,7 +639,7 @@ compute_FOLLOWS()
|
||||
|
||||
|
||||
void
|
||||
compute_lookaheads()
|
||||
compute_lookaheads (void)
|
||||
{
|
||||
register int i;
|
||||
register int n;
|
||||
@@ -686,8 +682,7 @@ compute_lookaheads()
|
||||
|
||||
|
||||
void
|
||||
digraph(relation)
|
||||
short **relation;
|
||||
digraph (short **relation)
|
||||
{
|
||||
register int i;
|
||||
|
||||
@@ -713,8 +708,7 @@ short **relation;
|
||||
|
||||
|
||||
void
|
||||
traverse(i)
|
||||
register int i;
|
||||
traverse (register int i)
|
||||
{
|
||||
register unsigned *fp1;
|
||||
register unsigned *fp2;
|
||||
|
||||
@@ -15,7 +15,8 @@ GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bison; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
/*
|
||||
@@ -26,7 +27,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
symval is set to a pointer to the entry found. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include "system.h"
|
||||
#include "files.h"
|
||||
#include "getopt.h" /* for optarg */
|
||||
@@ -50,19 +50,27 @@ extern char *spec_file_prefix; /* for -b */
|
||||
extern int lineno;
|
||||
extern int translations;
|
||||
|
||||
int parse_percent_token();
|
||||
void init_lex PARAMS((void));
|
||||
char *grow_token_buffer PARAMS((char *));
|
||||
int skip_white_space PARAMS((void));
|
||||
int safegetc PARAMS((FILE *));
|
||||
int literalchar PARAMS((char **, int *, char));
|
||||
void unlex PARAMS((int));
|
||||
int lex PARAMS((void));
|
||||
int parse_percent_token PARAMS((void));
|
||||
|
||||
/* functions from main.c */
|
||||
extern char *printable_version();
|
||||
extern void fatal();
|
||||
extern void warni();
|
||||
extern void warn();
|
||||
extern char *printable_version PARAMS((int));
|
||||
extern void fatal PARAMS((char *));
|
||||
extern void warn PARAMS((char *));
|
||||
extern void warni PARAMS((char *, int));
|
||||
extern void warns PARAMS((char *, char *));
|
||||
|
||||
/* Buffer for storing the current token. */
|
||||
char *token_buffer;
|
||||
|
||||
/* Allocated size of token_buffer, not including space for terminator. */
|
||||
static int maxtoken;
|
||||
int maxtoken;
|
||||
|
||||
bucket *symval;
|
||||
int numval;
|
||||
@@ -72,7 +80,7 @@ static bucket *unlexed_symval; /* by the next call to lex */
|
||||
|
||||
|
||||
void
|
||||
init_lex()
|
||||
init_lex (void)
|
||||
{
|
||||
maxtoken = 100;
|
||||
token_buffer = NEW2 (maxtoken + 1, char);
|
||||
@@ -80,9 +88,8 @@ init_lex()
|
||||
}
|
||||
|
||||
|
||||
static char *
|
||||
grow_token_buffer (p)
|
||||
char *p;
|
||||
char *
|
||||
grow_token_buffer (char *p)
|
||||
{
|
||||
int offset = p - token_buffer;
|
||||
maxtoken *= 2;
|
||||
@@ -92,7 +99,7 @@ grow_token_buffer (p)
|
||||
|
||||
|
||||
int
|
||||
skip_white_space()
|
||||
skip_white_space (void)
|
||||
{
|
||||
register int c;
|
||||
register int inside;
|
||||
@@ -162,8 +169,7 @@ skip_white_space()
|
||||
|
||||
/* do a getc, but give error message if EOF encountered */
|
||||
int
|
||||
safegetc(f)
|
||||
FILE *f;
|
||||
safegetc (FILE *f)
|
||||
{
|
||||
register int c = getc(f);
|
||||
if (c == EOF)
|
||||
@@ -178,10 +184,7 @@ safegetc(f)
|
||||
report error for \n
|
||||
*/
|
||||
int
|
||||
literalchar(pp, pcode, term)
|
||||
char **pp;
|
||||
int *pcode;
|
||||
char term;
|
||||
literalchar (char **pp, int *pcode, char term)
|
||||
{
|
||||
register int c;
|
||||
register char *p;
|
||||
@@ -211,7 +214,7 @@ literalchar(pp, pcode, term)
|
||||
else if (c == 'r') code = '\r';
|
||||
else if (c == 'f') code = '\f';
|
||||
else if (c == 'b') code = '\b';
|
||||
else if (c == 'v') code = 013;
|
||||
else if (c == 'v') code = '\013';
|
||||
else if (c == '\\') code = '\\';
|
||||
else if (c == '\'') code = '\'';
|
||||
else if (c == '\"') code = '\"';
|
||||
@@ -268,7 +271,9 @@ literalchar(pp, pcode, term)
|
||||
so that `\012' and `\n' can be interchangeable. */
|
||||
|
||||
p = *pp;
|
||||
if (code == '\\') {*p++ = '\\'; *p++ = '\\';}
|
||||
if (code == term && wasquote)
|
||||
*p++ = code;
|
||||
else if (code == '\\') {*p++ = '\\'; *p++ = '\\';}
|
||||
else if (code == '\'') {*p++ = '\\'; *p++ = '\'';}
|
||||
else if (code == '\"') {*p++ = '\\'; *p++ = '\"';}
|
||||
else if (code >= 040 && code < 0177)
|
||||
@@ -293,8 +298,7 @@ literalchar(pp, pcode, term)
|
||||
|
||||
|
||||
void
|
||||
unlex(token)
|
||||
int token;
|
||||
unlex (int token)
|
||||
{
|
||||
unlexed = token;
|
||||
unlexed_symval = symval;
|
||||
@@ -302,7 +306,7 @@ unlex(token)
|
||||
|
||||
|
||||
int
|
||||
lex()
|
||||
lex (void)
|
||||
{
|
||||
register int c;
|
||||
char *p;
|
||||
@@ -542,8 +546,8 @@ struct percent_table_struct {
|
||||
/* These would be acceptable, but they do not affect processing */
|
||||
{"verbose", &verboseflag, NOOP}, /* -v */
|
||||
{"debug", &debugflag, NOOP}, /* -t */
|
||||
/* {"help", <print usage stmt>, NOOP}, /* -h */
|
||||
/* {"version", <print version number> , NOOP}, /* -V */
|
||||
/* {"help", <print usage stmt>, NOOP},*/ /* -h */
|
||||
/* {"version", <print version number> , NOOP},*/ /* -V */
|
||||
#endif
|
||||
|
||||
{NULL, NULL, ILLEGAL}
|
||||
@@ -553,7 +557,7 @@ struct percent_table_struct {
|
||||
Assumes the % has already been read and discarded. */
|
||||
|
||||
int
|
||||
parse_percent_token ()
|
||||
parse_percent_token (void)
|
||||
{
|
||||
register int c;
|
||||
register char *p;
|
||||
|
||||
@@ -15,7 +15,8 @@ GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bison; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
#define ENDFILE 0
|
||||
|
||||
+2
-1
@@ -15,7 +15,8 @@ GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bison; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef eta10
|
||||
#define MAXSHORT 2147483647
|
||||
|
||||
+86
-65
@@ -15,7 +15,8 @@ GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bison; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -24,6 +25,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
extern int lineno;
|
||||
extern int verboseflag;
|
||||
extern char *infile;
|
||||
|
||||
/* Nonzero means failure has been detected; don't write a parser file. */
|
||||
int failure;
|
||||
@@ -31,18 +33,37 @@ int failure;
|
||||
/* The name this program was run with, for messages. */
|
||||
char *program_name;
|
||||
|
||||
extern void getargs(), openfiles(), reader(), reduce_grammar();
|
||||
extern void set_derives(), set_nullable(), generate_states();
|
||||
extern void lalr(), initialize_conflicts(), verbose(), terse();
|
||||
extern void output(), done();
|
||||
char *printable_version PARAMS((int));
|
||||
char *int_to_string PARAMS((int));
|
||||
void fatal PARAMS((char *));
|
||||
void fatals PARAMS((char *, char *));
|
||||
void warn PARAMS((char *));
|
||||
void warni PARAMS((char *, int));
|
||||
void warns PARAMS((char *, char *));
|
||||
void warnss PARAMS((char *, char *, char *));
|
||||
void warnsss PARAMS((char *, char *, char *, char *));
|
||||
void toomany PARAMS((char *));
|
||||
void berror PARAMS((char *));
|
||||
|
||||
extern void getargs PARAMS((int, char *[]));
|
||||
extern void openfiles PARAMS((void));
|
||||
extern void reader PARAMS((void));
|
||||
extern void reduce_grammar PARAMS((void));
|
||||
extern void set_derives PARAMS((void));
|
||||
extern void set_nullable PARAMS((void));
|
||||
extern void generate_states PARAMS((void));
|
||||
extern void lalr PARAMS((void));
|
||||
extern void initialize_conflicts PARAMS((void));
|
||||
extern void verbose PARAMS((void));
|
||||
extern void terse PARAMS((void));
|
||||
extern void output PARAMS((void));
|
||||
extern void done PARAMS((int));
|
||||
|
||||
|
||||
/* VMS complained about using `int'. */
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
program_name = argv[0];
|
||||
setlocale (LC_ALL, "");
|
||||
@@ -100,8 +121,7 @@ main(argc, argv)
|
||||
either C itself, or the corresponding \DDD code. */
|
||||
|
||||
char *
|
||||
printable_version(c)
|
||||
int c;
|
||||
printable_version (int c)
|
||||
{
|
||||
static char buf[10];
|
||||
if (c < ' ' || c >= '\177')
|
||||
@@ -118,27 +138,31 @@ printable_version(c)
|
||||
Return a ptr to internal memory containing the string. */
|
||||
|
||||
char *
|
||||
int_to_string(i)
|
||||
int i;
|
||||
int_to_string (int i)
|
||||
{
|
||||
static char buf[20];
|
||||
sprintf(buf, "%d", i);
|
||||
return buf;
|
||||
}
|
||||
|
||||
static void
|
||||
fatal_banner (void)
|
||||
{
|
||||
if (infile == 0)
|
||||
fprintf(stderr, _("%s: fatal error: "), program_name);
|
||||
else
|
||||
fprintf(stderr, _("%s:%d: fatal error: "), infile, lineno);
|
||||
}
|
||||
|
||||
/* Print the message S for a fatal error. */
|
||||
|
||||
void
|
||||
fatal(s)
|
||||
char *s;
|
||||
fatal (char *s)
|
||||
{
|
||||
extern char *infile;
|
||||
|
||||
if (infile == 0)
|
||||
fprintf(stderr, _("%s: fatal error: %s\n"), program_name, s);
|
||||
else
|
||||
fprintf(stderr, _("%s:%d: fatal error: %s\n"), infile, lineno, s);
|
||||
done(1);
|
||||
fatal_banner ();
|
||||
fputs (s, stderr);
|
||||
fputc ('\n', stderr);
|
||||
done (1);
|
||||
}
|
||||
|
||||
|
||||
@@ -146,97 +170,94 @@ fatal(s)
|
||||
and incorporate string X1. */
|
||||
|
||||
void
|
||||
fatals(fmt, x1)
|
||||
char *fmt, *x1;
|
||||
fatals (char *fmt, char *x1)
|
||||
{
|
||||
char buffer[200];
|
||||
sprintf(buffer, fmt, x1);
|
||||
fatal(buffer);
|
||||
fatal_banner ();
|
||||
fprintf (stderr, fmt, x1);
|
||||
fputc ('\n', stderr);
|
||||
done (1);
|
||||
}
|
||||
|
||||
static void
|
||||
warn_banner (void)
|
||||
{
|
||||
if (infile == 0)
|
||||
fprintf(stderr, _("%s: "), program_name);
|
||||
else
|
||||
fprintf(stderr, _("%s:%d: "), infile, lineno);
|
||||
failure = 1;
|
||||
}
|
||||
|
||||
/* Print a warning message S. */
|
||||
|
||||
void
|
||||
warn(s)
|
||||
char *s;
|
||||
warn (char *s)
|
||||
{
|
||||
extern char *infile;
|
||||
|
||||
if (infile == 0)
|
||||
fprintf(stderr, _("%s: %s\n"), program_name, s);
|
||||
else
|
||||
fprintf(stderr, _("%s:%d: %s\n"),
|
||||
infile, lineno, s);
|
||||
|
||||
failure = 1;
|
||||
warn_banner ();
|
||||
fputs (s, stderr);
|
||||
fputc ('\n', stderr);
|
||||
}
|
||||
|
||||
/* Print a warning message containing the string for the integer X1.
|
||||
The message is given by the format FMT. */
|
||||
|
||||
void
|
||||
warni(fmt, x1)
|
||||
char *fmt;
|
||||
int x1;
|
||||
warni (char *fmt, int x1)
|
||||
{
|
||||
char buffer[200];
|
||||
sprintf(buffer, fmt, x1);
|
||||
warn(buffer);
|
||||
warn_banner ();
|
||||
fprintf (stderr, fmt, x1);
|
||||
fputc ('\n', stderr);
|
||||
}
|
||||
|
||||
/* Print a warning message containing the string X1.
|
||||
The message is given by the format FMT. */
|
||||
|
||||
void
|
||||
warns(fmt, x1)
|
||||
char *fmt, *x1;
|
||||
warns (char *fmt, char *x1)
|
||||
{
|
||||
char buffer[200];
|
||||
sprintf(buffer, fmt, x1);
|
||||
warn(buffer);
|
||||
warn_banner ();
|
||||
fprintf (stderr, fmt, x1);
|
||||
fputc ('\n', stderr);
|
||||
}
|
||||
|
||||
/* Print a warning message containing the two strings X1 and X2.
|
||||
The message is given by the format FMT. */
|
||||
|
||||
void
|
||||
warnss(fmt, x1, x2)
|
||||
char *fmt, *x1, *x2;
|
||||
warnss (char *fmt, char *x1, char *x2)
|
||||
{
|
||||
char buffer[200];
|
||||
sprintf(buffer, fmt, x1, x2);
|
||||
warn(buffer);
|
||||
warn_banner ();
|
||||
fprintf (stderr, fmt, x1, x2);
|
||||
fputc ('\n', stderr);
|
||||
}
|
||||
|
||||
/* Print a warning message containing the 3 strings X1, X2, X3.
|
||||
The message is given by the format FMT. */
|
||||
|
||||
void
|
||||
warnsss(fmt, x1, x2, x3)
|
||||
char *fmt, *x1, *x2, *x3;
|
||||
warnsss (char *fmt, char *x1, char *x2, char *x3)
|
||||
{
|
||||
char buffer[200];
|
||||
sprintf(buffer, fmt, x1, x2, x3);
|
||||
warn(buffer);
|
||||
warn_banner ();
|
||||
fprintf (stderr, fmt, x1, x2, x3);
|
||||
fputc ('\n', stderr);
|
||||
}
|
||||
|
||||
/* Print a message for the fatal occurence of more than MAXSHORT
|
||||
instances of whatever is denoted by the string S. */
|
||||
|
||||
void
|
||||
toomany(s)
|
||||
char *s;
|
||||
toomany (char *s)
|
||||
{
|
||||
char buffer[200];
|
||||
sprintf(buffer, _("too many %s (max %d)"), s, MAXSHORT);
|
||||
fatal(buffer);
|
||||
fatal_banner ();
|
||||
fprintf (stderr, _("too many %s (max %d)"), s, MAXSHORT);
|
||||
fputc ('\n', stderr);
|
||||
done (1);
|
||||
}
|
||||
|
||||
/* Abort for an internal error denoted by string S. */
|
||||
|
||||
void
|
||||
berror(s)
|
||||
char *s;
|
||||
berror (char *s)
|
||||
{
|
||||
fprintf(stderr, _("%s: internal error: %s\n"), program_name, s);
|
||||
abort();
|
||||
|
||||
+6
-3
@@ -15,7 +15,8 @@ GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bison; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
/* set up nullable, a vector saying which nonterminals can expand into the null string.
|
||||
@@ -30,9 +31,11 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
char *nullable;
|
||||
|
||||
void free_nullable PARAMS((void));
|
||||
void set_nullable PARAMS((void));
|
||||
|
||||
void
|
||||
set_nullable()
|
||||
set_nullable (void)
|
||||
{
|
||||
register short *r;
|
||||
register short *s1;
|
||||
@@ -130,7 +133,7 @@ set_nullable()
|
||||
|
||||
|
||||
void
|
||||
free_nullable()
|
||||
free_nullable (void)
|
||||
{
|
||||
FREE(nullable + ntokens);
|
||||
}
|
||||
|
||||
+66
-69
@@ -15,7 +15,8 @@ GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bison; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
/* functions to output parsing data to various files. Entries are:
|
||||
@@ -132,37 +133,40 @@ extern char *consistent;
|
||||
extern short *goto_map;
|
||||
extern short *from_state;
|
||||
extern short *to_state;
|
||||
extern int lineno;
|
||||
|
||||
void output_token_translations();
|
||||
void output_gram();
|
||||
void output_stos();
|
||||
void output_rule_data();
|
||||
void output_defines();
|
||||
void output_actions();
|
||||
void token_actions();
|
||||
void save_row();
|
||||
void goto_actions();
|
||||
void save_column();
|
||||
void sort_actions();
|
||||
void pack_table();
|
||||
void output_base();
|
||||
void output_table();
|
||||
void output_check();
|
||||
void output_parser();
|
||||
void output_program();
|
||||
void free_itemset();
|
||||
void free_shifts();
|
||||
void free_reductions();
|
||||
void free_itemsets();
|
||||
int action_row();
|
||||
int default_goto();
|
||||
int matching_state();
|
||||
int pack_vector();
|
||||
void output_headers PARAMS((void));
|
||||
void output_trailers PARAMS((void));
|
||||
void output PARAMS((void));
|
||||
void output_token_translations PARAMS((void));
|
||||
void output_gram PARAMS((void));
|
||||
void output_stos PARAMS((void));
|
||||
void output_rule_data PARAMS((void));
|
||||
void output_defines PARAMS((void));
|
||||
void output_actions PARAMS((void));
|
||||
void token_actions PARAMS((void));
|
||||
void save_row PARAMS((int));
|
||||
void goto_actions PARAMS((void));
|
||||
void save_column PARAMS((int, int));
|
||||
void sort_actions PARAMS((void));
|
||||
void pack_table PARAMS((void));
|
||||
void output_base PARAMS((void));
|
||||
void output_table PARAMS((void));
|
||||
void output_check PARAMS((void));
|
||||
void output_parser PARAMS((void));
|
||||
void output_program PARAMS((void));
|
||||
void free_shifts PARAMS((void));
|
||||
void free_reductions PARAMS((void));
|
||||
void free_itemsets PARAMS((void));
|
||||
int action_row PARAMS((int));
|
||||
int default_goto PARAMS((int));
|
||||
int matching_state PARAMS((int));
|
||||
int pack_vector PARAMS((int));
|
||||
|
||||
extern void berror();
|
||||
extern void fatals();
|
||||
extern char *int_to_string();
|
||||
extern void reader_output_yylsp();
|
||||
extern void berror PARAMS((char *));
|
||||
extern void fatals PARAMS((char *, char *));
|
||||
extern char *int_to_string PARAMS((int));
|
||||
extern void reader_output_yylsp PARAMS((FILE *));
|
||||
|
||||
static int nvectors;
|
||||
static int nentries;
|
||||
@@ -197,7 +201,7 @@ register YYLTYPE *yylsp;\n{\n switch (n)\n{"
|
||||
|
||||
|
||||
void
|
||||
output_headers()
|
||||
output_headers (void)
|
||||
{
|
||||
if (semantic_parser)
|
||||
fprintf(fguard, GUARDSTR, attrsfile);
|
||||
@@ -226,7 +230,7 @@ output_headers()
|
||||
|
||||
|
||||
void
|
||||
output_trailers()
|
||||
output_trailers (void)
|
||||
{
|
||||
if (semantic_parser)
|
||||
fprintf(fguard, "\n }\n}\n");
|
||||
@@ -243,7 +247,7 @@ output_trailers()
|
||||
|
||||
|
||||
void
|
||||
output()
|
||||
output (void)
|
||||
{
|
||||
int c;
|
||||
|
||||
@@ -286,7 +290,7 @@ output()
|
||||
|
||||
|
||||
void
|
||||
output_token_translations()
|
||||
output_token_translations (void)
|
||||
{
|
||||
register int i, j;
|
||||
/* register short *sp; JF unused */
|
||||
@@ -330,7 +334,7 @@ output_token_translations()
|
||||
|
||||
|
||||
void
|
||||
output_gram()
|
||||
output_gram (void)
|
||||
{
|
||||
register int i;
|
||||
register int j;
|
||||
@@ -395,7 +399,7 @@ output_gram()
|
||||
|
||||
|
||||
void
|
||||
output_stos()
|
||||
output_stos (void)
|
||||
{
|
||||
register int i;
|
||||
register int j;
|
||||
@@ -425,7 +429,7 @@ output_stos()
|
||||
|
||||
|
||||
void
|
||||
output_rule_data()
|
||||
output_rule_data (void)
|
||||
{
|
||||
register int i;
|
||||
register int j;
|
||||
@@ -600,7 +604,7 @@ output_rule_data()
|
||||
|
||||
|
||||
void
|
||||
output_defines()
|
||||
output_defines (void)
|
||||
{
|
||||
fprintf(ftable, "\n\n#define\tYYFINAL\t\t%d\n", final_state);
|
||||
fprintf(ftable, "#define\tYYFLAG\t\t%d\n", MINSHORT);
|
||||
@@ -612,7 +616,7 @@ output_defines()
|
||||
/* compute and output yydefact, yydefgoto, yypact, yypgoto, yytable and yycheck. */
|
||||
|
||||
void
|
||||
output_actions()
|
||||
output_actions (void)
|
||||
{
|
||||
nvectors = nstates + nvars;
|
||||
|
||||
@@ -649,7 +653,7 @@ output_actions()
|
||||
is saved for putting into yytable later. */
|
||||
|
||||
void
|
||||
token_actions()
|
||||
token_actions (void)
|
||||
{
|
||||
register int i;
|
||||
register int j;
|
||||
@@ -699,14 +703,13 @@ token_actions()
|
||||
a token gets to handle it. */
|
||||
|
||||
int
|
||||
action_row(state)
|
||||
int state;
|
||||
action_row (int state)
|
||||
{
|
||||
register int i;
|
||||
register int j;
|
||||
register int k;
|
||||
register int m;
|
||||
register int n;
|
||||
register int m = 0;
|
||||
register int n = 0;
|
||||
register int count;
|
||||
register int default_rule;
|
||||
register int nreds;
|
||||
@@ -863,8 +866,7 @@ int state;
|
||||
|
||||
|
||||
void
|
||||
save_row(state)
|
||||
int state;
|
||||
save_row (int state)
|
||||
{
|
||||
register int i;
|
||||
register int count;
|
||||
@@ -908,7 +910,7 @@ int state;
|
||||
is saved for putting into yytable later. */
|
||||
|
||||
void
|
||||
goto_actions()
|
||||
goto_actions (void)
|
||||
{
|
||||
register int i;
|
||||
register int j;
|
||||
@@ -947,8 +949,7 @@ goto_actions()
|
||||
|
||||
|
||||
int
|
||||
default_goto(symbol)
|
||||
int symbol;
|
||||
default_goto (int symbol)
|
||||
{
|
||||
register int i;
|
||||
register int m;
|
||||
@@ -985,9 +986,7 @@ int symbol;
|
||||
|
||||
|
||||
void
|
||||
save_column(symbol, default_state)
|
||||
int symbol;
|
||||
int default_state;
|
||||
save_column (int symbol, int default_state)
|
||||
{
|
||||
register int i;
|
||||
register int m;
|
||||
@@ -1035,7 +1034,7 @@ int default_state;
|
||||
the actions and gotos information into yytable. */
|
||||
|
||||
void
|
||||
sort_actions()
|
||||
sort_actions (void)
|
||||
{
|
||||
register int i;
|
||||
register int j;
|
||||
@@ -1071,7 +1070,7 @@ sort_actions()
|
||||
|
||||
|
||||
void
|
||||
pack_table()
|
||||
pack_table (void)
|
||||
{
|
||||
register int i;
|
||||
register int place;
|
||||
@@ -1120,8 +1119,7 @@ pack_table()
|
||||
|
||||
|
||||
int
|
||||
matching_state(vector)
|
||||
int vector;
|
||||
matching_state (int vector)
|
||||
{
|
||||
register int i;
|
||||
register int j;
|
||||
@@ -1161,14 +1159,13 @@ int vector;
|
||||
|
||||
|
||||
int
|
||||
pack_vector(vector)
|
||||
int vector;
|
||||
pack_vector (int vector)
|
||||
{
|
||||
register int i;
|
||||
register int j;
|
||||
register int k;
|
||||
register int t;
|
||||
register int loc;
|
||||
register int loc = 0;
|
||||
register int ok;
|
||||
register short *from;
|
||||
register short *to;
|
||||
@@ -1231,7 +1228,7 @@ int vector;
|
||||
and the vectors whose elements index the portion starts */
|
||||
|
||||
void
|
||||
output_base()
|
||||
output_base (void)
|
||||
{
|
||||
register int i;
|
||||
register int j;
|
||||
@@ -1282,7 +1279,7 @@ output_base()
|
||||
|
||||
|
||||
void
|
||||
output_table()
|
||||
output_table (void)
|
||||
{
|
||||
register int i;
|
||||
register int j;
|
||||
@@ -1314,7 +1311,7 @@ output_table()
|
||||
|
||||
|
||||
void
|
||||
output_check()
|
||||
output_check (void)
|
||||
{
|
||||
register int i;
|
||||
register int j;
|
||||
@@ -1348,7 +1345,7 @@ output_check()
|
||||
/* copy the parser code into the ftable file at the end. */
|
||||
|
||||
void
|
||||
output_parser()
|
||||
output_parser (void)
|
||||
{
|
||||
register int c;
|
||||
#ifdef DONTDEF
|
||||
@@ -1407,7 +1404,7 @@ output_parser()
|
||||
|
||||
/* now write out the line... */
|
||||
for (; c != '\n' && c != EOF; c = getc(fpars))
|
||||
if (write_line)
|
||||
if (write_line) {
|
||||
if (c == '$')
|
||||
{
|
||||
/* `$' in the parser file indicates where to put the actions.
|
||||
@@ -1418,6 +1415,7 @@ output_parser()
|
||||
}
|
||||
else
|
||||
putc(c, ftable);
|
||||
}
|
||||
if (c == EOF)
|
||||
break;
|
||||
putc(c, ftable);
|
||||
@@ -1425,10 +1423,9 @@ output_parser()
|
||||
}
|
||||
|
||||
void
|
||||
output_program()
|
||||
output_program (void)
|
||||
{
|
||||
register int c;
|
||||
extern int lineno;
|
||||
|
||||
if (!nolinesflag)
|
||||
fprintf(ftable, "#line %d \"%s\"\n", lineno, infile);
|
||||
@@ -1443,7 +1440,7 @@ output_program()
|
||||
|
||||
|
||||
void
|
||||
free_itemsets()
|
||||
free_itemsets (void)
|
||||
{
|
||||
register core *cp,*cptmp;
|
||||
|
||||
@@ -1457,7 +1454,7 @@ free_itemsets()
|
||||
|
||||
|
||||
void
|
||||
free_shifts()
|
||||
free_shifts (void)
|
||||
{
|
||||
register shifts *sp,*sptmp;/* JF derefrenced freed ptr */
|
||||
|
||||
@@ -1471,7 +1468,7 @@ free_shifts()
|
||||
|
||||
|
||||
void
|
||||
free_reductions()
|
||||
free_reductions (void)
|
||||
{
|
||||
register reductions *rp,*rptmp;/* JF fixed freed ptr */
|
||||
|
||||
|
||||
+19
-20
@@ -15,7 +15,8 @@ GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bison; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -39,18 +40,20 @@ extern char any_conflicts;
|
||||
extern char *conflicts;
|
||||
extern int final_state;
|
||||
|
||||
extern void conflict_log();
|
||||
extern void verbose_conflict_log();
|
||||
extern void print_reductions();
|
||||
extern void conflict_log PARAMS((void));
|
||||
extern void verbose_conflict_log PARAMS((void));
|
||||
extern void print_reductions PARAMS((int));
|
||||
|
||||
void print_token();
|
||||
void print_state();
|
||||
void print_core();
|
||||
void print_actions();
|
||||
void print_grammar();
|
||||
void terse PARAMS((void));
|
||||
void verbose PARAMS((void));
|
||||
void print_token PARAMS((int, int));
|
||||
void print_state PARAMS((int));
|
||||
void print_core PARAMS((int));
|
||||
void print_actions PARAMS((int));
|
||||
void print_grammar PARAMS((void));
|
||||
|
||||
void
|
||||
terse()
|
||||
terse (void)
|
||||
{
|
||||
if (any_conflicts)
|
||||
{
|
||||
@@ -60,7 +63,7 @@ terse()
|
||||
|
||||
|
||||
void
|
||||
verbose()
|
||||
verbose (void)
|
||||
{
|
||||
register int i;
|
||||
|
||||
@@ -77,16 +80,14 @@ verbose()
|
||||
|
||||
|
||||
void
|
||||
print_token(extnum, token)
|
||||
int extnum, token;
|
||||
print_token (int extnum, int token)
|
||||
{
|
||||
fprintf(foutput, _(" type %d is %s\n"), extnum, tags[token]);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
print_state(state)
|
||||
int state;
|
||||
print_state (int state)
|
||||
{
|
||||
fprintf(foutput, _("\n\nstate %d\n\n"), state);
|
||||
print_core(state);
|
||||
@@ -95,8 +96,7 @@ int state;
|
||||
|
||||
|
||||
void
|
||||
print_core(state)
|
||||
int state;
|
||||
print_core (int state)
|
||||
{
|
||||
register int i;
|
||||
register int k;
|
||||
@@ -142,8 +142,7 @@ int state;
|
||||
|
||||
|
||||
void
|
||||
print_actions(state)
|
||||
int state;
|
||||
print_actions (int state)
|
||||
{
|
||||
register int i;
|
||||
register int k;
|
||||
@@ -243,7 +242,7 @@ int state;
|
||||
else
|
||||
|
||||
void
|
||||
print_grammar()
|
||||
print_grammar (void)
|
||||
{
|
||||
int i, j;
|
||||
short* rule;
|
||||
|
||||
+109
-89
@@ -1,5 +1,5 @@
|
||||
/* Input parser for bison
|
||||
Copyright (C) 1984, 1986, 1989, 1992 Free Software Foundation, Inc.
|
||||
Copyright (C) 1984, 1986, 1989, 1992, 1998 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
@@ -15,7 +15,8 @@ GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bison; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
/* read in the grammar specification and record it in the format described in gram.h.
|
||||
@@ -26,7 +27,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
The entry point is reader(). */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include "system.h"
|
||||
#include "files.h"
|
||||
#include "alloc.h"
|
||||
@@ -52,46 +52,30 @@ extern bucket *symval;
|
||||
extern int numval;
|
||||
extern int expected_conflicts;
|
||||
extern char *token_buffer;
|
||||
extern int maxtoken;
|
||||
|
||||
extern void init_lex();
|
||||
extern void tabinit();
|
||||
extern void output_headers();
|
||||
extern void output_trailers();
|
||||
extern void free_symtab();
|
||||
extern void open_extra_files();
|
||||
extern char *int_to_string();
|
||||
extern void fatal();
|
||||
extern void fatals();
|
||||
extern void warn();
|
||||
extern void warni();
|
||||
extern void warns();
|
||||
extern void warnss();
|
||||
extern void warnsss();
|
||||
extern void unlex();
|
||||
extern void done();
|
||||
extern void init_lex PARAMS((void));
|
||||
extern char *grow_token_buffer PARAMS((char *));
|
||||
extern void tabinit PARAMS((void));
|
||||
extern void output_headers PARAMS((void));
|
||||
extern void output_trailers PARAMS((void));
|
||||
extern void free_symtab PARAMS((void));
|
||||
extern void open_extra_files PARAMS((void));
|
||||
extern char *int_to_string PARAMS((int));
|
||||
extern char *printable_version PARAMS((int));
|
||||
extern void fatal PARAMS((char *));
|
||||
extern void fatals PARAMS((char *, char *));
|
||||
extern void warn PARAMS((char *));
|
||||
extern void warni PARAMS((char *, int));
|
||||
extern void warns PARAMS((char *, char *));
|
||||
extern void warnss PARAMS((char *, char *, char *));
|
||||
extern void warnsss PARAMS((char *, char *, char *, char *));
|
||||
extern void unlex PARAMS((int));
|
||||
extern void done PARAMS((int));
|
||||
|
||||
extern int skip_white_space();
|
||||
extern int parse_percent_token();
|
||||
extern int lex();
|
||||
|
||||
void reader_output_yylsp();
|
||||
void read_declarations();
|
||||
void copy_definition();
|
||||
void parse_token_decl();
|
||||
void parse_start_decl();
|
||||
void parse_type_decl();
|
||||
void parse_assoc_decl();
|
||||
void parse_union_decl();
|
||||
void parse_expect_decl();
|
||||
void parse_thong_decl();
|
||||
void copy_action();
|
||||
void readgram();
|
||||
void record_rule_line();
|
||||
void packsymbols();
|
||||
void output_token_defines();
|
||||
void packgram();
|
||||
int read_signed_integer();
|
||||
static int get_type();
|
||||
extern int skip_white_space PARAMS((void));
|
||||
extern int parse_percent_token PARAMS((void));
|
||||
extern int lex PARAMS((void));
|
||||
|
||||
typedef
|
||||
struct symbol_list
|
||||
@@ -103,6 +87,31 @@ typedef
|
||||
symbol_list;
|
||||
|
||||
|
||||
void reader PARAMS((void));
|
||||
void reader_output_yylsp PARAMS((FILE *));
|
||||
void read_declarations PARAMS((void));
|
||||
void copy_definition PARAMS((void));
|
||||
void parse_token_decl PARAMS((int, int));
|
||||
void parse_start_decl PARAMS((void));
|
||||
void parse_type_decl PARAMS((void));
|
||||
void parse_assoc_decl PARAMS((int));
|
||||
void parse_union_decl PARAMS((void));
|
||||
void parse_expect_decl PARAMS((void));
|
||||
char *get_type_name PARAMS((int, symbol_list *));
|
||||
void copy_guard PARAMS((symbol_list *, int));
|
||||
void parse_thong_decl PARAMS((void));
|
||||
void copy_action PARAMS((symbol_list *, int));
|
||||
bucket *gensym PARAMS((void));
|
||||
void readgram PARAMS((void));
|
||||
void record_rule_line PARAMS((void));
|
||||
void packsymbols PARAMS((void));
|
||||
void output_token_defines PARAMS((FILE *));
|
||||
void packgram PARAMS((void));
|
||||
int read_signed_integer PARAMS((FILE *));
|
||||
|
||||
#if 0
|
||||
static int get_type PARAMS((void));
|
||||
#endif
|
||||
|
||||
int lineno;
|
||||
symbol_list *grammar;
|
||||
@@ -122,16 +131,14 @@ static int lastprec; /* incremented for each %left, %right or %nonassoc seen */
|
||||
static int gensym_count; /* incremented for each generated symbol */
|
||||
|
||||
static bucket *errtoken;
|
||||
static bucket *undeftoken;
|
||||
|
||||
/* Nonzero if any action or guard uses the @n construct. */
|
||||
static int yylsp_needed;
|
||||
|
||||
extern char *version_string;
|
||||
|
||||
|
||||
static void
|
||||
skip_to_char(target)
|
||||
int target;
|
||||
skip_to_char (int target)
|
||||
{
|
||||
int c;
|
||||
if (target == '\n')
|
||||
@@ -148,7 +155,7 @@ skip_to_char(target)
|
||||
|
||||
|
||||
void
|
||||
reader()
|
||||
reader (void)
|
||||
{
|
||||
start_flag = 0;
|
||||
startval = NULL; /* start symbol not specified yet. */
|
||||
@@ -190,7 +197,9 @@ reader()
|
||||
errtoken->user_token_number = 256; /* Value specified by posix. */
|
||||
/* construct a token that represents all undefined literal tokens. */
|
||||
/* it is always token number 2. */
|
||||
getsym("$undefined.")->class = STOKEN;
|
||||
undeftoken = getsym("$undefined.");
|
||||
undeftoken->class = STOKEN;
|
||||
undeftoken->user_token_number = 2;
|
||||
/* Read the declaration section. Copy %{ ... %} groups to ftable and fdefines file.
|
||||
Also notice any %token, %left, etc. found there. */
|
||||
if (noparserflag)
|
||||
@@ -198,7 +207,7 @@ reader()
|
||||
infile);
|
||||
else
|
||||
fprintf(ftable, "\n/* A Bison parser, made from %s\n", infile);
|
||||
fprintf(ftable, " by %s */\n\n", version_string);
|
||||
fprintf(ftable, " by %s */\n\n", VERSION_STRING);
|
||||
fprintf(ftable, "#define YYBISON 1 /* Identify Bison output. */\n\n");
|
||||
read_declarations();
|
||||
/* start writing the guard and action files, if they are needed. */
|
||||
@@ -224,8 +233,7 @@ reader()
|
||||
}
|
||||
|
||||
void
|
||||
reader_output_yylsp(f)
|
||||
FILE *f;
|
||||
reader_output_yylsp (FILE *f)
|
||||
{
|
||||
if (yylsp_needed)
|
||||
fprintf(f, LTYPESTR);
|
||||
@@ -236,7 +244,7 @@ Handle any % declarations,
|
||||
and copy the contents of any %{ ... %} groups to fattrs. */
|
||||
|
||||
void
|
||||
read_declarations ()
|
||||
read_declarations (void)
|
||||
{
|
||||
register int c;
|
||||
register int tok;
|
||||
@@ -333,7 +341,7 @@ read_declarations ()
|
||||
The %{ has already been read. Return after reading the %}. */
|
||||
|
||||
void
|
||||
copy_definition ()
|
||||
copy_definition (void)
|
||||
{
|
||||
register int c;
|
||||
register int match;
|
||||
@@ -472,8 +480,7 @@ For %token, what_is is STOKEN and what_is_not is SNTERM.
|
||||
For %nterm, the arguments are reversed. */
|
||||
|
||||
void
|
||||
parse_token_decl (what_is, what_is_not)
|
||||
int what_is, what_is_not;
|
||||
parse_token_decl (int what_is, int what_is_not)
|
||||
{
|
||||
register int token = 0;
|
||||
register char *typename = 0;
|
||||
@@ -482,8 +489,13 @@ parse_token_decl (what_is, what_is_not)
|
||||
|
||||
for (;;)
|
||||
{
|
||||
if(ungetc(skip_white_space(), finput) == '%')
|
||||
int tmp_char = ungetc (skip_white_space (), finput);
|
||||
|
||||
if (tmp_char == '%')
|
||||
return;
|
||||
if (tmp_char == EOF)
|
||||
fatals ("Premature EOF after %s", token_buffer);
|
||||
|
||||
token = lex();
|
||||
if (token == COMMA)
|
||||
{
|
||||
@@ -566,7 +578,7 @@ parse_token_decl (what_is, what_is_not)
|
||||
*/
|
||||
|
||||
void
|
||||
parse_thong_decl ()
|
||||
parse_thong_decl (void)
|
||||
{
|
||||
register int token;
|
||||
register struct bucket *symbol;
|
||||
@@ -628,7 +640,7 @@ parse_thong_decl ()
|
||||
/* parse what comes after %start */
|
||||
|
||||
void
|
||||
parse_start_decl ()
|
||||
parse_start_decl (void)
|
||||
{
|
||||
if (start_flag)
|
||||
warn(_("multiple %start declarations"));
|
||||
@@ -646,7 +658,7 @@ parse_start_decl ()
|
||||
/* read in a %type declaration and record its information for get_type_name to access */
|
||||
|
||||
void
|
||||
parse_type_decl ()
|
||||
parse_type_decl (void)
|
||||
{
|
||||
register int k;
|
||||
register char *name;
|
||||
@@ -665,9 +677,12 @@ parse_type_decl ()
|
||||
for (;;)
|
||||
{
|
||||
register int t;
|
||||
int tmp_char = ungetc (skip_white_space (), finput);
|
||||
|
||||
if(ungetc(skip_white_space(), finput) == '%')
|
||||
if (tmp_char == '%')
|
||||
return;
|
||||
if (tmp_char == EOF)
|
||||
fatals ("Premature EOF after %s", token_buffer);
|
||||
|
||||
t = lex();
|
||||
|
||||
@@ -699,8 +714,7 @@ parse_type_decl ()
|
||||
/* assoc is either LEFT_ASSOC, RIGHT_ASSOC or NON_ASSOC. */
|
||||
|
||||
void
|
||||
parse_assoc_decl (assoc)
|
||||
int assoc;
|
||||
parse_assoc_decl (int assoc)
|
||||
{
|
||||
register int k;
|
||||
register char *name = NULL;
|
||||
@@ -711,9 +725,12 @@ int assoc;
|
||||
for (;;)
|
||||
{
|
||||
register int t;
|
||||
int tmp_char = ungetc (skip_white_space (), finput);
|
||||
|
||||
if(ungetc(skip_white_space(), finput) == '%')
|
||||
if (tmp_char == '%')
|
||||
return;
|
||||
if (tmp_char == EOF)
|
||||
fatals ("Premature EOF after %s", token_buffer);
|
||||
|
||||
t = lex();
|
||||
|
||||
@@ -780,7 +797,7 @@ int assoc;
|
||||
definition of YYSTYPE, the type of elements of the parser value stack. */
|
||||
|
||||
void
|
||||
parse_union_decl()
|
||||
parse_union_decl (void)
|
||||
{
|
||||
register int c;
|
||||
register int count;
|
||||
@@ -894,7 +911,7 @@ parse_union_decl()
|
||||
shift-reduce conflicts. */
|
||||
|
||||
void
|
||||
parse_expect_decl()
|
||||
parse_expect_decl (void)
|
||||
{
|
||||
register int c;
|
||||
register int count;
|
||||
@@ -925,9 +942,7 @@ parse_expect_decl()
|
||||
/* Get the data type (alternative in the union) of the value for symbol n in rule rule. */
|
||||
|
||||
char *
|
||||
get_type_name(n, rule)
|
||||
int n;
|
||||
symbol_list *rule;
|
||||
get_type_name (int n, symbol_list *rule)
|
||||
{
|
||||
static char *msg = N_("invalid $ value");
|
||||
|
||||
@@ -966,9 +981,7 @@ which says where to find $0 with respect to the top of the stack,
|
||||
for the simple parser in which the stack is not popped until after the guard is run. */
|
||||
|
||||
void
|
||||
copy_guard(rule, stack_offset)
|
||||
symbol_list *rule;
|
||||
int stack_offset;
|
||||
copy_guard (symbol_list *rule, int stack_offset)
|
||||
{
|
||||
register int c;
|
||||
register int n;
|
||||
@@ -1108,7 +1121,12 @@ int stack_offset;
|
||||
register char *cp = token_buffer;
|
||||
|
||||
while ((c = getc(finput)) != '>' && c > 0)
|
||||
*cp++ = c;
|
||||
{
|
||||
if (cp == token_buffer + maxtoken)
|
||||
cp = grow_token_buffer(cp);
|
||||
|
||||
*cp++ = c;
|
||||
}
|
||||
*cp = 0;
|
||||
type_name = token_buffer;
|
||||
|
||||
@@ -1199,9 +1217,7 @@ stack_offset is the number of values in the current rule so far,
|
||||
which says where to find $0 with respect to the top of the stack. */
|
||||
|
||||
void
|
||||
copy_action(rule, stack_offset)
|
||||
symbol_list *rule;
|
||||
int stack_offset;
|
||||
copy_action (symbol_list *rule, int stack_offset)
|
||||
{
|
||||
register int c;
|
||||
register int n;
|
||||
@@ -1330,7 +1346,12 @@ int stack_offset;
|
||||
register char *cp = token_buffer;
|
||||
|
||||
while ((c = getc(finput)) != '>' && c > 0)
|
||||
*cp++ = c;
|
||||
{
|
||||
if (cp == token_buffer + maxtoken)
|
||||
cp = grow_token_buffer(cp);
|
||||
|
||||
*cp++ = c;
|
||||
}
|
||||
*cp = 0;
|
||||
type_name = token_buffer;
|
||||
value_components_used = 1;
|
||||
@@ -1415,7 +1436,7 @@ int stack_offset;
|
||||
whose name cannot conflict with the user's names. */
|
||||
|
||||
bucket *
|
||||
gensym()
|
||||
gensym (void)
|
||||
{
|
||||
register bucket *sym;
|
||||
|
||||
@@ -1436,10 +1457,10 @@ All guards and actions are copied out to the appropriate files,
|
||||
labelled by the rule number they apply to. */
|
||||
|
||||
void
|
||||
readgram()
|
||||
readgram (void)
|
||||
{
|
||||
register int t;
|
||||
register bucket *lhs;
|
||||
register bucket *lhs = NULL;
|
||||
register symbol_list *p;
|
||||
register symbol_list *p1;
|
||||
register bucket *bp;
|
||||
@@ -1728,24 +1749,25 @@ readgram()
|
||||
|
||||
|
||||
void
|
||||
record_rule_line ()
|
||||
record_rule_line (void)
|
||||
{
|
||||
/* Record each rule's source line number in rline table. */
|
||||
|
||||
if (nrules >= rline_allocated)
|
||||
{
|
||||
rline_allocated = nrules * 2;
|
||||
rline = (short *) xrealloc (rline,
|
||||
rline_allocated * sizeof (short));
|
||||
rline = (short *) xrealloc ((char *) rline,
|
||||
rline_allocated * sizeof (short));
|
||||
}
|
||||
rline[nrules] = lineno;
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
/* read in a %type declaration and record its information for get_type_name to access */
|
||||
/* this is unused. it is only called from the #if 0 part of readgram */
|
||||
static int
|
||||
get_type()
|
||||
get_type (void)
|
||||
{
|
||||
register int k;
|
||||
register int t;
|
||||
@@ -1788,14 +1810,14 @@ get_type()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* assign symbol numbers, and write definition of token names into fdefines.
|
||||
Set up vectors tags and sprec of names and precedences of symbols. */
|
||||
|
||||
void
|
||||
packsymbols()
|
||||
packsymbols (void)
|
||||
{
|
||||
register bucket *bp;
|
||||
register int tokno = 1;
|
||||
@@ -1942,8 +1964,7 @@ packsymbols()
|
||||
The value is the user token number.
|
||||
*/
|
||||
void
|
||||
output_token_defines(file)
|
||||
FILE *file;
|
||||
output_token_defines (FILE *file)
|
||||
{
|
||||
bucket *bp;
|
||||
register char *cp, *symbol;
|
||||
@@ -1987,7 +2008,7 @@ FILE *file;
|
||||
/* convert the rules into the representation using rrhs, rlhs and ritems. */
|
||||
|
||||
void
|
||||
packgram()
|
||||
packgram (void)
|
||||
{
|
||||
register int itemno;
|
||||
register int ruleno;
|
||||
@@ -2048,8 +2069,7 @@ packgram()
|
||||
/* Read a signed integer from STREAM and return its value. */
|
||||
|
||||
int
|
||||
read_signed_integer (stream)
|
||||
FILE *stream;
|
||||
read_signed_integer (FILE *stream)
|
||||
{
|
||||
register int c = getc(stream);
|
||||
register int sign = 1;
|
||||
|
||||
+27
-31
@@ -15,7 +15,8 @@ GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bison; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
/*
|
||||
@@ -39,6 +40,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
extern char **tags; /* reader.c */
|
||||
extern int verboseflag; /* getargs.c */
|
||||
static int statisticsflag; /* XXXXXXX */
|
||||
extern int fixed_outfiles;
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE (1)
|
||||
@@ -61,21 +63,22 @@ static int nuseful_productions, nuseless_productions,
|
||||
nuseful_nonterminals, nuseless_nonterminals;
|
||||
|
||||
|
||||
static void useless_nonterminals();
|
||||
static void inaccessable_symbols();
|
||||
static void reduce_grammar_tables();
|
||||
static void print_results();
|
||||
static void print_notices();
|
||||
void dump_grammar();
|
||||
bool bits_equal PARAMS((BSet, BSet, int));
|
||||
int nbits PARAMS((unsigned));
|
||||
int bits_size PARAMS((BSet, int));
|
||||
void reduce_grammar PARAMS((void));
|
||||
static void useless_nonterminals PARAMS((void));
|
||||
static void inaccessable_symbols PARAMS((void));
|
||||
static void reduce_grammar_tables PARAMS((void));
|
||||
static void print_results PARAMS((void));
|
||||
static void print_notices PARAMS((void));
|
||||
void dump_grammar PARAMS((void));
|
||||
|
||||
extern void fatals ();
|
||||
extern void fatals PARAMS((char *, char *));
|
||||
|
||||
|
||||
bool
|
||||
bits_equal (L, R, n)
|
||||
BSet L;
|
||||
BSet R;
|
||||
int n;
|
||||
bits_equal (BSet L, BSet R, int n)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -87,8 +90,7 @@ int n;
|
||||
|
||||
|
||||
int
|
||||
nbits (i)
|
||||
unsigned i;
|
||||
nbits (unsigned i)
|
||||
{
|
||||
int count = 0;
|
||||
|
||||
@@ -101,9 +103,7 @@ unsigned i;
|
||||
|
||||
|
||||
int
|
||||
bits_size (S, n)
|
||||
BSet S;
|
||||
int n;
|
||||
bits_size (BSet S, int n)
|
||||
{
|
||||
int i, count = 0;
|
||||
|
||||
@@ -113,7 +113,7 @@ int n;
|
||||
}
|
||||
|
||||
void
|
||||
reduce_grammar ()
|
||||
reduce_grammar (void)
|
||||
{
|
||||
bool reduced;
|
||||
|
||||
@@ -169,14 +169,12 @@ reduce_grammar ()
|
||||
|
||||
/*
|
||||
* Another way to do this would be with a set for each production and then do
|
||||
* subset tests against N, but even for the C grammar the whole reducing
|
||||
* subset tests against N0, but even for the C grammar the whole reducing
|
||||
* process takes only 2 seconds on my 8Mhz AT.
|
||||
*/
|
||||
|
||||
static bool
|
||||
useful_production (i, N)
|
||||
int i;
|
||||
BSet N;
|
||||
useful_production (int i, BSet N0)
|
||||
{
|
||||
rule r;
|
||||
short n;
|
||||
@@ -188,7 +186,7 @@ BSet N;
|
||||
|
||||
for (r = &ritem[rrhs[i]]; *r > 0; r++)
|
||||
if (ISVAR(n = *r))
|
||||
if (!BITISSET(N, n - ntokens))
|
||||
if (!BITISSET(N0, n - ntokens))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
@@ -197,7 +195,7 @@ BSet N;
|
||||
/* Remember that rules are 1-origin, symbols are 0-origin. */
|
||||
|
||||
static void
|
||||
useless_nonterminals ()
|
||||
useless_nonterminals (void)
|
||||
{
|
||||
BSet Np, Ns;
|
||||
int i, n;
|
||||
@@ -254,7 +252,7 @@ useless_nonterminals ()
|
||||
}
|
||||
|
||||
static void
|
||||
inaccessable_symbols ()
|
||||
inaccessable_symbols (void)
|
||||
{
|
||||
BSet Vp, Vs, Pp;
|
||||
int i, n;
|
||||
@@ -353,7 +351,7 @@ inaccessable_symbols ()
|
||||
}
|
||||
|
||||
static void
|
||||
reduce_grammar_tables ()
|
||||
reduce_grammar_tables (void)
|
||||
{
|
||||
/* This is turned off because we would need to change the numbers
|
||||
in the case statements in the actions file. */
|
||||
@@ -482,7 +480,7 @@ reduce_grammar_tables ()
|
||||
}
|
||||
|
||||
static void
|
||||
print_results ()
|
||||
print_results (void)
|
||||
{
|
||||
int i;
|
||||
/* short j; JF unused */
|
||||
@@ -532,7 +530,7 @@ print_results ()
|
||||
}
|
||||
|
||||
void
|
||||
dump_grammar ()
|
||||
dump_grammar (void)
|
||||
{
|
||||
int i;
|
||||
rule r;
|
||||
@@ -569,10 +567,8 @@ dump_grammar ()
|
||||
|
||||
|
||||
static void
|
||||
print_notices ()
|
||||
print_notices (void)
|
||||
{
|
||||
extern int fixed_outfiles;
|
||||
|
||||
if (fixed_outfiles && nuseless_productions)
|
||||
fprintf(stderr, _("%d rules never reduced\n"), nuseless_productions);
|
||||
|
||||
|
||||
+2
-1
@@ -15,7 +15,8 @@ GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bison; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
/* These type definitions are used to represent a nondeterministic
|
||||
|
||||
+11
-11
@@ -15,7 +15,8 @@ GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bison; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -29,11 +30,12 @@ bucket **symtab;
|
||||
bucket *firstsymbol;
|
||||
bucket *lastsymbol;
|
||||
|
||||
void tabinit PARAMS((void));
|
||||
void free_symtab PARAMS((void));
|
||||
|
||||
|
||||
int
|
||||
hash(key)
|
||||
char *key;
|
||||
static int
|
||||
hash (char *key)
|
||||
{
|
||||
register char *cp;
|
||||
register int k;
|
||||
@@ -48,9 +50,8 @@ char *key;
|
||||
|
||||
|
||||
|
||||
char *
|
||||
copys(s)
|
||||
char *s;
|
||||
static char *
|
||||
copys (char *s)
|
||||
{
|
||||
register int i;
|
||||
register char *cp;
|
||||
@@ -67,7 +68,7 @@ char *s;
|
||||
|
||||
|
||||
void
|
||||
tabinit()
|
||||
tabinit (void)
|
||||
{
|
||||
/* register int i; JF unused */
|
||||
|
||||
@@ -79,8 +80,7 @@ tabinit()
|
||||
|
||||
|
||||
bucket *
|
||||
getsym(key)
|
||||
char *key;
|
||||
getsym (char *key)
|
||||
{
|
||||
register int hashval;
|
||||
register bucket *bp;
|
||||
@@ -127,7 +127,7 @@ char *key;
|
||||
|
||||
|
||||
void
|
||||
free_symtab()
|
||||
free_symtab (void)
|
||||
{
|
||||
register int i;
|
||||
register bucket *bp,*bptmp;/* JF don't use ptr after free */
|
||||
|
||||
+6
-2
@@ -15,8 +15,12 @@ GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bison; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define TABSIZE 1009
|
||||
|
||||
@@ -53,4 +57,4 @@ typedef
|
||||
extern bucket **symtab;
|
||||
extern bucket *firstsymbol;
|
||||
|
||||
extern bucket *getsym();
|
||||
extern bucket *getsym PARAMS((char *));
|
||||
|
||||
+24
-5
@@ -1,3 +1,10 @@
|
||||
#ifndef BISON_SYSTEM_H
|
||||
#define BISON_SYSTEM_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef MSDOS
|
||||
#include <io.h>
|
||||
#endif
|
||||
@@ -12,6 +19,10 @@
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_UNISTD_H)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if (defined(VMS) || defined(MSDOS)) && !defined(HAVE_STRING_H)
|
||||
#define HAVE_STRING_H 1
|
||||
#endif
|
||||
@@ -30,23 +41,31 @@
|
||||
/* memory.h and strings.h conflict on some systems. */
|
||||
#endif /* not STDC_HEADERS and not HAVE_STRING_H */
|
||||
|
||||
#if HAVE_LOCALE_H
|
||||
#if defined(STDC_HEADERS) || defined(HAVE_CTYPE_H)
|
||||
#include <ctype.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LOCALE_H
|
||||
# include <locale.h>
|
||||
#endif
|
||||
#if !HAVE_SETLOCALE
|
||||
#ifndef HAVE_SETLOCALE
|
||||
# define setlocale(Category, Locale)
|
||||
#endif
|
||||
|
||||
#if ENABLE_NLS
|
||||
#ifdef ENABLE_NLS
|
||||
# include <libintl.h>
|
||||
# define _(Text) gettext (Text)
|
||||
#else
|
||||
# undef bindtextdomain
|
||||
# define bindtextdomain(Domain, Directory)
|
||||
# undef textdomain
|
||||
# define textdomain(Domain)
|
||||
# define _(Text) Text
|
||||
#endif
|
||||
#define N_(Text) Text
|
||||
|
||||
/* In the meantime, waiting for Automake. */
|
||||
#define PACKAGE "bison"
|
||||
#ifndef LOCALEDIR
|
||||
#define LOCALEDIR "/usr/local/share/locale"
|
||||
#endif
|
||||
|
||||
#endif /* BISON_SYSTEM_H */
|
||||
|
||||
+2
-1
@@ -15,7 +15,8 @@ GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bison; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
typedef
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
char *version_string = "GNU Bison version 1.25\n";
|
||||
+2
-1
@@ -15,7 +15,8 @@ GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bison; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
;/* Macro help routines for the BISON/VMS program
|
||||
; Gabor Karsai, Vanderbilt University
|
||||
;
|
||||
;BISON is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
;WARRANTY. No author or distributor accepts responsibility to anyone
|
||||
;for the consequences of using it or for whether it serves any
|
||||
;particular purpose or works at all, unless he says so in writing.
|
||||
;Refer to the BISON General Public License for full details.
|
||||
;
|
||||
;Everyone is granted permission to copy, modify and redistribute BISON,
|
||||
;but only under the conditions described in the BISON General Public
|
||||
;License. A copy of this license is supposed to have been given to you
|
||||
;along with BISON so you can know your rights and responsibilities. It
|
||||
;should be in a file named COPYING. Among other things, the copyright
|
||||
;notice and this notice must be preserved on all copies.
|
||||
;
|
||||
; In other words, you are welcome to use, share and improve this program.
|
||||
; You are forbidden to forbid anyone else to use, share and improve
|
||||
; what you give them. Help stamp out software-hoarding! */
|
||||
;
|
||||
.psect vmshlp pic,usr,rel,ovr,shr,long,exe,nowrt
|
||||
|
||||
alloca::
|
||||
.word 0
|
||||
subl2 ^X4(ap),sp
|
||||
movl ^X10(fp),r1
|
||||
movq ^X8(fp),ap
|
||||
bicl2 #03,sp
|
||||
addl2 #^X1c,sp
|
||||
movl sp,r0
|
||||
jmp (r1)
|
||||
|
||||
bcopy::
|
||||
.word ^X0e00
|
||||
movl ^X04(ap),r11
|
||||
movl ^X08(ap),r10
|
||||
movl ^X0c(ap),r9
|
||||
brb 1$
|
||||
2$: movb (r10)+,(r11)+
|
||||
1$: sobgeq r9,2$
|
||||
ret
|
||||
.end
|
||||
+7
-8
@@ -15,21 +15,22 @@ GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bison; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include "system.h"
|
||||
#include "machine.h"
|
||||
|
||||
void RTC PARAMS((unsigned *, int));
|
||||
|
||||
|
||||
/* given n by n matrix of bits R, modify its contents
|
||||
to be the transive closure of what was given. */
|
||||
|
||||
void
|
||||
TC(R, n)
|
||||
unsigned *R;
|
||||
int n;
|
||||
static void
|
||||
TC (unsigned *R, int n)
|
||||
{
|
||||
register int rowsize;
|
||||
register unsigned mask;
|
||||
@@ -87,9 +88,7 @@ int n;
|
||||
and then set all the bits on the diagonal of R. */
|
||||
|
||||
void
|
||||
RTC(R, n)
|
||||
unsigned *R;
|
||||
int n;
|
||||
RTC (unsigned *R, int n)
|
||||
{
|
||||
register int rowsize;
|
||||
register unsigned mask;
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
timestamp
|
||||
Reference in New Issue
Block a user