]> andersk Git - splint.git/blobdiff - src/signature.y
Committed my changes (but there are several splintme errors currently).
[splint.git] / src / signature.y
index c2724350f0da15c4059525df51c22a166ea94a71..28fdc363442d59edbc931e09c13d400027c1d035 100644 (file)
@@ -1,49 +1,45 @@
 /*;-*-C-*-;
-** Copyright (c) Massachusetts Institute of Technology 1994-1998.
-**          All Rights Reserved.
-**          Unpublished rights reserved under the copyright laws of
-**          the United States.
+** Splint - annotation-assisted static program checker
+** Copyright (C) 1994-2002 University of Virginia,
+**         Massachusetts Institute of Technology
 **
-** THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
-** OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
-**
-** This code is distributed freely and may be used freely under the 
-** following conditions:
-**
-**     1. This notice may not be removed or altered.
+** This program is free software; you can redistribute it and/or modify it
+** under the terms of the GNU General Public License as published by the
+** Free Software Foundation; either version 2 of the License, or (at your
+** option) any later version.
+** 
+** This program is distributed in the hope that it will be useful, but
+** WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+** General Public License for more details.
+** 
+** The GNU General Public License is available from http://www.gnu.org/ or
+** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+** MA 02111-1307, USA.
 **
-**     2. Works derived from this code are not distributed for
-**        commercial gain without explicit permission from MIT 
-**        (for permission contact lclint-request@sds.lcs.mit.edu).
+** For information on splint: splint@cs.virginia.edu
+** To report a bug: splint-bug@cs.virginia.edu
+** For more information: http://www.splint.org
 */
 /*
-**      Copyright (c) Massachusetts Institute of Technology, 1993
-**         All Rights Reserved.  Unpublished rights reserved
-**         under the copyright laws of the United States.
-**++
-**  FACILITY:  LSLC
-**
-**  MODULE DESCRIPTION:
+** signature.y
 **
-**      FILENAME: signature.y
+** Grammar for parsing LSL signatures.
 **
-**     PURPOSE:  bison grammar for LSL signatures.
-** 
-**  AUTHOR:
-**     Yang Meng Tan, Massachusetts Institute of Technology
+** Original author: Yang Meng Tan, Massachusetts Institute of Technology
 */
 
 %{
 
-# include "bison.reset"
-
 # include <stdio.h>
-# include "lclintMacros.nf"
+# include "splintMacros.nf"
 # include "llbasic.h"
 # include "lslparse.h"
 # include "signature.h"
 
-void lslerror (char *);
+static void lslerror (char *);
+extern int lsllex ();
+
 /*@dependent@*/ /*@null@*/ lslOp importedlslOp;
 
 /*@-noparams@*/ /* Can't list params since YYSTYPE isn't defined yet. */
@@ -54,7 +50,9 @@ static void yyprint (/*FILE *p_file, int p_type, YYSTYPE p_value */);
 
 # define YYDEBUG 1
 
-# include "bison.head"
+/*@-redef@*/
+/*@-readonlytrans@*/
+/*@-nullassign@*/
 
 %}
 
@@ -79,7 +77,9 @@ static void yyprint (/*FILE *p_file, int p_type, YYSTYPE p_value */);
   /*@only@*/  nameNode name;
   /*@owned@*/ lslOp operator;
   /*@only@*/  lslOpList operators;
-}
+  /*@-redef@*/ /*@-matchfields@*/ 
+} 
+/*@=redef@*/ /*@=matchfields@*/
 
 %token <ltok> LST_SIMPLEID
 %token <ltok> LST_LOGICALOP         /* \implies, \and, \not, \or */
@@ -254,9 +254,12 @@ extern char *yytext;
 
 void lslerror (char *s) 
 {
-  lclplainerror 
-    (message ("An error has occurred in parsing LSL signature: %s", 
-             cstring_fromChars (s)));
+  llfatalbug 
+    (cstring_makeLiteral 
+     ("There has been a problem in the parser with LSL signatures. This is believed to result "
+      "from a problem with bison v. 1.25.  Please try rebuidling Splint "
+      "using the pre-compiled grammar files by commenting out the "
+      "BISON= line in the top-level Makefile."));
 }
 
 static void yyprint (FILE *file, int type, YYSTYPE value)
This page took 0.277761 seconds and 4 git commands to generate.