[antlr-interest] Changing the bracket delimiters inStringTemplate3

Jim Idle jimi at temporal-wave.com
Sat Jul 7 20:03:50 PDT 2007


I think you need:

\<\<

And that you do not need to escape the >

See examples in the C.stg code generation templates for ANTLR3.

Jim

> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Bernardo Elayda
> Sent: Saturday, July 07, 2007 3:37 PM
> To: antlr-interest at antlr.org
> Subject: Re: [antlr-interest] Changing the bracket delimiters
> inStringTemplate3
> 
> >Howdy. Try \< and see if that works.
> >Ter
> 
> That did not work.  Here's a short  and simplified version of my
> tempalte and the problem:
> 
> group Format;
> 
> toplevel(upperwords,lowerwords) ::= ::= <<
> 
> static const u16_t upperdata[]= {
> <upperwords:{a|0x<a>}; wrap, separator=", ">
> };
> 
> c = d << 3;
> e = f >> 8;
> 
> static const u16_t lowerdata[]= {
> <lowerwords:{b|0x<b>;wrap, separator=", ">
> };
> 
> >>
> 
> I tried:
> 
> c = d \<< 3;
> e = f \>> 8;
> 
> and
> 
> c = d \<<< 3;
> e =f \<>> 8;
> 
> neither of these worked.
> 
> In the real code, the "<<" and ">>" are in multiple places.
> 
> Perhpas I misunderstood the suggestion?
> -Bernardo Elayda


More information about the antlr-interest mailing list