Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java compilers or JVM languages that support goto?

Is there a java compiler flag that allows me to use goto as a valid construct? If not, are there any third-party java compilers that supports goto? If not, are there any other languages that support goto while at the same time can easily call methods written in Java?

The reason is I'm making a language that is implemented in Java. Gotos are an important part of my language; I want to be able to compile it to native or JVM bytecode, although it has to be able to easily use Java libraries (ie. C supports goto, but to use it I'd have to rewrite the libraries in C).

I want to generate C or Java, etc source files, and not bytecode or machine code. I'm using a third-party compiler to do that.

like image 666
Lucky Avatar asked Jun 14 '09 14:06

Lucky


1 Answers

JVM support goto at bytecode level. If you are doing your own language, you should use libraries like BCEL or ASM, not generating .java file.

like image 167
J-16 SDiZ Avatar answered Sep 18 '22 18:09

J-16 SDiZ