Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/yacc Moved to src/external/bsd/byacc.



details:   https://anonhg.NetBSD.org/src/rev/bedc97529c01
branches:  trunk
changeset: 769283:bedc97529c01
user:      joerg <joerg%NetBSD.org@localhost>
date:      Mon Sep 05 18:25:23 2011 +0000

description:
Moved to src/external/bsd/byacc.

diffstat:

 usr.bin/yacc/ACKNOWLEDGEMENTS  |    25 -
 usr.bin/yacc/Makefile          |     7 -
 usr.bin/yacc/NEW_FEATURES      |    46 -
 usr.bin/yacc/NOTES             |    21 -
 usr.bin/yacc/README            |    23 -
 usr.bin/yacc/closure.c         |   304 ------
 usr.bin/yacc/defs.h            |   372 -------
 usr.bin/yacc/error.c           |   317 ------
 usr.bin/yacc/lalr.c            |   696 --------------
 usr.bin/yacc/lr0.c             |   678 --------------
 usr.bin/yacc/main.c            |   474 ---------
 usr.bin/yacc/mkpar.c           |   413 --------
 usr.bin/yacc/output.c          |  1292 ---------------------------
 usr.bin/yacc/reader.c          |  1905 ----------------------------------------
 usr.bin/yacc/skeleton.c        |   389 --------
 usr.bin/yacc/symtab.c          |   161 ---
 usr.bin/yacc/test/error.output |    27 -
 usr.bin/yacc/test/error.tab.c  |   276 -----
 usr.bin/yacc/test/error.tab.h  |     2 -
 usr.bin/yacc/test/error.y      |     6 -
 usr.bin/yacc/test/ftp.output   |  1625 ----------------------------------
 usr.bin/yacc/test/ftp.tab.c    |  1745 ------------------------------------
 usr.bin/yacc/test/ftp.tab.h    |    65 -
 usr.bin/yacc/test/ftp.y        |  1185 ------------------------
 usr.bin/yacc/verbose.c         |   385 --------
 usr.bin/yacc/warshall.c        |   125 --
 usr.bin/yacc/yacc.1            |   188 ---
 27 files changed, 0 insertions(+), 12752 deletions(-)

diffs (truncated from 12860 to 300 lines):

