[antlr-interest] 回复: Re: Problem to run Beta 4

孙纪刚 Jigang (Robert) Sun sunjigang1965 at yahoo.com.cn
Tue Sep 19 14:44:10 PDT 2006


I put the three .jar files into my working directory, my DOS batch file contains:

path=d:\j2sdk1.4.2_05\bin
java -cp antlr-30b4.jar;stringtemplate-23b9.jar;antlr-276.jar org.antlr.Tool ep.g

excuting the .bat file:

D:\MiniClean\Clean>path=d:\j2sdk1.4.2_05\bin

D:\MiniClean\Clean>java -cp antlr-30b4.jar;stringtemplate-23b9.jar;antlr-276.jar org.antlr.Too
l ep.g
no such locale file org/antlr/tool/templates/messages/zh.stg retrying with English locale
ANTLR Parser Generator   Early Access Version 3.0b4 (??, 2006)  1989-2006

D:\MiniClean\Clean>

I am not sure if it is successful, for "no such locale file.." is echoed, nevertherless it has
produced parser and lexer file, they are .java files. What I want is c# target. Could anyone give
me a quick guidance? Unlike v2 grammar, I have not found a "options { language  = "CSharp";} "
switch permitted in v3 grammar.

Thanks.

Jigang  


--- John Vanderburg <johnvms11 at yahoo.com>写道:

> I have Beta 4 install in C:\antlr\30b4  and use the following .bat file to run the antlr.Tool
>  
>  
> @echo off
> set
>
CP=C:\antlr\30b4\lib\antlr-3.0b4.jar;C:\antlr\30b4\lib\antlr-2.7.6.jar;C:\antlr\30b4\lib\stringtemplate-2.3b9.jar;%CLASSPATH%
> set cmd=java -classpath "%CP%" org.antlr.Tool %*
> echo %cmd%
> %cmd%
> set CP
>  
> I have CLASSPATH set as an environment variable (Right click on My Computer, Click on the
> Advanced Tab and edit System Variables), as follows (note the '.' at the beginning of the line):
>  
> .;C:\Program Files\Java\jre1.5.0_06\lib\ext\QTJava.zip
>  
>  
> Also, I wasn't able to get the C# target to work, so I've been using Java to test with.  I use
> the following .bat file to 
>  
> The file is called antlrv3jc.bat
>  
> @echo off
> set
>
CP=C:\antlr\30b4\lib\antlr-3.0b4.jar;C:\antlr\30b4\lib\antlr-2.7.6.jar;C:\antlr\30b4\lib\stringtemplate-2.3b9.jar;%CLASSPATH%
> set cmd=javac -classpath "%CP%" %1 
> echo %cmd%
> %cmd%
> set CP=
> 
>  
> Hope this helps
>  
> 
>  
> John Vanderburg, johnvms11 at yahoo.com
> 
> "Why prolong the agony? All men must die."
> - Roger Waters, 5:01 AM (The Pros and Cons of Hitchhiking) 
> 
> 
> 
> ----- Original Message ----
> From: 孙纪刚 Jigang (Robert) Sun <sunjigang1965 at yahoo.com.cn>
> To: antlr-interest at antlr.org
> Sent: Tuesday, September 19, 2006 11:15:14 AM
> Subject: [antlr-interest] Problem to run Beta 4
> 
> 
> I tried variuos windows dos commands to run v3 beta4, one of the example is
> 
> D:\MiniClean\Clean>path=d:\j2sdk1.4.2_05\bin
> 
> D:\MiniClean\Clean>set classpath=D:\minifram\antlr-3.0b4\lib\antlr-2.7.6.jar;D:\minifram\antlr
> -3.0b4\lib\antlr-3.0b4.jar;D:\minifram\antlr-3.0b4\src\org\antlr
> 
> D:\MiniClean\Clean>java  D:\minifram\antlr-3.0b4\src\org\antlr.Tool par.g
> 
> 
> Error message:
> 
> Exception in thread "main" java.lang.NoClassDefFoundError: D:\minifram\antlr-3/0b4\src\org\ant
> lr/Tool
> 
> I have downloaded and extracted beta 4 onto D:\minifram\.
> 
> Could anyone give me an idea?  I am not a java user, so I have this kind of problems.
> 
> Thanks.
> 
> Jigang
> 
> 
> 
> 
>         
> ___________________________________________________________ 
> 抢注雅虎免费邮箱-3.5G容量,20M附件! 
> http://cn.mail.yahoo.com



	

	
		
___________________________________________________________ 
Mp3疯狂搜-新歌热歌高速下
http://music.yahoo.com.cn/?source=mail_mailbox_footer


More information about the antlr-interest mailing list