1
0

painless-lang-spec.asciidoc 1.0 KB

1234567891011121314151617181920
  1. [[painless-lang-spec]]
  2. == Painless Language Specification
  3. Painless is a scripting language designed for security and performance.
  4. Painless syntax is similar to Java syntax along with some additional
  5. features such as dynamic typing, Map and List accessor shortcuts, and array
  6. initializers. As a direct comparison to Java, there are some important
  7. differences, especially related to the casting model. For more detailed
  8. conceptual information about the basic constructs that Painless and Java share,
  9. refer to the corresponding topics in the
  10. https://docs.oracle.com/javase/specs/jls/se8/html/index.html[Java Language
  11. Specification].
  12. Painless scripts are parsed and compiled using the https://www.antlr.org/[ANTLR4]
  13. and https://asm.ow2.org/[ASM] libraries. Scripts are compiled directly
  14. into Java Virtual Machine (JVM) byte code and executed against a standard JVM.
  15. This specification uses ANTLR4 grammar notation to describe the allowed syntax.
  16. However, the actual Painless grammar is more compact than what is shown here.
  17. include::painless-lang-spec/index.asciidoc[]