[prev in list] [next in list] [prev in thread] [next in thread] 

List:       stringtemplate-interest
Subject:    Re: [stringtemplate-interest] 2. Attempt: ANTLR code generation
From:       Udo Weik <WeikEngOff () aol ! com>
Date:       2011-11-26 1:40:07
Message-ID: 4ED04377.5060307 () aol ! com
[Download RAW message or body]

Hello Terence,

thanks for your answer!
I know, I know your students and the end of the year....

> > I startet to modify the C-Runtime and have a first bunch of
> > questions. Be sure, more will follow - "Eeek, what a pain!"...
> > 
> > 1.<token>  in<action>
> > I need the token of an rule in the<action>-section
> > /** How to execute an action (when not backtracking) */
> > execAction(action) ::=<<
> > <if(backtracking)>
> > <if(actions.(actionScope).synpredgate)>
> > if (<actions.(actionScope).synpredgate>  )
> > ...
> > <ruleDescriptor.name>  and<ruleName>  are replaced (what is the
> > difference?) but<token>  not. Why?
> 
> So in the execAction template you want to reference<token>? What do you mean by \
> token in a rule? you can get a tree for the rule in the Rule object: 
> 	/** The AST representing the whole rule */
> 	public GrammarAST tree;

Attached you will find a pdf-file which explains my problem -
state-of-the-art highlighted in colour!
And then there is still the question:
   <ruleDescriptor.name> and <ruleName> what is the difference?

I asked Jim already - I just copied his template-dir, renamed the
file C.stg to CRtMod1a.stg and added my "pathfinder"-comments
beginning with //! , followed by tg__ (test grammar) or tt__
(test template). Only the *.c-file is generated, the *.h-file
is missing. Why?


Again many thanks and greetings
Udo


["CRtMod1a__Test1aParser.pdf" (application/pdf)]

_______________________________________________
stringtemplate-interest mailing list
stringtemplate-interest@antlr.org
http://www.antlr.org/mailman/listinfo/stringtemplate-interest


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic