From f066cd048054745c26645d77afa889bc8ecd84e1 Mon Sep 17 00:00:00 2001 From: afedward Date: Mon, 1 Jun 2009 23:59:37 +0000 Subject: [PATCH] Modified to allow byte[] casting --- Robust/src/Parse/java14.cup | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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; :} -- 2.34.1