2004-11-08 Andrew Cagney <cagney@gnu.org>
[deliverable/binutils-gdb.git] / gdb / jv-exp.y
index 41da7d0f3fdcf2470a52a66e5f2fb56f8090ee91..a3d1210445465bcbf7411dd0690ab06c7a62a573 100644 (file)
@@ -446,13 +446,22 @@ FieldAccess:
 /*|    SUPER '.' SimpleName { FIXME } */
 ;
 
+FuncStart:
+       Name '('
+                { push_expression_name ($1); }
+;
+
 MethodInvocation:
-       Name '(' ArgumentList_opt ')'
-               { error (_("Method invocation not implemented")); }
+       FuncStart
+                { start_arglist(); }
+       ArgumentList_opt ')'
+                { write_exp_elt_opcode (OP_FUNCALL);
+                 write_exp_elt_longcst ((LONGEST) end_arglist ());
+                 write_exp_elt_opcode (OP_FUNCALL); }
 |      Primary '.' SimpleName '(' ArgumentList_opt ')'
-               { error (_("Method invocation not implemented")); }
+               { error (_("Form of method invocation not implemented")); }
 |      SUPER '.' SimpleName '(' ArgumentList_opt ')'
-               { error (_("Method invocation not implemented")); }
+               { error (_("Form of method invocation not implemented")); }
 ;
 
 ArrayAccess:
This page took 0.026214 seconds and 4 git commands to generate.