[stringtemplate-interest] Re: [antlr-dev] Re: FYI: lookahead decision vars in switches

Terence Parr parrt at cs.usfca.edu
Thu May 11 10:27:02 PDT 2006


On May 11, 2006, at 12:20 AM, Jim Idle wrote:
> Yes - I think it would be reasonable to add it to ST somehow. Of  
> course you
> can't really decide what type of comment to spit out, but if there  
> was an
> attribute available with information about the rule you could have  
> something
> like: <if(STDebug)>//<ruleDebugINfo><endif>  (Syntax was straight  
> out my
> head so it probably isn't correct but you get what I mean ;-)
>
> Or perhaps there is a way to specify a "debug rule info line"  
> prefix and
> postfix attribute then ST could use it to spit out the info  
> automatically?

I'm thinking that we want a method like

emitTemplateBoundaryDebugStrings("<!-- start $name$", "-->");

where the args are templates and may reference name for the  
template...what else would be useful?  The stack context like <!--  
[outputfile class method statement ... --> ?

[For those just tuning in from ST list: we want to print out text at  
start/stop of each template dumped out so we can figure out where  
text is coming from.]

Ter


More information about the stringtemplate-interest mailing list