Revision 36624 trunk/extensions/extSymbology/src/org/gvsig/symbology/fmap/rendering/filter/parser/ExpressionParserTokenManager.java

View differences:

ExpressionParserTokenManager.java
1
/* Generated By:JavaCC: Do not edit this line. ExpressionParserTokenManager.java */

1
/* Generated By:JavaCC: Do not edit this line. ExpressionParserTokenManager.java */
2 2
/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
3 3
 *
4 4
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
......
38 38
 *
39 39
 *   +34 963163400
40 40
 *   dac@iver.es
41
 */

42
package org.gvsig.symbology.fmap.rendering.filter.parser;

43
import java.util.*;

44
import java.io.*;

45
import com.hardcode.gdbms.engine.values.*;

46
import org.gvsig.symbology.fmap.rendering.filter.operations.*;

47

  
48
public class ExpressionParserTokenManager implements ExpressionParserConstants

49
{

50
  public  java.io.PrintStream debugStream = System.out;

51
  public  void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }

41
 */
42
package org.gvsig.symbology.fmap.rendering.filter.parser;
43
import java.util.*;
44
import java.io.*;
45
import com.hardcode.gdbms.engine.values.*;
46
import org.gvsig.symbology.fmap.rendering.filter.operations.*;
47

  
48
public class ExpressionParserTokenManager implements ExpressionParserConstants
49
{
50
  public  java.io.PrintStream debugStream = System.out;
51
  public  void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
52 52
private final int jjStopStringLiteralDfa_0(int pos, long active0)
53
{

53
{
54 54
   switch (pos)
55
   {

56
      case 0:

57
         if ((active0 & 0x10000000L) != 0L)

58
         {

59
            jjmatchedKind = 29;

60
            return 9;

61
         }

62
         if ((active0 & 0x31000L) != 0L)

63
         {

64
            jjmatchedKind = 36;

65
            return -1;

66
         }

67
         if ((active0 & 0x800000L) != 0L)

68
            return 36;

69
         return -1;

70
      case 1:

71
         if ((active0 & 0x10000000L) != 0L)

72
         {

73
            jjmatchedKind = 29;

74
            jjmatchedPos = 1;

75
            return 9;

76
         }

77
         if ((active0 & 0x31000L) != 0L)

78
         {

79
            if (jjmatchedPos == 0)

80
            {

81
               jjmatchedKind = 36;

82
               jjmatchedPos = 0;

83
            }

84
            return -1;

85
         }

86
         return -1;

87
      case 2:

88
         if ((active0 & 0x10000000L) != 0L)

89
         {

90
            jjmatchedKind = 29;

91
            jjmatchedPos = 2;

92
            return 9;

93
         }

94
         return -1;

95
      default :

96
         return -1;

97
   }

98
}

55
   {
56
      case 0:
57
         if ((active0 & 0x10000000L) != 0L)
58
         {
59
            jjmatchedKind = 29;
60
            return 9;
61
         }
62
         if ((active0 & 0x31000L) != 0L)
63
         {
64
            jjmatchedKind = 36;
65
            return -1;
66
         }
67
         if ((active0 & 0x800000L) != 0L)
68
            return 36;
69
         return -1;
70
      case 1:
71
         if ((active0 & 0x10000000L) != 0L)
72
         {
73
            jjmatchedKind = 29;
74
            jjmatchedPos = 1;
75
            return 9;
76
         }
77
         if ((active0 & 0x31000L) != 0L)
78
         {
79
            if (jjmatchedPos == 0)
80
            {
81
               jjmatchedKind = 36;
82
               jjmatchedPos = 0;
83
            }
84
            return -1;
85
         }
86
         return -1;
87
      case 2:
88
         if ((active0 & 0x10000000L) != 0L)
89
         {
90
            jjmatchedKind = 29;
91
            jjmatchedPos = 2;
92
            return 9;
93
         }
94
         return -1;
95
      default :
96
         return -1;
97
   }
98
}
99 99
private final int jjStartNfa_0(int pos, long active0)
100
{

101
   return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1);

102
}

103
private final int jjStopAtPos(int pos, int kind)

104
{

105
   jjmatchedKind = kind;

106
   jjmatchedPos = pos;

107
   return pos + 1;

108
}

109
private final int jjStartNfaWithStates_0(int pos, int kind, int state)

110
{

111
   jjmatchedKind = kind;

112
   jjmatchedPos = pos;

113
   try { curChar = input_stream.readChar(); }

114
   catch(java.io.IOException e) { return pos + 1; }

115
   return jjMoveNfa_0(state, pos + 1);

116
}

117
private final int jjMoveStringLiteralDfa0_0()

118
{

119
   switch(curChar)

120
   {

121
      case 9:

122
         return jjStopAtPos(0, 3);

123
      case 32:

124
         return jjStopAtPos(0, 1);

125
      case 33:

126
         jjmatchedKind = 11;

127
         return jjMoveStringLiteralDfa1_0(0x8000L);

128
      case 34:

129
         return jjStartNfaWithStates_0(0, 23, 36);

130
      case 38:

131
         return jjMoveStringLiteralDfa1_0(0x20000L);

132
      case 40:

133
         return jjStopAtPos(0, 21);

134
      case 41:

135
         return jjStopAtPos(0, 22);

136
      case 42:

137
         return jjStopAtPos(0, 7);

138
      case 43:

139
         return jjStopAtPos(0, 5);

140
      case 44:

141
         return jjStopAtPos(0, 24);

142
      case 45:

143
         return jjStopAtPos(0, 6);

144
      case 47:

145
         return jjStopAtPos(0, 8);

146
      case 58:

147
         return jjStopAtPos(0, 25);

148
      case 59:

149
         return jjStopAtPos(0, 26);

150
      case 60:

151
         jjmatchedKind = 10;

152
         return jjMoveStringLiteralDfa1_0(0x2000L);

153
      case 61:

154
         return jjMoveStringLiteralDfa1_0(0x1000L);

155
      case 62:

156
         jjmatchedKind = 9;

157
         return jjMoveStringLiteralDfa1_0(0x4000L);

158
      case 91:

159
         return jjStopAtPos(0, 19);

160
      case 93:

161
         return jjStopAtPos(0, 20);

162
      case 110:

163
         return jjMoveStringLiteralDfa1_0(0x10000000L);

164
      case 124:

165
         return jjMoveStringLiteralDfa1_0(0x10000L);

166
      default :

167
         return jjMoveNfa_0(3, 0);

168
   }

169
}

