[antlr-interest] Good papers for C#/Java parser stages
robin at debreuil.com
Sat May 15 11:47:14 PDT 2004
For enclosure (scope, right?), you can keep track of that while parsing -
just keep track of the 'current scope' as you enter and leave scope
elements. For the types (inheritance, implemented interfaces, visibility)
there is forward referencing, so will at least have to do some resolution at
the end, or just use a second pass after all the types are defined. I think
it is easier to just wait, there isn't much of a speed penalty just walking
I'm not sure why you would need more than a second stage though, perhaps I'm
missing which exact step you mean..? I use a third pass for type
attribution, and resolving overloads etc. Obviously you can't resolve the
exact map at compile time in some cases (eg you always know which overload,
but not which virtual method). That's for C#, though I think Java would be
similar in most respects.
> Anybody knows where to get good papers on parsing Java or C#?
> At present day I try to add entity resolution mechanism to C# parser
> (lexer/parser/tree generation stages is completed).
> Entity resolution in C# needs to analyse two kinds of dependences:
> and inheritance. These dependences form two orthogonal acyclic graphs.
> Parser should reveal these dependences and organize the order of their
> processing (it is the basic complexity). Is it demands (generally)
> number of stages? Or it is possible use finite number of stages?
Yahoo! Groups Links
<*> To visit your group on the web, go to:
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
More information about the antlr-interest