开发者

Error in printing AST ANTLR C# grammar: The command ""C:\Program Files\Java\jre6\bin\java" …" exited with code 3

开发者 https://www.devze.com 2023-01-23 16:50 出处:网络
I added output=AST; to the grammar options at the top of cs.g to print out the tree. options {language = \'CSharp2\';

I added output=AST; to the grammar options at the top of cs.g to print out the tree.

options
{language = 'CSharp2';
output=AST;
} 

When I build up the project after the change I got this message:

The command ""C:\Program Files\Java\jre6\bin\java" -cp "C:\Program Files\Java\jre6\lib\antlr-3.3.jar" org.antlr.Tool -message-format vs2005 cs.g -make -Xconversiontimeout 2500 -Xmultithreaded" exited with code 3. C:\Users\AMD\Desktop\Complier\antlrcsharp100620\UnitTest\UnitTest.csproj 68 24 UnitTest

Am I missin开发者_Go百科g something here?


You need to modify the following lines in UnitTest.csproj:

<JavaDir>C:\Program Files\Java\jre6\bin\java</JavaDir>
<JarDir>C:\Program Files\Java\jre6\lib</JarDir>

to

<JavaDir>path to java.exe</JavaDir>
<JarDir>C:\users\amd\desktop\compiler\antlrcsharp100620\browse\browse\Antlr.Runtime\CSharp2</JarDir>

The JavaDir path needs point to the location of "java.exe". Mine was "C:\Program Files (x86)\Java\jre6\bin\"

The JarDir needs to have the path to the "antlr-3.3.jar" file. I set the path from your error message above.

0

精彩评论

暂无评论...
验证码 换一张
取 消