|Determining argument types at compile-time email@example.com (Jaspar Cahill) (2001-07-03)|
|From:||"Jaspar Cahill" <firstname.lastname@example.org>|
|Date:||3 Jul 2001 23:23:03 -0400|
|Posted-Date:||03 Jul 2001 23:23:03 EDT|
I am parsing some Java files and am trying to find a way to determine
the type of each argument in a method call. The types are needed to
match the method call to the actual method. Matching is not simply
based on name. The problem is that argument type is not always easy
to obtain. In the case of
it is easy to work out that the type is char. But in the case of,
func2 has to be matched to a method based on its argument, and return
type obtained, in order to obtain the argument type for func1.
Nesting could be deeper.
An argument is an expression, so the problem gets down to working out the
resulting type of an expression.
This issue must come up frequently in Java compilation. Is there a
common way of dealing it? Is it possible in Java to work out argument
types in all cases at compile-time?
Any help would be greatly appreciated.
Return to the
Search the comp.compilers archives again.