Need help creating a C # example in ANTLR 2.7

I need to create a CSHARP V1 example that ships with ANTLR v 2.7.7.

Command:
D: \ Comp \ ANTLR \ Examples \ CSharp \ csharp_v1> Nant

I am getting the following output:



D: \ Comp \ antlr \ examples \ csharp \ csharp_v1> D: \ Comp \ nant \ bin \ nant NAnt 0.85 (Build 0.85.2478.0; release; 10/14/2006) Copyright (C) 2001-2006 Gerry Shaw http: //nant.sourceforge.net

Buildfile: file: /// D: /Comp/antlr/examples/csharp/csharp_v1/csharp_v1.build Target framework: Microsoft .NET Framework 2.0 Target (s) specified: test

[tstamp] Monday, May 11, 2009 11:21:20 PM. [echo] Building project: 'CSharp v1 Grammar Sample for ANTLR' generate: [exec] java.lang.NoClassDefFoundError: antlr / Tool [exec] Caused by: java.lang.ClassNotFoundException: antlr.Tool [exec] at java.net .URLClassLoader $ 1.run (Unknown Source) [exec] at java.security.AccessController.doPrivileged (Native Method) [exec] at java.net.URLClassLoader.findClass (Unknown Source) [exec] at java.lang.ClassLoader.loadClass (Unknown Source) [exec] at sun.misc.Launcher $ AppClassLoader.loadClass (Unknown Source) [exec] at java.lang.ClassLoader.loadClass (Unknown Source) [exec] at java.lang.ClassLoader.loadClassInternal (Unknown Source ) [exec] Could not find the main class: antlr.Tool. Program will exit. [exec] Exception in thread "main"

BUILD FAILED - 0 non-fatal error (s), 11 warning (s)

D: \ Comp \ antlr \ examples \ csharp \ csharp_v1 \ csharp_v1.build (52,10): External Program Failed: java.exe (return code was 1)

Total time: 0.2 seconds.

I have nANT working correctly for other assemblies.

I'm not a java guy ... any help would be helpful.

Yours faithfully,

+1


a source to share


1 answer


Look in the make file csharp_v1.build.

On line 10, change it:

<property name="antlr.dir" value="..\..\.."/>



to

<property name="antlr.dir" value="..\..\..\antlr.jar"/>

+1


a source







All Articles