170
private final int jjMoveStringLiteralDfa1_0(long active0)

171
{

172
   try { curChar = input_stream.readChar(); }

173
   catch(java.io.IOException e) {

174
      jjStopStringLiteralDfa_0(0, active0);

175
      return 1;

176
   }

177
   switch(curChar)

178
   {

179
      case 38:

180
         if ((active0 & 0x20000L) != 0L)

181
            return jjStopAtPos(1, 17);

182
         break;

183
      case 61:

184
         if ((active0 & 0x1000L) != 0L)

185
            return jjStopAtPos(1, 12);

186
         else if ((active0 & 0x2000L) != 0L)

187
            return jjStopAtPos(1, 13);

188
         else if ((active0 & 0x4000L) != 0L)

189
            return jjStopAtPos(1, 14);

190
         else if ((active0 & 0x8000L) != 0L)

191
            return jjStopAtPos(1, 15);

192
         break;

193
      case 117:

194
         return jjMoveStringLiteralDfa2_0(active0, 0x10000000L);

195
      case 124:

196
         if ((active0 & 0x10000L) != 0L)

197
            return jjStopAtPos(1, 16);

198
         break;

199
      default :

200
         break;

201
   }

202
   return jjStartNfa_0(0, active0);

203
}

204
private final int jjMoveStringLiteralDfa2_0(long old0, long active0)

205
{

206
   if (((active0 &= old0)) == 0L)

207
      return jjStartNfa_0(0, old0); 

208
   try { curChar = input_stream.readChar(); }

209
   catch(java.io.IOException e) {

210
      jjStopStringLiteralDfa_0(1, active0);

211
      return 2;

212
   }

213
   switch(curChar)

214
   {

215
      case 108:

216
         return jjMoveStringLiteralDfa3_0(active0, 0x10000000L);

217
      default :

218
         break;

219
   }

220
   return jjStartNfa_0(1, active0);

221
}

222
private final int jjMoveStringLiteralDfa3_0(long old0, long active0)

223
{

224
   if (((active0 &= old0)) == 0L)

225
      return jjStartNfa_0(1, old0); 

226
   try { curChar = input_stream.readChar(); }

227
   catch(java.io.IOException e) {

228
      jjStopStringLiteralDfa_0(2, active0);

229
      return 3;

230
   }

231
   switch(curChar)

232
   {

233
      case 108:

234
         if ((active0 & 0x10000000L) != 0L)

235
            return jjStartNfaWithStates_0(3, 28, 9);

236
         break;

237
      default :

238
         break;

239
   }

240
   return jjStartNfa_0(2, active0);

241
}

242
private final void jjCheckNAdd(int state)

243
{

244
   if (jjrounds[state] != jjround)

245
   {

246
      jjstateSet[jjnewStateCnt++] = state;

247
      jjrounds[state] = jjround;

248
   }

249
}

250
private final void jjAddStates(int start, int end)

251
{

252
   do {

253
      jjstateSet[jjnewStateCnt++] = jjnextStates[start];

254
   } while (start++ != end);

255
}

256
private final void jjCheckNAddTwoStates(int state1, int state2)

257
{

258
   jjCheckNAdd(state1);

259
   jjCheckNAdd(state2);

260
}

261
private final void jjCheckNAddStates(int start, int end)

262
{

263
   do {

264
      jjCheckNAdd(jjnextStates[start]);

265
   } while (start++ != end);

266
}

267
private final void jjCheckNAddStates(int start)

268
{

269
   jjCheckNAdd(jjnextStates[start]);

270
   jjCheckNAdd(jjnextStates[start + 1]);

271
}

100
{
101
   return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1);
