[antlr-interest] resolving function issue

ajk . anders43 at gmail.com
Tue Mar 31 00:08:46 PDT 2009


Hi,

I have a problem that I need to handle, it is related to delegates and I was
wondering if somebody had some ideas how to solve it.

Problem:

Consider the following

delegate void D(Int16)
subroutine F(D d)
subroutine M(int n)
subroutine M(long n)

Now the user writes (where M is the actual method name)

F(M)

In our current design F can not be resolved until all its arguments have
been resolved but how to resolve M if it could be either M1 or M2?

One proposed solution would be put a placeholder so that F gets resolved and
later use the formal argument type to resolve M but if there are several
F's:

F(D1 d)
F(D2 d)

We got then again a problem. How does one normally solve this kind of thing?

Would be grateful for any ideas!
BR
Anders.

PS. ANTLR2/C++
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090331/951b2b03/attachment.html 


More information about the antlr-interest mailing list