Nice/src/bossa/parser Parser.jj,1.328,1.329

Arjan Boeijink <[email protected]> Sun, 10 Apr 2005 14:57:07 +0000
Newsgroups gmane.comp.lang.nice.cvs
Message-ID <[email protected]>
Update of /cvsroot/nice/Nice/src/bossa/parser
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24986/F:/nice/src/bossa/parser

Modified Files:
	Parser.jj 
Log Message:
Constants for nullness tags.

Index: Parser.jj
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/parser/Parser.jj,v
retrieving revision 1.328
retrieving revision 1.329
diff -C2 -d -r1.328 -r1.329
*** Parser.jj	9 Apr 2005 10:58:17 -0000	1.328
--- Parser.jj	10 Apr 2005 14:57:02 -0000	1.329
***************
*** 730,736 ****
      FunType res = bossa.syntax.dispatch.createFunType(domain, codomain);
      if (maybe)
!       res.nullness = /*maybe*/1;
      else
!      res.nullness = /*absent*/3;
      return res;
    }
--- 730,736 ----
      FunType res = bossa.syntax.dispatch.createFunType(domain, codomain);
      if (maybe)
!       res.nullness = bossa.syntax.fun.nullness_maybe;
      else
!      res.nullness = bossa.syntax.fun.nullness_absent;
      return res;
    }
***************
*** 748,752 ****
        res = new TypeIdent(new LocatedString("void",makeLocation(start, end)));
  
!     res.nullness = /*absent*/3;
      return res;
    }
--- 748,752 ----
        res = new TypeIdent(new LocatedString("void",makeLocation(start, end)));
  
!     res.nullness = bossa.syntax.fun.nullness_absent;
      return res;
    }
***************
*** 773,779 ****
      res = bossa.syntax.dispatch.createFunType_(domain, codomain);
      if (maybe)
!       res.nullness = /*maybe*/1;
      else
!       res.nullness = /*absent*/3; }
  ]
    { return res; }
--- 773,779 ----
      res = bossa.syntax.dispatch.createFunType_(domain, codomain);
      if (maybe)
!       res.nullness = bossa.syntax.fun.nullness_maybe;
      else
!       res.nullness = bossa.syntax.fun.nullness_absent; }
  ]
    { return res; }
***************
*** 807,813 ****
         loc);
      if (maybe)
!       res.nullness = /*maybe*/1;
      else
!       res.nullness = /*absent*/3;
    }
  ]
--- 807,813 ----
         loc);
      if (maybe)
!       res.nullness = bossa.syntax.fun.nullness_maybe;
      else
!       res.nullness = bossa.syntax.fun.nullness_absent;
    }
  ]
***************
*** 835,856 ****
    start="alike" [ "<" p=monotypes() ">" ]
    { res=bossa.syntax.dispatch.createAlike(p, makeLocation(start)); }
!   { res.nullness = /*absent*/3; }
  |
    LOOKAHEAD( typeConstructorIdent() "<" )
    res=monotypeConstructor()
!   { res.nullness = /*absent*/3; }
  |
    res=typeIdent()
!   { res.nullness = /*absent*/3; }
    )
    {
      if ((maybe || sure) &&
!         (res.nullness != /*absent*/3))
        throw bossa.util.User.error
          (makeLocation(start), "Nullness is specified in two ways for " + res);
      if (maybe)
!       res.nullness = /*maybe*/1;
      else if (sure)
!       res.nullness = /*sure*/2;
    }
    { return res; }
--- 835,856 ----
    start="alike" [ "<" p=monotypes() ">" ]
    { res=bossa.syntax.dispatch.createAlike(p, makeLocation(start)); }
!   { res.nullness = bossa.syntax.fun.nullness_absent; }
  |
    LOOKAHEAD( typeConstructorIdent() "<" )
    res=monotypeConstructor()
!   { res.nullness = bossa.syntax.fun.nullness_absent; }
  |
    res=typeIdent()
!   { res.nullness = bossa.syntax.fun.nullness_absent; }
    )
    {
      if ((maybe || sure) &&
!         (res.nullness != bossa.syntax.fun.nullness_absent))
        throw bossa.util.User.error
          (makeLocation(start), "Nullness is specified in two ways for " + res);
      if (maybe)
!       res.nullness = bossa.syntax.fun.nullness_maybe;
      else if (sure)
!       res.nullness = bossa.syntax.fun.nullness_sure;
    }
    { return res; }
***************
*** 903,907 ****
    last=")"
    { Monotype t = new TupleType(types, makeLocation(first, last));
!     t.nullness = /*absent*/3;
      monotypes.add(t);
      return new TupleExp(parts); }
--- 903,907 ----
    last=")"
    { Monotype t = new TupleType(types, makeLocation(first, last));
!     t.nullness = bossa.syntax.fun.nullness_absent;
      monotypes.add(t);
      return new TupleExp(parts); }
***************
*** 935,939 ****
      statements.add(bossa.syntax.dispatch.createExpressionStmt(exp));
      t = new TupleType(types, makeLocation(first, last));
!     t.nullness = /*absent*/3;
  
      return t.createParameter(ident ,val);
--- 935,939 ----
      statements.add(bossa.syntax.dispatch.createExpressionStmt(exp));
      t = new TupleType(types, makeLocation(first, last));
!     t.nullness = bossa.syntax.fun.nullness_absent;
  
      return t.createParameter(ident ,val);
***************
*** 1276,1280 ****
      if (bound != null)
        {
!         bound.nullness = /*absent*/3;
          atoms.add(new MonotypeLeqCst(new MonotypeVarWrapper(mv), bound));
        }
--- 1276,1280 ----
      if (bound != null)
        {
!         bound.nullness = bossa.syntax.fun.nullness_absent;
          atoms.add(new MonotypeLeqCst(new MonotypeVarWrapper(mv), bound));
        }
***************
*** 1818,1822 ****
      statements.add(bossa.syntax.dispatch.createExpressionStmt(exp));
      type = new TupleType(types, makeLocation(first, last));
!     type.nullness = /*absent*/3;
      return bossa.syntax.dispatch.createMonoSymbol(name, type);
    }
--- 1818,1822 ----
      statements.add(bossa.syntax.dispatch.createExpressionStmt(exp));
      type = new TupleType(types, makeLocation(first, last));
!     type.nullness = bossa.syntax.fun.nullness_absent;
      return bossa.syntax.dispatch.createMonoSymbol(name, type);
    }



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click