[antlr-interest] Modifying a target language template file for AntlrWorks
Ron Hunter-Duvar
ron.hunter-duvar at oracle.com
Tue May 4 08:16:48 PDT 2010
Hi Alan,
I found this page to be very helpful as a starting point:
http://www.antlr.org/wiki/display/ANTLR3/How+to+build+an+ANTLR+code+generation+target
I've been able to make some simple changes to the Java target using
these instructions. The hard part is trying to unravel the convoluted
flow of the templates to be able to make meaningful changes. Due to
StringTemplate's ability to use indirection (call a template whose name
is stored in a variable), it is sometimes nearly impossible to tell
where a template is used (or whether it is used at all).
Ron
Alan Condit wrote:
> Is it possible to modify a target language template for use with AntlrWorks, without rebuilding the Antlr jar?
> For example I want to change the C template to have it output a ".m" file for linking with objective-C.
>
> Alan
> ---
>
> Alan Condit
> 1085 Tierra Ct.
> Woodburn, OR 97071
>
> Email -- acondit at ipns.com
> Home-Office (503) 982-0906
>
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>
>
--
Ron Hunter-Duvar | Software Developer V | 403-272-6580
Oracle Service Engineering
Gulf Canada Square 401 - 9th Avenue S.W., Calgary, AB, Canada T2P 3C5
All opinions expressed here are mine, and do not necessarily represent
those of my employer.
More information about the antlr-interest
mailing list