KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > puppycrawl > tools > checkstyle > api > TokenTypes


1 ////////////////////////////////////////////////////////////////////////////////
2
// checkstyle: Checks Java source code for adherence to a set of rules.
3
// Copyright (C) 2001-2005 Oliver Burn
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
package com.puppycrawl.tools.checkstyle.api;
20
21 import java.util.Map JavaDoc;
22 import java.util.HashMap JavaDoc;
23 import java.util.ResourceBundle JavaDoc;
24 import java.lang.reflect.Field JavaDoc;
25
26 import com.puppycrawl.tools.checkstyle.grammars.GeneratedJavaTokenTypes;
27
28 /**
29  * Contains the constants for all the tokens contained in the Abstract
30  * Syntax Tree.
31  *
32  * <p>Implementation detail: This class has been introduced to break
33  * the circular dependency between packages.<p>
34  *
35  * @author Oliver Burn
36  * @author <a HREF="mailto:dobratzp@ele.uri.edu">Peter Dobratz</a>
37  * @version 1.0
38  */

39 public final class TokenTypes
40 {
41     ///CLOVER:OFF
42
/** prevent instantiation */
43     private TokenTypes()
44     {
45     }
46     ///CLOVER:ON
47

48     // The following three types are never part of an AST,
49
// left here as a reminder so nobody will readd them accidentally
50

51     /* * token representing a NULL_TREE_LOOKAHEAD */
52     // public static final int NULL_TREE_LOOKAHEAD = 3;
53
/* * token representing a BLOCK */
54     // public static final int BLOCK = 4;
55
/* * token representing a VOCAB */
56     // public static final int VOCAB = 149;
57

58     // These are the types that can actually occur in an AST
59
// it makes sense to register Checks for these types
60

61     /**
62      * The end of file token. This is the root node for the source
63      * file. It's children are an optional package definition, zero
64      * or more import statements, and one or more class or interface
65      * definitions.
66      *
67      * @see #PACKAGE_DEF
68      * @see #IMPORT
69      * @see #CLASS_DEF
70      * @see #INTERFACE_DEF
71      **/

72     public static final int EOF = GeneratedJavaTokenTypes.EOF;
73     /**
74      * Modifiers for type, method, and field declarations. The
75      * modifiers element is always present even though it may have no
76      * children.
77      *
78      * @see <a
79      * HREF="http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html">Java
80      * Language Specification, Chapter 8</a>
81      * @see #LITERAL_PUBLIC
82      * @see #LITERAL_PROTECTED
83      * @see #LITERAL_PRIVATE
84      * @see #ABSTRACT
85      * @see #LITERAL_STATIC
86      * @see #FINAL
87      * @see #LITERAL_TRANSIENT
88      * @see #LITERAL_VOLATILE
89      * @see #LITERAL_SYNCHRONIZED
90      * @see #LITERAL_NATIVE
91      * @see #STRICTFP
92      * @see #ANNOTATION
93      **/

94     public static final int MODIFIERS = GeneratedJavaTokenTypes.MODIFIERS;
95     /**
96      * An object block. These are children of class, interface, enum,
97      * annotation and enum constant declarations.
98      * Also, object blocks are children of the new keyword when defining
99      * anonymous inner types.
100      *
101      * @see #LCURLY
102      * @see #INSTANCE_INIT
103      * @see #STATIC_INIT
104      * @see #CLASS_DEF
105      * @see #CTOR_DEF
106      * @see #METHOD_DEF
107      * @see #VARIABLE_DEF
108      * @see #RCURLY
109      * @see #INTERFACE_DEF
110      * @see #LITERAL_NEW
111      * @see #ENUM_DEF
112      * @see #ENUM_CONSTANT_DEF
113      * @see #ANNOTATION_DEF
114      **/

115     public static final int OBJBLOCK = GeneratedJavaTokenTypes.OBJBLOCK;
116     /**
117      * A list of statements.
118      *
119      * @see #RCURLY
120      * @see #EXPR
121      * @see #LABELED_STAT
122      * @see #LITERAL_THROWS
123      * @see #LITERAL_RETURN
124      * @see #SEMI
125      * @see #METHOD_DEF
126      * @see #CTOR_DEF
127      * @see #LITERAL_FOR
128      * @see #LITERAL_WHILE
129      * @see #LITERAL_IF
130      * @see #LITERAL_ELSE
131      * @see #CASE_GROUP
132      **/

133     public static final int SLIST = GeneratedJavaTokenTypes.SLIST;
134     /**
135      * A constructor declaration.
136      *
137      * <p>For example:</p>
138      * <pre>
139      * public SpecialEntry(int value, String text)
140      * {
141      * this.value = value;
142      * this.text = text;
143      * }
144      * </pre>
145      * <p>parses as:</p>
146      * <pre>
147      * +--CTOR_DEF
148      * |
149      * +--MODIFIERS
150      * |
151      * +--LITERAL_PUBLIC (public)
152      * +--IDENT (SpecialEntry)
153      * +--LPAREN (()
154      * +--PARAMETERS
155      * |
156      * +--PARAMETER_DEF
157      * |
158      * +--MODIFIERS
159      * +--TYPE
160      * |
161      * +--LITERAL_INT (int)
162      * +--IDENT (value)
163      * +--COMMA (,)
164      * +--PARAMETER_DEF
165      * |
166      * +--MODIFIERS
167      * +--TYPE
168      * |
169      * +--IDENT (String)
170      * +--IDENT (text)
171      * +--RPAREN ())
172      * +--SLIST ({)
173      * |
174      * +--EXPR
175      * |
176      * +--ASSIGN (=)
177      * |
178      * +--DOT (.)
179      * |
180      * +--LITERAL_THIS (this)
181      * +--IDENT (value)
182      * +--IDENT (value)
183      * +--SEMI (;)
184      * +--EXPR
185      * |
186      * +--ASSIGN (=)
187      * |
188      * +--DOT (.)
189      * |
190      * +--LITERAL_THIS (this)
191      * +--IDENT (text)
192      * +--IDENT (text)
193      * +--SEMI (;)
194      * +--RCURLY (})
195      * </pre>
196      *
197      * @see #OBJBLOCK
198      * @see #CLASS_DEF
199      **/

200     public static final int CTOR_DEF = GeneratedJavaTokenTypes.CTOR_DEF;
201     /**
202      * A method declaration. The children are modifiers, type parameters,
203      * return type, method name, parameter list, an optional throws list, and
204      * statement list. The statement list is omitted if the method
205      * declaration appears in an interface declaration. Method
206      * declarations may appear inside object blocks of class
207      * declarations, interface declarations, enum declarations,
208      * enum constant declarations or anonymous inner-class declarations.
209      *
210      * <p>For example:</p>
211      *
212      * <pre>
213      * public static int square(int x)
214      * {
215      * return x*x;
216      * }
217      * </pre>
218      *
219      * <p>parses as:</p>
220      *
221      * <pre>
222      * +--METHOD_DEF
223      * |
224      * +--MODIFIERS
225      * |
226      * +--LITERAL_PUBLIC (public)
227      * +--LITERAL_STATIC (static)
228      * +--TYPE
229      * |
230      * +--LITERAL_INT (int)
231      * +--IDENT (square)
232      * +--PARAMETERS
233      * |
234      * +--PARAMETER_DEF
235      * |
236      * +--MODIFIERS
237      * +--TYPE
238      * |
239      * +--LITERAL_INT (int)
240      * +--IDENT (x)
241      * +--SLIST ({)
242      * |
243      * +--LITERAL_RETURN (return)
244      * |
245      * +--EXPR
246      * |
247      * +--STAR (*)
248      * |
249      * +--IDENT (x)
250      * +--IDENT (x)
251      * +--SEMI (;)
252      * +--RCURLY (})
253      * </pre>
254      *
255      * @see #MODIFIERS
256      * @see #TYPE_PARAMETERS
257      * @see #TYPE
258      * @see #IDENT
259      * @see #PARAMETERS
260      * @see #LITERAL_THROWS
261      * @see #SLIST
262      * @see #OBJBLOCK
263      **/

264     public static final int METHOD_DEF = GeneratedJavaTokenTypes.METHOD_DEF;
265     /**
266      * A field or local variable declaration. The children are
267      * modifiers, type, the identifier name, and an optional
268      * assignment statement.
269      *
270      * @see #MODIFIERS
271      * @see #TYPE
272      * @see #IDENT
273      * @see #ASSIGN
274      **/

275     public static final int VARIABLE_DEF =
276         GeneratedJavaTokenTypes.VARIABLE_DEF;
277
278     /**
279      * An instance initializer. Zero or more instance initializers
280      * may appear in class and enum definitions. This token will be a child
281      * of the object block of the declaring type.
282      *
283      * @see <a
284      * HREF="http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#246032">Java
285      * Language Specification&sect;8.6</a>
286      * @see #SLIST
287      * @see #OBJBLOCK
288      **/

289     public static final int INSTANCE_INIT =
290         GeneratedJavaTokenTypes.INSTANCE_INIT;
291
292     /**
293      * A static initialization block. Zero or more static
294      * initializers may be children of the object block of a class
295      * or enum declaration (interfaces cannot have static initializers). The
296      * first and only child is a statement list.
297      *
298      * @see <a
299      * HREF="http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#39245">Java
300      * Language Specification, &sect;8.7</a>
301      * @see #SLIST
302      * @see #OBJBLOCK
303      **/

304     public static final int STATIC_INIT =
305         GeneratedJavaTokenTypes.STATIC_INIT;
306
307     /**
308      * A type. This is either a return type of a method or a type of
309      * a variable or field. The first child of this element is the
310      * actual type. This may be a primitive type, an identifier, a
311      * dot which is the root of a fully qualified type, or an array of
312      * any of these. The second child may be type arguments to the type.
313      *
314      * @see #VARIABLE_DEF
315      * @see #METHOD_DEF
316      * @see #PARAMETER_DEF
317      * @see #IDENT
318      * @see #DOT
319      * @see #LITERAL_VOID
320      * @see #LITERAL_BOOLEAN
321      * @see #LITERAL_BYTE
322      * @see #LITERAL_CHAR
323      * @see #LITERAL_SHORT
324      * @see #LITERAL_INT
325      * @see #LITERAL_FLOAT
326      * @see #LITERAL_LONG
327      * @see #LITERAL_DOUBLE
328      * @see #ARRAY_DECLARATOR
329      * @see #TYPE_ARGUMENTS
330      **/

331     public static final int TYPE = GeneratedJavaTokenTypes.TYPE;
332     /**
333      * A class declaration.
334      *
335      * <p>For example:</p>
336      * <pre>
337      * public class MyClass
338      * implements Serializable
339      * {
340      * }
341      * </pre>
342      * <p>parses as:</p>
343      * <pre>
344      * +--CLASS_DEF
345      * |
346      * +--MODIFIERS
347      * |
348      * +--LITERAL_PUBLIC (public)
349      * +--LITERAL_CLASS (class)
350      * +--IDENT (MyClass)
351      * +--EXTENDS_CLAUSE
352      * +--IMPLEMENTS_CLAUSE
353      * |
354      * +--IDENT (Serializable)
355      * +--OBJBLOCK
356      * |
357      * +--LCURLY ({)
358      * +--RCURLY (})
359      * </pre>
360      *
361      * @see <a
362      * HREF="http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html">Java
363      * Language Specification, Chapter 8</a>
364      * @see #MODIFIERS
365      * @see #IDENT
366      * @see #EXTENDS_CLAUSE
367      * @see #IMPLEMENTS_CLAUSE
368      * @see #OBJBLOCK
369      * @see #LITERAL_NEW
370      **/

371     public static final int CLASS_DEF = GeneratedJavaTokenTypes.CLASS_DEF;
372     /**
373      * An interface declaration.
374      *
375      * <p>For example:</p>
376      *
377      * <pre>
378      * public interface MyInterface
379      * {
380      * }
381      *
382      * </pre>
383      *
384      * <p>parses as:</p>
385      *
386      * <pre>
387      * +--INTERFACE_DEF
388      * |
389      * +--MODIFIERS
390      * |
391      * +--LITERAL_PUBLIC (public)
392      * +--LITERAL_INTERFACE (interface)
393      * +--IDENT (MyInterface)
394      * +--EXTENDS_CLAUSE
395      * +--OBJBLOCK
396      * |
397      * +--LCURLY ({)
398      * +--RCURLY (})
399      * </pre>
400      *
401      * @see <a
402      * HREF="http://java.sun.com/docs/books/jls/second_edition/html/interfaces.doc.html">Java
403      * Language Specification, Chapter 9</a>
404      * @see #MODIFIERS
405      * @see #IDENT
406      * @see #EXTENDS_CLAUSE
407      * @see #OBJBLOCK
408      **/

409     public static final int INTERFACE_DEF =
410         GeneratedJavaTokenTypes.INTERFACE_DEF;
411
412     /**
413      * The package declaration. This is optional, but if it is
414      * included, then there is only one package declaration per source
415      * file and it must be the first non-comment in the file. A package
416      * declaration may be annotated in which case the annotations comes
417      * before the rest of the declaration (and are the first children).
418      *
419      * <p>For example:</p>
420      *
421      * <pre>
422      * package com.puppycrawl.tools.checkstyle.api;
423      * </pre>
424      *
425      * <p>parses as:</p>
426      *
427      * <pre>
428      * +--PACKAGE_DEF (package)
429      * |
430      * +--ANNOTATIONS
431      * +--DOT (.)
432      * |
433      * +--DOT (.)
434      * |
435      * +--DOT (.)
436      * |
437      * +--DOT (.)
438      * |
439      * +--IDENT (com)
440      * +--IDENT (puppycrawl)
441      * +--IDENT (tools)
442      * +--IDENT (checkstyle)
443      * +--IDENT (api)
444      * +--SEMI (;)
445      * </pre>
446      *
447      * @see <a
448      * HREF="http://java.sun.com/docs/books/jls/second_edition/html/packages.doc.html#26619">Java
449      * Language Specification &sect;7.4</a>
450      * @see #DOT
451      * @see #IDENT
452      * @see #SEMI
453      * @see #ANNOTATIONS
454      * @see FullIdent
455      **/

456     public static final int PACKAGE_DEF = GeneratedJavaTokenTypes.PACKAGE_DEF;
457     /**
458      * An array declaration.
459      *
460      * <p>If the array declaration represents a type, then the type of
461      * the array elements is the first child. Multidimensional arrays
462      * may be regarded as arrays of arrays. In other words, the first
463      * child of the array declaration is another array
464      * declaration.</p>
465      *
466      * <p>For example:</p>
467      * <pre>
468      * int[] x;
469      * </pre>
470      * <p>parses as:</p>
471      * <pre>
472      * +--VARIABLE_DEF
473      * |
474      * +--MODIFIERS
475      * +--TYPE
476      * |
477      * +--ARRAY_DECLARATOR ([)
478      * |
479      * +--LITERAL_INT (int)
480      * +--IDENT (x)
481      * +--SEMI (;)
482      * </pre>
483      *
484      * <p>The array declaration may also represent an inline array
485      * definition. In this case, the first child will be either an
486      * expression specifying the length of the array or an array
487      * initialization block.</p>
488      *
489      * @see <a
490      * HREF="http://java.sun.com/docs/books/jls/second_edition/html/arrays.doc.html">Java
491      * Language Specification Chapter 10</a>
492      * @see #TYPE
493      * @see #ARRAY_INIT
494      **/

495     public static final int ARRAY_DECLARATOR =
496         GeneratedJavaTokenTypes.ARRAY_DECLARATOR;
497
498     /**
499      * An extends clause. This appear as part of class and interface
500      * definitions. This element appears even if the
501      * <code>extends</code> keyword is not explicitly used. The child
502      * is an optional identifier.
503      *
504      * <p>For example:</p>
505      * <pre>
506      * </pre>
507      * <p>parses as:</p>
508      * <pre>
509      * +--EXTENDS_CLAUSE
510      * |
511      * +--DOT (.)
512      * |
513      * +--DOT (.)
514      * |
515      * +--IDENT (java)
516      * +--IDENT (util)
517      * +--IDENT (LinkedList)
518      * </pre>
519      *
520      * @see #IDENT
521      * @see #DOT
522      * @see #CLASS_DEF
523      * @see #INTERFACE_DEF
524      * @see FullIdent
525      **/

526     public static final int EXTENDS_CLAUSE =
527         GeneratedJavaTokenTypes.EXTENDS_CLAUSE;
528
529     /**
530      * An implements clause. This always appears in a class or enum
531      * declaration, even if there are no implemented interfaces. The
532      * children are a comma separated list of zero or more
533      * identifiers.
534      *
535      * <p>For example:</p>
536      * <pre>
537      * implements Serializable, Comparable
538      * </pre>
539      * <p>parses as:</p>
540      * <pre>
541      * +--IMPLEMENTS_CLAUSE
542      * |
543      * +--IDENT (Serializable)
544      * +--COMMA (,)
545      * +--IDENT (Comparable)
546      * </pre>
547      *
548      * @see #IDENT
549      * @see #DOT
550      * @see #COMMA
551      * @see #CLASS_DEF
552      * @see #ENUM_DEF
553      **/

554     public static final int IMPLEMENTS_CLAUSE =
555         GeneratedJavaTokenTypes.IMPLEMENTS_CLAUSE;
556
557     /**
558      * A list of parameters to a method or constructor. The children
559      * are zero or more parameter declarations separated by commas.
560      *
561      * <p>For example</p>
562      * <pre>
563      * int start, int end
564      * </pre>
565      * <p>parses as:</p>
566      * <pre>
567      * +--PARAMETERS
568      * |
569      * +--PARAMETER_DEF
570      * |
571      * +--MODIFIERS
572      * +--TYPE
573      * |
574      * +--LITERAL_INT (int)
575      * +--IDENT (start)
576      * +--COMMA (,)
577      * +--PARAMETER_DEF
578      * |
579      * +--MODIFIERS
580      * +--TYPE
581      * |
582      * +--LITERAL_INT (int)
583      * +--IDENT (end)
584      * </pre>
585      *
586      * @see #PARAMETER_DEF
587      * @see #COMMA
588      * @see #METHOD_DEF
589      * @see #CTOR_DEF
590      **/

591     public static final int PARAMETERS = GeneratedJavaTokenTypes.PARAMETERS;
592     /**
593      * A parameter declaration. The last parameter in a list of parameters may
594      * be variable length (indicated by the ELLIPSIS child node immediately
595      * after the TYPE child).
596      *
597      * @see #MODIFIERS
598      * @see #TYPE
599      * @see #IDENT
600      * @see #PARAMETERS
601      * @see #ELLIPSIS
602      **/

603     public static final int PARAMETER_DEF =
604         GeneratedJavaTokenTypes.PARAMETER_DEF;
605
606     /**
607      * A labeled statement.
608      *
609      * <p>For example:</p>
610      * <pre>
611      * outside: ;
612      * </pre>
613      * <p>parses as:</p>
614      * <pre>
615      * +--LABELED_STAT (:)
616      * |
617      * +--IDENT (outside)
618      * +--EMPTY_STAT (;)
619      * </pre>
620      *
621      * @see <a
622      * HREF="http://java.sun.com/docs/books/jls/second_edition/html/statements.doc.html#78993">Java
623      * Language Specification, &sect;14.7</a>
624      * @see #SLIST
625      **/

626     public static final int LABELED_STAT =
627         GeneratedJavaTokenTypes.LABELED_STAT;
628
629     /**
630      * A type-cast.
631      *
632      * <p>For example:</p>
633      * <pre>
634      * (String)it.next()
635      * </pre>
636      * <p>parses as:</p>
637      * <pre>
638      * +--TYPECAST (()
639      * |
640      * +--TYPE
641      * |
642      * +--IDENT (String)
643      * +--RPAREN ())
644      * +--METHOD_CALL (()
645      * |
646      * +--DOT (.)
647      * |
648      * +--IDENT (it)
649      * +--IDENT (next)
650      * +--ELIST
651      * +--RPAREN ())
652      * </pre>
653      * @see <a
654      * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#238146">Java
655      * Language Specification, &sect;15.16</a>
656      * @see #EXPR
657      * @see #TYPE
658      * @see #TYPE_ARGUMENTS
659      * @see #RPAREN
660      **/

661     public static final int TYPECAST = GeneratedJavaTokenTypes.TYPECAST;
662     /**
663      * The array index operator.
664      *
665      * <p>For example:</p>
666      * <pre>
667      * ar[2] = 5;
668      * </pre>
669      * <p>parses as:</p>
670      * <pre>
671      * +--EXPR
672      * |
673      * +--ASSIGN (=)
674      * |
675      * +--INDEX_OP ([)
676      * |
677      * +--IDENT (ar)
678      * +--EXPR
679      * |
680      * +--NUM_INT (2)
681      * +--NUM_INT (5)
682      * +--SEMI (;)
683      * </pre>
684      *
685      * @see #EXPR
686      **/

687     public static final int INDEX_OP = GeneratedJavaTokenTypes.INDEX_OP;
688     /**
689      * The <code>++</code> (postfix increment) operator.
690      *
691      * @see <a
692      * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#39438">Java
693      * Language Specification, &sect;15.14.1</a>
694      * @see #EXPR
695      * @see #INC
696      **/

697     public static final int POST_INC = GeneratedJavaTokenTypes.POST_INC;
698     /**
699      * The <code>--</code> (postfix decrement) operator.
700      *
701      * @see <a
702      * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#4987">Java
703      * Language Specification, &sect;15.14.2</a>
704      * @see #EXPR
705      * @see #DEC
706      **/

707     public static final int POST_DEC = GeneratedJavaTokenTypes.POST_DEC;
708     /**
709      * A method call. A method call may have type arguments however these
710      * are attached to the appropriate node in the qualified method name.
711      *
712      * <p>For example:</p>
713      * <pre>
714      * Math.random()
715      * </pre>
716      * <p>parses as:
717      * <pre>
718      * +--METHOD_CALL (()
719      * |
720      * +--DOT (.)
721      * |
722      * +--IDENT (Math)
723      * +--IDENT (random)
724      * +--ELIST
725      * +--RPAREN ())
726      * </pre>
727      *
728      * @see #IDENT
729      * @see #TYPE_ARGUMENTS
730      * @see #DOT
731      * @see #ELIST
732      * @see #RPAREN
733      * @see FullIdent
734      **/

735     public static final int METHOD_CALL = GeneratedJavaTokenTypes.METHOD_CALL;
736     /**
737      * An expression. Operators with lower precedence appear at a
738      * higher level in the tree than operators with higher precedence.
739      * Parentheses are siblings to the operator they enclose.
740      *
741      * <p>For example:</p>
742      * <pre>
743      * x = 4 + 3 * 5 + (30 + 26) / 4 + 5 % 4 + (1&lt;&lt;3);
744      * </pre>
745      * <p>parses as:</p>
746      * <pre>
747      * +--EXPR
748      * |
749      * +--ASSIGN (=)
750      * |
751      * +--IDENT (x)
752      * +--PLUS (+)
753      * |
754      * +--PLUS (+)
755      * |
756      * +--PLUS (+)
757      * |
758      * +--PLUS (+)
759      * |
760      * +--NUM_INT (4)
761      * +--STAR (*)
762      * |
763      * +--NUM_INT (3)
764      * +--NUM_INT (5)
765      * +--DIV (/)
766      * |
767      * +--LPAREN (()
768      * +--PLUS (+)
769      * |
770      * +--NUM_INT (30)
771      * +--NUM_INT (26)
772      * +--RPAREN ())
773      * +--NUM_INT (4)
774      * +--MOD (%)
775      * |
776      * +--NUM_INT (5)
777      * +--NUM_INT (4)
778      * +--LPAREN (()
779      * +--SL (&lt;&lt;)
780      * |
781      * +--NUM_INT (1)
782      * +--NUM_INT (3)
783      * +--RPAREN ())
784      * +--SEMI (;)
785      * </pre>
786      *
787      * @see #ELIST
788      * @see #ASSIGN
789      * @see #LPAREN
790      * @see #RPAREN
791      **/

792     public static final int EXPR = GeneratedJavaTokenTypes.EXPR;
793     /**
794      * An array initialization. This may occur as part of an array
795      * declaration or inline with <code>new</code>.
796      *
797      * <p>For example:</p>
798      * <pre>
799      * int[] y =
800      * {
801      * 1,
802      * 2,
803      * };
804      * </pre>
805      * <p>parses as:</p>
806      * <pre>
807      * +--VARIABLE_DEF
808      * |
809      * +--MODIFIERS
810      * +--TYPE
811      * |
812      * +--ARRAY_DECLARATOR ([)
813      * |
814      * +--LITERAL_INT (int)
815      * +--IDENT (y)
816      * +--ASSIGN (=)
817      * |
818      * +--ARRAY_INIT ({)
819      * |
820      * +--EXPR
821      * |
822      * +--NUM_INT (1)
823      * +--COMMA (,)
824      * +--EXPR
825      * |
826      * +--NUM_INT (2)
827      * +--COMMA (,)
828      * +--RCURLY (})
829      * +--SEMI (;)
830      * </pre>
831      *
832      * <p>Also consider:</p>
833      * <pre>
834      * int[] z = new int[]
835      * {
836      * 1,
837      * 2,
838      * };
839      * </pre>
840      * <p>which parses as:</p>
841      * <pre>
842      * +--VARIABLE_DEF
843      * |
844      * +--MODIFIERS
845      * +--TYPE
846      * |
847      * +--ARRAY_DECLARATOR ([)
848      * |
849      * +--LITERAL_INT (int)
850      * +--IDENT (z)
851      * +--ASSIGN (=)
852      * |
853      * +--EXPR
854      * |
855      * +--LITERAL_NEW (new)
856      * |
857      * +--LITERAL_INT (int)
858      * +--ARRAY_DECLARATOR ([)
859      * +--ARRAY_INIT ({)
860      * |
861      * +--EXPR
862      * |
863      * +--NUM_INT (1)
864      * +--COMMA (,)
865      * +--EXPR
866      * |
867      * +--NUM_INT (2)
868      * +--COMMA (,)
869      * +--RCURLY (})
870      * </pre>
871      *
872      * @see #ARRAY_DECLARATOR
873      * @see #TYPE
874      * @see #LITERAL_NEW
875      * @see #COMMA
876      **/

877     public static final int ARRAY_INIT = GeneratedJavaTokenTypes.ARRAY_INIT;
878     /**
879      * An import declaration. Import declarations are option, but
880      * must appear after the package declaration and before the first type
881      * declaration.
882      *
883      * <p>For example:</p>
884      *
885      * <pre>
886      * import java.io.IOException;
887      * </pre>
888      *
889      * <p>parses as:</p>
890      *
891      * <pre>
892      * +--IMPORT (import)
893      * |
894      * +--DOT (.)
895      * |
896      * +--DOT (.)
897      * |
898      * +--IDENT (java)
899      * +--IDENT (io)
900      * +--IDENT (IOException)
901      * +--SEMI (;)
902      * </pre>
903      *
904      * @see <a
905      * HREF="http://java.sun.com/docs/books/jls/second_edition/html/packages.doc.html#70209">Java
906      * Language Specification &sect;7.5</a>
907      * @see #DOT
908      * @see #IDENT
909      * @see #STAR
910      * @see #SEMI
911      * @see FullIdent
912      **/

913     public static final int IMPORT = GeneratedJavaTokenTypes.IMPORT;
914     /**
915      * The <code>+</code> (unary plus) operator.
916      *
917      * @see <a
918      * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#24924">Java
919      * Language Specification, &sect;15.15.3</a>
920      * @see #EXPR
921      **/

922     public static final int UNARY_MINUS = GeneratedJavaTokenTypes.UNARY_MINUS;
923     /**
924      * The <code>-</code> (unary minus) operator.
925      *
926      * @see <a
927      * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#236345">Java
928      * Language Specification, &sect;15.15.4</a>
929      * @see #EXPR
930      **/

931     public static final int UNARY_PLUS = GeneratedJavaTokenTypes.UNARY_PLUS;
932     /**
933      * A group of case clauses. Case clauses with no associated
934      * statements are grouped together into a case group. The last
935      * child is a statement list containing the statements to execute
936      * upon a match.
937      *
938      * <p>For example:</p>
939      * <pre>
940      * case 0:
941      * case 1:
942      * case 2:
943      * x = 3;
944      * break;
945      * </pre>
946      * <p>parses as:</p>
947      * <pre>
948      * +--CASE_GROUP
949      * |
950      * +--LITERAL_CASE (case)
951      * |
952      * +--EXPR
953      * |
954      * +--NUM_INT (0)
955      * +--LITERAL_CASE (case)
956      * |
957      * +--EXPR
958      * |
959      * +--NUM_INT (1)
960      * +--LITERAL_CASE (case)
961      * |
962      * +--EXPR
963      * |
964      * +--NUM_INT (2)
965      * +--SLIST
966      * |
967      * +--EXPR
968      * |
969      * +--ASSIGN (=)
970      * |
971      * +--IDENT (x)
972      * +--NUM_INT (3)
973      * +--SEMI (;)
974      * +--LITERAL_BREAK (break)
975      * |
976      * +--SEMI (;)
977      * </pre>
978      *
979      * @see #LITERAL_CASE
980      * @see #LITERAL_DEFAULT
981      * @see #LITERAL_SWITCH
982      **/

983     public static final int CASE_GROUP = GeneratedJavaTokenTypes.CASE_GROUP;
984     /**
985      * An expression list. The children are a comma separated list of
986      * expressions.
987      *
988      * @see #LITERAL_NEW
989      * @see #FOR_INIT
990      * @see #FOR_ITERATOR
991      * @see #EXPR
992      * @see #METHOD_CALL
993      * @see #CTOR_CALL
994      * @see #SUPER_CTOR_CALL
995      **/

996     public static final int ELIST = GeneratedJavaTokenTypes.ELIST;
997     /**
998      * A for loop initializer. This is a child of
999      * <code>LITERAL_FOR</code>. The children of this element may be
1000     * a comma separated list of variable declarations, an expression
1001     * list, or empty.
1002     *
1003     * @see #VARIABLE_DEF
1004     * @see #ELIST
1005     * @see #LITERAL_FOR
1006     **/

1007    public static final int FOR_INIT = GeneratedJavaTokenTypes.FOR_INIT;
1008    /**
1009     * A for loop condition. This is a child of
1010     * <code>LITERAL_FOR</code>. The child of this element is an
1011     * optional expression.
1012     *
1013     * @see #EXPR
1014     * @see #LITERAL_FOR
1015     **/

1016    public static final int FOR_CONDITION =
1017        GeneratedJavaTokenTypes.FOR_CONDITION;
1018
1019    /**
1020     * A for loop iterator. This is a child of
1021     * <code>LITERAL_FOR</code>. The child of this element is an
1022     * optional expression list.
1023     *
1024     * @see #ELIST
1025     * @see #LITERAL_FOR
1026     **/

1027    public static final int FOR_ITERATOR =
1028        GeneratedJavaTokenTypes.FOR_ITERATOR;
1029
1030    /**
1031     * The empty statement. This goes in place of an
1032     * <code>SLIST</code> for a <code>for</code> or <code>while</code>
1033     * loop body.
1034     *
1035     * @see <a
1036     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/statements.doc.html#5970">Java
1037     * Language Specification, &sect;14.6</a>
1038     * @see #LITERAL_FOR
1039     * @see #LITERAL_WHILE
1040     **/

1041    public static final int EMPTY_STAT = GeneratedJavaTokenTypes.EMPTY_STAT;
1042    /**
1043     * The <code>final</code> keyword.
1044     *
1045     * @see #MODIFIERS
1046     **/

1047    public static final int FINAL = GeneratedJavaTokenTypes.FINAL;
1048    /**
1049     * The <code>abstract</code> keyword.
1050     *
1051     * @see #MODIFIERS
1052     **/

1053    public static final int ABSTRACT = GeneratedJavaTokenTypes.ABSTRACT;
1054    /**
1055     * The <code>strictfp</code> keyword.
1056     *
1057     * @see #MODIFIERS
1058     **/

1059    public static final int STRICTFP = GeneratedJavaTokenTypes.STRICTFP;
1060    /**
1061     * A super constructor call.
1062     *
1063     * @see #ELIST
1064     * @see #RPAREN
1065     * @see #SEMI
1066     * @see #CTOR_CALL
1067     **/

1068    public static final int SUPER_CTOR_CALL =
1069        GeneratedJavaTokenTypes.SUPER_CTOR_CALL;
1070
1071    /**
1072     * A constructor call.
1073     *
1074     * <p>For example:</p>
1075     * <pre>
1076     * this(1);
1077     * </pre>
1078     * <p>parses as:</p>
1079     * <pre>
1080     * +--CTOR_CALL (this)
1081     * |
1082     * +--LPAREN (()
1083     * +--ELIST
1084     * |
1085     * +--EXPR
1086     * |
1087     * +--NUM_INT (1)
1088     * +--RPAREN ())
1089     * +--SEMI (;)
1090     * </pre>
1091     *
1092     * @see #ELIST
1093     * @see #RPAREN
1094     * @see #SEMI
1095     * @see #SUPER_CTOR_CALL
1096     **/

1097    public static final int CTOR_CALL = GeneratedJavaTokenTypes.CTOR_CALL;
1098    /* *
1099     * This token does not appear in the tree.
1100     *
1101     * @see #PACKAGE_DEF
1102     **/

1103    //public static final int LITERAL_PACKAGE =
1104
// GeneratedJavaTokenTypes.LITERAL_package;
1105

1106    /**
1107     * The statement terminator (<code>;</code>). Depending on the
1108     * context, this make occur as a sibling, a child, or not at all.
1109     *
1110     * @see #PACKAGE_DEF
1111     * @see #IMPORT
1112     * @see #SLIST
1113     * @see #ARRAY_INIT
1114     * @see #LITERAL_FOR
1115     **/

1116    public static final int SEMI = GeneratedJavaTokenTypes.SEMI;
1117    /* *
1118     * This token does not appear in the tree.
1119     *
1120     * @see #IMPORT
1121     **/

1122    // public static final int LITERAL_IMPORT =
1123
// GeneratedJavaTokenTypes.LITERAL_import;
1124

1125    /* *
1126     * This token does not appear in the tree.
1127     *
1128     * @see #INDEX_OP
1129     * @see #ARRAY_DECLARATOR
1130     **/

1131    //public static final int LBRACK = GeneratedJavaTokenTypes.LBRACK;
1132
/**
1133     * The <code>]</code> symbol.
1134     *
1135     * @see #INDEX_OP
1136     * @see #ARRAY_DECLARATOR
1137     **/

1138    public static final int RBRACK = GeneratedJavaTokenTypes.RBRACK;
1139    /**
1140     * The <code>void</code> keyword.
1141     *
1142     * @see #TYPE
1143     **/

1144    public static final int LITERAL_VOID =
1145        GeneratedJavaTokenTypes.LITERAL_void;
1146
1147    /**
1148     * The <code>boolean</code> keyword.
1149     *
1150     * @see #TYPE
1151     **/

1152    public static final int LITERAL_BOOLEAN =
1153        GeneratedJavaTokenTypes.LITERAL_boolean;
1154
1155    /**
1156     * The <code>byte</code> keyword.
1157     *
1158     * @see #TYPE
1159     **/

1160    public static final int LITERAL_BYTE =
1161        GeneratedJavaTokenTypes.LITERAL_byte;
1162
1163    /**
1164     * The <code>char</code> keyword.
1165     *
1166     * @see #TYPE
1167     **/

1168    public static final int LITERAL_CHAR =
1169        GeneratedJavaTokenTypes.LITERAL_char;
1170
1171    /**
1172     * The <code>short</code> keyword.
1173     *
1174     * @see #TYPE
1175     **/

1176    public static final int LITERAL_SHORT =
1177        GeneratedJavaTokenTypes.LITERAL_short;
1178
1179    /**
1180     * The <code>int</code> keyword.
1181     *
1182     * @see #TYPE
1183     **/

1184    public static final int LITERAL_INT = GeneratedJavaTokenTypes.LITERAL_int;
1185    /**
1186     * The <code>float</code> keyword.
1187     *
1188     * @see #TYPE
1189     **/

1190    public static final int LITERAL_FLOAT =
1191        GeneratedJavaTokenTypes.LITERAL_float;
1192
1193    /**
1194     * The <code>long</code> keyword.
1195     *
1196     * @see #TYPE
1197     **/

1198    public static final int LITERAL_LONG =
1199        GeneratedJavaTokenTypes.LITERAL_long;
1200
1201    /**
1202     * The <code>double</code> keyword.
1203     *
1204     * @see #TYPE
1205     **/

1206    public static final int LITERAL_DOUBLE =
1207        GeneratedJavaTokenTypes.LITERAL_double;
1208
1209    /**
1210     * An identifier. These can be names of types, subpackages,
1211     * fields, methods, parameters, and local variables.
1212     **/

1213    public static final int IDENT = GeneratedJavaTokenTypes.IDENT;
1214    /**
1215     * The <code>&#46;</code> (dot) operator.
1216     *
1217     * @see FullIdent
1218     **/

1219    public static final int DOT = GeneratedJavaTokenTypes.DOT;
1220    /**
1221     * The <code>*</code> (multiplication or wildcard) operator.
1222     *
1223     * @see <a
1224     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/packages.doc.html#26725">Java
1225     * Language Specification, &sect;7.5.2</a>
1226     * @see <a
1227     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5036">Java
1228     * Language Specification, &sect;15.17.1</a>
1229     * @see #EXPR
1230     * @see #IMPORT
1231     **/

1232    public static final int STAR = GeneratedJavaTokenTypes.STAR;
1233    /**
1234     * The <code>private</code> keyword.
1235     *
1236     * @see #MODIFIERS
1237     **/

1238    public static final int LITERAL_PRIVATE =
1239        GeneratedJavaTokenTypes.LITERAL_private;
1240
1241    /**
1242     * The <code>public</code> keyword.
1243     *
1244     * @see #MODIFIERS
1245     **/

1246    public static final int LITERAL_PUBLIC =
1247        GeneratedJavaTokenTypes.LITERAL_public;
1248
1249    /**
1250     * The <code>protected</code> keyword.
1251     *
1252     * @see #MODIFIERS
1253     **/

1254    public static final int LITERAL_PROTECTED =
1255        GeneratedJavaTokenTypes.LITERAL_protected;
1256
1257    /**
1258     * The <code>static</code> keyword.
1259     *
1260     * @see #MODIFIERS
1261     **/

1262    public static final int LITERAL_STATIC =
1263        GeneratedJavaTokenTypes.LITERAL_static;
1264
1265    /**
1266     * The <code>transient</code> keyword.
1267     *
1268     * @see #MODIFIERS
1269     **/

1270    public static final int LITERAL_TRANSIENT =
1271        GeneratedJavaTokenTypes.LITERAL_transient;
1272
1273    /**
1274     * The <code>native</code> keyword.
1275     *
1276     * @see #MODIFIERS
1277     **/

1278    public static final int LITERAL_NATIVE =
1279        GeneratedJavaTokenTypes.LITERAL_native;
1280
1281    /**
1282     * The <code>synchronized</code> keyword. This may be used as a
1283     * modifier of a method or in the definition of a synchronized
1284     * block.
1285     *
1286     * <p>For example:</p>
1287     *
1288     * <pre>
1289     * synchronized(this)
1290     * {
1291     * x++;
1292     * }
1293     * </pre>
1294     *
1295     * <p>parses as:</p>
1296     *
1297     * <pre>
1298     * +--LITERAL_SYNCHRONIZED (synchronized)
1299     * |
1300     * +--LPAREN (()
1301     * +--EXPR
1302     * |
1303     * +--LITERAL_THIS (this)
1304     * +--RPAREN ())
1305     * +--SLIST ({)
1306     * |
1307     * +--EXPR
1308     * |
1309     * +--POST_INC (++)
1310     * |
1311     * +--IDENT (x)
1312     * +--SEMI (;)
1313     * +--RCURLY (})
1314     * +--RCURLY (})
1315     * </pre>
1316     *
1317     * @see #MODIFIERS
1318     * @see #LPAREN
1319     * @see #EXPR
1320     * @see #RPAREN
1321     * @see #SLIST
1322     * @see #RCURLY
1323     **/

1324    public static final int LITERAL_SYNCHRONIZED =
1325        GeneratedJavaTokenTypes.LITERAL_synchronized;
1326
1327    /**
1328     * The <code>volatile</code> keyword.
1329     *
1330     * @see #MODIFIERS
1331     **/

1332    public static final int LITERAL_VOLATILE =
1333        GeneratedJavaTokenTypes.LITERAL_volatile;
1334
1335    /**
1336     * The <code>class</code> keyword. This element appears both
1337     * as part of a class declaration, and inline to reference a
1338     * class object.
1339     *
1340     * <p>For example:</p>
1341     *
1342     * <pre>
1343     * int.class
1344     * </pre>
1345     * <p>parses as:</p>
1346     * <pre>
1347     * +--EXPR
1348     * |
1349     * +--DOT (.)
1350     * |
1351     * +--LITERAL_INT (int)
1352     * +--LITERAL_CLASS (class)
1353     * </pre>
1354     *
1355     * @see #DOT
1356     * @see #IDENT
1357     * @see #CLASS_DEF
1358     * @see FullIdent
1359     **/

1360    public static final int LITERAL_CLASS =
1361        GeneratedJavaTokenTypes.LITERAL_class;
1362
1363    /* *
1364     * This token does not appear in the tree.
1365     *
1366     * @see #EXTENDS_CLAUSE
1367     **/

1368    //public static final int LITERAL_EXTENDS =
1369
// GeneratedJavaTokenTypes.LITERAL_extends;
1370

1371    /**
1372     * The <code>interface</code> keyword. This token appears in
1373     * interface definition.
1374     *
1375     * @see #INTERFACE_DEF
1376     **/

1377    public static final int LITERAL_INTERFACE =
1378        GeneratedJavaTokenTypes.LITERAL_interface;
1379
1380    /**
1381     * A left (curly) brace (<code>{</code>).
1382     *
1383     * @see #OBJBLOCK
1384     * @see #ARRAY_INIT
1385     * @see #SLIST
1386     **/

1387    public static final int LCURLY = GeneratedJavaTokenTypes.LCURLY;
1388    /**
1389     * A right (curly) brace (<code>}</code>).
1390     *
1391     * @see #OBJBLOCK
1392     * @see #ARRAY_INIT
1393     * @see #SLIST
1394     **/

1395    public static final int RCURLY = GeneratedJavaTokenTypes.RCURLY;
1396    /**
1397     * The <code>,</code> (comma) operator.
1398     *
1399     * @see #ARRAY_INIT
1400     * @see #FOR_INIT
1401     * @see #FOR_ITERATOR
1402     * @see #LITERAL_THROWS
1403     * @see #IMPLEMENTS_CLAUSE
1404     **/

1405    public static final int COMMA = GeneratedJavaTokenTypes.COMMA;
1406    /* *
1407     * This token does not appear in the tree.
1408     *
1409     * @see #IMPLEMENTS_CLAUSE
1410     **/

1411    // public static final int LITERAL_IMPLEMENTS =
1412
// GeneratedJavaTokenTypes.LITERAL_implements;
1413

1414    /**
1415     * A left parenthesis (<code>(</code>).
1416     *
1417     * @see #LITERAL_FOR
1418     * @see #LITERAL_NEW
1419     * @see #EXPR
1420     * @see #LITERAL_SWITCH
1421     * @see #LITERAL_CATCH
1422     **/

1423    public static final int LPAREN = GeneratedJavaTokenTypes.LPAREN;
1424    /**
1425     * A right parenthesis (<code>)</code>).
1426     *
1427     * @see #LITERAL_FOR
1428     * @see #LITERAL_NEW
1429     * @see #METHOD_CALL
1430     * @see #TYPECAST
1431     * @see #EXPR
1432     * @see #LITERAL_SWITCH
1433     * @see #LITERAL_CATCH
1434     **/

1435    public static final int RPAREN = GeneratedJavaTokenTypes.RPAREN;
1436    /**
1437     * The <code>this</code> keyword.
1438     *
1439     * @see #EXPR
1440     * @see #CTOR_CALL
1441     **/

1442    public static final int LITERAL_THIS =
1443        GeneratedJavaTokenTypes.LITERAL_this;
1444
1445    /**
1446     * The <code>super</code> keyword.
1447     *
1448     * @see #EXPR
1449     * @see #SUPER_CTOR_CALL
1450     **/

1451    public static final int LITERAL_SUPER =
1452        GeneratedJavaTokenTypes.LITERAL_super;
1453
1454    /**
1455     * The <code>=</code> (assignment) operator.
1456     *
1457     * @see <a
1458     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5295">Java
1459     * Language Specification, &sect;15.26.1</a>
1460     * @see #EXPR
1461     **/

1462    public static final int ASSIGN = GeneratedJavaTokenTypes.ASSIGN;
1463    /**
1464     * The <code>throws</code> keyword. The children are a number of
1465     * one or more identifiers separated by commas.
1466     *
1467     * @see <a
1468     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#78323">Java
1469     * Language Specification, &sect;8.4.4</a>
1470     * @see #IDENT
1471     * @see #DOT
1472     * @see #COMMA
1473     * @see #METHOD_DEF
1474     * @see #CTOR_DEF
1475     * @see FullIdent
1476     **/

1477    public static final int LITERAL_THROWS =
1478        GeneratedJavaTokenTypes.LITERAL_throws;
1479
1480    /**
1481     * The <code>:</code> (colon) operator. This will appear as part
1482     * of the conditional operator (<code>? :</code>).
1483     *
1484     * @see #QUESTION
1485     * @see #LABELED_STAT
1486     * @see #CASE_GROUP
1487     **/

1488    public static final int COLON = GeneratedJavaTokenTypes.COLON;
1489    /**
1490     * The <code>if</code> keyword.
1491     *
1492     * <p>For example:</p>
1493     * <pre>
1494     * if(optimistic)
1495     * {
1496     * message = "half full";
1497     * }
1498     * else
1499     * {
1500     * message = "half empty";
1501     * }
1502     * </pre>
1503     * <p>parses as:</p>
1504     * <pre>
1505     * +--LITERAL_IF (if)
1506     * |
1507     * +--LPAREN (()
1508     * +--EXPR
1509     * |
1510     * +--IDENT (optimistic)
1511     * +--RPAREN ())
1512     * +--SLIST ({)
1513     * |
1514     * +--EXPR
1515     * |
1516     * +--ASSIGN (=)
1517     * |
1518     * +--IDENT (message)
1519     * +--STRING_LITERAL ("half full")
1520     * +--SEMI (;)
1521     * +--RCURLY (})
1522     * +--LITERAL_ELSE (else)
1523     * |
1524     * +--SLIST ({)
1525     * |
1526     * +--EXPR
1527     * |
1528     * +--ASSIGN (=)
1529     * |
1530     * +--IDENT (message)
1531     * +--STRING_LITERAL ("half empty")
1532     * +--SEMI (;)
1533     * +--RCURLY (})
1534     * </pre>
1535     *
1536     * @see #LPAREN
1537     * @see #EXPR
1538     * @see #RPAREN
1539     * @see #SLIST
1540     * @see #EMPTY_STAT
1541     * @see #LITERAL_ELSE
1542     **/

1543    public static final int LITERAL_IF = GeneratedJavaTokenTypes.LITERAL_if;
1544    /**
1545     * The <code>for</code> keyword. The children are <code>(</code>,
1546     * an initializer, a condition, an iterator, a <code>)</code> and
1547     * either a statement list, a single expression, or an empty
1548     * statement.
1549     *
1550     * <p>For example:</p>
1551     * <pre>
1552     * for(int i = 0, n = myArray.length; i &lt; n; i++)
1553     * {
1554     * }
1555     * </pre>
1556     *
1557     * <p>parses as:</p>
1558     * <pre>
1559     * +--LITERAL_FOR (for)
1560     * |
1561     * +--LPAREN (()
1562     * +--FOR_INIT
1563     * |
1564     * +--VARIABLE_DEF
1565     * |
1566     * +--MODIFIERS
1567     * +--TYPE
1568     * |
1569     * +--LITERAL_INT (int)
1570     * +--IDENT (i)
1571     * +--ASSIGN (=)
1572     * |
1573     * +--EXPR
1574     * |
1575     * +--NUM_INT (0)
1576     * +--COMMA (,)
1577     * +--VARIABLE_DEF
1578     * |
1579     * +--MODIFIERS
1580     * +--TYPE
1581     * |
1582     * +--LITERAL_INT (int)
1583     * +--IDENT (n)
1584     * +--ASSIGN (=)
1585     * |
1586     * +--EXPR
1587     * |
1588     * +--DOT (.)
1589     * |
1590     * +--IDENT (myArray)
1591     * +--IDENT (length)
1592     * +--SEMI (;)
1593     * +--FOR_CONDITION
1594     * |
1595     * +--EXPR
1596     * |
1597     * +--LT (&lt;)
1598     * |
1599     * +--IDENT (i)
1600     * +--IDENT (n)
1601     * +--SEMI (;)
1602     * +--FOR_ITERATOR
1603     * |
1604     * +--ELIST
1605     * |
1606     * +--EXPR
1607     * |
1608     * +--POST_INC (++)
1609     * |
1610     * +--IDENT (i)
1611     * +--RPAREN ())
1612     * +--SLIST ({)
1613     * |
1614     * +--RCURLY (})
1615     * </pre>
1616     *
1617     * @see #LPAREN
1618     * @see #FOR_INIT
1619     * @see #SEMI
1620     * @see #FOR_CONDITION
1621     * @see #FOR_ITERATOR
1622     * @see #RPAREN
1623     * @see #SLIST
1624     * @see #EMPTY_STAT
1625     * @see #EXPR
1626     **/

1627    public static final int LITERAL_FOR = GeneratedJavaTokenTypes.LITERAL_for;
1628    /**
1629     * The <code>while</code> keyword.
1630     *
1631     * <p>For example:</p>
1632     * <pre>
1633     * while(line != null)
1634     * {
1635     * process(line);
1636     * line = in.readLine();
1637     * }
1638     * </pre>
1639     * <p>parses as:</p>
1640     * <pre>
1641     * +--LITERAL_WHILE (while)
1642     * |
1643     * +--LPAREN (()
1644     * +--EXPR
1645     * |
1646     * +--NOT_EQUAL (!=)
1647     * |
1648     * +--IDENT (line)
1649     * +--LITERAL_NULL (null)
1650     * +--RPAREN ())
1651     * +--SLIST ({)
1652     * |
1653     * +--EXPR
1654     * |
1655     * +--METHOD_CALL (()
1656     * |
1657     * +--IDENT (process)
1658     * +--ELIST
1659     * |
1660     * +--EXPR
1661     * |
1662     * +--IDENT (line)
1663     * +--RPAREN ())
1664     * +--SEMI (;)
1665     * +--EXPR
1666     * |
1667     * +--ASSIGN (=)
1668     * |
1669     * +--IDENT (line)
1670     * +--METHOD_CALL (()
1671     * |
1672     * +--DOT (.)
1673     * |
1674     * +--IDENT (in)
1675     * +--IDENT (readLine)
1676     * +--ELIST
1677     * +--RPAREN ())
1678     * +--SEMI (;)
1679     * +--RCURLY (})
1680     * </pre>
1681     **/

1682    public static final int LITERAL_WHILE =
1683        GeneratedJavaTokenTypes.LITERAL_while;
1684
1685    /**
1686     * The <code>do</code> keyword. Note the the while token does not
1687     * appear as part of the do-while construct.
1688     *
1689     * <p>For example:</p>
1690     * <pre>
1691     * do
1692     * {
1693     * x = rand.nextInt(10);
1694     * }
1695     * while(x < 5);
1696     * </pre>
1697     * <p>parses as:</p>
1698     * <pre>
1699     * +--LITERAL_DO (do)
1700     * |
1701     * +--SLIST ({)
1702     * |
1703     * +--EXPR
1704     * |
1705     * +--ASSIGN (=)
1706     * |
1707     * +--IDENT (x)
1708     * +--METHOD_CALL (()
1709     * |
1710     * +--DOT (.)
1711     * |
1712     * +--IDENT (rand)
1713     * +--IDENT (nextInt)
1714     * +--ELIST
1715     * |
1716     * +--EXPR
1717     * |
1718     * +--NUM_INT (10)
1719     * +--RPAREN ())
1720     * +--SEMI (;)
1721     * +--RCURLY (})
1722     * +--LPAREN (()
1723     * +--EXPR
1724     * |
1725     * +--LT (<)
1726     * |
1727     * +--IDENT (x)
1728     * +--NUM_INT (5)
1729     * +--RPAREN ())
1730     * +--SEMI (;)
1731     * </pre>
1732     *
1733     * @see #SLIST
1734     * @see #EXPR
1735     * @see #EMPTY_STAT
1736     * @see #LPAREN
1737     * @see #RPAREN
1738     * @see #SEMI
1739     **/

1740    public static final int LITERAL_DO = GeneratedJavaTokenTypes.LITERAL_do;
1741    /**
1742     * Literal <code>while</code> in do-while loop.
1743     * @see #LITERAL_DO
1744     */

1745    public static final int DO_WHILE = GeneratedJavaTokenTypes.DO_WHILE;
1746    /**
1747     * The <code>break</code> keyword. The first child is an optional
1748     * identifier and the last child is a semicolon.
1749     *
1750     * @see #IDENT
1751     * @see #SEMI
1752     * @see #SLIST
1753     **/

1754    public static final int LITERAL_BREAK =
1755        GeneratedJavaTokenTypes.LITERAL_break;
1756
1757    /**
1758     * The <code>continue</code> keyword. The first child is an
1759     * optional identifier and the last child is a semicolon.
1760     *
1761     * @see #IDENT
1762     * @see #SEMI
1763     * @see #SLIST
1764     **/

1765    public static final int LITERAL_CONTINUE =
1766        GeneratedJavaTokenTypes.LITERAL_continue;
1767
1768    /**
1769     * The <code>return</code> keyword. The first child is an
1770     * optional expression for the return value. The last child is a
1771     * semi colon.
1772     *
1773     * @see #EXPR
1774     * @see #SEMI
1775     * @see #SLIST
1776     **/

1777    public static final int LITERAL_RETURN =
1778        GeneratedJavaTokenTypes.LITERAL_return;
1779
1780    /**
1781     * The <code>switch</code> keyword.
1782     *
1783     * <p>For example:</p>
1784     * <pre>
1785     * switch(type)
1786     * {
1787     * case 0:
1788     * background = Color.blue;
1789     * break;
1790     * case 1:
1791     * background = Color.red;
1792     * break;
1793     * default:
1794     * background = Color.green;
1795     * break;
1796     * }
1797     * </pre>
1798     * <p>parses as:</p>
1799     * <pre>
1800     * +--LITERAL_SWITCH (switch)
1801     * |
1802     * +--LPAREN (()
1803     * +--EXPR
1804     * |
1805     * +--IDENT (type)
1806     * +--RPAREN ())
1807     * +--LCURLY ({)
1808     * +--CASE_GROUP
1809     * |
1810     * +--LITERAL_CASE (case)
1811     * |
1812     * +--EXPR
1813     * |
1814     * +--NUM_INT (0)
1815     * +--SLIST
1816     * |
1817     * +--EXPR
1818     * |
1819     * +--ASSIGN (=)
1820     * |
1821     * +--IDENT (background)
1822     * +--DOT (.)
1823     * |
1824     * +--IDENT (Color)
1825     * +--IDENT (blue)
1826     * +--SEMI (;)
1827     * +--LITERAL_BREAK (break)
1828     * |
1829     * +--SEMI (;)
1830     * +--CASE_GROUP
1831     * |
1832     * +--LITERAL_CASE (case)
1833     * |
1834     * +--EXPR
1835     * |
1836     * +--NUM_INT (1)
1837     * +--SLIST
1838     * |
1839     * +--EXPR
1840     * |
1841     * +--ASSIGN (=)
1842     * |
1843     * +--IDENT (background)
1844     * +--DOT (.)
1845     * |
1846     * +--IDENT (Color)
1847     * +--IDENT (red)
1848     * +--SEMI (;)
1849     * +--LITERAL_BREAK (break)
1850     * |
1851     * +--SEMI (;)
1852     * +--CASE_GROUP
1853     * |
1854     * +--LITERAL_DEFAULT (default)
1855     * +--SLIST
1856     * |
1857     * +--EXPR
1858     * |
1859     * +--ASSIGN (=)
1860     * |
1861     * +--IDENT (background)
1862     * +--DOT (.)
1863     * |
1864     * +--IDENT (Color)
1865     * +--IDENT (green)
1866     * +--SEMI (;)
1867     * +--LITERAL_BREAK (break)
1868     * |
1869     * +--SEMI (;)
1870     * +--RCURLY (})
1871     * </pre>
1872     *
1873     * @see <a
1874     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/statements.doc.html#35518">Java
1875     * Language Specification, &sect;14.10</a>
1876     * @see #LPAREN
1877     * @see #EXPR
1878     * @see #RPAREN
1879     * @see #LCURLY
1880     * @see #CASE_GROUP
1881     * @see #RCURLY
1882     * @see #SLIST
1883     **/

1884    public static final int LITERAL_SWITCH =
1885        GeneratedJavaTokenTypes.LITERAL_switch;
1886
1887    /**
1888     * The <code>throw</code> keyword. The first child is an
1889     * expression that evaluates to a <code>Throwable</code> instance.
1890     *
1891     * @see <a
1892     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/statements.doc.html#237350">Java
1893     * Language Specification, &sect;14.17</a>
1894     * @see #SLIST
1895     * @see #EXPR
1896     **/

1897    public static final int LITERAL_THROW =
1898        GeneratedJavaTokenTypes.LITERAL_throw;
1899
1900    /**
1901     * The <code>else</code> keyword. This appears as a child of an
1902     * <code>if</code> statement.
1903     *
1904     * @see #SLIST
1905     * @see #EXPR
1906     * @see #EMPTY_STAT
1907     * @see #LITERAL_IF
1908     **/

1909    public static final int LITERAL_ELSE =
1910        GeneratedJavaTokenTypes.LITERAL_else;
1911
1912    /**
1913     * The <code>case</code> keyword. The first child is a constant
1914     * expression that evaluates to a integer.
1915     *
1916     * @see #CASE_GROUP
1917     * @see #EXPR
1918     **/

1919    public static final int LITERAL_CASE =
1920        GeneratedJavaTokenTypes.LITERAL_case;
1921
1922    /**
1923     * The <code>default</code> keyword. This element has no
1924     * children.
1925     *
1926     * @see #CASE_GROUP
1927     **/

1928    public static final int LITERAL_DEFAULT =
1929        GeneratedJavaTokenTypes.LITERAL_default;
1930
1931    /**
1932     * The <code>try</code> keyword. The children are a statement
1933     * list, zero or more catch blocks and then an optional finally
1934     * block.
1935     *
1936     * <p>For example:</p>
1937     * <pre>
1938     * try
1939     * {
1940     * FileReader in = new FileReader("abc.txt");
1941     * }
1942     * catch(IOException ioe)
1943     * {
1944     * }
1945     * finally
1946     * {
1947     * }
1948     * </pre>
1949     * <p>parses as:</p>
1950     * <pre>
1951     * +--LITERAL_TRY (try)
1952     * |
1953     * +--SLIST ({)
1954     * |
1955     * +--VARIABLE_DEF
1956     * |
1957     * +--MODIFIERS
1958     * +--TYPE
1959     * |
1960     * +--IDENT (FileReader)
1961     * +--IDENT (in)
1962     * +--ASSIGN (=)
1963     * |
1964     * +--EXPR
1965     * |
1966     * +--LITERAL_NEW (new)
1967     * |
1968     * +--IDENT (FileReader)
1969     * +--LPAREN (()
1970     * +--ELIST
1971     * |
1972     * +--EXPR
1973     * |
1974     * +--STRING_LITERAL ("abc.txt")
1975     * +--RPAREN ())
1976     * +--SEMI (;)
1977     * +--RCURLY (})
1978     * +--LITERAL_CATCH (catch)
1979     * |
1980     * +--LPAREN (()
1981     * +--PARAMETER_DEF
1982     * |
1983     * +--MODIFIERS
1984     * +--TYPE
1985     * |
1986     * +--IDENT (IOException)
1987     * +--IDENT (ioe)
1988     * +--RPAREN ())
1989     * +--SLIST ({)
1990     * |
1991     * +--RCURLY (})
1992     * +--LITERAL_FINALLY (finally)
1993     * |
1994     * +--SLIST ({)
1995     * |
1996     * +--RCURLY (})
1997     * +--RCURLY (})
1998     * </pre>
1999     *
2000     * @see <a
2001     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/statements.doc.html#79311">Java
2002     * Language Specification, &sect;14.19</a>
2003     * @see #SLIST
2004     * @see #LITERAL_CATCH
2005     * @see #LITERAL_FINALLY
2006     **/

2007    public static final int LITERAL_TRY = GeneratedJavaTokenTypes.LITERAL_try;
2008    /**
2009     * The <code>catch</code> keyword.
2010     *
2011     * @see #LPAREN
2012     * @see #PARAMETER_DEF
2013     * @see #RPAREN
2014     * @see #SLIST
2015     * @see #LITERAL_TRY
2016     **/

2017    public static final int LITERAL_CATCH =
2018        GeneratedJavaTokenTypes.LITERAL_catch;
2019
2020    /**
2021     * The <code>finally</code> keyword.
2022     *
2023     * @see #SLIST
2024     * @see #LITERAL_TRY
2025     **/

2026    public static final int LITERAL_FINALLY =
2027        GeneratedJavaTokenTypes.LITERAL_finally;
2028
2029    /**
2030     * The <code>+=</code> (addition assignment) operator.
2031     *
2032     * @see <a
2033     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5304">Java
2034     * Language Specification, &sect;15.26.2</a>
2035     * @see #EXPR
2036     **/

2037    public static final int PLUS_ASSIGN = GeneratedJavaTokenTypes.PLUS_ASSIGN;
2038    /**
2039     * The <code>-=</code> (subtraction assignment) operator.
2040     *
2041     * @see <a
2042     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5304">Java
2043     * Language Specification, &sect;15.26.2</a>
2044     * @see #EXPR
2045     **/

2046    public static final int MINUS_ASSIGN =
2047        GeneratedJavaTokenTypes.MINUS_ASSIGN;
2048
2049    /**
2050     * The <code>*=</code> (multiplication assignment) operator.
2051     *
2052     * @see <a
2053     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5304">Java
2054     * Language Specification, &sect;15.26.2</a>
2055     * @see #EXPR
2056     **/

2057    public static final int STAR_ASSIGN = GeneratedJavaTokenTypes.STAR_ASSIGN;
2058    /**
2059     * The <code>/=</code> (division assignment) operator.
2060     *
2061     * @see <a
2062     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5304">Java
2063     * Language Specification, &sect;15.26.2</a>
2064     * @see #EXPR
2065     **/

2066    public static final int DIV_ASSIGN = GeneratedJavaTokenTypes.DIV_ASSIGN;
2067    /**
2068     * The <code>%=</code> (remainder assignment) operator.
2069     *
2070     * @see <a
2071     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5304">Java
2072     * Language Specification, &sect;15.26.2</a>
2073     * @see #EXPR
2074     **/

2075    public static final int MOD_ASSIGN = GeneratedJavaTokenTypes.MOD_ASSIGN;
2076    /**
2077     * The <code>&gt;&gt;=</code> (signed right shift assignment)
2078     * operator.
2079     *
2080     * @see <a
2081     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5304">Java
2082     * Language Specification, &sect;15.26.2</a>
2083     * @see #EXPR
2084     **/

2085    public static final int SR_ASSIGN = GeneratedJavaTokenTypes.SR_ASSIGN;
2086    /**
2087     * The <code>&gt;&gt;&gt;=</code> (unsigned right shift assignment)
2088     * operator.
2089     *
2090     * @see <a
2091     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5304">Java
2092     * Language Specification, &sect;15.26.2</a>
2093     * @see #EXPR
2094     **/

2095    public static final int BSR_ASSIGN = GeneratedJavaTokenTypes.BSR_ASSIGN;
2096    /**
2097     * The <code>&lt;&lt;=</code> (left shift assignment) operator.
2098     *
2099     * @see <a
2100     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5304">Java
2101     * Language Specification, &sect;15.26.2</a>
2102     * @see #EXPR
2103     **/

2104    public static final int SL_ASSIGN = GeneratedJavaTokenTypes.SL_ASSIGN;
2105    /**
2106     * The <code>&amp;=</code> (bitwise AND assignment) operator.
2107     *
2108     * @see <a
2109     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5304">Java
2110     * Language Specification, &sect;15.26.2</a>
2111     * @see #EXPR
2112     **/

2113    public static final int BAND_ASSIGN = GeneratedJavaTokenTypes.BAND_ASSIGN;
2114    /**
2115     * The <code>^=</code> (bitwise exclusive OR assignment) operator.
2116     *
2117     * @see <a
2118     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5304">Java
2119     * Language Specification, &sect;15.26.2</a>
2120     * @see #EXPR
2121     **/

2122    public static final int BXOR_ASSIGN = GeneratedJavaTokenTypes.BXOR_ASSIGN;
2123    /**
2124     * The <code>|=</code> (bitwise OR assignment) operator.
2125     *
2126     * @see <a
2127     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5304">Java
2128     * Language Specification, &sect;15.26.2</a>
2129     * @see #EXPR
2130     **/

2131    public static final int BOR_ASSIGN = GeneratedJavaTokenTypes.BOR_ASSIGN;
2132    /**
2133     * The <code>&#63;</code> (conditional) operator. Technically,
2134     * the colon is also part of this operator, but it appears as a
2135     * separate token.
2136     *
2137     * <p>For example:</p>
2138     * <pre>
2139     * (quantity == 1) ? "": "s"
2140     * </pre>
2141     * <p>
2142     * <p>parses as:</p>
2143     * </p>
2144     * <pre>
2145     * +--QUESTION (?)
2146     * |
2147     * +--LPAREN (()
2148     * +--EQUAL (==)
2149     * |
2150     * +--IDENT (quantity)
2151     * +--NUM_INT (1)
2152     * +--RPAREN ())
2153     * +--STRING_LITERAL ("")
2154     * +--COLON (:)
2155     * +--STRING_LITERAL ("s")
2156     * </pre>
2157     *
2158     * @see <a
2159     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#290293">Java
2160     * Language Specification, &sect;15.25</a>
2161     * @see #EXPR
2162     * @see #COLON
2163     **/

2164    public static final int QUESTION = GeneratedJavaTokenTypes.QUESTION;
2165    /**
2166     * The <code>||</code> (conditional OR) operator.
2167     *
2168     * @see <a
2169     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#54532">Java
2170     * Language Specification, &sect;15.24</a>
2171     * @see #EXPR
2172     **/

2173    public static final int LOR = GeneratedJavaTokenTypes.LOR;
2174    /**
2175     * The <code>&&</code> (conditional AND) operator.
2176     *
2177     * @see <a
2178     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5247">Java
2179     * Language Specification, &sect;15.23</a>
2180     * @see #EXPR
2181     **/

2182    public static final int LAND = GeneratedJavaTokenTypes.LAND;
2183    /**
2184     * The <code>|</code> (bitwise OR) operator.
2185     *
2186     * @see <a
2187     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5233">Java
2188     * Language Specification, &sect;15.22.1</a>
2189     * @see #EXPR
2190     **/

2191    public static final int BOR = GeneratedJavaTokenTypes.BOR;
2192    /**
2193     * The <code>^</code> (bitwise exclusive OR) operator.
2194     *
2195     * @see <a
2196     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5233">Java
2197     * Language Specification, &sect;15.22.1</a>
2198     * @see #EXPR
2199     **/

2200    public static final int BXOR = GeneratedJavaTokenTypes.BXOR;
2201    /**
2202     * The <code>&</code> (bitwise AND) operator.
2203     *
2204     * @see <a
2205     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5233">Java
2206     * Language Specification, &sect;15.22.1</a>
2207     * @see #EXPR
2208     **/

2209    public static final int BAND = GeneratedJavaTokenTypes.BAND;
2210    /**
2211     * The <code>&#33;=</code> (not equal) operator.
2212     *
2213     * @see #EXPR
2214     **/

2215    public static final int NOT_EQUAL = GeneratedJavaTokenTypes.NOT_EQUAL;
2216    /**
2217     * The <code>==</code> (equal) operator.
2218     *
2219     * @see #EXPR
2220     **/

2221    public static final int EQUAL = GeneratedJavaTokenTypes.EQUAL;
2222    /**
2223     * The <code>&lt;</code> (less than) operator.
2224     *
2225     * @see #EXPR
2226     **/

2227    public static final int LT = GeneratedJavaTokenTypes.LT;
2228    /**
2229     * The <code>&gt;</code> (greater than) operator.
2230     *
2231     * @see #EXPR
2232     **/

2233    public static final int GT = GeneratedJavaTokenTypes.GT;
2234    /**
2235     * The <code>&lt;=</code> (less than or equal) operator.
2236     *
2237     * @see #EXPR
2238     **/

2239    public static final int LE = GeneratedJavaTokenTypes.LE;
2240    /**
2241     * The <code>&gt;=</code> (greater than or equal) operator.
2242     *
2243     * @see #EXPR
2244     **/

2245    public static final int GE = GeneratedJavaTokenTypes.GE;
2246    /**
2247     * The <code>instanceof</code> operator. The first child is an
2248     * object reference or something that evaluates to an object
2249     * reference. The second child is a reference type.
2250     *
2251     * @see <a
2252     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#80289">Java
2253     * Language Specification, &sect;15.20.2</a>
2254     * @see #EXPR
2255     * @see #METHOD_CALL
2256     * @see #IDENT
2257     * @see #DOT
2258     * @see #TYPE
2259     * @see FullIdent
2260     **/

2261    public static final int LITERAL_INSTANCEOF =
2262        GeneratedJavaTokenTypes.LITERAL_instanceof;
2263
2264    /**
2265     * The <code>&lt;&lt;</code> (shift left) operator.
2266     *
2267     * @see <a
2268     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5121">Java
2269     * Language Specification, &sect;15.19</a>
2270     * @see #EXPR
2271     **/

2272    public static final int SL = GeneratedJavaTokenTypes.SL;
2273    /**
2274     * The <code>&gt;&gt;</code> (signed shift right) operator.
2275     *
2276     * @see <a
2277     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5121">Java
2278     * Language Specification, &sect;15.19</a>
2279     * @see #EXPR
2280     **/

2281    public static final int SR = GeneratedJavaTokenTypes.SR;
2282    /**
2283     * The <code>&gt;&gt;&gt;</code> (unsigned shift right) operator.
2284     *
2285     * @see <a
2286     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5121">Java
2287     * Language Specification, &sect;15.19</a>
2288     * @see #EXPR
2289     **/

2290    public static final int BSR = GeneratedJavaTokenTypes.BSR;
2291    /**
2292     * The <code>+</code> (addition) operator.
2293     *
2294     * @see <a
2295     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#15746">Java
2296     * Language Specification, &sect;15.18</a>
2297     * @see #EXPR
2298     **/

2299    public static final int PLUS = GeneratedJavaTokenTypes.PLUS;
2300    /**
2301     * The <code>-</code> (subtraction) operator.
2302     *
2303     * @see <a
2304     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#15746">Java
2305     * Language Specification, &sect;15.18</a>
2306     * @see #EXPR
2307     **/

2308    public static final int MINUS = GeneratedJavaTokenTypes.MINUS;
2309    /**
2310     * The <code>/</code> (division) operator.
2311     *
2312     * @see <a
2313     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5047">Java
2314     * Language Specification, &sect;15.17.2</a>
2315     * @see #EXPR
2316     **/

2317    public static final int DIV = GeneratedJavaTokenTypes.DIV;
2318    /**
2319     * The <code>%</code> (remainder) operator.
2320     *
2321     * @see <a
2322     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#24956">Java
2323     * Language Specification, &sect;15.17.3</a>
2324     * @see #EXPR
2325     **/

2326    public static final int MOD = GeneratedJavaTokenTypes.MOD;
2327    /**
2328     * The <code>++</code> (prefix increment) operator.
2329     *
2330     * @see <a
2331     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#39547">Java
2332     * Language Specification, &sect;15.15.1</a>
2333     * @see #EXPR
2334     * @see #POST_INC
2335     **/

2336    public static final int INC = GeneratedJavaTokenTypes.INC;
2337    /**
2338     * The <code>--</code> (prefix decrement) operator.
2339     *
2340     * @see <a
2341     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#239136">Java
2342     * Language Specification, &sect;15.15.2</a>
2343     * @see #EXPR
2344     * @see #POST_DEC
2345     **/

2346    public static final int DEC = GeneratedJavaTokenTypes.DEC;
2347    /**
2348     * The <code>~</code> (bitwise complement) operator.
2349     *
2350     * @see <a
2351     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#5017">Java
2352     * Language Specification, &sect;15.15.5</a>
2353     * @see #EXPR
2354     **/

2355    public static final int BNOT = GeneratedJavaTokenTypes.BNOT;
2356    /**
2357     * The <code>&#33;</code> (logical complement) operator.
2358     *
2359     * @see <a
2360     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#13350">Java
2361     * Language Specification, &sect;15.15.6</a>
2362     * @see #EXPR
2363     **/

2364    public static final int LNOT = GeneratedJavaTokenTypes.LNOT;
2365    /**
2366     * The <code>true</code> keyword.
2367     *
2368     * @see <a
2369     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#49652">Java
2370     * Language Specification, &sect;3.10.3</a>
2371     * @see #EXPR
2372     * @see #LITERAL_FALSE
2373     **/

2374    public static final int LITERAL_TRUE =
2375        GeneratedJavaTokenTypes.LITERAL_true;
2376
2377    /**
2378     * The <code>false</code> keyword.
2379     *
2380     * @see <a
2381     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#49652">Java
2382     * Language Specification, &sect;3.10.3</a>
2383     * @see #EXPR
2384     * @see #LITERAL_TRUE
2385     **/

2386    public static final int LITERAL_FALSE =
2387        GeneratedJavaTokenTypes.LITERAL_false;
2388
2389    /**
2390     * The <code>null</code> keyword.
2391     *
2392     * @see <a
2393     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#230717">Java
2394     * Language Specification, &sect;3.10.7</a>
2395     * @see #EXPR
2396     **/

2397    public static final int LITERAL_NULL =
2398        GeneratedJavaTokenTypes.LITERAL_null;
2399
2400    /**
2401     * The <code>new</code> keyword. This element is used to define
2402     * new instances of objects, new arrays, and new anonymous inner
2403     * classes.
2404     *
2405     * <p>For example:</p>
2406     *
2407     * <pre>
2408     * new ArrayList(50)
2409     * </pre>
2410     *
2411     * <p>parses as:</p>
2412     * <pre>
2413     * +--LITERAL_NEW (new)
2414     * |
2415     * +--IDENT (ArrayList)
2416     * +--LPAREN (()
2417     * +--ELIST
2418     * |
2419     * +--EXPR
2420     * |
2421     * +--NUM_INT (50)
2422     * +--RPAREN ())
2423     * </pre>
2424     *
2425     * <p>For example:</p>
2426     * <pre>
2427     * new float[]
2428     * {
2429     * 3.0f,
2430     * 4.0f
2431     * };
2432     * </pre>
2433     *
2434     * <p>parses as:</p>
2435     * <pre>
2436     * +--LITERAL_NEW (new)
2437     * |
2438     * +--LITERAL_FLOAT (float)
2439     * +--ARRAY_DECLARATOR ([)
2440     * +--ARRAY_INIT ({)
2441     * |
2442     * +--EXPR
2443     * |
2444     * +--NUM_FLOAT (3.0f)
2445     * +--COMMA (,)
2446     * +--EXPR
2447     * |
2448     * +--NUM_FLOAT (4.0f)
2449     * +--RCURLY (})
2450     * </pre>
2451     *
2452     * <p>For example:</p>
2453     * <pre>
2454     * new FilenameFilter()
2455     * {
2456     * public boolean accept(File dir, String name)
2457     * {
2458     * return name.endsWith(".java");
2459     * }
2460     * }
2461     * </pre>
2462     *
2463     * <p>parses as:</p>
2464     * <pre>
2465     * +--LITERAL_NEW (new)
2466     * |
2467     * +--IDENT (FilenameFilter)
2468     * +--LPAREN (()
2469     * +--ELIST
2470     * +--RPAREN ())
2471     * +--OBJBLOCK
2472     * |
2473     * +--LCURLY ({)
2474     * +--METHOD_DEF
2475     * |
2476     * +--MODIFIERS
2477     * |
2478     * +--LITERAL_PUBLIC (public)
2479     * +--TYPE
2480     * |
2481     * +--LITERAL_BOOLEAN (boolean)
2482     * +--IDENT (accept)
2483     * +--PARAMETERS
2484     * |
2485     * +--PARAMETER_DEF
2486     * |
2487     * +--MODIFIERS
2488     * +--TYPE
2489     * |
2490     * +--IDENT (File)
2491     * +--IDENT (dir)
2492     * +--COMMA (,)
2493     * +--PARAMETER_DEF
2494     * |
2495     * +--MODIFIERS
2496     * +--TYPE
2497     * |
2498     * +--IDENT (String)
2499     * +--IDENT (name)
2500     * +--SLIST ({)
2501     * |
2502     * +--LITERAL_RETURN (return)
2503     * |
2504     * +--EXPR
2505     * |
2506     * +--METHOD_CALL (()
2507     * |
2508     * +--DOT (.)
2509     * |
2510     * +--IDENT (name)
2511     * +--IDENT (endsWith)
2512     * +--ELIST
2513     * |
2514     * +--EXPR
2515     * |
2516     * +--STRING_LITERAL (".java")
2517     * +--RPAREN ())
2518     * +--SEMI (;)
2519     * +--RCURLY (})
2520     * +--RCURLY (})
2521     * </pre>
2522     *
2523     * @see #IDENT
2524     * @see #DOT
2525     * @see #LPAREN
2526     * @see #ELIST
2527     * @see #RPAREN
2528     * @see #OBJBLOCK
2529     * @see #ARRAY_INIT
2530     * @see FullIdent
2531     **/

2532    public static final int LITERAL_NEW = GeneratedJavaTokenTypes.LITERAL_new;
2533    /**
2534     * An integer literal. These may be specified in decimal,
2535     * hexadecimal, or octal form.
2536     *
2537     * @see <a
2538     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#48282">Java
2539     * Language Specification, &sect;3.10.1</a>
2540     * @see #EXPR
2541     * @see #NUM_LONG
2542     **/

2543    public static final int NUM_INT = GeneratedJavaTokenTypes.NUM_INT;
2544    /**
2545     * A character literal. This is a (possibly escaped) character
2546     * enclosed in single quotes.
2547     *
2548     * @see <a
2549     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#100960">Java
2550     * Language Specification, &sect;3.10.4</a>
2551     * @see #EXPR
2552     **/

2553    public static final int CHAR_LITERAL =
2554        GeneratedJavaTokenTypes.CHAR_LITERAL;
2555
2556    /**
2557     * A string literal. This is a sequence of (possibly escaped)
2558     * characters enclosed in double quotes.
2559     *
2560     * @see <a
2561     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#101084">Java
2562     * Language Specification, &sect;3.10.5</a>
2563     * @see #EXPR
2564     **/

2565    public static final int STRING_LITERAL =
2566        GeneratedJavaTokenTypes.STRING_LITERAL;
2567
2568    /**
2569     * A single precision floating point literal. This is a floating
2570     * point number with an <code>F</code> or <code>f</code> suffix.
2571     *
2572     * @see <a
2573     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#230798">Java
2574     * Language Specification, &sect;3.10.2</a>
2575     * @see #EXPR
2576     * @see #NUM_DOUBLE
2577     **/

2578    public static final int NUM_FLOAT = GeneratedJavaTokenTypes.NUM_FLOAT;
2579    /**
2580     * A long integer literal. These are almost the same as integer
2581     * literals, but they have an <code>L</code> or <code>l</code>
2582     * (ell) suffix.
2583     *
2584     * @see <a
2585     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#48282">Java
2586     * Language Specification, &sect;3.10.1</a>
2587     * @see #EXPR
2588     * @see #NUM_INT
2589     **/

2590    public static final int NUM_LONG = GeneratedJavaTokenTypes.NUM_LONG;
2591    /**
2592     * A double precision floating point literal. This is a floating
2593     * point number with an optional <code>D</code> or <code>d</code>
2594     * suffix.
2595     *
2596     * @see <a
2597     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#230798">Java
2598     * Language Specification, &sect;3.10.2</a>
2599     * @see #EXPR
2600     * @see #NUM_FLOAT
2601     **/

2602    public static final int NUM_DOUBLE = GeneratedJavaTokenTypes.NUM_DOUBLE;
2603    /* *
2604     * This token does not appear in the tree.
2605     *
2606     * @see <a
2607     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#95710">Java
2608     * Language Specification, &sect;3.6</a>
2609     * @see FileContents
2610     **/

2611    //public static final int WS = GeneratedJavaTokenTypes.WS;
2612
/* *
2613     * This token does not appear in the tree.
2614     *
2615     * @see <a
2616     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#48125">Java
2617     * Language Specification, &sect;3.7</a>
2618     * @see FileContents
2619     **/

2620    //public static final int SL_COMMENT = GeneratedJavaTokenTypes.SL_COMMENT;
2621
/* *
2622     * This token does not appear in the tree.
2623     *
2624     * @see <a
2625     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#48125">Java
2626     * Language Specification, &sect;3.7</a>
2627     * @see FileContents
2628     **/

2629    //public static final int ML_COMMENT = GeneratedJavaTokenTypes.ML_COMMENT;
2630
/* *
2631     * This token does not appear in the tree.
2632     *
2633     * @see <a
2634     * HREF="http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#101089">Java
2635     * Language Specification, &sect;3.10.6</a>
2636     * @see #CHAR_LITERAL
2637     * @see #STRING_LITERAL
2638     **/

2639    //public static final int ESC = GeneratedJavaTokenTypes.ESC;
2640
/* *
2641     * This token does not appear in the tree.
2642     *
2643     * @see #NUM_INT
2644     * @see #NUM_LONG
2645     **/

2646    //public static final int HEX_DIGIT = GeneratedJavaTokenTypes.HEX_DIGIT;
2647
/* *
2648     * This token does not appear in the tree.
2649     *
2650     * @see #NUM_FLOAT
2651     * @see #NUM_DOUBLE
2652     **/

2653    //public static final int EXPONENT = GeneratedJavaTokenTypes.EXPONENT;
2654
/* *
2655     * This token does not appear in the tree.
2656     *
2657     * @see #NUM_FLOAT
2658     * @see #NUM_DOUBLE
2659     **/

2660    // public static final int FLOAT_SUFFIX =
2661
// GeneratedJavaTokenTypes.FLOAT_SUFFIX;
2662

2663    /**
2664     * The <code>assert</code> keyword. This is only for Java 1.4 and
2665     * later.
2666     *
2667     * <p>For example:</p>
2668     * <pre>
2669     * assert(x==4);
2670     * </pre>
2671     * <p>parses as:</p>
2672     * <pre>
2673     * +--LITERAL_ASSERT (assert)
2674     * |
2675     * +--EXPR
2676     * |
2677     * +--LPAREN (()
2678     * +--EQUAL (==)
2679     * |
2680     * +--IDENT (x)
2681     * +--NUM_INT (4)
2682     * +--RPAREN ())
2683     * +--SEMI (;)
2684     * </pre>
2685     **/

2686    public static final int LITERAL_ASSERT = GeneratedJavaTokenTypes.ASSERT;
2687
2688    /**
2689     * A static import declaration. Static import declarations are optional,
2690     * but must appear after the package declaration and before the type
2691     * declaration.
2692     *
2693     * <p>For example:</p>
2694     *
2695     * <pre>
2696     * import static java.io.IOException;
2697     * </pre>
2698     *
2699     * <p>parses as:</p>
2700     *
2701     * <pre>
2702     * +--STATIC_IMPORT (import)
2703     * |
2704     * +--LITERAL_STATIC
2705     * +--DOT (.)
2706     * |
2707     * +--DOT (.)
2708     * |
2709     * +--IDENT (java)
2710     * +--IDENT (io)
2711     * +--IDENT (IOException)
2712     * +--SEMI (;)
2713     * </pre>
2714     *
2715     * @see <a HREF="http://www.jcp.org/en/jsr/detail?id=201">
2716     * JSR201</a>
2717     * @see #LITERAL_STATIC
2718     * @see #DOT
2719     * @see #IDENT
2720     * @see #STAR
2721     * @see #SEMI
2722     * @see FullIdent
2723     **/

2724    public static final int STATIC_IMPORT =
2725        GeneratedJavaTokenTypes.STATIC_IMPORT;
2726
2727    /**
2728     * An enum declaration. Its notable children are
2729     * enum constant declarations followed by
2730     * any construct that may be expected in a class body.
2731     *
2732     * <p>For example:</p>
2733     * <pre>
2734     * public enum MyEnum
2735     * implements Serializable
2736     * {
2737     * FIRST_CONSTANT,
2738     * SECOND_CONSTANT;
2739     *
2740     * public void someMethod()
2741     * {
2742     * }
2743     * }
2744     * </pre>
2745     * <p>parses as:</p>
2746     * <pre>
2747     * +--ENUM_DEF
2748     * |
2749     * +--MODIFIERS
2750     * |
2751     * +--LITERAL_PUBLIC (public)
2752     * +--ENUM (enum)
2753     * +--IDENT (MyEnum)
2754     * +--EXTENDS_CLAUSE
2755     * +--IMPLEMENTS_CLAUSE
2756     * |
2757     * +--IDENT (Serializable)
2758     * +--OBJBLOCK
2759     * |
2760     * +--LCURLY ({)
2761     * +--ENUM_CONSTANT_DEF
2762     * |
2763     * +--IDENT (FIRST_CONSTANT)
2764     * +--COMMA (,)
2765     * +--ENUM_CONSTANT_DEF
2766     * |
2767     * +--IDENT (SECOND_CONSTANT)
2768     * +--SEMI (;)
2769     * +--METHOD_DEF
2770     * |
2771     * +--MODIFIERS
2772     * |
2773     * +--LITERAL_PUBLIC (public)
2774     * +--TYPE
2775     * |
2776     * +--LITERAL_void (void)
2777     * +--IDENT (someMethod)
2778     * +--LPAREN (()
2779     * +--PARAMETERS
2780     * +--RPAREN ())
2781     * +--SLIST ({)
2782     * |
2783     * +--RCURLY (})
2784     * +--RCURLY (})
2785     * </pre>
2786     *
2787     * @see <a HREF="http://www.jcp.org/en/jsr/detail?id=201">
2788     * JSR201</a>
2789     * @see #MODIFIERS
2790     * @see #ENUM
2791     * @see #IDENT
2792     * @see #EXTENDS_CLAUSE
2793     * @see #IMPLEMENTS_CLAUSE
2794     * @see #OBJBLOCK
2795     * @see #LITERAL_NEW
2796     * @see #ENUM_CONSTANT_DEF
2797     **/

2798    public static final int ENUM_DEF =
2799        GeneratedJavaTokenTypes.ENUM_DEF;
2800
2801    /**
2802     * The <code>enum</code> keyword. This element appears
2803     * as part of an enum declaration.
2804     **/

2805    public static final int ENUM =
2806        GeneratedJavaTokenTypes.ENUM;
2807
2808    /**
2809     * An enum constant declaration. Its notable children are annotations,
2810     * arguments and object block akin to an annonymous
2811     * inner class' body.
2812     *
2813     * <p>For example:</p>
2814     * <pre>
2815     * SOME_CONSTANT(1)
2816     * {
2817     * public void someMethodOverridenFromMainBody()
2818     * {
2819     * }
2820     * }
2821     * </pre>
2822     * <p>parses as:</p>
2823     * <pre>
2824     * +--ENUM_CONSTANT_DEF
2825     * |
2826     * +--ANNOTATIONS
2827     * +--IDENT (SOME_CONSTANT)
2828     * +--LPAREN (()
2829     * +--ELIST
2830     * |
2831     * +--EXPR
2832     * |
2833     * +--NUM_INT (1)
2834     * +--RPAREN ())
2835     * +--OBJBLOCK
2836     * |
2837     * +--LCURLY ({)
2838     * |
2839     * +--METHOD_DEF
2840     * |
2841     * +--MODIFIERS
2842     * |
2843     * +--LITERAL_PUBLIC (public)
2844     * +--TYPE
2845     * |
2846     * +--LITERAL_void (void)
2847     * +--IDENT (someMethodOverridenFromMainBody)
2848     * +--LPAREN (()
2849     * +--PARAMETERS
2850     * +--RPAREN ())
2851     * +--SLIST ({)
2852     * |
2853     * +--RCURLY (})
2854     * +--RCURLY (})
2855     * </pre>
2856     *
2857     * @see <a HREF="http://www.jcp.org/en/jsr/detail?id=201">
2858     * JSR201</a>
2859     * @see #ANNOTATIONS
2860     * @see #MODIFIERS
2861     * @see #IDENT
2862     * @see #ELIST
2863     * @see #OBJBLOCK
2864     **/

2865    public static final int ENUM_CONSTANT_DEF =
2866        GeneratedJavaTokenTypes.ENUM_CONSTANT_DEF;
2867
2868    /**
2869     * A for-each clause. This is a child of
2870     * <code>LITERAL_FOR</code>. The children of this element may be
2871     * a parameter definition, the colon literal and an expression.
2872     *
2873     * @see #VARIABLE_DEF
2874     * @see #ELIST
2875     * @see #LITERAL_FOR
2876     **/

2877    public static final int FOR_EACH_CLAUSE =
2878        GeneratedJavaTokenTypes.FOR_EACH_CLAUSE;
2879
2880    /**
2881     * An annotation declaration. The notable children are the name of the
2882     * annotation type, annotation field declarations and (constant) fields.
2883     *
2884     * <p>For example:</p>
2885     * <pre>
2886     * public @interface MyAnnotation
2887     * {
2888     * int someValue();
2889     * }
2890     * </pre>
2891     * <p>parses as:</p>
2892     * <pre>
2893     * +--ANNOTATION_DEF
2894     * |
2895     * +--MODIFIERS
2896     * |
2897     * +--LITERAL_PUBLIC (public)
2898     * +--AT (@)
2899     * +--LITERAL_INTERFACE (interface)
2900     * +--IDENT (MyAnnotation)
2901     * +--OBJBLOCK
2902     * |
2903     * +--LCURLY ({)
2904     * +--ANNOTATION_FIELD_DEF
2905     * |
2906     * +--MODIFIERS
2907     * +--TYPE
2908     * |
2909     * +--LITERAL_INT (int)
2910     * +--IDENT (someValue)
2911     * +--LPAREN (()
2912     * +--RPAREN ())
2913     * +--SEMI (;)
2914     * +--RCURLY (})
2915     * </pre>
2916     *
2917     * @see <a HREF="http://www.jcp.org/en/jsr/detail?id=201">
2918     * JSR201</a>
2919     * @see #MODIFIERS
2920     * @see #LITERAL_INTERFACE
2921     * @see #IDENT
2922     * @see #OBJBLOCK
2923     * @see #ANNOTATION_FIELD_DEF
2924     **/

2925    public static final int ANNOTATION_DEF =
2926        GeneratedJavaTokenTypes.ANNOTATION_DEF;
2927
2928
2929    /**
2930     * An annotation field declaration. The notable children are modifiers,
2931     * field type, field name and an optional default value (a conditional
2932     * compile-time constant expression). Default values may also by
2933     * annotations.
2934     *
2935     * <p>For example:</p>
2936     *
2937     * <pre>
2938     * String someField() default "Hello world";
2939     * </pre>
2940     *
2941     * <p>parses as:</p>
2942     *
2943     * <pre>
2944     * +--ANNOTATION_FIELD_DEF
2945     * |
2946     * +--MODIFIERS
2947     * +--TYPE
2948     * |
2949     * +--IDENT (String)
2950     * +--IDENT (someField)
2951     * +--LPAREN (()
2952     * +--RPAREN ())
2953     * +--LITERAL_DEFAULT (default)
2954     * +--STRING_LITERAL ("Hello world")
2955     * +--SEMI (;)
2956     * </pre>
2957     *
2958     * @see <a HREF="http://www.jcp.org/en/jsr/detail?id=201">
2959     * JSR201</a>
2960     * @see #MODIFIERS
2961     * @see #TYPE
2962     * @see #LITERAL_DEFAULT
2963     */

2964    public static final int ANNOTATION_FIELD_DEF =
2965        GeneratedJavaTokenTypes.ANNOTATION_FIELD_DEF;
2966
2967    // note: &#064; is the html escape for '@',
2968
// used here to avoid confusing the javadoc tool
2969
/**
2970     * A collection of annotations on a package or enum constant.
2971     * A collections of annotations will only occur on these nodes
2972     * as all other nodes that may be qualified with an annotation can
2973     * be qualified with any other modifier and hence these annotations
2974     * would be contained in a {@link #MODIFIERS} node.
2975     *
2976     * <p>For example:</p>
2977     *
2978     * <pre>
2979     * &#064;MyAnnotation package blah;
2980     * </pre>
2981     *
2982     * <p>parses as:</p>
2983     *
2984     * <pre>
2985     * +--PACKAGE_DEF (package)
2986     * |
2987     * +--ANNOTATIONS
2988     * |
2989     * +--ANNOTATION
2990     * |
2991     * +--AT (&#064;)
2992     * +--IDENT (MyAnnotation)
2993     * +--IDENT (blah)
2994     * +--SEMI (;)
2995     * </pre>
2996     *
2997     * @see <a HREF="http://www.jcp.org/en/jsr/detail?id=201">
2998     * JSR201</a>
2999     * @see #ANNOTATION
3000     * @see #AT
3001     * @see #IDENT
3002     */

3003    public static final int ANNOTATIONS =
3004        GeneratedJavaTokenTypes.ANNOTATIONS;
3005
3006    // note: &#064; is the html escape for '@',
3007
// used here to avoid confusing the javadoc tool
3008
/**
3009     * An annotation of a package, type, field, parameter or variable.
3010     * An annotation may occur anywhere modifiers occur (it is a
3011     * type of modifier) and may also occur prior to a package definition.
3012     * The notable children are: The annotation name and either a single
3013     * default annotation value or a sequence of name value pairs.
3014     * Annotation values may also be annotations themselves.
3015     *
3016     * <p>For example:</p>
3017     *
3018     * <pre>
3019     * &#064;MyAnnotation(someField1 = "Hello",
3020     * someField2 = &#064;SomeOtherAnnotation)
3021     * </pre>
3022     *
3023     * <p>parses as:</p>
3024     *
3025     * <pre>
3026     * +--ANNOTATION
3027     * |
3028     * +--AT (&#064;)
3029     * +--IDENT (MyAnnotation)
3030     * +--LPAREN (()
3031     * +--ANNOTATION_MEMBER_VALUE_PAIR
3032     * |
3033     * +--IDENT (someField1)
3034     * +--ASSIGN (=)
3035     * +--ANNOTATION
3036     * |
3037     * +--AT (&#064;)
3038     * +--IDENT (SomeOtherAnnotation)
3039     * +--ANNOTATION_MEMBER_VALUE_PAIR
3040     * |
3041     * +--IDENT (someField2)
3042     * +--ASSIGN (=)
3043     * +--STRING_LITERAL ("Hello")
3044     * +--RPAREN ())
3045     * </pre>
3046     *
3047     * @see <a HREF="http://www.jcp.org/en/jsr/detail?id=201">
3048     * JSR201</a>
3049     * @see #MODIFIERS
3050     * @see #IDENT
3051     * @see #ANNOTATION_MEMBER_VALUE_PAIR
3052     */

3053    public static final int ANNOTATION =
3054        GeneratedJavaTokenTypes.ANNOTATION;
3055
3056    /**
3057     * An initialisation of an annotation member with a value.
3058     * Its children are the name of the member, the assignment literal
3059     * and the (compile-time constant conditional expression) value.
3060     *
3061     * @see <a HREF="http://www.jcp.org/en/jsr/detail?id=201">
3062     * JSR201</a>
3063     * @see #ANNOTATION
3064     * @see #IDENT
3065     */

3066    public static final int ANNOTATION_MEMBER_VALUE_PAIR =
3067        GeneratedJavaTokenTypes.ANNOTATION_MEMBER_VALUE_PAIR;
3068
3069    /**
3070     * An annotation array member initialisation.
3071     * Initializers can not be nested.
3072     * Am initializer may be present as a default to a annotation
3073     * member, as the single default value to an annotation
3074     * (e.g. @Annotation({1,2})) or as the value of an annotation
3075     * member value pair.
3076     *
3077     * <p>For example:</p>
3078     *
3079     * <pre>
3080     * { 1, 2 }
3081     * </pre>
3082     *
3083     * <p>parses as:</p>
3084     *
3085     * <pre>
3086     * +--ANNOTATION_ARRAY_INIT ({)
3087     * |
3088     * +--NUM_INT (1)
3089     * +--COMMA (,)
3090     * +--NUM_INT (2)
3091     * +--RCURLY (})
3092     * </pre>
3093     *
3094     * @see <a HREF="http://www.jcp.org/en/jsr/detail?id=201">
3095     * JSR201</a>
3096     * @see #ANNOTATION
3097     * @see #IDENT
3098     * @see #ANNOTATION_MEMBER_VALUE_PAIR
3099     */

3100    public static final int ANNOTATION_ARRAY_INIT =
3101        GeneratedJavaTokenTypes.ANNOTATION_ARRAY_INIT;
3102
3103    /**
3104     * A list of type parameters to a class, interface or
3105     * method definition. Children are LT, at least one
3106     * TYPE_PARAMETER, zero or more of: a COMMAs followed by a single
3107     * TYPE_PARAMETER and a final GT.
3108     *
3109     * <p>For example:</p>
3110     *
3111     * <pre>
3112     * public class Blah&lt;A, B&gt;
3113     * {
3114     * }
3115     * </pre>
3116     *
3117     * <p>parses as:</p>
3118     *
3119     * <pre>
3120     * +--CLASS_DEF ({)
3121     * |
3122     * +--MODIFIERS
3123     * |
3124     * +--LITERAL_PUBLIC (public)
3125     * +--LITERAL_CLASS (class)
3126     * +--IDENT (Blah)
3127     * +--TYPE_PARAMETERS
3128     * |
3129     * +--GENERIC_START (<)
3130     * +--TYPE_PARAMETER
3131     * |
3132     * +--IDENT (A)
3133     * +--COMMA (,)
3134     * +--TYPE_PARAMETER
3135     * |
3136     * +--IDENT (B)
3137     * +--GENERIC_END (>)
3138     * +--OBJBLOCK
3139     * |
3140     * +--LCURLY ({)
3141     * +--NUM_INT (1)
3142     * +--COMMA (,)
3143     * +--NUM_INT (2)
3144     * +--RCURLY (})
3145     * </pre>
3146     *
3147     * @see <a HREF="http://www.jcp.org/en/jsr/detail?id=14">
3148     * JSR14</a>
3149     * @see #GENERIC_START
3150     * @see #GENERIC_END
3151     * @see #TYPE_PARAMETER
3152     * @see #COMMA
3153     */

3154    public static final int TYPE_PARAMETERS =
3155        GeneratedJavaTokenTypes.TYPE_PARAMETERS;
3156
3157    /**
3158     * A type parameter to a class, interface or method definition.
3159     * Children are the type name and an optional TYPE_UPPER_BOUNDS.
3160     *
3161     * <p>For example:</p>
3162     *
3163     * <pre>
3164     * A extends Collection
3165     * </pre>
3166     *
3167     * <p>parses as:</p>
3168     *
3169     * <pre>
3170     * +--TYPE_PARAMETER
3171     * |
3172     * +--IDENT (A)
3173     * +--TYPE_UPPER_BOUNDS
3174     * |
3175     * +--IDENT (Collection)
3176     * </pre>
3177     *
3178     * @see <a HREF="http://www.jcp.org/en/jsr/detail?id=14">
3179     * JSR14</a>
3180     * @see #IDENT
3181     * @see #WILDCARD_TYPE
3182     * @see #TYPE_UPPER_BOUNDS
3183     */

3184    public static final int TYPE_PARAMETER =
3185        GeneratedJavaTokenTypes.TYPE_PARAMETER;
3186
3187    /**
3188     * A list of type arguments to a type reference or
3189     * a method/ctor invocation. Children are GENERIC_START, at least one
3190     * TYPE_ARGUMENT, zero or more of a COMMAs followed by a single
3191     * TYPE_ARGUMENT, and a final GENERIC_END.
3192     *
3193     * <p>For example:</p>
3194     *
3195     * <pre>
3196     * public Collection<?> a;
3197     * </pre>
3198     *
3199     * <p>parses as:</p>
3200     *
3201     * <pre>
3202     * +--VARIABLE_DEF
3203     * |
3204     * +--MODIFIERS
3205     * |
3206     * +--LITERAL_PUBLIC (public)
3207     * +--TYPE
3208     * |
3209     * +--IDENT (Collection)
3210     * |
3211     * +--TYPE_ARGUMENTS
3212     * |
3213     * +--GENERIC_START (<)
3214     * +--TYPE_ARGUMENT
3215     * |
3216     * +--WILDCARD_TYPE (?)
3217     * +--GENERIC_END (>)
3218     * +--IDENT (a)
3219     * +--SEMI (;)
3220     * </pre>
3221     *
3222     * @see #GENERIC_START
3223     * @see #GENERIC_END
3224     * @see #TYPE_ARGUMENT
3225     * @see #COMMA
3226     */

3227    public static final int TYPE_ARGUMENTS =
3228        GeneratedJavaTokenTypes.TYPE_ARGUMENTS;
3229
3230    /**
3231     * A type arguments to a type reference or a method/ctor invocation.
3232     * Children are either: type name or wildcard type with possible type
3233     * upper or lower bounds.
3234     *
3235     * <p>For example:</p>
3236     *
3237     * <pre>
3238     * ? super List
3239     * </pre>
3240     *
3241     * <p>parses as:</p>
3242     *
3243     * <pre>
3244     * +--TYPE_ARGUMENT
3245     * |
3246     * +--WILDCARD_TYPE (?)
3247     * +--TYPE_LOWER_BOUNDS
3248     * |
3249     * +--IDENT (List)
3250     * </pre>
3251     *
3252     * @see <a HREF="http://www.jcp.org/en/jsr/detail?id=14">
3253     * JSR14</a>
3254     * @see #WILDCARD_TYPE
3255     * @see #TYPE_UPPER_BOUNDS
3256     * @see #TYPE_LOWER_BOUNDS
3257     */

3258    public static final int TYPE_ARGUMENT =
3259        GeneratedJavaTokenTypes.TYPE_ARGUMENT;
3260
3261    /**
3262     * The type that refers to all types. This node has no children.
3263     *
3264     * @see <a HREF="http://www.jcp.org/en/jsr/detail?id=14">
3265     * JSR14</a>
3266     * @see #TYPE_ARGUMENT
3267     * @see #TYPE_UPPER_BOUNDS
3268     * @see #TYPE_LOWER_BOUNDS
3269     */

3270    public static final int WILDCARD_TYPE =
3271        GeneratedJavaTokenTypes.WILDCARD_TYPE;
3272
3273    /**
3274     * An upper bounds on a wildcard type argument or type parameter.
3275     * This node has one child - the type that is being used for
3276     * the bounding.
3277     *
3278     * @see <a HREF="http://www.jcp.org/en/jsr/detail?id=14">
3279     * JSR14</a>
3280     * @see #TYPE_PARAMETER
3281     * @see #TYPE_ARGUMENT
3282     * @see #WILDCARD_TYPE
3283     */

3284    public static final int TYPE_UPPER_BOUNDS =
3285        GeneratedJavaTokenTypes.TYPE_UPPER_BOUNDS;
3286
3287    /**
3288     * A lower bounds on a wildcard type argument. This node has one child
3289     * - the type that is being used for the bounding.
3290     *
3291     * @see <a HREF="http://www.jcp.org/en/jsr/detail?id=14">
3292     * JSR14</a>
3293     * @see #TYPE_ARGUMENT
3294     * @see #WILDCARD_TYPE
3295     */

3296    public static final int TYPE_LOWER_BOUNDS =
3297        GeneratedJavaTokenTypes.TYPE_LOWER_BOUNDS;
3298
3299    /**
3300     * An 'at' symbol - signifying an annotation instance or the prefix
3301     * to the interface literal signifying the definition of an annotation
3302     * declaration.
3303     *
3304     * @see <a HREF="http://www.jcp.org/en/jsr/detail?id=201">
3305     * JSR201</a>
3306     */

3307    public static final int AT = GeneratedJavaTokenTypes.AT;
3308
3309    /**
3310     * A triple dot for variable-length parameters. This token only ever occurs
3311     * in a parameter declaration immediately after the type of the parameter.
3312     *
3313     * @see <a HREF="http://www.jcp.org/en/jsr/detail?id=201">
3314     * JSR201</a>
3315     */

3316    public static final int ELLIPSIS = GeneratedJavaTokenTypes.ELLIPSIS;
3317
3318    /**
3319     * '&' symbol when used in a generic upper or lower bounds constrain
3320     * e.g. Comparable<? extends Serializable, CharSequence>.
3321     */

3322    public static final int TYPE_EXTENSION_AND =
3323        GeneratedJavaTokenTypes.TYPE_EXTENSION_AND;
3324
3325    /**
3326     * '<' symbol signifying the start of type arguments or type parameters.
3327     */

3328    public static final int GENERIC_START =
3329        GeneratedJavaTokenTypes.GENERIC_START;
3330
3331    /**
3332     * '>' symbol signifying the end of type arguments or type parameters.
3333     */

3334    public static final int GENERIC_END = GeneratedJavaTokenTypes.GENERIC_END;
3335
3336    ////////////////////////////////////////////////////////////////////////
3337
// The interesting code goes here
3338
////////////////////////////////////////////////////////////////////////
3339

3340    /** maps from a token name to value */
3341    private static final Map JavaDoc TOKEN_NAME_TO_VALUE = new HashMap JavaDoc();
3342    /** maps from a token value to name */
3343    private static final String JavaDoc[] TOKEN_VALUE_TO_NAME;
3344
3345    // initialise the constants
3346
static {
3347        final Field JavaDoc[] fields = TokenTypes.class.getDeclaredFields();
3348        String JavaDoc[] tempTokenValueToName = new String JavaDoc[0];
3349        for (int i = 0; i < fields.length; i++) {
3350            final Field JavaDoc f = fields[i];
3351
3352            // Only process the int declarations.
3353
if (f.getType() != Integer.TYPE) {
3354                continue;
3355            }
3356
3357            final String JavaDoc name = f.getName();
3358            try {
3359                // this should NEVER fail (famous last words)
3360
final Integer JavaDoc value = new Integer JavaDoc(f.getInt(name));
3361                TOKEN_NAME_TO_VALUE.put(name, value);
3362                final int tokenValue = value.intValue();
3363                if (tokenValue > tempTokenValueToName.length - 1) {
3364                    final String JavaDoc[] temp = new String JavaDoc[tokenValue + 1];
3365                    System.arraycopy(tempTokenValueToName, 0,
3366                                     temp, 0, tempTokenValueToName.length);
3367                    tempTokenValueToName = temp;
3368                }
3369                tempTokenValueToName[tokenValue] = name;
3370            }
3371            catch (final IllegalArgumentException JavaDoc e) {
3372                e.printStackTrace();
3373                System.exit(1);
3374            }
3375            catch (final IllegalAccessException JavaDoc e) {
3376                e.printStackTrace();
3377                System.exit(1);
3378            }
3379        }
3380        TOKEN_VALUE_TO_NAME = tempTokenValueToName;
3381    }
3382
3383    /**
3384     * Returns the name of a token for a given ID.
3385     * @param aID the ID of the token name to get
3386     * @return a token name
3387     */

3388    public static String JavaDoc getTokenName(int aID)
3389    {
3390        if (aID > TOKEN_VALUE_TO_NAME.length - 1) {
3391            throw new IllegalArgumentException JavaDoc("given id " + aID);
3392        }
3393        final String JavaDoc name = TOKEN_VALUE_TO_NAME[aID];
3394        if (name == null) {
3395            throw new IllegalArgumentException JavaDoc("given id " + aID);
3396        }
3397        return name;
3398    }
3399
3400    /**
3401     * Returns the ID of a token for a given name.
3402     * @param aName the name of the token ID to get
3403     * @return a token ID
3404     */

3405    public static int getTokenId(String JavaDoc aName)
3406    {
3407        final Integer JavaDoc id = (Integer JavaDoc) TOKEN_NAME_TO_VALUE.get(aName);
3408        if (id == null) {
3409            throw new IllegalArgumentException JavaDoc("given name " + aName);
3410        }
3411        return id.intValue();
3412    }
3413
3414    /**
3415     * Returns the short description of a token for a given name.
3416     * @param aName the name of the token ID to get
3417     * @return a short description
3418     */

3419    public static String JavaDoc getShortDescription(String JavaDoc aName)
3420    {
3421        if (!TOKEN_NAME_TO_VALUE.containsKey(aName)) {
3422            throw new IllegalArgumentException JavaDoc("given name " + aName);
3423        }
3424
3425        final String JavaDoc tokentypes =
3426            "com.puppycrawl.tools.checkstyle.api.tokentypes";
3427        final ResourceBundle JavaDoc bundle = ResourceBundle.getBundle(tokentypes);
3428        return bundle.getString(aName);
3429    }
3430}
3431
Popular Tags