30 lines
454 B
Plaintext
30 lines
454 B
Plaintext
[[painless-identifiers]]
|
|
=== Identifiers
|
|
|
|
Use an identifier as a named token to specify a
|
|
<<painless-variables, variable>>, <<painless-types, type>>,
|
|
<<dot-operator, field>>, <<dot-operator, method>>, or function.
|
|
<<painless-keywords, Keywords>> cannot be used as identifiers.
|
|
|
|
*Grammar*
|
|
[source,ANTLR4]
|
|
----
|
|
ID: [_a-zA-Z] [_a-zA-Z-0-9]*;
|
|
----
|
|
|
|
*Examples*
|
|
|
|
* Variations of identifiers.
|
|
+
|
|
[source,Painless]
|
|
----
|
|
a
|
|
Z
|
|
id
|
|
list
|
|
list0
|
|
MAP25
|
|
_map25
|
|
Map_25
|
|
----
|