1 ///////////////////////////////////////////////////////////////////////////////////////////////
2 // checkstyle: Checks Java source code and other text files for adherence to a set of rules.
3 // Copyright (C) 2001-2026 the original author or authors.
4 //
5 // This library is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License, or (at your option) any later version.
9 //
10 // This library is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with this library; if not, write to the Free Software
17 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 ///////////////////////////////////////////////////////////////////////////////////////////////
19
20 package com.puppycrawl.tools.checkstyle.api;
21
22 import com.puppycrawl.tools.checkstyle.grammar.java.JavaLanguageLexer;
23
24 /**
25 * Contains the constants for all the tokens contained in the Abstract
26 * Syntax Tree.
27 *
28 * <p>Implementation detail: This class has been introduced to break
29 * the circular dependency between packages.</p>
30 *
31 * @noinspection ClassWithTooManyDependents
32 * @noinspectionreason ClassWithTooManyDependents - this class is a core part of our API
33 */
34 public final class TokenTypes {
35
36 /**
37 * This is the root node for the source file. It's children
38 * are an optional package definition, zero or more import statements,
39 * and zero or more type declarations.
40 *
41 * <p>For example:</p>
42 * {@snippet :
43 * import java.util.List;
44 *
45 * class MyClass{}
46 * interface MyInterface{}
47 * ;
48 * }
49 *
50 * <p>parses as:</p>
51 *
52 * {@snippet :
53 * COMPILATION_UNIT -> COMPILATION_UNIT
54 * |--IMPORT -> import
55 * | |--DOT -> .
56 * | | |--DOT -> .
57 * | | | |--IDENT -> java
58 * | | | `--IDENT -> util
59 * | | `--IDENT -> List
60 * | `--SEMI -> ;
61 * |--CLASS_DEF -> CLASS_DEF
62 * | |--MODIFIERS -> MODIFIERS
63 * | |--LITERAL_CLASS -> class
64 * | |--IDENT -> MyClass
65 * | `--OBJBLOCK -> OBJBLOCK
66 * | |--LCURLY -> {
67 * | `--RCURLY -> }
68 * |--INTERFACE_DEF -> INTERFACE_DEF
69 * | |--MODIFIERS -> MODIFIERS
70 * | |--LITERAL_INTERFACE -> interface
71 * | |--IDENT -> MyInterface
72 * | `--OBJBLOCK -> OBJBLOCK
73 * | |--LCURLY -> {
74 * | `--RCURLY -> }
75 * `--SEMI -> ;
76 * }
77 *
78 * @see #PACKAGE_DEF
79 * @see #IMPORT
80 * @see #CLASS_DEF
81 * @see #INTERFACE_DEF
82 * @see #RECORD_DEF
83 * @see #ANNOTATION_DEF
84 * @see #ENUM_DEF
85 */
86 public static final int COMPILATION_UNIT = JavaLanguageLexer.COMPILATION_UNIT;
87
88 /**
89 * The root of an AST for a JEP 512 (JDK 25) compact source file. This node
90 * replaces {@link #COMPILATION_UNIT} as the root when the source file declares
91 * any top-level method or field. It represents a {@code CompactCompilationUnit},
92 * which is one of the three mutually exclusive compilation-unit
93 * forms ({@code OrdinaryCompilationUnit}, {@code CompactCompilationUnit},
94 * {@code ModularCompilationUnit}). Import declarations and top-level members
95 * appear as direct children of this node. Compact source files cannot declare
96 * a package.
97 *
98 * <p>For example:</p>
99 * {@snippet :
100 * import java.util.List;
101 *
102 * int counter = 3;
103 * void main() {}
104 * }
105 *
106 * <p>parses as:</p>
107 * {@snippet :
108 * COMPACT_COMPILATION_UNIT -> COMPACT_COMPILATION_UNIT
109 * |--IMPORT -> import
110 * | |--DOT -> .
111 * | | |--DOT -> .
112 * | | | |--IDENT -> java
113 * | | | `--IDENT -> util
114 * | | `--IDENT -> List
115 * | `--SEMI -> ;
116 * |--VARIABLE_DEF -> VARIABLE_DEF
117 * | |--MODIFIERS -> MODIFIERS
118 * | |--TYPE -> TYPE
119 * | | `--LITERAL_INT -> int
120 * | |--IDENT -> counter
121 * | |--ASSIGN -> =
122 * | | `--EXPR -> EXPR
123 * | | `--NUM_INT -> 3
124 * | `--SEMI -> ;
125 * `--METHOD_DEF -> METHOD_DEF
126 * |--MODIFIERS -> MODIFIERS
127 * |--TYPE -> TYPE
128 * | `--LITERAL_VOID -> void
129 * |--IDENT -> main
130 * |--LPAREN -> (
131 * |--PARAMETERS -> PARAMETERS
132 * |--RPAREN -> )
133 * `--SLIST -> {
134 * `--RCURLY -> }
135 * }
136 *
137 * @see <a href="https://openjdk.org/jeps/512">JEP 512: Compact Source Files
138 * and Instance Main Methods</a>
139 * @see #COMPILATION_UNIT
140 */
141 public static final int COMPACT_COMPILATION_UNIT =
142 JavaLanguageLexer.COMPACT_COMPILATION_UNIT;
143
144 /**
145 * Modifiers for type, method, and field declarations. The
146 * modifiers element is always present even though it may have no
147 * children.
148 *
149 * <p>For example:</p>
150 * {@snippet :
151 * public int x;
152 * }
153 *
154 * <p>parses as:</p>
155 * {@snippet :
156 * VARIABLE_DEF -> VARIABLE_DEF
157 * |--MODIFIERS -> MODIFIERS
158 * | `--LITERAL_PUBLIC -> public
159 * |--TYPE -> TYPE
160 * | `--LITERAL_INT -> int
161 * |--IDENT -> x
162 * `--SEMI -> ;
163 * }
164 *
165 * @see <a
166 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-8.html">Java
167 * Language Specification, §8</a>
168 * @see #LITERAL_PUBLIC
169 * @see #LITERAL_PROTECTED
170 * @see #LITERAL_PRIVATE
171 * @see #ABSTRACT
172 * @see #LITERAL_STATIC
173 * @see #FINAL
174 * @see #LITERAL_TRANSIENT
175 * @see #LITERAL_VOLATILE
176 * @see #LITERAL_SYNCHRONIZED
177 * @see #LITERAL_NATIVE
178 * @see #STRICTFP
179 * @see #ANNOTATION
180 * @see #LITERAL_DEFAULT
181 */
182 public static final int MODIFIERS = JavaLanguageLexer.MODIFIERS;
183
184 /**
185 * An object block. These are children of class, interface, enum,
186 * annotation and enum constant declarations.
187 * Also, object blocks are children of the new keyword when defining
188 * anonymous inner types.
189 *
190 * <p>For example:</p>
191 * {@snippet :
192 * class Test {}
193 * }
194 *
195 * <p>parses as:</p>
196 * {@snippet :
197 * CLASS_DEF -> CLASS_DEF
198 * |--MODIFIERS -> MODIFIERS
199 * |--LITERAL_CLASS -> class
200 * |--IDENT -> Test
201 * `--OBJBLOCK -> OBJBLOCK
202 * |--LCURLY -> {
203 * `--RCURLY -> }
204 * }
205 *
206 * @see #LCURLY
207 * @see #INSTANCE_INIT
208 * @see #STATIC_INIT
209 * @see #CLASS_DEF
210 * @see #CTOR_DEF
211 * @see #METHOD_DEF
212 * @see #VARIABLE_DEF
213 * @see #RCURLY
214 * @see #INTERFACE_DEF
215 * @see #LITERAL_NEW
216 * @see #ENUM_DEF
217 * @see #ENUM_CONSTANT_DEF
218 * @see #ANNOTATION_DEF
219 */
220 public static final int OBJBLOCK = JavaLanguageLexer.OBJBLOCK;
221 /**
222 * A list of statements.
223 *
224 * <p>For example:</p>
225 * {@snippet :
226 * if (c == 1) {
227 * c = 0;
228 * }
229 * }
230 *
231 * <p>parses as:</p>
232 * {@snippet :
233 * LITERAL_IF -> if
234 * |--LPAREN -> (
235 * |--EXPR -> EXPR
236 * | `--EQUAL -> ==
237 * | |--IDENT -> c
238 * | `--NUM_INT -> 1
239 * |--RPAREN -> )
240 * `--SLIST -> {
241 * |--EXPR -> EXPR
242 * | `--ASSIGN -> =
243 * | |--IDENT -> c
244 * | `--NUM_INT -> 0
245 * |--SEMI -> ;
246 * `--RCURLY -> }
247 * }
248 *
249 * @see #RCURLY
250 * @see #EXPR
251 * @see #LABELED_STAT
252 * @see #LITERAL_THROWS
253 * @see #LITERAL_RETURN
254 * @see #SEMI
255 * @see #METHOD_DEF
256 * @see #CTOR_DEF
257 * @see #LITERAL_FOR
258 * @see #LITERAL_WHILE
259 * @see #LITERAL_IF
260 * @see #LITERAL_ELSE
261 * @see #CASE_GROUP
262 */
263 public static final int SLIST = JavaLanguageLexer.SLIST;
264 /**
265 * A constructor declaration.
266 *
267 * <p>For example:</p>
268 * {@snippet :
269 * public SpecialEntry(int value, String text)
270 * {
271 * this.value = value;
272 * this.text = text;
273 * }
274 * }
275 *
276 * <p>parses as:</p>
277 * {@snippet :
278 * CTOR_DEF -> CTOR_DEF
279 * |--MODIFIERS -> MODIFIERS
280 * | `--LITERAL_PUBLIC -> public
281 * |--IDENT -> SpecialEntry
282 * |--LPAREN -> (
283 * |--PARAMETERS -> PARAMETERS
284 * | |--PARAMETER_DEF -> PARAMETER_DEF
285 * | | |--MODIFIERS -> MODIFIERS
286 * | | |--TYPE -> TYPE
287 * | | | `--LITERAL_INT -> int
288 * | | `--IDENT -> value
289 * | |--COMMA -> ,
290 * | `--PARAMETER_DEF -> PARAMETER_DEF
291 * | |--MODIFIERS -> MODIFIERS
292 * | |--TYPE -> TYPE
293 * | | `--IDENT -> String
294 * | `--IDENT -> text
295 * |--RPAREN -> )
296 * `--SLIST -> {
297 * |--EXPR -> EXPR
298 * | `--ASSIGN -> =
299 * | |--DOT -> .
300 * | |--LITERAL_THIS -> this
301 * | | `--IDENT -> value
302 * | `--IDENT -> value
303 * |--SEMI -> ;
304 * |--EXPR -> EXPR
305 * | `--ASSIGN -> =
306 * | |--DOT -> .
307 * | | |--LITERAL_THIS -> this
308 * | | `--IDENT -> text
309 * | `--IDENT -> text
310 * |--SEMI -> ;
311 * `--RCURLY -> }
312 * }
313 *
314 * @see #OBJBLOCK
315 * @see #CLASS_DEF
316 */
317 public static final int CTOR_DEF = JavaLanguageLexer.CTOR_DEF;
318 /**
319 * A method declaration. The children are modifiers, type parameters,
320 * return type, method name, parameter list, an optional throws list, and
321 * statement list. The statement list is omitted if the method
322 * declaration appears in an interface declaration. Method
323 * declarations may appear inside object blocks of class
324 * declarations, interface declarations, enum declarations,
325 * enum constant declarations or anonymous inner-class declarations.
326 *
327 * <p>For example:</p>
328 *
329 * {@snippet :
330 * public static int square(int x)
331 * {
332 * return x*x;
333 * }
334 * }
335 *
336 * <p>parses as:</p>
337 *
338 * {@snippet :
339 * --METHOD_DEF -> METHOD_DEF
340 * |--MODIFIERS -> MODIFIERS
341 * | |--LITERAL_PUBLIC -> public
342 * | `--LITERAL_STATIC -> static
343 * |--TYPE -> TYPE
344 * | `--LITERAL_INT -> int
345 * |--IDENT -> square
346 * |--LPAREN -> (
347 * |--PARAMETERS -> PARAMETERS
348 * | `--PARAMETER_DEF -> PARAMETER_DEF
349 * | |--MODIFIERS -> MODIFIERS
350 * | |--TYPE -> TYPE
351 * | | `--LITERAL_INT -> int
352 * | `--IDENT -> x
353 * |--RPAREN -> )
354 * `--SLIST -> {
355 * |--LITERAL_RETURN -> return
356 * | |--EXPR -> EXPR
357 * | | `--STAR -> *
358 * | | |--IDENT -> x
359 * | | `--IDENT -> x
360 * | `--SEMI -> ;
361 * `--RCURLY -> }
362 * }
363 *
364 * @see #MODIFIERS
365 * @see #TYPE_PARAMETERS
366 * @see #TYPE
367 * @see #IDENT
368 * @see #PARAMETERS
369 * @see #LITERAL_THROWS
370 * @see #SLIST
371 * @see #OBJBLOCK
372 */
373 public static final int METHOD_DEF = JavaLanguageLexer.METHOD_DEF;
374
375 /**
376 * A field or local variable declaration. The children are
377 * modifiers, type, the identifier name, and an optional
378 * assignment statement.
379 *
380 * <p>For example:</p>
381 * {@snippet :
382 * final double PI = 3.14;
383 * }
384 *
385 * <p>parses as:</p>
386 * {@snippet :
387 * VARIABLE_DEF -> VARIABLE_DEF
388 * |--MODIFIERS -> MODIFIERS
389 * | `--FINAL -> final
390 * |--TYPE -> TYPE
391 * | `--LITERAL_DOUBLE -> double
392 * |--IDENT -> PI
393 * |--ASSIGN -> =
394 * | `--EXPR -> EXPR
395 * | `--NUM_FLOAT -> 3.14
396 * `--SEMI -> ;
397 * }
398 *
399 * @see #MODIFIERS
400 * @see #TYPE
401 * @see #IDENT
402 * @see #ASSIGN
403 */
404 public static final int VARIABLE_DEF =
405 JavaLanguageLexer.VARIABLE_DEF;
406
407 /**
408 * An instance initializer. Zero or more instance initializers
409 * may appear in class and enum definitions. This token will be a child
410 * of the object block of the declaring type.
411 *
412 * <p>For example:</p>
413 * {@snippet :
414 * public class MyClass {
415 * private int foo;
416 * {foo = 10;}
417 * }
418 * }
419 *
420 * <p>parses as:</p>
421 * {@snippet :
422 * CLASS_DEF -> CLASS_DEF
423 * |--MODIFIERS -> MODIFIERS
424 * | `--LITERAL_PUBLIC -> public
425 * |--LITERAL_CLASS -> class
426 * |--IDENT -> MyClass
427 * `--OBJBLOCK -> OBJBLOCK
428 * |--LCURLY -> {
429 * |--VARIABLE_DEF -> VARIABLE_DEF
430 * | |--MODIFIERS -> MODIFIERS
431 * | | `--LITERAL_PRIVATE -> private
432 * | |--TYPE -> TYPE
433 * | | `--LITERAL_INT -> int
434 * | |--IDENT -> foo
435 * | `--SEMI -> ;
436 * |--INSTANCE_INIT -> INSTANCE_INIT
437 * | `--SLIST -> {
438 * | |--EXPR -> EXPR
439 * | | `--ASSIGN -> =
440 * | | |--IDENT -> foo
441 * | | `--NUM_INT -> 10
442 * | |--SEMI -> ;
443 * | `--RCURLY -> }
444 * `--RCURLY -> }
445 * }
446 *
447 * @see <a
448 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-8.html#jls-8.6">Java
449 * Language Specification§8.6</a>
450 * @see #SLIST
451 * @see #OBJBLOCK
452 */
453 public static final int INSTANCE_INIT =
454 JavaLanguageLexer.INSTANCE_INIT;
455
456 /**
457 * A static initialization block. Zero or more static
458 * initializers may be children of the object block of a class
459 * or enum declaration (interfaces cannot have static initializers). The
460 * first and only child is a statement list.
461 *
462 * <p>For Example:</p>
463 * {@snippet :
464 * static {
465 * num = 10;
466 * }
467 * }
468 *
469 * <p>parses as:</p>
470 * {@snippet :
471 * STATIC_INIT -> STATIC_INIT
472 * `--SLIST -> {
473 * |--EXPR -> EXPR
474 * | `--ASSIGN -> =
475 * | |--IDENT -> num
476 * | `--NUM_INT -> 10
477 * |--SEMI -> ;
478 * `--RCURLY -> }
479 * }
480 *
481 * @see <a
482 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-8.html#jls-8.7">Java
483 * Language Specification, §8.7</a>
484 * @see #SLIST
485 * @see #OBJBLOCK
486 */
487 public static final int STATIC_INIT =
488 JavaLanguageLexer.STATIC_INIT;
489
490 /**
491 * A type. This is either a return type of a method or a type of
492 * a variable or field. The first child of this element is the
493 * actual type. This may be a primitive type, an identifier, a
494 * dot which is the root of a fully qualified type, or an array of
495 * any of these. The second child may be type arguments to the type.
496 *
497 * <p>
498 * For example:
499 * {@code boolean var = true;}
500 * </p>
501 *
502 * <p>parses as:</p>
503 * {@snippet :
504 * |--VARIABLE_DEF -> VARIABLE_DEF
505 * | |--MODIFIERS -> MODIFIERS
506 * | |--TYPE -> TYPE
507 * | | `--LITERAL_BOOLEAN -> boolean
508 * | |--IDENT -> var
509 * | `--ASSIGN -> =
510 * | `--EXPR -> EXPR
511 * | `--LITERAL_TRUE -> true
512 * |--SEMI -> ;
513 * }
514 *
515 * @see #VARIABLE_DEF
516 * @see #METHOD_DEF
517 * @see #PARAMETER_DEF
518 * @see #IDENT
519 * @see #DOT
520 * @see #LITERAL_VOID
521 * @see #LITERAL_BOOLEAN
522 * @see #LITERAL_BYTE
523 * @see #LITERAL_CHAR
524 * @see #LITERAL_SHORT
525 * @see #LITERAL_INT
526 * @see #LITERAL_FLOAT
527 * @see #LITERAL_LONG
528 * @see #LITERAL_DOUBLE
529 * @see #ARRAY_DECLARATOR
530 * @see #TYPE_ARGUMENTS
531 */
532 public static final int TYPE = JavaLanguageLexer.TYPE;
533 /**
534 * A class declaration.
535 *
536 * <p>For example:</p>
537 * {@snippet :
538 * public class Test {
539 * }
540 * }
541 *
542 * <p>parses as:</p>
543 * {@snippet :
544 * CLASS_DEF -> CLASS_DEF
545 * |--MODIFIERS -> MODIFIERS
546 * | `--LITERAL_PUBLIC -> public
547 * |--LITERAL_CLASS -> class
548 * |--IDENT -> Test
549 * `--OBJBLOCK -> OBJBLOCK
550 * |--LCURLY -> {
551 * `--RCURLY -> }
552 * }
553 *
554 * @see <a
555 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-8.html">Java
556 * Language Specification, §8</a>
557 * @see #MODIFIERS
558 * @see #IDENT
559 * @see #EXTENDS_CLAUSE
560 * @see #IMPLEMENTS_CLAUSE
561 * @see #OBJBLOCK
562 * @see #LITERAL_NEW
563 */
564 public static final int CLASS_DEF = JavaLanguageLexer.CLASS_DEF;
565 /**
566 * An interface declaration.
567 *
568 * <p>For example:</p>
569 *
570 * {@snippet :
571 * public interface MyInterface {
572 *
573 * }
574 * }
575 *
576 * <p>parses as:</p>
577 *
578 * {@snippet :
579 * INTERFACE_DEF -> INTERFACE_DEF
580 * |--MODIFIERS -> MODIFIERS
581 * | `--LITERAL_PUBLIC -> public
582 * |--LITERAL_INTERFACE -> interface
583 * |--IDENT -> MyInterface
584 * `--OBJBLOCK -> OBJBLOCK
585 * |--LCURLY -> {
586 * `--RCURLY -> }
587 * }
588 *
589 * @see <a
590 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-9.html">Java
591 * Language Specification, §9</a>
592 * @see #MODIFIERS
593 * @see #IDENT
594 * @see #EXTENDS_CLAUSE
595 * @see #OBJBLOCK
596 */
597 public static final int INTERFACE_DEF =
598 JavaLanguageLexer.INTERFACE_DEF;
599
600 /**
601 * The package declaration. This is optional, but if it is
602 * included, then there is only one package declaration per source
603 * file and it must be the first non-comment in the file. A package
604 * declaration may be annotated in which case the annotations comes
605 * before the rest of the declaration (and are the first children).
606 *
607 * <p>For example:</p>
608 *
609 * {@snippet :
610 * package com.puppycrawl.tools.checkstyle.api;
611 * }
612 *
613 * <p>parses as:</p>
614 *
615 * {@snippet :
616 * PACKAGE_DEF -> package
617 * |--ANNOTATIONS -> ANNOTATIONS
618 * |--DOT -> .
619 * | |--DOT -> .
620 * | | |--DOT -> .
621 * | | | |--DOT -> .
622 * | | | | |--IDENT -> com
623 * | | | | `--IDENT -> puppycrawl
624 * | | | `--IDENT -> tools
625 * | | `--IDENT -> checkstyle
626 * | `--IDENT -> api
627 * `--SEMI -> ;
628 * }
629 *
630 * @see <a
631 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-7.html#jls-7.4">Java
632 * Language Specification §7.4</a>
633 * @see #DOT
634 * @see #IDENT
635 * @see #SEMI
636 * @see #ANNOTATIONS
637 * @see FullIdent
638 */
639 public static final int PACKAGE_DEF = JavaLanguageLexer.PACKAGE_DEF;
640 /**
641 * An array declaration.
642 *
643 * <p>If the array declaration represents a type, then the type of
644 * the array elements is the first child. Multidimensional arrays
645 * may be regarded as arrays of arrays. In other words, the first
646 * child of the array declaration is another array
647 * declaration.</p>
648 *
649 * <p>For example:</p>
650 * {@snippet :
651 * int[] x;
652 * }
653 *
654 * <p>parses as:</p>
655 * {@snippet :
656 * VARIABLE_DEF -> VARIABLE_DEF
657 * |--MODIFIERS -> MODIFIERS
658 * |--TYPE -> TYPE
659 * | |--LITERAL_INT -> int
660 * | `--ARRAY_DECLARATOR -> [
661 * | `--RBRACK -> ]
662 * |--IDENT -> x
663 * `--SEMI -> ;
664 * }
665 *
666 * <p>The array declaration may also represent an inline array
667 * definition. In this case, the first child will be either an
668 * expression specifying the length of the array or an array
669 * initialization block.</p>
670 *
671 * @see <a
672 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-10.html">Java
673 * Language Specification §10</a>
674 * @see #TYPE
675 * @see #ARRAY_INIT
676 */
677 public static final int ARRAY_DECLARATOR =
678 JavaLanguageLexer.ARRAY_DECLARATOR;
679
680 /**
681 * An extends clause. This appears as part of class and interface
682 * definitions. This element appears even if the
683 * {@code extends} keyword is not explicitly used. The child
684 * is an optional identifier.
685 *
686 * <p>For example:</p>
687 * {@snippet :
688 * public class Test extends ArrayList {
689 * }
690 * }
691 *
692 * <p>parses as:</p>
693 * {@snippet :
694 * CLASS_DEF -> CLASS_DEF
695 * |--MODIFIERS -> MODIFIERS
696 * | `--LITERAL_PUBLIC -> public
697 * |--LITERAL_CLASS -> class
698 * |--IDENT -> Test
699 * |--EXTENDS_CLAUSE -> extends
700 * | `--IDENT -> ArrayList
701 * `--OBJBLOCK -> OBJBLOCK
702 * |--LCURLY -> {
703 * `--RCURLY -> }
704 * }
705 *
706 * @see #IDENT
707 * @see #DOT
708 * @see #CLASS_DEF
709 * @see #INTERFACE_DEF
710 * @see FullIdent
711 */
712 public static final int EXTENDS_CLAUSE =
713 JavaLanguageLexer.EXTENDS_CLAUSE;
714
715 /**
716 * An implements clause. This always appears in a class or enum
717 * declaration, even if there are no implemented interfaces. The
718 * children are a comma separated list of zero or more
719 * identifiers.
720 *
721 * <p>For example:</p>
722 * {@snippet :
723 * public class MyClass implements Collection {
724 *
725 * }
726 * }
727 *
728 * <p>parses as:</p>
729 * {@snippet :
730 * CLASS_DEF -> CLASS_DEF
731 * |--MODIFIERS -> MODIFIERS
732 * | `--LITERAL_PUBLIC -> public
733 * |--LITERAL_CLASS -> class
734 * |--IDENT -> MyClass
735 * |--IMPLEMENTS_CLAUSE -> implements
736 * | `--IDENT -> Collection
737 * `--OBJBLOCK -> OBJBLOCK
738 * |--LCURLY -> {
739 * `--RCURLY -> }
740 * }
741 *
742 * @see #IDENT
743 * @see #DOT
744 * @see #COMMA
745 * @see #CLASS_DEF
746 * @see #ENUM_DEF
747 */
748 public static final int IMPLEMENTS_CLAUSE =
749 JavaLanguageLexer.IMPLEMENTS_CLAUSE;
750
751 /**
752 * A list of parameters to a method or constructor. The children
753 * are zero or more parameter declarations separated by commas.
754 *
755 * <p>For example</p>
756 * {@snippet :
757 * int start, int end
758 * }
759 *
760 * <p>parses as:</p>
761 * {@snippet :
762 * PARAMETERS -> PARAMETERS
763 * |--PARAMETER_DEF -> PARAMETER_DEF
764 * | |--MODIFIERS -> MODIFIERS
765 * | |--TYPE -> TYPE
766 * | | `--LITERAL_INT -> int
767 * | `--IDENT -> start
768 * |--COMMA -> ,
769 * `--PARAMETER_DEF -> PARAMETER_DEF
770 * |--MODIFIERS -> MODIFIERS
771 * |--TYPE -> TYPE
772 * | `--LITERAL_INT -> int
773 * `--IDENT -> end
774 * }
775 *
776 * @see #PARAMETER_DEF
777 * @see #COMMA
778 * @see #METHOD_DEF
779 * @see #CTOR_DEF
780 */
781 public static final int PARAMETERS = JavaLanguageLexer.PARAMETERS;
782 /**
783 * A parameter declaration. The last parameter in a list of parameters may
784 * be variable length (indicated by the ELLIPSIS child node immediately
785 * after the TYPE child).
786 *
787 * <p>For example</p>
788 * {@snippet :
789 * void foo(SomeType SomeType.this, int firstParameter, int... secondParameter) {}
790 * }
791 *
792 * <p>parses as:</p>
793 * {@snippet :
794 * METHOD_DEF -> METHOD_DEF
795 * |--MODIFIERS -> MODIFIERS
796 * |--TYPE -> TYPE
797 * | `--LITERAL_VOID -> void
798 * |--IDENT -> foo
799 * |--LPAREN -> (
800 * |--PARAMETERS -> PARAMETERS
801 * | |--PARAMETER_DEF -> PARAMETER_DEF
802 * | | |--MODIFIERS -> MODIFIERS
803 * | | |--TYPE -> TYPE
804 * | | | `--IDENT -> SomeType
805 * | | `--DOT -> .
806 * | | |--IDENT -> SomeType
807 * | | `--LITERAL_THIS -> this
808 * | |--COMMA -> ,
809 * | |--PARAMETER_DEF -> PARAMETER_DEF
810 * | | |--MODIFIERS -> MODIFIERS
811 * | | |--TYPE -> TYPE
812 * | | | `--LITERAL_INT -> int
813 * | | `--IDENT -> firstParameter
814 * | |--COMMA -> ,
815 * | `--PARAMETER_DEF -> PARAMETER_DEF
816 * | |--MODIFIERS -> MODIFIERS
817 * | |--TYPE -> TYPE
818 * | | `--LITERAL_INT -> int
819 * | |--ELLIPSIS -> ...
820 * | `--IDENT -> secondParameter
821 * |--RPAREN -> )
822 * `--SLIST -> {
823 * `--RCURLY -> }
824 *
825 * }
826 *
827 * @see #MODIFIERS
828 * @see #TYPE
829 * @see #IDENT
830 * @see #PARAMETERS
831 * @see #ELLIPSIS
832 */
833 public static final int PARAMETER_DEF =
834 JavaLanguageLexer.PARAMETER_DEF;
835
836 /**
837 * A labeled statement.
838 *
839 * <p>For example:</p>
840 * {@snippet :
841 * outer:
842 * while (i < 10) {
843 * if (i == 5)
844 * continue outer;
845 * i++;
846 * }
847 * }
848 *
849 * <p>parses as:</p>
850 * {@snippet :
851 * LABELED_STAT -> :
852 * |--IDENT -> outer
853 * `--LITERAL_WHILE -> while
854 * |--LPAREN -> (
855 * |--EXPR -> EXPR
856 * | `--LT -> <
857 * | |--IDENT -> i
858 * | `--NUM_INT -> 10
859 * |--RPAREN -> )
860 * `--SLIST -> {
861 * |--LITERAL_IF -> if
862 * | |--LPAREN -> (
863 * | |--EXPR -> EXPR
864 * | | `--EQUAL -> ==
865 * | | |--IDENT -> i
866 * | | `--NUM_INT -> 5
867 * | |--RPAREN -> )
868 * | `--LITERAL_CONTINUE -> continue
869 * | |--IDENT -> outer
870 * | `--SEMI -> ;
871 * |--EXPR -> EXPR
872 * | `--POST_INC -> ++
873 * | `--IDENT -> i
874 * |--SEMI -> ;
875 * `--RCURLY -> }
876 * }
877 *
878 * @see <a
879 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-14.html#jls-14.7">Java
880 * Language Specification, §14.7</a>
881 * @see #SLIST
882 */
883 public static final int LABELED_STAT =
884 JavaLanguageLexer.LABELED_STAT;
885
886 /**
887 * A type-cast.
888 *
889 * <p>For example:</p>
890 * {@snippet :
891 * (String)it.next()
892 * }
893 *
894 * <p>parses as:</p>
895 * {@snippet :
896 * `--TYPECAST -> (
897 * |--TYPE -> TYPE
898 * | `--IDENT -> String
899 * |--RPAREN -> )
900 * `--METHOD_CALL -> (
901 * |--DOT -> .
902 * | |--IDENT -> it
903 * | `--IDENT -> next
904 * |--ELIST -> ELIST
905 * `--RPAREN -> )
906 * }
907 *
908 * @see <a
909 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.16">Java
910 * Language Specification, §15.16</a>
911 * @see #EXPR
912 * @see #TYPE
913 * @see #TYPE_ARGUMENTS
914 * @see #RPAREN
915 */
916 public static final int TYPECAST = JavaLanguageLexer.TYPECAST;
917 /**
918 * The array index operator.
919 *
920 * <p>For example:</p>
921 * {@snippet :
922 * arr[0] = 10;
923 * }
924 *
925 * <p>parses as:</p>
926 * {@snippet :
927 * |--EXPR -> EXPR
928 * | `--ASSIGN -> =
929 * | |--INDEX_OP -> [
930 * | | |--IDENT -> arr
931 * | | |--EXPR -> EXPR
932 * | | | `--NUM_INT -> 0
933 * | | `--RBRACK -> ]
934 * | `--NUM_INT -> 10
935 * |--SEMI -> ;
936 * }
937 *
938 * @see #EXPR
939 */
940 public static final int INDEX_OP = JavaLanguageLexer.INDEX_OP;
941 /**
942 * The {@code ++} (postfix increment) operator.
943 *
944 * <p>For example:</p>
945 * {@snippet :
946 * a++;
947 * }
948 *
949 * <p>parses as:</p>
950 * {@snippet :
951 * |--EXPR -> EXPR
952 * | `--POST_INC -> ++
953 * | `--IDENT -> a
954 * |--SEMI -> ;
955 * }
956 *
957 * @see <a
958 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.14.1">Java
959 * Language Specification, §15.14.1</a>
960 * @see #EXPR
961 * @see #INC
962 */
963 public static final int POST_INC = JavaLanguageLexer.POST_INC;
964 /**
965 * The {@code --} (postfix decrement) operator.
966 *
967 * <p>For example:</p>
968 * {@snippet :
969 * a--;
970 * }
971 *
972 * <p>parses as:</p>
973 * {@snippet :
974 * |--EXPR -> EXPR
975 * | `--POST_DEC -> --
976 * | `--IDENT -> a
977 * |--SEMI -> ;
978 * }
979 *
980 * @see <a
981 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.14.2">Java
982 * Language Specification, §15.14.2</a>
983 * @see #EXPR
984 * @see #DEC
985 */
986 public static final int POST_DEC = JavaLanguageLexer.POST_DEC;
987 /**
988 * A method call. A method call may have type arguments however these
989 * are attached to the appropriate node in the qualified method name.
990 *
991 * <p>For example:</p>
992 * {@snippet :
993 * Integer.parseInt("123");
994 * }
995 *
996 * <p>parses as:</p>
997 * {@snippet :
998 * |--EXPR -> EXPR
999 * | `--METHOD_CALL -> (
1000 * | |--DOT -> .
1001 * | | |--IDENT -> Integer
1002 * | | `--IDENT -> parseInt
1003 * | |--ELIST -> ELIST
1004 * | | `--EXPR -> EXPR
1005 * | | `--STRING_LITERAL -> "123"
1006 * | `--RPAREN -> )
1007 * |--SEMI -> ;
1008 * }
1009 *
1010 *
1011 * @see #IDENT
1012 * @see #TYPE_ARGUMENTS
1013 * @see #DOT
1014 * @see #ELIST
1015 * @see #RPAREN
1016 * @see FullIdent
1017 */
1018 public static final int METHOD_CALL = JavaLanguageLexer.METHOD_CALL;
1019
1020 /**
1021 * A reference to a method or constructor without arguments. Part of Java 8 syntax.
1022 * The token should be used for subscribing for double colon literal.
1023 * {@link #DOUBLE_COLON} token does not appear in the tree.
1024 *
1025 * <p>For example:</p>
1026 * {@snippet :
1027 * Comparator<String> compare = String::compareToIgnoreCase;
1028 * }
1029 *
1030 * <p>parses as:
1031 * {@snippet :
1032 * |--VARIABLE_DEF -> VARIABLE_DEF
1033 * | |--MODIFIERS -> MODIFIERS
1034 * | |--TYPE -> TYPE
1035 * | | |--IDENT -> Comparator
1036 * | | `--TYPE_ARGUMENTS -> TYPE_ARGUMENTS
1037 * | | |--GENERIC_START -> <
1038 * | | |--TYPE_ARGUMENT -> TYPE_ARGUMENT
1039 * | | | `--IDENT -> String
1040 * | | `--GENERIC_END -> >
1041 * | |--IDENT -> compare
1042 * | `--ASSIGN -> =
1043 * | `--EXPR -> EXPR
1044 * | `--METHOD_REF -> ::
1045 * | |--IDENT -> String
1046 * | `--IDENT -> compareToIgnoreCase
1047 * |--SEMI -> ;
1048 * }
1049 *
1050 * @see #IDENT
1051 * @see #DOUBLE_COLON
1052 */
1053 public static final int METHOD_REF = JavaLanguageLexer.METHOD_REF;
1054 /**
1055 * An expression. Operators with lower precedence appear at a
1056 * higher level in the tree than operators with higher precedence.
1057 * Parentheses are siblings to the operator they enclose.
1058 *
1059 * <p>For example:</p>
1060 * {@snippet :
1061 * int x = 4 + 2 * (5 % 3) + (1 << 3) - 4 * 5;
1062 * }
1063 *
1064 * <p>parses as:</p>
1065 * {@snippet :
1066 * |--VARIABLE_DEF -> VARIABLE_DEF
1067 * | |--MODIFIERS -> MODIFIERS
1068 * | |--TYPE -> TYPE
1069 * | | `--LITERAL_INT -> int
1070 * | |--IDENT -> x
1071 * | `--ASSIGN -> =
1072 * | `--EXPR -> EXPR
1073 * | `--MINUS -> -
1074 * | |--PLUS -> +
1075 * | | |--PLUS -> +
1076 * | | | |--NUM_INT -> 4
1077 * | | | `--STAR -> *
1078 * | | | |--NUM_INT -> 2
1079 * | | | |--LPAREN -> (
1080 * | | | |--MOD -> %
1081 * | | | | |--NUM_INT -> 5
1082 * | | | | `--NUM_INT -> 3
1083 * | | | `--RPAREN -> )
1084 * | | |--LPAREN -> (
1085 * | | |--SL -> <<
1086 * | | | |--NUM_INT -> 1
1087 * | | | `--NUM_INT -> 3
1088 * | | `--RPAREN -> )
1089 * | `--STAR -> *
1090 * | |--NUM_INT -> 4
1091 * | `--NUM_INT -> 5
1092 * |--SEMI -> ;
1093 * }
1094 *
1095 * @see #ELIST
1096 * @see #ASSIGN
1097 * @see #LPAREN
1098 * @see #RPAREN
1099 */
1100 public static final int EXPR = JavaLanguageLexer.EXPR;
1101 /**
1102 * An array initialization. This may occur as part of an array
1103 * declaration or inline with {@code new}.
1104 *
1105 * <p>For example:</p>
1106 * {@snippet :
1107 * int[] y =
1108 * {
1109 * 1,
1110 * 2,
1111 * };
1112 * }
1113 *
1114 * <p>parses as:</p>
1115 * {@snippet :
1116 * VARIABLE_DEF -> VARIABLE_DEF
1117 * |--MODIFIERS -> MODIFIERS
1118 * |--TYPE -> TYPE
1119 * | |--LITERAL_INT -> int
1120 * | `--ARRAY_DECLARATOR -> [
1121 * | `--RBRACK -> ]
1122 * |--IDENT -> y
1123 * |--ASSIGN -> =
1124 * | `--ARRAY_INIT -> {
1125 * | |--EXPR -> EXPR
1126 * | | `--NUM_INT -> 1
1127 * | |--COMMA -> ,
1128 * | |--EXPR -> EXPR
1129 * | | `--NUM_INT -> 2
1130 * | |--COMMA -> ,
1131 * | `--RCURLY -> }
1132 * `--SEMI -> ;
1133 * }
1134 *
1135 * <p>Also consider:</p>
1136 * {@snippet :
1137 * int[] z = new int[]
1138 * {
1139 * 1,
1140 * 2,
1141 * };
1142 * }
1143 *
1144 * <p>which parses as:</p>
1145 * {@snippet :
1146 * VARIABLE_DEF -> VARIABLE_DEF
1147 * |--MODIFIERS -> MODIFIERS
1148 * |--TYPE -> TYPE [2:4]
1149 * | |--LITERAL_INT -> int
1150 * | `--ARRAY_DECLARATOR -> [
1151 * | `--RBRACK -> ]
1152 * |--IDENT -> z
1153 * |--ASSIGN -> =
1154 * | `--EXPR -> EXPR
1155 * | `--LITERAL_NEW -> new
1156 * | |--LITERAL_INT -> int
1157 * | |--ARRAY_DECLARATOR -> [
1158 * | | `--RBRACK -> ]
1159 * | `--ARRAY_INIT -> {
1160 * | |--EXPR -> EXPR
1161 * | | `--NUM_INT -> 1
1162 * | |--COMMA -> ,
1163 * | |--EXPR -> EXPR
1164 * | | `--NUM_INT -> 2
1165 * | |--COMMA -> ,
1166 * | `--RCURLY -> }
1167 * `--SEMI -> ;
1168 * }
1169 *
1170 * @see #ARRAY_DECLARATOR
1171 * @see #TYPE
1172 * @see #LITERAL_NEW
1173 * @see #COMMA
1174 */
1175 public static final int ARRAY_INIT = JavaLanguageLexer.ARRAY_INIT;
1176 /**
1177 * An import declaration. Import declarations are option, but
1178 * must appear after the package declaration and before the first type
1179 * declaration.
1180 *
1181 * <p>For example:</p>
1182 *
1183 * {@snippet :
1184 * import java.io.IOException;
1185 * }
1186 *
1187 * <p>parses as:</p>
1188 *
1189 * {@snippet :
1190 * IMPORT -> import
1191 * |--DOT -> .
1192 * | |--DOT -> .
1193 * | | |--IDENT -> java
1194 * | | `--IDENT -> io
1195 * | `--IDENT -> IOException
1196 * `--SEMI -> ;
1197 * }
1198 *
1199 * @see <a
1200 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-7.html#jls-7.5">Java
1201 * Language Specification §7.5</a>
1202 * @see #DOT
1203 * @see #IDENT
1204 * @see #STAR
1205 * @see #SEMI
1206 * @see FullIdent
1207 */
1208 public static final int IMPORT = JavaLanguageLexer.IMPORT;
1209 /**
1210 * The {@code -} (unary minus) operator.
1211 *
1212 * <p>For example:</p>
1213 * {@snippet :
1214 * a = -b;
1215 * }
1216 *
1217 * <p>parses as:</p>
1218 * {@snippet :
1219 * |--EXPR -> EXPR
1220 * | `--ASSIGN -> =
1221 * | |--IDENT -> a
1222 * | `--UNARY_MINUS -> -
1223 * | `--IDENT -> b
1224 * |--SEMI -> ;
1225 * }
1226 *
1227 * @see <a
1228 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.15.4">Java
1229 * Language Specification, §15.15.4</a>
1230 * @see #EXPR
1231 */
1232 public static final int UNARY_MINUS = JavaLanguageLexer.UNARY_MINUS;
1233 /**
1234 * The {@code +} (unary plus) operator.
1235 *
1236 * <p>For example:</p>
1237 * {@snippet :
1238 * a = + b;
1239 * }
1240 *
1241 * <p>parses as:</p>
1242 * {@snippet :
1243 * |--EXPR -> EXPR
1244 * | `--ASSIGN -> =
1245 * | |--IDENT -> a
1246 * | `--UNARY_PLUS -> +
1247 * | `--IDENT -> b
1248 * |--SEMI -> ;
1249 * }
1250 *
1251 * @see <a
1252 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.15.3">Java
1253 * Language Specification, §15.15.3</a>
1254 * @see #EXPR
1255 */
1256 public static final int UNARY_PLUS = JavaLanguageLexer.UNARY_PLUS;
1257 /**
1258 * A group of case clauses. Case clauses with no associated
1259 * statements are grouped together into a case group. The last
1260 * child is a statement list containing the statements to execute
1261 * upon a match.
1262 *
1263 * <p>For example:</p>
1264 * {@snippet :
1265 * case 0:
1266 * case 1:
1267 * case 2:
1268 * x = 3;
1269 * break;
1270 * }
1271 *
1272 * <p>parses as:</p>
1273 * {@snippet :
1274 * CASE_GROUP -> CASE_GROUP
1275 * |--LITERAL_CASE -> case
1276 * | |--EXPR -> EXPR
1277 * | | `--NUM_INT -> 0
1278 * | `--COLON -> :
1279 * |--LITERAL_CASE -> case
1280 * | |--EXPR -> EXPR
1281 * | | `--NUM_INT -> 1
1282 * | `--COLON -> :
1283 * |--LITERAL_CASE -> case
1284 * | |--EXPR -> EXPR
1285 * | | `--NUM_INT -> 2
1286 * | `--COLON -> :
1287 * `--SLIST -> SLIST
1288 * |--EXPR -> EXPR
1289 * | `--ASSIGN -> =
1290 * | |--IDENT -> x
1291 * | `--NUM_INT -> 3
1292 * |--SEMI -> ;
1293 * `--LITERAL_BREAK -> break
1294 * `--SEMI -> ;
1295 * }
1296 *
1297 * @see #LITERAL_CASE
1298 * @see #LITERAL_DEFAULT
1299 * @see #LITERAL_SWITCH
1300 * @see #LITERAL_YIELD
1301 */
1302 public static final int CASE_GROUP = JavaLanguageLexer.CASE_GROUP;
1303 /**
1304 * An expression list. The children are a comma separated list of
1305 * expressions.
1306 *
1307 * <p>For example:</p>
1308 * {@snippet :
1309 * new ArrayList(50);
1310 * }
1311 *
1312 * <p>parses as:</p>
1313 * {@snippet :
1314 * |--EXPR -> EXPR
1315 * | `--LITERAL_NEW -> new
1316 * | |--IDENT -> ArrayList
1317 * | |--TYPE_ARGUMENTS -> TYPE_ARGUMENTS
1318 * | | |--GENERIC_START -> <
1319 * | | `--GENERIC_END -> >
1320 * | |--LPAREN -> (
1321 * | |--ELIST -> ELIST
1322 * | | `--EXPR -> EXPR
1323 * | | `--NUM_INT -> 50
1324 * | `--RPAREN -> )
1325 * |--SEMI -> ;
1326 * }
1327 *
1328 * @see #LITERAL_NEW
1329 * @see #FOR_INIT
1330 * @see #FOR_ITERATOR
1331 * @see #EXPR
1332 * @see #METHOD_CALL
1333 * @see #CTOR_CALL
1334 * @see #SUPER_CTOR_CALL
1335 */
1336 public static final int ELIST = JavaLanguageLexer.ELIST;
1337 /**
1338 * A for loop initializer. This is a child of
1339 * {@code LITERAL_FOR}. The children of this element may be
1340 * a comma separated list of variable declarations, an expression
1341 * list, or empty.
1342 *
1343 * <p>For example:</p>
1344 * {@snippet :
1345 * for (int i = 0; i < arr.length; i++) {}
1346 * }
1347 *
1348 * <p>parses as:</p>
1349 * {@snippet :
1350 * LITERAL_FOR -> for
1351 * |--LPAREN -> (
1352 * |--FOR_INIT -> FOR_INIT
1353 * | `--VARIABLE_DEF -> VARIABLE_DEF
1354 * | |--MODIFIERS -> MODIFIERS
1355 * | |--TYPE -> TYPE
1356 * | | `--LITERAL_INT -> int
1357 * | |--IDENT -> i
1358 * | `--ASSIGN -> =
1359 * | `--EXPR -> EXPR
1360 * | `--NUM_INT -> 0
1361 * |--SEMI -> ;
1362 * |--FOR_CONDITION -> FOR_CONDITION
1363 * | `--EXPR -> EXPR
1364 * | `--LT -> <
1365 * | |--IDENT -> i
1366 * | `--DOT -> .
1367 * | |--IDENT -> arr
1368 * | `--IDENT -> length
1369 * |--SEMI -> ;
1370 * |--FOR_ITERATOR -> FOR_ITERATOR
1371 * | `--ELIST -> ELIST
1372 * | `--EXPR -> EXPR
1373 * | `--POST_INC -> ++
1374 * | `--IDENT -> i
1375 * |--RPAREN -> )
1376 * `--SLIST -> {
1377 * `--RCURLY -> }
1378 * }
1379 *
1380 * @see #VARIABLE_DEF
1381 * @see #ELIST
1382 * @see #LITERAL_FOR
1383 */
1384 public static final int FOR_INIT = JavaLanguageLexer.FOR_INIT;
1385 /**
1386 * A for loop condition. This is a child of
1387 * {@code LITERAL_FOR}. The child of this element is an
1388 * optional expression.
1389 *
1390 * <p>For example:</p>
1391 * {@snippet :
1392 * for (int i = 0; i < arr.length; i++) {}
1393 * }
1394 *
1395 * <p>parses as:</p>
1396 * {@snippet :
1397 * LITERAL_FOR -> for
1398 * |--LPAREN -> (
1399 * |--FOR_INIT -> FOR_INIT
1400 * | `--VARIABLE_DEF -> VARIABLE_DEF
1401 * | |--MODIFIERS -> MODIFIERS
1402 * | |--TYPE -> TYPE
1403 * | | `--LITERAL_INT -> int
1404 * | |--IDENT -> i
1405 * | `--ASSIGN -> =
1406 * | `--EXPR -> EXPR
1407 * | `--NUM_INT -> 0
1408 * |--SEMI -> ;
1409 * |--FOR_CONDITION -> FOR_CONDITION
1410 * | `--EXPR -> EXPR
1411 * | `--LT -> <
1412 * | |--IDENT -> i
1413 * | `--DOT -> .
1414 * | |--IDENT -> arr
1415 * | `--IDENT -> length
1416 * |--SEMI -> ;
1417 * |--FOR_ITERATOR -> FOR_ITERATOR
1418 * | `--ELIST -> ELIST
1419 * | `--EXPR -> EXPR
1420 * | `--POST_INC -> ++
1421 * | `--IDENT -> i
1422 * |--RPAREN -> )
1423 * `--SLIST -> {
1424 * `--RCURLY -> }
1425 * }
1426 *
1427 * @see #EXPR
1428 * @see #LITERAL_FOR
1429 */
1430 public static final int FOR_CONDITION =
1431 JavaLanguageLexer.FOR_CONDITION;
1432
1433 /**
1434 * A for loop iterator. This is a child of
1435 * {@code LITERAL_FOR}. The child of this element is an
1436 * optional expression list.
1437 *
1438 * <p>For example:</p>
1439 * {@snippet :
1440 * for (int i = 0; i < arr.length; i++) {}
1441 * }
1442 *
1443 * <p>parses as:</p>
1444 * {@snippet :
1445 * LITERAL_FOR -> for
1446 * |--LPAREN -> (
1447 * |--FOR_INIT -> FOR_INIT
1448 * | `--VARIABLE_DEF -> VARIABLE_DEF
1449 * | |--MODIFIERS -> MODIFIERS
1450 * | |--TYPE -> TYPE
1451 * | | `--LITERAL_INT -> int
1452 * | |--IDENT -> i
1453 * | `--ASSIGN -> =
1454 * | `--EXPR -> EXPR
1455 * | `--NUM_INT -> 0
1456 * |--SEMI -> ;
1457 * |--FOR_CONDITION -> FOR_CONDITION
1458 * | `--EXPR -> EXPR
1459 * | `--LT -> <
1460 * | |--IDENT -> i
1461 * | `--DOT -> .
1462 * | |--IDENT -> arr
1463 * | `--IDENT -> length
1464 * |--SEMI -> ;
1465 * |--FOR_ITERATOR -> FOR_ITERATOR
1466 * | `--ELIST -> ELIST
1467 * | `--EXPR -> EXPR
1468 * | `--POST_INC -> ++
1469 * | `--IDENT -> i
1470 * |--RPAREN -> )
1471 * `--SLIST -> {
1472 * `--RCURLY -> }
1473 * }
1474 *
1475 * @see #ELIST
1476 * @see #LITERAL_FOR
1477 */
1478 public static final int FOR_ITERATOR =
1479 JavaLanguageLexer.FOR_ITERATOR;
1480
1481 /**
1482 * The empty statement. This goes in place of an
1483 * {@code SLIST} for a {@code for} or {@code while}
1484 * loop body.
1485 *
1486 * <p>For example:</p>
1487 * {@snippet :
1488 * while(true);
1489 * }
1490 *
1491 * <p>parses as:</p>
1492 * {@snippet :
1493 * LITERAL_WHILE -> while
1494 * |--LPAREN -> (
1495 * |--EXPR -> EXPR
1496 * | `--LITERAL_TRUE -> true
1497 * |--RPAREN -> )
1498 * `--EMPTY_STAT -> ;
1499 * }
1500 *
1501 * @see <a
1502 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-14.html#jls-14.6">Java
1503 * Language Specification, §14.6</a>
1504 * @see #LITERAL_FOR
1505 * @see #LITERAL_WHILE
1506 */
1507 public static final int EMPTY_STAT = JavaLanguageLexer.EMPTY_STAT;
1508 /**
1509 * The {@code final} keyword.
1510 *
1511 * <p>For example:</p>
1512 * {@snippet :
1513 * public final int x = 0;
1514 * }
1515 *
1516 * <p>parses as:</p>
1517 * {@snippet :
1518 * VARIABLE_DEF -> VARIABLE_DEF
1519 * |--MODIFIERS -> MODIFIERS
1520 * | |--LITERAL_PUBLIC -> public
1521 * | `--FINAL -> final
1522 * |--TYPE -> TYPE
1523 * | `--LITERAL_INT -> int
1524 * |--IDENT -> x
1525 * |--ASSIGN -> =
1526 * | `--EXPR -> EXPR
1527 * | `--NUM_INT -> 0
1528 * `--SEMI -> ;
1529 * }
1530 *
1531 * @see #MODIFIERS
1532 */
1533 public static final int FINAL = JavaLanguageLexer.FINAL;
1534 /**
1535 * The {@code abstract} keyword.
1536 *
1537 * <p>For example:</p>
1538 * {@snippet :
1539 * public abstract class MyClass
1540 * {
1541 * }
1542 * }
1543 *
1544 * <p>parses as:</p>
1545 * {@snippet :
1546 * --CLASS_DEF
1547 * |--MODIFIERS
1548 * | |--LITERAL_PUBLIC (public)
1549 * | `--ABSTRACT (abstract)
1550 * |--LITERAL_CLASS (class)
1551 * |--IDENT (MyClass)
1552 * `--OBJBLOCK
1553 * |--LCURLY ({)
1554 * `--RCURLY (})
1555 * }
1556 *
1557 * @see #MODIFIERS
1558 */
1559 public static final int ABSTRACT = JavaLanguageLexer.ABSTRACT;
1560 /**
1561 * The {@code strictfp} keyword.
1562 *
1563 * <p>For example: {@code public strictfp class Test {}}</p>
1564 *
1565 * <p>parses as:</p>
1566 * {@snippet :
1567 * CLASS_DEF -> CLASS_DEF
1568 * |--MODIFIERS -> MODIFIERS
1569 * | |--LITERAL_PUBLIC -> public
1570 * | `--STRICTFP -> strictfp
1571 * |--LITERAL_CLASS -> class
1572 * |--IDENT -> Test
1573 * `--OBJBLOCK -> OBJBLOCK
1574 * |--LCURLY -> {
1575 * `--RCURLY -> }
1576 * }
1577 *
1578 * @see #MODIFIERS
1579 */
1580 public static final int STRICTFP = JavaLanguageLexer.STRICTFP;
1581 /**
1582 * A super constructor call.
1583 *
1584 * <p>For example:</p>
1585 * {@snippet :
1586 * super(1);
1587 * }
1588 *
1589 * <p>parses as:</p>
1590 * {@snippet :
1591 * SUPER_CTOR_CALL -> super
1592 * |--LPAREN -> (
1593 * |--ELIST -> ELIST
1594 * | `--EXPR -> EXPR
1595 * | `--NUM_INT -> 1
1596 * |--RPAREN -> )
1597 * `--SEMI -> ;
1598 * }
1599 *
1600 * @see #ELIST
1601 * @see #RPAREN
1602 * @see #SEMI
1603 * @see #CTOR_CALL
1604 */
1605 public static final int SUPER_CTOR_CALL =
1606 JavaLanguageLexer.SUPER_CTOR_CALL;
1607
1608 /**
1609 * A constructor call.
1610 *
1611 * <p>For example:</p>
1612 * {@snippet :
1613 * this(1);
1614 * }
1615 *
1616 * <p>parses as:</p>
1617 * {@snippet :
1618 * CTOR_CALL -> this
1619 * |--LPAREN -> (
1620 * |--ELIST -> ELIST
1621 * | `--EXPR -> EXPR
1622 * | `--NUM_INT -> 1
1623 * |--RPAREN -> )
1624 * `--SEMI -> ;
1625 * }
1626 *
1627 * @see #ELIST
1628 * @see #RPAREN
1629 * @see #SEMI
1630 * @see #SUPER_CTOR_CALL
1631 */
1632 public static final int CTOR_CALL = JavaLanguageLexer.CTOR_CALL;
1633
1634 /**
1635 * The statement terminator ({@code ;}). Depending on the
1636 * context, this make occur as a sibling, a child, or not at all.
1637 *
1638 * <p>For example:</p>
1639 * {@snippet :
1640 * for(;;);
1641 * }
1642 *
1643 * <p>parses as:</p>
1644 * {@snippet :
1645 * LITERAL_FOR -> for
1646 * |--LPAREN -> (
1647 * |--FOR_INIT -> FOR_INIT
1648 * |--SEMI -> ;
1649 * |--FOR_CONDITION -> FOR_CONDITION
1650 * |--SEMI -> ;
1651 * |--FOR_ITERATOR -> FOR_ITERATOR
1652 * |--RPAREN -> )
1653 * `--EMPTY_STAT -> ;
1654 * }
1655 *
1656 * @see #PACKAGE_DEF
1657 * @see #IMPORT
1658 * @see #SLIST
1659 * @see #ARRAY_INIT
1660 * @see #LITERAL_FOR
1661 */
1662 public static final int SEMI = JavaLanguageLexer.SEMI;
1663
1664 /**
1665 * The {@code ]} symbol.
1666 *
1667 * <p>For example:</p>
1668 * {@snippet :
1669 * int a[];
1670 * }
1671 *
1672 * <p>parses as:</p>
1673 * {@snippet :
1674 * VARIABLE_DEF -> VARIABLE_DEF
1675 * |--MODIFIERS -> MODIFIERS
1676 * |--TYPE -> TYPE
1677 * | |--LITERAL_INT -> int
1678 * | `--ARRAY_DECLARATOR -> [
1679 * | `--RBRACK -> ]
1680 * |--IDENT -> a
1681 * `--SEMI -> ;
1682 * }
1683 *
1684 * @see #INDEX_OP
1685 * @see #ARRAY_DECLARATOR
1686 */
1687 public static final int RBRACK = JavaLanguageLexer.RBRACK;
1688 /**
1689 * The {@code void} keyword.
1690 *
1691 * <p>For example:</p>
1692 * {@snippet :
1693 * void LITERAL_VOID(){}
1694 * }
1695 *
1696 * <p>'void' parses as:</p>
1697 * {@snippet :
1698 * METHOD_DEF -> METHOD_DEF
1699 * |--MODIFIERS -> MODIFIERS
1700 * |--TYPE -> TYPE
1701 * | `--LITERAL_VOID -> void
1702 * |--IDENT -> LITERAL_VOID
1703 * }
1704 *
1705 * @see #TYPE
1706 */
1707 public static final int LITERAL_VOID =
1708 JavaLanguageLexer.LITERAL_VOID;
1709
1710 /**
1711 * The {@code boolean} keyword.
1712 *
1713 * <p>For example:</p>
1714 * {@snippet :
1715 * public boolean flag;
1716 * }
1717 *
1718 * <p>parses as:</p>
1719 * {@snippet :
1720 * VARIABLE_DEF -> VARIABLE_DEF
1721 * |--MODIFIERS -> MODIFIERS
1722 * | `--LITERAL_PUBLIC -> public
1723 * |--TYPE -> TYPE
1724 * | `--LITERAL_BOOLEAN -> boolean
1725 * |--IDENT -> flag
1726 * `--SEMI -> ;
1727 * }
1728 *
1729 * @see #TYPE
1730 */
1731 public static final int LITERAL_BOOLEAN =
1732 JavaLanguageLexer.LITERAL_BOOLEAN;
1733
1734 /**
1735 * The {@code byte} keyword.
1736 *
1737 * <p>For example:</p>
1738 * {@snippet :
1739 * public byte x;
1740 * }
1741 *
1742 * <p>parses as:</p>
1743 * {@snippet :
1744 * VARIABLE_DEF -> VARIABLE_DEF
1745 * |--MODIFIERS -> MODIFIERS
1746 * | `--LITERAL_PUBLIC -> public
1747 * |--TYPE -> TYPE
1748 * | `--LITERAL_BYTE -> byte
1749 * |--IDENT -> x
1750 * `--SEMI -> ;
1751 * }
1752 *
1753 * @see #TYPE
1754 */
1755 public static final int LITERAL_BYTE =
1756 JavaLanguageLexer.LITERAL_BYTE;
1757
1758 /**
1759 * The {@code char} keyword.
1760 *
1761 * <p>For example:</p>
1762 * {@snippet :
1763 * char a = 'A';
1764 * }
1765 *
1766 * <p>parses as:</p>
1767 * {@snippet :
1768 * VARIABLE_DEF -> VARIABLE_DEF
1769 * |--MODIFIERS -> MODIFIERS
1770 * |--TYPE -> TYPE
1771 * | `--LITERAL_CHAR -> char
1772 * |--IDENT -> a
1773 * |--ASSIGN -> =
1774 * | `--EXPR -> EXPR
1775 * | `--CHAR_LITERAL -> 'A'
1776 * `--SEMI -> ;
1777 * }
1778 *
1779 * @see #TYPE
1780 */
1781 public static final int LITERAL_CHAR =
1782 JavaLanguageLexer.LITERAL_CHAR;
1783
1784 /**
1785 * The {@code short} keyword.
1786 *
1787 * <p>For example:</p>
1788 * {@snippet :
1789 * public short x;
1790 * }
1791 *
1792 * <p>parses as:</p>
1793 * {@snippet :
1794 * VARIABLE_DEF -> VARIABLE_DEF
1795 * |--MODIFIERS -> MODIFIERS
1796 * | `--LITERAL_PUBLIC -> public
1797 * |--TYPE -> TYPE
1798 * | `--LITERAL_SHORT -> short
1799 * |--IDENT -> x
1800 * `--SEMI -> ;
1801 * }
1802 *
1803 * @see #TYPE
1804 */
1805 public static final int LITERAL_SHORT =
1806 JavaLanguageLexer.LITERAL_SHORT;
1807
1808 /**
1809 * The {@code int} keyword.
1810 *
1811 * <p>For example:</p>
1812 * {@snippet :
1813 * public int x;
1814 * }
1815 *
1816 * <p>parses as:</p>
1817 * {@snippet :
1818 * VARIABLE_DEF -> VARIABLE_DEF
1819 * |--MODIFIERS -> MODIFIERS
1820 * | `--LITERAL_PUBLIC -> public
1821 * |--TYPE -> TYPE
1822 * | `--LITERAL_INT -> int
1823 * |--IDENT -> x
1824 * `--SEMI -> ;
1825 * }
1826 *
1827 * @see #TYPE
1828 */
1829 public static final int LITERAL_INT = JavaLanguageLexer.LITERAL_INT;
1830 /**
1831 * The {@code float} keyword.
1832 *
1833 * <p>For example:</p>
1834 * {@snippet :
1835 * public float x;
1836 * }
1837 *
1838 * <p>parses as:</p>
1839 * {@snippet :
1840 * VARIABLE_DEF -> VARIABLE_DEF
1841 * |--MODIFIERS -> MODIFIERS
1842 * | `--LITERAL_PUBLIC -> public
1843 * |--TYPE -> TYPE
1844 * | `--LITERAL_FLOAT -> float
1845 * |--IDENT -> x
1846 * `--SEMI -> ;
1847 * }
1848 *
1849 * @see #TYPE
1850 */
1851 public static final int LITERAL_FLOAT =
1852 JavaLanguageLexer.LITERAL_FLOAT;
1853
1854 /**
1855 * The {@code long} keyword.
1856 *
1857 * <p>For example:</p>
1858 * {@snippet :
1859 * public long x;
1860 * }
1861 *
1862 * <p>parses as:</p>
1863 * {@snippet :
1864 * VARIABLE_DEF -> VARIABLE_DEF
1865 * |--MODIFIERS -> MODIFIERS
1866 * | `--LITERAL_PUBLIC -> public
1867 * |--TYPE -> TYPE
1868 * | `--LITERAL_LONG -> long
1869 * |--IDENT -> x
1870 * `--SEMI -> ;
1871 * }
1872 *
1873 * @see #TYPE
1874 */
1875 public static final int LITERAL_LONG =
1876 JavaLanguageLexer.LITERAL_LONG;
1877
1878 /**
1879 * The {@code double} keyword.
1880 *
1881 * <p>For example:</p>
1882 * {@snippet :
1883 * public double x;
1884 * }
1885 *
1886 * <p>parses as:</p>
1887 * {@snippet :
1888 * VARIABLE_DEF -> VARIABLE_DEF
1889 * |--MODIFIERS -> MODIFIERS
1890 * | `--LITERAL_PUBLIC -> public
1891 * |--TYPE -> TYPE
1892 * | `--LITERAL_DOUBLE -> double
1893 * |--IDENT -> x
1894 * `--SEMI -> ;
1895 * }
1896 *
1897 * @see #TYPE
1898 */
1899 public static final int LITERAL_DOUBLE =
1900 JavaLanguageLexer.LITERAL_DOUBLE;
1901
1902 /**
1903 * An identifier. These can be names of types, subpackages,
1904 * fields, methods, parameters, and local variables.
1905 *
1906 * <p>For example:</p>
1907 * {@snippet :
1908 * int a = 10;
1909 * }
1910 *
1911 * <p>parses as:</p>
1912 * {@snippet :
1913 * VARIABLE_DEF -> VARIABLE_DEF
1914 * |--MODIFIERS -> MODIFIERS
1915 * |--TYPE -> TYPE
1916 * | `--LITERAL_INT -> int
1917 * |--IDENT -> a
1918 * | `--ASSIGN -> =
1919 * | `--EXPR -> EXPR
1920 * | `--NUM_INT -> 10
1921 * `--SEMI -> ;
1922 * }
1923 *
1924 */
1925 public static final int IDENT = JavaLanguageLexer.IDENT;
1926 /**
1927 * The {@code .} (dot) operator.
1928 *
1929 * <p>For example:</p>
1930 * {@snippet :
1931 * return person.name;
1932 * }
1933 *
1934 * <p>parses as:</p>
1935 * {@snippet :
1936 * --LITERAL_RETURN -> return
1937 * |--EXPR -> EXPR
1938 * | `--DOT -> .
1939 * | |--IDENT -> person
1940 * | `--IDENT -> name
1941 * `--SEMI -> ;
1942 * }
1943 *
1944 * @see FullIdent
1945 */
1946 public static final int DOT = JavaLanguageLexer.DOT;
1947 /**
1948 * The {@code *} (multiplication or wildcard) operator.
1949 *
1950 * <p>For example:</p>
1951 * {@snippet :
1952 * f = m * a;
1953 * }
1954 *
1955 * <p>parses as:</p>
1956 * {@snippet :
1957 * |--EXPR -> EXPR
1958 * | `--ASSIGN -> =
1959 * | |--IDENT -> f
1960 * | `--STAR -> *
1961 * | |--IDENT -> m
1962 * | `--IDENT -> a
1963 * |--SEMI -> ;
1964 * }
1965 *
1966 * @see <a
1967 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-7.html#jls-7.5.2">Java
1968 * Language Specification, §7.5.2</a>
1969 * @see <a
1970 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.17.1">Java
1971 * Language Specification, §15.17.1</a>
1972 * @see #EXPR
1973 * @see #IMPORT
1974 */
1975 public static final int STAR = JavaLanguageLexer.STAR;
1976 /**
1977 * The {@code private} keyword.
1978 *
1979 * <p>For example:</p>
1980 * {@snippet :
1981 * private int x;
1982 * }
1983 *
1984 * <p>parses as:</p>
1985 * {@snippet :
1986 * VARIABLE_DEF -> VARIABLE_DEF
1987 * |--MODIFIERS -> MODIFIERS
1988 * | `--LITERAL_PRIVATE -> private
1989 * |--TYPE -> TYPE
1990 * | `--LITERAL_INT -> int
1991 * |--IDENT -> x
1992 * `--SEMI -> ;
1993 * }
1994 *
1995 * @see #MODIFIERS
1996 */
1997 public static final int LITERAL_PRIVATE =
1998 JavaLanguageLexer.LITERAL_PRIVATE;
1999
2000 /**
2001 * The {@code public} keyword.
2002 *
2003 * <p>For example:</p>
2004 * {@snippet :
2005 * public int x;
2006 * }
2007 *
2008 * <p>parses as:</p>
2009 * {@snippet :
2010 * VARIABLE_DEF -> VARIABLE_DEF
2011 * |--MODIFIERS -> MODIFIERS
2012 * | `--LITERAL_PUBLIC -> public
2013 * |--TYPE -> TYPE
2014 * | `--LITERAL_INT -> int
2015 * |--IDENT -> x
2016 * `--SEMI -> ;
2017 * }
2018 *
2019 * @see #MODIFIERS
2020 */
2021 public static final int LITERAL_PUBLIC =
2022 JavaLanguageLexer.LITERAL_PUBLIC;
2023
2024 /**
2025 * The {@code protected} keyword.
2026 *
2027 * <p>For example:</p>
2028 * {@snippet :
2029 * protected int x;
2030 * }
2031 *
2032 * <p>parses as:</p>
2033 * {@snippet :
2034 * VARIABLE_DEF -> VARIABLE_DEF
2035 * |--MODIFIERS -> MODIFIERS
2036 * | `--LITERAL_PROTECTED -> protected
2037 * |--TYPE -> TYPE
2038 * | `--LITERAL_INT -> int
2039 * |--IDENT -> x
2040 * `--SEMI -> ;
2041 * }
2042 *
2043 * @see #MODIFIERS
2044 */
2045 public static final int LITERAL_PROTECTED =
2046 JavaLanguageLexer.LITERAL_PROTECTED;
2047
2048 /**
2049 * The {@code static} keyword.
2050 *
2051 * <p>For example:</p>
2052 * {@snippet :
2053 * public static int x;
2054 * }
2055 *
2056 * <p>parses as:</p>
2057 * {@snippet :
2058 * VARIABLE_DEF -> VARIABLE_DEF
2059 * |--MODIFIERS -> MODIFIERS
2060 * | |--LITERAL_PUBLIC -> public
2061 * | `--LITERAL_STATIC -> static
2062 * |--TYPE -> TYPE
2063 * | `--LITERAL_INT -> int
2064 * |--IDENT -> x
2065 * `--SEMI -> ;
2066 * }
2067 *
2068 * @see #MODIFIERS
2069 */
2070 public static final int LITERAL_STATIC =
2071 JavaLanguageLexer.LITERAL_STATIC;
2072
2073 /**
2074 * The {@code transient} keyword.
2075 *
2076 * <p>For example:</p>
2077 * {@snippet :
2078 * transient int a;
2079 * }
2080 *
2081 * <p>parses as:</p>
2082 * {@snippet :
2083 * VARIABLE_DEF -> VARIABLE_DEF
2084 * |--MODIFIERS -> MODIFIERS
2085 * | `--LITERAL_TRANSIENT -> transient
2086 * |--TYPE -> TYPE
2087 * | `--LITERAL_INT -> int
2088 * |--IDENT -> a
2089 * `--SEMI -> ;
2090 * }
2091 *
2092 * @see #MODIFIERS
2093 */
2094 public static final int LITERAL_TRANSIENT =
2095 JavaLanguageLexer.LITERAL_TRANSIENT;
2096
2097 /**
2098 * The {@code native} keyword.
2099 *
2100 * <p>For example:</p>
2101 * {@snippet :
2102 * native void foo(){}
2103 * }
2104 *
2105 * <p>parses as:</p>
2106 * {@snippet :
2107 * METHOD_DEF -> METHOD_DEF
2108 * |--MODIFIERS -> MODIFIERS
2109 * | `--LITERAL_NATIVE -> native
2110 * |--TYPE -> TYPE
2111 * | `--LITERAL_VOID -> void
2112 * |--IDENT -> foo
2113 * |--LPAREN -> (
2114 * |--PARAMETERS -> PARAMETERS
2115 * |--RPAREN -> )
2116 * `--SLIST -> {
2117 * `--RCURLY -> }
2118 * }
2119 *
2120 * @see #MODIFIERS
2121 */
2122 public static final int LITERAL_NATIVE =
2123 JavaLanguageLexer.LITERAL_NATIVE;
2124
2125 /**
2126 * The {@code synchronized} keyword. This may be used as a
2127 * modifier of a method or in the definition of a synchronized
2128 * block.
2129 *
2130 * <p>For example:</p>
2131 *
2132 * {@snippet :
2133 * synchronized(this)
2134 * {
2135 * x++;
2136 * }
2137 * }
2138 *
2139 * <p>parses as:</p>
2140 *
2141 * {@snippet :
2142 * LITERAL_SYNCHRONIZED -> synchronized
2143 * |--LPAREN -> (
2144 * |--EXPR -> EXPR
2145 * | `--LITERAL_THIS -> this
2146 * |--RPAREN -> )
2147 * `--SLIST -> {
2148 * |--EXPR -> EXPR
2149 * | `--POST_INC -> ++
2150 * | `--IDENT -> x
2151 * |--SEMI -> ;
2152 * `--RCURLY -> }
2153 * }
2154 *
2155 * @see #MODIFIERS
2156 * @see #LPAREN
2157 * @see #EXPR
2158 * @see #RPAREN
2159 * @see #SLIST
2160 * @see #RCURLY
2161 */
2162 public static final int LITERAL_SYNCHRONIZED =
2163 JavaLanguageLexer.LITERAL_SYNCHRONIZED;
2164
2165 /**
2166 * The {@code volatile} keyword. This may be used as a
2167 * modifier of a field.
2168 *
2169 * <p>For example:</p>
2170 * {@snippet :
2171 * private volatile int x;
2172 * }
2173 *
2174 * <p>parses as:</p>
2175 * {@snippet :
2176 * VARIABLE_DEF -> VARIABLE_DEF
2177 * |--MODIFIERS -> MODIFIERS
2178 * | |--LITERAL_PRIVATE -> private
2179 * | `--LITERAL_VOLATILE -> volatile
2180 * |--TYPE -> TYPE
2181 * | `--LITERAL_INT -> int
2182 * |--IDENT -> x
2183 * `--SEMI -> ;
2184 * }
2185 *
2186 * @see #MODIFIERS
2187 */
2188 public static final int LITERAL_VOLATILE =
2189 JavaLanguageLexer.LITERAL_VOLATILE;
2190
2191 /**
2192 * The {@code class} keyword. This element appears both
2193 * as part of a class declaration, and inline to reference a
2194 * class object.
2195 *
2196 * <p>For example:</p>
2197 * {@snippet :
2198 * class Test {
2199 * }
2200 * }
2201 *
2202 * <p>parses as:</p>
2203 * {@snippet :
2204 * CLASS_DEF -> CLASS_DEF
2205 * |--MODIFIERS -> MODIFIERS
2206 * |--LITERAL_CLASS -> class
2207 * |--IDENT -> Test
2208 * `--OBJBLOCK -> OBJBLOCK
2209 * |--LCURLY -> {
2210 * `--RCURLY -> }
2211 * }
2212 *
2213 * <p>For example:</p>
2214 * {@snippet :
2215 * int.class
2216 * }
2217 *
2218 * <p>parses as:</p>
2219 * {@snippet :
2220 * EXPR -> EXPR
2221 * `--DOT -> .
2222 * |--LITERAL_INT -> int
2223 * `--LITERAL_CLASS -> class
2224 * }
2225 *
2226 * @see #DOT
2227 * @see #IDENT
2228 * @see #CLASS_DEF
2229 * @see FullIdent
2230 */
2231 public static final int LITERAL_CLASS =
2232 JavaLanguageLexer.LITERAL_CLASS;
2233
2234 /**
2235 * The {@code interface} keyword. This token appears in
2236 * interface definition.
2237 *
2238 * <p>For example:</p>
2239 *
2240 * {@snippet :
2241 * public interface MyInterface {
2242 *
2243 * }
2244 * }
2245 *
2246 * <p>parses as:</p>
2247 *
2248 * {@snippet :
2249 * INTERFACE_DEF -> INTERFACE_DEF
2250 * |--MODIFIERS -> MODIFIERS
2251 * | `--LITERAL_PUBLIC -> public
2252 * |--LITERAL_INTERFACE -> interface
2253 * |--IDENT -> MyInterface
2254 * `--OBJBLOCK -> OBJBLOCK
2255 * |--LCURLY -> {
2256 * `--RCURLY -> }
2257 * }
2258 *
2259 * @see #INTERFACE_DEF
2260 */
2261 public static final int LITERAL_INTERFACE =
2262 JavaLanguageLexer.LITERAL_INTERFACE;
2263
2264 /**
2265 * A left curly brace (<code>{</code>).
2266 *
2267 * <p>For example:</p>
2268 *
2269 * {@snippet :
2270 * class App {
2271 * int num;
2272 * }
2273 * }
2274 *
2275 * <p>parses as:</p>
2276 * {@snippet :
2277 * CLASS_DEF -> CLASS_DEF
2278 * |--MODIFIERS -> MODIFIERS
2279 * |--LITERAL_CLASS -> class
2280 * |--IDENT -> App
2281 * `--OBJBLOCK -> OBJBLOCK
2282 * |--LCURLY -> {
2283 * |--VARIABLE_DEF -> VARIABLE_DEF
2284 * | |--MODIFIERS -> MODIFIERS
2285 * | |--TYPE -> TYPE
2286 * | | `--LITERAL_INT -> int
2287 * | |--IDENT -> num
2288 * | `--SEMI -> ;
2289 * `--RCURLY -> }
2290 * }
2291 *
2292 * @see #OBJBLOCK
2293 * @see #ARRAY_INIT
2294 * @see #SLIST
2295 */
2296 public static final int LCURLY = JavaLanguageLexer.LCURLY;
2297 /**
2298 * A right curly brace (<code>}</code>).
2299 *
2300 * <p>For example:</p>
2301 * {@snippet :
2302 * void foo(){}
2303 * }
2304 *
2305 * <p>parses as:</p>
2306 * {@snippet :
2307 * METHOD_DEF -> METHOD_DEF
2308 * |--MODIFIERS -> MODIFIERS
2309 * |--TYPE -> TYPE
2310 * | `--LITERAL_VOID -> void
2311 * |--IDENT -> foo
2312 * |--LPAREN -> (
2313 * |--PARAMETERS -> PARAMETERS
2314 * |--RPAREN -> )
2315 * `--SLIST -> {
2316 * `--RCURLY -> }
2317 * }
2318 *
2319 * @see #OBJBLOCK
2320 * @see #ARRAY_INIT
2321 * @see #SLIST
2322 */
2323 public static final int RCURLY = JavaLanguageLexer.RCURLY;
2324
2325 /**
2326 * The {@code ,} (comma) operator.
2327 *
2328 * <p>For example:</p>
2329 * {@snippet :
2330 * int a, b;
2331 * }
2332 *
2333 * <p>parses as:</p>
2334 * {@snippet :
2335 * |--VARIABLE_DEF -> VARIABLE_DEF
2336 * | |--MODIFIERS -> MODIFIERS
2337 * | |--TYPE -> TYPE
2338 * | | `--LITERAL_INT -> int
2339 * | `--IDENT -> a
2340 * |--COMMA -> ,
2341 * |--VARIABLE_DEF -> VARIABLE_DEF
2342 * | |--MODIFIERS -> MODIFIERS
2343 * | |--TYPE -> TYPE
2344 * | | `--LITERAL_INT -> int
2345 * | `--IDENT -> b
2346 * |--SEMI -> ;
2347 * }
2348 *
2349 * @see #ARRAY_INIT
2350 * @see #FOR_INIT
2351 * @see #FOR_ITERATOR
2352 * @see #LITERAL_THROWS
2353 * @see #IMPLEMENTS_CLAUSE
2354 */
2355 public static final int COMMA = JavaLanguageLexer.COMMA;
2356
2357 /**
2358 * A left parenthesis ({@code (}).
2359 *
2360 * <p>For example:</p>
2361 * {@snippet :
2362 * Integer val = new Integer();
2363 * while (false) {
2364 * val += (-3);
2365 * }
2366 * }
2367 *
2368 * <p>parses as:</p>
2369 * {@snippet :
2370 * |--VARIABLE_DEF -> VARIABLE_DEF
2371 * | |--MODIFIERS -> MODIFIERS
2372 * | |--TYPE -> TYPE
2373 * | | `--IDENT -> Integer
2374 * | |--IDENT -> val
2375 * | `--ASSIGN -> =
2376 * | `--EXPR -> EXPR
2377 * | `--LITERAL_NEW -> new
2378 * | |--IDENT -> Integer
2379 * | |--LPAREN -> (
2380 * | |--ELIST -> ELIST
2381 * | `--RPAREN -> )
2382 * |--SEMI -> ;
2383 * |--LITERAL_WHILE -> while
2384 * | |--LPAREN -> (
2385 * | |--EXPR -> EXPR
2386 * | | `--LITERAL_FALSE -> false
2387 * | |--RPAREN -> )
2388 * | `--SLIST -> {
2389 * | |--EXPR -> EXPR
2390 * | | `--PLUS_ASSIGN -> +=
2391 * | | |--IDENT -> val
2392 * | | |--LPAREN -> (
2393 * | | |--UNARY_MINUS -> -
2394 * | | | `--NUM_INT -> 3
2395 * | | `--RPAREN -> )
2396 * | |--SEMI -> ;
2397 * | `--RCURLY -> }
2398 * }
2399 *
2400 * @see #LITERAL_FOR
2401 * @see #LITERAL_NEW
2402 * @see #EXPR
2403 * @see #LITERAL_SWITCH
2404 * @see #LITERAL_CATCH
2405 */
2406 public static final int LPAREN = JavaLanguageLexer.LPAREN;
2407 /**
2408 * A right parenthesis ({@code )}).
2409 *
2410 * <p>For example:</p>
2411 * {@snippet :
2412 * void check() {
2413 * }
2414 * }
2415 *
2416 * <p>parses as:</p>
2417 * {@snippet :
2418 * METHOD_DEF -> METHOD_DEF
2419 * |--MODIFIERS -> MODIFIERS
2420 * |--TYPE -> TYPE
2421 * | `--LITERAL_VOID -> void
2422 * |--IDENT -> check
2423 * |--LPAREN -> (
2424 * |--PARAMETERS -> PARAMETERS
2425 * |--RPAREN -> )
2426 * `--SLIST -> {
2427 * `--RCURLY -> }
2428 * }
2429 *
2430 * @see #LITERAL_FOR
2431 * @see #LITERAL_NEW
2432 * @see #METHOD_CALL
2433 * @see #TYPECAST
2434 * @see #EXPR
2435 * @see #LITERAL_SWITCH
2436 * @see #LITERAL_CATCH
2437 */
2438 public static final int RPAREN = JavaLanguageLexer.RPAREN;
2439 /**
2440 * The {@code this} keyword use to refer the current object.
2441 * This can also be used to call the constructor.
2442 *
2443 * <p>For example:</p>
2444 * {@snippet :
2445 * this.name = name;
2446 * }
2447 *
2448 * <p>parses as:</p>
2449 * {@snippet :
2450 * EXPR -> EXPR
2451 * `--ASSIGN -> =
2452 * |--DOT -> .
2453 * | |--LITERAL_THIS -> this
2454 * | `--IDENT -> name
2455 * `--IDENT -> name
2456 * SEMI -> ;
2457 * }
2458 *
2459 * <p>Also consider:</p>
2460 * {@snippet :
2461 * this(1, "NULL");
2462 * }
2463 *
2464 * <p>parses as:</p>
2465 * {@snippet :
2466 * CTOR_CALL -> this
2467 * |--LPAREN -> (
2468 * |--ELIST -> ELIST
2469 * | |--EXPR -> EXPR
2470 * | | `--NUM_INT -> 1
2471 * | |--COMMA -> ,
2472 * | `--EXPR -> EXPR
2473 * | `--STRING_LITERAL -> "NULL"
2474 * |--RPAREN -> )
2475 * `--SEMI -> ;
2476 * }
2477 *
2478 * @see #EXPR
2479 * @see #CTOR_CALL
2480 */
2481 public static final int LITERAL_THIS =
2482 JavaLanguageLexer.LITERAL_THIS;
2483
2484 /**
2485 * The {@code super} keyword.
2486 *
2487 * <p>For example:</p>
2488 * {@snippet :
2489 * super.toString();
2490 * }
2491 *
2492 * <p>parses as:</p>
2493 * {@snippet :
2494 * |--EXPR -> EXPR
2495 * | `--METHOD_CALL -> (
2496 * | |--DOT -> .
2497 * | | |--LITERAL_SUPER -> super
2498 * | | `--IDENT -> toString
2499 * | |--ELIST -> ELIST
2500 * | `--RPAREN -> )
2501 * |--SEMI -> ;
2502 * }
2503 *
2504 * @see #EXPR
2505 * @see #SUPER_CTOR_CALL
2506 */
2507 public static final int LITERAL_SUPER =
2508 JavaLanguageLexer.LITERAL_SUPER;
2509
2510 /**
2511 * The {@code =} (assignment) operator.
2512 *
2513 * <p>For example:</p>
2514 * {@snippet :
2515 * a = b;
2516 * }
2517 *
2518 * <p>parses as:</p>
2519 * {@snippet :
2520 * |--EXPR -> EXPR
2521 * | `--ASSIGN -> =
2522 * | |--IDENT -> a
2523 * | `--IDENT -> b
2524 * |--SEMI -> ;
2525 * }
2526 *
2527 * @see <a
2528 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.26.1">Java
2529 * Language Specification, §15.26.1</a>
2530 * @see #EXPR
2531 */
2532 public static final int ASSIGN = JavaLanguageLexer.ASSIGN;
2533 /**
2534 * The {@code throws} keyword. The children are a number of
2535 * one or more identifiers separated by commas.
2536 *
2537 * <p>For example:</p>
2538 * {@snippet :
2539 * void test() throws FileNotFoundException, EOFException {
2540 * }
2541 * }
2542 *
2543 * <p>parses as:</p>
2544 * {@snippet :
2545 * METHOD_DEF -> METHOD_DEF
2546 * |--MODIFIERS -> MODIFIERS
2547 * |--TYPE -> TYPE
2548 * | `--LITERAL_VOID -> void
2549 * |--IDENT -> test
2550 * |--LPAREN -> (
2551 * |--PARAMETERS -> PARAMETERS
2552 * |--RPAREN -> )
2553 * |--LITERAL_THROWS -> throws
2554 * | |--IDENT -> FileNotFoundException
2555 * | |--COMMA -> ,
2556 * | `--IDENT -> EOFException
2557 * `--SLIST -> {
2558 * `--RCURLY -> }
2559 * }
2560 *
2561 * @see <a
2562 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-8.html#jls-8.4.4">Java
2563 * Language Specification, §8.4.4</a>
2564 * @see #IDENT
2565 * @see #DOT
2566 * @see #COMMA
2567 * @see #METHOD_DEF
2568 * @see #CTOR_DEF
2569 * @see FullIdent
2570 */
2571 public static final int LITERAL_THROWS =
2572 JavaLanguageLexer.LITERAL_THROWS;
2573
2574 /**
2575 * The {@code :} (colon) operator. This will appear as part
2576 * of the conditional operator ({@code ? :}).
2577 *
2578 * <p>For example:</p>
2579 * {@snippet :
2580 * num = isValid ? 1 : 0;
2581 * }
2582 *
2583 * <p>parses as:</p>
2584 * {@snippet :
2585 * |--EXPR -> EXPR
2586 * | `--ASSIGN -> =
2587 * | |--IDENT -> num
2588 * | `--QUESTION -> ?
2589 * | |--IDENT -> isValid
2590 * | |--NUM_INT -> 1
2591 * | |--COLON -> :
2592 * | `--NUM_INT -> 0
2593 * |--SEMI -> ;
2594 * }
2595 *
2596 * @see #QUESTION
2597 * @see #LABELED_STAT
2598 * @see #CASE_GROUP
2599 */
2600 public static final int COLON = JavaLanguageLexer.COLON;
2601
2602 /**
2603 * The {@code ::} (double colon) separator.
2604 * It is part of Java 8 syntax that is used for method reference.
2605 * The token does not appear in tree, {@link #METHOD_REF} should be used instead.
2606 *
2607 * <p>For example:</p>
2608 * {@snippet :
2609 * Function<Double, Double> square = MyClass::square;
2610 * }
2611 *
2612 * <p>parses as:</p>
2613 * {@snippet :
2614 * VARIABLE_DEF -> VARIABLE_DEF
2615 * |--MODIFIERS -> MODIFIERS
2616 * |--TYPE -> TYPE
2617 * | |--IDENT -> Function
2618 * | | `--TYPE_ARGUMENTS -> TYPE_ARGUMENTS
2619 * | | |--GENERIC_START -> <
2620 * | | |--TYPE_ARGUMENT -> TYPE_ARGUMENT
2621 * | | | `--IDENT -> Double
2622 * | | |--COMMA -> ,
2623 * | | |--TYPE_ARGUMENT -> TYPE_ARGUMENT
2624 * | | | `--IDENT -> Double
2625 * | | `--GENERIC_END -> >
2626 * | |--IDENT -> square
2627 * | |--ASSIGN -> =
2628 * | | `--EXPR -> EXPR
2629 * | | `--METHOD_REF -> ::
2630 * | | |--IDENT -> MyClass
2631 * | | `--IDENT -> square
2632 * | `--SEMI -> ;
2633 * }
2634 *
2635 * @see #METHOD_REF
2636 */
2637 public static final int DOUBLE_COLON = JavaLanguageLexer.DOUBLE_COLON;
2638 /**
2639 * The {@code if} keyword.
2640 *
2641 * <p>For example:</p>
2642 * {@snippet :
2643 * if (optimistic)
2644 * {
2645 * message = "half full";
2646 * }
2647 * else
2648 * {
2649 * message = "half empty";
2650 * }
2651 * }
2652 *
2653 * <p>parses as:</p>
2654 * {@snippet :
2655 * LITERAL_IF -> if
2656 * |--LPAREN -> (
2657 * |--EXPR -> EXPR
2658 * | `--IDENT -> optimistic
2659 * |--RPAREN -> )
2660 * |--SLIST -> {
2661 * | |--EXPR -> EXPR
2662 * | | `--ASSIGN -> =
2663 * | | |--IDENT -> message
2664 * | | `--STRING_LITERAL -> "half full"
2665 * | |--SEMI -> ;
2666 * | `--RCURLY -> }
2667 * `--LITERAL_ELSE -> else
2668 * `--SLIST -> {
2669 * |--EXPR -> EXPR
2670 * | `--ASSIGN -> =
2671 * | |--IDENT -> message
2672 * | `--STRING_LITERAL -> "half empty"
2673 * |--SEMI -> ;
2674 * `--RCURLY -> }
2675 * }
2676 *
2677 * @see #LPAREN
2678 * @see #EXPR
2679 * @see #RPAREN
2680 * @see #SLIST
2681 * @see #EMPTY_STAT
2682 * @see #LITERAL_ELSE
2683 */
2684 public static final int LITERAL_IF = JavaLanguageLexer.LITERAL_IF;
2685 /**
2686 * The {@code for} keyword. The children are {@code (},
2687 * an initializer, a condition, an iterator, a {@code )} and
2688 * either a statement list, a single expression, or an empty
2689 * statement.
2690 *
2691 * <p>For example:</p>
2692 * {@snippet :
2693 * for (int i = 0; i < arr.length; i++) {}
2694 * }
2695 *
2696 * <p>parses as:</p>
2697 * {@snippet :
2698 * LITERAL_FOR -> for
2699 * |--LPAREN -> (
2700 * |--FOR_INIT -> FOR_INIT
2701 * | `--VARIABLE_DEF -> VARIABLE_DEF
2702 * | |--MODIFIERS -> MODIFIERS
2703 * | |--TYPE -> TYPE
2704 * | | `--LITERAL_INT -> int
2705 * | |--IDENT -> i
2706 * | `--ASSIGN -> =
2707 * | `--EXPR -> EXPR
2708 * | `--NUM_INT -> 0
2709 * |--SEMI -> ;
2710 * |--FOR_CONDITION -> FOR_CONDITION
2711 * | `--EXPR -> EXPR
2712 * | `--LT -> <
2713 * | |--IDENT -> i
2714 * | `--DOT -> .
2715 * | |--IDENT -> arr
2716 * | `--IDENT -> length
2717 * |--SEMI -> ;
2718 * |--FOR_ITERATOR -> FOR_ITERATOR
2719 * | `--ELIST -> ELIST
2720 * | `--EXPR -> EXPR
2721 * | `--POST_INC -> ++
2722 * | `--IDENT -> i
2723 * |--RPAREN -> )
2724 * `--SLIST -> {
2725 * `--RCURLY -> }
2726 * }
2727 *
2728 * @see #LPAREN
2729 * @see #FOR_INIT
2730 * @see #SEMI
2731 * @see #FOR_CONDITION
2732 * @see #FOR_ITERATOR
2733 * @see #RPAREN
2734 * @see #SLIST
2735 * @see #EMPTY_STAT
2736 * @see #EXPR
2737 */
2738 public static final int LITERAL_FOR = JavaLanguageLexer.LITERAL_FOR;
2739 /**
2740 * The {@code while} keyword.
2741 *
2742 * <p>For example:</p>
2743 * {@snippet :
2744 * while (i < 5) {
2745 * i++;
2746 * }
2747 * }
2748 *
2749 * <p>parses as:</p>
2750 * {@snippet :
2751 * LITERAL_WHILE -> while
2752 * |--LPAREN -> (
2753 * |--EXPR -> EXPR
2754 * | `--LT -> <
2755 * | |--IDENT -> i
2756 * | `--NUM_INT -> 5
2757 * |--RPAREN -> )
2758 * `--SLIST -> {
2759 * |--EXPR -> EXPR
2760 * | `--POST_INC -> ++
2761 * | `--IDENT -> i
2762 * |--SEMI -> ;
2763 * `--RCURLY -> }
2764 * }
2765 */
2766 public static final int LITERAL_WHILE =
2767 JavaLanguageLexer.LITERAL_WHILE;
2768
2769 /**
2770 * The {@code do} keyword. Note that the while token does not
2771 * appear as part of the do-while construct.
2772 *
2773 * <p>For example:</p>
2774 * {@snippet :
2775 * do {
2776 * x = rand.nextInt();
2777 * } while (x < 5);
2778 * }
2779 *
2780 * <p>parses as:</p>
2781 * {@snippet :
2782 * LITERAL_DO -> do
2783 * |--SLIST -> {
2784 * | |--EXPR -> EXPR
2785 * | | `--ASSIGN -> =
2786 * | | |--IDENT -> x
2787 * | | `--METHOD_CALL -> (
2788 * | | |--DOT -> .
2789 * | | | |--IDENT -> rand
2790 * | | | `--IDENT -> nextInt
2791 * | | |--ELIST -> ELIST
2792 * | | `--RPAREN -> )
2793 * | |--SEMI -> ;
2794 * | `--RCURLY -> }
2795 * |--DO_WHILE -> while
2796 * |--LPAREN -> (
2797 * |--EXPR -> EXPR
2798 * | `--LT -> <
2799 * | |--IDENT -> x
2800 * | `--NUM_INT -> 5
2801 * |--RPAREN -> )
2802 * `--SEMI -> ;
2803 * }
2804 *
2805 * @see #SLIST
2806 * @see #EXPR
2807 * @see #EMPTY_STAT
2808 * @see #LPAREN
2809 * @see #RPAREN
2810 * @see #SEMI
2811 */
2812 public static final int LITERAL_DO = JavaLanguageLexer.LITERAL_DO;
2813 /**
2814 * Literal {@code while} in do-while loop.
2815 *
2816 * <p>For example:</p>
2817 * {@snippet :
2818 * do {
2819 *
2820 * } while (a > 0);
2821 * }
2822 *
2823 * <p>parses as:</p>
2824 * {@snippet :
2825 * --LITERAL_DO -> do
2826 * |--SLIST -> {
2827 * | `--RCURLY -> }
2828 * |--DO_WHILE -> while
2829 * |--LPAREN -> (
2830 * |--EXPR -> EXPR
2831 * | `--GT -> >
2832 * | |--IDENT -> a
2833 * | `--NUM_INT -> 0
2834 * |--RPAREN -> )
2835 * `--SEMI -> ;
2836 * }
2837 *
2838 * @see #LITERAL_DO
2839 */
2840 public static final int DO_WHILE = JavaLanguageLexer.DO_WHILE;
2841 /**
2842 * The {@code break} keyword. The first child is an optional
2843 * identifier and the last child is a semicolon.
2844 *
2845 * <p>For example:</p>
2846 * {@snippet :
2847 * for (;;) {
2848 * break;
2849 * }
2850 * }
2851 *
2852 * <p>parses as:</p>
2853 * {@snippet :
2854 * LITERAL_FOR -> for
2855 * |--LPAREN -> (
2856 * |--FOR_INIT -> FOR_INIT
2857 * |--SEMI -> ;
2858 * |--FOR_CONDITION -> FOR_CONDITION
2859 * |--SEMI -> ;
2860 * |--FOR_ITERATOR -> FOR_ITERATOR
2861 * |--RPAREN -> )
2862 * `--SLIST -> {
2863 * |--LITERAL_BREAK -> break
2864 * | `--SEMI -> ;
2865 * `--RCURLY -> }
2866 * }
2867 *
2868 * @see #IDENT
2869 * @see #SEMI
2870 * @see #SLIST
2871 */
2872 public static final int LITERAL_BREAK =
2873 JavaLanguageLexer.LITERAL_BREAK;
2874
2875 /**
2876 * The {@code continue} keyword. The first child is an
2877 * optional identifier and the last child is a semicolon.
2878 *
2879 * <p>For example:</p>
2880 * {@snippet :
2881 * for (;;) {
2882 * continue;
2883 * }
2884 * }
2885 *
2886 * <p>parses as:</p>
2887 * {@snippet :
2888 * LITERAL_FOR -> for
2889 * |--LPAREN -> (
2890 * |--FOR_INIT -> FOR_INIT
2891 * |--SEMI -> ;
2892 * |--FOR_CONDITION -> FOR_CONDITION
2893 * |--SEMI -> ;
2894 * |--FOR_ITERATOR -> FOR_ITERATOR
2895 * |--RPAREN -> )
2896 * `--SLIST -> {
2897 * |--LITERAL_CONTINUE -> continue
2898 * | `--SEMI -> ;
2899 * `--RCURLY -> }
2900 * }
2901 *
2902 * @see #IDENT
2903 * @see #SEMI
2904 * @see #SLIST
2905 */
2906 public static final int LITERAL_CONTINUE =
2907 JavaLanguageLexer.LITERAL_CONTINUE;
2908
2909 /**
2910 * The {@code return} keyword. The first child is an
2911 * optional expression for the return value. The last child is a
2912 * semicolon.
2913 *
2914 * <p>For example:</p>
2915 * {@snippet :
2916 * public int foo(int i) {
2917 * return i+1;
2918 * }
2919 * }
2920 *
2921 * <p>parses as:</p>
2922 * {@snippet :
2923 * METHOD_DEF -> METHOD_DEF
2924 * |--MODIFIERS -> MODIFIERS
2925 * | `--LITERAL_PUBLIC -> public
2926 * |--TYPE -> TYPE
2927 * | `--LITERAL_INT -> int
2928 * |--IDENT -> foo
2929 * |--LPAREN -> (
2930 * |--PARAMETERS -> PARAMETERS
2931 * | `--PARAMETER_DEF -> PARAMETER_DEF
2932 * | |--MODIFIERS -> MODIFIERS
2933 * | |--TYPE -> TYPE
2934 * | | `--LITERAL_INT -> int
2935 * | `--IDENT -> i
2936 * |--RPAREN -> )
2937 * `--SLIST -> {
2938 * |--LITERAL_RETURN -> return
2939 * | |--EXPR -> EXPR
2940 * | | `--PLUS -> +
2941 * | | |--IDENT -> i
2942 * | | `--NUM_INT -> 1
2943 * | `--SEMI -> ;
2944 * `--RCURLY -> }
2945 * }
2946 *
2947 * @see #EXPR
2948 * @see #SEMI
2949 * @see #SLIST
2950 */
2951 public static final int LITERAL_RETURN =
2952 JavaLanguageLexer.LITERAL_RETURN;
2953
2954 /**
2955 * The {@code switch} keyword.
2956 *
2957 * <p>For example:</p>
2958 * {@snippet :
2959 * switch (type) {
2960 * case 0:
2961 * background = Color.red;
2962 * break;
2963 * case 1:
2964 * background = Color.blue;
2965 * break;
2966 * default:
2967 * background = Color.green;
2968 * }
2969 * }
2970 *
2971 * <p>parses as:</p>
2972 * {@snippet :
2973 * LITERAL_SWITCH -> switch
2974 * |--LPAREN -> (
2975 * |--EXPR -> EXPR
2976 * | `--IDENT -> type
2977 * |--RPAREN -> )
2978 * |--LCURLY -> {
2979 * |--CASE_GROUP -> CASE_GROUP
2980 * | |--LITERAL_CASE -> case
2981 * | | |--EXPR -> EXPR
2982 * | | | `--NUM_INT -> 0
2983 * | | `--COLON -> :
2984 * | `--SLIST -> SLIST
2985 * | |--EXPR -> EXPR
2986 * | | `--ASSIGN -> =
2987 * | | |--IDENT -> background
2988 * | | `--DOT -> .
2989 * | | |--IDENT -> Color
2990 * | | `--IDENT -> red
2991 * | |--SEMI -> ;
2992 * | `--LITERAL_BREAK -> break
2993 * | `--SEMI -> ;
2994 * |--CASE_GROUP -> CASE_GROUP
2995 * | |--LITERAL_CASE -> case
2996 * | | |--EXPR -> EXPR
2997 * | | | `--NUM_INT -> 1
2998 * | | `--COLON -> :
2999 * | `--SLIST -> SLIST
3000 * | |--EXPR -> EXPR
3001 * | | `--ASSIGN -> =
3002 * | | |--IDENT -> background
3003 * | | `--DOT -> .
3004 * | | |--IDENT -> Color
3005 * | | `--IDENT -> blue
3006 * | |--SEMI -> ;
3007 * | `--LITERAL_BREAK -> break
3008 * | `--SEMI -> ;
3009 * |--CASE_GROUP -> CASE_GROUP
3010 * | |--LITERAL_DEFAULT -> default
3011 * | | `--COLON -> :
3012 * | `--SLIST -> SLIST
3013 * | |--EXPR -> EXPR
3014 * | | `--ASSIGN -> =
3015 * | | |--IDENT -> background
3016 * | | `--DOT -> .
3017 * | | |--IDENT -> Color
3018 * | | `--IDENT -> green
3019 * | `--SEMI -> ;
3020 * `--RCURLY -> }
3021 * }
3022 *
3023 * @see <a
3024 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-14.html#jls-14.10">Java
3025 * Language Specification, §14.10</a>
3026 * @see #LPAREN
3027 * @see #EXPR
3028 * @see #RPAREN
3029 * @see #LCURLY
3030 * @see #CASE_GROUP
3031 * @see #RCURLY
3032 * @see #SLIST
3033 * @see #SWITCH_RULE
3034 */
3035 public static final int LITERAL_SWITCH =
3036 JavaLanguageLexer.LITERAL_SWITCH;
3037
3038 /**
3039 * The {@code throw} keyword. The first child is an
3040 * expression that evaluates to a {@code Throwable} instance.
3041 *
3042 * <p>For example:</p>
3043 * {@snippet :
3044 * throw new ArithmeticException("An exception occurred.");
3045 * }
3046 *
3047 * <p>parses as:</p>
3048 * {@snippet :
3049 * LITERAL_THROW -> throw
3050 * |--EXPR -> EXPR
3051 * | `--LITERAL_NEW -> new
3052 * | |--IDENT -> ArithmeticException
3053 * | |--LPAREN -> (
3054 * | |--ELIST -> ELIST
3055 * | | `--EXPR -> EXPR
3056 * | | `--STRING_LITERAL -> "An exception occurred."
3057 * | `--RPAREN -> )
3058 * `--SEMI -> ;
3059 * }
3060 *
3061 * @see <a
3062 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-14.html#jls-14.17">Java
3063 * Language Specification, §14.17</a>
3064 * @see #SLIST
3065 * @see #EXPR
3066 */
3067 public static final int LITERAL_THROW =
3068 JavaLanguageLexer.LITERAL_THROW;
3069
3070 /**
3071 * The {@code else} keyword. This appears as a child of an
3072 * {@code if} statement.
3073 *
3074 * <p>For example:</p>
3075 * {@snippet :
3076 * if (flag) {
3077 *
3078 * } else {
3079 *
3080 * }
3081 * }
3082 *
3083 * <p>parses as:</p>
3084 * {@snippet :
3085 * LITERAL_IF -> if
3086 * |--LPAREN -> (
3087 * |--EXPR -> EXPR
3088 * | `--IDENT -> flag
3089 * |--RPAREN -> )
3090 * |--SLIST -> {
3091 * | `--RCURLY -> }
3092 * `--LITERAL_ELSE -> else
3093 * `--SLIST -> {
3094 * `--RCURLY -> }
3095 * }
3096 *
3097 * @see #SLIST
3098 * @see #EXPR
3099 * @see #EMPTY_STAT
3100 * @see #LITERAL_IF
3101 */
3102 public static final int LITERAL_ELSE =
3103 JavaLanguageLexer.LITERAL_ELSE;
3104
3105 /**
3106 * The {@code case} keyword. The first child is a constant
3107 * expression that evaluates to an integer.
3108 *
3109 * <p>For example:</p>
3110 * {@snippet :
3111 * switch(num){
3112 * case 0:
3113 * num = 1;
3114 * }
3115 * }
3116 *
3117 * <p>parses as:</p>
3118 * {@snippet :
3119 *
3120 * CASE_GROUP -> CASE_GROUP
3121 * |--LITERAL_CASE -> cas
3122 * | |--EXPR -> EXPR
3123 * | | `--NUM_INT -> 0
3124 * | `--COLON -> :
3125 * `--SLIST -> SLIST
3126 * |--EXPR -> EXPR
3127 * | `--ASSIGN -> =
3128 * | |--IDENT -> num
3129 * | `--NUM_INT -> 1
3130 * `--SEMI -> ;
3131 * }
3132 *
3133 * <p>For example:</p>
3134 * {@snippet :
3135 * switch(num){
3136 * case 1 -> num = -1
3137 * }
3138 * }
3139 *
3140 * <p>parses as:</p>
3141 * {@snippet :
3142 * SWITCH_RULE -> SWITCH_RULE
3143 * |--LITERAL_CASE -> case
3144 * | `--EXPR -> EXPR
3145 * | `--NUM_INT -> 1
3146 * |--LAMBDA -> ->
3147 * |--EXPR -> EXPR
3148 * | `--ASSIGN -> =
3149 * | |--IDENT -> num
3150 * | `--UNARY_MINUS -> -
3151 * | `--NUM_INT -> 1
3152 * `--SEMI -> ;
3153 * }
3154 *
3155 * @see #CASE_GROUP
3156 * @see #EXPR
3157 */
3158 public static final int LITERAL_CASE =
3159 JavaLanguageLexer.LITERAL_CASE;
3160
3161 /**
3162 * The {@code default} keyword. This element has no
3163 * children.
3164 *
3165 * <p>For example:</p>
3166 * {@snippet :
3167 * switch (type) {
3168 * case 1:
3169 * x = 1;
3170 * break;
3171 * default:
3172 * x = 3;
3173 * }
3174 * }
3175 *
3176 * <p>parses as:</p>
3177 * {@snippet :
3178 * LITERAL_SWITCH -> switch
3179 * |--LPAREN -> (
3180 * |--EXPR -> EXPR
3181 * | `--IDENT -> type
3182 * |--RPAREN -> )
3183 * |--LCURLY -> {
3184 * |--CASE_GROUP -> CASE_GROUP
3185 * | |--LITERAL_CASE -> case
3186 * | | |--EXPR -> EXPR
3187 * | | | `--NUM_INT -> 1
3188 * | | `--COLON -> :
3189 * | `--SLIST -> SLIST
3190 * | |--EXPR -> EXPR
3191 * | | `--ASSIGN -> =
3192 * | | |--IDENT -> x
3193 * | | `--NUM_INT -> 1
3194 * | | | |--SEMI -> ;
3195 * | `--LITERAL_BREAK -> break
3196 * | `--SEMI -> ;
3197 * |--CASE_GROUP -> CASE_GROUP
3198 * | |--LITERAL_DEFAULT -> default
3199 * | | `--COLON -> :
3200 * | `--SLIST -> SLIST
3201 * | |--EXPR -> EXPR
3202 * | | `--ASSIGN -> =
3203 * | | |--IDENT -> x
3204 * | | `--NUM_INT -> 3
3205 * | `--SEMI -> ;
3206 * `--RCURLY -> }
3207 * }
3208 *
3209 * @see #CASE_GROUP
3210 * @see #MODIFIERS
3211 * @see #SWITCH_RULE
3212 */
3213 public static final int LITERAL_DEFAULT =
3214 JavaLanguageLexer.LITERAL_DEFAULT;
3215
3216 /**
3217 * The {@code try} keyword. The children are a statement
3218 * list, zero or more catch blocks and then an optional finally
3219 * block.
3220 *
3221 * <p>For example:</p>
3222 * {@snippet :
3223 * try { } finally {}
3224 * }
3225 *
3226 * <p>parses as:</p>
3227 * {@snippet :
3228 * LITERAL_TRY -> try
3229 * |--SLIST -> {
3230 * | `--RCURLY -> }
3231 * `--LITERAL_FINALLY -> finally
3232 * `--SLIST -> {
3233 * `--RCURLY -> }
3234 * }
3235 *
3236 * @see <a
3237 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-14.html#jls-14.19">Java
3238 * Language Specification, §14.19</a>
3239 * @see #SLIST
3240 * @see #LITERAL_CATCH
3241 * @see #LITERAL_FINALLY
3242 */
3243 public static final int LITERAL_TRY = JavaLanguageLexer.LITERAL_TRY;
3244
3245 /**
3246 * The Java 7 try-with-resources construct.
3247 *
3248 * <p>For example:</p>
3249 * {@snippet :
3250 * try (Foo foo = new Foo(); Bar bar = new Bar()) {
3251 * }
3252 * }
3253 *
3254 * <p>parses as:</p>
3255 * {@snippet :
3256 * LITERAL_TRY -> try
3257 * |--RESOURCE_SPECIFICATION -> RESOURCE_SPECIFICATION
3258 * | |--LPAREN -> (
3259 * | |--RESOURCES -> RESOURCES
3260 * | | |--RESOURCE -> RESOURCE
3261 * | | | |--MODIFIERS -> MODIFIERS
3262 * | | | |--TYPE -> TYPE
3263 * | | | | `--IDENT -> Foo
3264 * | | | |--IDENT -> foo
3265 * | | | `--ASSIGN -> =
3266 * | | | `--EXPR -> EXPR
3267 * | | | `--LITERAL_NEW -> new
3268 * | | | |--IDENT -> Foo
3269 * | | | |--LPAREN -> (
3270 * | | | |--ELIST -> ELIST
3271 * | | | `--RPAREN -> )
3272 * | | |--SEMI -> ;
3273 * | | `--RESOURCE -> RESOURCE
3274 * | | |--MODIFIERS -> MODIFIERS
3275 * | | |--TYPE -> TYPE
3276 * | | | `--IDENT -> Bar
3277 * | | |--IDENT -> bar
3278 * | | `--ASSIGN -> =
3279 * | | `--EXPR -> EXPR
3280 * | | `--LITERAL_NEW -> new
3281 * | | |--IDENT -> Bar
3282 * | | |--LPAREN -> (
3283 * | | |--ELIST -> ELIST
3284 * | | `--RPAREN -> )
3285 * | `--RPAREN -> )
3286 * `--SLIST -> {
3287 * `--RCURLY -> }
3288 * }
3289 *
3290 * <p>Also consider:</p>
3291 * {@snippet :
3292 * try (BufferedReader br = new BufferedReader(new FileReader(path))) {
3293 * }
3294 * }
3295 *
3296 * <p>which parses as:</p>
3297 * {@snippet :
3298 * LITERAL_TRY -> try
3299 * |--RESOURCE_SPECIFICATION -> RESOURCE_SPECIFICATION
3300 * | |--LPAREN -> (
3301 * | |--RESOURCES -> RESOURCES
3302 * | | `--RESOURCE -> RESOURCE
3303 * | | |--MODIFIERS -> MODIFIERS
3304 * | | |--TYPE -> TYPE
3305 * | | | `--IDENT -> BufferedReader
3306 * | | |--IDENT -> br
3307 * | | `--ASSIGN -> =
3308 * | | `--EXPR -> EXPR
3309 * | | `--LITERAL_NEW -> new
3310 * | | |--IDENT -> BufferedReader
3311 * | | |--LPAREN -> (
3312 * | | |--ELIST -> ELIST
3313 * | | | `--EXPR -> EXPR
3314 * | | | `--LITERAL_NEW -> new
3315 * | | | |--IDENT -> FileReader
3316 * | | | |--LPAREN -> (
3317 * | | | |--ELIST -> ELIST
3318 * | | | | `--EXPR -> EXPR
3319 * | | | | `--IDENT -> path
3320 * | | | `--RPAREN -> )
3321 * | | `--RPAREN -> )
3322 * | `--RPAREN -> )
3323 * `--SLIST -> {
3324 * `--RCURLY -> }
3325 * }
3326 *
3327 * @see #LPAREN
3328 * @see #RESOURCES
3329 * @see #RESOURCE
3330 * @see #SEMI
3331 * @see #RPAREN
3332 * @see #LITERAL_TRY
3333 */
3334 public static final int RESOURCE_SPECIFICATION =
3335 JavaLanguageLexer.RESOURCE_SPECIFICATION;
3336
3337 /**
3338 * A list of resources in the Java 7 try-with-resources construct.
3339 * This is a child of RESOURCE_SPECIFICATION.
3340 *
3341 * <p>For example:</p>
3342 * {@snippet :
3343 * try (FileReader fr = new FileReader("config.xml")) {
3344 * } finally {}
3345 * }
3346 *
3347 * <p>parses as:</p>
3348 * {@snippet :
3349 * LITERAL_TRY -> try
3350 * |--RESOURCE_SPECIFICATION -> RESOURCE_SPECIFICATION
3351 * | |--LPAREN -> (
3352 * | |--RESOURCES -> RESOURCES
3353 * | | `--RESOURCE -> RESOURCE
3354 * | | |--MODIFIERS -> MODIFIERS
3355 * | | |--TYPE -> TYPE
3356 * | | | `--IDENT -> FileReader
3357 * | | |--IDENT -> fr
3358 * | | `--ASSIGN -> =
3359 * | | `--EXPR -> EXPR
3360 * | | `--LITERAL_NEW -> new
3361 * | | |--IDENT -> FileReader
3362 * | | |--LPAREN -> (
3363 * | | |--ELIST -> ELIST
3364 * | | | `--EXPR -> EXPR
3365 * | | | `--STRING_LITERAL -> "config.xml"
3366 * | | `--RPAREN -> )
3367 * | `--RPAREN -> )
3368 * |--SLIST -> {
3369 * | `--RCURLY -> }
3370 * `--LITERAL_FINALLY -> finally
3371 * `--SLIST -> {
3372 * `--RCURLY -> }
3373 * }
3374 *
3375 * @see #RESOURCE_SPECIFICATION
3376 */
3377 public static final int RESOURCES =
3378 JavaLanguageLexer.RESOURCES;
3379
3380 /**
3381 * A resource in the Java 7 try-with-resources construct.
3382 * This is a child of RESOURCES.
3383 *
3384 * <p>For example:</p>
3385 * {@snippet :
3386 * try (Foo foo = new Foo(); Bar bar = new Bar()) { }
3387 * }
3388 *
3389 * <p>parses as:</p>
3390 * {@snippet :
3391 * LITERAL_TRY -> try
3392 * |--RESOURCE_SPECIFICATION -> RESOURCE_SPECIFICATION
3393 * | |--LPAREN -> (
3394 * | |--RESOURCES -> RESOURCES
3395 * | | |--RESOURCE -> RESOURCE
3396 * | | | |--MODIFIERS -> MODIFIERS
3397 * | | | |--TYPE -> TYPE
3398 * | | | | `--IDENT -> Foo
3399 * | | | |--IDENT -> foo
3400 * | | | `--ASSIGN -> =
3401 * | | | `--EXPR -> EXPR
3402 * | | | `--LITERAL_NEW -> new
3403 * | | | |--IDENT -> Foo
3404 * | | | |--LPAREN -> (
3405 * | | | |--ELIST -> ELIST
3406 * | | | `--RPAREN -> )
3407 * | | |--SEMI -> ;
3408 * | | `--RESOURCE -> RESOURCE
3409 * | | |--MODIFIERS -> MODIFIERS
3410 * | | |--TYPE -> TYPE
3411 * | | | `--IDENT -> Bar
3412 * | | |--IDENT -> bar
3413 * | | `--ASSIGN -> =
3414 * | | `--EXPR -> EXPR
3415 * | | `--LITERAL_NEW -> new
3416 * | | |--IDENT -> Bar
3417 * | | |--LPAREN -> (
3418 * | | |--ELIST -> ELIST
3419 * | | `--RPAREN -> )
3420 * | `--RPAREN -> )
3421 * `--SLIST -> {
3422 * `--RCURLY -> }
3423 * }
3424 *
3425 * @see #RESOURCES
3426 * @see #RESOURCE_SPECIFICATION
3427 */
3428 public static final int RESOURCE =
3429 JavaLanguageLexer.RESOURCE;
3430
3431 /**
3432 * The {@code catch} keyword.
3433 *
3434 * <p>For example:</p>
3435 * {@snippet :
3436 * try {
3437 * FileReader fr = new FileReader("Test.txt");
3438 * } catch (FileNotFoundException e) {
3439 *
3440 * }
3441 * }
3442 *
3443 * <p>parses as:</p>
3444 * {@snippet :
3445 * LITERAL_TRY -> try
3446 * |--SLIST -> {
3447 * | |--VARIABLE_DEF -> VARIABLE_DEF
3448 * | | |--MODIFIERS -> MODIFIERS
3449 * | | |--TYPE -> TYPE
3450 * | | | `--IDENT -> FileReader
3451 * | | |--IDENT -> fr
3452 * | | `--ASSIGN -> =
3453 * | | `--EXPR -> EXPR
3454 * | | `--LITERAL_NEW -> new
3455 * | | |--IDENT -> FileReader
3456 * | | |--LPAREN -> (
3457 * | | |--ELIST -> ELIST
3458 * | | | `--EXPR -> EXPR
3459 * | | | `--STRING_LITERAL -> "Test.txt"
3460 * | | `--RPAREN -> )
3461 * | |--SEMI -> ;
3462 * | `--RCURLY -> }
3463 * `--LITERAL_CATCH -> catch
3464 * |--LPAREN -> (
3465 * |--PARAMETER_DEF -> PARAMETER_DEF
3466 * | |--MODIFIERS -> MODIFIERS
3467 * | |--TYPE -> TYPE
3468 * | | `--IDENT -> FileNotFoundException
3469 * | `--IDENT -> e
3470 * |--RPAREN -> )
3471 * `--SLIST -> {
3472 * `--RCURLY -> }
3473 * }
3474 *
3475 * @see #LPAREN
3476 * @see #PARAMETER_DEF
3477 * @see #RPAREN
3478 * @see #SLIST
3479 * @see #LITERAL_TRY
3480 */
3481 public static final int LITERAL_CATCH =
3482 JavaLanguageLexer.LITERAL_CATCH;
3483
3484 /**
3485 * The {@code finally} keyword.
3486 *
3487 * <p>For example:</p>
3488 * {@snippet :
3489 * try {} finally {}
3490 * }
3491 *
3492 * <p>parses as:</p>
3493 * {@snippet :
3494 * LITERAL_TRY -> try
3495 * |--SLIST -> {
3496 * | `--RCURLY -> }
3497 * `--LITERAL_FINALLY -> finally
3498 * `--SLIST -> {
3499 * `--RCURLY -> }
3500 * }
3501 *
3502 * @see #SLIST
3503 * @see #LITERAL_TRY
3504 */
3505 public static final int LITERAL_FINALLY =
3506 JavaLanguageLexer.LITERAL_FINALLY;
3507
3508 /**
3509 * The {@code +=} (addition assignment) operator.
3510 *
3511 * <p>For example:</p>
3512 * {@snippet :
3513 * a += b;
3514 * }
3515 *
3516 * <p>parses as:</p>
3517 * {@snippet :
3518 * |--EXPR -> EXPR
3519 * | `--PLUS_ASSIGN -> +=
3520 * | |--IDENT -> a
3521 * | `--IDENT -> b
3522 * |--SEMI -> ;
3523 * }
3524 *
3525 * @see <a
3526 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.26.2">Java
3527 * Language Specification, §15.26.2</a>
3528 * @see #EXPR
3529 */
3530 public static final int PLUS_ASSIGN = JavaLanguageLexer.PLUS_ASSIGN;
3531 /**
3532 * The {@code -=} (subtraction assignment) operator.
3533 *
3534 * <p>For example:</p>
3535 * {@snippet :
3536 * a -= b;
3537 * }
3538 *
3539 * <p>parses as:</p>
3540 * {@snippet :
3541 * |--EXPR -> EXPR
3542 * | `--MINUS_ASSIGN -> -=
3543 * | |--IDENT -> a
3544 * | `--IDENT -> b
3545 * |--SEMI -> ;
3546 * }
3547 *
3548 * @see <a
3549 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.26.2">Java
3550 * Language Specification, §15.26.2</a>
3551 * @see #EXPR
3552 */
3553 public static final int MINUS_ASSIGN =
3554 JavaLanguageLexer.MINUS_ASSIGN;
3555
3556 /**
3557 * The {@code *=} (multiplication assignment) operator.
3558 *
3559 * <p>For example:</p>
3560 * {@snippet :
3561 * a *= b;
3562 * }
3563 *
3564 * <p>parses as:</p>
3565 * {@snippet :
3566 * |--EXPR -> EXPR
3567 * | `--STAR_ASSIGN -> *=
3568 * | |--IDENT -> a
3569 * | `--IDENT -> b
3570 * |--SEMI -> ;
3571 * }
3572 *
3573 * @see <a
3574 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.26.2">Java
3575 * Language Specification, §15.26.2</a>
3576 * @see #EXPR
3577 */
3578 public static final int STAR_ASSIGN = JavaLanguageLexer.STAR_ASSIGN;
3579 /**
3580 * The {@code /=} (division assignment) operator.
3581 *
3582 * <p>For example:</p>
3583 * {@snippet :
3584 * a /= b;
3585 * }
3586 *
3587 * <p>parses as:</p>
3588 * {@snippet :
3589 * |--EXPR -> EXPR
3590 * | `--DIV_ASSIGN -> /=
3591 * | |--IDENT -> a
3592 * | `--IDENT -> b
3593 * |--SEMI -> ;
3594 * }
3595 *
3596 * @see <a
3597 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.26.2">Java
3598 * Language Specification, §15.26.2</a>
3599 * @see #EXPR
3600 */
3601 public static final int DIV_ASSIGN = JavaLanguageLexer.DIV_ASSIGN;
3602 /**
3603 * The {@code %=} (remainder assignment) operator.
3604 *
3605 * <p>For example: {@code a %= 2;}</p>
3606 *
3607 * <p>parses as:</p>
3608 * {@snippet :
3609 * |--EXPR -> EXPR
3610 * | `--MOD_ASSIGN -> %=
3611 * | |--IDENT -> a
3612 * | `--NUM_INT -> 2
3613 * |--SEMI -> ;
3614 * }
3615 *
3616 * @see <a
3617 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.26.2">Java
3618 * Language Specification, §15.26.2</a>
3619 * @see #EXPR
3620 */
3621 public static final int MOD_ASSIGN = JavaLanguageLexer.MOD_ASSIGN;
3622 /**
3623 * The {@code >>=} (signed right shift assignment)
3624 * operator.
3625 *
3626 * <p>For example:</p>
3627 * {@snippet :
3628 * a >>= b;
3629 * }
3630 *
3631 * <p>parses as:</p>
3632 * {@snippet :
3633 * |--EXPR -> EXPR
3634 * | `--SR_ASSIGN -> >>=
3635 * | |--IDENT -> a
3636 * | `--IDENT -> b
3637 * |--SEMI -> ;
3638 * }
3639 *
3640 * @see <a
3641 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.26.2">Java
3642 * Language Specification, §15.26.2</a>
3643 * @see #EXPR
3644 */
3645 public static final int SR_ASSIGN = JavaLanguageLexer.SR_ASSIGN;
3646 /**
3647 * The {@code >>>=} (unsigned right shift assignment)
3648 * operator.
3649 *
3650 * <p>For example:</p>
3651 * {@snippet :
3652 * a >>>= b;
3653 * }
3654 *
3655 * <p>parses as:</p>
3656 * {@snippet :
3657 * |--EXPR -> EXPR
3658 * | `--BSR_ASSIGN -> >>>=
3659 * | |--IDENT -> a
3660 * | `--IDENT -> b
3661 * |--SEMI -> ;
3662 * }
3663 *
3664 * @see <a
3665 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.26.2">Java
3666 * Language Specification, §15.26.2</a>
3667 * @see #EXPR
3668 */
3669 public static final int BSR_ASSIGN = JavaLanguageLexer.BSR_ASSIGN;
3670 /**
3671 * The {@code <<=} (left shift assignment) operator.
3672 *
3673 * @see <a
3674 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.26.2">Java
3675 * Language Specification, §15.26.2</a>
3676 * @see #EXPR
3677 */
3678 public static final int SL_ASSIGN = JavaLanguageLexer.SL_ASSIGN;
3679 /**
3680 * The {@code &=} (bitwise AND assignment) operator.
3681 *
3682 * <p>For example:</p>
3683 * {@snippet :
3684 * a &= b;
3685 * }
3686 *
3687 * <p>parses as:</p>
3688 * {@snippet :
3689 * |--EXPR -> EXPR
3690 * | `--BAND_ASSIGN -> &=
3691 * | |--IDENT -> a
3692 * | `--IDENT -> b
3693 * |--SEMI -> ;
3694 * }
3695 *
3696 * @see <a
3697 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.26.2">Java
3698 * Language Specification, §15.26.2</a>
3699 * @see #EXPR
3700 */
3701 public static final int BAND_ASSIGN = JavaLanguageLexer.BAND_ASSIGN;
3702 /**
3703 * The {@code ^=} (bitwise exclusive OR assignment) operator.
3704 *
3705 * @see <a
3706 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.26.2">Java
3707 * Language Specification, §15.26.2</a>
3708 * @see #EXPR
3709 */
3710 public static final int BXOR_ASSIGN = JavaLanguageLexer.BXOR_ASSIGN;
3711 /**
3712 * The {@code |=} (bitwise OR assignment) operator.
3713 *
3714 * <p>For example:</p>
3715 * {@snippet :
3716 * a |= b;
3717 * }
3718 *
3719 * <p>parses as:</p>
3720 * {@snippet :
3721 * |--EXPR -> EXPR
3722 * | `--BOR_ASSIGN -> |=
3723 * | |--IDENT -> a
3724 * | `--IDENT -> b
3725 * |--SEMI -> ;
3726 * }
3727 *
3728 * @see <a
3729 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.26.2">Java
3730 * Language Specification, §15.26.2</a>
3731 * @see #EXPR
3732 */
3733 public static final int BOR_ASSIGN = JavaLanguageLexer.BOR_ASSIGN;
3734 /**
3735 * The {@code ?} (conditional) operator. Technically,
3736 * the colon is also part of this operator, but it appears as a
3737 * separate token.
3738 *
3739 * <p>For example:</p>
3740 * {@snippet :
3741 * String variable=(quantity==1)?"true":"false";
3742 * }
3743 *
3744 * <p>parses as:</p>
3745 * {@snippet :
3746 * |--VARIABLE_DEF -> VARIABLE_DEF
3747 * | |--MODIFIERS -> MODIFIERS
3748 * | |--TYPE -> TYPE
3749 * | | `--IDENT -> String
3750 * | |--IDENT -> variable
3751 * | `--ASSIGN -> =
3752 * | `--EXPR -> EXPR
3753 * | `--QUESTION -> ?
3754 * | |--LPAREN -> (
3755 * | |--EQUAL -> ==
3756 * | | |--IDENT -> quantity
3757 * | | `--NUM_INT -> 1
3758 * | |--RPAREN -> )
3759 * | |--STRING_LITERAL -> "true"
3760 * | |--COLON -> :
3761 * | `--STRING_LITERAL -> "false"
3762 * |--SEMI -> ;
3763 * }
3764 *
3765 * @see <a
3766 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.25">Java
3767 * Language Specification, §15.25</a>
3768 * @see #EXPR
3769 * @see #COLON
3770 */
3771 public static final int QUESTION = JavaLanguageLexer.QUESTION;
3772 /**
3773 * The {@code ||} (conditional OR) operator.
3774 *
3775 * <p>For example:</p>
3776 * {@snippet :
3777 * if (a || b) {
3778 * }
3779 * }
3780 *
3781 * <p>
3782 * parses as:
3783 * </p>
3784 * {@snippet :
3785 * LITERAL_IF -> if
3786 * |--LPAREN -> (
3787 * |--EXPR -> EXPR
3788 * | `--LOR -> ||
3789 * | |--IDENT -> a
3790 * | `--IDENT -> b
3791 * |--RPAREN -> )
3792 * |--SLIST -> {
3793 * | |--RCURLY -> }
3794 * }
3795 *
3796 * @see <a
3797 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.24">Java
3798 * Language Specification, §15.24</a>
3799 * @see #EXPR
3800 */
3801 public static final int LOR = JavaLanguageLexer.LOR;
3802 /**
3803 * The {@code &&} (conditional AND) operator.
3804 *
3805 * <p>For example:</p>
3806 * {@snippet :
3807 * if (a && b) {
3808 * }
3809 * }
3810 *
3811 * <p>parses as:</p>
3812 * {@snippet :
3813 * LITERAL_IF -> if
3814 * |--LPAREN -> (
3815 * |--EXPR -> EXPR
3816 * | `--LAND -> &&
3817 * | |--IDENT -> a
3818 * | `--IDENT -> b
3819 * |--RPAREN -> )
3820 * |--SLIST -> {
3821 * | |--RCURLY -> }
3822 * }
3823 *
3824 * @see <a
3825 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.23">Java
3826 * Language Specification, §15.23</a>
3827 * @see #EXPR
3828 */
3829 public static final int LAND = JavaLanguageLexer.LAND;
3830 /**
3831 * The {@code |} (bitwise OR) operator.
3832 *
3833 * <p>For example:</p>
3834 * {@snippet :
3835 * a = a | b;
3836 * }
3837 *
3838 * <p>parses as:</p>
3839 * {@snippet :
3840 * |--EXPR -> EXPR
3841 * | `--ASSIGN -> =
3842 * | |--IDENT -> a
3843 * | `--BOR -> |
3844 * | |--IDENT -> a
3845 * | `--IDENT -> b
3846 * |--SEMI -> ;
3847 * }
3848 *
3849 * @see <a
3850 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.22.1">Java
3851 * Language Specification, §15.22.1</a>
3852 * @see #EXPR
3853 */
3854 public static final int BOR = JavaLanguageLexer.BOR;
3855 /**
3856 * The {@code ^} (bitwise exclusive OR) operator.
3857 *
3858 * @see <a
3859 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.22.1">Java
3860 * Language Specification, §15.22.1</a>
3861 * @see #EXPR
3862 */
3863 public static final int BXOR = JavaLanguageLexer.BXOR;
3864 /**
3865 * The {@code &} (bitwise AND) operator.
3866 *
3867 * <p>For example:</p>
3868 * {@snippet :
3869 * c = a & b;
3870 * }
3871 *
3872 * <p>parses as:</p>
3873 * {@snippet :
3874 * |--EXPR -> EXPR
3875 * | `--ASSIGN -> =
3876 * | |--IDENT -> c
3877 * | `--BAND -> &
3878 * | |--IDENT -> a
3879 * | `--IDENT -> b
3880 * |--SEMI -> ;
3881 * }
3882 *
3883 * @see <a
3884 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.22.1">Java
3885 * Language Specification, §15.22.1</a>
3886 * @see #EXPR
3887 */
3888 public static final int BAND = JavaLanguageLexer.BAND;
3889 /**
3890 * The {@code !=} (not equal) operator.
3891 *
3892 * <p>For example:</p>
3893 * {@snippet :
3894 * a != b;
3895 * }
3896 *
3897 * <p>parses as:</p>
3898 * {@snippet :
3899 * |--EXPR -> EXPR
3900 * | `--NOT_EQUAL -> !=
3901 * | |--IDENT -> a
3902 * | `--IDENT -> b
3903 * `--SEMI -> ;
3904 * }
3905 *
3906 * @see #EXPR
3907 */
3908 public static final int NOT_EQUAL = JavaLanguageLexer.NOT_EQUAL;
3909 /**
3910 * The {@code ==} (equal) operator.
3911 *
3912 * <p>For example:</p>
3913 * {@snippet :
3914 * return a == b;
3915 * }
3916 *
3917 * <p>parses as:</p>
3918 * {@snippet :
3919 * |--EXPR -> EXPR
3920 * | `--EQUAL -> ==
3921 * | |--IDENT -> a
3922 * | `--IDENT -> b
3923 * `--SEMI -> ;
3924 * }
3925 *
3926 * @see #EXPR
3927 */
3928 public static final int EQUAL = JavaLanguageLexer.EQUAL;
3929 /**
3930 * The {@code <} (less than) operator.
3931 *
3932 * <p>For example:</p>
3933 * {@snippet :
3934 * c = a < b;
3935 * }
3936 *
3937 * <p>parses as:</p>
3938 * {@snippet :
3939 * |--EXPR -> EXPR
3940 * | `--ASSIGN -> =
3941 * | |--IDENT -> c
3942 * | `--LT -> <
3943 * | |--IDENT -> a
3944 * | `--IDENT -> b
3945 * |--SEMI -> ;
3946 * }
3947 *
3948 * @see #EXPR
3949 */
3950 public static final int LT = JavaLanguageLexer.LT;
3951 /**
3952 * The {@code >} (greater than) operator.
3953 *
3954 * <p>For example:</p>
3955 * {@snippet :
3956 * c = a > b;
3957 * }
3958 *
3959 * <p>parses as:</p>
3960 * {@snippet :
3961 * |--EXPR -> EXPR
3962 * | `--ASSIGN -> =
3963 * | |--IDENT -> c
3964 * | `--BAND -> >
3965 * | |--IDENT -> a
3966 * | `--IDENT -> b
3967 * |--SEMI -> ;
3968 * }
3969 *
3970 * @see #EXPR
3971 */
3972 public static final int GT = JavaLanguageLexer.GT;
3973 /**
3974 * The {@code <=} (less than or equal) operator.
3975 *
3976 * <p>For example:</p>
3977 * {@snippet :
3978 * c = a <= b;
3979 * }
3980 *
3981 * <p>parses as:</p>
3982 * {@snippet :
3983 * |--EXPR -> EXPR
3984 * | `--ASSIGN -> =
3985 * | |--IDENT -> c
3986 * | `--LE -> <=
3987 * | |--IDENT -> a
3988 * | `--IDENT -> b
3989 * |--SEMI -> ;
3990 * }
3991 *
3992 * @see #EXPR
3993 */
3994 public static final int LE = JavaLanguageLexer.LE;
3995 /**
3996 * The {@code >=} (greater than or equal) operator.
3997 *
3998 * <p>For example:</p>
3999 * {@snippet :
4000 * boolean b = a >= 3;
4001 * }
4002 *
4003 * <p>parses as:</p>
4004 * {@snippet :
4005 * VARIABLE_DEF -> VARIABLE_DEF
4006 * |--MODIFIERS -> MODIFIERS
4007 * |--TYPE -> TYPE
4008 * | `--LITERAL_BOOLEAN -> boolean
4009 * |--IDENT -> b
4010 * `--ASSIGN -> =
4011 * `--EXPR -> EXPR
4012 * `--GE -> >=
4013 * |--IDENT -> a
4014 * `--NUM_INT -> 3
4015 * }
4016 *
4017 * @see #EXPR
4018 */
4019 public static final int GE = JavaLanguageLexer.GE;
4020 /**
4021 * The {@code instanceof} operator. The first child is an
4022 * object reference or something that evaluates to an object
4023 * reference. The second child is a reference type or pattern.
4024 *
4025 * <p>For example:</p>
4026 * {@snippet :
4027 * boolean isBuilderReferenceType = text instanceof StringBuilder; // reference type
4028 * boolean isBuilderPatternWithPattern =
4029 * text instanceof StringBuilder s; // type pattern, no `PATTERN_DEF`
4030 * }
4031 *
4032 * <p>parses as:</p>
4033 * {@snippet :
4034 * |--VARIABLE_DEF -> VARIABLE_DEF
4035 * | |--MODIFIERS -> MODIFIERS
4036 * | |--TYPE -> TYPE
4037 * | | `--LITERAL_BOOLEAN -> boolean
4038 * | |--IDENT -> isBuilderReferenceType
4039 * | `--ASSIGN -> =
4040 * | `--EXPR -> EXPR
4041 * | `--LITERAL_INSTANCEOF -> instanceof
4042 * | |--IDENT -> text
4043 * | `--TYPE -> TYPE
4044 * | `--IDENT -> StringBuilder
4045 * |--SEMI -> ;
4046 * |--VARIABLE_DEF -> VARIABLE_DEF
4047 * | |--MODIFIERS -> MODIFIERS
4048 * | |--TYPE -> TYPE
4049 * | | `--LITERAL_BOOLEAN -> boolean
4050 * | |--IDENT -> isBuilderPatternWithPattern
4051 * | `--ASSIGN -> =
4052 * | `--EXPR -> EXPR
4053 * | `--LITERAL_INSTANCEOF -> instanceof
4054 * | |--IDENT -> text
4055 * | `--PATTERN_VARIABLE_DEF -> PATTERN_VARIABLE_DEF
4056 * | |--MODIFIERS -> MODIFIERS
4057 * | |--TYPE -> TYPE
4058 * | | `--IDENT -> StringBuilder
4059 * | `--IDENT -> s
4060 * |--SEMI -> ;
4061 * }
4062 *
4063 * @see <a
4064 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.20.2">Java
4065 * Language Specification, §15.20.2</a>
4066 * @see #EXPR
4067 * @see #METHOD_CALL
4068 * @see #IDENT
4069 * @see #DOT
4070 * @see #TYPE
4071 * @see #PATTERN_VARIABLE_DEF
4072 * @see FullIdent
4073 */
4074 public static final int LITERAL_INSTANCEOF =
4075 JavaLanguageLexer.LITERAL_INSTANCEOF;
4076
4077 /**
4078 * The {@code <<} (shift left) operator.
4079 *
4080 * <p>For example:</p>
4081 * {@snippet :
4082 * a = a << b;
4083 * }
4084 *
4085 * <p>parses as:</p>
4086 * {@snippet :
4087 * |--EXPR -> EXPR
4088 * | `--ASSIGN -> =
4089 * | |--IDENT -> a
4090 * | `--SR -> <<
4091 * | |--IDENT -> a
4092 * | `--IDENT -> b
4093 * |--SEMI -> ;
4094 * }
4095 *
4096 * @see <a
4097 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.19">Java
4098 * Language Specification, §15.19</a>
4099 * @see #EXPR
4100 */
4101 public static final int SL = JavaLanguageLexer.SL;
4102 /**
4103 * The {@code >>} (signed shift right) operator.
4104 *
4105 * <p>For example:</p>
4106 * {@snippet :
4107 * a = a >> b;
4108 * }
4109 *
4110 * <p>parses as:</p>
4111 * {@snippet :
4112 * |--EXPR -> EXPR
4113 * | `--ASSIGN -> =
4114 * | |--IDENT -> a
4115 * | `--SR -> >>
4116 * | |--IDENT -> a
4117 * | `--IDENT -> b
4118 * |--SEMI -> ;
4119 * }
4120 *
4121 * @see <a
4122 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.19">Java
4123 * Language Specification, §15.19</a>
4124 * @see #EXPR
4125 */
4126 public static final int SR = JavaLanguageLexer.SR;
4127 /**
4128 * The {@code >>>} (unsigned shift right) operator.
4129 *
4130 * <p>For example:</p>
4131 * {@snippet :
4132 * a >>> b;
4133 * }
4134 *
4135 * <p>parses as:</p>
4136 * {@snippet :
4137 * |--EXPR -> EXPR
4138 * | `--BSR -> >>>
4139 * | |--IDENT -> a
4140 * | `--IDENT -> b
4141 * |--SEMI -> ;
4142 * }
4143 *
4144 * @see <a
4145 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.19">Java
4146 * Language Specification, §15.19</a>
4147 * @see #EXPR
4148 */
4149 public static final int BSR = JavaLanguageLexer.BSR;
4150 /**
4151 * The {@code +} (addition) operator.
4152 *
4153 * <p>For example:</p>
4154 * {@snippet :
4155 * c = a + b;
4156 * }
4157 *
4158 * <p>parses as:</p>
4159 * {@snippet :
4160 * |--EXPR -> EXPR
4161 * | `--ASSIGN -> =
4162 * | |--IDENT -> c
4163 * | `--PLUS -> +
4164 * | |--IDENT -> a
4165 * | `--IDENT -> b
4166 * |--SEMI -> ;
4167 * }
4168 *
4169 * @see <a
4170 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.18">Java
4171 * Language Specification, §15.18</a>
4172 * @see #EXPR
4173 */
4174 public static final int PLUS = JavaLanguageLexer.PLUS;
4175 /**
4176 * The {@code -} (subtraction) operator.
4177 *
4178 * <p>For example:</p>
4179 * {@snippet :
4180 * c = a - b;
4181 * }
4182 *
4183 * <p>parses as:</p>
4184 * {@snippet :
4185 * |--EXPR -> EXPR
4186 * | `--ASSIGN -> =
4187 * | |--IDENT -> c
4188 * | `--MINUS -> -
4189 * | |--IDENT -> a
4190 * | `--IDENT -> b
4191 * |--SEMI -> ;
4192 * }
4193 *
4194 * @see <a
4195 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.18">Java
4196 * Language Specification, §15.18</a>
4197 * @see #EXPR
4198 */
4199 public static final int MINUS = JavaLanguageLexer.MINUS;
4200 /**
4201 * The {@code /} (division) operator.
4202 *
4203 * <p>For example:</p>
4204 * {@snippet :
4205 * a = 4 / 2;
4206 * }
4207 *
4208 * <p>parses as:</p>
4209 * {@snippet :
4210 * |--EXPR -> EXPR
4211 * | `--ASSIGN -> =
4212 * | |--IDENT -> a
4213 * | `--DIV -> /
4214 * | |--NUM_INT -> 4
4215 * | `--NUM_INT -> 2
4216 * |--SEMI -> ;
4217 * }
4218 *
4219 * @see <a
4220 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.17.2">Java
4221 * Language Specification, §15.17.2</a>
4222 * @see #EXPR
4223 */
4224 public static final int DIV = JavaLanguageLexer.DIV;
4225 /**
4226 * The {@code %} (remainder) operator.
4227 *
4228 * <p>For example:</p>
4229 * {@snippet :
4230 * c = a % b;
4231 * }
4232 *
4233 * <p>parses as:</p>
4234 * {@snippet :
4235 * EXPR -> EXPR
4236 * `--ASSIGN -> =
4237 * |--IDENT -> c
4238 * `--MOD -> %
4239 * |--IDENT -> a
4240 * `--IDENT -> b
4241 * SEMI -> ;
4242 * }
4243 *
4244 * @see <a
4245 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.17.3">Java
4246 * Language Specification, §15.17.3</a>
4247 * @see #EXPR
4248 */
4249 public static final int MOD = JavaLanguageLexer.MOD;
4250 /**
4251 * The {@code ++} (prefix increment) operator.
4252 *
4253 * <p>For example:</p>
4254 * {@snippet :
4255 * ++a;
4256 * }
4257 *
4258 * <p>parses as:</p>
4259 * {@snippet :
4260 * |--EXPR -> EXPR
4261 * | `--INC -> ++
4262 * | `--IDENT -> a
4263 * |--SEMI -> ;
4264 * }
4265 *
4266 * @see <a
4267 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.15.1">Java
4268 * Language Specification, §15.15.1</a>
4269 * @see #EXPR
4270 * @see #POST_INC
4271 */
4272 public static final int INC = JavaLanguageLexer.INC;
4273 /**
4274 * The {@code --} (prefix decrement) operator.
4275 *
4276 * <p>For example:</p>
4277 * {@snippet :
4278 * --a;
4279 * }
4280 *
4281 * <p>parses as:</p>
4282 * {@snippet :
4283 * |--EXPR -> EXPR
4284 * | `--DEC -> --
4285 * | `--IDENT -> a
4286 * |--SEMI -> ;
4287 * }
4288 *
4289 * @see <a
4290 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.15.2">Java
4291 * Language Specification, §15.15.2</a>
4292 * @see #EXPR
4293 * @see #POST_DEC
4294 */
4295 public static final int DEC = JavaLanguageLexer.DEC;
4296 /**
4297 * The {@code ~} (bitwise complement) operator.
4298 *
4299 * <p>For example:</p>
4300 * {@snippet :
4301 * a = ~ a;
4302 * }
4303 *
4304 * <p>parses as:</p>
4305 * {@snippet :
4306 * |--EXPR -> EXPR
4307 * | `--ASSIGN -> =
4308 * | |--IDENT -> a
4309 * | `--BNOT -> ~
4310 * | `--IDENT -> a
4311 * |--SEMI -> ;
4312 * }
4313 *
4314 * @see <a
4315 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.15.5">Java
4316 * Language Specification, §15.15.5</a>
4317 * @see #EXPR
4318 */
4319 public static final int BNOT = JavaLanguageLexer.BNOT;
4320 /**
4321 * The {@code !} (logical complement) operator.
4322 *
4323 * <p>For example:</p>
4324 * {@snippet :
4325 * c = ! a;
4326 * }
4327 *
4328 * <p>parses as:</p>
4329 * {@snippet :
4330 * |--EXPR -> EXPR
4331 * | `--ASSIGN -> =
4332 * | |--IDENT -> c
4333 * | `--LNOT -> !
4334 * | `--IDENT -> a
4335 * |--SEMI -> ;
4336 * }
4337 *
4338 * @see <a
4339 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.15.6">Java
4340 * Language Specification, §15.15.6</a>
4341 * @see #EXPR
4342 */
4343 public static final int LNOT = JavaLanguageLexer.LNOT;
4344 /**
4345 * The {@code true} keyword.
4346 *
4347 * <p>For example:</p>
4348 * {@snippet :
4349 * boolean a = true;
4350 * }
4351 *
4352 * <p>parses as:</p>
4353 * {@snippet :
4354 * |--VARIABLE_DEF -> VARIABLE_DEF
4355 * | |--MODIFIERS -> MODIFIERS
4356 * | |--TYPE -> TYPE
4357 * | | `--LITERAL_BOOLEAN -> boolean
4358 * | |--IDENT -> a
4359 * | `--ASSIGN -> =
4360 * | `--EXPR -> EXPR
4361 * | `--LITERAL_TRUE -> true
4362 * |--SEMI -> ;
4363 * }
4364 *
4365 * @see <a
4366 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-3.10.3">Java
4367 * Language Specification, §3.10.3</a>
4368 * @see #EXPR
4369 * @see #LITERAL_FALSE
4370 */
4371 public static final int LITERAL_TRUE =
4372 JavaLanguageLexer.LITERAL_TRUE;
4373
4374 /**
4375 * The {@code false} keyword.
4376 *
4377 * <p>For example:</p>
4378 * {@snippet :
4379 * boolean a = false;
4380 * }
4381 *
4382 * <p>parses as:</p>
4383 * {@snippet :
4384 * VARIABLE_DEF -> VARIABLE_DEF
4385 * |--MODIFIERS -> MODIFIERS
4386 * |--TYPE -> TYPE
4387 * | `--LITERAL_BOOLEAN -> boolean
4388 * |--IDENT -> a
4389 * |--ASSIGN -> =
4390 * | `--EXPR -> EXPR
4391 * | `--LITERAL_FALSE -> false
4392 * `--SEMI -> ;
4393 * }
4394 *
4395 * @see <a
4396 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-3.10.3">Java
4397 * Language Specification, §3.10.3</a>
4398 * @see #EXPR
4399 * @see #LITERAL_TRUE
4400 */
4401 public static final int LITERAL_FALSE =
4402 JavaLanguageLexer.LITERAL_FALSE;
4403
4404 /**
4405 * The {@code null} keyword.
4406 *
4407 * <p>For example:</p>
4408 * {@snippet :
4409 * String s = null;
4410 * }
4411 *
4412 * <p>parses as:</p>
4413 * {@snippet :
4414 * VARIABLE_DEF -> VARIABLE_DEF
4415 * |--MODIFIERS -> MODIFIERS
4416 * |--TYPE -> TYPE
4417 * | `--IDENT -> String
4418 * |--IDENT -> s
4419 * |--ASSIGN -> =
4420 * | `--EXPR -> EXPR
4421 * | `--LITERAL_NULL -> null
4422 * `--SEMI -> ;
4423 * }
4424 *
4425 * @see <a
4426 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-3.10.7">Java
4427 * Language Specification, §3.10.7</a>
4428 * @see #EXPR
4429 */
4430 public static final int LITERAL_NULL =
4431 JavaLanguageLexer.LITERAL_NULL;
4432
4433 /**
4434 * The {@code new} keyword. This element is used to define
4435 * new instances of objects, new arrays, and new anonymous inner
4436 * classes.
4437 *
4438 * <p>For example:</p>
4439 *
4440 * {@snippet :
4441 * List<String> l = new ArrayList<String>();
4442 * }
4443 *
4444 * <p>parses as:</p>
4445 * {@snippet :
4446 * VARIABLE_DEF -> VARIABLE_DEF
4447 * |--MODIFIERS -> MODIFIERS
4448 * |--TYPE -> TYPE
4449 * | |--IDENT -> List
4450 * | `--TYPE_ARGUMENTS -> TYPE_ARGUMENTS
4451 * | |--GENERIC_START -> <
4452 * | |--TYPE_ARGUMENT -> TYPE_ARGUMENT
4453 * | | `--IDENT -> String
4454 * | `--GENERIC_END -> >
4455 * |--IDENT -> l
4456 * |--ASSIGN -> =
4457 * | `--EXPR -> EXPR
4458 * | `--LITERAL_NEW -> new
4459 * | |--IDENT -> ArrayList
4460 * | |--TYPE_ARGUMENTS -> TYPE_ARGUMENTS
4461 * | | |--GENERIC_START -> <
4462 * | | |--TYPE_ARGUMENT -> TYPE_ARGUMENT
4463 * | | | `--IDENT -> String
4464 * | | `--GENERIC_END -> >
4465 * | |--LPAREN -> (
4466 * | |--ELIST -> ELIST
4467 * | `--RPAREN -> )
4468 * `--SEMI -> ;
4469 * }
4470 *
4471 * <p>For example:</p>
4472 * {@snippet :
4473 * String[] strings = new String[3];
4474 * }
4475 *
4476 * <p>parses as:</p>
4477 * {@snippet :
4478 * VARIABLE_DEF -> VARIABLE_DEF
4479 * |--MODIFIERS -> MODIFIERS
4480 * |--TYPE -> TYPE
4481 * | |--IDENT -> String
4482 * | `--ARRAY_DECLARATOR -> [
4483 * | `--RBRACK -> ]
4484 * |--IDENT -> strings
4485 * |--ASSIGN -> =
4486 * | `--EXPR -> EXPR
4487 * | `--LITERAL_NEW -> new
4488 * | |--IDENT -> String
4489 * | `--ARRAY_DECLARATOR -> [
4490 * | |--EXPR -> EXPR
4491 * | | `--NUM_INT -> 3
4492 * | `--RBRACK -> ]
4493 * `--SEMI -> ;
4494 * }
4495 *
4496 * <p>For example:</p>
4497 * {@snippet :
4498 * Supplier<Integer> s = new Supplier<>() {
4499 * @Override
4500 * public Integer get() {
4501 * return 42;
4502 * }
4503 * };
4504 * }
4505 *
4506 * <p>parses as:</p>
4507 * {@snippet :
4508 * VARIABLE_DEF -> VARIABLE_DEF
4509 * |--MODIFIERS -> MODIFIERS
4510 * |--TYPE -> TYPE
4511 * | |--IDENT -> Supplier
4512 * | `--TYPE_ARGUMENTS -> TYPE_ARGUMENTS
4513 * | |--GENERIC_START -> <
4514 * | |--TYPE_ARGUMENT -> TYPE_ARGUMENT
4515 * | | `--IDENT -> Integer
4516 * | `--GENERIC_END -> >
4517 * |--IDENT -> s
4518 * |--ASSIGN -> =
4519 * | `--EXPR -> EXPR
4520 * | `--LITERAL_NEW -> new
4521 * | |--IDENT -> Supplier
4522 * | |--TYPE_ARGUMENTS -> TYPE_ARGUMENTS
4523 * | | |--GENERIC_START -> <
4524 * | | `--GENERIC_END -> >
4525 * | |--LPAREN -> (
4526 * | |--ELIST -> ELIST
4527 * | |--RPAREN -> )
4528 * | `--OBJBLOCK -> OBJBLOCK
4529 * | |--LCURLY -> {
4530 * | |--METHOD_DEF -> METHOD_DEF
4531 * | | |--MODIFIERS -> MODIFIERS
4532 * | | | |--ANNOTATION -> ANNOTATION
4533 * | | | | |--AT -> @
4534 * | | | | `--IDENT -> Override
4535 * | | | `--LITERAL_PUBLIC -> public
4536 * | | |--TYPE -> TYPE
4537 * | | | `--IDENT -> Integer
4538 * | | |--IDENT -> get
4539 * | | |--LPAREN -> (
4540 * | | |--PARAMETERS -> PARAMETERS
4541 * | | |--RPAREN -> )
4542 * | | `--SLIST -> {
4543 * | | |--LITERAL_RETURN -> return
4544 * | | | |--EXPR -> EXPR
4545 * | | | | `--NUM_INT -> 42
4546 * | | | `--SEMI -> ;
4547 * | | `--RCURLY -> }
4548 * | `--RCURLY -> }
4549 * `--SEMI -> ;
4550 * }
4551 *
4552 * @see #IDENT
4553 * @see #DOT
4554 * @see #LPAREN
4555 * @see #ELIST
4556 * @see #RPAREN
4557 * @see #OBJBLOCK
4558 * @see #ARRAY_INIT
4559 * @see FullIdent
4560 */
4561 public static final int LITERAL_NEW = JavaLanguageLexer.LITERAL_NEW;
4562 /**
4563 * An integer literal. These may be specified in decimal,
4564 * hexadecimal, or octal form.
4565 *
4566 * <p>For example:</p>
4567 * {@snippet :
4568 * a = 3;
4569 * }
4570 *
4571 * <p>parses as:</p>
4572 * {@snippet :
4573 * |--EXPR -> EXPR
4574 * | `--ASSIGN -> =
4575 * | |--IDENT -> a
4576 * | `--NUM_INT -> 3
4577 * |--SEMI -> ;
4578 * }
4579 *
4580 * @see <a
4581 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-3.10.1">Java
4582 * Language Specification, §3.10.1</a>
4583 * @see #EXPR
4584 * @see #NUM_LONG
4585 */
4586 public static final int NUM_INT = JavaLanguageLexer.NUM_INT;
4587 /**
4588 * A character literal. This is a (possibly escaped) character
4589 * enclosed in single quotes.
4590 *
4591 * <p>For example:</p>
4592 * {@snippet :
4593 * return 'a';
4594 * }
4595 *
4596 * <p>parses as:</p>
4597 * {@snippet :
4598 * --LITERAL_RETURN -> return
4599 * |--EXPR -> EXPR
4600 * | `--CHAR_LITERAL -> 'a'
4601 * `--SEMI -> ;
4602 * }
4603 *
4604 * @see <a
4605 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-3.10.4">Java
4606 * Language Specification, §3.10.4</a>
4607 * @see #EXPR
4608 */
4609 public static final int CHAR_LITERAL =
4610 JavaLanguageLexer.CHAR_LITERAL;
4611
4612 /**
4613 * A string literal. This is a sequence of (possibly escaped)
4614 * characters enclosed in double quotes.
4615 *
4616 * <p>For example: {@code String str = "StringLiteral";}</p>
4617 *
4618 * <p>parses as:</p>
4619 * {@snippet :
4620 * |--VARIABLE_DEF -> VARIABLE_DEF
4621 * | |--MODIFIERS -> MODIFIERS
4622 * | |--TYPE -> TYPE
4623 * | | `--IDENT -> String
4624 * | |--IDENT -> str
4625 * | `--ASSIGN -> =
4626 * | `--EXPR -> EXPR
4627 * | `--STRING_LITERAL -> "StringLiteral"
4628 * |--SEMI -> ;
4629 * }
4630 *
4631 * @see <a
4632 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-3.10.5">Java
4633 * Language Specification, §3.10.5</a>
4634 * @see #EXPR
4635 */
4636 public static final int STRING_LITERAL =
4637 JavaLanguageLexer.STRING_LITERAL;
4638
4639 /**
4640 * A single precision floating point literal. This is a floating
4641 * point number with an {@code F} or {@code f} suffix.
4642 *
4643 * <p>For example:</p>
4644 * {@snippet :
4645 * a = 3.14f;
4646 * }
4647 *
4648 * <p>parses as:</p>
4649 * {@snippet :
4650 * |--EXPR -> EXPR
4651 * | `--ASSIGN -> =
4652 * | |--IDENT -> a
4653 * | `--NUM_FLOAT -> 3.14f
4654 * |--SEMI -> ;
4655 * }
4656 *
4657 * @see <a
4658 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-3.10.2">Java
4659 * Language Specification, §3.10.2</a>
4660 * @see #EXPR
4661 * @see #NUM_DOUBLE
4662 */
4663 public static final int NUM_FLOAT = JavaLanguageLexer.NUM_FLOAT;
4664 /**
4665 * A long integer literal. These are almost the same as integer
4666 * literals, but they have an {@code L} or {@code l}
4667 * (ell) suffix.
4668 *
4669 * <p>For example:</p>
4670 * {@snippet :
4671 * a = 3l;
4672 * }
4673 *
4674 * <p>parses as:</p>
4675 * {@snippet :
4676 * |--EXPR -> EXPR
4677 * | `--ASSIGN -> =
4678 * | |--IDENT -> a
4679 * | `--NUM_LONG -> 3l
4680 * |--SEMI -> ;
4681 * }
4682 *
4683 * @see <a
4684 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-3.10.1">Java
4685 * Language Specification, §3.10.1</a>
4686 * @see #EXPR
4687 * @see #NUM_INT
4688 */
4689 public static final int NUM_LONG = JavaLanguageLexer.NUM_LONG;
4690 /**
4691 * A double precision floating point literal. This is a floating
4692 * point number with an optional {@code D} or {@code d}
4693 * suffix.
4694 *
4695 * <p>For example:</p>
4696 * {@snippet :
4697 * a = 3.14d;
4698 * }
4699 *
4700 * <p>parses as:</p>
4701 * {@snippet :
4702 * |--EXPR -> EXPR
4703 * | `--ASSIGN -> =
4704 * | |--IDENT -> a
4705 * | `--NUM_DOUBLE -> 3.14d
4706 * |--SEMI -> ;
4707 * }
4708 *
4709 * @see <a
4710 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-3.10.2">Java
4711 * Language Specification, §3.10.2</a>
4712 * @see #EXPR
4713 * @see #NUM_FLOAT
4714 */
4715 public static final int NUM_DOUBLE = JavaLanguageLexer.NUM_DOUBLE;
4716
4717 /**
4718 * The {@code assert} keyword. This is only for Java 1.4 and
4719 * later.
4720 *
4721 * <p>For example:</p>
4722 * {@snippet :
4723 * assert(x==4);
4724 * }
4725 *
4726 * <p>parses as:</p>
4727 * {@snippet :
4728 * LITERAL_ASSERT -> assert
4729 * |--EXPR -> EXPR
4730 * | |--LPAREN -> (
4731 * | |--EQUAL -> ==
4732 * | | |--IDENT -> x
4733 * | | `--NUM_INT -> 4
4734 * | `--RPAREN -> )
4735 * `--SEMI -> ;
4736 * }
4737 */
4738 public static final int LITERAL_ASSERT = JavaLanguageLexer.ASSERT;
4739
4740 /**
4741 * A static import declaration. Static import declarations are optional,
4742 * but must appear after the package declaration and before the type
4743 * declaration.
4744 *
4745 * <p>For example:</p>
4746 * {@snippet :
4747 * import static java.io.IOException;
4748 * }
4749 *
4750 * <p>parses as:</p>
4751 * {@snippet :
4752 * STATIC_IMPORT -> import
4753 * |--LITERAL_STATIC -> static
4754 * |--DOT -> .
4755 * | |--DOT -> .
4756 * | | |--IDENT -> java
4757 * | | `--IDENT -> io
4758 * | `--IDENT -> IOException
4759 * `--SEMI -> ;
4760 * }
4761 *
4762 * @see <a href="https://www.jcp.org/en/jsr/detail?id=201">
4763 * JSR201</a>
4764 * @see #LITERAL_STATIC
4765 * @see #DOT
4766 * @see #IDENT
4767 * @see #STAR
4768 * @see #SEMI
4769 * @see FullIdent
4770 */
4771 public static final int STATIC_IMPORT =
4772 JavaLanguageLexer.STATIC_IMPORT;
4773
4774 /**
4775 * An enum declaration. Its notable children are
4776 * enum constant declarations followed by
4777 * any construct that may be expected in a class body.
4778 *
4779 * <p>For example:</p>
4780 * {@snippet :
4781 * public enum MyEnum
4782 * implements Serializable
4783 * {
4784 * FIRST_CONSTANT,
4785 * SECOND_CONSTANT;
4786 *
4787 * public void someMethod()
4788 * {
4789 * }
4790 * }
4791 * }
4792 *
4793 * <p>parses as:</p>
4794 * {@snippet :
4795 * ENUM_DEF -> ENUM_DEF
4796 * |--MODIFIERS -> MODIFIERS
4797 * | `--LITERAL_PUBLIC -> public
4798 * |--ENUM -> enum
4799 * |--IDENT -> MyEnum
4800 * |--IMPLEMENTS_CLAUSE -> implements
4801 * | `--IDENT -> Serializable
4802 * `--OBJBLOCK -> OBJBLOCK
4803 * |--LCURLY -> {
4804 * |--ENUM_CONSTANT_DEF -> ENUM_CONSTANT_DEF
4805 * | |--ANNOTATIONS -> ANNOTATIONS
4806 * | `--IDENT -> FIRST_CONSTANT
4807 * |--COMMA -> ,
4808 * |--ENUM_CONSTANT_DEF -> ENUM_CONSTANT_DEF
4809 * | |--ANNOTATIONS -> ANNOTATIONS
4810 * | `--IDENT -> SECOND_CONSTANT
4811 * |--SEMI -> ;
4812 * |--METHOD_DEF -> METHOD_DEF
4813 * | |--MODIFIERS -> MODIFIERS
4814 * | | `--LITERAL_PUBLIC -> public
4815 * | |--TYPE -> TYPE
4816 * | | `--LITERAL_VOID -> void
4817 * | |--IDENT -> someMethod
4818 * | |--LPAREN -> (
4819 * | |--PARAMETERS -> PARAMETERS
4820 * | |--RPAREN -> )
4821 * | `--SLIST -> {
4822 * | `--RCURLY -> }
4823 * `--RCURLY -> }
4824 * }
4825 *
4826 * @see <a href="https://www.jcp.org/en/jsr/detail?id=201">
4827 * JSR201</a>
4828 * @see #MODIFIERS
4829 * @see #ENUM
4830 * @see #IDENT
4831 * @see #EXTENDS_CLAUSE
4832 * @see #IMPLEMENTS_CLAUSE
4833 * @see #OBJBLOCK
4834 * @see #LITERAL_NEW
4835 * @see #ENUM_CONSTANT_DEF
4836 */
4837 public static final int ENUM_DEF =
4838 JavaLanguageLexer.ENUM_DEF;
4839
4840 /**
4841 * The {@code enum} keyword. This element appears
4842 * as part of an enum declaration.
4843 *
4844 * <p>For example:</p>
4845 * {@snippet :
4846 * public enum Count {}
4847 * }
4848 *
4849 * <p>parses as:</p>
4850 * {@snippet :
4851 * ENUM_DEF -> ENUM_DEF
4852 * |--MODIFIERS -> MODIFIERS
4853 * | `--LITERAL_PUBLIC -> public
4854 * |--ENUM -> enum
4855 * |--IDENT -> Count
4856 * `--OBJBLOCK -> OBJBLOCK
4857 * |--LCURLY -> {
4858 * `--RCURLY -> }
4859 * }
4860 *
4861 * @see <a href="https://www.jcp.org/en/jsr/detail?id=201">JSR201</a>
4862 * @see #MODIFIERS
4863 * @see #ENUM_DEF
4864 * @see #IDENT
4865 * @see #OBJBLOCK
4866 */
4867 public static final int ENUM =
4868 JavaLanguageLexer.ENUM;
4869
4870 /**
4871 * An enum constant declaration. Its notable children are annotations,
4872 * arguments and object block akin to an anonymous
4873 * inner class' body.
4874 *
4875 * <p>For example:</p>
4876 * {@snippet :
4877 * SOME_CONSTANT(1)
4878 * {
4879 * public void someMethodOverriddenFromMainBody()
4880 * {
4881 * }
4882 * }
4883 * }
4884 *
4885 * <p>parses as:</p>
4886 * {@snippet :
4887 * ENUM_CONSTANT_DEF -> ENUM_CONSTANT_DEF
4888 * | |--ANNOTATIONS -> ANNOTATIONS
4889 * | |--IDENT -> SOME_CONSTANT
4890 * | |--LPAREN -> (
4891 * | |--ELIST -> ELIST
4892 * | | `--EXPR -> EXPR
4893 * | | `--NUM_INT -> 1
4894 * | |--RPAREN -> )
4895 * | `--OBJBLOCK -> OBJBLOCK
4896 * | |--LCURLY -> {
4897 * | |--METHOD_DEF -> METHOD_DEF
4898 * | | |--MODIFIERS -> MODIFIERS
4899 * | | | `--LITERAL_PUBLIC -> public
4900 * | | |--TYPE -> TYPE
4901 * | | | `--LITERAL_VOID -> void
4902 * | | |--IDENT -> someMethodOverriddenFromMainBody
4903 * | | |--LPAREN -> (
4904 * | | |--PARAMETERS -> PARAMETERS
4905 * | | |--RPAREN -> )
4906 * | | `--SLIST -> {
4907 * | | `--RCURLY -> }
4908 * | `--RCURLY -> }
4909 * }
4910 *
4911 * @see <a href="https://www.jcp.org/en/jsr/detail?id=201">
4912 * JSR201</a>
4913 * @see #ANNOTATIONS
4914 * @see #MODIFIERS
4915 * @see #IDENT
4916 * @see #ELIST
4917 * @see #OBJBLOCK
4918 */
4919 public static final int ENUM_CONSTANT_DEF =
4920 JavaLanguageLexer.ENUM_CONSTANT_DEF;
4921
4922 /**
4923 * A for-each clause. This is a child of
4924 * {@code LITERAL_FOR}. The children of this element may be
4925 * a parameter definition, the colon literal and an expression.
4926 *
4927 * <p>For example:</p>
4928 * {@snippet :
4929 * for (int value : values) {
4930 * doSomething();
4931 * }
4932 * }
4933 *
4934 * <p>parses as:</p>
4935 * {@snippet :
4936 * LITERAL_FOR -> for
4937 * |--LPAREN -> (
4938 * |--FOR_EACH_CLAUSE -> FOR_EACH_CLAUSE
4939 * | |--VARIABLE_DEF -> VARIABLE_DEF
4940 * | | |--MODIFIERS -> MODIFIERS
4941 * | | |--TYPE -> TYPE
4942 * | | | `--LITERAL_INT -> int
4943 * | | `--IDENT -> value
4944 * | |--COLON -> :
4945 * | `--EXPR -> EXPR
4946 * | `--IDENT -> values
4947 * |--RPAREN -> )
4948 * `--SLIST -> {
4949 * |--EXPR -> EXPR
4950 * | `--METHOD_CALL -> (
4951 * | |--IDENT -> doSomething
4952 * | |--ELIST -> ELIST
4953 * | `--RPAREN -> )
4954 * |--SEMI -> ;
4955 * `--RCURLY -> }
4956 * }
4957 *
4958 * @see #VARIABLE_DEF
4959 * @see #ELIST
4960 * @see #LITERAL_FOR
4961 */
4962 public static final int FOR_EACH_CLAUSE =
4963 JavaLanguageLexer.FOR_EACH_CLAUSE;
4964
4965 /**
4966 * An annotation declaration. The notable children are the name of the
4967 * annotation type, annotation field declarations and (constant) fields.
4968 *
4969 * <p>For example:</p>
4970 * {@snippet :
4971 * public @interface MyAnnotation
4972 * {
4973 * int someValue();
4974 * }
4975 * }
4976 *
4977 * <p>parses as:</p>
4978 * {@snippet :
4979 * ANNOTATION_DEF -> ANNOTATION_DEF
4980 * |--MODIFIERS -> MODIFIERS
4981 * | `--LITERAL_PUBLIC -> public
4982 * |--AT -> @
4983 * |--LITERAL_INTERFACE -> interface
4984 * |--IDENT -> MyAnnotation
4985 * `--OBJBLOCK -> OBJBLOCK
4986 * |--LCURLY -> {
4987 * |--ANNOTATION_FIELD_DEF -> ANNOTATION_FIELD_DEF
4988 * | |--MODIFIERS -> MODIFIERS
4989 * | |--TYPE -> TYPE
4990 * | | `--LITERAL_INT -> int
4991 * | |--IDENT -> someValue
4992 * | |--LPAREN -> (
4993 * | |--RPAREN -> )
4994 * | `--SEMI -> ;
4995 * `--RCURLY -> }
4996 * }
4997 *
4998 * @see <a href="https://www.jcp.org/en/jsr/detail?id=201">
4999 * JSR201</a>
5000 * @see #MODIFIERS
5001 * @see #LITERAL_INTERFACE
5002 * @see #IDENT
5003 * @see #OBJBLOCK
5004 * @see #ANNOTATION_FIELD_DEF
5005 */
5006 public static final int ANNOTATION_DEF =
5007 JavaLanguageLexer.ANNOTATION_DEF;
5008
5009 /**
5010 * An annotation field declaration. The notable children are modifiers,
5011 * field type, field name and an optional default value (a conditional
5012 * compile-time constant expression). Default values may also be
5013 * annotations.
5014 *
5015 * <p>For example:</p>
5016 *
5017 * {@snippet :
5018 * String someField() default "Hello world";
5019 * }
5020 *
5021 * <p>parses as:</p>
5022 *
5023 * {@snippet :
5024 * ANNOTATION_FIELD_DEF -> ANNOTATION_FIELD_DEF
5025 * |--MODIFIERS -> MODIFIERS
5026 * |--TYPE -> TYPE
5027 * | `--IDENT -> String
5028 * |--IDENT -> someField
5029 * |--LPAREN -> (
5030 * |--RPAREN -> )
5031 * |--LITERAL_DEFAULT -> default
5032 * | `--EXPR -> EXPR
5033 * | `--STRING_LITERAL -> "Hello world"
5034 * `--SEMI -> ;
5035 * }
5036 *
5037 * @see <a href="https://www.jcp.org/en/jsr/detail?id=201">
5038 * JSR201</a>
5039 * @see #MODIFIERS
5040 * @see #TYPE
5041 * @see #LITERAL_DEFAULT
5042 */
5043 public static final int ANNOTATION_FIELD_DEF =
5044 JavaLanguageLexer.ANNOTATION_FIELD_DEF;
5045
5046 /**
5047 * A collection of annotations on a package or enum constant.
5048 * A collections of annotations will only occur on these nodes
5049 * as all other nodes that may be qualified with an annotation can
5050 * be qualified with any other modifier and hence these annotations
5051 * would be contained in a {@link #MODIFIERS} node.
5052 *
5053 * <p>For example:</p>
5054 *
5055 * {@snippet :
5056 * @MyAnnotation package blah;
5057 * }
5058 *
5059 * <p>parses as:</p>
5060 *
5061 * {@snippet :
5062 * PACKAGE_DEF -> package
5063 * |--ANNOTATIONS -> ANNOTATIONS
5064 * | `--ANNOTATION -> ANNOTATION
5065 * | |--AT -> @
5066 * | `--IDENT -> MyAnnotation
5067 * |--IDENT -> blah
5068 * `--SEMI -> ;
5069 * }
5070 *
5071 * @see <a href="https://www.jcp.org/en/jsr/detail?id=201">
5072 * JSR201</a>
5073 * @see #ANNOTATION
5074 * @see #AT
5075 * @see #IDENT
5076 */
5077 public static final int ANNOTATIONS =
5078 JavaLanguageLexer.ANNOTATIONS;
5079
5080 /**
5081 * An annotation of a package, type, field, parameter or variable.
5082 * An annotation may occur anywhere modifiers occur (it is a
5083 * type of modifier) and may also occur prior to a package definition.
5084 * The notable children are: The annotation name and either a single
5085 * default annotation value or a sequence of name value pairs.
5086 * Annotation values may also be annotations themselves.
5087 *
5088 * <p>For example:</p>
5089 * {@snippet :
5090 * @MyAnnotation(someField1 = "Hello",
5091 * someField2 = @SomeOtherAnnotation)
5092 * }
5093 *
5094 * <p>parses as:</p>
5095 * {@snippet :
5096 * ANNOTATION -> ANNOTATION
5097 * |--AT -> @
5098 * |--IDENT -> MyAnnotation
5099 * |--LPAREN -> (
5100 * |--ANNOTATION_MEMBER_VALUE_PAIR -> ANNOTATION_MEMBER_VALUE_PAIR
5101 * | |--IDENT -> someField1
5102 * | |--ASSIGN -> =
5103 * | `--EXPR -> EXPR
5104 * | `--STRING_LITERAL -> "Hello"
5105 * |--COMMA -> ,
5106 * |--ANNOTATION_MEMBER_VALUE_PAIR -> ANNOTATION_MEMBER_VALUE_PAIR
5107 * | |--IDENT -> someField2
5108 * | |--ASSIGN -> =
5109 * | `--ANNOTATION -> ANNOTATION
5110 * | |--AT -> @
5111 * | `--IDENT -> SomeOtherAnnotation
5112 * `--RPAREN -> )
5113 * }
5114 *
5115 * @see <a href="https://www.jcp.org/en/jsr/detail?id=201">
5116 * JSR201</a>
5117 * @see #MODIFIERS
5118 * @see #IDENT
5119 * @see #ANNOTATION_MEMBER_VALUE_PAIR
5120 */
5121 public static final int ANNOTATION =
5122 JavaLanguageLexer.ANNOTATION;
5123
5124 /**
5125 * An initialization of an annotation member with a value.
5126 * Its children are the name of the member, the assignment literal
5127 * and the (compile-time constant conditional expression) value.
5128 *
5129 * <p>For example:</p>
5130 * {@snippet :
5131 * @Annotation(
5132 * value="123"
5133 * )
5134 * }
5135 *
5136 * <p>parses as:</p>
5137 * {@snippet :
5138 * ANNOTATION -> ANNOTATION
5139 * |--AT -> @
5140 * |--IDENT -> Annotation
5141 * |--LPAREN -> (
5142 * |--ANNOTATION_MEMBER_VALUE_PAIR -> ANNOTATION_MEMBER_VALUE_PAIR
5143 * | |--IDENT -> value
5144 * | |--ASSIGN -> =
5145 * | `--EXPR -> EXPR
5146 * | `--STRING_LITERAL -> "123"
5147 * `--RPAREN -> )
5148 * }
5149 *
5150 * @see <a href="https://www.jcp.org/en/jsr/detail?id=201">
5151 * JSR201</a>
5152 * @see #ANNOTATION
5153 * @see #IDENT
5154 */
5155 public static final int ANNOTATION_MEMBER_VALUE_PAIR =
5156 JavaLanguageLexer.ANNOTATION_MEMBER_VALUE_PAIR;
5157
5158 /**
5159 * An annotation array member initialization.
5160 * Initializers can not be nested.
5161 * An initializer may be present as a default to an annotation
5162 * member, as the single default value to an annotation
5163 * (e.g. @Annotation({1,2})) or as the value of an annotation
5164 * member value pair.
5165 *
5166 * <p>For example:</p>
5167 * {@snippet :
5168 * @Annotation({1, 2})
5169 * }
5170 *
5171 * <p>parses as:</p>
5172 * {@snippet :
5173 * ANNOTATION -> ANNOTATION
5174 * |--AT -> @
5175 * |--IDENT -> Annotation
5176 * |--LPAREN -> (
5177 * |--ANNOTATION_ARRAY_INIT -> {
5178 * | |--EXPR -> EXPR
5179 * | | `--NUM_INT -> 1
5180 * | |--COMMA -> ,
5181 * | |--EXPR -> EXPR
5182 * | | `--NUM_INT -> 2
5183 * | `--RCURLY -> }
5184 * `--RPAREN -> )
5185 * }
5186 *
5187 * @see <a href="https://www.jcp.org/en/jsr/detail?id=201">
5188 * JSR201</a>
5189 * @see #ANNOTATION
5190 * @see #IDENT
5191 * @see #ANNOTATION_MEMBER_VALUE_PAIR
5192 */
5193 public static final int ANNOTATION_ARRAY_INIT =
5194 JavaLanguageLexer.ANNOTATION_ARRAY_INIT;
5195
5196 /**
5197 * A list of type parameters to a class, interface or
5198 * method definition. Children are LT, at least one
5199 * TYPE_PARAMETER, zero or more of: a COMMAs followed by a single
5200 * TYPE_PARAMETER and a final GT.
5201 *
5202 * <p>For example:</p>
5203 *
5204 * {@snippet :
5205 * public class MyClass<A, B> {
5206 *
5207 * }
5208 * }
5209 *
5210 * <p>parses as:</p>
5211 *
5212 * {@snippet :
5213 * CLASS_DEF -> CLASS_DEF
5214 * |--MODIFIERS -> MODIFIERS
5215 * | `--LITERAL_PUBLIC -> public
5216 * |--LITERAL_CLASS -> class
5217 * |--IDENT -> MyClass
5218 * |--TYPE_PARAMETERS -> TYPE_PARAMETERS
5219 * | |--GENERIC_START -> <
5220 * | |--TYPE_PARAMETER -> TYPE_PARAMETER
5221 * | | `--IDENT -> A
5222 * | |--COMMA -> ,
5223 * | |--TYPE_PARAMETER -> TYPE_PARAMETER
5224 * | | `--IDENT -> B
5225 * | `--GENERIC_END -> >
5226 * `--OBJBLOCK -> OBJBLOCK
5227 * |--LCURLY -> {
5228 * `--RCURLY -> }
5229 * }
5230 *
5231 * @see <a href="https://docs.oracle.com/javase/specs/jls/se11/html/jls-8.html#jls-8.1.2">
5232 * Generic Classes and Type Parameters</a>
5233 * @see #GENERIC_START
5234 * @see #GENERIC_END
5235 * @see #TYPE_PARAMETER
5236 * @see #COMMA
5237 */
5238 public static final int TYPE_PARAMETERS =
5239 JavaLanguageLexer.TYPE_PARAMETERS;
5240
5241 /**
5242 * A type parameter to a class, interface or method definition.
5243 * Children are the type name and an optional TYPE_UPPER_BOUNDS.
5244 *
5245 * <p>For example:</p>
5246 *
5247 * {@snippet :
5248 * public class MyClass <A extends Collection> {
5249 *
5250 * }
5251 * }
5252 *
5253 * <p>parses as:</p>
5254 *
5255 * {@snippet :
5256 * CLASS_DEF -> CLASS_DEF
5257 * |--MODIFIERS -> MODIFIERS
5258 * | `--LITERAL_PUBLIC -> public
5259 * |--LITERAL_CLASS -> class
5260 * |--IDENT -> MyClass
5261 * |--TYPE_PARAMETERS -> TYPE_PARAMETERS
5262 * | |--GENERIC_START -> <
5263 * | |--TYPE_PARAMETER -> TYPE_PARAMETER
5264 * | | |--IDENT -> A
5265 * | | `--TYPE_UPPER_BOUNDS -> extends
5266 * | | `--IDENT -> Collection
5267 * | `--GENERIC_END -> >
5268 * `--OBJBLOCK -> OBJBLOCK
5269 * |--LCURLY -> {
5270 * `--RCURLY -> }
5271 * }
5272 *
5273 * @see <a href="https://docs.oracle.com/javase/specs/jls/se11/html/jls-8.html#jls-8.1.2">
5274 * Generic Classes and Type Parameters</a>
5275 * @see #IDENT
5276 * @see #WILDCARD_TYPE
5277 * @see #TYPE_UPPER_BOUNDS
5278 */
5279 public static final int TYPE_PARAMETER =
5280 JavaLanguageLexer.TYPE_PARAMETER;
5281
5282 /**
5283 * A list of type arguments to a type reference or
5284 * a method/ctor invocation. Children are GENERIC_START, at least one
5285 * TYPE_ARGUMENT, zero or more of a COMMAs followed by a single
5286 * TYPE_ARGUMENT, and a final GENERIC_END.
5287 *
5288 * <p>For example:</p>
5289 *
5290 * {@snippet :
5291 * public Collection<?> a;
5292 * }
5293 *
5294 * <p>parses as:</p>
5295 *
5296 * {@snippet :
5297 * VARIABLE_DEF -> VARIABLE_DEF
5298 * |--MODIFIERS -> MODIFIERS
5299 * | `--LITERAL_PUBLIC -> public
5300 * |--TYPE -> TYPE
5301 * | |--IDENT -> Collection
5302 * | `--TYPE_ARGUMENTS -> TYPE_ARGUMENTS
5303 * | |--GENERIC_START -> <
5304 * | |--TYPE_ARGUMENT -> TYPE_ARGUMENT
5305 * | | `--WILDCARD_TYPE -> ?
5306 * | `--GENERIC_END -> >
5307 * |--IDENT -> a
5308 * `--SEMI -> ;
5309 * }
5310 *
5311 * @see #GENERIC_START
5312 * @see #GENERIC_END
5313 * @see #TYPE_ARGUMENT
5314 * @see #COMMA
5315 */
5316 public static final int TYPE_ARGUMENTS =
5317 JavaLanguageLexer.TYPE_ARGUMENTS;
5318
5319 /**
5320 * A type arguments to a type reference or a method/ctor invocation.
5321 * Children are either: type name or wildcard type with possible type
5322 * upper or lower bounds.
5323 *
5324 * <p>For example: {@code List< ? super List> list }</p>
5325 *
5326 * <p>parses as:</p>
5327 * {@snippet :
5328 * VARIABLE_DEF -> VARIABLE_DEF
5329 * |--MODIFIERS -> MODIFIERS
5330 * |--TYPE -> TYPE
5331 * | |--IDENT -> List
5332 * | `--TYPE_ARGUMENTS -> TYPE_ARGUMENTS
5333 * | |--GENERIC_START -> <
5334 * | |--TYPE_ARGUMENT -> TYPE_ARGUMENT
5335 * | | |--WILDCARD_TYPE -> ?
5336 * | | `--TYPE_LOWER_BOUNDS -> super
5337 * | | `--IDENT -> List
5338 * | `--GENERIC_END -> >
5339 * |--IDENT -> list
5340 * `--SEMI -> ;
5341 * }
5342 *
5343 * @see <a href="https://docs.oracle.com/javase/specs/jls/se11/html/jls-8.html#jls-8.1.2">
5344 * Generic Classes and Type Parameters</a>
5345 * @see #WILDCARD_TYPE
5346 * @see #TYPE_UPPER_BOUNDS
5347 * @see #TYPE_LOWER_BOUNDS
5348 */
5349 public static final int TYPE_ARGUMENT =
5350 JavaLanguageLexer.TYPE_ARGUMENT;
5351
5352 /**
5353 * The type that refers to all types. This node has no children.
5354 *
5355 * <p>For example: </p>
5356 * {@snippet :
5357 *
5358 * List<?> list;
5359 * }
5360 *
5361 * <p>parses as:</p>
5362 * {@snippet :
5363 * |--VARIABLE_DEF -> VARIABLE_DEF
5364 * | |--MODIFIERS -> MODIFIERS
5365 * | |--TYPE -> TYPE
5366 * | | |--IDENT -> List
5367 * | | |`--TYPE_ARGUMENTS -> TYPE_ARGUMENTS
5368 * | | |--GENERIC_START -> <
5369 * | | |--TYPE_ARGUMENT -> TYPE_ARGUMENT
5370 * | | | `--WILDCARD_TYPE -> ?
5371 * | | `--GENERIC_END -> >
5372 * | `--IDENT -> list
5373 * |--SEMI -> ;
5374 * }
5375 *
5376 * @see <a href="https://docs.oracle.com/javase/specs/jls/se11/html/jls-8.html#jls-8.1.2">
5377 * Generic Classes and Type Parameters</a>
5378 * @see #TYPE_ARGUMENT
5379 * @see #TYPE_UPPER_BOUNDS
5380 * @see #TYPE_LOWER_BOUNDS
5381 */
5382 public static final int WILDCARD_TYPE =
5383 JavaLanguageLexer.WILDCARD_TYPE;
5384
5385 /**
5386 * An upper bounds on a wildcard type argument or type parameter.
5387 * This node has one child - the type that is being used for
5388 * the bounding.
5389 *
5390 * <p>For example: {@code List< ? extends Number> list;}</p>
5391 *
5392 * <p>parses as:</p>
5393 * {@snippet :
5394 * --VARIABLE_DEF -> VARIABLE_DEF
5395 * |--MODIFIERS -> MODIFIERS
5396 * |--TYPE -> TYPE
5397 * | |--IDENT -> List
5398 * | `--TYPE_ARGUMENTS -> TYPE_ARGUMENTS
5399 * | |--GENERIC_START -> <
5400 * | |--TYPE_ARGUMENT -> TYPE_ARGUMENT
5401 * | | |--WILDCARD_TYPE -> ?
5402 * | | `--TYPE_UPPER_BOUNDS -> extends
5403 * | | `--IDENT -> Number
5404 * | `--GENERIC_END -> >
5405 * |--IDENT -> list
5406 * `--SEMI -> ;
5407 * }
5408 *
5409 * @see <a href="https://docs.oracle.com/javase/specs/jls/se11/html/jls-8.html#jls-8.1.2">
5410 * Generic Classes and Type Parameters</a>
5411 * @see #TYPE_PARAMETER
5412 * @see #TYPE_ARGUMENT
5413 * @see #WILDCARD_TYPE
5414 */
5415 public static final int TYPE_UPPER_BOUNDS =
5416 JavaLanguageLexer.TYPE_UPPER_BOUNDS;
5417
5418 /**
5419 * A lower bounds on a wildcard type argument. This node has one child
5420 * - the type that is being used for the bounding.
5421 *
5422 * <p>For example: {@code List< ? super Integer> list;}</p>
5423 *
5424 * <p>parses as:</p>
5425 * {@snippet :
5426 * --VARIABLE_DEF -> VARIABLE_DEF
5427 * |--MODIFIERS -> MODIFIERS
5428 * |--TYPE -> TYPE
5429 * | |--IDENT -> List
5430 * | `--TYPE_ARGUMENTS -> TYPE_ARGUMENTS
5431 * | |--GENERIC_START -> <
5432 * | |--TYPE_ARGUMENT -> TYPE_ARGUMENT
5433 * | | |--WILDCARD_TYPE -> ?
5434 * | | `--TYPE_LOWER_BOUNDS -> super
5435 * | | `--IDENT -> Integer
5436 * | `--GENERIC_END -> >
5437 * |--IDENT -> list
5438 * `--SEMI -> ;
5439 * }
5440 *
5441 * @see <a href="https://docs.oracle.com/javase/specs/jls/se11/html/jls-8.html#jls-8.1.2">
5442 * Generic Classes and Type Parameters</a>
5443 * @see #TYPE_ARGUMENT
5444 * @see #WILDCARD_TYPE
5445 */
5446 public static final int TYPE_LOWER_BOUNDS =
5447 JavaLanguageLexer.TYPE_LOWER_BOUNDS;
5448
5449 /**
5450 * An {@code @} symbol - signifying an annotation instance or the prefix
5451 * to the interface literal signifying the definition of an annotation
5452 * declaration.
5453 *
5454 * <p>For example:</p>
5455 * {@snippet :
5456 * @Deprecated
5457 * private int value;
5458 * }
5459 *
5460 * <p>parses as:</p>
5461 * {@snippet :
5462 * VARIABLE_DEF -> VARIABLE_DEF
5463 * |--MODIFIERS -> MODIFIERS
5464 * | |--ANNOTATION -> ANNOTATION
5465 * | | |--AT -> @
5466 * | | `--IDENT -> Deprecated
5467 * | `--LITERAL_PRIVATE -> private
5468 * |--TYPE -> TYPE
5469 * | `--LITERAL_INT -> int
5470 * |--IDENT -> value
5471 * `--SEMI -> ;
5472 * }
5473 *
5474 * @see <a href="https://www.jcp.org/en/jsr/detail?id=201">
5475 * JSR201</a>
5476 */
5477 public static final int AT = JavaLanguageLexer.AT;
5478
5479 /**
5480 * A triple dot for variable-length parameters. This token only ever occurs
5481 * in a parameter declaration immediately after the type of the parameter.
5482 *
5483 * <p>For example:</p>
5484 * {@snippet :
5485 * public void myShape(int... dimension) {
5486 *
5487 * }
5488 * }
5489 *
5490 * <p>parses as:</p>
5491 * {@snippet :
5492 * METHOD_DEF -> METHOD_DEF
5493 * |--MODIFIERS -> MODIFIERS
5494 * | `--LITERAL_PUBLIC -> public
5495 * |--TYPE -> TYPE
5496 * | `--LITERAL_VOID -> void
5497 * |--IDENT -> myShape
5498 * |--LPAREN -> (
5499 * |--PARAMETERS -> PARAMETERS
5500 * | `--PARAMETER_DEF -> PARAMETER_DEF
5501 * | |--MODIFIERS -> MODIFIERS
5502 * | |--TYPE -> TYPE
5503 * | | `--LITERAL_INT -> int
5504 * | |--ELLIPSIS -> ...
5505 * | `--IDENT -> dimension
5506 * |--RPAREN -> )
5507 * `--SLIST -> {
5508 * `--RCURLY -> }
5509 * }
5510 *
5511 * @see <a href="https://www.jcp.org/en/jsr/detail?id=201">
5512 * JSR201</a>
5513 */
5514 public static final int ELLIPSIS = JavaLanguageLexer.ELLIPSIS;
5515
5516 /**
5517 * The {@code &} symbol when used to extend a generic upper or lower bounds constrain
5518 * or a type cast expression with an additional interface.
5519 *
5520 * <p>Generic type bounds extension:
5521 * {@code class Comparable<T extends Serializable & CharSequence>}</p>
5522 * {@snippet :
5523 * CLASS_DEF -> CLASS_DEF
5524 * |--MODIFIERS -> MODIFIERS
5525 * |--LITERAL_CLASS -> class
5526 * |--IDENT -> Comparable
5527 * |--TYPE_PARAMETERS -> TYPE_PARAMETERS
5528 * |--GENERIC_START -> <
5529 * |--TYPE_PARAMETER -> TYPE_PARAMETER
5530 * | |--IDENT -> T
5531 * | `--TYPE_UPPER_BOUNDS -> extends
5532 * | |--IDENT -> Serializable
5533 * | |--TYPE_EXTENSION_AND -> &
5534 * | `--IDENT -> CharSequence
5535 * `--GENERIC_END -> >
5536 * }
5537 *
5538 * <p>Type cast extension:
5539 * {@code return (Serializable & CharSequence) null;}</p>
5540 * {@snippet :
5541 * --LITERAL_RETURN -> return
5542 * |--EXPR -> EXPR
5543 * | `--TYPECAST -> (
5544 * | |--TYPE -> TYPE
5545 * | | `--IDENT -> Serializable
5546 * | |--TYPE_EXTENSION_AND -> &
5547 * | |--TYPE -> TYPE
5548 * | | `--IDENT -> CharSequence
5549 * | |--RPAREN -> )
5550 * | `--LITERAL_NULL -> null
5551 * `--SEMI -> ;
5552 * }
5553 *
5554 * @see #EXTENDS_CLAUSE
5555 * @see #TYPECAST
5556 * @see <a href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-4.html#jls-4.4">
5557 * Java Language Specification, §4.4</a>
5558 * @see <a href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.16">
5559 * Java Language Specification, §15.16</a>
5560 */
5561 public static final int TYPE_EXTENSION_AND =
5562 JavaLanguageLexer.TYPE_EXTENSION_AND;
5563
5564 /**
5565 * A {@code <} symbol signifying the start of type arguments or type parameters.
5566 *
5567 * <p>For example:</p>
5568 * {@snippet :
5569 * class Test<T> {}
5570 * }
5571 *
5572 * <p>parses as:</p>
5573 * {@snippet :
5574 * CLASS_DEF -> CLASS_DEF
5575 * |--MODIFIERS -> MODIFIERS
5576 * |--LITERAL_CLASS -> class
5577 * |--IDENT -> Test
5578 * |--TYPE_PARAMETERS -> TYPE_PARAMETERS
5579 * | |--GENERIC_START -> <
5580 * | |--TYPE_PARAMETER -> TYPE_PARAMETER
5581 * | | `--IDENT -> T
5582 * | `--GENERIC_END -> >
5583 * `--OBJBLOCK -> OBJBLOCK
5584 * |--LCURLY -> {
5585 * `--RCURLY -> }
5586 * }
5587 *
5588 * @see #MODIFIERS
5589 * @see #IDENT
5590 * @see #OBJBLOCK
5591 * @see #TYPE_PARAMETERS
5592 * @see #GENERIC_END
5593 */
5594 public static final int GENERIC_START =
5595 JavaLanguageLexer.GENERIC_START;
5596
5597 /**
5598 * A {@code >} symbol signifying the end of type arguments or type parameters.
5599 *
5600 * <p>For example:</p>
5601 * {@snippet :
5602 * class Test<T> {}
5603 * }
5604 *
5605 * <p>parses as:</p>
5606 * {@snippet :
5607 * CLASS_DEF -> CLASS_DEF
5608 * |--MODIFIERS -> MODIFIERS
5609 * |--LITERAL_CLASS -> class
5610 * |--IDENT -> Test
5611 * |--TYPE_PARAMETERS -> TYPE_PARAMETERS
5612 * | |--GENERIC_START -> <
5613 * | |--TYPE_PARAMETER -> TYPE_PARAMETER
5614 * | | `--IDENT -> T
5615 * | `--GENERIC_END -> >
5616 * `--OBJBLOCK -> OBJBLOCK
5617 * |--LCURLY -> {
5618 * `--RCURLY -> }
5619 * }
5620 *
5621 * @see #MODIFIERS
5622 * @see #IDENT
5623 * @see #OBJBLOCK
5624 * @see #TYPE_PARAMETERS
5625 * @see #GENERIC_START
5626 */
5627 public static final int GENERIC_END = JavaLanguageLexer.GENERIC_END;
5628
5629 /**
5630 * Special lambda symbol {@code ->}.
5631 *
5632 * <p>For example:</p>
5633 * {@snippet :
5634 * numbers.forEach((n) -> System.out.println(n));
5635 * }
5636 *
5637 * <p>parses as:</p>
5638 * {@snippet :
5639 * METHOD_CALL -> (
5640 * |--DOT -> .
5641 * | |--IDENT -> numbers
5642 * | `--IDENT -> forEach
5643 * |--ELIST -> ELIST
5644 * | `--LAMBDA -> ->
5645 * | |--LPAREN -> (
5646 * | |--PARAMETERS -> PARAMETERS
5647 * | | `--PARAMETER_DEF -> PARAMETER_DEF
5648 * | | |--MODIFIERS -> MODIFIERS
5649 * | | |--TYPE -> TYPE
5650 * | | `--IDENT -> n
5651 * | |--RPAREN -> )
5652 * | `--EXPR -> EXPR
5653 * | `--METHOD_CALL -> (
5654 * | |--DOT -> .
5655 * | | |--DOT -> .
5656 * | | | |--IDENT -> System
5657 * | | | `--IDENT -> out
5658 * | | `--IDENT -> println
5659 * | |--ELIST -> ELIST
5660 * | | `--EXPR -> EXPR
5661 * | | `--IDENT -> n
5662 * | `--RPAREN -> )
5663 * `--RPAREN -> )
5664 * }
5665 *
5666 */
5667 public static final int LAMBDA = JavaLanguageLexer.LAMBDA;
5668
5669 /**
5670 * Beginning of single-line comment: '//'.
5671 *
5672 * {@snippet :
5673 * SINGLE_LINE_COMMENT -> //
5674 * `--COMMENT_CONTENT -> \r\n
5675 * }
5676 *
5677 * <p>For example:</p>
5678 * {@snippet :
5679 * // Comment content
5680 * }
5681 *
5682 * <p>parses as:</p>
5683 * {@snippet :
5684 * SINGLE_LINE_COMMENT -> //
5685 * `--COMMENT_CONTENT -> Comment Content\n
5686 * }
5687 */
5688 public static final int SINGLE_LINE_COMMENT =
5689 JavaLanguageLexer.SINGLE_LINE_COMMENT;
5690
5691 /**
5692 * Beginning of block comment: '/*'.
5693 *
5694 * <p>For example:</p>
5695 * <pre>{@code
5696 * /* Comment content
5697 * * /
5698 * }</pre>
5699 *
5700 * <p>parses as:</p>
5701 * {@snippet :
5702 * --BLOCK_COMMENT_BEGIN -> /*
5703 * |--COMMENT_CONTENT -> Comment content\r\n
5704 * `--BLOCK_COMMENT_END -> * /
5705 * }
5706 */
5707 public static final int BLOCK_COMMENT_BEGIN =
5708 JavaLanguageLexer.BLOCK_COMMENT_BEGIN;
5709
5710 /**
5711 * End of block comment: '* /'.
5712 *
5713 * <p>For example:</p>
5714 * <pre>{@code
5715 * /*comment* /
5716 * }</pre>
5717 *
5718 * <p>parses as:</p>
5719 * {@snippet :
5720 * BLOCK_COMMENT_BEGIN -> /*
5721 * |--COMMENT_CONTENT -> comment
5722 * `--BLOCK_COMMENT_END -> * /
5723 * }
5724 *
5725 */
5726 public static final int BLOCK_COMMENT_END =
5727 JavaLanguageLexer.BLOCK_COMMENT_END;
5728
5729 /**
5730 * Text of single-line or block comment.
5731 *
5732 * <p>For example:</p>
5733 * <pre>{@code
5734 * //this is single-line comment
5735 *
5736 * /*
5737 * this is multiline comment
5738 * * /
5739 * }</pre>
5740 *
5741 * <p>parses as:</p>
5742 * {@snippet :
5743 * |--SINGLE_LINE_COMMENT -> //
5744 * | `--COMMENT_CONTENT -> this is single-line comment\n
5745 * |--BLOCK_COMMENT_BEGIN -> /*
5746 * | |--COMMENT_CONTENT -> \n\t\t\tthis is multiline comment\n\t\t
5747 * | `--BLOCK_COMMENT_END -> * /
5748 * }
5749 *
5750 */
5751 public static final int COMMENT_CONTENT =
5752 JavaLanguageLexer.COMMENT_CONTENT;
5753
5754 /**
5755 * A pattern variable definition; when conditionally matched,
5756 * this variable is assigned with the defined type.
5757 *
5758 * <p>For example:</p>
5759 * {@snippet :
5760 * if (obj instanceof String str) { }
5761 * }
5762 *
5763 * <p>parses as:</p>
5764 * {@snippet :
5765 * LITERAL_IF -> if
5766 * |--LPAREN -> (
5767 * |--EXPR -> EXPR
5768 * | `--LITERAL_INSTANCEOF -> instanceof
5769 * | |--IDENT -> obj
5770 * | `--PATTERN_VARIABLE_DEF -> PATTERN_VARIABLE_DEF
5771 * | |--TYPE -> TYPE
5772 * | | `--IDENT -> String
5773 * | `--IDENT -> str
5774 * |--RPAREN -> )
5775 * `--SLIST -> {
5776 * `--RCURLY -> }
5777 * }
5778 *
5779 * @see #LITERAL_INSTANCEOF
5780 * @since 8.35
5781 */
5782 public static final int PATTERN_VARIABLE_DEF =
5783 JavaLanguageLexer.PATTERN_VARIABLE_DEF;
5784
5785 /**
5786 * The {@code record} keyword. This element appears
5787 * as part of a record declaration.
5788 *
5789 * <p>For example:</p>
5790 * {@snippet :
5791 * public record MyRecord () {
5792 *
5793 * }
5794 * }
5795 *
5796 * <p>parses as:</p>
5797 * {@snippet :
5798 * RECORD_DEF -> RECORD_DEF
5799 * |--MODIFIERS -> MODIFIERS
5800 * | `--LITERAL_PUBLIC -> public
5801 * |--LITERAL_RECORD -> record
5802 * |--IDENT -> MyRecord
5803 * |--LPAREN -> (
5804 * |--RECORD_COMPONENTS -> RECORD_COMPONENTS
5805 * |--RPAREN -> )
5806 * `--OBJBLOCK -> OBJBLOCK
5807 * |--LCURLY -> {
5808 * `--RCURLY -> }
5809 * }
5810 *
5811 * @since 8.35
5812 */
5813 public static final int LITERAL_RECORD =
5814 JavaLanguageLexer.LITERAL_RECORD;
5815
5816 /**
5817 * A declaration of a record specifies a name, a header, and a body.
5818 * The header lists the components of the record, which are the variables
5819 * that make up its state.
5820 *
5821 * <p>For example:</p>
5822 * {@snippet :
5823 * public record MyRecord () {
5824 *
5825 * }
5826 * }
5827 *
5828 * <p>parses as:</p>
5829 * {@snippet :
5830 * RECORD_DEF -> RECORD_DEF
5831 * |--MODIFIERS -> MODIFIERS
5832 * | `--LITERAL_PUBLIC -> public
5833 * |--LITERAL_RECORD -> record
5834 * |--IDENT -> MyRecord
5835 * |--LPAREN -> (
5836 * |--RECORD_COMPONENTS -> RECORD_COMPONENTS
5837 * |--RPAREN -> )
5838 * `--OBJBLOCK -> OBJBLOCK
5839 * |--LCURLY -> {
5840 * `--RCURLY -> }
5841 * }
5842 *
5843 * @since 8.35
5844 */
5845 public static final int RECORD_DEF =
5846 JavaLanguageLexer.RECORD_DEF;
5847
5848 /**
5849 * Record components are a (possibly empty) list containing the components of a record, which
5850 * are the variables that make up its state.
5851 *
5852 * <p>For example:</p>
5853 * {@snippet :
5854 * public record myRecord (Comp x, Comp y) { }
5855 * }
5856 *
5857 * <p>parses as:</p>
5858 * {@snippet :
5859 * RECORD_DEF -> RECORD_DEF
5860 * |--MODIFIERS -> MODIFIERS
5861 * | `--LITERAL_PUBLIC -> public
5862 * |--LITERAL_RECORD -> record
5863 * |--IDENT -> myRecord
5864 * |--LPAREN -> (
5865 * |--RECORD_COMPONENTS -> RECORD_COMPONENTS
5866 * | |--RECORD_COMPONENT_DEF -> RECORD_COMPONENT_DEF
5867 * | | |--ANNOTATIONS -> ANNOTATIONS
5868 * | | |--TYPE -> TYPE
5869 * | | | `--IDENT -> Comp
5870 * | | `--IDENT -> x
5871 * | |--COMMA -> ,
5872 * | `--RECORD_COMPONENT_DEF -> RECORD_COMPONENT_DEF
5873 * | |--ANNOTATIONS -> ANNOTATIONS
5874 * | |--TYPE -> TYPE
5875 * | | `--IDENT -> Comp
5876 * | `--IDENT -> y
5877 * |--RPAREN -> )
5878 * `--OBJBLOCK -> OBJBLOCK
5879 * |--LCURLY -> {
5880 * `--RCURLY -> }
5881 * }
5882 *
5883 * @since 8.36
5884 */
5885 public static final int RECORD_COMPONENTS =
5886 JavaLanguageLexer.RECORD_COMPONENTS;
5887
5888 /**
5889 * A record component is a variable that comprises the state of a record. Record components
5890 * have annotations (possibly), a type definition, and an identifier. They can also be of
5891 * variable arity ('...').
5892 *
5893 * <p>For example:</p>
5894 * {@snippet :
5895 * public record MyRecord(Comp x, Comp... comps) {
5896 *
5897 * }
5898 * }
5899 *
5900 * <p>parses as:</p>
5901 * {@snippet :
5902 * RECORD_DEF -> RECORD_DEF
5903 * |--MODIFIERS -> MODIFIERS
5904 * | `--LITERAL_PUBLIC -> public
5905 * |--LITERAL_RECORD -> record
5906 * |--IDENT -> MyRecord
5907 * |--LPAREN -> (
5908 * |--RECORD_COMPONENTS -> RECORD_COMPONENTS
5909 * | |--RECORD_COMPONENT_DEF -> RECORD_COMPONENT_DEF
5910 * | | |--ANNOTATIONS -> ANNOTATIONS
5911 * | | |--TYPE -> TYPE
5912 * | | | `--IDENT -> Comp
5913 * | | `--IDENT -> x
5914 * | |--COMMA -> ,
5915 * | `--RECORD_COMPONENT_DEF -> RECORD_COMPONENT_DEF
5916 * | |--ANNOTATIONS -> ANNOTATIONS
5917 * | |--TYPE -> TYPE
5918 * | | `--IDENT -> Comp
5919 * | |--ELLIPSIS -> ...
5920 * | `--IDENT -> comps
5921 * |--RPAREN -> )
5922 * `--OBJBLOCK -> OBJBLOCK
5923 * |--LCURLY -> {
5924 * `--RCURLY -> }
5925 * }
5926 *
5927 * @since 8.36
5928 */
5929 public static final int RECORD_COMPONENT_DEF =
5930 JavaLanguageLexer.RECORD_COMPONENT_DEF;
5931
5932 /**
5933 * A compact canonical constructor eliminates the list of formal parameters; they are
5934 * declared implicitly.
5935 *
5936 * <p>For example:</p>
5937 * {@snippet :
5938 * public record myRecord () {
5939 * public myRecord{}
5940 * }
5941 * }
5942 *
5943 * <p>parses as:</p>
5944 * {@snippet :
5945 * RECORD_DEF
5946 * |--MODIFIERS
5947 * | `--LITERAL_PUBLIC (public)
5948 * |--LITERAL_RECORD (record)
5949 * |--IDENT (myRecord)
5950 * |--LPAREN (()
5951 * |--RECORD_COMPONENTS
5952 * |--RPAREN ())
5953 * `--OBJBLOCK
5954 * |--LCURLY ({)
5955 * |--COMPACT_CTOR_DEF
5956 * | |--MODIFIERS
5957 * | | `--LITERAL_PUBLIC (public)
5958 * | |--IDENT (myRecord)
5959 * | `--SLIST ({)
5960 * | `--RCURLY (})
5961 * `--RCURLY (})
5962 * }
5963 *
5964 * @since 8.36
5965 */
5966 public static final int COMPACT_CTOR_DEF =
5967 JavaLanguageLexer.COMPACT_CTOR_DEF;
5968
5969 /**
5970 * Text blocks are a new feature added to to Java SE 15 and later
5971 * that will make writing multi-line strings much easier and cleaner.
5972 * Beginning of a Java 15 Text Block literal,
5973 * delimited by three double quotes.
5974 *
5975 * <p>For example:</p>
5976 * {@snippet :
5977 * String hello = """
5978 * Hello, world!
5979 * """;
5980 * }
5981 *
5982 * <p>parses as:</p>
5983 * {@snippet :
5984 * |--VARIABLE_DEF -> VARIABLE_DEF
5985 * | |--MODIFIERS -> MODIFIERS
5986 * | |--TYPE -> TYPE
5987 * | | `--IDENT -> String
5988 * | |--IDENT -> hello
5989 * | `--ASSIGN -> =
5990 * | `--EXPR -> EXPR
5991 * | `--TEXT_BLOCK_LITERAL_BEGIN -> """
5992 * | |--TEXT_BLOCK_CONTENT -> \n Hello, world!\n
5993 * | `--TEXT_BLOCK_LITERAL_END -> """
5994 * `--SEMI -> ;
5995 * }
5996 *
5997 * @since 8.36
5998 */
5999 public static final int TEXT_BLOCK_LITERAL_BEGIN =
6000 JavaLanguageLexer.TEXT_BLOCK_LITERAL_BEGIN;
6001
6002 /**
6003 * Content of a Java 15 text block. This is a
6004 * sequence of characters, possibly escaped with '\'. Actual line terminators
6005 * are represented by '\n'.
6006 *
6007 * <p>For example:</p>
6008 * {@snippet :
6009 * String hello = """
6010 * Hello, world!
6011 * """;
6012 * }
6013 *
6014 * <p>parses as:</p>
6015 * {@snippet :
6016 * |--VARIABLE_DEF -> VARIABLE_DEF
6017 * | |--MODIFIERS -> MODIFIERS
6018 * | |--TYPE -> TYPE
6019 * | | `--IDENT -> String
6020 * | |--IDENT -> hello
6021 * | `--ASSIGN -> =
6022 * | `--EXPR -> EXPR
6023 * | `--TEXT_BLOCK_LITERAL_BEGIN -> """
6024 * | |--TEXT_BLOCK_CONTENT -> \n Hello, world!\n
6025 * | `--TEXT_BLOCK_LITERAL_END -> """
6026 * `--SEMI -> ;
6027 * }
6028 *
6029 * @since 8.36
6030 */
6031 public static final int TEXT_BLOCK_CONTENT =
6032 JavaLanguageLexer.TEXT_BLOCK_CONTENT;
6033
6034 /**
6035 * End of a Java 15 text block literal, delimited by three
6036 * double quotes.
6037 *
6038 * <p>For example:</p>
6039 * {@snippet :
6040 * String hello = """
6041 * Hello, world!
6042 * """;
6043 * }
6044 *
6045 * <p>parses as:</p>
6046 * {@snippet :
6047 * |--VARIABLE_DEF -> VARIABLE_DEF
6048 * | |--MODIFIERS -> MODIFIERS
6049 * | |--TYPE -> TYPE
6050 * | | `--IDENT -> String
6051 * | |--IDENT -> hello
6052 * | `--ASSIGN -> =
6053 * | `--EXPR -> EXPR
6054 * | `--TEXT_BLOCK_LITERAL_BEGIN -> """
6055 * | |--TEXT_BLOCK_CONTENT -> \n Hello, world!\n
6056 * | `--TEXT_BLOCK_LITERAL_END -> """
6057 * `--SEMI -> ;
6058 * }
6059 *
6060 * @since 8.36
6061 */
6062 public static final int TEXT_BLOCK_LITERAL_END =
6063 JavaLanguageLexer.TEXT_BLOCK_LITERAL_END;
6064
6065 /**
6066 * The {@code yield} keyword. This element appears
6067 * as part of a yield statement.
6068 *
6069 * <p>For example:</p>
6070 * {@snippet :
6071 * int yield = 0; // not a keyword here
6072 * return switch (mode) {
6073 * case "a", "b":
6074 * yield 1;
6075 * default:
6076 * yield - 1;
6077 * };
6078 * }
6079 *
6080 * <p>parses as:</p>
6081 * {@snippet :
6082 * |--VARIABLE_DEF -> VARIABLE_DEF
6083 * | |--MODIFIERS -> MODIFIERS
6084 * | |--TYPE -> TYPE
6085 * | | `--LITERAL_INT -> int
6086 * | |--IDENT -> yield
6087 * | `--ASSIGN -> =
6088 * | `--EXPR -> EXPR
6089 * | `--NUM_INT -> 0
6090 * |--SEMI -> ;
6091 * |--LITERAL_RETURN -> return
6092 * | |--EXPR -> EXPR
6093 * | | `--LITERAL_SWITCH -> switch
6094 * | | |--LPAREN -> (
6095 * | | |--EXPR -> EXPR
6096 * | | | `--IDENT -> mode
6097 * | | |--RPAREN -> )
6098 * | | |--LCURLY -> {
6099 * | | |--CASE_GROUP -> CASE_GROUP
6100 * | | | |--LITERAL_CASE -> case
6101 * | | | | |--EXPR -> EXPR
6102 * | | | | | `--STRING_LITERAL -> "a"
6103 * | | | | |--COMMA -> ,
6104 * | | | | |--EXPR -> EXPR
6105 * | | | | | `--STRING_LITERAL -> "b"
6106 * | | | | `--COLON -> :
6107 * | | | `--SLIST -> SLIST
6108 * | | | `--LITERAL_YIELD -> yield
6109 * | | | |--EXPR -> EXPR
6110 * | | | | `--NUM_INT -> 1
6111 * | | | `--SEMI -> ;
6112 * | | |--CASE_GROUP -> CASE_GROUP
6113 * | | | |--LITERAL_DEFAULT -> default
6114 * | | | | `--COLON -> :
6115 * | | | `--SLIST -> SLIST
6116 * | | | `--LITERAL_YIELD -> yield
6117 * | | | |--EXPR -> EXPR
6118 * | | | | `--UNARY_MINUS -> -
6119 * | | | | `--NUM_INT -> 1
6120 * | | | `--SEMI -> ;
6121 * | | `--RCURLY -> }
6122 * | `--SEMI -> ;
6123 * }
6124 *
6125 *
6126 * @see #LITERAL_SWITCH
6127 * @see #CASE_GROUP
6128 * @see #SLIST
6129 * @see #SWITCH_RULE
6130 *
6131 * @see <a href="https://docs.oracle.com/javase/specs/jls/se13/preview/switch-expressions.html">
6132 * Java Language Specification, §14.21</a>
6133 *
6134 * @since 8.36
6135 */
6136 public static final int LITERAL_YIELD =
6137 JavaLanguageLexer.LITERAL_YIELD;
6138
6139 /**
6140 * Switch Expressions.
6141 *
6142 * <p>For example:</p>
6143 * {@snippet :
6144 * return switch (day) {
6145 * case SAT, SUN -> "Weekend";
6146 * default -> "Working day";
6147 * };
6148 * }
6149 *
6150 * <p>parses as:</p>
6151 * {@snippet :
6152 * LITERAL_RETURN -> return
6153 * |--EXPR -> EXPR
6154 * | `--LITERAL_SWITCH -> switch
6155 * | |--LPAREN -> (
6156 * | |--EXPR -> EXPR
6157 * | | `--IDENT -> day
6158 * | |--RPAREN -> )
6159 * | |--LCURLY -> {
6160 * | |--SWITCH_RULE -> SWITCH_RULE
6161 * | | |--LITERAL_CASE -> case
6162 * | | | |--EXPR -> EXPR
6163 * | | | | `--IDENT -> SAT
6164 * | | | |--COMMA -> ,
6165 * | | | `--EXPR -> EXPR
6166 * | | | `--IDENT -> SUN
6167 * | | |--LAMBDA -> ->
6168 * | | |--EXPR -> EXPR
6169 * | | | `--STRING_LITERAL -> "Weekend"
6170 * | | `--SEMI -> ;
6171 * | |--SWITCH_RULE -> SWITCH_RULE
6172 * | | |--LITERAL_DEFAULT -> default
6173 * | | |--LAMBDA -> ->
6174 * | | |--EXPR -> EXPR
6175 * | | | `--STRING_LITERAL -> "Working day"
6176 * | | `--SEMI -> ;
6177 * | `--RCURLY -> }
6178 * `--SEMI -> ;
6179 * }
6180 *
6181 * @see #LITERAL_CASE
6182 * @see #LITERAL_DEFAULT
6183 * @see #LITERAL_SWITCH
6184 * @see #LITERAL_YIELD
6185 *
6186 * @see <a href="https://docs.oracle.com/javase/specs/jls/se13/preview/switch-expressions.html">
6187 * Java Language Specification, §14.21</a>
6188 *
6189 * @since 8.36
6190 */
6191 public static final int SWITCH_RULE =
6192 JavaLanguageLexer.SWITCH_RULE;
6193
6194 /**
6195 * The {@code non-sealed} keyword. This element appears
6196 * as part of a class or interface declaration.
6197 *
6198 * <p>For example:</p>
6199 * {@snippet :
6200 * non-sealed class Square extends Rectangle { }
6201 * }
6202 *
6203 * <p>parses as:</p>
6204 * {@snippet :
6205 * CLASS_DEF -> CLASS_DEF
6206 * |--MODIFIERS -> MODIFIERS
6207 * | `--LITERAL_NON_SEALED -> non-sealed
6208 * |--LITERAL_CLASS -> class
6209 * |--IDENT -> Square
6210 * |--EXTENDS_CLAUSE -> extends
6211 * | `--IDENT -> Rectangle
6212 * `--OBJBLOCK -> OBJBLOCK
6213 * |--LCURLY -> {
6214 * `--RCURLY -> }
6215 * }
6216 *
6217 * @see <a href="https://docs.oracle.com/en/java/javase/15/docs/specs/sealed-classes-jls.html">
6218 * Java Language Specification, §8.1.1.2</a>
6219 * @see #MODIFIERS
6220 *
6221 * @since 8.42
6222 */
6223 public static final int LITERAL_NON_SEALED =
6224 JavaLanguageLexer.LITERAL_NON_SEALED;
6225
6226 /**
6227 * The {@code sealed} restricted identifier. This element appears
6228 * as part of a class or interface declaration.
6229 *
6230 * <p>For example:</p>
6231 * {@snippet :
6232 * public sealed class Shape permits Circle, Square, Rectangle { }
6233 * }
6234 *
6235 * <p>parses as:</p>
6236 * {@snippet :
6237 * CLASS_DEF -> CLASS_DEF
6238 * |--MODIFIERS -> MODIFIERS
6239 * | |--LITERAL_PUBLIC -> public
6240 * | `--LITERAL_SEALED -> sealed
6241 * |--LITERAL_CLASS -> class
6242 * |--IDENT -> Shape
6243 * |--PERMITS_CLAUSE -> permits
6244 * | |--IDENT -> Circle
6245 * | |--COMMA -> ,
6246 * | |--IDENT -> Square
6247 * | |--COMMA -> ,
6248 * | `--IDENT -> Rectangle
6249 * `--OBJBLOCK -> OBJBLOCK
6250 * |--LCURLY -> {
6251 * `--RCURLY -> }
6252 * }
6253 *
6254 * @see <a href="https://docs.oracle.com/en/java/javase/15/docs/specs/sealed-classes-jls.html">
6255 * Java Language Specification, §8.1.1.2</a>
6256 * @see #MODIFIERS
6257 *
6258 * @since 8.42
6259 */
6260 public static final int LITERAL_SEALED =
6261 JavaLanguageLexer.LITERAL_SEALED;
6262
6263 /**
6264 * The {@code permits} restricted identifier. This element appears
6265 * as part of a class or interface declaration.
6266 *
6267 * <p>For example:</p>
6268 * {@snippet :
6269 * public sealed class Shape permits Circle, Square, Rectangle { }
6270 * }
6271 *
6272 * <p>parses as:</p>
6273 * {@snippet :
6274 * CLASS_DEF -> CLASS_DEF
6275 * |--MODIFIERS -> MODIFIERS
6276 * | |--LITERAL_PUBLIC -> public
6277 * | `--LITERAL_SEALED -> sealed
6278 * |--LITERAL_CLASS -> class
6279 * |--IDENT -> Shape
6280 * |--PERMITS_CLAUSE -> permits
6281 * | |--IDENT -> Circle
6282 * | |--COMMA -> ,
6283 * | |--IDENT -> Square
6284 * | |--COMMA -> ,
6285 * | `--IDENT -> Rectangle
6286 * `--OBJBLOCK -> OBJBLOCK
6287 * |--LCURLY -> {
6288 * `--RCURLY -> }
6289 * }
6290 *
6291 * @see <a href="https://docs.oracle.com/en/java/javase/15/docs/specs/sealed-classes-jls.html">
6292 * Java Language Specification, §9.1.4</a>
6293 * @see #MODIFIERS
6294 *
6295 * @since 8.42
6296 */
6297 public static final int LITERAL_PERMITS =
6298 JavaLanguageLexer.LITERAL_PERMITS;
6299
6300 /**
6301 * A permits clause. A permits clause's children are a comma separated list of one or
6302 * more identifiers.
6303 *
6304 * <p>For example:</p>
6305 * {@snippet :
6306 * public sealed class Shape permits Circle, Square, Rectangle { }
6307 * }
6308 *
6309 * <p>parses as:</p>
6310 * {@snippet :
6311 * CLASS_DEF -> CLASS_DEF
6312 * |--MODIFIERS -> MODIFIERS
6313 * | |--LITERAL_PUBLIC -> public
6314 * | `--LITERAL_SEALED -> sealed
6315 * |--LITERAL_CLASS -> class
6316 * |--IDENT -> Shape
6317 * |--PERMITS_CLAUSE -> permits
6318 * | |--IDENT -> Circle
6319 * | |--COMMA -> ,
6320 * | |--IDENT -> Square
6321 * | |--COMMA -> ,
6322 * | `--IDENT -> Rectangle
6323 * `--OBJBLOCK -> OBJBLOCK
6324 * |--LCURLY -> {
6325 * `--RCURLY -> }
6326 * }
6327 *
6328 * @see <a href="https://docs.oracle.com/en/java/javase/15/docs/specs/sealed-classes-jls.html">
6329 * Java Language Specification, §9.1.4</a>
6330 * @see #MODIFIERS
6331 * @see #CLASS_DEF
6332 * @see #INTERFACE_DEF
6333 * @see #COMMA
6334 * @see #IDENT
6335 *
6336 * @since 8.42
6337 */
6338 public static final int PERMITS_CLAUSE =
6339 JavaLanguageLexer.PERMITS_CLAUSE;
6340
6341 /**
6342 * A pattern definition, excluding simple type pattern (pattern variable)
6343 * definition such as {@code if (o instanceof Integer i){}}. Pattern definitions
6344 * appear as operands of statements and expressions.
6345 *
6346 * <p>For example:</p>
6347 * {@snippet :
6348 * switch(o) {
6349 * case String s when s.length() > 4: // guarded pattern, `PATTERN_DEF`
6350 * break;
6351 * case String s: // type pattern, no `PATTERN_DEF`
6352 * break;
6353 * }
6354 * }
6355 *
6356 * <p>parses as:</p>
6357 * {@snippet :
6358 * LITERAL_SWITCH -> switch
6359 * |--LPAREN -> (
6360 * |--EXPR -> EXPR
6361 * | `--IDENT -> o
6362 * |--RPAREN -> )
6363 * |--LCURLY -> {
6364 * |--CASE_GROUP -> CASE_GROUP
6365 * | |--LITERAL_CASE -> case
6366 * | | |--PATTERN_DEF -> PATTERN_DEF
6367 * | | | `--LITERAL_WHEN -> when
6368 * | | | |--PATTERN_VARIABLE_DEF -> PATTERN_VARIABLE_DEF
6369 * | | | | |--MODIFIERS -> MODIFIERS
6370 * | | | | |--TYPE -> TYPE
6371 * | | | | | `--IDENT -> String
6372 * | | | | `--IDENT -> s
6373 * | | | `--GT -> >
6374 * | | | |--METHOD_CALL -> (
6375 * | | | | |--DOT -> .
6376 * | | | | | |--IDENT -> s
6377 * | | | | | `--IDENT -> length
6378 * | | | | |--ELIST -> ELIST
6379 * | | | | `--RPAREN -> )
6380 * | | | `--NUM_INT -> 4
6381 * | | `--COLON -> :
6382 * | `--SLIST -> SLIST
6383 * | `--LITERAL_BREAK -> break
6384 * | `--SEMI -> ;
6385 * |--CASE_GROUP -> CASE_GROUP
6386 * | |--LITERAL_CASE -> case
6387 * | | |--PATTERN_VARIABLE_DEF -> PATTERN_VARIABLE_DEF
6388 * | | | |--MODIFIERS -> MODIFIERS
6389 * | | | |--TYPE -> TYPE
6390 * | | | | `--IDENT -> String
6391 * | | | `--IDENT -> s
6392 * | | `--COLON -> :
6393 * | `--SLIST -> SLIST
6394 * | `--LITERAL_BREAK -> break
6395 * | `--SEMI -> ;
6396 * `--RCURLY -> }
6397 * }
6398 *
6399 * @see <a href="https://docs.oracle.com/javase/specs/jls/se17/html/jls-14.html#jls-14.30">
6400 * Java Language Specification, §14.30</a>
6401 * @see #LITERAL_SWITCH
6402 * @see #PATTERN_VARIABLE_DEF
6403 * @see #LITERAL_INSTANCEOF
6404 *
6405 * @since 9.3
6406 */
6407 public static final int PATTERN_DEF =
6408 JavaLanguageLexer.PATTERN_DEF;
6409
6410 /**
6411 * A {@code when} clause. Appears as part of a switch label in a guarded pattern definition.
6412 *
6413 * <p>For example:</p>
6414 * {@snippet :
6415 * return switch (o) {
6416 * case Integer i when i >= 0 -> i;
6417 * default -> 2;
6418 * };
6419 * }
6420 *
6421 * <p>parses as:</p>
6422 * {@snippet :
6423 * LITERAL_RETURN -> return
6424 * `--EXPR -> EXPR
6425 * `--LITERAL_SWITCH -> switch
6426 * |--LPAREN -> (
6427 * |--EXPR -> EXPR
6428 * | `--IDENT -> o
6429 * |--RPAREN -> )
6430 * |--LCURLY -> {
6431 * |--SWITCH_RULE -> SWITCH_RULE
6432 * | |--LITERAL_CASE -> case
6433 * | | `--PATTERN_DEF -> PATTERN_DEF
6434 * | | `--LITERAL_WHEN -> when
6435 * | | |--PATTERN_VARIABLE_DEF -> PATTERN_VARIABLE_DEF
6436 * | | | |--MODIFIERS -> MODIFIERS
6437 * | | | |--TYPE -> TYPE
6438 * | | | | `--IDENT -> Integer
6439 * | | | `--IDENT -> i
6440 * | | `--GE -> >=
6441 * | | |--IDENT -> i
6442 * | | `--NUM_INT -> 0
6443 * | |--LAMBDA -> ->
6444 * | |--EXPR -> EXPR
6445 * | | `--IDENT -> i
6446 * | `--SEMI -> ;
6447 * |--SWITCH_RULE -> SWITCH_RULE
6448 * | |--LITERAL_DEFAULT -> default
6449 * | |--LAMBDA -> ->
6450 * | |--EXPR -> EXPR
6451 * | | `--NUM_INT -> 2
6452 * | `--SEMI -> ;
6453 * `--RCURLY -> }
6454 * }
6455 *
6456 * @see <a href="https://docs.oracle.com/javase/specs/jls/se17/html/jls-14.html#jls-14.30">
6457 * Java Language Specification, §14.30</a>
6458 * @see #LITERAL_SWITCH
6459 * @see #PATTERN_VARIABLE_DEF
6460 * @see #LITERAL_INSTANCEOF
6461 * @see #SWITCH_RULE
6462 *
6463 * @since 10.7.0
6464 */
6465 public static final int LITERAL_WHEN =
6466 JavaLanguageLexer.LITERAL_WHEN;
6467
6468 /**
6469 * A {@code record} pattern definition. A record pattern consists of a type,
6470 * a (possibly empty) record component pattern list which is used to match against
6471 * the corresponding record components, and an optional identifier. Appears as part of
6472 * an {@code instanceof} expression or a {@code case} label in a switch.
6473 *
6474 * <p>For example:</p>
6475 * {@snippet :
6476 * if (o instanceof R(String s) myRecord) {}
6477 * }
6478 *
6479 * <p>parses as:</p>
6480 * {@snippet :
6481 * LITERAL_IF -> if
6482 * |--LPAREN -> (
6483 * |--EXPR -> EXPR
6484 * | `--LITERAL_INSTANCEOF -> instanceof
6485 * | |--IDENT -> o
6486 * | `--RECORD_PATTERN_DEF -> RECORD_PATTERN_DEF
6487 * | |--MODIFIERS -> MODIFIERS
6488 * | |--TYPE -> TYPE
6489 * | | `--IDENT -> R
6490 * | |--LPAREN -> (
6491 * | |--RECORD_PATTERN_COMPONENTS -> RECORD_PATTERN_COMPONENTS
6492 * | | `--PATTERN_VARIABLE_DEF -> PATTERN_VARIABLE_DEF
6493 * | | |--MODIFIERS -> MODIFIERS
6494 * | | |--TYPE -> TYPE
6495 * | | | `--IDENT -> String
6496 * | | `--IDENT -> s
6497 * | |--RPAREN -> )
6498 * | `--IDENT -> myRecord
6499 * |--RPAREN -> )
6500 * `--SLIST -> {
6501 * `--RCURLY -> }
6502 * }
6503 *
6504 * @see <a href="https://openjdk.org/jeps/405">JEP 405: Record Patterns</a>
6505 * @see #LITERAL_WHEN
6506 * @see #PATTERN_VARIABLE_DEF
6507 * @see #LITERAL_INSTANCEOF
6508 * @see #SWITCH_RULE
6509 *
6510 * @since 10.12.0
6511 */
6512 public static final int RECORD_PATTERN_DEF =
6513 JavaLanguageLexer.RECORD_PATTERN_DEF;
6514
6515 /**
6516 * A (possibly empty) record component pattern list which is used to match against
6517 * the corresponding record components. Appears as part of a record pattern definition.
6518 *
6519 * <p>For example:</p>
6520 * {@snippet :
6521 * switch (o) {
6522 * case R(String myComponent) when "component".equalsIgnoreCase(myComponent) -> {}
6523 * }
6524 * }
6525 *
6526 * <p>parses as:</p>
6527 * {@snippet :
6528 * LITERAL_SWITCH -> switch
6529 * |--LPAREN -> (
6530 * |--EXPR -> EXPR
6531 * | `--IDENT -> o
6532 * |--RPAREN -> )
6533 * |--LCURLY -> {
6534 * |--SWITCH_RULE -> SWITCH_RULE
6535 * | |--LITERAL_CASE -> case
6536 * | | `--PATTERN_DEF -> PATTERN_DEF
6537 * | | `--LITERAL_WHEN -> when
6538 * | | |--RECORD_PATTERN_DEF -> RECORD_PATTERN_DEF
6539 * | | | |--MODIFIERS -> MODIFIERS
6540 * | | | |--TYPE -> TYPE
6541 * | | | | `--IDENT -> R
6542 * | | | |--LPAREN -> (
6543 * | | | |--RECORD_PATTERN_COMPONENTS -> RECORD_PATTERN_COMPONENTS
6544 * | | | | `--PATTERN_VARIABLE_DEF -> PATTERN_VARIABLE_DEF
6545 * | | | | |--MODIFIERS -> MODIFIERS
6546 * | | | | |--TYPE -> TYPE
6547 * | | | | | `--IDENT -> String
6548 * | | | | `--IDENT -> myComponent
6549 * | | | `--RPAREN -> )
6550 * | | `--METHOD_CALL -> (
6551 * | | |--DOT -> .
6552 * | | | |--STRING_LITERAL -> "component"
6553 * | | | `--IDENT -> equalsIgnoreCase
6554 * | | |--ELIST -> ELIST
6555 * | | | `--EXPR -> EXPR
6556 * | | | `--IDENT -> myComponent
6557 * | | `--RPAREN -> )
6558 * | |--LAMBDA -> ->
6559 * | `--SLIST -> {
6560 * | `--RCURLY -> }
6561 * `--RCURLY -> }
6562 * }
6563 *
6564 * @see <a href="https://openjdk.org/jeps/405">JEP 405: Record Patterns</a>
6565 * @see #LITERAL_WHEN
6566 * @see #PATTERN_VARIABLE_DEF
6567 * @see #LITERAL_INSTANCEOF
6568 * @see #SWITCH_RULE
6569 *
6570 * @since 10.12.0
6571 */
6572 public static final int RECORD_PATTERN_COMPONENTS =
6573 JavaLanguageLexer.RECORD_PATTERN_COMPONENTS;
6574
6575 /**
6576 * An unnamed pattern variable definition. Appears as part of a pattern definition.
6577 *
6578 * <p>For example:</p>
6579 * {@snippet :
6580 * if (r instanceof R(_)) {}
6581 * }
6582 *
6583 * <p>parses as:</p>
6584 * {@snippet :
6585 * LITERAL_IF -> if
6586 * |--LPAREN -> (
6587 * |--EXPR -> EXPR
6588 * | `--LITERAL_INSTANCEOF -> instanceof
6589 * | |--IDENT -> r
6590 * | `--RECORD_PATTERN_DEF -> RECORD_PATTERN_DEF
6591 * | |--MODIFIERS -> MODIFIERS
6592 * | |--TYPE -> TYPE
6593 * | | `--IDENT -> R
6594 * | |--LPAREN -> (
6595 * | |--RECORD_PATTERN_COMPONENTS -> RECORD_PATTERN_COMPONENTS
6596 * | | `--UNNAMED_PATTERN_DEF -> _
6597 * | `--RPAREN -> )
6598 * |--RPAREN -> )
6599 * `--SLIST -> {
6600 * `--RCURLY -> }
6601 * }
6602 *
6603 * @see #RECORD_PATTERN_COMPONENTS
6604 * @see #RECORD_PATTERN_DEF
6605 * @see #LITERAL_SWITCH
6606 * @see #LITERAL_INSTANCEOF
6607 * @see #SWITCH_RULE
6608 * @see #LITERAL_WHEN
6609 * @see #PATTERN_VARIABLE_DEF
6610 * @see #PATTERN_DEF
6611 *
6612 * @since 10.14.0
6613 */
6614 public static final int UNNAMED_PATTERN_DEF =
6615 JavaLanguageLexer.UNNAMED_PATTERN_DEF;
6616
6617 /**
6618 * A {@code module} keyword.
6619 *
6620 * <p>For example:</p>
6621 * {@snippet :
6622 * import module java.base;
6623 * }
6624 *
6625 * <p>parses as:</p>
6626 * {@snippet :
6627 * MODULE_IMPORT -> import
6628 * |--LITERAL_MODULE -> module
6629 * |--DOT -> .
6630 * | |--IDENT -> java
6631 * | `--IDENT -> base
6632 * `--SEMI -> ;
6633 * }
6634 *
6635 * @see <a href="https://docs.oracle.com/javase/specs/jls/se25/html/jls-7.html#jls-7.5.5">
6636 * Java Language Specification, §7.5.5</a>
6637 * @see <a href="https://docs.oracle.com/javase/specs/jls/se25/html/jls-7.html#jls-7.7">
6638 * Java Language Specification, §7.7</a>
6639 * @see #IMPORT
6640 * @see #MODULE_IMPORT
6641 *
6642 * @since 12.2.0
6643 */
6644 public static final int LITERAL_MODULE = JavaLanguageLexer.LITERAL_MODULE;
6645
6646 /**
6647 * A module import declaration - {@code import module}.
6648 *
6649 * <p>For example:</p>
6650 * {@snippet :
6651 * import module java.base;
6652 * }
6653 *
6654 * <p>parses as:</p>
6655 * {@snippet :
6656 * MODULE_IMPORT -> import
6657 * |--LITERAL_MODULE -> module
6658 * |--DOT -> .
6659 * | |--IDENT -> java
6660 * | `--IDENT -> base
6661 * `--SEMI -> ;
6662 * }
6663 *
6664 * @see <a href="https://docs.oracle.com/javase/specs/jls/se25/html/jls-7.html#jls-7.5.5">
6665 * Java Language Specification, §7.5.5</a>
6666 * @see #IMPORT
6667 * @see #LITERAL_MODULE
6668 *
6669 * @since 12.2.0
6670 */
6671 public static final int MODULE_IMPORT = JavaLanguageLexer.MODULE_IMPORT;
6672
6673 /**
6674 * An {@code open} keyword. This keyword marks a module declaration as open,
6675 * making all its packages available for deep reflection. It appears as a
6676 * child of {@link #MODULE_DEF}.
6677 *
6678 * <p>For example:</p>
6679 * {@snippet :
6680 * open module com.example.app {
6681 * }
6682 * }
6683 *
6684 * <p>parses as:</p>
6685 * {@snippet :
6686 * MODULE_DEF -> MODULE_DEF
6687 * |--ANNOTATIONS -> ANNOTATIONS
6688 * |--LITERAL_OPEN -> open
6689 * |--LITERAL_MODULE -> module
6690 * |--DOT -> .
6691 * | |--DOT -> .
6692 * | | |--IDENT -> com
6693 * | | `--IDENT -> example
6694 * | `--IDENT -> app
6695 * `--DIRECTIVE_BLOCK -> DIRECTIVE_BLOCK
6696 * |--LCURLY -> {
6697 * `--RCURLY -> }
6698 * }
6699 *
6700 * @see <a href="https://docs.oracle.com/javase/specs/jls/se25/html/jls-7.html#jls-7.7">
6701 * Java Language Specification, §7.7</a>
6702 * @see #MODULE_DEF
6703 *
6704 * @since 14.0.0
6705 */
6706 public static final int LITERAL_OPEN = JavaLanguageLexer.LITERAL_OPEN;
6707
6708 /**
6709 * A {@code transitive} keyword. This keyword is a modifier of a
6710 * {@link #REQUIRES} directive and appears as a child of it.
6711 *
6712 * <p>For example:</p>
6713 * {@snippet :
6714 * requires transitive java.sql;
6715 * }
6716 *
6717 * <p>parses as:</p>
6718 * {@snippet :
6719 * REQUIRES -> requires
6720 * |--LITERAL_TRANSITIVE -> transitive
6721 * |--DOT -> .
6722 * | |--IDENT -> java
6723 * | `--IDENT -> sql
6724 * `--SEMI -> ;
6725 * }
6726 *
6727 * @see <a href="https://docs.oracle.com/javase/specs/jls/se25/html/jls-7.html#jls-7.7.1">
6728 * Java Language Specification, §7.7.1</a>
6729 * @see #REQUIRES
6730 *
6731 * @since 14.0.0
6732 */
6733 public static final int LITERAL_TRANSITIVE = JavaLanguageLexer.LITERAL_TRANSITIVE;
6734
6735 /**
6736 * A module declaration. The declaration of a Java Platform Module System
6737 * module, as found in a {@code module-info.java} file. Its children are
6738 * an {@link #ANNOTATIONS} node (which may be empty), an optional
6739 * {@link #LITERAL_OPEN}, a {@link #LITERAL_MODULE}, the module name, and
6740 * a {@link #DIRECTIVE_BLOCK}.
6741 *
6742 * <p>For example:</p>
6743 * {@snippet :
6744 * module com.example.app {
6745 * requires java.base;
6746 * }
6747 * }
6748 *
6749 * <p>parses as:</p>
6750 * {@snippet :
6751 * COMPILATION_UNIT -> COMPILATION_UNIT
6752 * `--MODULE_DEF -> MODULE_DEF
6753 * |--ANNOTATIONS -> ANNOTATIONS
6754 * |--LITERAL_MODULE -> module
6755 * |--DOT -> .
6756 * | |--DOT -> .
6757 * | | |--IDENT -> com
6758 * | | `--IDENT -> example
6759 * | `--IDENT -> app
6760 * `--DIRECTIVE_BLOCK -> DIRECTIVE_BLOCK
6761 * |--LCURLY -> {
6762 * |--REQUIRES -> requires
6763 * | |--DOT -> .
6764 * | | |--IDENT -> java
6765 * | | `--IDENT -> base
6766 * | `--SEMI -> ;
6767 * `--RCURLY -> }
6768 * }
6769 *
6770 * @see <a href="https://docs.oracle.com/javase/specs/jls/se25/html/jls-7.html#jls-7.7">
6771 * Java Language Specification, §7.7</a>
6772 * @see #DIRECTIVE_BLOCK
6773 * @see #LITERAL_MODULE
6774 * @see #LITERAL_OPEN
6775 * @see #ANNOTATIONS
6776 *
6777 * @since 14.0.0
6778 */
6779 public static final int MODULE_DEF = JavaLanguageLexer.MODULE_DEF;
6780
6781 /**
6782 * A directive block. The braced body of a module declaration, containing
6783 * zero or more module directives. It is a child of {@link #MODULE_DEF}.
6784 *
6785 * <p>For example:</p>
6786 * {@snippet :
6787 * module com.example.app {
6788 * uses com.example.api.Service;
6789 * }
6790 * }
6791 *
6792 * <p>parses as:</p>
6793 * {@snippet :
6794 * MODULE_DEF -> MODULE_DEF
6795 * |--ANNOTATIONS -> ANNOTATIONS
6796 * |--LITERAL_MODULE -> module
6797 * |--DOT -> .
6798 * | |--DOT -> .
6799 * | | |--IDENT -> com
6800 * | | `--IDENT -> example
6801 * | `--IDENT -> app
6802 * `--DIRECTIVE_BLOCK -> DIRECTIVE_BLOCK
6803 * |--LCURLY -> {
6804 * |--USES -> uses
6805 * | |--DOT -> .
6806 * | | |--DOT -> .
6807 * | | | |--DOT -> .
6808 * | | | | |--IDENT -> com
6809 * | | | | `--IDENT -> example
6810 * | | | `--IDENT -> api
6811 * | | `--IDENT -> Service
6812 * | `--SEMI -> ;
6813 * `--RCURLY -> }
6814 * }
6815 *
6816 * @see <a href="https://docs.oracle.com/javase/specs/jls/se25/html/jls-7.html#jls-7.7">
6817 * Java Language Specification, §7.7</a>
6818 * @see #MODULE_DEF
6819 *
6820 * @since 14.0.0
6821 */
6822 public static final int DIRECTIVE_BLOCK = JavaLanguageLexer.DIRECTIVE_BLOCK;
6823
6824 /**
6825 * A requires directive. Declares a dependence of the current module on
6826 * another module. Its children are optional {@link #LITERAL_TRANSITIVE}
6827 * or {@link #LITERAL_STATIC} modifiers, the name of the required module,
6828 * and a semicolon.
6829 *
6830 * <p>For example:</p>
6831 * {@snippet :
6832 * requires transitive java.sql;
6833 * }
6834 *
6835 * <p>parses as:</p>
6836 * {@snippet :
6837 * REQUIRES -> requires
6838 * |--LITERAL_TRANSITIVE -> transitive
6839 * |--DOT -> .
6840 * | |--IDENT -> java
6841 * | `--IDENT -> sql
6842 * `--SEMI -> ;
6843 * }
6844 *
6845 * @see <a href="https://docs.oracle.com/javase/specs/jls/se25/html/jls-7.html#jls-7.7.1">
6846 * Java Language Specification, §7.7.1</a>
6847 * @see #DIRECTIVE_BLOCK
6848 * @see #LITERAL_TRANSITIVE
6849 * @see #LITERAL_STATIC
6850 *
6851 * @since 14.0.0
6852 */
6853 public static final int REQUIRES = JavaLanguageLexer.REQUIRES;
6854
6855 /**
6856 * An exports directive. Makes a package of the current module accessible
6857 * to other modules. Its children are the exported package name, an
6858 * optional {@link #TO} clause, and a semicolon.
6859 *
6860 * <p>For example:</p>
6861 * {@snippet :
6862 * exports com.example.api to com.example.one, com.example.two;
6863 * }
6864 *
6865 * <p>parses as:</p>
6866 * {@snippet :
6867 * EXPORTS -> exports
6868 * |--DOT -> .
6869 * | |--DOT -> .
6870 * | | |--IDENT -> com
6871 * | | `--IDENT -> example
6872 * | `--IDENT -> api
6873 * |--TO -> to
6874 * | |--DOT -> .
6875 * | | |--DOT -> .
6876 * | | | |--IDENT -> com
6877 * | | | `--IDENT -> example
6878 * | | `--IDENT -> one
6879 * | |--COMMA -> ,
6880 * | `--DOT -> .
6881 * | |--DOT -> .
6882 * | | |--IDENT -> com
6883 * | | `--IDENT -> example
6884 * | `--IDENT -> two
6885 * `--SEMI -> ;
6886 * }
6887 *
6888 * @see <a href="https://docs.oracle.com/javase/specs/jls/se25/html/jls-7.html#jls-7.7.2">
6889 * Java Language Specification, §7.7.2</a>
6890 * @see #DIRECTIVE_BLOCK
6891 * @see #TO
6892 *
6893 * @since 14.0.0
6894 */
6895 public static final int EXPORTS = JavaLanguageLexer.EXPORTS;
6896
6897 /**
6898 * An opens directive. Makes a package of the current module available for
6899 * deep reflection to other modules. Its children are the opened package
6900 * name, an optional {@link #TO} clause, and a semicolon.
6901 *
6902 * <p>For example:</p>
6903 * {@snippet :
6904 * opens com.example.model;
6905 * }
6906 *
6907 * <p>parses as:</p>
6908 * {@snippet :
6909 * OPENS -> opens
6910 * |--DOT -> .
6911 * | |--DOT -> .
6912 * | | |--IDENT -> com
6913 * | | `--IDENT -> example
6914 * | `--IDENT -> model
6915 * `--SEMI -> ;
6916 * }
6917 *
6918 * @see <a href="https://docs.oracle.com/javase/specs/jls/se25/html/jls-7.html#jls-7.7.2">
6919 * Java Language Specification, §7.7.2</a>
6920 * @see #DIRECTIVE_BLOCK
6921 * @see #TO
6922 *
6923 * @since 14.0.0
6924 */
6925 public static final int OPENS = JavaLanguageLexer.OPENS;
6926
6927 /**
6928 * A uses directive. Declares a service whose implementations the current
6929 * module discovers via {@code java.util.ServiceLoader}. Its children are
6930 * the service type name and a semicolon.
6931 *
6932 * <p>For example:</p>
6933 * {@snippet :
6934 * uses com.example.api.Service;
6935 * }
6936 *
6937 * <p>parses as:</p>
6938 * {@snippet :
6939 * USES -> uses
6940 * |--DOT -> .
6941 * | |--DOT -> .
6942 * | | |--DOT -> .
6943 * | | | |--IDENT -> com
6944 * | | | `--IDENT -> example
6945 * | | `--IDENT -> api
6946 * | `--IDENT -> Service
6947 * `--SEMI -> ;
6948 * }
6949 *
6950 * @see <a href="https://docs.oracle.com/javase/specs/jls/se25/html/jls-7.html#jls-7.7.3">
6951 * Java Language Specification, §7.7.3</a>
6952 * @see #DIRECTIVE_BLOCK
6953 *
6954 * @since 14.0.0
6955 */
6956 public static final int USES = JavaLanguageLexer.USES;
6957
6958 /**
6959 * A provides directive. Declares implementations of a service that the
6960 * current module supplies. Its children are the service type name, a
6961 * {@link #WITH} clause, and a semicolon.
6962 *
6963 * <p>For example:</p>
6964 * {@snippet :
6965 * provides com.example.Service with com.example.Impl;
6966 * }
6967 *
6968 * <p>parses as:</p>
6969 * {@snippet :
6970 * PROVIDES -> provides
6971 * |--DOT -> .
6972 * | |--DOT -> .
6973 * | | |--IDENT -> com
6974 * | | `--IDENT -> example
6975 * | `--IDENT -> Service
6976 * |--WITH -> with
6977 * | `--DOT -> .
6978 * | |--DOT -> .
6979 * | | |--IDENT -> com
6980 * | | `--IDENT -> example
6981 * | `--IDENT -> Impl
6982 * `--SEMI -> ;
6983 * }
6984 *
6985 * @see <a href="https://docs.oracle.com/javase/specs/jls/se25/html/jls-7.html#jls-7.7.4">
6986 * Java Language Specification, §7.7.4</a>
6987 * @see #DIRECTIVE_BLOCK
6988 * @see #WITH
6989 *
6990 * @since 14.0.0
6991 */
6992 public static final int PROVIDES = JavaLanguageLexer.PROVIDES;
6993
6994 /**
6995 * A to clause. Limits an {@link #EXPORTS} or {@link #OPENS} directive to
6996 * the named friend modules. Its children are the module names, separated
6997 * by commas.
6998 *
6999 * <p>For example:</p>
7000 * {@snippet :
7001 * opens com.example.secrets to com.example.friend;
7002 * }
7003 *
7004 * <p>parses as:</p>
7005 * {@snippet :
7006 * OPENS -> opens
7007 * |--DOT -> .
7008 * | |--DOT -> .
7009 * | | |--IDENT -> com
7010 * | | `--IDENT -> example
7011 * | `--IDENT -> secrets
7012 * |--TO -> to
7013 * | `--DOT -> .
7014 * | |--DOT -> .
7015 * | | |--IDENT -> com
7016 * | | `--IDENT -> example
7017 * | `--IDENT -> friend
7018 * `--SEMI -> ;
7019 * }
7020 *
7021 * @see <a href="https://docs.oracle.com/javase/specs/jls/se25/html/jls-7.html#jls-7.7.2">
7022 * Java Language Specification, §7.7.2</a>
7023 * @see #EXPORTS
7024 * @see #OPENS
7025 *
7026 * @since 14.0.0
7027 */
7028 public static final int TO = JavaLanguageLexer.TO;
7029
7030 /**
7031 * A with clause. Names the implementation types supplied by a
7032 * {@link #PROVIDES} directive. Its children are the implementation type
7033 * names, separated by commas.
7034 *
7035 * <p>For example:</p>
7036 * {@snippet :
7037 * provides com.example.Service with com.example.Impl;
7038 * }
7039 *
7040 * <p>parses as:</p>
7041 * {@snippet :
7042 * PROVIDES -> provides
7043 * |--DOT -> .
7044 * | |--DOT -> .
7045 * | | |--IDENT -> com
7046 * | | `--IDENT -> example
7047 * | `--IDENT -> Service
7048 * |--WITH -> with
7049 * | `--DOT -> .
7050 * | |--DOT -> .
7051 * | | |--IDENT -> com
7052 * | | `--IDENT -> example
7053 * | `--IDENT -> Impl
7054 * `--SEMI -> ;
7055 * }
7056 *
7057 * @see <a href="https://docs.oracle.com/javase/specs/jls/se25/html/jls-7.html#jls-7.7.4">
7058 * Java Language Specification, §7.7.4</a>
7059 * @see #PROVIDES
7060 *
7061 * @since 14.0.0
7062 */
7063 public static final int WITH = JavaLanguageLexer.WITH;
7064
7065 /** Prevent instantiation. */
7066 private TokenTypes() {
7067 }
7068
7069 }