102
}
103
private final int jjStopAtPos(int pos, int kind)
104
{
105
   jjmatchedKind = kind;
106
   jjmatchedPos = pos;
107
   return pos + 1;
108
}
109
private final int jjStartNfaWithStates_0(int pos, int kind, int state)
110
{
111
   jjmatchedKind = kind;
112
   jjmatchedPos = pos;
113
   try { curChar = input_stream.readChar(); }
114
   catch(java.io.IOException e) { return pos + 1; }
115
   return jjMoveNfa_0(state, pos + 1);
116
}
117
private final int jjMoveStringLiteralDfa0_0()
118
{
119
   switch(curChar)
120
   {
121
      case 9:
122
         return jjStopAtPos(0, 3);
123
      case 32:
124
         return jjStopAtPos(0, 1);
125
      case 33:
126
         jjmatchedKind = 11;
127
         return jjMoveStringLiteralDfa1_0(0x8000L);
128
      case 34:
129
         return jjStartNfaWithStates_0(0, 23, 36);
130
      case 38:
131
         return jjMoveStringLiteralDfa1_0(0x20000L);
132
      case 40:
133
         return jjStopAtPos(0, 21);
134
      case 41:
135
         return jjStopAtPos(0, 22);
136
      case 42:
137
         return jjStopAtPos(0, 7);
138
      case 43:
139
         return jjStopAtPos(0, 5);
140
      case 44:
141
         return jjStopAtPos(0, 24);
142
      case 45:
143
         return jjStopAtPos(0, 6);
144
      case 47:
145
         return jjStopAtPos(0, 8);
146
      case 58:
147
         return jjStopAtPos(0, 25);
148
      case 59:
149
         return jjStopAtPos(0, 26);
150
      case 60:
151
         jjmatchedKind = 10;
152
         return jjMoveStringLiteralDfa1_0(0x2000L);
153
      case 61:
154
         return jjMoveStringLiteralDfa1_0(0x1000L);
155
      case 62:
156
         jjmatchedKind = 9;
157
         return jjMoveStringLiteralDfa1_0(0x4000L);
158
      case 91:
159
         return jjStopAtPos(0, 19);
160
      case 93:
161
         return jjStopAtPos(0, 20);
162
      case 110:
163
         return jjMoveStringLiteralDfa1_0(0x10000000L);
164
      case 124:
165
         return jjMoveStringLiteralDfa1_0(0x10000L);
166
      default :
167
         return jjMoveNfa_0(3, 0);
168
   }
169
}
170
private final int jjMoveStringLiteralDfa1_0(long active0)
171
{
172
   try { curChar = input_stream.readChar(); }
173
   catch(java.io.IOException e) {
174
      jjStopStringLiteralDfa_0(0, active0);
175
      return 1;
176
   }
177
   switch(curChar)
178
   {
179
      case 38:
180
         if ((active0 & 0x20000L) != 0L)
181
            return jjStopAtPos(1, 17);
182
         break;
183
      case 61:
184
         if ((active0 & 0x1000L) != 0L)
185
            return jjStopAtPos(1, 12);
186
         else if ((active0 & 0x2000L) != 0L)
187
            return jjStopAtPos(1, 13);
188
         else if ((active0 & 0x4000L) != 0L)
189
            return jjStopAtPos(1, 14);
190
         else if ((active0 & 0x8000L) != 0L)
191
            return jjStopAtPos(1, 15);
192
         break;
193
      case 117:
194
         return jjMoveStringLiteralDfa2_0(active0, 0x10000000L);
195
      case 124:
196
         if ((active0 & 0x10000L) != 0L)
197
            return jjStopAtPos(1, 16);
198
         break;
199
      default :
200
         break;
201
   }
202
   return jjStartNfa_0(0, active0);
203
}
204
private final int jjMoveStringLiteralDfa2_0(long old0, long active0)
205
{
206
   if (((active0 &= old0)) == 0L)
207
      return jjStartNfa_0(0, old0); 
208
   try { curChar = input_stream.readChar(); }
209
   catch(java.io.IOException e) {
210
      jjStopStringLiteralDfa_0(1, active0);
211
      return 2;
212
   }
213
   switch(curChar)
214
   {
215
      case 108:
216
         return jjMoveStringLiteralDfa3_0(active0, 0x10000000L);
217
      default :
218
         break;
219
   }
220
   return jjStartNfa_0(1, active0);
221
}
222
private final int jjMoveStringLiteralDfa3_0(long old0, long active0)
223
{
224
   if (((active0 &= old0)) == 0L)
225
      return jjStartNfa_0(1, old0); 
226
   try { curChar = input_stream.readChar(); }
227
   catch(java.io.IOException e) {
228
      jjStopStringLiteralDfa_0(2, active0);
229
      return 3;
230
   }
231
   switch(curChar)
232
   {
233
      case 108:
234
         if ((active0 & 0x10000000L) != 0L)
235
            return jjStartNfaWithStates_0(3, 28, 9);
236
         break;
237
      default :
238
         break;
239
   }
240
   return jjStartNfa_0(2, active0);
241
}
242
private final void jjCheckNAdd(int state)
243
{
244
   if (jjrounds[state] != jjround)
245
   {
246
      jjstateSet[jjnewStateCnt++] = state;
247
      jjrounds[state] = jjround;
248
   }
249
}
250
private final void jjAddStates(int start, int end)
251
{
252
   do {
253
      jjstateSet[jjnewStateCnt++] = jjnextStates[start];
254
   } while (start++ != end);
255
}
256
private final void jjCheckNAddTwoStates(int state1, int state2)
257
{
258
   jjCheckNAdd(state1);
259
   jjCheckNAdd(state2);
260
}
261
private final void jjCheckNAddStates(int start, int end)
262
{
263
   do {
264
      jjCheckNAdd(jjnextStates[start]);
265
   } while (start++ != end);
266
}
267
private final void jjCheckNAddStates(int start)
268
{
269
   jjCheckNAdd(jjnextStates[start]);
270
   jjCheckNAdd(jjnextStates[start + 1]);
271
}
272 272
static final long[] jjbitVec0 = {
273
   0x0L, 0x0L, 0x0L, 0x40c2303040c2303L
274
};

273
   0x0L, 0x0L, 0x0L, 0x2000000000000000L
