Groovy 编译器是如何工作的?

How does the Groovy compiler work?

谁能解释一下 Groovy 编译器的工作原理?是否编译:

  1. Groovy 代码 -> Java 代码 -> 字节码

  2. Groovy 代码 -> 字节码

  3. 其他方法

Groovy编译器似乎直接从源代码编译成字节码:

groovyc is the Groovy compiler command line tool. It allows you to compile Groovy sources into bytecode. It plays the same role as javac in the Java world.

来源:http://www.groovy-lang.org/groovyc.html

Groovy用antlr via the groovy grammar description, then generates bytecode using asm

解析源码

不需要javac