]> andersk Git - splint.git/blobdiff - src/signature.y
noexpand always false.
[splint.git] / src / signature.y
index c6f30e7282726f146262a4f15c6fbc7df162ec98..a5b3fd96c6c52e5da793e6025c31b6219957af81 100644 (file)
@@ -1,6 +1,6 @@
 /*;-*-C-*-;
 ** Splint - annotation-assisted static program checker
-** Copyright (C) 1994-2002 University of Virginia,
+** Copyright (C) 1994-2003 University of Virginia,
 **         Massachusetts Institute of Technology
 **
 ** This program is free software; you can redistribute it and/or modify it
 
 # include <stdio.h>
 # include "splintMacros.nf"
-# include "llbasic.h"
+# include "basic.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. */
@@ -97,7 +99,7 @@ static void yyprint (/*FILE *p_file, int p_type, YYSTYPE p_value */);
 %token <ltok> LST_COMMA             /* , */
 %token <ltok> LST_EOL LST_COMMENTSYM LST_WHITESPACE 
 
-%token LST_WHITESPACE
+ /* %token LST_WHITESPACE */ /* Duplicate tokey removed */
 %token LST_QUANTIFIERSYM
 %token LST_EQUATIONSYM
 %token LST_EQSEPSYM
@@ -135,6 +137,7 @@ static void yyprint (/*FILE *p_file, int p_type, YYSTYPE p_value */);
 %%
 
 top: operatorList { lslOpList_free ($1); } 
+  ;
  
 operatorList: operator 
               { lslOpList x = lslOpList_new ();
@@ -144,17 +147,20 @@ operatorList: operator
             | operatorList operator
               { lslOpList_add ($1, $2);
                $$ = $1; } 
+;
 
 operator: name LST_COLON signature 
           { $$ = makelslOpNode ($1, $3); }
 /* The next production is never used in the output of lsl -syms 
           |  name
           { $$ = makelslOpNode ($1, (sigNode)0); } */
+;
  
 name: opId /* check for the case of if_then_else */
       { $$ = makeNameNodeId ($1); } 
     | opForm
       { $$ = makeNameNodeForm ($1); }
+;
  
 opForm 
      : LST_ifTOKEN LST_MARKERSYM LST_thenTOKEN LST_MARKERSYM LST_elseTOKEN LST_MARKERSYM
@@ -199,7 +205,7 @@ opForm
      | LST_MARKERSYM LST_FIELDMAPSYM LST_SIMPLEID
      { $$ = makeOpFormNode ($1, OPF_MMAP, 
                            opFormUnion_createAnyOp ($3), ltoken_undefined); }
-                         
+;                        
 
 anyOp: LST_SIMPLEOP
        { $$ = $1; }
@@ -207,43 +213,53 @@ anyOp: LST_SIMPLEOP
        { $$ = $1; }
      | LST_EQOP
        { $$ = $1; }
+;
 
 middle: /* empty */
         { $$ = 0; }      
       | placeList
         { $$ = $1; }      
+;
  
 placeList: LST_MARKERSYM
            { $$ = 1; }      
          | placeList separator LST_MARKERSYM
            { $$ = $1 + 1; }      
+;
  
 separator: LST_COMMA
            { $$ = $1; }      
          | LST_SEPSYM
            { $$ = $1; }      
+;
 
 signature: domain LST_MAPSYM sortId
            { $$ = makesigNode ($2, $1, $3); }
+;
 
 domain: /* empty */
         { $$ = ltokenList_new (); } 
       | sortList
         { $$ = $1; }
+;
  
 sortList: sortId
           { $$ = ltokenList_singleton ($1); } 
         | sortList LST_COMMA sortId
           { $$ = ltokenList_push ($1, $3); }  
+;
 
 sortId: LST_SIMPLEID 
         { 
          $$ = $1; 
          ltoken_setText ($$, processTraitSortId (ltoken_getText ($1))); 
        } 
+;
 
 opId: LST_SIMPLEID
       { $$ = $1; }
+;
+
 %%
 
 # include "bison.reset"
This page took 0.039977 seconds and 4 git commands to generate.