274
};
275 275
static final long[] jjbitVec1 = {
276
   0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL
277
};
278
static final long[] jjbitVec3 = {
276 279
   0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
277
};
278
private final int jjMoveNfa_0(int startState, int curPos)
279
{
280
   int[] nextStates;
281
   int startsAt = 0;
282
   jjnewStateCnt = 36;
283
   int i = 1;
284
   jjstateSet[0] = startState;
285
   int j, kind = 0x7fffffff;
286
   for (;;)
287
   {
288
      if (++jjround == 0x7fffffff)
289
         ReInitRounds();
290
      if (curChar < 64)
291
      {
292
         long l = 1L << curChar;
293
         MatchLoop: do
294
         {
295
            switch(jjstateSet[--i])
296
            {
297
               case 36:
298
                  if ((0xf7fffffbffffdbffL & l) != 0L)
299
                     jjCheckNAddTwoStates(17, 18);
300
                  else if (curChar == 34)
301
                  {
302
                     if (kind > 35)
303
                        kind = 35;
304
                  }
305
                  break;
306
               case 3:
307
                  if ((0xf7fffffbffffdbffL & l) != 0L)
308
                  {
309
                     if (kind > 36)
310
                        kind = 36;
311
                  }
312
                  else if (curChar == 34)
313
                     jjCheckNAddTwoStates(17, 18);
314
                  if ((0x3ff000000000000L & l) != 0L)
315
                  {
316
                     if (kind > 32)
317
                        kind = 32;
318
                     jjCheckNAddStates(0, 7);
319
                  }
320
                  else if ((0x3000000000L & l) != 0L)
321
                  {
322
                     if (kind > 29)
323
                        kind = 29;
324
                     jjCheckNAdd(9);
325
                  }
326
                  else if (curChar == 46)
327
                     jjCheckNAdd(11);
328
                  break;
329
               case 8:
330
                  if ((0x3000000000L & l) == 0L)
331
                     break;
332
                  if (kind > 29)
333
                     kind = 29;
334
                  jjCheckNAdd(9);
335
                  break;
336
               case 9:
337
                  if ((0x3ff003000000000L & l) == 0L)
338
                     break;
339
                  if (kind > 29)
340
                     kind = 29;
341
                  jjCheckNAdd(9);
342
                  break;
343
               case 10:
344
                  if (curChar == 46)
345
                     jjCheckNAdd(11);
346
                  break;
347
               case 11:
348
                  if ((0x3ff000000000000L & l) == 0L)
349
                     break;
350
                  if (kind > 33)
351
                     kind = 33;
352
                  jjCheckNAddStates(8, 10);
353
                  break;
354
               case 13:
355
                  if ((0x280000000000L & l) != 0L)
356
                     jjCheckNAdd(14);
357
                  break;
358
               case 14:
359
                  if ((0x3ff000000000000L & l) == 0L)
360
                     break;
361
                  if (kind > 33)
362
                     kind = 33;
363
                  jjCheckNAddTwoStates(14, 15);
364
                  break;
365
               case 16:
366
                  if (curChar == 34)
367
                     jjCheckNAddTwoStates(17, 18);
368
                  break;
369
               case 17:
370
                  if ((0xf7fffffbffffdbffL & l) != 0L)
371
                     jjCheckNAddTwoStates(17, 18);
372
                  break;
373
               case 18:
374
                  if (curChar == 34 && kind > 35)
375
                     kind = 35;
376
                  break;
377
               case 19:
378
                  if ((0xf7fffffbffffdbffL & l) != 0L && kind > 36)
379
                     kind = 36;
380
                  break;
381
               case 20:
382
                  if ((0x3ff000000000000L & l) == 0L)
383
                     break;
384
                  if (kind > 32)
385
                     kind = 32;
386
                  jjCheckNAddStates(0, 7);
387
                  break;
388
               case 21:
389
                  if ((0x3ff000000000000L & l) == 0L)
390
                     break;
391
                  if (kind > 32)
392
                     kind = 32;
393
                  jjCheckNAdd(21);
394
                  break;
395
               case 22:
396
                  if ((0x3ff000000000000L & l) != 0L)
397
                     jjCheckNAddTwoStates(22, 23);
398
                  break;
399
               case 23:
400
                  if (curChar != 46)
401
                     break;
402
                  if (kind > 33)
403
                     kind = 33;
404
                  jjCheckNAddStates(11, 13);
405
                  break;
406
               case 24:
407
                  if ((0x3ff000000000000L & l) == 0L)
408
                     break;
409
                  if (kind > 33)
410
                     kind = 33;
411
                  jjCheckNAddStates(11, 13);
412
                  break;
413
               case 26:
414
                  if ((0x280000000000L & l) != 0L)
415
                     jjCheckNAdd(27);
416
                  break;
417
               case 27:
418
                  if ((0x3ff000000000000L & l) == 0L)
419
                     break;
420
                  if (kind > 33)
421
                     kind = 33;
422
                  jjCheckNAddTwoStates(27, 15);
423
                  break;
424
               case 28:
425
                  if ((0x3ff000000000000L & l) != 0L)
426
                     jjCheckNAddTwoStates(28, 29);
427
                  break;
428
               case 30:
429
                  if ((0x280000000000L & l) != 0L)
430
                     jjCheckNAdd(31);
431
                  break;
432
               case 31:
433
                  if ((0x3ff000000000000L & l) == 0L)
434
                     break;
435
                  if (kind > 33)
436
                     kind = 33;
437
                  jjCheckNAddTwoStates(31, 15);
438
                  break;
439
               case 32:
440
                  if ((0x3ff000000000000L & l) != 0L)
441
                     jjCheckNAddStates(14, 16);
442
                  break;
443
               case 34:
444
                  if ((0x280000000000L & l) != 0L)
445
                     jjCheckNAdd(35);
446
                  break;
447
               case 35:
448
                  if ((0x3ff000000000000L & l) != 0L)
449
                     jjCheckNAddTwoStates(35, 15);
450
                  break;
451
               default : break;
452
            }
453
         } while(i != startsAt);
454
      }
455
      else if (curChar < 128)
456
      {
457
         long l = 1L << (curChar & 077);
458
         MatchLoop: do
459
         {
460
            switch(jjstateSet[--i])
461
            {
462
               case 36:
463
               case 17:
464
                  jjCheckNAddTwoStates(17, 18);
465
                  break;
466
               case 3:
467
                  if (kind > 36)
468
                     kind = 36;
469
                  if ((0x7fffffe87fffffeL & l) != 0L)
470
                  {
471
                     if (kind > 29)
472
                        kind = 29;
473
                     jjCheckNAdd(9);
474
                  }
475
                  if (curChar == 102)
476
                     jjstateSet[jjnewStateCnt++] = 6;
477
                  else if (curChar == 116)
478
                     jjstateSet[jjnewStateCnt++] = 2;
479
                  break;
480
               case 0:
481
                  if (curChar == 101 && kind > 27)
482
                     kind = 27;
483
                  break;
484
               case 1:
485
                  if (curChar == 117)
486
                     jjCheckNAdd(0);
487
                  break;
488
               case 2:
489
                  if (curChar == 114)
490
                     jjstateSet[jjnewStateCnt++] = 1;
491
                  break;
492
               case 4:
493
                  if (curChar == 115)
494
                     jjCheckNAdd(0);
495
                  break;
496
               case 5:
497
                  if (curChar == 108)
498
                     jjstateSet[jjnewStateCnt++] = 4;
499
                  break;
500
               case 6:
501
                  if (curChar == 97)
502
                     jjstateSet[jjnewStateCnt++] = 5;
503
                  break;
504
               case 7:
505
                  if (curChar == 102)
506
                     jjstateSet[jjnewStateCnt++] = 6;
507
                  break;
508
               case 8:
509
               case 9:
510
                  if ((0x7fffffe87fffffeL & l) == 0L)
511
                     break;
512
                  if (kind > 29)
513
                     kind = 29;
514
                  jjCheckNAdd(9);
515
                  break;
516
               case 12:
517
                  if ((0x2000000020L & l) != 0L)
518
                     jjAddStates(17, 18);
519
                  break;
520
               case 15:
521
                  if ((0x5000000050L & l) != 0L && kind > 33)
522
                     kind = 33;
523
                  break;
524
               case 19:
525
                  if (kind > 36)
526
                     kind = 36;
527
                  break;
528
               case 25:
529
                  if ((0x2000000020L & l) != 0L)
530
                     jjAddStates(19, 20);
531
                  break;
532
               case 29:
533
                  if ((0x2000000020L & l) != 0L)
534
                     jjAddStates(21, 22);
535
                  break;
536
               case 33:
537
                  if ((0x2000000020L & l) != 0L)
538
                     jjAddStates(23, 24);
539
                  break;
540
               default : break;
541
            }
542
         } while(i != startsAt);
543
      }
544
      else
545
      {
546
         int i2 = (curChar & 0xff) >> 6;
547
         long l2 = 1L << (curChar & 077);
548
         MatchLoop: do
549
         {
550
            switch(jjstateSet[--i])
551
            {
552
               case 36:
553
               case 17:
554
                  if ((jjbitVec1[i2] & l2) != 0L)
555
                     jjCheckNAddTwoStates(17, 18);
556
                  break;
557
               case 3:
558
                  if ((jjbitVec0[i2] & l2) != 0L)
559
                  {
560
                     if (kind > 29)
561
                        kind = 29;
562
                     jjCheckNAdd(9);
563
                  }
564
                  if ((jjbitVec1[i2] & l2) != 0L)
565
                  {
566
                     if (kind > 36)
567
                        kind = 36;
568
                  }
569
                  break;
570
               case 8:
571
               case 9:
572
                  if ((jjbitVec0[i2] & l2) == 0L)
573
                     break;
574
                  if (kind > 29)
575
                     kind = 29;
576
                  jjCheckNAdd(9);
577
                  break;
578
               case 19:
579
                  if ((jjbitVec1[i2] & l2) != 0L && kind > 36)
580
                     kind = 36;
581
                  break;
582
               default : break;
583
            }
584
         } while(i != startsAt);
585
      }
586
      if (kind != 0x7fffffff)
587
      {
588
         jjmatchedKind = kind;
589
         jjmatchedPos = curPos;
590
         kind = 0x7fffffff;
591
      }
592
      ++curPos;
593
      if ((i = jjnewStateCnt) == (startsAt = 36 - (jjnewStateCnt = startsAt)))
594
         return curPos;
595
      try { curChar = input_stream.readChar(); }
596
      catch(java.io.IOException e) { return curPos; }
597
   }
598
}
280
};
281
private final int jjMoveNfa_0(int startState, int curPos)
282
{
283
   int[] nextStates;
284
   int startsAt = 0;
285
   jjnewStateCnt = 36;
286
   int i = 1;
287
   jjstateSet[0] = startState;
288
   int j, kind = 0x7fffffff;
289
   for (;;)
290
   {
291
      if (++jjround == 0x7fffffff)
292
         ReInitRounds();
293
      if (curChar < 64)
294
      {
295
         long l = 1L << curChar;
296
         MatchLoop: do
297
         {
298
            switch(jjstateSet[--i])
299
            {
300
               case 36:
301
                  if ((0xf7fffffbffffdbffL & l) != 0L)
302
                     jjCheckNAddTwoStates(17, 18);
303
                  else if (curChar == 34)
304
                  {
305
                     if (kind > 35)
306
                        kind = 35;
307
                  }
308
                  break;
309
               case 3:
310
                  if ((0xf7fffffbffffdbffL & l) != 0L)
311
                  {
312
                     if (kind > 36)
313
                        kind = 36;
314
                  }
315
                  else if (curChar == 34)
316
                     jjCheckNAddTwoStates(17, 18);
317
                  if ((0x3ff000000000000L & l) != 0L)
318
                  {
319
                     if (kind > 32)
320
                        kind = 32;
321
                     jjCheckNAddStates(0, 7);
322
                  }
323
                  else if ((0x3000000000L & l) != 0L)
324
                  {
325
                     if (kind > 29)
326
                        kind = 29;
327
                     jjCheckNAdd(9);
328
                  }
329
                  else if (curChar == 46)
330
                     jjCheckNAdd(11);
331
                  break;
332
               case 8:
333
                  if ((0x3000000000L & l) == 0L)
334
                     break;
335
                  if (kind > 29)
336
                     kind = 29;
337
                  jjCheckNAdd(9);
338
                  break;
339
               case 9:
340
                  if ((0x3ff003000000000L & l) == 0L)
341
                     break;
342
                  if (kind > 29)
343
                     kind = 29;
344
                  jjCheckNAdd(9);
345
                  break;
346
               case 10:
347
                  if (curChar == 46)
348
                     jjCheckNAdd(11);
349
                  break;
350
               case 11:
351
                  if ((0x3ff000000000000L & l) == 0L)
352
                     break;
353
                  if (kind > 33)
354
                     kind = 33;
355
                  jjCheckNAddStates(8, 10);
356
                  break;
357
               case 13:
358
                  if ((0x280000000000L & l) != 0L)
359
                     jjCheckNAdd(14);
360
                  break;
361
               case 14:
362
                  if ((0x3ff000000000000L & l) == 0L)
363
                     break;
364
                  if (kind > 33)
365
                     kind = 33;
366
                  jjCheckNAddTwoStates(14, 15);
367
                  break;
368
               case 16:
369
                  if (curChar == 34)
370
                     jjCheckNAddTwoStates(17, 18);
371
                  break;
372
               case 17:
373
                  if ((0xf7fffffbffffdbffL & l) != 0L)
374
                     jjCheckNAddTwoStates(17, 18);
375
                  break;
376
               case 18:
377
                  if (curChar == 34 && kind > 35)
378
                     kind = 35;
379
                  break;
380
               case 19:
381
                  if ((0xf7fffffbffffdbffL & l) != 0L && kind > 36)
382
                     kind = 36;
383
                  break;
384
               case 20:
385
                  if ((0x3ff000000000000L & l) == 0L)
386
                     break;
387
                  if (kind > 32)
388
                     kind = 32;
389
                  jjCheckNAddStates(0, 7);
390
                  break;
391
               case 21:
392
                  if ((0x3ff000000000000L & l) == 0L)
393
                     break;
394
                  if (kind > 32)
395
                     kind = 32;
396
                  jjCheckNAdd(21);
397
                  break;
398
               case 22:
399
                  if ((0x3ff000000000000L & l) != 0L)
400
                     jjCheckNAddTwoStates(22, 23);
401
                  break;
402
               case 23:
403
                  if (curChar != 46)
404
                     break;
405
                  if (kind > 33)
406
                     kind = 33;
407
                  jjCheckNAddStates(11, 13);
408
                  break;
409
               case 24:
410
                  if ((0x3ff000000000000L & l) == 0L)
411
                     break;
412
                  if (kind > 33)
413
                     kind = 33;
414
                  jjCheckNAddStates(11, 13);
415
                  break;
416
               case 26:
417
                  if ((0x280000000000L & l) != 0L)
418
                     jjCheckNAdd(27);
419
                  break;
420
               case 27:
421
                  if ((0x3ff000000000000L & l) == 0L)
422
                     break;
423
                  if (kind > 33)
424
                     kind = 33;
425
                  jjCheckNAddTwoStates(27, 15);
426
                  break;
427
               case 28:
428
                  if ((0x3ff000000000000L & l) != 0L)
429
                     jjCheckNAddTwoStates(28, 29);
430
                  break;
431
               case 30:
432
                  if ((0x280000000000L & l) != 0L)
433
                     jjCheckNAdd(31);
434
                  break;
435
               case 31:
436
                  if ((0x3ff000000000000L & l) == 0L)
437
                     break;
438
                  if (kind > 33)
439
                     kind = 33;
440
                  jjCheckNAddTwoStates(31, 15);
441
                  break;
442
               case 32:
443
                  if ((0x3ff000000000000L & l) != 0L)
444
                     jjCheckNAddStates(14, 16);
445
                  break;
446
               case 34:
447
                  if ((0x280000000000L & l) != 0L)
448
                     jjCheckNAdd(35);
449
                  break;
450
               case 35:
451
                  if ((0x3ff000000000000L & l) != 0L)
452
                     jjCheckNAddTwoStates(35, 15);
453
                  break;
454
               default : break;
455
            }
456
         } while(i != startsAt);
457
      }
458
      else if (curChar < 128)
459
      {
460
         long l = 1L << (curChar & 077);
461
         MatchLoop: do
462
         {
463
            switch(jjstateSet[--i])
464
            {
465
               case 36:
466
               case 17:
467
                  jjCheckNAddTwoStates(17, 18);
468
                  break;
469
               case 3:
470
                  if (kind > 36)
471
                     kind = 36;
472
                  if ((0x7fffffe87fffffeL & l) != 0L)
473
                  {
474
                     if (kind > 29)
475
                        kind = 29;
476
                     jjCheckNAdd(9);
477
                  }
478
                  if (curChar == 102)
479
                     jjstateSet[jjnewStateCnt++] = 6;
480
                  else if (curChar == 116)
481
                     jjstateSet[jjnewStateCnt++] = 2;
482
                  break;
483
               case 0:
484
                  if (curChar == 101 && kind > 27)
485
                     kind = 27;
486
                  break;
487
               case 1:
488
                  if (curChar == 117)
489
                     jjCheckNAdd(0);
490
                  break;
491
               case 2:
492
                  if (curChar == 114)
493
                     jjstateSet[jjnewStateCnt++] = 1;
494
                  break;
495
               case 4:
496
                  if (curChar == 115)
497
                     jjCheckNAdd(0);
498
                  break;
499
               case 5:
500
                  if (curChar == 108)
501
                     jjstateSet[jjnewStateCnt++] = 4;
502
                  break;
503
               case 6:
504
                  if (curChar == 97)
505
                     jjstateSet[jjnewStateCnt++] = 5;
506
                  break;
507
               case 7:
508
                  if (curChar == 102)
509
                     jjstateSet[jjnewStateCnt++] = 6;
510
                  break;
511
               case 8:
512
               case 9:
513
                  if ((0x7fffffe87fffffeL & l) == 0L)
514
                     break;
515
                  if (kind > 29)
516
                     kind = 29;
517
                  jjCheckNAdd(9);
518
                  break;
519
               case 12:
520
                  if ((0x2000000020L & l) != 0L)
521
                     jjAddStates(17, 18);
522
                  break;
523
               case 15:
524
                  if ((0x5000000050L & l) != 0L && kind > 33)
525
                     kind = 33;
526
                  break;
527
               case 19:
528
                  if (kind > 36)
529
                     kind = 36;
530
                  break;
531
               case 25:
532
                  if ((0x2000000020L & l) != 0L)
533
                     jjAddStates(19, 20);
534
                  break;
535
               case 29:
536
                  if ((0x2000000020L & l) != 0L)
537
                     jjAddStates(21, 22);
538
                  break;
539
               case 33:
540
                  if ((0x2000000020L & l) != 0L)
541
                     jjAddStates(23, 24);
542
                  break;
543
               default : break;
544
            }
545
         } while(i != startsAt);
546
      }
547
      else
548
      {
549
         int hiByte = (int)(curChar >> 8);
550
         int i1 = hiByte >> 6;
551
         long l1 = 1L << (hiByte & 077);
552
         int i2 = (curChar & 0xff) >> 6;
553
         long l2 = 1L << (curChar & 077);
554
         MatchLoop: do
555
         {
556
            switch(jjstateSet[--i])
557
            {
558
               case 36:
559
               case 17:
560
                  if (jjCanMove_1(hiByte, i1, i2, l1, l2))
561
                     jjCheckNAddTwoStates(17, 18);
562
                  break;
563
               case 3:
564
                  if (jjCanMove_0(hiByte, i1, i2, l1, l2))
565
                  {
566
                     if (kind > 29)
567
                        kind = 29;
568
                     jjCheckNAdd(9);
569
                  }
570
                  if (jjCanMove_1(hiByte, i1, i2, l1, l2))
571
                  {
572
                     if (kind > 36)
573
                        kind = 36;
574
                  }
575
                  break;
576
               case 8:
577
               case 9:
578
                  if (!jjCanMove_0(hiByte, i1, i2, l1, l2))
579
                     break;
580
                  if (kind > 29)
581
                     kind = 29;
582
                  jjCheckNAdd(9);
583
                  break;
584
               case 19:
585
                  if (jjCanMove_1(hiByte, i1, i2, l1, l2) && kind > 36)
586
                     kind = 36;
587
                  break;
588
               default : break;
589
            }
590
         } while(i != startsAt);
591
      }
592
      if (kind != 0x7fffffff)
593
      {
594
         jjmatchedKind = kind;
595
         jjmatchedPos = curPos;
596
         kind = 0x7fffffff;
597
      }
598
      ++curPos;
599
      if ((i = jjnewStateCnt) == (startsAt = 36 - (jjnewStateCnt = startsAt)))
600
         return curPos;
601
      try { curChar = input_stream.readChar(); }
602
      catch(java.io.IOException e) { return curPos; }
603
   }
604
}
599 605
static final int[] jjnextStates = {
600 606
   21, 22, 23, 28, 29, 32, 33, 15, 11, 12, 15, 24, 25, 15, 32, 33, 
601 607
   15, 13, 14, 26, 27, 30, 31, 34, 35, 
602
};
603
public static final String[] jjstrLiteralImages = {
604
"", null, null, null, null, "\53", "\55", "\52", "\57", "\76", "\74", "\41", 
605
"\75\75", "\74\75", "\76\75", "\41\75", "\174\174", "\46\46", null, "\133", "\135", 
606
"\50", "\51", "\42", "\54", "\72", "\73", null, "\156\165\154\154", null, null, null, 
607
null, null, null, null, null, };
608
public static final String[] lexStateNames = {
609
   "DEFAULT", 
610
};
608
};
609
private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
610
{
611
   switch(hiByte)
612
   {
613
      case 255:
614
         return ((jjbitVec0[i2] & l2) != 0L);
615
      default : 
616
         return false;
617
   }
618
}
619
private static final boolean jjCanMove_1(int hiByte, int i1, int i2, long l1, long l2)
620
{
621
   switch(hiByte)
622
   {
623
      case 0:
624
         return ((jjbitVec3[i2] & l2) != 0L);
625
      default : 
626
         if ((jjbitVec1[i1] & l1) != 0L)
627
            return true;
628
         return false;
629
   }
630
}
631
public static final String[] jjstrLiteralImages = {
632
"", null, null, null, null, "\53", "\55", "\52", "\57", "\76", "\74", "\41", 
633
"\75\75", "\74\75", "\76\75", "\41\75", "\174\174", "\46\46", null, "\133", "\135", 
634
"\50", "\51", "\42", "\54", "\72", "\73", null, "\156\165\154\154", null, null, null, 
635
null, null, null, null, null, };
636
public static final String[] lexStateNames = {
637
   "DEFAULT", 
638
};
611 639
static final long[] jjtoToken = {
612 640
   0x1b3ffbffe1L, 
613
};

