支持goto的Java编译器或JVM语言? [英] Java compilers or JVM languages that support goto?
问题描述
是否有一个Java编译器标志允许我将goto
用作有效构造?如果不是,是否有任何支持goto
的第三方Java编译器?如果不是,是否有其他语言支持goto
,同时又可以轻松地调用用Java编写的方法?
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?
原因是我正在编写一种用Java实现的语言. Gotos是我语言的重要组成部分;我希望能够将其编译为本机或JVM字节码,尽管它必须能够轻松使用Java库(即C支持goto
,但是要使用它,我必须用C重写这些库).
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).
我想生成C或Java等源文件,而不是字节码或机器代码.我正在使用第三方编译器来做到这一点.
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.
推荐答案
JVM在字节码级别上支持goto. 如果您使用自己的语言,则应使用 BCEL 或
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.
这篇关于支持goto的Java编译器或JVM语言?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!