*** empty log message ***
authorspikeuci <spikeuci>
Wed, 12 Oct 2011 01:44:26 +0000 (01:44 +0000)
committerspikeuci <spikeuci>
Wed, 12 Oct 2011 01:44:26 +0000 (01:44 +0000)
Robust/src/Parse/java14.cup

index 061fe2c9aa782d904fdd5e05e0e77567ac72ec05..8e7784f6e93a63c350627fc1f4686efb1f6ede2b 100644 (file)
@@ -2020,16 +2020,37 @@ class_instance_creation_expression ::=
                pn.addChild("decl").addChild("classbody").addChild(body);
                RESULT=pn;
        :}
-//     |       primary DOT NEW IDENTIFIER
-//                     LPAREN argument_list_opt RPAREN {: 
-//             
-//     :}
-//     |       primary DOT NEW IDENTIFIER
-//                     LPAREN argument_list_opt RPAREN class_body
-//     |       name DOT NEW IDENTIFIER
-//                     LPAREN argument_list_opt RPAREN
-//     |       name DOT NEW IDENTIFIER
-//                     LPAREN argument_list_opt RPAREN class_body
+       |       primary DOT NEW class_or_interface_type:type
+                       LPAREN argument_list_opt:args RPAREN {: 
+               ParseNode pn=new ParseNode("createobject",parser.lexer.line_num);
+               pn.addChild(type);
+               pn.addChild(args);
+               RESULT=pn;
+               
+       :}
+       |       primary DOT NEW class_or_interface_type:type
+                       LPAREN argument_list_opt:args RPAREN class_body:body {:
+               ParseNode pn=new ParseNode("createobjectcls",parser.lexer.line_num);          
+               pn.addChild(type);
+               pn.addChild(args);
+               pn.addChild("decl").addChild("classbody").addChild(body);
+               RESULT=pn;
+       :}
+       |       name DOT NEW class_or_interface_type:type
+                       LPAREN argument_list_opt:args RPAREN {:
+               ParseNode pn=new ParseNode("createobject",parser.lexer.line_num);
+               pn.addChild(type);
+               pn.addChild(args);
+               RESULT=pn;
+       :}
+       |       name DOT NEW class_or_interface_type:type
+                       LPAREN argument_list_opt:args RPAREN class_body:body {:
+               ParseNode pn=new ParseNode("createobjectcls",parser.lexer.line_num);          
+               pn.addChild(type);
+               pn.addChild(args);
+               pn.addChild("decl").addChild("classbody").addChild(body);
+               RESULT=pn;
+       :}
        ;
 cons_argument_list_opt ::=
        {: RESULT=new ParseNode("empty",parser.lexer.line_num); :}