641
};
614 642
static final long[] jjtoSkip = {
615 643
   0x1eL, 
616
};

617
protected SimpleCharStream input_stream;

618
private final int[] jjrounds = new int[36];

619
private final int[] jjstateSet = new int[72];

620
protected char curChar;

621
public ExpressionParserTokenManager(SimpleCharStream stream){

622
   if (SimpleCharStream.staticFlag)

623
      throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");

624
   input_stream = stream;

625
}

626
public ExpressionParserTokenManager(SimpleCharStream stream, int lexState){

627
   this(stream);

628
   SwitchTo(lexState);

629
}

630
public void ReInit(SimpleCharStream stream)

631
{

632
   jjmatchedPos = jjnewStateCnt = 0;

633
   curLexState = defaultLexState;

634
   input_stream = stream;

635
   ReInitRounds();

636
}

637
private final void ReInitRounds()

638
{

639
   int i;

640
   jjround = 0x80000001;

641
   for (i = 36; i-- > 0;)

642
      jjrounds[i] = 0x80000000;

643
}

644
public void ReInit(SimpleCharStream stream, int lexState)

645
{

646
   ReInit(stream);

647
   SwitchTo(lexState);

648
}

649
public void SwitchTo(int lexState)

650
{

651
   if (lexState >= 1 || lexState < 0)

652
      throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);

