Nice/src/bossa/parser Parser.jj,1.320,1.321

Daniel Bonniot <[email protected]> Mon, 21 Mar 2005 16:55:45 +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-serv22259/src/bossa/parser

Modified Files:
	Parser.jj 
Log Message:
Improved location of redundant nullness markers errors.

Removed dubious testcases and added clear ones.


Index: Parser.jj
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/parser/Parser.jj,v
retrieving revision 1.320
retrieving revision 1.321
diff -C2 -d -r1.320 -r1.321
*** Parser.jj	12 Mar 2005 17:03:53 -0000	1.320
--- Parser.jj	21 Mar 2005 16:55:35 -0000	1.321
***************
*** 802,806 ****
    Monotype res;
    List p=null;
!   Token start, end;
    boolean maybe = false, sure = false;
  }
--- 802,806 ----
    Monotype res;
    List p=null;
!   Token start = null, end;
    boolean maybe = false, sure = false;
  }
***************
*** 809,814 ****
      // Consume "?" only if it does not appear by itself
      LOOKAHEAD( "?", { getToken(2).kind != COMMA && getToken(2).kind != GT})
!     "?" { maybe = true; }
!   | "!" { sure = true; }
    ]
  
--- 809,814 ----
      // Consume "?" only if it does not appear by itself
      LOOKAHEAD( "?", { getToken(2).kind != COMMA && getToken(2).kind != GT})
!     start="?" { maybe = true; }
!   | start="!" { sure = true; }
    ]
  
***************
*** 831,835 ****
          (res.nullness != /*absent*/3))
        throw bossa.util.User.error
!         (res, "Nullness is specified in two ways for " + res);
      if (maybe)
        res.nullness = /*maybe*/1;
--- 831,835 ----
          (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;



-------------------------------------------------------
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