[antlr-interest] Good papers for C#/Java parser stages
Alex Sedow
alexsedow at mail.ru
Mon May 17 10:12:13 PDT 2004
> > Another question. What better: on first and second pass generate only
> > entity model and on third pass generate AST with fully resolved
> > entities. Or generate AST on first pass and then resolve entity
refrences
> > on second and third passes? For C# 1.x second variant is better because
> > it has only two syntax examples that can be pure syntactly resolved (and
> > may simply fixed with minor changes in AST tree on third pass). But in
C#
> > 2.0 introduce more syntax ambiguity and AST conversions may not so
> > simple.
>
> I'm just jumping in so my apologies in advance if I missed something
> important.
>
> Basically, the idea is to do just what you need to do with lexing to
enable
> the parser to parse the input into an initial AST. Then create successive
> tree walkers/transformers to do the real transformation work.
>
> Take care,
> John
Ok, I understand. My mistake consist in that I tried on first and
second pass build entity model, and generate AST on third pass (plus, I have
incorrectly analysed 2-nd pass, that suggest me on infinite stages parsing).
AST generation on first pass + 2 additional passes seems match better.
Thanks to all. Subject is closed.
Alex.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list