[Nice-commit] Nice/src/bossa/parser Parser.jj,1.250,1.251
Brought to you by:
bonniot
From: Daniel B. <bo...@us...> - 2004-07-30 19:08:55
|
Update of /cvsroot/nice/Nice/src/bossa/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6432/src/bossa/parser Modified Files: Parser.jj Log Message: java.lang.Class is now parameterized by the type it represents. Index: Parser.jj =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/parser/Parser.jj,v retrieving revision 1.250 retrieving revision 1.251 diff -C2 -d -r1.250 -r1.251 *** Parser.jj 28 Jul 2004 21:23:39 -0000 1.250 --- Parser.jj 30 Jul 2004 19:08:45 -0000 1.251 *************** *** 521,529 **** } ! ConstantExp typeExpression(): { LocatedString name; } { name = doted_array_string() ! { return ConstantExp.makeType(name); } } --- 521,529 ---- } ! TypeConstantExp typeExpression(): { LocatedString name; } { name = doted_array_string() ! { return new TypeConstantExp(name); } } *************** *** 776,780 **** } { ! [ "?" { maybe = true; } | "!" { sure = true; } ] ( --- 776,785 ---- } { ! [ ! // Consume "?" only if it does not appear by itself ! LOOKAHEAD( "?", { getToken(2).kind != COMMA && getToken(2).kind != GT}) ! "?" { maybe = true; } ! | "!" { sure = true; } ! ] ( *************** *** 803,806 **** --- 808,814 ---- } { return res; } + | + "?" + { return Monotype.create(mlsub.typing.UnknownMonotype.instance); } } *************** *** 2055,2062 **** { Expression res; } { ! res=RelationalExpression() ! [ { Token t; ConstantExp type; } ! t="instanceof" type=typeExpression() ! { return CallExp.create(symb(t), res, type); } ] { return res; } --- 2063,2070 ---- { Expression res; } { ! res=RelationalExpression() ! [ { Token t; TypeConstantExp type; } ! t="instanceof" type=typeExpression() ! { type.isLiteral = true; return CallExp.create(symb(t), res, type); } ] { return res; } *************** *** 2213,2219 **** | LOOKAHEAD( doted_array_string() "." "class" ) ! { ConstantExp type; Token t; } type=typeExpression() "." t="class" ! { return CallExp.create(symb(t), type); } | //Name() --- 2221,2227 ---- | LOOKAHEAD( doted_array_string() "." "class" ) ! { TypeConstantExp type; Token t; } type=typeExpression() "." t="class" ! { type.isExpression = true; return type; } | //Name() |