From: afedward Date: Mon, 1 Jun 2009 23:59:37 +0000 (+0000) Subject: Modified to allow byte[] casting X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f066cd048054745c26645d77afa889bc8ecd84e1;p=IRC.git Modified to allow byte[] casting --- diff --git a/Robust/src/Parse/java14.cup b/Robust/src/Parse/java14.cup index bf5141bd..edc61cb7 100644 --- a/Robust/src/Parse/java14.cup +++ b/Robust/src/Parse/java14.cup @@ -1718,11 +1718,16 @@ unary_expression_not_plus_minus ::= | cast_expression:exp {: RESULT=exp; :} ; cast_expression ::= - LPAREN primitive_type:type - //dims_opt + LPAREN primitive_type:type dims_opt:dims RPAREN unary_expression:exp {: ParseNode pn=new ParseNode("cast1"); +if (dims.intValue()==0) pn.addChild("type").addChild(type); +else { + ParseNode arrayt=pn.addChild("type").addChild("array"); + pn.addChild("basetype").addChild(type); + pn.addChild("dims").setLiteral(dims); +} pn.addChild("exp").addChild(exp); RESULT=pn; :}