[antlr-interest] Re: Get AST info of a previos treeparser

David Ryan oobles at hotmail.com
Mon Aug 30 17:07:18 PDT 2004


I'm not sure exactly where your problem is, but it could hae to do
with mismatching tokens?

I recently did a multiple pass Tree parser over XML using XPA.  To
make sure all the Tree Parsers would work together I imported the
Token types from the first pass into my subsequent passes.

options
{
   buildAST = true;
   importVocab = Step1Pass;
}

I was able to perform 9 phases, with some phases being passed multiple
times.

Hope that helps,
David.

--- In antlr-interest at yahoogroups.com, Joan Pujol <joanpujol at g...> wrote:
> Hi,
> 
> I'm doing the semantic control using several phases: TreeParser1,
TreeParser2.
> And I have a problem trying to get info from TreeParser1 with
TreeParser2.
> 
> For example I have the rule:
> root: #(ROOT a1 a2 a3)
> 
> If I use buildAST=false I can use the info from the previos AST with
#root.
> Because in sourece code #root resolves to root_AST_in.
> 
> But if I use buildAST=true (what I need) #root is resolved to root_AST
> that it's null.
> How can I access the root_AST_in when I have buildAST=true? Because in
> the code exist, but I don't know how to get the value.
> 
> Cheers,
> 
> -- 
> Joan Jesús Pujol Espinar



 
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