[antlr-interest] problems with C runtime and output=template

Johannes Luber jaluber at gmx.de
Sun Mar 1 23:05:18 PST 2009


Richard Lewis schrieb:
> Hi,
> 
>  
> 
> I found out from the WIKI that RewriteTokenStream is not implemented
> yet. Is this related to string template rewriting not being available?
> If so, when will this be implemented since it’s a roadblock for me.

C doesn't lend itself to implement StringTemplate, so I doubt that it is
ever going to be available, unless Jim decides to add ST support for C++
and uses that for C, too.

Johannes
> 
>  
> 
> *From:* antlr-interest-bounces at antlr.org
> [mailto:antlr-interest-bounces at antlr.org] *On Behalf Of *Richard Lewis
> *Sent:* Monday, 2 March 2009 5:05 PM
> *To:* antlr-interest at antlr.org
> *Subject:* [antlr-interest] problems with C runtime and output=template
> 
>  
> 
> Hi,
> 
>  
> 
> I’m trying to convert my tree grammar from JAVA to C and running into
> issue with code generation. I’m targeting string templates as the output
> type and run into the following error:
> 
>  
> 
> 1>Translating to tree parser.
> 
> 1> : error 10 : internal error: no such group file ST.stg 
> 
> 1>Project : error PRJ0019: A tool returned an error code from
> "Translating to tree parser."
> 
>  
> 
> Are string template outputs supported in the C code generator? I can’t
> find a corresponding ST.stg in the codegen/templates/C
> 
>  
> 
>  
> 
> Specifying C – Runtime:
> 
>  
> 
> tree grammar RazorTree;
> 
>  
> 
> options{
> 
>       language = C;
> 
>       tokenVocab = Razor;
> 
>       ASTLabelType = pANTLR3_BASE_TREE;
> 
>       output = template;
> 
> }
> 
>  
> 
> Original JAVA – Runtime:
> 
>  
> 
> options{
> 
>       tokenVocab = Razor;
> 
>       ASTLabelType = CommonTree;
> 
>       output = template;
> 
> }
> 
>  
> 
> 
> ------------------------------------------------------------------------
> 
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address



More information about the antlr-interest mailing list