653
   else

654
      curLexState = lexState;

655
}

656

  
657
protected Token jjFillToken()

658
{

659
   Token t = Token.newToken(jjmatchedKind);

660
   t.kind = jjmatchedKind;

661
   String im = jjstrLiteralImages[jjmatchedKind];

662
   t.image = (im == null) ? input_stream.GetImage() : im;

663
   t.beginLine = input_stream.getBeginLine();

664
   t.beginColumn = input_stream.getBeginColumn();

665
   t.endLine = input_stream.getEndLine();

666
   t.endColumn = input_stream.getEndColumn();

667
   return t;

668
}

669

  
670
int curLexState = 0;

671
int defaultLexState = 0;

672
int jjnewStateCnt;

673
int jjround;

674
int jjmatchedPos;

675
int jjmatchedKind;

676

  
677
public Token getNextToken() 

678
{

679
  int kind;

680
  Token specialToken = null;

681
  Token matchedToken;

682
  int curPos = 0;

683

  
644
};
645
protected SimpleCharStream input_stream;
646
private final int[] jjrounds = new int[36];
647
private final int[] jjstateSet = new int[72];
648
protected char curChar;
649
public ExpressionParserTokenManager(SimpleCharStream stream){
650
   if (SimpleCharStream.staticFlag)
651
      throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
652
   input_stream = stream;
653
}
654
public ExpressionParserTokenManager(SimpleCharStream stream, int lexState){
655
   this(stream);
656
   SwitchTo(lexState);
657
}
658
public void ReInit(SimpleCharStream stream)
659
{
660
   jjmatchedPos = jjnewStateCnt = 0;
661
   curLexState = defaultLexState;
662
   input_stream = stream;
663
   ReInitRounds();
664
}
665
private final void ReInitRounds()
666
{
667
   int i;
668
   jjround = 0x80000001;
669
   for (i = 36; i-- > 0;)
670
      jjrounds[i] = 0x80000000;
671
}
672
public void ReInit(SimpleCharStream stream, int lexState)
673
{
674
   ReInit(stream);
675
   SwitchTo(lexState);
676
}
677
public void SwitchTo(int lexState)
678
{
679
   if (lexState >= 1 || lexState < 0)
680
      throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
681
   else
682
      curLexState = lexState;
683
}
684

  
685
protected Token jjFillToken()
686
{
687
   Token t = Token.newToken(jjmatchedKind);
688
   t.kind = jjmatchedKind;
689
   String im = jjstrLiteralImages[jjmatchedKind];
690
   t.image = (im == null) ? input_stream.GetImage() : im;
691
   t.beginLine = input_stream.getBeginLine();
692
   t.beginColumn = input_stream.getBeginColumn();
693
   t.endLine = input_stream.getEndLine();
694
   t.endColumn = input_stream.getEndColumn();
695
   return t;
696
}
697

  
698
int curLexState = 0;
699
int defaultLexState = 0;
700
int jjnewStateCnt;
701
int jjround;
702
int jjmatchedPos;
703
int jjmatchedKind;
704

  
705
public Token getNextToken() 
706
{
707
  int kind;
708
  Token specialToken = null;
709
  Token matchedToken;
710
  int curPos = 0;
711

  
684 712
  EOFLoop :
685
  for (;;)
686
  {   
687
   try   
688
   {     
689
      curChar = input_stream.BeginToken();
690
   }     
691
   catch(java.io.IOException e)
692
   {        
693
      jjmatchedKind = 0;
694
      matchedToken = jjFillToken();
695
      return matchedToken;
696
   }
697

  
698
   try { input_stream.backup(0);
699
      while (curChar <= 13 && (0x2400L & (1L << curChar)) != 0L)
700
         curChar = input_stream.BeginToken();
701
   }
702
   catch (java.io.IOException e1) { continue EOFLoop; }
703
   jjmatchedKind = 0x7fffffff;
704
   jjmatchedPos = 0;
705
   curPos = jjMoveStringLiteralDfa0_0();
706
   if (jjmatchedKind != 0x7fffffff)
707
   {
708
      if (jjmatchedPos + 1 < curPos)
709
         input_stream.backup(curPos - jjmatchedPos - 1);
710
      if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
711
      {
712
         matchedToken = jjFillToken();
713
         return matchedToken;
714
      }
715
      else
716
      {
717
         continue EOFLoop;
718
      }
719
   }
720
   int error_line = input_stream.getEndLine();
721
   int error_column = input_stream.getEndColumn();
722
   String error_after = null;
723
   boolean EOFSeen = false;
724
   try { input_stream.readChar(); input_stream.backup(1); }
725
   catch (java.io.IOException e1) {
726
      EOFSeen = true;
727
      error_after = curPos <= 1 ? "" : input_stream.GetImage();
728
      if (curChar == '\n' || curChar == '\r') {
729
         error_line++;
730
         error_column = 0;
731
      }
732
      else
733
         error_column++;
734
   }
735
   if (!EOFSeen) {
736
      input_stream.backup(1);
737
      error_after = curPos <= 1 ? "" : input_stream.GetImage();
738
   }
739
   throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
740
  }
741
}
742

  
743
}
713
  for (;;)
