1 module antlr.v4.runtime.TokenConstantDefinition;
2 
3 import antlr.v4.runtime.IntStreamConstant;
4 
5 // Class TokenConstantDefinition
6 /**
7  * @uml
8  * Token constant definitions
9  */
10 class TokenConstantDefinition
11 {
12 
13     public static immutable int INVALID_TYPE = 0;
14 
15     /**
16      * @uml
17      * During lookahead operations, this "token" signifies we hit rule end ATN state
18      * and did not follow it despite needing to.
19      */
20     public static immutable int EPSILON = -2;
21 
22     public static immutable int MIN_USER_TOKEN_TYPE = 1;
23 
24     public static immutable int EOF = IntStreamConstant.EOF;
25 
26     /**
27      * @uml
28      * All tokens go to the parser (unless skip() is called in that rule)
29      * on a particular "channel".  The parser tunes to a particular channel
30      * so that whitespace etc... can go to the parser on a "hidden" channel.
31      */
32     public static immutable int DEFAULT_CHANNEL = 0;
33 
34     /**
35      * @uml
36      * Anything on different channel than DEFAULT_CHANNEL is not parsed
37      * by parser.
38      */
39     public static immutable int HIDDEN_CHANNEL = 1;
40 
41     /**
42      * @uml
43      * This is the minimum constant value which can be assigned to a
44      * ser-defined token channel.
45      *
46      * <p>
47      * The non-negative numbers less than {@link #MIN_USER_CHANNEL_VALUE} are
48      * assigned to the predefined channels {@link #DEFAULT_CHANNEL} and
49      *  {@link #HIDDEN_CHANNEL}.</p>
50      *
51      *  @see Token#getChannel()
52      */
53     public static immutable int MIN_USER_CHANNEL_VALUE = 2;
54 
55 }