[antlr-interest] Q: ANTLRWorks code generation error

Johannes Luber jaluber at gmx.de
Tue Oct 7 06:12:31 PDT 2008


Mr. Armin Nievergelt schrieb:
> Hi all,
> 
> I works since ANTLR 3.0 with ANTLRWorks. I am a little confused
> that all versions before 1.2 and 1.2.1 works very well, but i cannot 
> generate
> code with the new versions of ANTLRWorks. I see the following message.
> Next i have tested the code generation from the command line and with 
> Netbeans.
> Both is ok, so i think the classpath is ok.
> 
> Can anyone help me?
> 
> Best regards
> 
> Armin
> 
> 
> 
> [12:30:11] error(1):  cannot write file Java.tokens: 
> java.io.FileNotFoundException: 
> J:\Sun\netbeans-5.5.1-bluej\nbproject\java\src\J:\Sun\netbeans-5.5.1-bluej\nbproject\java\src\JavaParser.java 
> (Die Syntax für den Dateinamen, Verzeichnisnamen oder die 
> Datenträgerbezeichnung ist falsch)

Not sure why, but the exception says that ANTLRworks somehow added the
base path to the output file twice. Can you send the grammar to the list
or at least to Jean Bovet (jean_bovet at mac.com), the maintainer of
ANTLRworks?

Johannes
> java.io.FileOutputStream.open(Native Method)
> java.io.FileOutputStream.<init>(Unknown Source)
> java.io.FileOutputStream.<init>(Unknown Source)
> java.io.FileWriter.<init>(Unknown Source)
> org.antlr.Tool.getOutputFile(Tool.java:555)
> org.antlr.codegen.CodeGenerator.write(CodeGenerator.java:1271)
> org.antlr.codegen.Target.genRecognizerFile(Target.java:94)
> org.antlr.codegen.CodeGenerator.genRecognizer(CodeGenerator.java:460)
> org.antlr.Tool.generateRecognizer(Tool.java:420)
> org.antlr.Tool.process(Tool.java:287)
> org.antlr.works.generate.CodeGenerate.generate(Unknown Source)
> org.antlr.works.generate.CodeGenerate.run(Unknown Source)
> java.lang.Thread.run(Unknown Source)
> [12:30:11] error(1):  cannot write file Java__.g: 
> java.io.FileNotFoundException: 
> J:\Sun\netbeans-5.5.1-bluej\nbproject\java\src\J:\Sun\netbeans-5.5.1-bluej\nbproject\java\src\Java__.g 
> (Die Syntax für den Dateinamen, Verzeichnisnamen oder die 
> Datenträgerbezeichnung ist falsch)
> java.io.FileOutputStream.open(Native Method)
> java.io.FileOutputStream.<init>(Unknown Source)
> java.io.FileOutputStream.<init>(Unknown Source)
> java.io.FileWriter.<init>(Unknown Source)
> org.antlr.Tool.getOutputFile(Tool.java:555)
> org.antlr.Tool.process(Tool.java:313)
> org.antlr.works.generate.CodeGenerate.generate(Unknown Source)
> org.antlr.works.generate.CodeGenerate.run(Unknown Source)
> java.lang.Thread.run(Unknown Source)
> 
> 
> 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