On Sunday 11 January 2009 11:07:25 Liwei wrote:
> I'm willing to know the result. :)
I cannot even get it to run:
$ export
CLASSPATH="/home/jdh30/src/bfj-read-only/bfj/lib/asm-3.1.jar:/home/jdh30/src/bfj-read-only/bfj/src/"
$ java bf.runner.ParseCompileRunner
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
at bf.runner.ParseCompileRunner.main(ParseCompileRunner.java:16)
Sounds like it is failing because it assumed argvs would contain a BF program
to run, i.e. the compiler is actually running. But:
$ java bf.runner.ParseCompileRunner ../bf/mandelbrot.b
compile and run: ../bf/mandelbrot.b
Exception in thread "main" java.lang.NoClassDefFoundError:
bf/util/BrainfuckParser
at bf.runner.ParseCompileRunner.main(ParseCompileRunner.java:20)
Caused by: java.lang.ClassNotFoundException: bf.util.BrainfuckParser
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
... 1 more
Sounds like the generated code doesn't run. Does it use Windows specific
invocations internally?
I figured out why there is so much Java code in there: the bfj distro contains
some precompiled BF programs as Java source. Removing those, it is only 1,588
LOC. Still 11x longer than the OCaml/LLVM though...
--
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?e
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JVM
Languages" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jvm-languages?hl=en
-~----------~----~----~----~------~----~------~--~---