logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Nice/src/bossa/parser Parser.jj,1.233,1.234: msg#00063

Subject: Nice/src/bossa/parser Parser.jj,1.233,1.234
Update of /cvsroot/nice/Nice/src/bossa/parser
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26038/src/bossa/parser

Modified Files:
        Parser.jj 
Log Message:
Allow X <: Y <: Z in constraints.


Index: Parser.jj
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/parser/Parser.jj,v
retrieving revision 1.233
retrieving revision 1.234
diff -C2 -d -r1.233 -r1.234
*** Parser.jj   27 Jan 2004 21:58:58 -0000      1.233
--- Parser.jj   27 Jan 2004 22:58:14 -0000      1.234
***************
*** 580,606 ****
  }
  
! AtomicConstraint atomicConstraint():
  {
    Monotype m1,m2;  
    TypeIdent t,i;
-   AtomicConstraint res;
  }
  {
  (  LOOKAHEAD(2)
     m1=monotype() "<:" m2=monotype()
!    { res=new MonotypeLeqCst(m1,m2); }
  |
     t=typeConstructorIdent() ":" i=typeIdent()
!    { res=new ImplementsCst(t,i); }
  )
-   { return res; }
  }
  
  void atomics(List res):
! // if res is null, we just want lookahead
! { AtomicConstraint k; }
  {
!   k=atomicConstraint() { res.add(k); }
!   ( "," k=atomicConstraint() { res.add(k); } ) *
  }
  
--- 580,606 ----
  }
  
! void atomicConstraint(List list):
  {
    Monotype m1,m2;  
    TypeIdent t,i;
  }
  {
  (  LOOKAHEAD(2)
     m1=monotype() "<:" m2=monotype()
!    { list.add(new MonotypeLeqCst(m1,m2)); }
!    ( "<:" { m1 = m2; }
!      m2 = monotype()
!      { list.add(new MonotypeLeqCst(m1,m2)); }
!    )*
  |
     t=typeConstructorIdent() ":" i=typeIdent()
!    { list.add(new ImplementsCst(t,i)); }
  )
  }
  
  void atomics(List res):
! {}
  {
!   atomicConstraint(res)  ( "," atomicConstraint(res) )*
  }
  



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn


<Prev in Thread] Current Thread [Next in Thread>