diff -r 86b711709d4a -r bedc97529c01 usr.bin/yacc/ACKNOWLEDGEMENTS
--- a/usr.bin/yacc/ACKNOWLEDGEMENTS     Mon Sep 05 18:21:29 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-     Berkeley Yacc owes much to the unflagging efforts of Keith Bostic.
-His badgering kept me working on it long after I was ready to quit.
-
-     Berkeley Yacc is based on the excellent algorithm for computing LALR(1)
-lookaheads developed by Tom Pennello and Frank DeRemer.  The algorithm is
-described in their almost impenetrable article in TOPLAS 4,4.
-
-     Finally, much of the credit for the latest version must go to those
-who pointed out deficiencies of my earlier releases.  Among the most
-prolific contributors were
-
-         Benson I. Margulies
-         Dave Gentzel
-         Antoine Verheijen
-         Peter S. Housel
-         Dale Smith
-         Ozan Yigit
-         John Campbell
-         Bill Sommerfeld
-         Paul Hilfinger
-         Gary Bridgewater
-         Dave Bakken
-         Dan Lanciani
-         Richard Sargent
-         Parag Patel
diff -r 86b711709d4a -r bedc97529c01 usr.bin/yacc/Makefile
--- a/usr.bin/yacc/Makefile     Mon Sep 05 18:21:29 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-#      $NetBSD: Makefile,v 1.8 2003/05/18 07:57:38 lukem Exp $
-
-PROG=  yacc
-SRCS=  closure.c error.c lalr.c lr0.c main.c mkpar.c output.c reader.c \
-       skeleton.c symtab.c verbose.c warshall.c
-
-.include <bsd.prog.mk>
diff -r 86b711709d4a -r bedc97529c01 usr.bin/yacc/NEW_FEATURES
--- a/usr.bin/yacc/NEW_FEATURES Mon Sep 05 18:21:29 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-     The -r option has been implemented.  The -r option tells Yacc to
-put the read-only tables in y.tab.c and the code and variables in
-y.code.c.  Keith Bostic asked for this option so that :yyfix could be
-eliminated.
-
-     The -l and -t options have been implemented.  The -l option tells
-Yacc not to include #line directives in the code it produces.  The -t
-option causes debugging code to be included in the compiled parser.
-
-     The code for error recovery has been changed to implement the same
-algorithm as AT&T Yacc.  There will still be differences in the way
-error recovery works because AT&T Yacc uses more default reductions
-than Berkeley Yacc.
-
-     The environment variable TMPDIR determines the directory where
-temporary files will be created.  If TMPDIR is defined, temporary files
-will be created in the directory whose pathname is the value of TMPDIR.
-By default, temporary files are created in /tmp.
-
-     The keywords are now case-insensitive.  For example, %nonassoc,
-%NONASSOC, %NonAssoc, and %nOnAsSoC are all equivalent.
-
-     Commas and semicolons that are not part of C code are treated as
-commentary.
-
-     Line-end comments, as in BCPL, are permitted.  Line-end comments
-begin with // and end at the next end-of-line.  Line-end comments are
-permitted in C code; they are converted to C comments on output.
-
-     The form of y.output files has been changed to look more like
-those produced by AT&T Yacc.
-
-     A new kind of declaration has been added.  The form of the declaration
-is
-
-         %ident string
-
-where string is a sequence of characters begining with a double quote
-and ending with either a double quote or the next end-of-line, whichever
-comes first.  The declaration will cause a #ident directive to be written
-near the start of the output file.
-
-     If a parser has been compiled with debugging code, that code can be
-enabled by setting an environment variable.  If the environment variable
-YYDEBUG is set to 0, debugging output is suppressed.  If it is set to 1,
-debugging output is written to standard output.
diff -r 86b711709d4a -r bedc97529c01 usr.bin/yacc/NOTES
--- a/usr.bin/yacc/NOTES        Mon Sep 05 18:21:29 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-$NetBSD: NOTES,v 1.3 1997/10/20 03:41:15 lukem Exp $
-
-Berkeley Yacc reflects its origins.  The reason so many routines
-use exactly six register variables is that Berkeley Yacc was
-developed on a VAX using PCC.  PCC placed at most six variables
-in registers.  I went to considerable effort to find which six
-variables most belonged in registers.  Changes in machines and
-compilers make that effort worthless, perhaps even harmful.
-
-[Given the previous paragraph, and the fact that GCC does not respect
- register declarations, and the fact that much of the rest of the
- 4.4lite2 release had "register" declarations extirpated, I've removed
- most of the register declarations from the code. I left them in the
- generated skeleton code "for the hell of it" but they probably should
- go from there, too. -- pm, July 1997]
-
-[I totally removed the register stuff; we've deprecated it elsewhere
- in the tree now -- lukem, October 1997]
-
-The code contains many instances where address calculations are
-performed in particular ways to optimize the code for the VAX.
diff -r 86b711709d4a -r bedc97529c01 usr.bin/yacc/README
--- a/usr.bin/yacc/README       Mon Sep 05 18:21:29 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-    Berkeley Yacc is an LALR(1) parser generator.  Berkeley Yacc has been made
-as compatible as possible with AT&T Yacc.  Berkeley Yacc can accept any input
-specification that conforms to the AT&T Yacc documentation.  Specifications
-that take advantage of undocumented features of AT&T Yacc will probably be
-rejected.
-
-    Berkeley Yacc is distributed with no warranty whatever.  The code is certain
-to contain errors.  Neither the author nor any contributor takes responsibility
-for any consequences of its use.
-
-    Berkeley Yacc is in the public domain.  The data structures and algorithms
-used in Berkeley Yacc are all either taken from documents available to the
-general public or are inventions of the author.  Anyone may freely distribute
-source or binary forms of Berkeley Yacc whether unchanged or modified.
-Distributers may charge whatever fees they can obtain for Berkeley Yacc.
-Programs generated by Berkeley Yacc may be distributed freely.
-
-    Please report bugs to
-
-                       robert.corbett%eng.Sun.COM@localhost
-
-Include a small example if possible.  Please include the banner string from
-skeleton.c with the bug report.  Do not expect rapid responses.
diff -r 86b711709d4a -r bedc97529c01 usr.bin/yacc/closure.c
--- a/usr.bin/yacc/closure.c    Mon Sep 05 18:21:29 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,304 +0,0 @@
-/*     $NetBSD: closure.c,v 1.8 2006/05/24 18:01:43 christos Exp $     */
-
-/*
- * Copyright (c) 1989 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Robert Paul Corbett.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-#if defined(__RCSID) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)closure.c  5.3 (Berkeley) 5/24/93";
-#else
-__RCSID("$NetBSD: closure.c,v 1.8 2006/05/24 18:01:43 christos Exp $");
-#endif
-#endif /* not lint */
-
-#include "defs.h"
-
-short *itemset;
-short *itemsetend;
-unsigned *ruleset;
-
-static unsigned *first_derives;
-static unsigned *EFF;
-
-static void set_EFF(void);
-
-static void
-set_EFF(void)
-{
-    unsigned *row;
-    int symbol;
-    short *sp;
-    int rowsize;
-    int i;
-    int rule;
-
-    rowsize = WORDSIZE(nvars);
-    EFF = NEW2(nvars * rowsize, unsigned);
-
-    row = EFF;
-    for (i = start_symbol; i < nsyms; i++)
-    {
-       sp = derives[i];
-       for (rule = *sp; rule > 0; rule = *++sp)
-       {
-           symbol = ritem[rrhs[rule]];
-           if (ISVAR(symbol))
-           {
-               symbol -= start_symbol;
-               SETBIT(row, symbol);
-           }
-       }
-       row += rowsize;
-    }
-
-    reflexive_transitive_closure(EFF, nvars);
-
-#ifdef DEBUG
-    print_EFF();
-#endif
-}
-
-
-void
-set_first_derives(void)
-{
-    unsigned *rrow;
-    unsigned *vrow;
-    int j;
-    unsigned k;
-    unsigned cword;
-    short *rp;
-
-    int rule;
-    int i;
-    int rulesetsize;
-    int varsetsize;
-
-    cword = 0;
-
-    rulesetsize = WORDSIZE(nrules);
-    varsetsize = WORDSIZE(nvars);
-    first_derives = NEW2(nvars * rulesetsize, unsigned) - ntokens * rulesetsize;
-
-    set_EFF();
-
-    rrow = first_derives + ntokens * rulesetsize;
-    for (i = start_symbol; i < nsyms; i++)
-    {
-       vrow = EFF + ((i - ntokens) * varsetsize);
-       k = BITS_PER_WORD;
-       for (j = start_symbol; j < nsyms; k++, j++)
-       {
-           if (k >= BITS_PER_WORD)
-           {
-               cword = *vrow++;
-               k = 0;
-           }
-
-           if (cword & (1 << k))
-           {
-               rp = derives[j];
-               while ((rule = *rp++) >= 0)
-               {
-                   SETBIT(rrow, rule);
-               }
-           }
-       }
-
-       vrow += varsetsize;
-       rrow += rulesetsize;
-    }
-
-#ifdef DEBUG
-    print_first_derives();
-#endif
-
-    FREE(EFF);
-}
-
-
-void
-closure(short *nucleus, int n)
-{
-    int ruleno;
-    unsigned word;



Home | Main Index | Thread Index | Old Index