[antlr-interest] (no subject)

Mark Wright markwright at internode.on.net
Tue Apr 6 06:42:45 PDT 2010


In the antlr source code distribution you cd to the
directory:

cd antlr-3.2/tool/target/classes/org/antlr/codegen/templates

and then in there, create symlink to a directory where you
are creating the string template for your new target.

You can start by copying the Java one, Java/Java.stg,
and modify it as described in the instructions you
mention below.

In your test grammars you specify your new target
with the:

lexer grammar Zero;
options { language = XYZ; }
ZERO: '0';

where XYZ is the name of your target language, and
the name of the directory you created where ANTLR
looks for your XYZ.stg file.

On Tue, Apr 06, 2010 at 10:04:16AM +0000, Gouasmi Thouraya wrote:
> hello  
> I have need to add another language (another one that those definite in language target), I followed the instructions of "How to build year ANTLR codes generation target" to add the XYZ directory in all the indicated places. But I don't know how must I do now? and where I add the grammar of this new language and the rules of transformation between the grammar of input and this new language? 
> please give me an idea please
> 
> 
> 
>       
> 
> 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