714
  {   
715
   try   
716
   {     
717
      curChar = input_stream.BeginToken();
718
   }     
719
   catch(java.io.IOException e)
720
   {        
721
      jjmatchedKind = 0;
722
      matchedToken = jjFillToken();
723
      return matchedToken;
724
   }
725

  
726
   try { input_stream.backup(0);
727
      while (curChar <= 13 && (0x2400L & (1L << curChar)) != 0L)
728
         curChar = input_stream.BeginToken();
729
   }
730
   catch (java.io.IOException e1) { continue EOFLoop; }
731
   jjmatchedKind = 0x7fffffff;
732
   jjmatchedPos = 0;
733
   curPos = jjMoveStringLiteralDfa0_0();
734
   if (jjmatchedKind != 0x7fffffff)
735
   {
736
      if (jjmatchedPos + 1 < curPos)
737
         input_stream.backup(curPos - jjmatchedPos - 1);
738
      if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
739
      {
740
         matchedToken = jjFillToken();
741
         return matchedToken;
742
      }
743
      else
744
      {
745
         continue EOFLoop;
746
      }
747
   }
748
   int error_line = input_stream.getEndLine();
749
   int error_column = input_stream.getEndColumn();
750
   String error_after = null;
751
   boolean EOFSeen = false;
752
   try { input_stream.readChar(); input_stream.backup(1); }
753
   catch (java.io.IOException e1) {
754
      EOFSeen = true;
755
      error_after = curPos <= 1 ? "" : input_stream.GetImage();
756
      if (curChar == '\n' || curChar == '\r') {
757
         error_line++;
758
         error_column = 0;
759
      }
760
      else
761
         error_column++;
762
   }
763
   if (!EOFSeen) {
764
      input_stream.backup(1);
765
      error_after = curPos <= 1 ? "" : input_stream.GetImage();
766
   }
767
   throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
768
  }
769
}
770

  
771
}

Also available in: Unified diff