1
2 package org.xwt.js;
3
4
5 interface Tokens {
6
7
8
9
10 public static final int BITOR = 0;
11 public static final int ASSIGN_BITOR = 1;
12 public static final int BITXOR = 2;
13 public static final int ASSIGN_BITXOR = 3;
14 public static final int BITAND = 4;
15 public static final int ASSIGN_BITAND = 5;
16 public static final int LSH = 6;
17 public static final int ASSIGN_LSH = 7;
18 public static final int RSH = 8;
19 public static final int ASSIGN_RSH = 9;
20 public static final int URSH = 10;
21 public static final int ASSIGN_URSH = 11;
22 public static final int ADD = 12;
23 public static final int ASSIGN_ADD = 13;
24 public static final int SUB = 14;
25 public static final int ASSIGN_SUB = 15;
26 public static final int MUL = 16;
27 public static final int ASSIGN_MUL = 17;
28 public static final int DIV = 18;
29 public static final int ASSIGN_DIV = 19;
30 public static final int MOD = 20;
31 public static final int ASSIGN_MOD = 21;
32 public static final int BITNOT = 22;
33 public static final int ASSIGN_BITNOT = 23;
34
35
36 public static final int OR = 24;
37 public static final int AND = 25;
38 public static final int BANG = 26;
39
40
41 public static final int EQ = 27;
42 public static final int NE = 28;
43 public static final int LT = 29;
44 public static final int LE = 30;
45 public static final int GT = 31;
46 public static final int GE = 32;
47 public static final int SHEQ = 33;
48 public static final int SHNE = 34;
49
50
51 public static final int RETURN = 35;
52 public static final int TYPEOF = 36;
53 public static final int BREAK = 37;
54 public static final int CONTINUE = 38;
55 public static final int TRY = 39;
56 public static final int THROW = 40;
57 public static final int ASSERT = 41;
58
59 public static final int NAME = 42;
60 public static final int NUMBER = 43;
61 public static final int STRING = 44;
62 public static final int NULL = 45;
63 public static final int THIS = 46;
64 public static final int FALSE = 47;
65 public static final int TRUE = 48;
66 public static final int IN = 49;
67
68 public static final int SEMI = 50;
69 public static final int LB = 51;
70 public static final int RB = 52;
71 public static final int LC = 53;
72 public static final int RC = 54;
73 public static final int LP = 55;
74 public static final int RP = 56;
75 public static final int COMMA = 57;
76 public static final int ASSIGN = 58;
77 public static final int HOOK = 59;
78 public static final int COLON = 60;
79 public static final int INC = 61;
80 public static final int DEC = 62;
81 public static final int DOT = 63;
82 public static final int FUNCTION = 64;
83 public static final int IF = 65;
84 public static final int ELSE = 66;
85 public static final int SWITCH = 67;
86 public static final int CASE = 68;
87 public static final int DEFAULT = 69;
88 public static final int WHILE = 70;
89 public static final int DO = 71;
90 public static final int FOR = 72;
91 public static final int VAR = 73;
92 public static final int WITH = 74;
93 public static final int CATCH = 75;
94 public static final int FINALLY = 76;
95 public static final int RESERVED = 77;
96 public static final int GRAMMAR = 78;
97
98 public static final int MAX_TOKEN = GRAMMAR;
99
100 public final static String[] codeToString = new String[] {
101 "BITOR", "ASSIGN_BITOR", "BITXOR", "ASSIGN_BITXOR", "BITAND",
102 "ASSIGN_BITAND", "LSH", "ASSIGN_LSH", "RSH", "ASSIGN_RSH",
103 "URSH", "ASSIGN_URSH", "ADD", "ASSIGN_ADD", "SUB",
104 "ASSIGN_SUB", "MUL", "ASSIGN_MUL", "DIV", "ASSIGN_DIV", "MOD",
105 "ASSIGN_MOD", "BITNOT", "ASSIGN_BITNOT", "OR", "AND", "BANG",
106 "EQ", "NE", "LT", "LE", "GT", "GE", "SHEQ", "SHNE", "RETURN",
107 "TYPEOF", "BREAK", "CONTINUE", "TRY", "THROW", "ASSERT", "NAME",
108 "NUMBER", "STRING", "NULL", "THIS", "FALSE", "TRUE", "IN",
109 "SEMI", "LB", "RB", "LC", "RC", "LP", "RP", "COMMA", "ASSIGN",
110 "HOOK", "COLON", "INC", "DEC", "DOT", "FUNCTION", "IF",
111 "ELSE", "SWITCH", "CASE", "DEFAULT", "WHILE", "DO", "FOR",
112 "VAR", "WITH", "CATCH", "FINALLY", "RESERVED", "GRAMMAR"
113 };
114
115 }
116
117
118