History

My first initial commit with all of mine experimental changes.

Dmitry Kabak (userdima committed 13 years ago

Commit d37b88d1 parent 3f5b46618352 files · +2598093 −-8690Browse files

Showing the changes to java/pkg/com/sun/tools/example/debug/expr (10 of 18352 files). Show all

Unified · Split

10 files
  1. java/pkg/com/sun/tools/example/debug/expr/ASCII_UCodeESC_CharStream.java +524 −0
  2. java/pkg/com/sun/tools/example/debug/expr/Expr.jj +724 −0
  3. java/pkg/com/sun/tools/example/debug/expr/ExpressionParser.java +3933 −0
  4. java/pkg/com/sun/tools/example/debug/expr/ExpressionParserConstants.java +264 −0
  5. java/pkg/com/sun/tools/example/debug/expr/ExpressionParserTokenManager.java +1757 −0
  6. java/pkg/com/sun/tools/example/debug/expr/LValue.java +1056 −0
  7. java/pkg/com/sun/tools/example/debug/expr/ParseException.java +221 −0
  8. java/pkg/com/sun/tools/example/debug/expr/Token.java +107 −0
  9. java/pkg/com/sun/tools/example/debug/expr/TokenMgrError.java +161 −0
  10. java/pkg/com/sun/tools/example/debug/expr/mkfile +15 −0
java/pkg/com/sun/tools/example/debug/expr/ASCII_UCodeESC_CharStream.java+524−0
@@ -0,0 +1,524 @@
1/*
2 * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26/* Generated By:JavaCC: Do not edit this line. ASCII_UCodeESC_CharStream.java Version 0.7pre6 */
27
28package com.sun.tools.example.debug.expr;
29
30/**
31 * An implementation of interface CharStream, where the stream is assumed to
32 * contain only ASCII characters (with java-like unicode escape processing).
33 */
34
35public final class ASCII_UCodeESC_CharStream
36{
37 public static final boolean staticFlag = false;
38 static final int hexval(char c) throws java.io.IOException {
39 switch(c)
40 {
41 case '0' :
42 return 0;
43 case '1' :
44 return 1;
45 case '2' :
46 return 2;
47 case '3' :
48 return 3;
49 case '4' :
50 return 4;
51 case '5' :
52 return 5;
53 case '6' :
54 return 6;
55 case '7' :
56 return 7;
57 case '8' :
58 return 8;
59 case '9' :
60 return 9;
61
62 case 'a' :
63 case 'A' :
64 return 10;
65 case 'b' :
66 case 'B' :
67 return 11;
68 case 'c' :
69 case 'C' :
70 return 12;
71 case 'd' :
72 case 'D' :
73 return 13;
74 case 'e' :
75 case 'E' :
76 return 14;
77 case 'f' :
78 case 'F' :
79 return 15;
80 }
81
82 throw new java.io.IOException(); // Should never come here
83 }
84
85 public int bufpos = -1;
86 int bufsize;
87 int available;
88 int tokenBegin;
89 private int bufline[];
90 private int bufcolumn[];
91
92 private int column = 0;
93 private int line = 1;
94
95 private java.io.InputStream inputStream;
96
97 private boolean prevCharIsCR = false;
98 private boolean prevCharIsLF = false;
99
100 private byte[] nextCharBuf;
101 private char[] buffer;
102 private int maxNextCharInd = 0;
103 private int nextCharInd = -1;
104 private int inBuf = 0;
105
106 private final void ExpandBuff(boolean wrapAround)
107 {
108 char[] newbuffer = new char[bufsize + 2048];
109 int newbufline[] = new int[bufsize + 2048];
110 int newbufcolumn[] = new int[bufsize + 2048];
111
112 try
113 {
114 if (wrapAround)
115 {
116 System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
117 System.arraycopy(buffer, 0, newbuffer,
118 bufsize - tokenBegin, bufpos);
119 buffer = newbuffer;
120
121 System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
122 System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos);
123 bufline = newbufline;
124
125 System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
126 System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos);
127 bufcolumn = newbufcolumn;
128
129 bufpos += (bufsize - tokenBegin);
130 }
131 else
132 {
133 System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
134 buffer = newbuffer;
135
136 System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
137 bufline = newbufline;
138
139 System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
140 bufcolumn = newbufcolumn;
141
142 bufpos -= tokenBegin;
143 }
144 }
145 catch (Throwable t)
146 {
147 throw new Error(t.getMessage());
148 }
149
150 available = (bufsize += 2048);
151 tokenBegin = 0;
152 }
153
154 private final void FillBuff() throws java.io.IOException
155 {
156 int i;
157 if (maxNextCharInd == 4096)
158 maxNextCharInd = nextCharInd = 0;
159
160 try {
161 if ((i = inputStream.read(nextCharBuf, maxNextCharInd,
162 4096 - maxNextCharInd)) == -1)
163 {
164 inputStream.close();
165 throw new java.io.IOException();
166 }
167 else
168 maxNextCharInd += i;
169 return;
170 }
171 catch(java.io.IOException e) {
172 if (bufpos != 0)
173 {
174 --bufpos;
175 backup(0);
176 }
177 else
178 {
179 bufline[bufpos] = line;
180 bufcolumn[bufpos] = column;
181 }
182 throw e;
183 }
184 }
185
186 private final byte ReadByte() throws java.io.IOException
187 {
188 if (++nextCharInd >= maxNextCharInd)
189 FillBuff();
190
191 return nextCharBuf[nextCharInd];
192 }
193
194 public final char BeginToken() throws java.io.IOException
195 {
196 if (inBuf > 0)
197 {
198 --inBuf;
199 return buffer[tokenBegin = (bufpos == bufsize - 1) ? (bufpos = 0)
200 : ++bufpos];
201 }
202
203 tokenBegin = 0;
204 bufpos = -1;
205
206 return readChar();
207 }
208
209 private final void AdjustBuffSize()
210 {
211 if (available == bufsize)
212 {
213 if (tokenBegin > 2048)
214 {
215 bufpos = 0;
216 available = tokenBegin;
217 }
218 else
219 ExpandBuff(false);
220 }
221 else if (available > tokenBegin)
222 available = bufsize;
223 else if ((tokenBegin - available) < 2048)
224 ExpandBuff(true);
225 else
226 available = tokenBegin;
227 }
228
229 private final void UpdateLineColumn(char c)
230 {
231 column++;
232
233 if (prevCharIsLF)
234 {
235 prevCharIsLF = false;
236 line += (column = 1);
237 }
238 else if (prevCharIsCR)
239 {
240 prevCharIsCR = false;
241 if (c == '\n')
242 {
243 prevCharIsLF = true;
244 }
245 else
246 line += (column = 1);
247 }
248
249 switch (c)
250 {
251 case '\r' :
252 prevCharIsCR = true;
253 break;
254 case '\n' :
255 prevCharIsLF = true;
256 break;
257 case '\t' :
258 column--;
259 column += (8 - (column & 07));
260 break;
261 default :
262 break;
263 }
264
265 bufline[bufpos] = line;
266 bufcolumn[bufpos] = column;
267 }
268
269 public final char readChar() throws java.io.IOException
270 {
271 if (inBuf > 0)
272 {
273 --inBuf;
274 return buffer[(bufpos == bufsize - 1) ? (bufpos = 0) : ++bufpos];
275 }
276
277 char c;
278
279 if (++bufpos == available)
280 AdjustBuffSize();
281
282 if (((buffer[bufpos] = c = (char)((char)0xff & ReadByte())) == '\\'))
283 {
284 UpdateLineColumn(c);
285
286 int backSlashCnt = 1;
287
288 for (;;) // Read all the backslashes
289 {
290 if (++bufpos == available)
291 AdjustBuffSize();
292
293 try
294 {
295 if ((buffer[bufpos] = c = (char)((char)0xff & ReadByte())) != '\\')
296 {
297 UpdateLineColumn(c);
298 // found a non-backslash char.
299 if ((c == 'u') && ((backSlashCnt & 1) == 1))
300 {
301 if (--bufpos < 0)
302 bufpos = bufsize - 1;
303
304 break;
305 }
306
307 backup(backSlashCnt);
308 return '\\';
309 }
310 }
311 catch(java.io.IOException e)
312 {
313 if (backSlashCnt > 1)
314 backup(backSlashCnt);
315
316 return '\\';
317 }
318
319 UpdateLineColumn(c);
320 backSlashCnt++;
321 }
322
323 // Here, we have seen an odd number of backslash's followed by a 'u'
324 try
325 {
326 while ((c = (char)((char)0xff & ReadByte())) == 'u')
327 ++column;
328
329 buffer[bufpos] = c = (char)(hexval(c) << 12 |
330 hexval((char)((char)0xff & ReadByte())) << 8 |
331 hexval((char)((char)0xff & ReadByte())) << 4 |
332 hexval((char)((char)0xff & ReadByte())));
333
334 column += 4;
335 }
336 catch(java.io.IOException e)
337 {
338 throw new Error("Invalid escape character at line " + line +
339 " column " + column + ".");
340 }
341
342 if (backSlashCnt == 1)
343 return c;
344 else
345 {
346 backup(backSlashCnt - 1);
347 return '\\';
348 }
349 }
350 else
351 {
352 UpdateLineColumn(c);
353 return (c);
354 }
355 }
356
357 /**
358 * @deprecated
359 * @see #getEndColumn
360 */
361 @Deprecated
362 public final int getColumn() {
363 return bufcolumn[bufpos];
364 }
365
366 /**
367 * @deprecated
368 * @see #getEndLine
369 */
370 @Deprecated
371 public final int getLine() {
372 return bufline[bufpos];
373 }
374
375 public final int getEndColumn() {
376 return bufcolumn[bufpos];
377 }
378
379 public final int getEndLine() {
380 return bufline[bufpos];
381 }
382
383 public final int getBeginColumn() {
384 return bufcolumn[tokenBegin];
385 }
386
387 public final int getBeginLine() {
388 return bufline[tokenBegin];
389 }
390
391 public final void backup(int amount) {
392
393 inBuf += amount;
394 if ((bufpos -= amount) < 0)
395 bufpos += bufsize;
396 }
397
398 public ASCII_UCodeESC_CharStream(java.io.InputStream dstream,
399 int startline, int startcolumn, int buffersize)
400 {
401 inputStream = dstream;
402 line = startline;
403 column = startcolumn - 1;
404
405 available = bufsize = buffersize;
406 buffer = new char[buffersize];
407 bufline = new int[buffersize];
408 bufcolumn = new int[buffersize];
409 nextCharBuf = new byte[4096];
410 }
411
412 public ASCII_UCodeESC_CharStream(java.io.InputStream dstream,
413 int startline, int startcolumn)
414 {
415 this(dstream, startline, startcolumn, 4096);
416 }
417 public void ReInit(java.io.InputStream dstream,
418 int startline, int startcolumn, int buffersize)
419 {
420 inputStream = dstream;
421 line = startline;
422 column = startcolumn - 1;
423
424 if (buffer == null || buffersize != buffer.length)
425 {
426 available = bufsize = buffersize;
427 buffer = new char[buffersize];
428 bufline = new int[buffersize];
429 bufcolumn = new int[buffersize];
430 nextCharBuf = new byte[4096];
431 }
432 prevCharIsLF = prevCharIsCR = false;
433 tokenBegin = inBuf = maxNextCharInd = 0;
434 nextCharInd = bufpos = -1;
435 }
436
437 public void ReInit(java.io.InputStream dstream,
438 int startline, int startcolumn)
439 {
440 ReInit(dstream, startline, startcolumn, 4096);
441 }
442
443 public final String GetImage()
444 {
445 if (bufpos >= tokenBegin)
446 return new String(buffer, tokenBegin, bufpos - tokenBegin + 1);
447 else
448 return new String(buffer, tokenBegin, bufsize - tokenBegin) +
449 new String(buffer, 0, bufpos + 1);
450 }
451
452 public final char[] GetSuffix(int len)
453 {
454 char[] ret = new char[len];
455
456 if ((bufpos + 1) >= len)
457 System.arraycopy(buffer, bufpos - len + 1, ret, 0, len);
458 else
459 {
460 System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0,
461 len - bufpos - 1);
462 System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1);
463 }
464
465 return ret;
466 }
467
468 public void Done()
469 {
470 nextCharBuf = null;
471 buffer = null;
472 bufline = null;
473 bufcolumn = null;
474 }
475
476 /**
477 * Method to adjust line and column numbers for the start of a token.<BR>
478 */
479 public void adjustBeginLineColumn(int newLine, int newCol)
480 {
481 int start = tokenBegin;
482 int len;
483
484 if (bufpos >= tokenBegin)
485 {
486 len = bufpos - tokenBegin + inBuf + 1;
487 }
488 else
489 {
490 len = bufsize - tokenBegin + bufpos + 1 + inBuf;
491 }
492
493 int i = 0, j = 0, k = 0;
494 int nextColDiff = 0, columnDiff = 0;
495
496 while (i < len &&
497 bufline[j = start % bufsize] == bufline[k = ++start % bufsize])
498 {
499 bufline[j] = newLine;
500 nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j];
501 bufcolumn[j] = newCol + columnDiff;
502 columnDiff = nextColDiff;
503 i++;
504 }
505
506 if (i < len)
507 {
508 bufline[j] = newLine++;
509 bufcolumn[j] = newCol + columnDiff;
510
511 while (i++ < len)
512 {
513 if (bufline[j = start % bufsize] != bufline[++start % bufsize])
514 bufline[j] = newLine++;
515 else
516 bufline[j] = newLine;
517 }
518 }
519
520 line = bufline[j];
521 column = bufcolumn[j];
522 }
523
524}
java/pkg/com/sun/tools/example/debug/expr/Expr.jj+724−0
@@ -0,0 +1,724 @@
1/*
2 * Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26options {
27 JAVA_UNICODE_ESCAPE = true;
28 STATIC = false;
29}
30
31PARSER_BEGIN(ExpressionParser)
32
33package com.sun.tools.example.debug.expr;
34
35import com.sun.jdi.*;
36import java.util.Stack;
37import java.util.List;
38import java.util.ArrayList;
39
40public class ExpressionParser {
41
42 Stack stack = new Stack();
43 VirtualMachine vm = null;
44 GetFrame frameGetter = null;
45 private static GetFrame lastFrameGetter;
46 private static LValue lastLValue;
47
48 LValue peek() {
49 return (LValue)stack.peek();
50 }
51
52 LValue pop() {
53 return (LValue)stack.pop();
54 }
55
56 void push(LValue lval) {
57 stack.push(lval);
58 }
59
60 public static Value getMassagedValue() throws ParseException {
61 return lastLValue.getMassagedValue(lastFrameGetter);
62 }
63
64 public interface GetFrame {
65 StackFrame get() throws IncompatibleThreadStateException;
66 }
67
68 public static Value evaluate(String expr, VirtualMachine vm,
69 GetFrame frameGetter) throws ParseException,
70 InvocationException,
71 InvalidTypeException,
72 ClassNotLoadedException,
73 IncompatibleThreadStateException {
74 // TODO StringBufferInputStream is deprecated.
75 java.io.InputStream in = new java.io.StringBufferInputStream(expr);
76 ExpressionParser parser = new ExpressionParser(in);
77 parser.vm = vm;
78 parser.frameGetter = frameGetter;
79 Value value = null;
80 parser.Expression();
81 lastFrameGetter = frameGetter;
82 lastLValue = parser.pop();
83 return lastLValue.getValue();
84 }
85
86 public static void main(String args[]) {
87 ExpressionParser parser;
88 System.out.print("Java Expression Parser: ");
89 if (args.length == 0) {
90 System.out.println("Reading from standard input . . .");
91 parser = new ExpressionParser(System.in);
92 } else if (args.length == 1) {
93 System.out.println("Reading from file " + args[0] + " . . .");
94 try {
95 parser = new ExpressionParser(new java.io.FileInputStream(args[0]));
96 } catch (java.io.FileNotFoundException e) {
97 System.out.println("Java Parser Version 1.0.2: File " +
98 args[0] + " not found.");
99 return;
100 }
101 } else {
102 System.out.println("Usage is one of:");
103 System.out.println(" java ExpressionParser < inputfile");
104 System.out.println("OR");
105 System.out.println(" java ExpressionParser inputfile");
106 return;
107 }
108 try {
109 parser.Expression();
110 System.out.print("Java Expression Parser: ");
111 System.out.println("Java program parsed successfully.");
112 } catch (ParseException e) {
113 System.out.print("Java Expression Parser: ");
114 System.out.println("Encountered errors during parse.");
115 }
116 }
117
118}
119
120PARSER_END(ExpressionParser)
121
122
123SKIP : /* WHITE SPACE */
124{
125 " "
126| "\t"
127| "\n"
128| "\r"
129| "\f"
130}
131
132SPECIAL_TOKEN : /* COMMENTS */
133{
134 <SINGLE_LINE_COMMENT: "//" (~["\n","\r"])* ("\n"|"\r"|"\r\n")>
135| <FORMAL_COMMENT: "/**" (~["*"])* "*" ("*" | (~["*","/"] (~["*"])* "*"))* "/">
136| <MULTI_LINE_COMMENT: "/*" (~["*"])* "*" ("*" | (~["*","/"] (~["*"])* "*"))* "/">
137}
138
139TOKEN : /* RESERVED WORDS AND LITERALS */
140{
141 < ABSTRACT: "abstract" >
142| < BOOLEAN: "boolean" >
143| < BREAK: "break" >
144| < BYTE: "byte" >
145| < CASE: "case" >
146| < CATCH: "catch" >
147| < CHAR: "char" >
148| < CLASS: "class" >
149| < CONST: "const" >
150| < CONTINUE: "continue" >
151| < _DEFAULT: "default" >
152| < DO: "do" >
153| < DOUBLE: "double" >
154| < ELSE: "else" >
155| < EXTENDS: "extends" >
156| < FALSE: "false" >
157| < FINAL: "final" >
158| < FINALLY: "finally" >
159| < FLOAT: "float" >
160| < FOR: "for" >
161| < GOTO: "goto" >
162| < IF: "if" >
163| < IMPLEMENTS: "implements" >
164| < IMPORT: "import" >
165| < INSTANCEOF: "instanceof" >
166| < INT: "int" >
167| < INTERFACE: "interface" >
168| < LONG: "long" >
169| < NATIVE: "native" >
170| < NEW: "new" >
171| < NULL: "null" >
172| < PACKAGE: "package">
173| < PRIVATE: "private" >
174| < PROTECTED: "protected" >
175| < PUBLIC: "public" >
176| < RETURN: "return" >
177| < SHORT: "short" >
178| < STATIC: "static" >
179| < SUPER: "super" >
180| < SWITCH: "switch" >
181| < SYNCHRONIZED: "synchronized" >
182| < THIS: "this" >
183| < THROW: "throw" >
184| < THROWS: "throws" >
185| < TRANSIENT: "transient" >
186| < TRUE: "true" >
187| < TRY: "try" >
188| < VOID: "void" >
189| < VOLATILE: "volatile" >
190| < WHILE: "while" >
191}
192
193TOKEN : /* LITERALS */
194{
195 <
196 INTEGER_LITERAL:
197 <DECIMAL_LITERAL> (["l","L"])?
198 | <HEX_LITERAL> (["l","L"])?
199 | <OCTAL_LITERAL> (["l","L"])?
200 >
201|
202 < #DECIMAL_LITERAL: ["1"-"9"] (["0"-"9"])* >
203|
204 < #HEX_LITERAL: "0" ["x","X"] (["0"-"9","a"-"f","A"-"F"])+ >
205|
206 < #OCTAL_LITERAL: "0" (["0"-"7"])* >
207|
208 < FLOATING_POINT_LITERAL:
209 (["0"-"9"])+ "." (["0"-"9"])* (<EXPONENT>)? (["f","F","d","D"])?
210 | "." (["0"-"9"])+ (<EXPONENT>)? (["f","F","d","D"])?
211 | (["0"-"9"])+ <EXPONENT> (["f","F","d","D"])?
212 | (["0"-"9"])+ (<EXPONENT>)? ["f","F","d","D"]
213 >
214|
215 < #EXPONENT: ["e","E"] (["+","-"])? (["0"-"9"])+ >
216|
217 < CHARACTER_LITERAL:
218 "'"
219 ( (~["'","\\","\n","\r"])
220 | ("\\"
221 ( ["n","t","b","r","f","\\","'","\""]
222 | ["0"-"7"] ( ["0"-"7"] )?
223 | ["0"-"3"] ["0"-"7"] ["0"-"7"]
224 )
225 )
226 )
227 "'"
228 >
229|
230 < STRING_LITERAL:
231 "\""
232 ( (~["\"","\\","\n","\r"])
233 | ("\\"
234 ( ["n","t","b","r","f","\\","'","\""]
235 | ["0"-"7"] ( ["0"-"7"] )?
236 | ["0"-"3"] ["0"-"7"] ["0"-"7"]
237 )
238 )
239 )*
240 "\""
241 >
242}
243
244TOKEN : /* IDENTIFIERS */
245{
246 < IDENTIFIER: <LETTER> (<LETTER>|<DIGIT>)* >
247|
248 < #LETTER:
249 [
250 "\u0024",
251 "\u0041"-"\u005a",
252 "\u005f",
253 "\u0061"-"\u007a",
254 "\u00c0"-"\u00d6",
255 "\u00d8"-"\u00f6",
256 "\u00f8"-"\u00ff",
257 "\u0100"-"\u1fff",
258 "\u3040"-"\u318f",
259 "\u3300"-"\u337f",
260 "\u3400"-"\u3d2d",
261 "\u4e00"-"\u9fff",
262 "\uf900"-"\ufaff"
263 ]
264 >
265|
266 < #DIGIT:
267 [
268 "\u0030"-"\u0039",
269 "\u0660"-"\u0669",
270 "\u06f0"-"\u06f9",
271 "\u0966"-"\u096f",
272 "\u09e6"-"\u09ef",
273 "\u0a66"-"\u0a6f",
274 "\u0ae6"-"\u0aef",
275 "\u0b66"-"\u0b6f",
276 "\u0be7"-"\u0bef",
277 "\u0c66"-"\u0c6f",
278 "\u0ce6"-"\u0cef",
279 "\u0d66"-"\u0d6f",
280 "\u0e50"-"\u0e59",
281 "\u0ed0"-"\u0ed9",
282 "\u1040"-"\u1049"
283 ]
284 >
285}
286
287TOKEN : /* SEPARATORS */
288{
289 < LPAREN: "(" >
290| < RPAREN: ")" >
291| < LBRACE: "{" >
292| < RBRACE: "}" >
293| < LBRACKET: "[" >
294| < RBRACKET: "]" >
295| < SEMICOLON: ";" >
296| < COMMA: "," >
297| < DOT: "." >
298}
299
300TOKEN : /* OPERATORS */
301{
302 < ASSIGN: "=" >
303| < GT: ">" >
304| < LT: "<" >
305| < BANG: "!" >
306| < TILDE: "~" >
307| < HOOK: "?" >
308| < COLON: ":" >
309| < EQ: "==" >
310| < LE: "<=" >
311| < GE: ">=" >
312| < NE: "!=" >
313| < SC_OR: "||" >
314| < SC_AND: "&&" >
315| < INCR: "++" >
316| < DECR: "--" >
317| < PLUS: "+" >
318| < MINUS: "-" >
319| < STAR: "*" >
320| < SLASH: "/" >
321| < BIT_AND: "&" >
322| < BIT_OR: "|" >
323| < XOR: "^" >
324| < REM: "%" >
325| < LSHIFT: "<<" >
326| < RSIGNEDSHIFT: ">>" >
327| < RUNSIGNEDSHIFT: ">>>" >
328| < PLUSASSIGN: "+=" >
329| < MINUSASSIGN: "-=" >
330| < STARASSIGN: "*=" >
331| < SLASHASSIGN: "/=" >
332| < ANDASSIGN: "&=" >
333| < ORASSIGN: "|=" >
334| < XORASSIGN: "^=" >
335| < REMASSIGN: "%=" >
336| < LSHIFTASSIGN: "<<=" >
337| < RSIGNEDSHIFTASSIGN: ">>=" >
338| < RUNSIGNEDSHIFTASSIGN: ">>>=" >
339}
340
341
342/*****************************************
343 * THE JAVA LANGUAGE GRAMMAR STARTS HERE *
344 *****************************************/
345
346/*
347 * Type, name and expression syntax follows.
348 */
349
350void Type() :
351{}
352{
353 ( PrimitiveType() | Name() ) ( "[" "]" )*
354}
355
356void PrimitiveType() :
357{}
358{
359 "boolean"
360|
361 "char"
362|
363 "byte"
364|
365 "short"
366|
367 "int"
368|
369 "long"
370|
371 "float"
372|
373 "double"
374}
375
376
377String Name() :
378{StringBuffer sb = new StringBuffer();}
379{
380 <IDENTIFIER> { sb.append(token); }
381 ( LOOKAHEAD(2) "." <IDENTIFIER> { sb.append('.'); sb.append(token); }
382 )*
383 { return sb.toString(); }
384}
385
386void NameList() :
387{}
388{
389 Name()
390 ( "," Name()
391 )*
392}
393
394
395/*
396 * Expression syntax follows.
397 */
398
399void Expression() :
400{}
401{
402 LOOKAHEAD( PrimaryExpression() AssignmentOperator() )
403 Assignment()
404|
405 ConditionalExpression()
406}
407
408void Assignment() :
409{}
410{
411 PrimaryExpression() AssignmentOperator() Expression()
412 { LValue exprVal = pop(); pop().setValue(exprVal); push(exprVal);}
413}
414
415void AssignmentOperator() :
416{}
417{
418 "=" | "*=" | "/=" | "%=" | "+=" | "-=" | "<<=" | ">>=" | ">>>=" | "&=" | "^=" | "|="
419}
420
421void ConditionalExpression() :
422{}
423{
424 ConditionalOrExpression()
425 [ "?" Expression() ":" ConditionalExpression()
426 { LValue falseBranch = pop(); LValue trueBranch = pop();
427 Value cond = pop().interiorGetValue();
428 if (cond instanceof BooleanValue) {
429 push(((BooleanValue)cond).booleanValue()?
430 trueBranch : falseBranch);
431 } else {
432 throw new ParseException("Condition must be boolean");
433 }
434 }
435 ]
436}
437
438void ConditionalOrExpression() :
439{}
440{
441 ConditionalAndExpression()
442 ( "||" ConditionalAndExpression()
443 { throw new ParseException("operation not yet supported"); }
444 )*
445}
446
447void ConditionalAndExpression() :
448{}
449{
450 InclusiveOrExpression()
451 ( "&&" InclusiveOrExpression()
452 { throw new ParseException("operation not yet supported"); }
453 )*
454}
455
456void InclusiveOrExpression() :
457{}
458{
459 ExclusiveOrExpression()
460 ( "|" ExclusiveOrExpression()
461 { throw new ParseException("operation not yet supported"); }
462 )*
463}
464
465void ExclusiveOrExpression() :
466{}
467{
468 AndExpression()
469 ( "^" AndExpression()
470 { throw new ParseException("operation not yet supported"); }
471 )*
472}
473
474void AndExpression() :
475{}
476{
477 EqualityExpression()
478 ( "&" EqualityExpression()
479 { throw new ParseException("operation not yet supported"); }
480 )*
481}
482
483void EqualityExpression() :
484{Token tok;}
485{
486 InstanceOfExpression()
487 ( ( tok = "==" | tok = "!=" ) InstanceOfExpression()
488 { LValue left = pop();
489 push( LValue.booleanOperation(vm, tok, pop(), left) ); }
490 )*
491}
492
493void InstanceOfExpression() :
494{}
495{
496 RelationalExpression()
497 [ "instanceof" Type()
498 { throw new ParseException("operation not yet supported"); }
499 ]
500}
501
502void RelationalExpression() :
503{Token tok;}
504{
505 ShiftExpression()
506 ( ( tok = "<" | tok = ">" | tok = "<=" | tok = ">=" ) ShiftExpression()
507 { LValue left = pop();
508 push( LValue.booleanOperation(vm, tok, pop(), left) ); }
509 )*
510}
511
512void ShiftExpression() :
513{}
514{
515 AdditiveExpression()
516 ( ( "<<" | ">>" | ">>>" ) AdditiveExpression()
517 { throw new ParseException("operation not yet supported"); }
518 )*
519}
520
521void AdditiveExpression() :
522{Token tok;}
523{
524 MultiplicativeExpression()
525 ( ( tok = "+" | tok = "-" ) MultiplicativeExpression()
526 { LValue left = pop();
527 push( LValue.operation(vm, tok, pop(), left, frameGetter) ); }
528 )*
529}
530
531void MultiplicativeExpression() :
532{Token tok;}
533{
534 UnaryExpression()
535 ( ( tok = "*" | tok = "/" | tok = "%" ) UnaryExpression()
536 { LValue left = pop();
537 push( LValue.operation(vm, tok, pop(), left, frameGetter) ); }
538 )*
539}
540
541void UnaryExpression() :
542{}
543{
544 ( "+" | "-" ) UnaryExpression()
545 { throw new ParseException("operation not yet supported"); }
546|
547 PreIncrementExpression()
548|
549 PreDecrementExpression()
550|
551 UnaryExpressionNotPlusMinus()
552}
553
554void PreIncrementExpression() :
555{}
556{
557 "++" PrimaryExpression()
558 { throw new ParseException("operation not yet supported"); }
559}
560
561void PreDecrementExpression() :
562{}
563{
564 "--" PrimaryExpression()
565 { throw new ParseException("operation not yet supported"); }
566}
567
568void UnaryExpressionNotPlusMinus() :
569{}
570{
571 ( "~" | "!" ) UnaryExpression()
572 { throw new ParseException("operation not yet supported"); }
573|
574 LOOKAHEAD( CastLookahead() )
575 CastExpression()
576|
577 PostfixExpression()
578}
579
580// This production is to determine lookahead only. The LOOKAHEAD specifications
581// below are not used, but they are there just to indicate that we know about
582// this.
583void CastLookahead() :
584{}
585{
586 LOOKAHEAD(2)
587 "(" PrimitiveType()
588|
589 LOOKAHEAD("(" Name() "[")
590 "(" Name() "[" "]"
591|
592 "(" Name() ")" ( "~" | "!" | "(" | <IDENTIFIER> | "this" | "super" | "new" | Literal() )
593}
594
595void PostfixExpression() :
596{}
597{
598 PrimaryExpression()
599 [ "++" | "--"
600 { throw new ParseException("operation not yet supported"); }
601 ]
602}
603
604void CastExpression() :
605{}
606{
607 LOOKAHEAD(2)
608 "(" PrimitiveType() ( "[" "]" )* ")" UnaryExpression()
609|
610 "(" Name() ( "[" "]" )* ")" UnaryExpressionNotPlusMinus()
611}
612
613void PrimaryExpression() :
614{}
615{
616 PrimaryPrefix() ( PrimarySuffix() )*
617}
618
619void PrimaryPrefix() :
620{String name;}
621{
622 Literal()
623|
624 name = Name()
625 { push(LValue.makeName(vm, frameGetter, name)); }
626|
627 "this"
628 { push(LValue.makeThisObject(vm, frameGetter, token)); }
629|
630 "super" "." <IDENTIFIER>
631 { throw new ParseException("operation not yet supported"); }
632|
633 "(" Expression() ")"
634|
635 AllocationExpression()
636}
637
638void PrimarySuffix() :
639{List argList;}
640{
641 "[" Expression() "]"
642 { LValue index = pop();
643 push(pop().arrayElementLValue(index)); }
644|
645 "." <IDENTIFIER>
646 { push(pop().memberLValue(frameGetter, token.image)); }
647|
648 argList = Arguments()
649 { peek().invokeWith(argList); }
650}
651
652void Literal() :
653{}
654{
655 <INTEGER_LITERAL>
656 { push(LValue.makeInteger(vm, token)); }
657|
658 <FLOATING_POINT_LITERAL>
659 { push(LValue.makeFloat(vm, token)); }
660|
661 <CHARACTER_LITERAL>
662 { push(LValue.makeCharacter(vm, token)); }
663|
664 <STRING_LITERAL>
665 { push(LValue.makeString(vm, token)); }
666|
667 BooleanLiteral()
668 { push(LValue.makeBoolean(vm, token)); }
669|
670 NullLiteral()
671 { push(LValue.makeNull(vm, token)); }
672}
673
674void BooleanLiteral() :
675{}
676{
677 "true"
678|
679 "false"
680}
681
682void NullLiteral() :
683{}
684{
685 "null"
686}
687
688List Arguments() :
689{List argList = new ArrayList();}
690{
691 "(" [ ArgumentList(argList) ] ")"
692 { return argList; }
693}
694
695void ArgumentList(List argList) :
696{}
697{
698 Expression() {argList.add(pop().interiorGetValue());}
699 ( "," Expression() {argList.add(pop().interiorGetValue());} )*
700}
701
702void AllocationExpression() :
703{List argList; String className;}
704{
705 LOOKAHEAD(2)
706 "new" PrimitiveType() ArrayDimensions()
707|
708 "new" className = Name() ( argList = Arguments()
709 { push(LValue.makeNewObject(vm, frameGetter, className, argList)); }
710 | ArrayDimensions()
711 { throw new ParseException("operation not yet supported"); }
712 )
713}
714
715/*
716 * The second LOOKAHEAD specification below is to parse to PrimarySuffix
717 * if there is an expression between the "[...]".
718 */
719void ArrayDimensions() :
720{}
721{
722 ( LOOKAHEAD(2) "[" Expression() "]" )+ ( LOOKAHEAD(2) "[" "]" )*
723}
724
java/pkg/com/sun/tools/example/debug/expr/ExpressionParser.java+3933−0
@@ -0,0 +1,3933 @@
1/*
2 * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26/* Generated By:JavaCC: Do not edit this line. ExpressionParser.java */
27package com.sun.tools.example.debug.expr;
28
29import com.sun.jdi.*;
30
31import java.util.Stack;
32import java.util.List;
33import java.util.ArrayList;
34
35public class ExpressionParser implements ExpressionParserConstants {
36
37 Stack<LValue> stack = new Stack<LValue>();
38 VirtualMachine vm = null;
39 GetFrame frameGetter = null;
40 private static GetFrame lastFrameGetter;
41 private static LValue lastLValue;
42
43 LValue peek() {
44 return stack.peek();
45 }
46
47 LValue pop() {
48 return stack.pop();
49 }
50
51 void push(LValue lval) {
52 stack.push(lval);
53 }
54
55 public static Value getMassagedValue() throws ParseException {
56 return lastLValue.getMassagedValue(lastFrameGetter);
57 }
58
59 public interface GetFrame {
60 StackFrame get() throws IncompatibleThreadStateException;
61 }
62
63 public static Value evaluate(String expr, VirtualMachine vm,
64 GetFrame frameGetter) throws ParseException, InvocationException,
65 InvalidTypeException, ClassNotLoadedException,
66 IncompatibleThreadStateException {
67 // TODO StringBufferInputStream is deprecated.
68 java.io.InputStream in = new java.io.StringBufferInputStream(expr);
69 ExpressionParser parser = new ExpressionParser(in);
70 parser.vm = vm;
71 parser.frameGetter = frameGetter;
72 parser.Expression();
73 lastFrameGetter = frameGetter;
74 lastLValue = parser.pop();
75 return lastLValue.getValue();
76 }
77
78 public static void main(String args[]) {
79 ExpressionParser parser;
80 System.out.print("Java Expression Parser: ");
81 if (args.length == 0) {
82 System.out.println("Reading from standard input . . .");
83 parser = new ExpressionParser(System.in);
84 } else if (args.length == 1) {
85 System.out.println("Reading from file " + args[0] + " . . .");
86 try {
87 parser = new ExpressionParser(new java.io.FileInputStream(args[0]));
88 } catch (java.io.FileNotFoundException e) {
89 System.out.println("Java Parser Version 1.0.2: File " + args[0]
90 + " not found.");
91 return;
92 }
93 } else {
94 System.out.println("Usage is one of:");
95 System.out.println(" java ExpressionParser < inputfile");
96 System.out.println("OR");
97 System.out.println(" java ExpressionParser inputfile");
98 return;
99 }
100 try {
101 parser.Expression();
102 System.out.print("Java Expression Parser: ");
103 System.out.println("Java program parsed successfully.");
104 } catch (ParseException e) {
105 System.out.print("Java Expression Parser: ");
106 System.out.println("Encountered errors during parse.");
107 }
108 }
109
110/*****************************************
111 * THE JAVA LANGUAGE GRAMMAR STARTS HERE *
112 *****************************************/
113
114/*
115 * Type, name and expression syntax follows.
116 */
117 final public void Type() throws ParseException {
118 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
119 case BOOLEAN:
120 case BYTE:
121 case CHAR:
122 case DOUBLE:
123 case FLOAT:
124 case INT:
125 case LONG:
126 case SHORT:
127 PrimitiveType();
128 break;
129 case IDENTIFIER:
130 Name();
131 break;
132 default:
133 jj_la1[0] = jj_gen;
134 jj_consume_token(-1);
135 throw new ParseException();
136 }
137 label_1: while (true) {
138 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
139 case LBRACKET:
140 ;
141 break;
142 default:
143 jj_la1[1] = jj_gen;
144 break label_1;
145 }
146 jj_consume_token(LBRACKET);
147 jj_consume_token(RBRACKET);
148 }
149 }
150
151 final public void PrimitiveType() throws ParseException {
152 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
153 case BOOLEAN:
154 jj_consume_token(BOOLEAN);
155 break;
156 case CHAR:
157 jj_consume_token(CHAR);
158 break;
159 case BYTE:
160 jj_consume_token(BYTE);
161 break;
162 case SHORT:
163 jj_consume_token(SHORT);
164 break;
165 case INT:
166 jj_consume_token(INT);
167 break;
168 case LONG:
169 jj_consume_token(LONG);
170 break;
171 case FLOAT:
172 jj_consume_token(FLOAT);
173 break;
174 case DOUBLE:
175 jj_consume_token(DOUBLE);
176 break;
177 default:
178 jj_la1[2] = jj_gen;
179 jj_consume_token(-1);
180 throw new ParseException();
181 }
182 }
183
184 final public String Name() throws ParseException {
185 StringBuffer sb = new StringBuffer();
186 jj_consume_token(IDENTIFIER);
187 sb.append(token);
188 label_2: while (true) {
189 if (jj_2_1(2)) {
190 ;
191 } else {
192 break label_2;
193 }
194 jj_consume_token(DOT);
195 jj_consume_token(IDENTIFIER);
196 sb.append('.');
197 sb.append(token);
198 }
199 if (true) {
200 return sb.toString();
201 }
202 throw new Error("Missing return statement in function");
203 }
204
205 final public void NameList() throws ParseException {
206 Name();
207 label_3: while (true) {
208 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
209 case COMMA:
210 ;
211 break;
212 default:
213 jj_la1[3] = jj_gen;
214 break label_3;
215 }
216 jj_consume_token(COMMA);
217 Name();
218 }
219 }
220
221/*
222 * Expression syntax follows.
223 */
224 final public void Expression() throws ParseException {
225 if (jj_2_2(2147483647)) {
226 Assignment();
227 } else {
228 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
229 case FALSE:
230 case NEW:
231 case NULL:
232 case SUPER:
233 case THIS:
234 case TRUE:
235 case INTEGER_LITERAL:
236 case FLOATING_POINT_LITERAL:
237 case CHARACTER_LITERAL:
238 case STRING_LITERAL:
239 case IDENTIFIER:
240 case LPAREN:
241 case BANG:
242 case TILDE:
243 case INCR:
244 case DECR:
245 case PLUS:
246 case MINUS:
247 ConditionalExpression();
248 break;
249 default:
250 jj_la1[4] = jj_gen;
251 jj_consume_token(-1);
252 throw new ParseException();
253 }
254 }
255 }
256
257 final public void Assignment() throws ParseException {
258 PrimaryExpression();
259 AssignmentOperator();
260 Expression();
261 LValue exprVal = pop();
262 pop().setValue(exprVal);
263 push(exprVal);
264 }
265
266 final public void AssignmentOperator() throws ParseException {
267 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
268 case ASSIGN:
269 jj_consume_token(ASSIGN);
270 break;
271 case STARASSIGN:
272 jj_consume_token(STARASSIGN);
273 break;
274 case SLASHASSIGN:
275 jj_consume_token(SLASHASSIGN);
276 break;
277 case REMASSIGN:
278 jj_consume_token(REMASSIGN);
279 break;
280 case PLUSASSIGN:
281 jj_consume_token(PLUSASSIGN);
282 break;
283 case MINUSASSIGN:
284 jj_consume_token(MINUSASSIGN);
285 break;
286 case LSHIFTASSIGN:
287 jj_consume_token(LSHIFTASSIGN);
288 break;
289 case RSIGNEDSHIFTASSIGN:
290 jj_consume_token(RSIGNEDSHIFTASSIGN);
291 break;
292 case RUNSIGNEDSHIFTASSIGN:
293 jj_consume_token(RUNSIGNEDSHIFTASSIGN);
294 break;
295 case ANDASSIGN:
296 jj_consume_token(ANDASSIGN);
297 break;
298 case XORASSIGN:
299 jj_consume_token(XORASSIGN);
300 break;
301 case ORASSIGN:
302 jj_consume_token(ORASSIGN);
303 break;
304 default:
305 jj_la1[5] = jj_gen;
306 jj_consume_token(-1);
307 throw new ParseException();
308 }
309 }
310
311 final public void ConditionalExpression() throws ParseException {
312 ConditionalOrExpression();
313 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
314 case HOOK:
315 jj_consume_token(HOOK);
316 Expression();
317 jj_consume_token(COLON);
318 ConditionalExpression();
319 LValue falseBranch = pop();
320 LValue trueBranch = pop();
321 Value cond = pop().interiorGetValue();
322 if (cond instanceof BooleanValue) {
323 push(((BooleanValue) cond).booleanValue() ? trueBranch
324 : falseBranch);
325 } else {
326 {
327 if (true) {
328 throw new ParseException("Condition must be boolean");
329 }
330 }
331 }
332 break;
333 default:
334 jj_la1[6] = jj_gen;
335 ;
336 }
337 }
338
339 final public void ConditionalOrExpression() throws ParseException {
340 ConditionalAndExpression();
341 label_4: while (true) {
342 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
343 case SC_OR:
344 ;
345 break;
346 default:
347 jj_la1[7] = jj_gen;
348 break label_4;
349 }
350 jj_consume_token(SC_OR);
351 ConditionalAndExpression();
352 {
353 if (true) {
354 throw new ParseException("operation not yet supported");
355 }
356 }
357 }
358 }
359
360 final public void ConditionalAndExpression() throws ParseException {
361 InclusiveOrExpression();
362 label_5: while (true) {
363 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
364 case SC_AND:
365 ;
366 break;
367 default:
368 jj_la1[8] = jj_gen;
369 break label_5;
370 }
371 jj_consume_token(SC_AND);
372 InclusiveOrExpression();
373 {
374 if (true) {
375 throw new ParseException("operation not yet supported");
376 }
377 }
378 }
379 }
380
381 final public void InclusiveOrExpression() throws ParseException {
382 ExclusiveOrExpression();
383 label_6: while (true) {
384 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
385 case BIT_OR:
386 ;
387 break;
388 default:
389 jj_la1[9] = jj_gen;
390 break label_6;
391 }
392 jj_consume_token(BIT_OR);
393 ExclusiveOrExpression();
394 {
395 if (true) {
396 throw new ParseException("operation not yet supported");
397 }
398 }
399 }
400 }
401
402 final public void ExclusiveOrExpression() throws ParseException {
403 AndExpression();
404 label_7: while (true) {
405 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
406 case XOR:
407 ;
408 break;
409 default:
410 jj_la1[10] = jj_gen;
411 break label_7;
412 }
413 jj_consume_token(XOR);
414 AndExpression();
415 {
416 if (true) {
417 throw new ParseException("operation not yet supported");
418 }
419 }
420 }
421 }
422
423 final public void AndExpression() throws ParseException {
424 EqualityExpression();
425 label_8: while (true) {
426 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
427 case BIT_AND:
428 ;
429 break;
430 default:
431 jj_la1[11] = jj_gen;
432 break label_8;
433 }
434 jj_consume_token(BIT_AND);
435 EqualityExpression();
436 {
437 if (true) {
438 throw new ParseException("operation not yet supported");
439 }
440 }
441 }
442 }
443
444 final public void EqualityExpression() throws ParseException {
445 Token tok;
446 InstanceOfExpression();
447 label_9: while (true) {
448 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
449 case EQ:
450 case NE:
451 ;
452 break;
453 default:
454 jj_la1[12] = jj_gen;
455 break label_9;
456 }
457 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
458 case EQ:
459 tok = jj_consume_token(EQ);
460 break;
461 case NE:
462 tok = jj_consume_token(NE);
463 break;
464 default:
465 jj_la1[13] = jj_gen;
466 jj_consume_token(-1);
467 throw new ParseException();
468 }
469 InstanceOfExpression();
470 LValue left = pop();
471 push( LValue.booleanOperation(vm, tok, pop(), left) );
472 }
473 }
474
475 final public void InstanceOfExpression() throws ParseException {
476 RelationalExpression();
477 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
478 case INSTANCEOF:
479 jj_consume_token(INSTANCEOF);
480 Type();
481 {
482 if (true) {
483 throw new ParseException("operation not yet supported");
484 }
485 }
486 break;
487 default:
488 jj_la1[14] = jj_gen;
489 ;
490 }
491 }
492
493 final public void RelationalExpression() throws ParseException {
494 Token tok;
495 ShiftExpression();
496 label_10: while (true) {
497 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
498 case GT:
499 case LT:
500 case LE:
501 case GE:
502 ;
503 break;
504 default:
505 jj_la1[15] = jj_gen;
506 break label_10;
507 }
508 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
509 case LT:
510 tok = jj_consume_token(LT);
511 break;
512 case GT:
513 tok = jj_consume_token(GT);
514 break;
515 case LE:
516 tok = jj_consume_token(LE);
517 break;
518 case GE:
519 tok = jj_consume_token(GE);
520 break;
521 default:
522 jj_la1[16] = jj_gen;
523 jj_consume_token(-1);
524 throw new ParseException();
525 }
526 ShiftExpression();
527 LValue left = pop();
528 push( LValue.booleanOperation(vm, tok, pop(), left) );
529 }
530 }
531
532 final public void ShiftExpression() throws ParseException {
533 AdditiveExpression();
534 label_11: while (true) {
535 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
536 case LSHIFT:
537 case RSIGNEDSHIFT:
538 case RUNSIGNEDSHIFT:
539 ;
540 break;
541 default:
542 jj_la1[17] = jj_gen;
543 break label_11;
544 }
545 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
546 case LSHIFT:
547 jj_consume_token(LSHIFT);
548 break;
549 case RSIGNEDSHIFT:
550 jj_consume_token(RSIGNEDSHIFT);
551 break;
552 case RUNSIGNEDSHIFT:
553 jj_consume_token(RUNSIGNEDSHIFT);
554 break;
555 default:
556 jj_la1[18] = jj_gen;
557 jj_consume_token(-1);
558 throw new ParseException();
559 }
560 AdditiveExpression();
561 {
562 if (true) {
563 throw new ParseException("operation not yet supported");
564 }
565 }
566 }
567 }
568
569 final public void AdditiveExpression() throws ParseException {
570 Token tok;
571 MultiplicativeExpression();
572 label_12: while (true) {
573 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
574 case PLUS:
575 case MINUS:
576 ;
577 break;
578 default:
579 jj_la1[19] = jj_gen;
580 break label_12;
581 }
582 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
583 case PLUS:
584 tok = jj_consume_token(PLUS);
585 break;
586 case MINUS:
587 tok = jj_consume_token(MINUS);
588 break;
589 default:
590 jj_la1[20] = jj_gen;
591 jj_consume_token(-1);
592 throw new ParseException();
593 }
594 MultiplicativeExpression();
595 LValue left = pop();
596 push( LValue.operation(vm, tok, pop(), left, frameGetter) );
597 }
598 }
599
600 final public void MultiplicativeExpression() throws ParseException {
601 Token tok;
602 UnaryExpression();
603 label_13: while (true) {
604 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
605 case STAR:
606 case SLASH:
607 case REM:
608 ;
609 break;
610 default:
611 jj_la1[21] = jj_gen;
612 break label_13;
613 }
614 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
615 case STAR:
616 tok = jj_consume_token(STAR);
617 break;
618 case SLASH:
619 tok = jj_consume_token(SLASH);
620 break;
621 case REM:
622 tok = jj_consume_token(REM);
623 break;
624 default:
625 jj_la1[22] = jj_gen;
626 jj_consume_token(-1);
627 throw new ParseException();
628 }
629 UnaryExpression();
630 LValue left = pop();
631 push( LValue.operation(vm, tok, pop(), left, frameGetter) );
632 }
633 }
634
635 final public void UnaryExpression() throws ParseException {
636 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
637 case PLUS:
638 case MINUS:
639 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
640 case PLUS:
641 jj_consume_token(PLUS);
642 break;
643 case MINUS:
644 jj_consume_token(MINUS);
645 break;
646 default:
647 jj_la1[23] = jj_gen;
648 jj_consume_token(-1);
649 throw new ParseException();
650 }
651 UnaryExpression();
652 {
653 if (true) {
654 throw new ParseException("operation not yet supported");
655 }
656 }
657 break;
658 case INCR:
659 PreIncrementExpression();
660 break;
661 case DECR:
662 PreDecrementExpression();
663 break;
664 case FALSE:
665 case NEW:
666 case NULL:
667 case SUPER:
668 case THIS:
669 case TRUE:
670 case INTEGER_LITERAL:
671 case FLOATING_POINT_LITERAL:
672 case CHARACTER_LITERAL:
673 case STRING_LITERAL:
674 case IDENTIFIER:
675 case LPAREN:
676 case BANG:
677 case TILDE:
678 UnaryExpressionNotPlusMinus();
679 break;
680 default:
681 jj_la1[24] = jj_gen;
682 jj_consume_token(-1);
683 throw new ParseException();
684 }
685 }
686
687 final public void PreIncrementExpression() throws ParseException {
688 jj_consume_token(INCR);
689 PrimaryExpression();
690 {
691 if (true) {
692 throw new ParseException("operation not yet supported");
693 }
694 }
695 }
696
697 final public void PreDecrementExpression() throws ParseException {
698 jj_consume_token(DECR);
699 PrimaryExpression();
700 {
701 if (true) {
702 throw new ParseException("operation not yet supported");
703 }
704 }
705 }
706
707 final public void UnaryExpressionNotPlusMinus() throws ParseException {
708 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
709 case BANG:
710 case TILDE:
711 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
712 case TILDE:
713 jj_consume_token(TILDE);
714 break;
715 case BANG:
716 jj_consume_token(BANG);
717 break;
718 default:
719 jj_la1[25] = jj_gen;
720 jj_consume_token(-1);
721 throw new ParseException();
722 }
723 UnaryExpression();
724 {
725 if (true) {
726 throw new ParseException("operation not yet supported");
727 }
728 }
729 break;
730 default:
731 jj_la1[26] = jj_gen;
732 if (jj_2_3(2147483647)) {
733 CastExpression();
734 } else {
735 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
736 case FALSE:
737 case NEW:
738 case NULL:
739 case SUPER:
740 case THIS:
741 case TRUE:
742 case INTEGER_LITERAL:
743 case FLOATING_POINT_LITERAL:
744 case CHARACTER_LITERAL:
745 case STRING_LITERAL:
746 case IDENTIFIER:
747 case LPAREN:
748 PostfixExpression();
749 break;
750 default:
751 jj_la1[27] = jj_gen;
752 jj_consume_token(-1);
753 throw new ParseException();
754 }
755 }
756 }
757 }
758
759 // This production is to determine lookahead only. The LOOKAHEAD
760 // specifications
761 // below are not used, but they are there just to indicate that we know
762 // about
763// this.
764 final public void CastLookahead() throws ParseException {
765 if (jj_2_4(2)) {
766 jj_consume_token(LPAREN);
767 PrimitiveType();
768 } else if (jj_2_5(2147483647)) {
769 jj_consume_token(LPAREN);
770 Name();
771 jj_consume_token(LBRACKET);
772 jj_consume_token(RBRACKET);
773 } else {
774 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
775 case LPAREN:
776 jj_consume_token(LPAREN);
777 Name();
778 jj_consume_token(RPAREN);
779 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
780 case TILDE:
781 jj_consume_token(TILDE);
782 break;
783 case BANG:
784 jj_consume_token(BANG);
785 break;
786 case LPAREN:
787 jj_consume_token(LPAREN);
788 break;
789 case IDENTIFIER:
790 jj_consume_token(IDENTIFIER);
791 break;
792 case THIS:
793 jj_consume_token(THIS);
794 break;
795 case SUPER:
796 jj_consume_token(SUPER);
797 break;
798 case NEW:
799 jj_consume_token(NEW);
800 break;
801 case FALSE:
802 case NULL:
803 case TRUE:
804 case INTEGER_LITERAL:
805 case FLOATING_POINT_LITERAL:
806 case CHARACTER_LITERAL:
807 case STRING_LITERAL:
808 Literal();
809 break;
810 default:
811 jj_la1[28] = jj_gen;
812 jj_consume_token(-1);
813 throw new ParseException();
814 }
815 break;
816 default:
817 jj_la1[29] = jj_gen;
818 jj_consume_token(-1);
819 throw new ParseException();
820 }
821 }
822 }
823
824 final public void PostfixExpression() throws ParseException {
825 PrimaryExpression();
826 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
827 case INCR:
828 case DECR:
829 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
830 case INCR:
831 jj_consume_token(INCR);
832 break;
833 case DECR:
834 jj_consume_token(DECR);
835 {
836 if (true) {
837 throw new ParseException("operation not yet supported");
838 }
839 }
840 break;
841 default:
842 jj_la1[30] = jj_gen;
843 jj_consume_token(-1);
844 throw new ParseException();
845 }
846 break;
847 default:
848 jj_la1[31] = jj_gen;
849 ;
850 }
851 }
852
853 final public void CastExpression() throws ParseException {
854 if (jj_2_6(2)) {
855 jj_consume_token(LPAREN);
856 PrimitiveType();
857 label_14: while (true) {
858 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
859 case LBRACKET:
860 ;
861 break;
862 default:
863 jj_la1[32] = jj_gen;
864 break label_14;
865 }
866 jj_consume_token(LBRACKET);
867 jj_consume_token(RBRACKET);
868 }
869 jj_consume_token(RPAREN);
870 UnaryExpression();
871 } else {
872 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
873 case LPAREN:
874 jj_consume_token(LPAREN);
875 Name();
876 label_15: while (true) {
877 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
878 case LBRACKET:
879 ;
880 break;
881 default:
882 jj_la1[33] = jj_gen;
883 break label_15;
884 }
885 jj_consume_token(LBRACKET);
886 jj_consume_token(RBRACKET);
887 }
888 jj_consume_token(RPAREN);
889 UnaryExpressionNotPlusMinus();
890 break;
891 default:
892 jj_la1[34] = jj_gen;
893 jj_consume_token(-1);
894 throw new ParseException();
895 }
896 }
897 }
898
899 final public void PrimaryExpression() throws ParseException {
900 PrimaryPrefix();
901 label_16: while (true) {
902 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
903 case LPAREN:
904 case LBRACKET:
905 case DOT:
906 ;
907 break;
908 default:
909 jj_la1[35] = jj_gen;
910 break label_16;
911 }
912 PrimarySuffix();
913 }
914 }
915
916 final public void PrimaryPrefix() throws ParseException {
917 String name;
918 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
919 case FALSE:
920 case NULL:
921 case TRUE:
922 case INTEGER_LITERAL:
923 case FLOATING_POINT_LITERAL:
924 case CHARACTER_LITERAL:
925 case STRING_LITERAL:
926 Literal();
927 break;
928 case IDENTIFIER:
929 name = Name();
930 push(LValue.makeName(vm, frameGetter, name));
931 break;
932 case THIS:
933 jj_consume_token(THIS);
934 push(LValue.makeThisObject(vm, frameGetter, token));
935 break;
936 case SUPER:
937 jj_consume_token(SUPER);
938 jj_consume_token(DOT);
939 jj_consume_token(IDENTIFIER);
940 {
941 if (true) {
942 throw new ParseException("operation not yet supported");
943 }
944 }
945 break;
946 case LPAREN:
947 jj_consume_token(LPAREN);
948 Expression();
949 jj_consume_token(RPAREN);
950 break;
951 case NEW:
952 AllocationExpression();
953 break;
954 default:
955 jj_la1[36] = jj_gen;
956 jj_consume_token(-1);
957 throw new ParseException();
958 }
959 }
960
961 final public void PrimarySuffix() throws ParseException {
962 List<Value> argList;
963 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
964 case LBRACKET:
965 jj_consume_token(LBRACKET);
966 Expression();
967 jj_consume_token(RBRACKET);
968 LValue index = pop();
969 push(pop().arrayElementLValue(index));
970 break;
971 case DOT:
972 jj_consume_token(DOT);
973 jj_consume_token(IDENTIFIER);
974 push(pop().memberLValue(frameGetter, token.image));
975 break;
976 case LPAREN:
977 argList = Arguments();
978 peek().invokeWith(argList);
979 break;
980 default:
981 jj_la1[37] = jj_gen;
982 jj_consume_token(-1);
983 throw new ParseException();
984 }
985 }
986
987 final public void Literal() throws ParseException {
988 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
989 case INTEGER_LITERAL:
990 jj_consume_token(INTEGER_LITERAL);
991 push(LValue.makeInteger(vm, token));
992 break;
993 case FLOATING_POINT_LITERAL:
994 jj_consume_token(FLOATING_POINT_LITERAL);
995 push(LValue.makeFloat(vm, token));
996 break;
997 case CHARACTER_LITERAL:
998 jj_consume_token(CHARACTER_LITERAL);
999 push(LValue.makeCharacter(vm, token));
1000 break;
1001 case STRING_LITERAL:
1002 jj_consume_token(STRING_LITERAL);
1003 push(LValue.makeString(vm, token));
1004 break;
1005 case FALSE:
1006 case TRUE:
1007 BooleanLiteral();
1008 push(LValue.makeBoolean(vm, token));
1009 break;
1010 case NULL:
1011 NullLiteral();
1012 push(LValue.makeNull(vm, token));
1013 break;
1014 default:
1015 jj_la1[38] = jj_gen;
1016 jj_consume_token(-1);
1017 throw new ParseException();
1018 }
1019 }
1020
1021 final public void BooleanLiteral() throws ParseException {
1022 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1023 case TRUE:
1024 jj_consume_token(TRUE);
1025 break;
1026 case FALSE:
1027 jj_consume_token(FALSE);
1028 break;
1029 default:
1030 jj_la1[39] = jj_gen;
1031 jj_consume_token(-1);
1032 throw new ParseException();
1033 }
1034 }
1035
1036 final public void NullLiteral() throws ParseException {
1037 jj_consume_token(NULL);
1038 }
1039
1040 final public List<Value> Arguments() throws ParseException {
1041 List<Value> argList = new ArrayList<Value>();
1042 jj_consume_token(LPAREN);
1043 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1044 case FALSE:
1045 case NEW:
1046 case NULL:
1047 case SUPER:
1048 case THIS:
1049 case TRUE:
1050 case INTEGER_LITERAL:
1051 case FLOATING_POINT_LITERAL:
1052 case CHARACTER_LITERAL:
1053 case STRING_LITERAL:
1054 case IDENTIFIER:
1055 case LPAREN:
1056 case BANG:
1057 case TILDE:
1058 case INCR:
1059 case DECR:
1060 case PLUS:
1061 case MINUS:
1062 ArgumentList(argList);
1063 break;
1064 default:
1065 jj_la1[40] = jj_gen;
1066 ;
1067 }
1068 jj_consume_token(RPAREN);
1069 {
1070 if (true) {
1071 return argList;
1072 }
1073 }
1074 throw new Error("Missing return statement in function");
1075 }
1076
1077 final public void ArgumentList(List<Value> argList) throws ParseException {
1078 Expression();
1079 argList.add(pop().interiorGetValue());
1080 label_17: while (true) {
1081 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1082 case COMMA:
1083 ;
1084 break;
1085 default:
1086 jj_la1[41] = jj_gen;
1087 break label_17;
1088 }
1089 jj_consume_token(COMMA);
1090 Expression();
1091 argList.add(pop().interiorGetValue());
1092 }
1093 }
1094
1095 final public void AllocationExpression() throws ParseException {
1096 List<Value> argList;
1097 String className;
1098 if (jj_2_7(2)) {
1099 jj_consume_token(NEW);
1100 PrimitiveType();
1101 ArrayDimensions();
1102 } else {
1103 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1104 case NEW:
1105 jj_consume_token(NEW);
1106 className = Name();
1107 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1108 case LPAREN:
1109 argList = Arguments();
1110 push(LValue.makeNewObject(vm, frameGetter, className, argList));
1111 break;
1112 case LBRACKET:
1113 ArrayDimensions();
1114 {
1115 if (true) {
1116 throw new ParseException("operation not yet supported");
1117 }
1118 }
1119 break;
1120 default:
1121 jj_la1[42] = jj_gen;
1122 jj_consume_token(-1);
1123 throw new ParseException();
1124 }
1125 break;
1126 default:
1127 jj_la1[43] = jj_gen;
1128 jj_consume_token(-1);
1129 throw new ParseException();
1130 }
1131 }
1132 }
1133
1134/*
1135 * The second LOOKAHEAD specification below is to parse to PrimarySuffix if
1136 * there is an expression between the "[...]".
1137 */
1138 final public void ArrayDimensions() throws ParseException {
1139 label_18: while (true) {
1140 jj_consume_token(LBRACKET);
1141 Expression();
1142 jj_consume_token(RBRACKET);
1143 if (jj_2_8(2)) {
1144 ;
1145 } else {
1146 break label_18;
1147 }
1148 }
1149 label_19: while (true) {
1150 if (jj_2_9(2)) {
1151 ;
1152 } else {
1153 break label_19;
1154 }
1155 jj_consume_token(LBRACKET);
1156 jj_consume_token(RBRACKET);
1157 }
1158 }
1159
1160 final private boolean jj_2_1(int xla) {
1161 jj_la = xla;
1162 jj_lastpos = jj_scanpos = token;
1163 boolean retval = !jj_3_1();
1164 jj_save(0, xla);
1165 return retval;
1166 }
1167
1168 final private boolean jj_2_2(int xla) {
1169 jj_la = xla;
1170 jj_lastpos = jj_scanpos = token;
1171 boolean retval = !jj_3_2();
1172 jj_save(1, xla);
1173 return retval;
1174 }
1175
1176 final private boolean jj_2_3(int xla) {
1177 jj_la = xla;
1178 jj_lastpos = jj_scanpos = token;
1179 boolean retval = !jj_3_3();
1180 jj_save(2, xla);
1181 return retval;
1182 }
1183
1184 final private boolean jj_2_4(int xla) {
1185 jj_la = xla;
1186 jj_lastpos = jj_scanpos = token;
1187 boolean retval = !jj_3_4();
1188 jj_save(3, xla);
1189 return retval;
1190 }
1191
1192 final private boolean jj_2_5(int xla) {
1193 jj_la = xla;
1194 jj_lastpos = jj_scanpos = token;
1195 boolean retval = !jj_3_5();
1196 jj_save(4, xla);
1197 return retval;
1198 }
1199
1200 final private boolean jj_2_6(int xla) {
1201 jj_la = xla;
1202 jj_lastpos = jj_scanpos = token;
1203 boolean retval = !jj_3_6();
1204 jj_save(5, xla);
1205 return retval;
1206 }
1207
1208 final private boolean jj_2_7(int xla) {
1209 jj_la = xla;
1210 jj_lastpos = jj_scanpos = token;
1211 boolean retval = !jj_3_7();
1212 jj_save(6, xla);
1213 return retval;
1214 }
1215
1216 final private boolean jj_2_8(int xla) {
1217 jj_la = xla;
1218 jj_lastpos = jj_scanpos = token;
1219 boolean retval = !jj_3_8();
1220 jj_save(7, xla);
1221 return retval;
1222 }
1223
1224 final private boolean jj_2_9(int xla) {
1225 jj_la = xla;
1226 jj_lastpos = jj_scanpos = token;
1227 boolean retval = !jj_3_9();
1228 jj_save(8, xla);
1229 return retval;
1230 }
1231
1232 final private boolean jj_3R_154() {
1233 if (jj_scan_token(INCR)) {
1234 return true;
1235 }
1236 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1237 return false;
1238 }
1239 return false;
1240 }
1241
1242 final private boolean jj_3R_151() {
1243 Token xsp;
1244 xsp = jj_scanpos;
1245 if (jj_3R_154()) {
1246 jj_scanpos = xsp;
1247 if (jj_3R_155()) {
1248 return true;
1249 }
1250 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1251 return false;
1252 }
1253 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1254 return false;
1255 }
1256 return false;
1257 }
1258
1259 final private boolean jj_3R_148() {
1260 Token xsp;
1261 xsp = jj_scanpos;
1262 if (jj_3_6()) {
1263 jj_scanpos = xsp;
1264 if (jj_3R_150()) {
1265 return true;
1266 }
1267 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1268 return false;
1269 }
1270 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1271 return false;
1272 }
1273 return false;
1274 }
1275
1276 final private boolean jj_3_6() {
1277 if (jj_scan_token(LPAREN)) {
1278 return true;
1279 }
1280 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1281 return false;
1282 }
1283 if (jj_3R_23()) {
1284 return true;
1285 }
1286 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1287 return false;
1288 }
1289 Token xsp;
1290 while (true) {
1291 xsp = jj_scanpos;
1292 if (jj_3R_152()) {
1293 jj_scanpos = xsp;
1294 break;
1295 }
1296 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1297 return false;
1298 }
1299 }
1300 if (jj_scan_token(RPAREN)) {
1301 return true;
1302 }
1303 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1304 return false;
1305 }
1306 if (jj_3R_115()) {
1307 return true;
1308 }
1309 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1310 return false;
1311 }
1312 return false;
1313 }
1314
1315 final private boolean jj_3R_25() {
1316 Token xsp;
1317 xsp = jj_scanpos;
1318 if (jj_3R_50()) {
1319 jj_scanpos = xsp;
1320 if (jj_3R_51()) {
1321 return true;
1322 }
1323 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1324 return false;
1325 }
1326 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1327 return false;
1328 }
1329 return false;
1330 }
1331
1332 final private boolean jj_3R_50() {
1333 if (jj_3R_67()) {
1334 return true;
1335 }
1336 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1337 return false;
1338 }
1339 return false;
1340 }
1341
1342 final private boolean jj_3_5() {
1343 if (jj_scan_token(LPAREN)) {
1344 return true;
1345 }
1346 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1347 return false;
1348 }
1349 if (jj_3R_24()) {
1350 return true;
1351 }
1352 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1353 return false;
1354 }
1355 if (jj_scan_token(LBRACKET)) {
1356 return true;
1357 }
1358 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1359 return false;
1360 }
1361 return false;
1362 }
1363
1364 final private boolean jj_3R_149() {
1365 if (jj_3R_20()) {
1366 return true;
1367 }
1368 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1369 return false;
1370 }
1371 Token xsp;
1372 xsp = jj_scanpos;
1373 if (jj_3R_151()) {
1374 jj_scanpos = xsp;
1375 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1376 return false;
1377 }
1378 return false;
1379 }
1380
1381 final private boolean jj_3R_41() {
1382 if (jj_scan_token(LPAREN)) {
1383 return true;
1384 }
1385 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1386 return false;
1387 }
1388 if (jj_3R_24()) {
1389 return true;
1390 }
1391 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1392 return false;
1393 }
1394 if (jj_scan_token(RPAREN)) {
1395 return true;
1396 }
1397 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1398 return false;
1399 }
1400 Token xsp;
1401 xsp = jj_scanpos;
1402 if (jj_3R_59()) {
1403 jj_scanpos = xsp;
1404 if (jj_3R_60()) {
1405 jj_scanpos = xsp;
1406 if (jj_3R_61()) {
1407 jj_scanpos = xsp;
1408 if (jj_3R_62()) {
1409 jj_scanpos = xsp;
1410 if (jj_3R_63()) {
1411 jj_scanpos = xsp;
1412 if (jj_3R_64()) {
1413 jj_scanpos = xsp;
1414 if (jj_3R_65()) {
1415 jj_scanpos = xsp;
1416 if (jj_3R_66()) {
1417 return true;
1418 }
1419 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1420 return false;
1421 }
1422 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1423 return false;
1424 }
1425 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1426 return false;
1427 }
1428 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1429 return false;
1430 }
1431 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1432 return false;
1433 }
1434 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1435 return false;
1436 }
1437 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1438 return false;
1439 }
1440 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1441 return false;
1442 }
1443 return false;
1444 }
1445
1446 final private boolean jj_3R_40() {
1447 if (jj_scan_token(LPAREN)) {
1448 return true;
1449 }
1450 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1451 return false;
1452 }
1453 if (jj_3R_24()) {
1454 return true;
1455 }
1456 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1457 return false;
1458 }
1459 if (jj_scan_token(LBRACKET)) {
1460 return true;
1461 }
1462 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1463 return false;
1464 }
1465 if (jj_scan_token(RBRACKET)) {
1466 return true;
1467 }
1468 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1469 return false;
1470 }
1471 return false;
1472 }
1473
1474 final private boolean jj_3R_123() {
1475 if (jj_scan_token(LBRACKET)) {
1476 return true;
1477 }
1478 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1479 return false;
1480 }
1481 if (jj_scan_token(RBRACKET)) {
1482 return true;
1483 }
1484 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1485 return false;
1486 }
1487 return false;
1488 }
1489
1490 final private boolean jj_3_1() {
1491 if (jj_scan_token(DOT)) {
1492 return true;
1493 }
1494 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1495 return false;
1496 }
1497 if (jj_scan_token(IDENTIFIER)) {
1498 return true;
1499 }
1500 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1501 return false;
1502 }
1503 return false;
1504 }
1505
1506 final private boolean jj_3_4() {
1507 if (jj_scan_token(LPAREN)) {
1508 return true;
1509 }
1510 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1511 return false;
1512 }
1513 if (jj_3R_23()) {
1514 return true;
1515 }
1516 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1517 return false;
1518 }
1519 return false;
1520 }
1521
1522 final private boolean jj_3R_22() {
1523 Token xsp;
1524 xsp = jj_scanpos;
1525 if (jj_3_4()) {
1526 jj_scanpos = xsp;
1527 if (jj_3R_40()) {
1528 jj_scanpos = xsp;
1529 if (jj_3R_41()) {
1530 return true;
1531 }
1532 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1533 return false;
1534 }
1535 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1536 return false;
1537 }
1538 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1539 return false;
1540 }
1541 return false;
1542 }
1543
1544 final private boolean jj_3_3() {
1545 if (jj_3R_22()) {
1546 return true;
1547 }
1548 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1549 return false;
1550 }
1551 return false;
1552 }
1553
1554 final private boolean jj_3R_24() {
1555 if (jj_scan_token(IDENTIFIER)) {
1556 return true;
1557 }
1558 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1559 return false;
1560 }
1561 Token xsp;
1562 while (true) {
1563 xsp = jj_scanpos;
1564 if (jj_3_1()) {
1565 jj_scanpos = xsp;
1566 break;
1567 }
1568 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1569 return false;
1570 }
1571 }
1572 return false;
1573 }
1574
1575 final private boolean jj_3R_147() {
1576 if (jj_scan_token(BANG)) {
1577 return true;
1578 }
1579 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1580 return false;
1581 }
1582 return false;
1583 }
1584
1585 final private boolean jj_3R_142() {
1586 if (jj_3R_149()) {
1587 return true;
1588 }
1589 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1590 return false;
1591 }
1592 return false;
1593 }
1594
1595 final private boolean jj_3R_122() {
1596 if (jj_3R_24()) {
1597 return true;
1598 }
1599 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1600 return false;
1601 }
1602 return false;
1603 }
1604
1605 final private boolean jj_3R_49() {
1606 if (jj_scan_token(DOUBLE)) {
1607 return true;
1608 }
1609 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1610 return false;
1611 }
1612 return false;
1613 }
1614
1615 final private boolean jj_3R_141() {
1616 if (jj_3R_148()) {
1617 return true;
1618 }
1619 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1620 return false;
1621 }
1622 return false;
1623 }
1624
1625 final private boolean jj_3R_48() {
1626 if (jj_scan_token(FLOAT)) {
1627 return true;
1628 }
1629 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1630 return false;
1631 }
1632 return false;
1633 }
1634
1635 final private boolean jj_3R_146() {
1636 if (jj_scan_token(TILDE)) {
1637 return true;
1638 }
1639 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1640 return false;
1641 }
1642 return false;
1643 }
1644
1645 final private boolean jj_3R_47() {
1646 if (jj_scan_token(LONG)) {
1647 return true;
1648 }
1649 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1650 return false;
1651 }
1652 return false;
1653 }
1654
1655 final private boolean jj_3R_140() {
1656 Token xsp;
1657 xsp = jj_scanpos;
1658 if (jj_3R_146()) {
1659 jj_scanpos = xsp;
1660 if (jj_3R_147()) {
1661 return true;
1662 }
1663 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1664 return false;
1665 }
1666 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1667 return false;
1668 }
1669 if (jj_3R_115()) {
1670 return true;
1671 }
1672 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1673 return false;
1674 }
1675 return false;
1676 }
1677
1678 final private boolean jj_3R_136() {
1679 Token xsp;
1680 xsp = jj_scanpos;
1681 if (jj_3R_140()) {
1682 jj_scanpos = xsp;
1683 if (jj_3R_141()) {
1684 jj_scanpos = xsp;
1685 if (jj_3R_142()) {
1686 return true;
1687 }
1688 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1689 return false;
1690 }
1691 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1692 return false;
1693 }
1694 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1695 return false;
1696 }
1697 return false;
1698 }
1699
1700 final private boolean jj_3R_46() {
1701 if (jj_scan_token(INT)) {
1702 return true;
1703 }
1704 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1705 return false;
1706 }
1707 return false;
1708 }
1709
1710 final private boolean jj_3R_145() {
1711 if (jj_scan_token(REM)) {
1712 return true;
1713 }
1714 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1715 return false;
1716 }
1717 return false;
1718 }
1719
1720 final private boolean jj_3R_45() {
1721 if (jj_scan_token(SHORT)) {
1722 return true;
1723 }
1724 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1725 return false;
1726 }
1727 return false;
1728 }
1729
1730 final private boolean jj_3R_44() {
1731 if (jj_scan_token(BYTE)) {
1732 return true;
1733 }
1734 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1735 return false;
1736 }
1737 return false;
1738 }
1739
1740 final private boolean jj_3R_135() {
1741 if (jj_scan_token(DECR)) {
1742 return true;
1743 }
1744 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1745 return false;
1746 }
1747 if (jj_3R_20()) {
1748 return true;
1749 }
1750 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1751 return false;
1752 }
1753 return false;
1754 }
1755
1756 final private boolean jj_3R_43() {
1757 if (jj_scan_token(CHAR)) {
1758 return true;
1759 }
1760 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1761 return false;
1762 }
1763 return false;
1764 }
1765
1766 final private boolean jj_3R_23() {
1767 Token xsp;
1768 xsp = jj_scanpos;
1769 if (jj_3R_42()) {
1770 jj_scanpos = xsp;
1771 if (jj_3R_43()) {
1772 jj_scanpos = xsp;
1773 if (jj_3R_44()) {
1774 jj_scanpos = xsp;
1775 if (jj_3R_45()) {
1776 jj_scanpos = xsp;
1777 if (jj_3R_46()) {
1778 jj_scanpos = xsp;
1779 if (jj_3R_47()) {
1780 jj_scanpos = xsp;
1781 if (jj_3R_48()) {
1782 jj_scanpos = xsp;
1783 if (jj_3R_49()) {
1784 return true;
1785 }
1786 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1787 return false;
1788 }
1789 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1790 return false;
1791 }
1792 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1793 return false;
1794 }
1795 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1796 return false;
1797 }
1798 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1799 return false;
1800 }
1801 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1802 return false;
1803 }
1804 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1805 return false;
1806 }
1807 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1808 return false;
1809 }
1810 return false;
1811 }
1812
1813 final private boolean jj_3R_42() {
1814 if (jj_scan_token(BOOLEAN)) {
1815 return true;
1816 }
1817 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1818 return false;
1819 }
1820 return false;
1821 }
1822
1823 final private boolean jj_3_9() {
1824 if (jj_scan_token(LBRACKET)) {
1825 return true;
1826 }
1827 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1828 return false;
1829 }
1830 if (jj_scan_token(RBRACKET)) {
1831 return true;
1832 }
1833 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1834 return false;
1835 }
1836 return false;
1837 }
1838
1839 final private boolean jj_3R_121() {
1840 if (jj_3R_23()) {
1841 return true;
1842 }
1843 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1844 return false;
1845 }
1846 return false;
1847 }
1848
1849 final private boolean jj_3R_144() {
1850 if (jj_scan_token(SLASH)) {
1851 return true;
1852 }
1853 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1854 return false;
1855 }
1856 return false;
1857 }
1858
1859 final private boolean jj_3R_134() {
1860 if (jj_scan_token(INCR)) {
1861 return true;
1862 }
1863 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1864 return false;
1865 }
1866 if (jj_3R_20()) {
1867 return true;
1868 }
1869 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1870 return false;
1871 }
1872 return false;
1873 }
1874
1875 final private boolean jj_3R_114() {
1876 Token xsp;
1877 xsp = jj_scanpos;
1878 if (jj_3R_121()) {
1879 jj_scanpos = xsp;
1880 if (jj_3R_122()) {
1881 return true;
1882 }
1883 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1884 return false;
1885 }
1886 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1887 return false;
1888 }
1889 while (true) {
1890 xsp = jj_scanpos;
1891 if (jj_3R_123()) {
1892 jj_scanpos = xsp;
1893 break;
1894 }
1895 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1896 return false;
1897 }
1898 }
1899 return false;
1900 }
1901
1902 final private boolean jj_3R_120() {
1903 if (jj_scan_token(GE)) {
1904 return true;
1905 }
1906 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1907 return false;
1908 }
1909 return false;
1910 }
1911
1912 final private boolean jj_3R_133() {
1913 if (jj_scan_token(MINUS)) {
1914 return true;
1915 }
1916 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1917 return false;
1918 }
1919 return false;
1920 }
1921
1922 final private boolean jj_3R_127() {
1923 if (jj_3R_136()) {
1924 return true;
1925 }
1926 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1927 return false;
1928 }
1929 return false;
1930 }
1931
1932 final private boolean jj_3R_126() {
1933 if (jj_3R_135()) {
1934 return true;
1935 }
1936 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1937 return false;
1938 }
1939 return false;
1940 }
1941
1942 final private boolean jj_3R_139() {
1943 if (jj_scan_token(MINUS)) {
1944 return true;
1945 }
1946 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1947 return false;
1948 }
1949 return false;
1950 }
1951
1952 final private boolean jj_3R_125() {
1953 if (jj_3R_134()) {
1954 return true;
1955 }
1956 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1957 return false;
1958 }
1959 return false;
1960 }
1961
1962 final private boolean jj_3R_132() {
1963 if (jj_scan_token(PLUS)) {
1964 return true;
1965 }
1966 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1967 return false;
1968 }
1969 return false;
1970 }
1971
1972 final private boolean jj_3R_143() {
1973 if (jj_scan_token(STAR)) {
1974 return true;
1975 }
1976 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1977 return false;
1978 }
1979 return false;
1980 }
1981
1982 final private boolean jj_3R_124() {
1983 Token xsp;
1984 xsp = jj_scanpos;
1985 if (jj_3R_132()) {
1986 jj_scanpos = xsp;
1987 if (jj_3R_133()) {
1988 return true;
1989 }
1990 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1991 return false;
1992 }
1993 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
1994 return false;
1995 }
1996 if (jj_3R_115()) {
1997 return true;
1998 }
1999 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2000 return false;
2001 }
2002 return false;
2003 }
2004
2005 final private boolean jj_3R_115() {
2006 Token xsp;
2007 xsp = jj_scanpos;
2008 if (jj_3R_124()) {
2009 jj_scanpos = xsp;
2010 if (jj_3R_125()) {
2011 jj_scanpos = xsp;
2012 if (jj_3R_126()) {
2013 jj_scanpos = xsp;
2014 if (jj_3R_127()) {
2015 return true;
2016 }
2017 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2018 return false;
2019 }
2020 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2021 return false;
2022 }
2023 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2024 return false;
2025 }
2026 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2027 return false;
2028 }
2029 return false;
2030 }
2031
2032 final private boolean jj_3R_137() {
2033 Token xsp;
2034 xsp = jj_scanpos;
2035 if (jj_3R_143()) {
2036 jj_scanpos = xsp;
2037 if (jj_3R_144()) {
2038 jj_scanpos = xsp;
2039 if (jj_3R_145()) {
2040 return true;
2041 }
2042 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2043 return false;
2044 }
2045 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2046 return false;
2047 }
2048 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2049 return false;
2050 }
2051 if (jj_3R_115()) {
2052 return true;
2053 }
2054 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2055 return false;
2056 }
2057 return false;
2058 }
2059
2060 final private boolean jj_3R_131() {
2061 if (jj_scan_token(RUNSIGNEDSHIFT)) {
2062 return true;
2063 }
2064 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2065 return false;
2066 }
2067 return false;
2068 }
2069
2070 final private boolean jj_3R_119() {
2071 if (jj_scan_token(LE)) {
2072 return true;
2073 }
2074 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2075 return false;
2076 }
2077 return false;
2078 }
2079
2080 final private boolean jj_3R_138() {
2081 if (jj_scan_token(PLUS)) {
2082 return true;
2083 }
2084 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2085 return false;
2086 }
2087 return false;
2088 }
2089
2090 final private boolean jj_3R_112() {
2091 if (jj_3R_115()) {
2092 return true;
2093 }
2094 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2095 return false;
2096 }
2097 Token xsp;
2098 while (true) {
2099 xsp = jj_scanpos;
2100 if (jj_3R_137()) {
2101 jj_scanpos = xsp;
2102 break;
2103 }
2104 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2105 return false;
2106 }
2107 }
2108 return false;
2109 }
2110
2111 final private boolean jj_3R_88() {
2112 if (jj_3R_86()) {
2113 return true;
2114 }
2115 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2116 return false;
2117 }
2118 return false;
2119 }
2120
2121 final private boolean jj_3R_130() {
2122 if (jj_scan_token(RSIGNEDSHIFT)) {
2123 return true;
2124 }
2125 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2126 return false;
2127 }
2128 return false;
2129 }
2130
2131 final private boolean jj_3R_128() {
2132 Token xsp;
2133 xsp = jj_scanpos;
2134 if (jj_3R_138()) {
2135 jj_scanpos = xsp;
2136 if (jj_3R_139()) {
2137 return true;
2138 }
2139 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2140 return false;
2141 }
2142 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2143 return false;
2144 }
2145 if (jj_3R_112()) {
2146 return true;
2147 }
2148 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2149 return false;
2150 }
2151 return false;
2152 }
2153
2154 final private boolean jj_3R_87() {
2155 if (jj_3R_82()) {
2156 return true;
2157 }
2158 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2159 return false;
2160 }
2161 return false;
2162 }
2163
2164 final private boolean jj_3R_118() {
2165 if (jj_scan_token(GT)) {
2166 return true;
2167 }
2168 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2169 return false;
2170 }
2171 return false;
2172 }
2173
2174 final private boolean jj_3R_129() {
2175 if (jj_scan_token(LSHIFT)) {
2176 return true;
2177 }
2178 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2179 return false;
2180 }
2181 return false;
2182 }
2183
2184 final private boolean jj_3R_116() {
2185 Token xsp;
2186 xsp = jj_scanpos;
2187 if (jj_3R_129()) {
2188 jj_scanpos = xsp;
2189 if (jj_3R_130()) {
2190 jj_scanpos = xsp;
2191 if (jj_3R_131()) {
2192 return true;
2193 }
2194 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2195 return false;
2196 }
2197 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2198 return false;
2199 }
2200 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2201 return false;
2202 }
2203 if (jj_3R_108()) {
2204 return true;
2205 }
2206 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2207 return false;
2208 }
2209 return false;
2210 }
2211
2212 final private boolean jj_3R_108() {
2213 if (jj_3R_112()) {
2214 return true;
2215 }
2216 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2217 return false;
2218 }
2219 Token xsp;
2220 while (true) {
2221 xsp = jj_scanpos;
2222 if (jj_3R_128()) {
2223 jj_scanpos = xsp;
2224 break;
2225 }
2226 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2227 return false;
2228 }
2229 }
2230 return false;
2231 }
2232
2233 final private boolean jj_3_8() {
2234 if (jj_scan_token(LBRACKET)) {
2235 return true;
2236 }
2237 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2238 return false;
2239 }
2240 if (jj_3R_25()) {
2241 return true;
2242 }
2243 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2244 return false;
2245 }
2246 if (jj_scan_token(RBRACKET)) {
2247 return true;
2248 }
2249 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2250 return false;
2251 }
2252 return false;
2253 }
2254
2255 final private boolean jj_3R_86() {
2256 Token xsp;
2257 if (jj_3_8()) {
2258 return true;
2259 }
2260 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2261 return false;
2262 }
2263 while (true) {
2264 xsp = jj_scanpos;
2265 if (jj_3_8()) {
2266 jj_scanpos = xsp;
2267 break;
2268 }
2269 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2270 return false;
2271 }
2272 }
2273 while (true) {
2274 xsp = jj_scanpos;
2275 if (jj_3_9()) {
2276 jj_scanpos = xsp;
2277 break;
2278 }
2279 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2280 return false;
2281 }
2282 }
2283 return false;
2284 }
2285
2286 final private boolean jj_3R_117() {
2287 if (jj_scan_token(LT)) {
2288 return true;
2289 }
2290 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2291 return false;
2292 }
2293 return false;
2294 }
2295
2296 final private boolean jj_3R_106() {
2297 if (jj_3R_108()) {
2298 return true;
2299 }
2300 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2301 return false;
2302 }
2303 Token xsp;
2304 while (true) {
2305 xsp = jj_scanpos;
2306 if (jj_3R_116()) {
2307 jj_scanpos = xsp;
2308 break;
2309 }
2310 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2311 return false;
2312 }
2313 }
2314 return false;
2315 }
2316
2317 final private boolean jj_3R_113() {
2318 Token xsp;
2319 xsp = jj_scanpos;
2320 if (jj_3R_117()) {
2321 jj_scanpos = xsp;
2322 if (jj_3R_118()) {
2323 jj_scanpos = xsp;
2324 if (jj_3R_119()) {
2325 jj_scanpos = xsp;
2326 if (jj_3R_120()) {
2327 return true;
2328 }
2329 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2330 return false;
2331 }
2332 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2333 return false;
2334 }
2335 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2336 return false;
2337 }
2338 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2339 return false;
2340 }
2341 if (jj_3R_106()) {
2342 return true;
2343 }
2344 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2345 return false;
2346 }
2347 return false;
2348 }
2349
2350 final private boolean jj_3R_111() {
2351 if (jj_scan_token(NE)) {
2352 return true;
2353 }
2354 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2355 return false;
2356 }
2357 return false;
2358 }
2359
2360 final private boolean jj_3R_109() {
2361 if (jj_scan_token(INSTANCEOF)) {
2362 return true;
2363 }
2364 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2365 return false;
2366 }
2367 if (jj_3R_114()) {
2368 return true;
2369 }
2370 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2371 return false;
2372 }
2373 return false;
2374 }
2375
2376 final private boolean jj_3R_104() {
2377 if (jj_3R_106()) {
2378 return true;
2379 }
2380 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2381 return false;
2382 }
2383 Token xsp;
2384 while (true) {
2385 xsp = jj_scanpos;
2386 if (jj_3R_113()) {
2387 jj_scanpos = xsp;
2388 break;
2389 }
2390 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2391 return false;
2392 }
2393 }
2394 return false;
2395 }
2396
2397 final private boolean jj_3R_81() {
2398 if (jj_scan_token(NEW)) {
2399 return true;
2400 }
2401 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2402 return false;
2403 }
2404 if (jj_3R_24()) {
2405 return true;
2406 }
2407 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2408 return false;
2409 }
2410 Token xsp;
2411 xsp = jj_scanpos;
2412 if (jj_3R_87()) {
2413 jj_scanpos = xsp;
2414 if (jj_3R_88()) {
2415 return true;
2416 }
2417 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2418 return false;
2419 }
2420 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2421 return false;
2422 }
2423 return false;
2424 }
2425
2426 final private boolean jj_3_7() {
2427 if (jj_scan_token(NEW)) {
2428 return true;
2429 }
2430 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2431 return false;
2432 }
2433 if (jj_3R_23()) {
2434 return true;
2435 }
2436 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2437 return false;
2438 }
2439 if (jj_3R_86()) {
2440 return true;
2441 }
2442 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2443 return false;
2444 }
2445 return false;
2446 }
2447
2448 final private boolean jj_3R_70() {
2449 Token xsp;
2450 xsp = jj_scanpos;
2451 if (jj_3_7()) {
2452 jj_scanpos = xsp;
2453 if (jj_3R_81()) {
2454 return true;
2455 }
2456 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2457 return false;
2458 }
2459 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2460 return false;
2461 }
2462 return false;
2463 }
2464
2465 final private boolean jj_3R_97() {
2466 if (jj_scan_token(COMMA)) {
2467 return true;
2468 }
2469 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2470 return false;
2471 }
2472 if (jj_3R_25()) {
2473 return true;
2474 }
2475 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2476 return false;
2477 }
2478 return false;
2479 }
2480
2481 final private boolean jj_3R_39() {
2482 if (jj_scan_token(ORASSIGN)) {
2483 return true;
2484 }
2485 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2486 return false;
2487 }
2488 return false;
2489 }
2490
2491 final private boolean jj_3R_110() {
2492 if (jj_scan_token(EQ)) {
2493 return true;
2494 }
2495 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2496 return false;
2497 }
2498 return false;
2499 }
2500
2501 final private boolean jj_3R_102() {
2502 if (jj_3R_104()) {
2503 return true;
2504 }
2505 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2506 return false;
2507 }
2508 Token xsp;
2509 xsp = jj_scanpos;
2510 if (jj_3R_109()) {
2511 jj_scanpos = xsp;
2512 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2513 return false;
2514 }
2515 return false;
2516 }
2517
2518 final private boolean jj_3R_107() {
2519 Token xsp;
2520 xsp = jj_scanpos;
2521 if (jj_3R_110()) {
2522 jj_scanpos = xsp;
2523 if (jj_3R_111()) {
2524 return true;
2525 }
2526 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2527 return false;
2528 }
2529 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2530 return false;
2531 }
2532 if (jj_3R_102()) {
2533 return true;
2534 }
2535 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2536 return false;
2537 }
2538 return false;
2539 }
2540
2541 final private boolean jj_3R_94() {
2542 if (jj_3R_25()) {
2543 return true;
2544 }
2545 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2546 return false;
2547 }
2548 Token xsp;
2549 while (true) {
2550 xsp = jj_scanpos;
2551 if (jj_3R_97()) {
2552 jj_scanpos = xsp;
2553 break;
2554 }
2555 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2556 return false;
2557 }
2558 }
2559 return false;
2560 }
2561
2562 final private boolean jj_3R_89() {
2563 if (jj_3R_94()) {
2564 return true;
2565 }
2566 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2567 return false;
2568 }
2569 return false;
2570 }
2571
2572 final private boolean jj_3R_38() {
2573 if (jj_scan_token(XORASSIGN)) {
2574 return true;
2575 }
2576 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2577 return false;
2578 }
2579 return false;
2580 }
2581
2582 final private boolean jj_3R_82() {
2583 if (jj_scan_token(LPAREN)) {
2584 return true;
2585 }
2586 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2587 return false;
2588 }
2589 Token xsp;
2590 xsp = jj_scanpos;
2591 if (jj_3R_89()) {
2592 jj_scanpos = xsp;
2593 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2594 return false;
2595 }
2596 if (jj_scan_token(RPAREN)) {
2597 return true;
2598 }
2599 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2600 return false;
2601 }
2602 return false;
2603 }
2604
2605 final private boolean jj_3R_105() {
2606 if (jj_scan_token(BIT_AND)) {
2607 return true;
2608 }
2609 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2610 return false;
2611 }
2612 if (jj_3R_100()) {
2613 return true;
2614 }
2615 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2616 return false;
2617 }
2618 return false;
2619 }
2620
2621 final private boolean jj_3R_100() {
2622 if (jj_3R_102()) {
2623 return true;
2624 }
2625 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2626 return false;
2627 }
2628 Token xsp;
2629 while (true) {
2630 xsp = jj_scanpos;
2631 if (jj_3R_107()) {
2632 jj_scanpos = xsp;
2633 break;
2634 }
2635 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2636 return false;
2637 }
2638 }
2639 return false;
2640 }
2641
2642 final private boolean jj_3R_37() {
2643 if (jj_scan_token(ANDASSIGN)) {
2644 return true;
2645 }
2646 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2647 return false;
2648 }
2649 return false;
2650 }
2651
2652 final private boolean jj_3R_85() {
2653 if (jj_scan_token(NULL)) {
2654 return true;
2655 }
2656 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2657 return false;
2658 }
2659 return false;
2660 }
2661
2662 final private boolean jj_3R_103() {
2663 if (jj_scan_token(XOR)) {
2664 return true;
2665 }
2666 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2667 return false;
2668 }
2669 if (jj_3R_98()) {
2670 return true;
2671 }
2672 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2673 return false;
2674 }
2675 return false;
2676 }
2677
2678 final private boolean jj_3R_98() {
2679 if (jj_3R_100()) {
2680 return true;
2681 }
2682 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2683 return false;
2684 }
2685 Token xsp;
2686 while (true) {
2687 xsp = jj_scanpos;
2688 if (jj_3R_105()) {
2689 jj_scanpos = xsp;
2690 break;
2691 }
2692 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2693 return false;
2694 }
2695 }
2696 return false;
2697 }
2698
2699 final private boolean jj_3R_92() {
2700 if (jj_scan_token(FALSE)) {
2701 return true;
2702 }
2703 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2704 return false;
2705 }
2706 return false;
2707 }
2708
2709 final private boolean jj_3R_36() {
2710 if (jj_scan_token(RUNSIGNEDSHIFTASSIGN)) {
2711 return true;
2712 }
2713 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2714 return false;
2715 }
2716 return false;
2717 }
2718
2719 final private boolean jj_3R_91() {
2720 if (jj_scan_token(TRUE)) {
2721 return true;
2722 }
2723 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2724 return false;
2725 }
2726 return false;
2727 }
2728
2729 final private boolean jj_3R_84() {
2730 Token xsp;
2731 xsp = jj_scanpos;
2732 if (jj_3R_91()) {
2733 jj_scanpos = xsp;
2734 if (jj_3R_92()) {
2735 return true;
2736 }
2737 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2738 return false;
2739 }
2740 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2741 return false;
2742 }
2743 return false;
2744 }
2745
2746 final private boolean jj_3R_101() {
2747 if (jj_scan_token(BIT_OR)) {
2748 return true;
2749 }
2750 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2751 return false;
2752 }
2753 if (jj_3R_95()) {
2754 return true;
2755 }
2756 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2757 return false;
2758 }
2759 return false;
2760 }
2761
2762 final private boolean jj_3R_95() {
2763 if (jj_3R_98()) {
2764 return true;
2765 }
2766 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2767 return false;
2768 }
2769 Token xsp;
2770 while (true) {
2771 xsp = jj_scanpos;
2772 if (jj_3R_103()) {
2773 jj_scanpos = xsp;
2774 break;
2775 }
2776 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2777 return false;
2778 }
2779 }
2780 return false;
2781 }
2782
2783 final private boolean jj_3R_35() {
2784 if (jj_scan_token(RSIGNEDSHIFTASSIGN)) {
2785 return true;
2786 }
2787 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2788 return false;
2789 }
2790 return false;
2791 }
2792
2793 final private boolean jj_3R_80() {
2794 if (jj_3R_85()) {
2795 return true;
2796 }
2797 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2798 return false;
2799 }
2800 return false;
2801 }
2802
2803 final private boolean jj_3R_66() {
2804 if (jj_3R_69()) {
2805 return true;
2806 }
2807 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2808 return false;
2809 }
2810 return false;
2811 }
2812
2813 final private boolean jj_3R_79() {
2814 if (jj_3R_84()) {
2815 return true;
2816 }
2817 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2818 return false;
2819 }
2820 return false;
2821 }
2822
2823 final private boolean jj_3R_78() {
2824 if (jj_scan_token(STRING_LITERAL)) {
2825 return true;
2826 }
2827 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2828 return false;
2829 }
2830 return false;
2831 }
2832
2833 final private boolean jj_3R_99() {
2834 if (jj_scan_token(SC_AND)) {
2835 return true;
2836 }
2837 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2838 return false;
2839 }
2840 if (jj_3R_90()) {
2841 return true;
2842 }
2843 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2844 return false;
2845 }
2846 return false;
2847 }
2848
2849 final private boolean jj_3R_90() {
2850 if (jj_3R_95()) {
2851 return true;
2852 }
2853 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2854 return false;
2855 }
2856 Token xsp;
2857 while (true) {
2858 xsp = jj_scanpos;
2859 if (jj_3R_101()) {
2860 jj_scanpos = xsp;
2861 break;
2862 }
2863 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2864 return false;
2865 }
2866 }
2867 return false;
2868 }
2869
2870 final private boolean jj_3R_34() {
2871 if (jj_scan_token(LSHIFTASSIGN)) {
2872 return true;
2873 }
2874 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2875 return false;
2876 }
2877 return false;
2878 }
2879
2880 final private boolean jj_3R_65() {
2881 if (jj_scan_token(NEW)) {
2882 return true;
2883 }
2884 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2885 return false;
2886 }
2887 return false;
2888 }
2889
2890 final private boolean jj_3R_77() {
2891 if (jj_scan_token(CHARACTER_LITERAL)) {
2892 return true;
2893 }
2894 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2895 return false;
2896 }
2897 return false;
2898 }
2899
2900 final private boolean jj_3R_76() {
2901 if (jj_scan_token(FLOATING_POINT_LITERAL)) {
2902 return true;
2903 }
2904 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2905 return false;
2906 }
2907 return false;
2908 }
2909
2910 final private boolean jj_3R_33() {
2911 if (jj_scan_token(MINUSASSIGN)) {
2912 return true;
2913 }
2914 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2915 return false;
2916 }
2917 return false;
2918 }
2919
2920 final private boolean jj_3R_69() {
2921 Token xsp;
2922 xsp = jj_scanpos;
2923 if (jj_3R_75()) {
2924 jj_scanpos = xsp;
2925 if (jj_3R_76()) {
2926 jj_scanpos = xsp;
2927 if (jj_3R_77()) {
2928 jj_scanpos = xsp;
2929 if (jj_3R_78()) {
2930 jj_scanpos = xsp;
2931 if (jj_3R_79()) {
2932 jj_scanpos = xsp;
2933 if (jj_3R_80()) {
2934 return true;
2935 }
2936 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2937 return false;
2938 }
2939 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2940 return false;
2941 }
2942 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2943 return false;
2944 }
2945 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2946 return false;
2947 }
2948 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2949 return false;
2950 }
2951 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2952 return false;
2953 }
2954 return false;
2955 }
2956
2957 final private boolean jj_3R_75() {
2958 if (jj_scan_token(INTEGER_LITERAL)) {
2959 return true;
2960 }
2961 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2962 return false;
2963 }
2964 return false;
2965 }
2966
2967 final private boolean jj_3R_96() {
2968 if (jj_scan_token(SC_OR)) {
2969 return true;
2970 }
2971 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2972 return false;
2973 }
2974 if (jj_3R_83()) {
2975 return true;
2976 }
2977 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2978 return false;
2979 }
2980 return false;
2981 }
2982
2983 final private boolean jj_3R_83() {
2984 if (jj_3R_90()) {
2985 return true;
2986 }
2987 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2988 return false;
2989 }
2990 Token xsp;
2991 while (true) {
2992 xsp = jj_scanpos;
2993 if (jj_3R_99()) {
2994 jj_scanpos = xsp;
2995 break;
2996 }
2997 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
2998 return false;
2999 }
3000 }
3001 return false;
3002 }
3003
3004 final private boolean jj_3R_64() {
3005 if (jj_scan_token(SUPER)) {
3006 return true;
3007 }
3008 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3009 return false;
3010 }
3011 return false;
3012 }
3013
3014 final private boolean jj_3R_32() {
3015 if (jj_scan_token(PLUSASSIGN)) {
3016 return true;
3017 }
3018 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3019 return false;
3020 }
3021 return false;
3022 }
3023
3024 final private boolean jj_3R_73() {
3025 if (jj_3R_82()) {
3026 return true;
3027 }
3028 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3029 return false;
3030 }
3031 return false;
3032 }
3033
3034 final private boolean jj_3R_72() {
3035 if (jj_scan_token(DOT)) {
3036 return true;
3037 }
3038 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3039 return false;
3040 }
3041 if (jj_scan_token(IDENTIFIER)) {
3042 return true;
3043 }
3044 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3045 return false;
3046 }
3047 return false;
3048 }
3049
3050 final private boolean jj_3R_74() {
3051 if (jj_3R_83()) {
3052 return true;
3053 }
3054 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3055 return false;
3056 }
3057 Token xsp;
3058 while (true) {
3059 xsp = jj_scanpos;
3060 if (jj_3R_96()) {
3061 jj_scanpos = xsp;
3062 break;
3063 }
3064 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3065 return false;
3066 }
3067 }
3068 return false;
3069 }
3070
3071 final private boolean jj_3R_63() {
3072 if (jj_scan_token(THIS)) {
3073 return true;
3074 }
3075 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3076 return false;
3077 }
3078 return false;
3079 }
3080
3081 final private boolean jj_3R_31() {
3082 if (jj_scan_token(REMASSIGN)) {
3083 return true;
3084 }
3085 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3086 return false;
3087 }
3088 return false;
3089 }
3090
3091 final private boolean jj_3R_58() {
3092 Token xsp;
3093 xsp = jj_scanpos;
3094 if (jj_3R_71()) {
3095 jj_scanpos = xsp;
3096 if (jj_3R_72()) {
3097 jj_scanpos = xsp;
3098 if (jj_3R_73()) {
3099 return true;
3100 }
3101 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3102 return false;
3103 }
3104 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3105 return false;
3106 }
3107 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3108 return false;
3109 }
3110 return false;
3111 }
3112
3113 final private boolean jj_3R_71() {
3114 if (jj_scan_token(LBRACKET)) {
3115 return true;
3116 }
3117 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3118 return false;
3119 }
3120 if (jj_3R_25()) {
3121 return true;
3122 }
3123 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3124 return false;
3125 }
3126 if (jj_scan_token(RBRACKET)) {
3127 return true;
3128 }
3129 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3130 return false;
3131 }
3132 return false;
3133 }
3134
3135 final private boolean jj_3R_93() {
3136 if (jj_scan_token(HOOK)) {
3137 return true;
3138 }
3139 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3140 return false;
3141 }
3142 if (jj_3R_25()) {
3143 return true;
3144 }
3145 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3146 return false;
3147 }
3148 if (jj_scan_token(COLON)) {
3149 return true;
3150 }
3151 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3152 return false;
3153 }
3154 if (jj_3R_68()) {
3155 return true;
3156 }
3157 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3158 return false;
3159 }
3160 return false;
3161 }
3162
3163 final private boolean jj_3R_57() {
3164 if (jj_3R_70()) {
3165 return true;
3166 }
3167 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3168 return false;
3169 }
3170 return false;
3171 }
3172
3173 final private boolean jj_3R_30() {
3174 if (jj_scan_token(SLASHASSIGN)) {
3175 return true;
3176 }
3177 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3178 return false;
3179 }
3180 return false;
3181 }
3182
3183 final private boolean jj_3R_27() {
3184 if (jj_3R_58()) {
3185 return true;
3186 }
3187 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3188 return false;
3189 }
3190 return false;
3191 }
3192
3193 final private boolean jj_3R_56() {
3194 if (jj_scan_token(LPAREN)) {
3195 return true;
3196 }
3197 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3198 return false;
3199 }
3200 if (jj_3R_25()) {
3201 return true;
3202 }
3203 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3204 return false;
3205 }
3206 if (jj_scan_token(RPAREN)) {
3207 return true;
3208 }
3209 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3210 return false;
3211 }
3212 return false;
3213 }
3214
3215 final private boolean jj_3R_152() {
3216 if (jj_scan_token(LBRACKET)) {
3217 return true;
3218 }
3219 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3220 return false;
3221 }
3222 if (jj_scan_token(RBRACKET)) {
3223 return true;
3224 }
3225 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3226 return false;
3227 }
3228 return false;
3229 }
3230
3231 final private boolean jj_3R_55() {
3232 if (jj_scan_token(SUPER)) {
3233 return true;
3234 }
3235 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3236 return false;
3237 }
3238 if (jj_scan_token(DOT)) {
3239 return true;
3240 }
3241 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3242 return false;
3243 }
3244 if (jj_scan_token(IDENTIFIER)) {
3245 return true;
3246 }
3247 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3248 return false;
3249 }
3250 return false;
3251 }
3252
3253 final private boolean jj_3R_29() {
3254 if (jj_scan_token(STARASSIGN)) {
3255 return true;
3256 }
3257 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3258 return false;
3259 }
3260 return false;
3261 }
3262
3263 final private boolean jj_3R_68() {
3264 if (jj_3R_74()) {
3265 return true;
3266 }
3267 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3268 return false;
3269 }
3270 Token xsp;
3271 xsp = jj_scanpos;
3272 if (jj_3R_93()) {
3273 jj_scanpos = xsp;
3274 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3275 return false;
3276 }
3277 return false;
3278 }
3279
3280 final private boolean jj_3R_54() {
3281 if (jj_scan_token(THIS)) {
3282 return true;
3283 }
3284 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3285 return false;
3286 }
3287 return false;
3288 }
3289
3290 final private boolean jj_3R_62() {
3291 if (jj_scan_token(IDENTIFIER)) {
3292 return true;
3293 }
3294 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3295 return false;
3296 }
3297 return false;
3298 }
3299
3300 final private boolean jj_3R_53() {
3301 if (jj_3R_24()) {
3302 return true;
3303 }
3304 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3305 return false;
3306 }
3307 return false;
3308 }
3309
3310 final private boolean jj_3R_153() {
3311 if (jj_scan_token(LBRACKET)) {
3312 return true;
3313 }
3314 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3315 return false;
3316 }
3317 if (jj_scan_token(RBRACKET)) {
3318 return true;
3319 }
3320 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3321 return false;
3322 }
3323 return false;
3324 }
3325
3326 final private boolean jj_3R_26() {
3327 Token xsp;
3328 xsp = jj_scanpos;
3329 if (jj_3R_52()) {
3330 jj_scanpos = xsp;
3331 if (jj_3R_53()) {
3332 jj_scanpos = xsp;
3333 if (jj_3R_54()) {
3334 jj_scanpos = xsp;
3335 if (jj_3R_55()) {
3336 jj_scanpos = xsp;
3337 if (jj_3R_56()) {
3338 jj_scanpos = xsp;
3339 if (jj_3R_57()) {
3340 return true;
3341 }
3342 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3343 return false;
3344 }
3345 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3346 return false;
3347 }
3348 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3349 return false;
3350 }
3351 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3352 return false;
3353 }
3354 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3355 return false;
3356 }
3357 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3358 return false;
3359 }
3360 return false;
3361 }
3362
3363 final private boolean jj_3R_52() {
3364 if (jj_3R_69()) {
3365 return true;
3366 }
3367 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3368 return false;
3369 }
3370 return false;
3371 }
3372
3373 final private boolean jj_3R_21() {
3374 Token xsp;
3375 xsp = jj_scanpos;
3376 if (jj_3R_28()) {
3377 jj_scanpos = xsp;
3378 if (jj_3R_29()) {
3379 jj_scanpos = xsp;
3380 if (jj_3R_30()) {
3381 jj_scanpos = xsp;
3382 if (jj_3R_31()) {
3383 jj_scanpos = xsp;
3384 if (jj_3R_32()) {
3385 jj_scanpos = xsp;
3386 if (jj_3R_33()) {
3387 jj_scanpos = xsp;
3388 if (jj_3R_34()) {
3389 jj_scanpos = xsp;
3390 if (jj_3R_35()) {
3391 jj_scanpos = xsp;
3392 if (jj_3R_36()) {
3393 jj_scanpos = xsp;
3394 if (jj_3R_37()) {
3395 jj_scanpos = xsp;
3396 if (jj_3R_38()) {
3397 jj_scanpos = xsp;
3398 if (jj_3R_39()) {
3399 return true;
3400 }
3401 if (jj_la == 0
3402 && jj_scanpos == jj_lastpos) {
3403 return false;
3404 }
3405 } else if (jj_la == 0
3406 && jj_scanpos == jj_lastpos) {
3407 return false;
3408 }
3409 } else if (jj_la == 0
3410 && jj_scanpos == jj_lastpos) {
3411 return false;
3412 }
3413 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3414 return false;
3415 }
3416 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3417 return false;
3418 }
3419 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3420 return false;
3421 }
3422 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3423 return false;
3424 }
3425 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3426 return false;
3427 }
3428 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3429 return false;
3430 }
3431 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3432 return false;
3433 }
3434 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3435 return false;
3436 }
3437 } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3438 return false;
3439 }
3440 return false;
3441 }
3442
3443 final private boolean jj_3R_28() {
3444 if (jj_scan_token(ASSIGN)) {
3445 return true;
3446 }
3447 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3448 return false;
3449 }
3450 return false;
3451 }
3452
3453 final private boolean jj_3R_61() {
3454 if (jj_scan_token(LPAREN)) {
3455 return true;
3456 }
3457 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3458 return false;
3459 }
3460 return false;
3461 }
3462
3463 final private boolean jj_3_2() {
3464 if (jj_3R_20()) {
3465 return true;
3466 }
3467 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3468 return false;
3469 }
3470 if (jj_3R_21()) {
3471 return true;
3472 }
3473 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3474 return false;
3475 }
3476 return false;
3477 }
3478
3479 final private boolean jj_3R_20() {
3480 if (jj_3R_26()) {
3481 return true;
3482 }
3483 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3484 return false;
3485 }
3486 Token xsp;
3487 while (true) {
3488 xsp = jj_scanpos;
3489 if (jj_3R_27()) {
3490 jj_scanpos = xsp;
3491 break;
3492 }
3493 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3494 return false;
3495 }
3496 }
3497 return false;
3498 }
3499
3500 final private boolean jj_3R_60() {
3501 if (jj_scan_token(BANG)) {
3502 return true;
3503 }
3504 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3505 return false;
3506 }
3507 return false;
3508 }
3509
3510 final private boolean jj_3R_155() {
3511 if (jj_scan_token(DECR)) {
3512 return true;
3513 }
3514 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3515 return false;
3516 }
3517 return false;
3518 }
3519
3520 final private boolean jj_3R_67() {
3521 if (jj_3R_20()) {
3522 return true;
3523 }
3524 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3525 return false;
3526 }
3527 if (jj_3R_21()) {
3528 return true;
3529 }
3530 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3531 return false;
3532 }
3533 if (jj_3R_25()) {
3534 return true;
3535 }
3536 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3537 return false;
3538 }
3539 return false;
3540 }
3541
3542 final private boolean jj_3R_150() {
3543 if (jj_scan_token(LPAREN)) {
3544 return true;
3545 }
3546 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3547 return false;
3548 }
3549 if (jj_3R_24()) {
3550 return true;
3551 }
3552 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3553 return false;
3554 }
3555 Token xsp;
3556 while (true) {
3557 xsp = jj_scanpos;
3558 if (jj_3R_153()) {
3559 jj_scanpos = xsp;
3560 break;
3561 }
3562 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3563 return false;
3564 }
3565 }
3566 if (jj_scan_token(RPAREN)) {
3567 return true;
3568 }
3569 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3570 return false;
3571 }
3572 if (jj_3R_136()) {
3573 return true;
3574 }
3575 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3576 return false;
3577 }
3578 return false;
3579 }
3580
3581 final private boolean jj_3R_59() {
3582 if (jj_scan_token(TILDE)) {
3583 return true;
3584 }
3585 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3586 return false;
3587 }
3588 return false;
3589 }
3590
3591 final private boolean jj_3R_51() {
3592 if (jj_3R_68()) {
3593 return true;
3594 }
3595 if (jj_la == 0 && jj_scanpos == jj_lastpos) {
3596 return false;
3597 }
3598 return false;
3599 }
3600
3601 public ExpressionParserTokenManager token_source;
3602 ASCII_UCodeESC_CharStream jj_input_stream;
3603 public Token token, jj_nt;
3604 private int jj_ntk;
3605 private Token jj_scanpos, jj_lastpos;
3606 private int jj_la;
3607 public boolean lookingAhead = false;
3608 private int jj_gen;
3609 final private int[] jj_la1 = new int[44];
3610 final private int[] jj_la1_0 = { 0x8209400, 0x0, 0x8209400, 0x0, 0x1000000,
3611 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
3612 0x0, 0x0, 0x0, 0x0, 0x0, 0x1000000, 0x0, 0x0, 0x1000000, 0x1000000,
3613 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1000000, 0x0, 0x1000000,
3614 0x1000000, 0x1000000, 0x0, 0x0, 0x0, };
3615 final private int[] jj_la1_1 = { 0x2014, 0x0, 0x2014, 0x0, 0x884480c0, 0x0,
3616 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0,
3617 0x0, 0x0, 0x0, 0x0, 0x884480c0, 0x0, 0x0, 0x884480c0, 0x884480c0, 0x0,
3618 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x884480c0, 0x0, 0x88400080, 0x400000,
3619 0x884480c0, 0x0, 0x0, 0x40, };
3620 final private int[] jj_la1_2 = { 0x8, 0x400, 0x0, 0x2000, 0xf00c004e,
3621 0x8000, 0x100000, 0x4000000, 0x8000000, 0x0, 0x0, 0x0, 0x2400000,
3622 0x2400000, 0x0, 0x1830000, 0x1830000, 0x0, 0x0, 0xc0000000,
3623 0xc0000000, 0x0, 0x0, 0xc0000000, 0xf00c004e, 0xc0000, 0xc0000, 0x4e,
3624 0xc004e, 0x40, 0x30000000, 0x30000000, 0x400, 0x400, 0x40, 0x4440,
3625 0x4e, 0x4440, 0x6, 0x0, 0xf00c004e, 0x2000, 0x440, 0x0, };
3626 final private int[] jj_la1_3 = { 0x0, 0x0, 0x0, 0x0, 0x0, 0xffe00, 0x0, 0x0,
3627 0x0, 0x8, 0x10, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1c0, 0x1c0, 0x0, 0x0,
3628 0x23, 0x23, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
3629 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, };
3630 final private JJExpressionParserCalls[] jj_2_rtns = new JJExpressionParserCalls[9];
3631 private boolean jj_rescan = false;
3632 private int jj_gc = 0;
3633
3634 public ExpressionParser(java.io.InputStream stream) {
3635 jj_input_stream = new ASCII_UCodeESC_CharStream(stream, 1, 1);
3636 token_source = new ExpressionParserTokenManager(jj_input_stream);
3637 token = new Token();
3638 jj_ntk = -1;
3639 jj_gen = 0;
3640 for (int i = 0; i < 44; i++) {
3641 jj_la1[i] = -1;
3642 }
3643 for (int i = 0; i < jj_2_rtns.length; i++) {
3644 jj_2_rtns[i] = new JJExpressionParserCalls();
3645 }
3646 }
3647
3648 public void ReInit(java.io.InputStream stream) {
3649 jj_input_stream.ReInit(stream, 1, 1);
3650 token_source.ReInit(jj_input_stream);
3651 token = new Token();
3652 jj_ntk = -1;
3653 jj_gen = 0;
3654 for (int i = 0; i < 44; i++) {
3655 jj_la1[i] = -1;
3656 }
3657 for (int i = 0; i < jj_2_rtns.length; i++) {
3658 jj_2_rtns[i] = new JJExpressionParserCalls();
3659 }
3660 }
3661
3662 public ExpressionParser(ExpressionParserTokenManager tm) {
3663 token_source = tm;
3664 token = new Token();
3665 jj_ntk = -1;
3666 jj_gen = 0;
3667 for (int i = 0; i < 44; i++) {
3668 jj_la1[i] = -1;
3669 }
3670 for (int i = 0; i < jj_2_rtns.length; i++) {
3671 jj_2_rtns[i] = new JJExpressionParserCalls();
3672 }
3673 }
3674
3675 public void ReInit(ExpressionParserTokenManager tm) {
3676 token_source = tm;
3677 token = new Token();
3678 jj_ntk = -1;
3679 jj_gen = 0;
3680 for (int i = 0; i < 44; i++) {
3681 jj_la1[i] = -1;
3682 }
3683 for (int i = 0; i < jj_2_rtns.length; i++) {
3684 jj_2_rtns[i] = new JJExpressionParserCalls();
3685 }
3686 }
3687
3688 final private Token jj_consume_token(int kind) throws ParseException {
3689 Token oldToken;
3690 if ((oldToken = token).next != null) {
3691 token = token.next;
3692 } else {
3693 token = token.next = token_source.getNextToken();
3694 }
3695 jj_ntk = -1;
3696 if (token.kind == kind) {
3697 jj_gen++;
3698 if (++jj_gc > 100) {
3699 jj_gc = 0;
3700 for (JJExpressionParserCalls jj_2_rtn : jj_2_rtns) {
3701 JJExpressionParserCalls c = jj_2_rtn;
3702 while (c != null) {
3703 if (c.gen < jj_gen) {
3704 c.first = null;
3705 }
3706 c = c.next;
3707 }
3708 }
3709 }
3710 return token;
3711 }
3712 token = oldToken;
3713 jj_kind = kind;
3714 throw generateParseException();
3715 }
3716
3717 final private boolean jj_scan_token(int kind) {
3718 if (jj_scanpos == jj_lastpos) {
3719 jj_la--;
3720 if (jj_scanpos.next == null) {
3721 jj_lastpos = jj_scanpos = jj_scanpos.next = token_source
3722 .getNextToken();
3723 } else {
3724 jj_lastpos = jj_scanpos = jj_scanpos.next;
3725 }
3726 } else {
3727 jj_scanpos = jj_scanpos.next;
3728 }
3729 if (jj_rescan) {
3730 int i = 0;
3731 Token tok = token;
3732 while (tok != null && tok != jj_scanpos) {
3733 i++;
3734 tok = tok.next;
3735 }
3736 if (tok != null) {
3737 jj_add_error_token(kind, i);
3738 }
3739 }
3740 return (jj_scanpos.kind != kind);
3741 }
3742
3743 final public Token getNextToken() {
3744 if (token.next != null) {
3745 token = token.next;
3746 } else {
3747 token = token.next = token_source.getNextToken();
3748 }
3749 jj_ntk = -1;
3750 jj_gen++;
3751 return token;
3752 }
3753
3754 final public Token getToken(int index) {
3755 Token t = lookingAhead ? jj_scanpos : token;
3756 for (int i = 0; i < index; i++) {
3757 if (t.next != null) {
3758 t = t.next;
3759 } else {
3760 t = t.next = token_source.getNextToken();
3761 }
3762 }
3763 return t;
3764 }
3765
3766 final private int jj_ntk() {
3767 if ((jj_nt = token.next) == null) {
3768 return (jj_ntk = (token.next=token_source.getNextToken()).kind);
3769 } else {
3770 return (jj_ntk = jj_nt.kind);
3771 }
3772 }
3773
3774 private java.util.Vector<int[]> jj_expentries = new java.util.Vector<int[]>();
3775 private int[] jj_expentry;
3776 private int jj_kind = -1;
3777 private int[] jj_lasttokens = new int[100];
3778 private int jj_endpos;
3779
3780 private void jj_add_error_token(int kind, int pos) {
3781 if (pos >= 100) {
3782 return;
3783 }
3784 if (pos == jj_endpos + 1) {
3785 jj_lasttokens[jj_endpos++] = kind;
3786 } else if (jj_endpos != 0) {
3787 jj_expentry = new int[jj_endpos];
3788 for (int i = 0; i < jj_endpos; i++) {
3789 jj_expentry[i] = jj_lasttokens[i];
3790 }
3791 boolean exists = false;
3792 for (java.util.Enumeration<int[]> enum_ = jj_expentries.elements(); enum_
3793 .hasMoreElements();) {
3794 int[] oldentry = (enum_.nextElement());
3795 if (oldentry.length == jj_expentry.length) {
3796 exists = true;
3797 for (int i = 0; i < jj_expentry.length; i++) {
3798 if (oldentry[i] != jj_expentry[i]) {
3799 exists = false;
3800 break;
3801 }
3802 }
3803 if (exists) {
3804 break;
3805 }
3806 }
3807 }
3808 if (!exists) {
3809 jj_expentries.addElement(jj_expentry);
3810 }
3811 if (pos != 0) {
3812 jj_lasttokens[(jj_endpos = pos) - 1] = kind;
3813 }
3814 }
3815 }
3816
3817 final public ParseException generateParseException() {
3818 jj_expentries.removeAllElements();
3819 boolean[] la1tokens = new boolean[116];
3820 for (int i = 0; i < 116; i++) {
3821 la1tokens[i] = false;
3822 }
3823 if (jj_kind >= 0) {
3824 la1tokens[jj_kind] = true;
3825 jj_kind = -1;
3826 }
3827 for (int i = 0; i < 44; i++) {
3828 if (jj_la1[i] == jj_gen) {
3829 for (int j = 0; j < 32; j++) {
3830 if ((jj_la1_0[i] & (1<<j)) != 0) {
3831 la1tokens[j] = true;
3832 }
3833 if ((jj_la1_1[i] & (1<<j)) != 0) {
3834 la1tokens[32+j] = true;
3835 }
3836 if ((jj_la1_2[i] & (1<<j)) != 0) {
3837 la1tokens[64+j] = true;
3838 }
3839 if ((jj_la1_3[i] & (1<<j)) != 0) {
3840 la1tokens[96+j] = true;
3841 }
3842 }
3843 }
3844 }
3845 for (int i = 0; i < 116; i++) {
3846 if (la1tokens[i]) {
3847 jj_expentry = new int[1];
3848 jj_expentry[0] = i;
3849 jj_expentries.addElement(jj_expentry);
3850 }
3851 }
3852 jj_endpos = 0;
3853 jj_rescan_token();
3854 jj_add_error_token(0, 0);
3855 int[][] exptokseq = new int[jj_expentries.size()][];
3856 for (int i = 0; i < jj_expentries.size(); i++) {
3857 exptokseq[i] = jj_expentries.elementAt(i);
3858 }
3859 return new ParseException(token, exptokseq, tokenImage);
3860 }
3861
3862 final public void enable_tracing() {
3863 }
3864
3865 final public void disable_tracing() {
3866 }
3867
3868 final private void jj_rescan_token() {
3869 jj_rescan = true;
3870 for (int i = 0; i < 9; i++) {
3871 JJExpressionParserCalls p = jj_2_rtns[i];
3872 do {
3873 if (p.gen > jj_gen) {
3874 jj_la = p.arg;
3875 jj_lastpos = jj_scanpos = p.first;
3876 switch (i) {
3877 case 0:
3878 jj_3_1();
3879 break;
3880 case 1:
3881 jj_3_2();
3882 break;
3883 case 2:
3884 jj_3_3();
3885 break;
3886 case 3:
3887 jj_3_4();
3888 break;
3889 case 4:
3890 jj_3_5();
3891 break;
3892 case 5:
3893 jj_3_6();
3894 break;
3895 case 6:
3896 jj_3_7();
3897 break;
3898 case 7:
3899 jj_3_8();
3900 break;
3901 case 8:
3902 jj_3_9();
3903 break;
3904 }
3905 }
3906 p = p.next;
3907 } while (p != null);
3908 }
3909 jj_rescan = false;
3910 }
3911
3912 final private void jj_save(int index, int xla) {
3913 JJExpressionParserCalls p = jj_2_rtns[index];
3914 while (p.gen > jj_gen) {
3915 if (p.next == null) {
3916 p = p.next = new JJExpressionParserCalls();
3917 break;
3918 }
3919 p = p.next;
3920 }
3921 p.gen = jj_gen + xla - jj_la;
3922 p.first = token;
3923 p.arg = xla;
3924 }
3925
3926}
3927
3928final class JJExpressionParserCalls {
3929 int gen;
3930 Token first;
3931 int arg;
3932 JJExpressionParserCalls next;
3933}
java/pkg/com/sun/tools/example/debug/expr/ExpressionParserConstants.java+264−0
@@ -0,0 +1,264 @@
1/*
2 * Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26/* Generated By:JavaCC: Do not edit this line. ExpressionParserConstants.java */
27package com.sun.tools.example.debug.expr;
28
29public interface ExpressionParserConstants {
30
31 int EOF = 0;
32 int SINGLE_LINE_COMMENT = 6;
33 int FORMAL_COMMENT = 7;
34 int MULTI_LINE_COMMENT = 8;
35 int ABSTRACT = 9;
36 int BOOLEAN = 10;
37 int BREAK = 11;
38 int BYTE = 12;
39 int CASE = 13;
40 int CATCH = 14;
41 int CHAR = 15;
42 int CLASS = 16;
43 int CONST = 17;
44 int CONTINUE = 18;
45 int _DEFAULT = 19;
46 int DO = 20;
47 int DOUBLE = 21;
48 int ELSE = 22;
49 int EXTENDS = 23;
50 int FALSE = 24;
51 int FINAL = 25;
52 int FINALLY = 26;
53 int FLOAT = 27;
54 int FOR = 28;
55 int GOTO = 29;
56 int IF = 30;
57 int IMPLEMENTS = 31;
58 int IMPORT = 32;
59 int INSTANCEOF = 33;
60 int INT = 34;
61 int INTERFACE = 35;
62 int LONG = 36;
63 int NATIVE = 37;
64 int NEW = 38;
65 int NULL = 39;
66 int PACKAGE = 40;
67 int PRIVATE = 41;
68 int PROTECTED = 42;
69 int PUBLIC = 43;
70 int RETURN = 44;
71 int SHORT = 45;
72 int STATIC = 46;
73 int SUPER = 47;
74 int SWITCH = 48;
75 int SYNCHRONIZED = 49;
76 int THIS = 50;
77 int THROW = 51;
78 int THROWS = 52;
79 int TRANSIENT = 53;
80 int TRUE = 54;
81 int TRY = 55;
82 int VOID = 56;
83 int VOLATILE = 57;
84 int WHILE = 58;
85 int INTEGER_LITERAL = 59;
86 int DECIMAL_LITERAL = 60;
87 int HEX_LITERAL = 61;
88 int OCTAL_LITERAL = 62;
89 int FLOATING_POINT_LITERAL = 63;
90 int EXPONENT = 64;
91 int CHARACTER_LITERAL = 65;
92 int STRING_LITERAL = 66;
93 int IDENTIFIER = 67;
94 int LETTER = 68;
95 int DIGIT = 69;
96 int LPAREN = 70;
97 int RPAREN = 71;
98 int LBRACE = 72;
99 int RBRACE = 73;
100 int LBRACKET = 74;
101 int RBRACKET = 75;
102 int SEMICOLON = 76;
103 int COMMA = 77;
104 int DOT = 78;
105 int ASSIGN = 79;
106 int GT = 80;
107 int LT = 81;
108 int BANG = 82;
109 int TILDE = 83;
110 int HOOK = 84;
111 int COLON = 85;
112 int EQ = 86;
113 int LE = 87;
114 int GE = 88;
115 int NE = 89;
116 int SC_OR = 90;
117 int SC_AND = 91;
118 int INCR = 92;
119 int DECR = 93;
120 int PLUS = 94;
121 int MINUS = 95;
122 int STAR = 96;
123 int SLASH = 97;
124 int BIT_AND = 98;
125 int BIT_OR = 99;
126 int XOR = 100;
127 int REM = 101;
128 int LSHIFT = 102;
129 int RSIGNEDSHIFT = 103;
130 int RUNSIGNEDSHIFT = 104;
131 int PLUSASSIGN = 105;
132 int MINUSASSIGN = 106;
133 int STARASSIGN = 107;
134 int SLASHASSIGN = 108;
135 int ANDASSIGN = 109;
136 int ORASSIGN = 110;
137 int XORASSIGN = 111;
138 int REMASSIGN = 112;
139 int LSHIFTASSIGN = 113;
140 int RSIGNEDSHIFTASSIGN = 114;
141 int RUNSIGNEDSHIFTASSIGN = 115;
142
143 int DEFAULT = 0;
144
145 String[] tokenImage = {
146 "<EOF>",
147 "\" \"",
148 "\"\\t\"",
149 "\"\\n\"",
150 "\"\\r\"",
151 "\"\\f\"",
152 "<SINGLE_LINE_COMMENT>",
153 "<FORMAL_COMMENT>",
154 "<MULTI_LINE_COMMENT>",
155 "\"abstract\"",
156 "\"boolean\"",
157 "\"break\"",
158 "\"byte\"",
159 "\"case\"",
160 "\"catch\"",
161 "\"char\"",
162 "\"class\"",
163 "\"const\"",
164 "\"continue\"",
165 "\"default\"",
166 "\"do\"",
167 "\"double\"",
168 "\"else\"",
169 "\"extends\"",
170 "\"false\"",
171 "\"final\"",
172 "\"finally\"",
173 "\"float\"",
174 "\"for\"",
175 "\"goto\"",
176 "\"if\"",
177 "\"implements\"",
178 "\"import\"",
179 "\"instanceof\"",
180 "\"int\"",
181 "\"interface\"",
182 "\"long\"",
183 "\"native\"",
184 "\"new\"",
185 "\"null\"",
186 "\"package\"",
187 "\"private\"",
188 "\"protected\"",
189 "\"public\"",
190 "\"return\"",
191 "\"short\"",
192 "\"static\"",
193 "\"super\"",
194 "\"switch\"",
195 "\"synchronized\"",
196 "\"this\"",
197 "\"throw\"",
198 "\"throws\"",
199 "\"transient\"",
200 "\"true\"",
201 "\"try\"",
202 "\"void\"",
203 "\"volatile\"",
204 "\"while\"",
205 "<INTEGER_LITERAL>",
206 "<DECIMAL_LITERAL>",
207 "<HEX_LITERAL>",
208 "<OCTAL_LITERAL>",
209 "<FLOATING_POINT_LITERAL>",
210 "<EXPONENT>",
211 "<CHARACTER_LITERAL>",
212 "<STRING_LITERAL>",
213 "<IDENTIFIER>",
214 "<LETTER>",
215 "<DIGIT>",
216 "\"(\"",
217 "\")\"",
218 "\"{\"",
219 "\"}\"",
220 "\"[\"",
221 "\"]\"",
222 "\";\"",
223 "\",\"",
224 "\".\"",
225 "\"=\"",
226 "\">\"",
227 "\"<\"",
228 "\"!\"",
229 "\"~\"",
230 "\"?\"",
231 "\":\"",
232 "\"==\"",
233 "\"<=\"",
234 "\">=\"",
235 "\"!=\"",
236 "\"||\"",
237 "\"&&\"",
238 "\"++\"",
239 "\"--\"",
240 "\"+\"",
241 "\"-\"",
242 "\"*\"",
243 "\"/\"",
244 "\"&\"",
245 "\"|\"",
246 "\"^\"",
247 "\"%\"",
248 "\"<<\"",
249 "\">>\"",
250 "\">>>\"",
251 "\"+=\"",
252 "\"-=\"",
253 "\"*=\"",
254 "\"/=\"",
255 "\"&=\"",
256 "\"|=\"",
257 "\"^=\"",
258 "\"%=\"",
259 "\"<<=\"",
260 "\">>=\"",
261 "\">>>=\"",
262 };
263
264}
java/pkg/com/sun/tools/example/debug/expr/ExpressionParserTokenManager.java+1757−0
@@ -0,0 +1,1757 @@
1/*
2 * Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26/* Generated By:JavaCC: Do not edit this line. ExpressionParserTokenManager.java */
27package com.sun.tools.example.debug.expr;
28
29public class ExpressionParserTokenManager implements ExpressionParserConstants
30{
31private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1)
32{
33 switch (pos)
34 {
35 case 0:
36 if ((active1 & 0x4000L) != 0L) {
37 return 4;
38 }
39 if ((active0 & 0x7fffffffffffe00L) != 0L)
40 {
41 jjmatchedKind = 67;
42 return 28;
43 }
44 if ((active1 & 0x100200000000L) != 0L) {
45 return 49;
46 }
47 return -1;
48 case 1:
49 if ((active0 & 0x7ffffffbfcffe00L) != 0L)
50 {
51 if (jjmatchedPos != 1)
52 {
53 jjmatchedKind = 67;
54 jjmatchedPos = 1;
55 }
56 return 28;
57 }
58 if ((active0 & 0x40300000L) != 0L) {
59 return 28;
60 }
61 return -1;
62 case 2:
63 if ((active0 & 0x77fffb3afeffe00L) != 0L)
64 {
65 if (jjmatchedPos != 2)
66 {
67 jjmatchedKind = 67;
68 jjmatchedPos = 2;
69 }
70 return 28;
71 }
72 if ((active0 & 0x80004c10000000L) != 0L) {
73 return 28;
74 }
75 return -1;
76 case 3:
77 if ((active0 & 0x63bff2b8faf4e00L) != 0L)
78 {
79 jjmatchedKind = 67;
80 jjmatchedPos = 3;
81 return 28;
82 }
83 if ((active0 & 0x14400902040b000L) != 0L) {
84 return 28;
85 }
86 return -1;
87 case 4:
88 if ((active0 & 0x2235f2b80ac0600L) != 0L)
89 {
90 if (jjmatchedPos != 4)
91 {
92 jjmatchedKind = 67;
93 jjmatchedPos = 4;
94 }
95 return 28;
96 }
97 if ((active0 & 0x418a0000f034800L) != 0L) {
98 return 28;
99 }
100 return -1;
101 case 5:
102 if ((active0 & 0x222070a848c0600L) != 0L)
103 {
104 jjmatchedKind = 67;
105 jjmatchedPos = 5;
106 return 28;
107 }
108 if ((active0 & 0x11582100200000L) != 0L) {
109 return 28;
110 }
111 return -1;
112 case 6:
113 if ((active0 & 0x222040a80040200L) != 0L)
114 {
115 jjmatchedKind = 67;
116 jjmatchedPos = 6;
117 return 28;
118 }
119 if ((active0 & 0x30004880400L) != 0L) {
120 return 28;
121 }
122 return -1;
123 case 7:
124 if ((active0 & 0x22040a80000000L) != 0L)
125 {
126 jjmatchedKind = 67;
127 jjmatchedPos = 7;
128 return 28;
129 }
130 if ((active0 & 0x200000000040200L) != 0L) {
131 return 28;
132 }
133 return -1;
134 case 8:
135 if ((active0 & 0x2000280000000L) != 0L)
136 {
137 jjmatchedKind = 67;
138 jjmatchedPos = 8;
139 return 28;
140 }
141 if ((active0 & 0x20040800000000L) != 0L) {
142 return 28;
143 }
144 return -1;
145 case 9:
146 if ((active0 & 0x2000000000000L) != 0L)
147 {
148 jjmatchedKind = 67;
149 jjmatchedPos = 9;
150 return 28;
151 }
152 if ((active0 & 0x280000000L) != 0L) {
153 return 28;
154 }
155 return -1;
156 case 10:
157 if ((active0 & 0x2000000000000L) != 0L)
158 {
159 jjmatchedKind = 67;
160 jjmatchedPos = 10;
161 return 28;
162 }
163 return -1;
164 default :
165 return -1;
166 }
167}
168private final int jjStartNfa_0(int pos, long active0, long active1)
169{
170 return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0, active1), pos + 1);
171}
172private final int jjStopAtPos(int pos, int kind)
173{
174 jjmatchedKind = kind;
175 jjmatchedPos = pos;
176 return pos + 1;
177}
178private final int jjStartNfaWithStates_0(int pos, int kind, int state)
179{
180 jjmatchedKind = kind;
181 jjmatchedPos = pos;
182 try { curChar = input_stream.readChar(); }
183 catch(java.io.IOException e) { return pos + 1; }
184 return jjMoveNfa_0(state, pos + 1);
185}
186private final int jjMoveStringLiteralDfa0_0()
187{
188 switch(curChar)
189 {
190 case 33:
191 jjmatchedKind = 82;
192 return jjMoveStringLiteralDfa1_0(0x0L, 0x2000000L);
193 case 37:
194 jjmatchedKind = 101;
195 return jjMoveStringLiteralDfa1_0(0x0L, 0x1000000000000L);
196 case 38:
197 jjmatchedKind = 98;
198 return jjMoveStringLiteralDfa1_0(0x0L, 0x200008000000L);
199 case 40:
200 return jjStopAtPos(0, 70);
201 case 41:
202 return jjStopAtPos(0, 71);
203 case 42:
204 jjmatchedKind = 96;
205 return jjMoveStringLiteralDfa1_0(0x0L, 0x80000000000L);
206 case 43:
207 jjmatchedKind = 94;
208 return jjMoveStringLiteralDfa1_0(0x0L, 0x20010000000L);
209 case 44:
210 return jjStopAtPos(0, 77);
211 case 45:
212 jjmatchedKind = 95;
213 return jjMoveStringLiteralDfa1_0(0x0L, 0x40020000000L);
214 case 46:
215 return jjStartNfaWithStates_0(0, 78, 4);
216 case 47:
217 jjmatchedKind = 97;
218 return jjMoveStringLiteralDfa1_0(0x0L, 0x100000000000L);
219 case 58:
220 return jjStopAtPos(0, 85);
221 case 59:
222 return jjStopAtPos(0, 76);
223 case 60:
224 jjmatchedKind = 81;
225 return jjMoveStringLiteralDfa1_0(0x0L, 0x2004000800000L);
226 case 61:
227 jjmatchedKind = 79;
228 return jjMoveStringLiteralDfa1_0(0x0L, 0x400000L);
229 case 62:
230 jjmatchedKind = 80;
231 return jjMoveStringLiteralDfa1_0(0x0L, 0xc018001000000L);
232 case 63:
233 return jjStopAtPos(0, 84);
234 case 91:
235 return jjStopAtPos(0, 74);
236 case 93:
237 return jjStopAtPos(0, 75);
238 case 94:
239 jjmatchedKind = 100;
240 return jjMoveStringLiteralDfa1_0(0x0L, 0x800000000000L);
241 case 97:
242 return jjMoveStringLiteralDfa1_0(0x200L, 0x0L);
243 case 98:
244 return jjMoveStringLiteralDfa1_0(0x1c00L, 0x0L);
245 case 99:
246 return jjMoveStringLiteralDfa1_0(0x7e000L, 0x0L);
247 case 100:
248 return jjMoveStringLiteralDfa1_0(0x380000L, 0x0L);
249 case 101:
250 return jjMoveStringLiteralDfa1_0(0xc00000L, 0x0L);
251 case 102:
252 return jjMoveStringLiteralDfa1_0(0x1f000000L, 0x0L);
253 case 103:
254 return jjMoveStringLiteralDfa1_0(0x20000000L, 0x0L);
255 case 105:
256 return jjMoveStringLiteralDfa1_0(0xfc0000000L, 0x0L);
257 case 108:
258 return jjMoveStringLiteralDfa1_0(0x1000000000L, 0x0L);
259 case 110:
260 return jjMoveStringLiteralDfa1_0(0xe000000000L, 0x0L);
261 case 112:
262 return jjMoveStringLiteralDfa1_0(0xf0000000000L, 0x0L);
263 case 114:
264 return jjMoveStringLiteralDfa1_0(0x100000000000L, 0x0L);
265 case 115:
266 return jjMoveStringLiteralDfa1_0(0x3e00000000000L, 0x0L);
267 case 116:
268 return jjMoveStringLiteralDfa1_0(0xfc000000000000L, 0x0L);
269 case 118:
270 return jjMoveStringLiteralDfa1_0(0x300000000000000L, 0x0L);
271 case 119:
272 return jjMoveStringLiteralDfa1_0(0x400000000000000L, 0x0L);
273 case 123:
274 return jjStopAtPos(0, 72);
275 case 124:
276 jjmatchedKind = 99;
277 return jjMoveStringLiteralDfa1_0(0x0L, 0x400004000000L);
278 case 125:
279 return jjStopAtPos(0, 73);
280 case 126:
281 return jjStopAtPos(0, 83);
282 default :
283 return jjMoveNfa_0(0, 0);
284 }
285}
286private final int jjMoveStringLiteralDfa1_0(long active0, long active1)
287{
288 try { curChar = input_stream.readChar(); }
289 catch(java.io.IOException e) {
290 jjStopStringLiteralDfa_0(0, active0, active1);
291 return 1;
292 }
293 switch(curChar)
294 {
295 case 38:
296 if ((active1 & 0x8000000L) != 0L) {
297 return jjStopAtPos(1, 91);
298 }
299 break;
300 case 43:
301 if ((active1 & 0x10000000L) != 0L) {
302 return jjStopAtPos(1, 92);
303 }
304 break;
305 case 45:
306 if ((active1 & 0x20000000L) != 0L) {
307 return jjStopAtPos(1, 93);
308 }
309 break;
310 case 60:
311 if ((active1 & 0x4000000000L) != 0L)
312 {
313 jjmatchedKind = 102;
314 jjmatchedPos = 1;
315 }
316 return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x2000000000000L);
317 case 61:
318 if ((active1 & 0x400000L) != 0L) {
319 return jjStopAtPos(1, 86);
320 } else if ((active1 & 0x800000L) != 0L) {
321 return jjStopAtPos(1, 87);
322 } else if ((active1 & 0x1000000L) != 0L) {
323 return jjStopAtPos(1, 88);
324 } else if ((active1 & 0x2000000L) != 0L) {
325 return jjStopAtPos(1, 89);
326 } else if ((active1 & 0x20000000000L) != 0L) {
327 return jjStopAtPos(1, 105);
328 } else if ((active1 & 0x40000000000L) != 0L) {
329 return jjStopAtPos(1, 106);
330 } else if ((active1 & 0x80000000000L) != 0L) {
331 return jjStopAtPos(1, 107);
332 } else if ((active1 & 0x100000000000L) != 0L) {
333 return jjStopAtPos(1, 108);
334 } else if ((active1 & 0x200000000000L) != 0L) {
335 return jjStopAtPos(1, 109);
336 } else if ((active1 & 0x400000000000L) != 0L) {
337 return jjStopAtPos(1, 110);
338 } else if ((active1 & 0x800000000000L) != 0L) {
339 return jjStopAtPos(1, 111);
340 } else if ((active1 & 0x1000000000000L) != 0L) {
341 return jjStopAtPos(1, 112);
342 }
343 break;
344 case 62:
345 if ((active1 & 0x8000000000L) != 0L)
346 {
347 jjmatchedKind = 103;
348 jjmatchedPos = 1;
349 }
350 return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0xc010000000000L);
351 case 97:
352 return jjMoveStringLiteralDfa2_0(active0, 0x12001006000L, active1, 0L);
353 case 98:
354 return jjMoveStringLiteralDfa2_0(active0, 0x200L, active1, 0L);
355 case 101:
356 return jjMoveStringLiteralDfa2_0(active0, 0x104000080000L, active1, 0L);
357 case 102:
358 if ((active0 & 0x40000000L) != 0L) {
359 return jjStartNfaWithStates_0(1, 30, 28);
360 }
361 break;
362 case 104:
363 return jjMoveStringLiteralDfa2_0(active0, 0x41c200000008000L, active1, 0L);
364 case 105:
365 return jjMoveStringLiteralDfa2_0(active0, 0x6000000L, active1, 0L);
366 case 108:
367 return jjMoveStringLiteralDfa2_0(active0, 0x8410000L, active1, 0L);
368 case 109:
369 return jjMoveStringLiteralDfa2_0(active0, 0x180000000L, active1, 0L);
370 case 110:
371 return jjMoveStringLiteralDfa2_0(active0, 0xe00000000L, active1, 0L);
372 case 111:
373 if ((active0 & 0x100000L) != 0L)
374 {
375 jjmatchedKind = 20;
376 jjmatchedPos = 1;
377 }
378 return jjMoveStringLiteralDfa2_0(active0, 0x300001030260400L, active1, 0L);
379 case 114:
380 return jjMoveStringLiteralDfa2_0(active0, 0xe0060000000800L, active1, 0L);
381 case 116:
382 return jjMoveStringLiteralDfa2_0(active0, 0x400000000000L, active1, 0L);
383 case 117:
384 return jjMoveStringLiteralDfa2_0(active0, 0x888000000000L, active1, 0L);
385 case 119:
386 return jjMoveStringLiteralDfa2_0(active0, 0x1000000000000L, active1, 0L);
387 case 120:
388 return jjMoveStringLiteralDfa2_0(active0, 0x800000L, active1, 0L);
389 case 121:
390 return jjMoveStringLiteralDfa2_0(active0, 0x2000000001000L, active1, 0L);
391 case 124:
392 if ((active1 & 0x4000000L) != 0L) {
393 return jjStopAtPos(1, 90);
394 }
395 break;
396 default :
397 break;
398 }
399 return jjStartNfa_0(0, active0, active1);
400}
401private final int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long active1)
402{
403 if (((active0 &= old0) | (active1 &= old1)) == 0L) {
404 return jjStartNfa_0(0, old0, old1);
405 }
406 try { curChar = input_stream.readChar(); }
407 catch(java.io.IOException e) {
408 jjStopStringLiteralDfa_0(1, active0, active1);
409 return 2;
410 }
411 switch(curChar)
412 {
413 case 61:
414 if ((active1 & 0x2000000000000L) != 0L) {
415 return jjStopAtPos(2, 113);
416 } else if ((active1 & 0x4000000000000L) != 0L) {
417 return jjStopAtPos(2, 114);
418 }
419 break;
420 case 62:
421 if ((active1 & 0x10000000000L) != 0L)
422 {
423 jjmatchedKind = 104;
424 jjmatchedPos = 2;
425 }
426 return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x8000000000000L);
427 case 97:
428 return jjMoveStringLiteralDfa3_0(active0, 0x20400000018000L, active1, 0L);
429 case 98:
430 return jjMoveStringLiteralDfa3_0(active0, 0x80000000000L, active1, 0L);
431 case 99:
432 return jjMoveStringLiteralDfa3_0(active0, 0x10000000000L, active1, 0L);
433 case 101:
434 return jjMoveStringLiteralDfa3_0(active0, 0x800L, active1, 0L);
435 case 102:
436 return jjMoveStringLiteralDfa3_0(active0, 0x80000L, active1, 0L);
437 case 105:
438 return jjMoveStringLiteralDfa3_0(active0, 0x505020000000000L, active1, 0L);
439 case 108:
440 return jjMoveStringLiteralDfa3_0(active0, 0x200008001000000L, active1, 0L);
441 case 110:
442 return jjMoveStringLiteralDfa3_0(active0, 0x2001006060000L, active1, 0L);
443 case 111:
444 return jjMoveStringLiteralDfa3_0(active0, 0x240008000400L, active1, 0L);
445 case 112:
446 return jjMoveStringLiteralDfa3_0(active0, 0x800180000000L, active1, 0L);
447 case 114:
448 if ((active0 & 0x10000000L) != 0L) {
449 return jjStartNfaWithStates_0(2, 28, 28);
450 }
451 return jjMoveStringLiteralDfa3_0(active0, 0x18000000000000L, active1, 0L);
452 case 115:
453 return jjMoveStringLiteralDfa3_0(active0, 0x200402200L, active1, 0L);
454 case 116:
455 if ((active0 & 0x400000000L) != 0L)
456 {
457 jjmatchedKind = 34;
458 jjmatchedPos = 2;
459 }
460 return jjMoveStringLiteralDfa3_0(active0, 0x102820805000L, active1, 0L);
461 case 117:
462 return jjMoveStringLiteralDfa3_0(active0, 0x40000000200000L, active1, 0L);
463 case 119:
464 if ((active0 & 0x4000000000L) != 0L) {
465 return jjStartNfaWithStates_0(2, 38, 28);
466 }
467 break;
468 case 121:
469 if ((active0 & 0x80000000000000L) != 0L) {
470 return jjStartNfaWithStates_0(2, 55, 28);
471 }
472 break;
473 default :
474 break;
475 }
476 return jjStartNfa_0(1, active0, active1);
477}
478private final int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long active1)
479{
480 if (((active0 &= old0) | (active1 &= old1)) == 0L) {
481 return jjStartNfa_0(1, old0, old1);
482 }
483 try { curChar = input_stream.readChar(); }
484 catch(java.io.IOException e) {
485 jjStopStringLiteralDfa_0(2, active0, active1);
486 return 3;
487 }
488 switch(curChar)
489 {
490 case 61:
491 if ((active1 & 0x8000000000000L) != 0L) {
492 return jjStopAtPos(3, 115);
493 }
494 break;
495 case 97:
496 return jjMoveStringLiteralDfa4_0(active0, 0x20000000e080800L, active1, 0L);
497 case 98:
498 return jjMoveStringLiteralDfa4_0(active0, 0x200000L, active1, 0L);
499 case 99:
500 return jjMoveStringLiteralDfa4_0(active0, 0x2000000004000L, active1, 0L);
501 case 100:
502 if ((active0 & 0x100000000000000L) != 0L) {
503 return jjStartNfaWithStates_0(3, 56, 28);
504 }
505 break;
506 case 101:
507 if ((active0 & 0x1000L) != 0L) {
508 return jjStartNfaWithStates_0(3, 12, 28);
509 } else if ((active0 & 0x2000L) != 0L) {
510 return jjStartNfaWithStates_0(3, 13, 28);
511 } else if ((active0 & 0x400000L) != 0L) {
512 return jjStartNfaWithStates_0(3, 22, 28);
513 } else if ((active0 & 0x40000000000000L) != 0L) {
514 return jjStartNfaWithStates_0(3, 54, 28);
515 }
516 return jjMoveStringLiteralDfa4_0(active0, 0x800800800000L, active1, 0L);
517 case 103:
518 if ((active0 & 0x1000000000L) != 0L) {
519 return jjStartNfaWithStates_0(3, 36, 28);
520 }
521 break;
522 case 105:
523 return jjMoveStringLiteralDfa4_0(active0, 0x2000000000L, active1, 0L);
524 case 107:
525 return jjMoveStringLiteralDfa4_0(active0, 0x10000000000L, active1, 0L);
526 case 108:
527 if ((active0 & 0x8000000000L) != 0L) {
528 return jjStartNfaWithStates_0(3, 39, 28);
529 }
530 return jjMoveStringLiteralDfa4_0(active0, 0x400080080000400L, active1, 0L);
531 case 110:
532 return jjMoveStringLiteralDfa4_0(active0, 0x20000000000000L, active1, 0L);
533 case 111:
534 if ((active0 & 0x20000000L) != 0L) {
535 return jjStartNfaWithStates_0(3, 29, 28);
536 }
537 return jjMoveStringLiteralDfa4_0(active0, 0x18000100000000L, active1, 0L);
538 case 114:
539 if ((active0 & 0x8000L) != 0L) {
540 return jjStartNfaWithStates_0(3, 15, 28);
541 }
542 return jjMoveStringLiteralDfa4_0(active0, 0x200000000000L, active1, 0L);
543 case 115:
544 if ((active0 & 0x4000000000000L) != 0L) {
545 return jjStartNfaWithStates_0(3, 50, 28);
546 }
547 return jjMoveStringLiteralDfa4_0(active0, 0x1030000L, active1, 0L);
548 case 116:
549 return jjMoveStringLiteralDfa4_0(active0, 0x1440200040200L, active1, 0L);
550 case 117:
551 return jjMoveStringLiteralDfa4_0(active0, 0x100000000000L, active1, 0L);
552 case 118:
553 return jjMoveStringLiteralDfa4_0(active0, 0x20000000000L, active1, 0L);
554 default :
555 break;
556 }
557 return jjStartNfa_0(2, active0, active1);
558}
559private final int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, long active1)
560{
561 if (((active0 &= old0) | (active1 &= old1)) == 0L) {
562 return jjStartNfa_0(2, old0, old1);
563 }
564 try { curChar = input_stream.readChar(); }
565 catch(java.io.IOException e) {
566 jjStopStringLiteralDfa_0(3, active0, 0L);
567 return 4;
568 }
569 switch(curChar)
570 {
571 case 97:
572 return jjMoveStringLiteralDfa5_0(active0, 0x30200000000L);
573 case 99:
574 return jjMoveStringLiteralDfa5_0(active0, 0x1000000000000L);
575 case 101:
576 if ((active0 & 0x1000000L) != 0L) {
577 return jjStartNfaWithStates_0(4, 24, 28);
578 } else if ((active0 & 0x400000000000000L) != 0L) {
579 return jjStartNfaWithStates_0(4, 58, 28);
580 }
581 return jjMoveStringLiteralDfa5_0(active0, 0x40080000400L);
582 case 104:
583 if ((active0 & 0x4000L) != 0L) {
584 return jjStartNfaWithStates_0(4, 14, 28);
585 }
586 return jjMoveStringLiteralDfa5_0(active0, 0x2000000000000L);
587 case 105:
588 return jjMoveStringLiteralDfa5_0(active0, 0x480000040000L);
589 case 107:
590 if ((active0 & 0x800L) != 0L) {
591 return jjStartNfaWithStates_0(4, 11, 28);
592 }
593 break;
594 case 108:
595 if ((active0 & 0x2000000L) != 0L)
596 {
597 jjmatchedKind = 25;
598 jjmatchedPos = 4;
599 }
600 return jjMoveStringLiteralDfa5_0(active0, 0x4200000L);
601 case 110:
602 return jjMoveStringLiteralDfa5_0(active0, 0x800000L);
603 case 114:
604 if ((active0 & 0x800000000000L) != 0L) {
605 return jjStartNfaWithStates_0(4, 47, 28);
606 }
607 return jjMoveStringLiteralDfa5_0(active0, 0x100900000200L);
608 case 115:
609 if ((active0 & 0x10000L) != 0L) {
610 return jjStartNfaWithStates_0(4, 16, 28);
611 }
612 return jjMoveStringLiteralDfa5_0(active0, 0x20000000000000L);
613 case 116:
614 if ((active0 & 0x20000L) != 0L) {
615 return jjStartNfaWithStates_0(4, 17, 28);
616 } else if ((active0 & 0x8000000L) != 0L) {
617 return jjStartNfaWithStates_0(4, 27, 28);
618 } else if ((active0 & 0x200000000000L) != 0L) {
619 return jjStartNfaWithStates_0(4, 45, 28);
620 }
621 return jjMoveStringLiteralDfa5_0(active0, 0x200000000000000L);
622 case 117:
623 return jjMoveStringLiteralDfa5_0(active0, 0x80000L);
624 case 118:
625 return jjMoveStringLiteralDfa5_0(active0, 0x2000000000L);
626 case 119:
627 if ((active0 & 0x8000000000000L) != 0L)
628 {
629 jjmatchedKind = 51;
630 jjmatchedPos = 4;
631 }
632 return jjMoveStringLiteralDfa5_0(active0, 0x10000000000000L);
633 default :
634 break;
635 }
636 return jjStartNfa_0(3, active0, 0L);
637}
638private final int jjMoveStringLiteralDfa5_0(long old0, long active0)
639{
640 if (((active0 &= old0)) == 0L) {
641 return jjStartNfa_0(3, old0, 0L);
642 }
643 try { curChar = input_stream.readChar(); }
644 catch(java.io.IOException e) {
645 jjStopStringLiteralDfa_0(4, active0, 0L);
646 return 5;
647 }
648 switch(curChar)
649 {
650 case 97:
651 return jjMoveStringLiteralDfa6_0(active0, 0x600L);
652 case 99:
653 if ((active0 & 0x80000000000L) != 0L) {
654 return jjStartNfaWithStates_0(5, 43, 28);
655 } else if ((active0 & 0x400000000000L) != 0L) {
656 return jjStartNfaWithStates_0(5, 46, 28);
657 }
658 return jjMoveStringLiteralDfa6_0(active0, 0x40000000000L);
659 case 100:
660 return jjMoveStringLiteralDfa6_0(active0, 0x800000L);
661 case 101:
662 if ((active0 & 0x200000L) != 0L) {
663 return jjStartNfaWithStates_0(5, 21, 28);
664 } else if ((active0 & 0x2000000000L) != 0L) {
665 return jjStartNfaWithStates_0(5, 37, 28);
666 }
667 break;
668 case 102:
669 return jjMoveStringLiteralDfa6_0(active0, 0x800000000L);
670 case 103:
671 return jjMoveStringLiteralDfa6_0(active0, 0x10000000000L);
672 case 104:
673 if ((active0 & 0x1000000000000L) != 0L) {
674 return jjStartNfaWithStates_0(5, 48, 28);
675 }
676 break;
677 case 105:
678 return jjMoveStringLiteralDfa6_0(active0, 0x220000000000000L);
679 case 108:
680 return jjMoveStringLiteralDfa6_0(active0, 0x4080000L);
681 case 109:
682 return jjMoveStringLiteralDfa6_0(active0, 0x80000000L);
683 case 110:
684 if ((active0 & 0x100000000000L) != 0L) {
685 return jjStartNfaWithStates_0(5, 44, 28);
686 }
687 return jjMoveStringLiteralDfa6_0(active0, 0x200040000L);
688 case 114:
689 return jjMoveStringLiteralDfa6_0(active0, 0x2000000000000L);
690 case 115:
691 if ((active0 & 0x10000000000000L) != 0L) {
692 return jjStartNfaWithStates_0(5, 52, 28);
693 }
694 break;
695 case 116:
696 if ((active0 & 0x100000000L) != 0L) {
697 return jjStartNfaWithStates_0(5, 32, 28);
698 }
699 return jjMoveStringLiteralDfa6_0(active0, 0x20000000000L);
700 default :
701 break;
702 }
703 return jjStartNfa_0(4, active0, 0L);
704}
705private final int jjMoveStringLiteralDfa6_0(long old0, long active0)
706{
707 if (((active0 &= old0)) == 0L) {
708 return jjStartNfa_0(4, old0, 0L);
709 }
710 try { curChar = input_stream.readChar(); }
711 catch(java.io.IOException e) {
712 jjStopStringLiteralDfa_0(5, active0, 0L);
713 return 6;
714 }
715 switch(curChar)
716 {
717 case 97:
718 return jjMoveStringLiteralDfa7_0(active0, 0x800000000L);
719 case 99:
720 return jjMoveStringLiteralDfa7_0(active0, 0x200000200L);
721 case 101:
722 if ((active0 & 0x10000000000L) != 0L) {
723 return jjStartNfaWithStates_0(6, 40, 28);
724 } else if ((active0 & 0x20000000000L) != 0L) {
725 return jjStartNfaWithStates_0(6, 41, 28);
726 }
727 return jjMoveStringLiteralDfa7_0(active0, 0x20000080000000L);
728 case 108:
729 return jjMoveStringLiteralDfa7_0(active0, 0x200000000000000L);
730 case 110:
731 if ((active0 & 0x400L) != 0L) {
732 return jjStartNfaWithStates_0(6, 10, 28);
733 }
734 break;
735 case 111:
736 return jjMoveStringLiteralDfa7_0(active0, 0x2000000000000L);
737 case 115:
738 if ((active0 & 0x800000L) != 0L) {
739 return jjStartNfaWithStates_0(6, 23, 28);
740 }
741 break;
742 case 116:
743 if ((active0 & 0x80000L) != 0L) {
744 return jjStartNfaWithStates_0(6, 19, 28);
745 }
746 return jjMoveStringLiteralDfa7_0(active0, 0x40000000000L);
747 case 117:
748 return jjMoveStringLiteralDfa7_0(active0, 0x40000L);
749 case 121:
750 if ((active0 & 0x4000000L) != 0L) {
751 return jjStartNfaWithStates_0(6, 26, 28);
752 }
753 break;
754 default :
755 break;
756 }
757 return jjStartNfa_0(5, active0, 0L);
758}
759private final int jjMoveStringLiteralDfa7_0(long old0, long active0)
760{
761 if (((active0 &= old0)) == 0L) {
762 return jjStartNfa_0(5, old0, 0L);
763 }
764 try { curChar = input_stream.readChar(); }
765 catch(java.io.IOException e) {
766 jjStopStringLiteralDfa_0(6, active0, 0L);
767 return 7;
768 }
769 switch(curChar)
770 {
771 case 99:
772 return jjMoveStringLiteralDfa8_0(active0, 0x800000000L);
773 case 101:
774 if ((active0 & 0x40000L) != 0L) {
775 return jjStartNfaWithStates_0(7, 18, 28);
776 } else if ((active0 & 0x200000000000000L) != 0L) {
777 return jjStartNfaWithStates_0(7, 57, 28);
778 }
779 return jjMoveStringLiteralDfa8_0(active0, 0x40200000000L);
780 case 110:
781 return jjMoveStringLiteralDfa8_0(active0, 0x22000080000000L);
782 case 116:
783 if ((active0 & 0x200L) != 0L) {
784 return jjStartNfaWithStates_0(7, 9, 28);
785 }
786 break;
787 default :
788 break;
789 }
790 return jjStartNfa_0(6, active0, 0L);
791}
792private final int jjMoveStringLiteralDfa8_0(long old0, long active0)
793{
794 if (((active0 &= old0)) == 0L) {
795 return jjStartNfa_0(6, old0, 0L);
796 }
797 try { curChar = input_stream.readChar(); }
798 catch(java.io.IOException e) {
799 jjStopStringLiteralDfa_0(7, active0, 0L);
800 return 8;
801 }
802 switch(curChar)
803 {
804 case 100:
805 if ((active0 & 0x40000000000L) != 0L) {
806 return jjStartNfaWithStates_0(8, 42, 28);
807 }
808 break;
809 case 101:
810 if ((active0 & 0x800000000L) != 0L) {
811 return jjStartNfaWithStates_0(8, 35, 28);
812 }
813 break;
814 case 105:
815 return jjMoveStringLiteralDfa9_0(active0, 0x2000000000000L);
816 case 111:
817 return jjMoveStringLiteralDfa9_0(active0, 0x200000000L);
818 case 116:
819 if ((active0 & 0x20000000000000L) != 0L) {
820 return jjStartNfaWithStates_0(8, 53, 28);
821 }
822 return jjMoveStringLiteralDfa9_0(active0, 0x80000000L);
823 default :
824 break;
825 }
826 return jjStartNfa_0(7, active0, 0L);
827}
828private final int jjMoveStringLiteralDfa9_0(long old0, long active0)
829{
830 if (((active0 &= old0)) == 0L) {
831 return jjStartNfa_0(7, old0, 0L);
832 }
833 try { curChar = input_stream.readChar(); }
834 catch(java.io.IOException e) {
835 jjStopStringLiteralDfa_0(8, active0, 0L);
836 return 9;
837 }
838 switch(curChar)
839 {
840 case 102:
841 if ((active0 & 0x200000000L) != 0L) {
842 return jjStartNfaWithStates_0(9, 33, 28);
843 }
844 break;
845 case 115:
846 if ((active0 & 0x80000000L) != 0L) {
847 return jjStartNfaWithStates_0(9, 31, 28);
848 }
849 break;
850 case 122:
851 return jjMoveStringLiteralDfa10_0(active0, 0x2000000000000L);
852 default :
853 break;
854 }
855 return jjStartNfa_0(8, active0, 0L);
856}
857private final int jjMoveStringLiteralDfa10_0(long old0, long active0)
858{
859 if (((active0 &= old0)) == 0L) {
860 return jjStartNfa_0(8, old0, 0L);
861 }
862 try { curChar = input_stream.readChar(); }
863 catch(java.io.IOException e) {
864 jjStopStringLiteralDfa_0(9, active0, 0L);
865 return 10;
866 }
867 switch(curChar)
868 {
869 case 101:
870 return jjMoveStringLiteralDfa11_0(active0, 0x2000000000000L);
871 default :
872 break;
873 }
874 return jjStartNfa_0(9, active0, 0L);
875}
876private final int jjMoveStringLiteralDfa11_0(long old0, long active0)
877{
878 if (((active0 &= old0)) == 0L) {
879 return jjStartNfa_0(9, old0, 0L);
880 }
881 try { curChar = input_stream.readChar(); }
882 catch(java.io.IOException e) {
883 jjStopStringLiteralDfa_0(10, active0, 0L);
884 return 11;
885 }
886 switch(curChar)
887 {
888 case 100:
889 if ((active0 & 0x2000000000000L) != 0L) {
890 return jjStartNfaWithStates_0(11, 49, 28);
891 }
892 break;
893 default :
894 break;
895 }
896 return jjStartNfa_0(10, active0, 0L);
897}
898private final void jjCheckNAdd(int state)
899{
900 if (jjrounds[state] != jjround)
901 {
902 jjstateSet[jjnewStateCnt++] = state;
903 jjrounds[state] = jjround;
904 }
905}
906private final void jjAddStates(int start, int end)
907{
908 do {
909 jjstateSet[jjnewStateCnt++] = jjnextStates[start];
910 } while (start++ != end);
911}
912private final void jjCheckNAddTwoStates(int state1, int state2)
913{
914 jjCheckNAdd(state1);
915 jjCheckNAdd(state2);
916}
917private final void jjCheckNAddStates(int start, int end)
918{
919 do {
920 jjCheckNAdd(jjnextStates[start]);
921 } while (start++ != end);
922}
923private final void jjCheckNAddStates(int start)
924{
925 jjCheckNAdd(jjnextStates[start]);
926 jjCheckNAdd(jjnextStates[start + 1]);
927}
928static final long[] jjbitVec0 = {
929 0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL
930};
931static final long[] jjbitVec2 = {
932 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
933};
934static final long[] jjbitVec3 = {
935 0x1ff00000fffffffeL, 0xffffffffffffc000L, 0xffffffffL, 0x600000000000000L
936};
937static final long[] jjbitVec4 = {
938 0x0L, 0x0L, 0x0L, 0xff7fffffff7fffffL
939};
940static final long[] jjbitVec5 = {
941 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL
942};
943static final long[] jjbitVec6 = {
944 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffL, 0x0L
945};
946static final long[] jjbitVec7 = {
947 0xffffffffffffffffL, 0xffffffffffffffffL, 0x0L, 0x0L
948};
949static final long[] jjbitVec8 = {
950 0x3fffffffffffL, 0x0L, 0x0L, 0x0L
951};
952private final int jjMoveNfa_0(int startState, int curPos)
953{
954 int startsAt = 0;
955 jjnewStateCnt = 67;
956 int i = 1;
957 jjstateSet[0] = startState;
958 int kind = 0x7fffffff;
959 for (;;)
960 {
961 if (++jjround == 0x7fffffff) {
962 ReInitRounds();
963 }
964 if (curChar < 64)
965 {
966 long l = 1L << curChar;
967 //MatchLoop
968 do
969 {
970 switch(jjstateSet[--i])
971 {
972 case 0:
973 if ((0x3ff000000000000L & l) != 0L) {
974 jjCheckNAddStates(0, 6);
975 } else if (curChar == 47) {
976 jjAddStates(7, 9);
977 } else if (curChar == 36)
978 {
979 if (kind > 67) {
980 kind = 67;
981 }
982 jjCheckNAdd(28);
983 }
984 else if (curChar == 34) {
985 jjCheckNAddStates(10, 12);
986 } else if (curChar == 39) {
987 jjAddStates(13, 14);
988 } else if (curChar == 46) {
989 jjCheckNAdd(4);
990 }
991 if ((0x3fe000000000000L & l) != 0L)
992 {
993 if (kind > 59) {
994 kind = 59;
995 }
996 jjCheckNAddTwoStates(1, 2);
997 }
998 else if (curChar == 48)
999 {
1000 if (kind > 59) {
1001 kind = 59;
1002 }
1003 jjCheckNAddStates(15, 17);
1004 }
1005 break;
1006 case 49:
1007 if (curChar == 42) {
1008 jjCheckNAddTwoStates(62, 63);
1009 } else if (curChar == 47) {
1010 jjCheckNAddStates(18, 20);
1011 }
1012 if (curChar == 42) {
1013 jjstateSet[jjnewStateCnt++] = 54;
1014 }
1015 break;
1016 case 1:
1017 if ((0x3ff000000000000L & l) == 0L) {
1018 break;
1019 }
1020 if (kind > 59) {
1021 kind = 59;
1022 }
1023 jjCheckNAddTwoStates(1, 2);
1024 break;
1025 case 3:
1026 if (curChar == 46) {
1027 jjCheckNAdd(4);
1028 }
1029 break;
1030 case 4:
1031 if ((0x3ff000000000000L & l) == 0L) {
1032 break;
1033 }
1034 if (kind > 63) {
1035 kind = 63;
1036 }
1037 jjCheckNAddStates(21, 23);
1038 break;
1039 case 6:
1040 if ((0x280000000000L & l) != 0L) {
1041 jjCheckNAdd(7);
1042 }
1043 break;
1044 case 7:
1045 if ((0x3ff000000000000L & l) == 0L) {
1046 break;
1047 }
1048 if (kind > 63) {
1049 kind = 63;
1050 }
1051 jjCheckNAddTwoStates(7, 8);
1052 break;
1053 case 9:
1054 if (curChar == 39) {
1055 jjAddStates(13, 14);
1056 }
1057 break;
1058 case 10:
1059 if ((0xffffff7fffffdbffL & l) != 0L) {
1060 jjCheckNAdd(11);
1061 }
1062 break;
1063 case 11:
1064 if (curChar == 39 && kind > 65) {
1065 kind = 65;
1066 }
1067 break;
1068 case 13:
1069 if ((0x8400000000L & l) != 0L) {
1070 jjCheckNAdd(11);
1071 }
1072 break;
1073 case 14:
1074 if ((0xff000000000000L & l) != 0L) {
1075 jjCheckNAddTwoStates(15, 11);
1076 }
1077 break;
1078 case 15:
1079 if ((0xff000000000000L & l) != 0L) {
1080 jjCheckNAdd(11);
1081 }
1082 break;
1083 case 16:
1084 if ((0xf000000000000L & l) != 0L) {
1085 jjstateSet[jjnewStateCnt++] = 17;
1086 }
1087 break;
1088 case 17:
1089 if ((0xff000000000000L & l) != 0L) {
1090 jjCheckNAdd(15);
1091 }
1092 break;
1093 case 18:
1094 if (curChar == 34) {
1095 jjCheckNAddStates(10, 12);
1096 }
1097 break;
1098 case 19:
1099 if ((0xfffffffbffffdbffL & l) != 0L) {
1100 jjCheckNAddStates(10, 12);
1101 }
1102 break;
1103 case 21:
1104 if ((0x8400000000L & l) != 0L) {
1105 jjCheckNAddStates(10, 12);
1106 }
1107 break;
1108 case 22:
1109 if (curChar == 34 && kind > 66) {
1110 kind = 66;
1111 }
1112 break;
1113 case 23:
1114 if ((0xff000000000000L & l) != 0L) {
1115 jjCheckNAddStates(24, 27);
1116 }
1117 break;
1118 case 24:
1119 if ((0xff000000000000L & l) != 0L) {
1120 jjCheckNAddStates(10, 12);
1121 }
1122 break;
1123 case 25:
1124 if ((0xf000000000000L & l) != 0L) {
1125 jjstateSet[jjnewStateCnt++] = 26;
1126 }
1127 break;
1128 case 26:
1129 if ((0xff000000000000L & l) != 0L) {
1130 jjCheckNAdd(24);
1131 }
1132 break;
1133 case 27:
1134 if (curChar != 36) {
1135 break;
1136 }
1137 if (kind > 67) {
1138 kind = 67;
1139 }
1140 jjCheckNAdd(28);
1141 break;
1142 case 28:
1143 if ((0x3ff001000000000L & l) == 0L) {
1144 break;
1145 }
1146 if (kind > 67) {
1147 kind = 67;
1148 }
1149 jjCheckNAdd(28);
1150 break;
1151 case 29:
1152 if ((0x3ff000000000000L & l) != 0L) {
1153 jjCheckNAddStates(0, 6);
1154 }
1155 break;
1156 case 30:
1157 if ((0x3ff000000000000L & l) != 0L) {
1158 jjCheckNAddTwoStates(30, 31);
1159 }
1160 break;
1161 case 31:
1162 if (curChar != 46) {
1163 break;
1164 }
1165 if (kind > 63) {
1166 kind = 63;
1167 }
1168 jjCheckNAddStates(28, 30);
1169 break;
1170 case 32:
1171 if ((0x3ff000000000000L & l) == 0L) {
1172 break;
1173 }
1174 if (kind > 63) {
1175 kind = 63;
1176 }
1177 jjCheckNAddStates(28, 30);
1178 break;
1179 case 34:
1180 if ((0x280000000000L & l) != 0L) {
1181 jjCheckNAdd(35);
1182 }
1183 break;
1184 case 35:
1185 if ((0x3ff000000000000L & l) == 0L) {
1186 break;
1187 }
1188 if (kind > 63) {
1189 kind = 63;
1190 }
1191 jjCheckNAddTwoStates(35, 8);
1192 break;
1193 case 36:
1194 if ((0x3ff000000000000L & l) != 0L) {
1195 jjCheckNAddTwoStates(36, 37);
1196 }
1197 break;
1198 case 38:
1199 if ((0x280000000000L & l) != 0L) {
1200 jjCheckNAdd(39);
1201 }
1202 break;
1203 case 39:
1204 if ((0x3ff000000000000L & l) == 0L) {
1205 break;
1206 }
1207 if (kind > 63) {
1208 kind = 63;
1209 }
1210 jjCheckNAddTwoStates(39, 8);
1211 break;
1212 case 40:
1213 if ((0x3ff000000000000L & l) != 0L) {
1214 jjCheckNAddStates(31, 33);
1215 }
1216 break;
1217 case 42:
1218 if ((0x280000000000L & l) != 0L) {
1219 jjCheckNAdd(43);
1220 }
1221 break;
1222 case 43:
1223 if ((0x3ff000000000000L & l) != 0L) {
1224 jjCheckNAddTwoStates(43, 8);
1225 }
1226 break;
1227 case 44:
1228 if (curChar != 48) {
1229 break;
1230 }
1231 if (kind > 59) {
1232 kind = 59;
1233 }
1234 jjCheckNAddStates(15, 17);
1235 break;
1236 case 46:
1237 if ((0x3ff000000000000L & l) == 0L) {
1238 break;
1239 }
1240 if (kind > 59) {
1241 kind = 59;
1242 }
1243 jjCheckNAddTwoStates(46, 2);
1244 break;
1245 case 47:
1246 if ((0xff000000000000L & l) == 0L) {
1247 break;
1248 }
1249 if (kind > 59) {
1250 kind = 59;
1251 }
1252 jjCheckNAddTwoStates(47, 2);
1253 break;
1254 case 48:
1255 if (curChar == 47) {
1256 jjAddStates(7, 9);
1257 }
1258 break;
1259 case 50:
1260 if ((0xffffffffffffdbffL & l) != 0L) {
1261 jjCheckNAddStates(18, 20);
1262 }
1263 break;
1264 case 51:
1265 if ((0x2400L & l) != 0L && kind > 6) {
1266 kind = 6;
1267 }
1268 break;
1269 case 52:
1270 if (curChar == 10 && kind > 6) {
1271 kind = 6;
1272 }
1273 break;
1274 case 53:
1275 if (curChar == 13) {
1276 jjstateSet[jjnewStateCnt++] = 52;
1277 }
1278 break;
1279 case 54:
1280 if (curChar == 42) {
1281 jjCheckNAddTwoStates(55, 56);
1282 }
1283 break;
1284 case 55:
1285 if ((0xfffffbffffffffffL & l) != 0L) {
1286 jjCheckNAddTwoStates(55, 56);
1287 }
1288 break;
1289 case 56:
1290 if (curChar == 42) {
1291 jjCheckNAddStates(34, 36);
1292 }
1293 break;
1294 case 57:
1295 if ((0xffff7bffffffffffL & l) != 0L) {
1296 jjCheckNAddTwoStates(58, 56);
1297 }
1298 break;
1299 case 58:
1300 if ((0xfffffbffffffffffL & l) != 0L) {
1301 jjCheckNAddTwoStates(58, 56);
1302 }
1303 break;
1304 case 59:
1305 if (curChar == 47 && kind > 7) {
1306 kind = 7;
1307 }
1308 break;
1309 case 60:
1310 if (curChar == 42) {
1311 jjstateSet[jjnewStateCnt++] = 54;
1312 }
1313 break;
1314 case 61:
1315 if (curChar == 42) {
1316 jjCheckNAddTwoStates(62, 63);
1317 }
1318 break;
1319 case 62:
1320 if ((0xfffffbffffffffffL & l) != 0L) {
1321 jjCheckNAddTwoStates(62, 63);
1322 }
1323 break;
1324 case 63:
1325 if (curChar == 42) {
1326 jjCheckNAddStates(37, 39);
1327 }
1328 break;
1329 case 64:
1330 if ((0xffff7bffffffffffL & l) != 0L) {
1331 jjCheckNAddTwoStates(65, 63);
1332 }
1333 break;
1334 case 65:
1335 if ((0xfffffbffffffffffL & l) != 0L) {
1336 jjCheckNAddTwoStates(65, 63);
1337 }
1338 break;
1339 case 66:
1340 if (curChar == 47 && kind > 8) {
1341 kind = 8;
1342 }
1343 break;
1344 default : break;
1345 }
1346 } while(i != startsAt);
1347 }
1348 else if (curChar < 128)
1349 {
1350 long l = 1L << (curChar & 077);
1351 //MatchLoop
1352 do
1353 {
1354 switch(jjstateSet[--i])
1355 {
1356 case 0:
1357 case 28:
1358 if ((0x7fffffe87fffffeL & l) == 0L) {
1359 break;
1360 }
1361 if (kind > 67) {
1362 kind = 67;
1363 }
1364 jjCheckNAdd(28);
1365 break;
1366 case 2:
1367 if ((0x100000001000L & l) != 0L && kind > 59) {
1368 kind = 59;
1369 }
1370 break;
1371 case 5:
1372 if ((0x2000000020L & l) != 0L) {
1373 jjAddStates(40, 41);
1374 }
1375 break;
1376 case 8:
1377 if ((0x5000000050L & l) != 0L && kind > 63) {
1378 kind = 63;
1379 }
1380 break;
1381 case 10:
1382 if ((0xffffffffefffffffL & l) != 0L) {
1383 jjCheckNAdd(11);
1384 }
1385 break;
1386 case 12:
1387 if (curChar == 92) {
1388 jjAddStates(42, 44);
1389 }
1390 break;
1391 case 13:
1392 if ((0x14404410000000L & l) != 0L) {
1393 jjCheckNAdd(11);
1394 }
1395 break;
1396 case 19:
1397 if ((0xffffffffefffffffL & l) != 0L) {
1398 jjCheckNAddStates(10, 12);
1399 }
1400 break;
1401 case 20:
1402 if (curChar == 92) {
1403 jjAddStates(45, 47);
1404 }
1405 break;
1406 case 21:
1407 if ((0x14404410000000L & l) != 0L) {
1408 jjCheckNAddStates(10, 12);
1409 }
1410 break;
1411 case 33:
1412 if ((0x2000000020L & l) != 0L) {
1413 jjAddStates(48, 49);
1414 }
1415 break;
1416 case 37:
1417 if ((0x2000000020L & l) != 0L) {
1418 jjAddStates(50, 51);
1419 }
1420 break;
1421 case 41:
1422 if ((0x2000000020L & l) != 0L) {
1423 jjAddStates(52, 53);
1424 }
1425 break;
1426 case 45:
1427 if ((0x100000001000000L & l) != 0L) {
1428 jjCheckNAdd(46);
1429 }
1430 break;
1431 case 46:
1432 if ((0x7e0000007eL & l) == 0L) {
1433 break;
1434 }
1435 if (kind > 59) {
1436 kind = 59;
1437 }
1438 jjCheckNAddTwoStates(46, 2);
1439 break;
1440 case 50:
1441 jjAddStates(18, 20);
1442 break;
1443 case 55:
1444 jjCheckNAddTwoStates(55, 56);
1445 break;
1446 case 57:
1447 case 58:
1448 jjCheckNAddTwoStates(58, 56);
1449 break;
1450 case 62:
1451 jjCheckNAddTwoStates(62, 63);
1452 break;
1453 case 64:
1454 case 65:
1455 jjCheckNAddTwoStates(65, 63);
1456 break;
1457 default : break;
1458 }
1459 } while(i != startsAt);
1460 }
1461 else
1462 {
1463 int hiByte = (int)(curChar >> 8);
1464 int i1 = hiByte >> 6;
1465 long l1 = 1L << (hiByte & 077);
1466 int i2 = (curChar & 0xff) >> 6;
1467 long l2 = 1L << (curChar & 077);
1468 //MatchLoop
1469 do
1470 {
1471 switch(jjstateSet[--i])
1472 {
1473 case 0:
1474 case 28:
1475 if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) {
1476 break;
1477 }
1478 if (kind > 67) {
1479 kind = 67;
1480 }
1481 jjCheckNAdd(28);
1482 break;
1483 case 10:
1484 if (jjCanMove_0(hiByte, i1, i2, l1, l2)) {
1485 jjstateSet[jjnewStateCnt++] = 11;
1486 }
1487 break;
1488 case 19:
1489 if (jjCanMove_0(hiByte, i1, i2, l1, l2)) {
1490 jjAddStates(10, 12);
1491 }
1492 break;
1493 case 50:
1494 if (jjCanMove_0(hiByte, i1, i2, l1, l2)) {
1495 jjAddStates(18, 20);
1496 }
1497 break;
1498 case 55:
1499 if (jjCanMove_0(hiByte, i1, i2, l1, l2)) {
1500 jjCheckNAddTwoStates(55, 56);
1501 }
1502 break;
1503 case 57:
1504 case 58:
1505 if (jjCanMove_0(hiByte, i1, i2, l1, l2)) {
1506 jjCheckNAddTwoStates(58, 56);
1507 }
1508 break;
1509 case 62:
1510 if (jjCanMove_0(hiByte, i1, i2, l1, l2)) {
1511 jjCheckNAddTwoStates(62, 63);
1512 }
1513 break;
1514 case 64:
1515 case 65:
1516 if (jjCanMove_0(hiByte, i1, i2, l1, l2)) {
1517 jjCheckNAddTwoStates(65, 63);
1518 }
1519 break;
1520 default : break;
1521 }
1522 } while(i != startsAt);
1523 }
1524 if (kind != 0x7fffffff)
1525 {
1526 jjmatchedKind = kind;
1527 jjmatchedPos = curPos;
1528 kind = 0x7fffffff;
1529 }
1530 ++curPos;
1531 if ((i = jjnewStateCnt) == (startsAt = 67 - (jjnewStateCnt = startsAt))) {
1532 return curPos;
1533 }
1534 try { curChar = input_stream.readChar(); }
1535 catch(java.io.IOException e) { return curPos; }
1536 }
1537}
1538static final int[] jjnextStates = {
1539 30, 31, 36, 37, 40, 41, 8, 49, 60, 61, 19, 20, 22, 10, 12, 45,
1540 47, 2, 50, 51, 53, 4, 5, 8, 19, 20, 24, 22, 32, 33, 8, 40,
1541 41, 8, 56, 57, 59, 63, 64, 66, 6, 7, 13, 14, 16, 21, 23, 25,
1542 34, 35, 38, 39, 42, 43,
1543};
1544private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
1545{
1546 switch(hiByte)
1547 {
1548 case 0:
1549 return ((jjbitVec2[i2] & l2) != 0L);
1550 default :
1551 if ((jjbitVec0[i1] & l1) != 0L) {
1552 return true;
1553 }
1554 return false;
1555 }
1556}
1557private static final boolean jjCanMove_1(int hiByte, int i1, int i2, long l1, long l2)
1558{
1559 switch(hiByte)
1560 {
1561 case 0:
1562 return ((jjbitVec4[i2] & l2) != 0L);
1563 case 48:
1564 return ((jjbitVec5[i2] & l2) != 0L);
1565 case 49:
1566 return ((jjbitVec6[i2] & l2) != 0L);
1567 case 51:
1568 return ((jjbitVec7[i2] & l2) != 0L);
1569 case 61:
1570 return ((jjbitVec8[i2] & l2) != 0L);
1571 default :
1572 if ((jjbitVec3[i1] & l1) != 0L) {
1573 return true;
1574 }
1575 return false;
1576 }
1577}
1578public static final String[] jjstrLiteralImages = {
1579"", null, null, null, null, null, null, null, null,
1580"\141\142\163\164\162\141\143\164", "\142\157\157\154\145\141\156", "\142\162\145\141\153", "\142\171\164\145",
1581"\143\141\163\145", "\143\141\164\143\150", "\143\150\141\162", "\143\154\141\163\163",
1582"\143\157\156\163\164", "\143\157\156\164\151\156\165\145", "\144\145\146\141\165\154\164",
1583"\144\157", "\144\157\165\142\154\145", "\145\154\163\145",
1584"\145\170\164\145\156\144\163", "\146\141\154\163\145", "\146\151\156\141\154",
1585"\146\151\156\141\154\154\171", "\146\154\157\141\164", "\146\157\162", "\147\157\164\157", "\151\146",
1586"\151\155\160\154\145\155\145\156\164\163", "\151\155\160\157\162\164", "\151\156\163\164\141\156\143\145\157\146",
1587"\151\156\164", "\151\156\164\145\162\146\141\143\145", "\154\157\156\147",
1588"\156\141\164\151\166\145", "\156\145\167", "\156\165\154\154", "\160\141\143\153\141\147\145",
1589"\160\162\151\166\141\164\145", "\160\162\157\164\145\143\164\145\144", "\160\165\142\154\151\143",
1590"\162\145\164\165\162\156", "\163\150\157\162\164", "\163\164\141\164\151\143", "\163\165\160\145\162",
1591"\163\167\151\164\143\150", "\163\171\156\143\150\162\157\156\151\172\145\144", "\164\150\151\163",
1592"\164\150\162\157\167", "\164\150\162\157\167\163", "\164\162\141\156\163\151\145\156\164",
1593"\164\162\165\145", "\164\162\171", "\166\157\151\144", "\166\157\154\141\164\151\154\145",
1594"\167\150\151\154\145", null, null, null, null, null, null, null, null, null, null, null, "\50",
1595"\51", "\173", "\175", "\133", "\135", "\73", "\54", "\56", "\75", "\76", "\74",
1596"\41", "\176", "\77", "\72", "\75\75", "\74\75", "\76\75", "\41\75", "\174\174",
1597"\46\46", "\53\53", "\55\55", "\53", "\55", "\52", "\57", "\46", "\174", "\136", "\45",
1598"\74\74", "\76\76", "\76\76\76", "\53\75", "\55\75", "\52\75", "\57\75", "\46\75",
1599"\174\75", "\136\75", "\45\75", "\74\74\75", "\76\76\75", "\76\76\76\75", };
1600public static final String[] lexStateNames = {
1601 "DEFAULT",
1602};
1603static final long[] jjtoToken = {
1604 0x8ffffffffffffe01L, 0xfffffffffffceL,
1605};
1606static final long[] jjtoSkip = {
1607 0x1feL, 0x0L,
1608};
1609static final long[] jjtoSpecial = {
1610 0x1c0L, 0x0L,
1611};
1612private ASCII_UCodeESC_CharStream input_stream;
1613private final int[] jjrounds = new int[67];
1614private final int[] jjstateSet = new int[134];
1615protected char curChar;
1616public ExpressionParserTokenManager(ASCII_UCodeESC_CharStream stream)
1617{
1618 if (ASCII_UCodeESC_CharStream.staticFlag) {
1619 throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
1620 }
1621 input_stream = stream;
1622}
1623public ExpressionParserTokenManager(ASCII_UCodeESC_CharStream stream, int lexState)
1624{
1625 this(stream);
1626 SwitchTo(lexState);
1627}
1628public void ReInit(ASCII_UCodeESC_CharStream stream)
1629{
1630 jjmatchedPos = jjnewStateCnt = 0;
1631 curLexState = defaultLexState;
1632 input_stream = stream;
1633 ReInitRounds();
1634}
1635private final void ReInitRounds()
1636{
1637 int i;
1638 jjround = 0x80000001;
1639 for (i = 67; i-- > 0;) {
1640 jjrounds[i] = 0x80000000;
1641}
1642}
1643public void ReInit(ASCII_UCodeESC_CharStream stream, int lexState)
1644{
1645 ReInit(stream);
1646 SwitchTo(lexState);
1647}
1648public void SwitchTo(int lexState)
1649{
1650 if (lexState >= 1 || lexState < 0) {
1651 throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
1652 } else {
1653 curLexState = lexState;
1654}
1655}
1656
1657private final Token jjFillToken()
1658{
1659 Token t = Token.newToken(jjmatchedKind);
1660 t.kind = jjmatchedKind;
1661 String im = jjstrLiteralImages[jjmatchedKind];
1662 t.image = (im == null) ? input_stream.GetImage() : im;
1663 t.beginLine = input_stream.getBeginLine();
1664 t.beginColumn = input_stream.getBeginColumn();
1665 t.endLine = input_stream.getEndLine();
1666 t.endColumn = input_stream.getEndColumn();
1667 return t;
1668}
1669
1670int curLexState = 0;
1671int defaultLexState = 0;
1672int jjnewStateCnt;
1673int jjround;
1674int jjmatchedPos;
1675int jjmatchedKind;
1676
1677public final Token getNextToken()
1678{
1679 Token specialToken = null;
1680 Token matchedToken;
1681 int curPos = 0;
1682
1683 EOFLoop :
1684 for (;;)
1685 {
1686 try
1687 {
1688 curChar = input_stream.BeginToken();
1689 }
1690 catch(java.io.IOException e)
1691 {
1692 jjmatchedKind = 0;
1693 matchedToken = jjFillToken();
1694 matchedToken.specialToken = specialToken;
1695 return matchedToken;
1696 }
1697
1698 try {
1699 while (curChar <= 32 && (0x100003600L & (1L << curChar)) != 0L) {
1700 curChar = input_stream.BeginToken();
1701 }
1702 }
1703 catch (java.io.IOException e1) { continue EOFLoop; }
1704 jjmatchedKind = 0x7fffffff;
1705 jjmatchedPos = 0;
1706 curPos = jjMoveStringLiteralDfa0_0();
1707 if (jjmatchedKind != 0x7fffffff)
1708 {
1709 if (jjmatchedPos + 1 < curPos) {
1710 input_stream.backup(curPos - jjmatchedPos - 1);
1711 }
1712 if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
1713 {
1714 matchedToken = jjFillToken();
1715 matchedToken.specialToken = specialToken;
1716 return matchedToken;
1717 }
1718 else
1719 {
1720 if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
1721 {
1722 matchedToken = jjFillToken();
1723 if (specialToken == null) {
1724 specialToken = matchedToken;
1725 } else
1726 {
1727 matchedToken.specialToken = specialToken;
1728 specialToken = (specialToken.next = matchedToken);
1729 }
1730 }
1731 continue EOFLoop;
1732 }
1733 }
1734 int error_line = input_stream.getEndLine();
1735 int error_column = input_stream.getEndColumn();
1736 String error_after = null;
1737 boolean EOFSeen = false;
1738 try { input_stream.readChar(); input_stream.backup(1); }
1739 catch (java.io.IOException e1) {
1740 EOFSeen = true;
1741 error_after = curPos <= 1 ? "" : input_stream.GetImage();
1742 if (curChar == '\n' || curChar == '\r') {
1743 error_line++;
1744 error_column = 0;
1745 } else {
1746 error_column++;
1747 }
1748 }
1749 if (!EOFSeen) {
1750 input_stream.backup(1);
1751 error_after = curPos <= 1 ? "" : input_stream.GetImage();
1752 }
1753 throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
1754 }
1755}
1756
1757}
java/pkg/com/sun/tools/example/debug/expr/LValue.java+1056−0
@@ -0,0 +1,1056 @@
1/*
2 * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26package com.sun.tools.example.debug.expr;
27
28import com.sun.jdi.*;
29import java.util.*;
30
31abstract class LValue {
32
33 // The JDI Value object for this LValue. Once we have this Value,
34 // we have to remember it since after we return the LValue object
35 // to the ExpressionParser, it might decide that it needs
36 // the 'toString' value for the LValue in which case it will
37 // call getMassagedValue to get this toString value. At that
38 // point, we don't want to call JDI a 2nd time to get the Value
39 // for the LValue. This is especially wrong when the LValue
40 // represents a member function. We would end up calling it
41 // a 2nd time.
42 //
43 // Unfortunately, there are several levels of calls to
44 // get/set values in this file. To minimize confusion,
45 // jdiValue is set/tested at the lowest level - right
46 // next to the actual calls to JDI methods to get/set the
47 // value in the debuggee.
48 protected Value jdiValue;
49
50 abstract Value getValue() throws InvocationException,
51 IncompatibleThreadStateException,
52 InvalidTypeException,
53 ClassNotLoadedException,
54 ParseException;
55
56 abstract void setValue0(Value value)
57 throws ParseException, InvalidTypeException,
58 ClassNotLoadedException;
59
60 abstract void invokeWith(List<Value> arguments) throws ParseException;
61
62 void setValue(Value value) throws ParseException {
63 try {
64 setValue0(value);
65 } catch (InvalidTypeException exc) {
66 throw new ParseException(
67 "Attempt to set value of incorrect type" +
68 exc);
69 } catch (ClassNotLoadedException exc) {
70 throw new ParseException(
71 "Attempt to set value before " + exc.className() + " was loaded" +
72 exc);
73 }
74 }
75
76 void setValue(LValue lval) throws ParseException {
77 setValue(lval.interiorGetValue());
78 }
79
80 LValue memberLValue(ExpressionParser.GetFrame frameGetter,
81 String fieldName) throws ParseException {
82 try {
83 return memberLValue(fieldName, frameGetter.get().thread());
84 } catch (IncompatibleThreadStateException exc) {
85 throw new ParseException("Thread not suspended");
86 }
87 }
88
89 LValue memberLValue(String fieldName, ThreadReference thread) throws ParseException {
90
91 Value val = interiorGetValue();
92 if ((val instanceof ArrayReference) &&
93 "length".equals(fieldName)){
94 return new LValueArrayLength((ArrayReference)val);
95 }
96 return new LValueInstanceMember(val, fieldName, thread);
97 }
98
99 // Return the Value for this LValue that would be used to concatenate
100 // to a String. IE, if it is an Object, call toString in the debuggee.
101 Value getMassagedValue(ExpressionParser.GetFrame frameGetter) throws ParseException {
102 Value vv = interiorGetValue();
103
104 // If vv is an ObjectReference, then we have to
105 // do the implicit call to toString().
106 if (vv instanceof ObjectReference &&
107 !(vv instanceof StringReference) &&
108 !(vv instanceof ArrayReference)) {
109 StackFrame frame;
110 try {
111 frame = frameGetter.get();
112 } catch (IncompatibleThreadStateException exc) {
113 throw new ParseException("Thread not suspended");
114 }
115
116 ThreadReference thread = frame.thread();
117 LValue toStringMember = memberLValue("toString", thread);
118 toStringMember.invokeWith(new ArrayList<Value>());
119 return toStringMember.interiorGetValue();
120 }
121 return vv;
122 }
123
124 Value interiorGetValue() throws ParseException {
125 Value value;
126 try {
127 value = getValue();
128 } catch (InvocationException e) {
129 throw new ParseException("Unable to complete expression. Exception " +
130 e.exception() + " thrown");
131 } catch (IncompatibleThreadStateException itse) {
132 throw new ParseException("Unable to complete expression. Thread " +
133 "not suspended for method invoke");
134 } catch (InvalidTypeException ite) {
135 throw new ParseException("Unable to complete expression. Method " +
136 "argument type mismatch");
137 } catch (ClassNotLoadedException tnle) {
138 throw new ParseException("Unable to complete expression. Method " +
139 "argument type " + tnle.className() +
140 " not yet loaded");
141 }
142 return value;
143 }
144
145 LValue arrayElementLValue(LValue lval) throws ParseException {
146 Value indexValue = lval.interiorGetValue();
147 int index;
148 if ( (indexValue instanceof IntegerValue) ||
149 (indexValue instanceof ShortValue) ||
150 (indexValue instanceof ByteValue) ||
151 (indexValue instanceof CharValue) ) {
152 index = ((PrimitiveValue)indexValue).intValue();
153 } else {
154 throw new ParseException("Array index must be a integer type");
155 }
156 return new LValueArrayElement(interiorGetValue(), index);
157 }
158
159 @Override
160 public String toString() {
161 try {
162 return interiorGetValue().toString();
163 } catch (ParseException e) {
164 return "<Parse Exception>";
165 }
166 }
167
168 static final int STATIC = 0;
169 static final int INSTANCE = 1;
170
171 static Field fieldByName(ReferenceType refType, String name, int kind) {
172 /*
173 * TO DO: Note that this currently fails to find superclass
174 * or implemented interface fields. This is due to a temporary
175 * limititation of RefType.fieldByName. Once that method is
176 * fixed, superclass fields will be found.
177 */
178 Field field = refType.fieldByName(name);
179 if (field != null) {
180 boolean isStatic = field.isStatic();
181 if (((kind == STATIC) && !isStatic) ||
182 ((kind == INSTANCE) && isStatic)) {
183 field = null;
184 }
185 }
186/***
187 System.err.println("fieldByName: " + refType.name() + " " +
188 name + " " +
189 kind + " " +
190 (field != null));
191***/
192 return field;
193 }
194
195 static List<Method> methodsByName(ReferenceType refType,
196 String name, int kind) {
197 List<Method> list = refType.methodsByName(name);
198 Iterator<Method> iter = list.iterator();
199 while (iter.hasNext()) {
200 Method method = iter.next();
201 boolean isStatic = method.isStatic();
202 if (((kind == STATIC) && !isStatic) ||
203 ((kind == INSTANCE) && isStatic)) {
204 iter.remove();
205 }
206 }
207 return list;
208 }
209
210 static List<String> primitiveTypeNames = new ArrayList<String>();
211 static {
212 primitiveTypeNames.add("boolean");
213 primitiveTypeNames.add("byte");
214 primitiveTypeNames.add("char");
215 primitiveTypeNames.add("short");
216 primitiveTypeNames.add("int");
217 primitiveTypeNames.add("long");
218 primitiveTypeNames.add("float");
219 primitiveTypeNames.add("double");
220 }
221
222
223 static final int SAME = 0;
224 static final int ASSIGNABLE = 1;
225 static final int DIFFERENT = 2;
226 /*
227 * Return SAME, DIFFERENT or ASSIGNABLE.
228 * SAME means each arg type is the same as type of the corr. arg.
229 * ASSIGNABLE means that not all the pairs are the same, but
230 * for those that aren't, at least the argType is assignable
231 * from the type of the argument value.
232 * DIFFERENT means that in at least one pair, the
233 * argType is not assignable from the type of the argument value.
234 * IE, one is an Apple and the other is an Orange.
235 */
236 static int argumentsMatch(List<Type> argTypes, List<Value> arguments) {
237 if (argTypes.size() != arguments.size()) {
238 return DIFFERENT;
239 }
240
241 Iterator<Type> typeIter = argTypes.iterator();
242 Iterator<Value> valIter = arguments.iterator();
243 int result = SAME;
244
245 // If any pair aren't the same, change the
246 // result to ASSIGNABLE. If any pair aren't
247 // assignable, return DIFFERENT
248 while (typeIter.hasNext()) {
249 Type argType = typeIter.next();
250 Value value = valIter.next();
251 if (value == null) {
252 // Null values can be passed to any non-primitive argument
253 if (primitiveTypeNames.contains(argType.name())) {
254 return DIFFERENT;
255 }
256 // Else, we will assume that a null value
257 // exactly matches an object type.
258 }
259 if (!value.type().equals(argType)) {
260 if (isAssignableTo(value.type(), argType)) {
261 result = ASSIGNABLE;
262 } else {
263 return DIFFERENT;
264 }
265 }
266 }
267 return result;
268 }
269
270
271 // These is...AssignableTo methods are based on similar code in the JDI
272 // implementations of ClassType, ArrayType, and InterfaceType
273
274 static boolean isComponentAssignable(Type fromType, Type toType) {
275 if (fromType instanceof PrimitiveType) {
276 // Assignment of primitive arrays requires identical
277 // component types.
278 return fromType.equals(toType);
279 }
280 if (toType instanceof PrimitiveType) {
281 return false;
282 }
283 // Assignment of object arrays requires availability
284 // of widening conversion of component types
285 return isAssignableTo(fromType, toType);
286 }
287
288 static boolean isArrayAssignableTo(ArrayType fromType, Type toType) {
289 if (toType instanceof ArrayType) {
290 try {
291 Type toComponentType = ((ArrayType)toType).componentType();
292 return isComponentAssignable(fromType.componentType(), toComponentType);
293 } catch (ClassNotLoadedException e) {
294 // One or both component types has not yet been
295 // loaded => can't assign
296 return false;
297 }
298 }
299 if (toType instanceof InterfaceType) {
300 // Only valid InterfaceType assignee is Cloneable
301 return toType.name().equals("java.lang.Cloneable");
302 }
303 // Only valid ClassType assignee is Object
304 return toType.name().equals("java.lang.Object");
305 }
306
307 static boolean isAssignableTo(Type fromType, Type toType) {
308 if (fromType.equals(toType)) {
309 return true;
310 }
311
312 // If one is boolean, so must be the other.
313 if (fromType instanceof BooleanType) {
314 if (toType instanceof BooleanType) {
315 return true;
316 }
317 return false;
318 }
319 if (toType instanceof BooleanType) {
320 return false;
321 }
322
323 // Other primitive types are intermixable only with each other.
324 if (fromType instanceof PrimitiveType) {
325 if (toType instanceof PrimitiveType) {
326 return true;
327 }
328 return false;
329 }
330 if (toType instanceof PrimitiveType) {
331 return false;
332 }
333
334 // neither one is primitive.
335 if (fromType instanceof ArrayType) {
336 return isArrayAssignableTo((ArrayType)fromType, toType);
337 }
338 List<InterfaceType> interfaces;
339 if (fromType instanceof ClassType) {
340 ClassType superclazz = ((ClassType)fromType).superclass();
341 if ((superclazz != null) && isAssignableTo(superclazz, toType)) {
342 return true;
343 }
344 interfaces = ((ClassType)fromType).interfaces();
345 } else {
346 // fromType must be an InterfaceType
347 interfaces = ((InterfaceType)fromType).superinterfaces();
348 }
349 for (InterfaceType interfaze : interfaces) {
350 if (isAssignableTo(interfaze, toType)) {
351 return true;
352 }
353 }
354 return false;
355 }
356
357 static Method resolveOverload(List<Method> overloads,
358 List<Value> arguments)
359 throws ParseException {
360
361 // If there is only one method to call, we'll just choose
362 // that without looking at the args. If they aren't right
363 // the invoke will return a better error message than we
364 // could generate here.
365 if (overloads.size() == 1) {
366 return overloads.get(0);
367 }
368
369 // Resolving overloads is beyond the scope of this exercise.
370 // So, we will look for a method that matches exactly the
371 // types of the arguments. If we can't find one, then
372 // if there is exactly one method whose param types are assignable
373 // from the arg types, we will use that. Otherwise,
374 // it is an error. We won't guess which of multiple possible
375 // methods to call. And, since casts aren't implemented,
376 // the user can't use them to pick a particular overload to call.
377 // IE, the user is out of luck in this case.
378 Method retVal = null;
379 int assignableCount = 0;
380 for (Method mm : overloads) {
381 List<Type> argTypes;
382 try {
383 argTypes = mm.argumentTypes();
384 } catch (ClassNotLoadedException ee) {
385 // This probably won't happen for the
386 // method that we are really supposed to
387 // call.
388 continue;
389 }
390 int compare = argumentsMatch(argTypes, arguments);
391 if (compare == SAME) {
392 return mm;
393 }
394 if (compare == DIFFERENT) {
395 continue;
396 }
397 // Else, it is assignable. Remember it.
398 retVal = mm;
399 assignableCount++;
400 }
401
402 // At this point, we didn't find an exact match,
403 // but we found one for which the args are assignable.
404 //
405 if (retVal != null) {
406 if (assignableCount == 1) {
407 return retVal;
408 }
409 throw new ParseException("Arguments match multiple methods");
410 }
411 throw new ParseException("Arguments match no method");
412 }
413
414 private static class LValueLocal extends LValue {
415 final StackFrame frame;
416 final LocalVariable var;
417
418 LValueLocal(StackFrame frame, LocalVariable var) {
419 this.frame = frame;
420 this.var = var;
421 }
422
423 @Override
424 Value getValue() {
425 if (jdiValue == null) {
426 jdiValue = frame.getValue(var);
427 }
428 return jdiValue;
429 }
430
431 @Override
432 void setValue0(Value val) throws InvalidTypeException,
433 ClassNotLoadedException {
434 frame.setValue(var, val);
435 jdiValue = val;
436 }
437
438 @Override
439 void invokeWith(List<Value> arguments) throws ParseException {
440 throw new ParseException(var.name() + " is not a method");
441 }
442 }
443
444 private static class LValueInstanceMember extends LValue {
445 final ObjectReference obj;
446 final ThreadReference thread;
447 final Field matchingField;
448 final List<Method> overloads;
449 Method matchingMethod = null;
450 List<Value> methodArguments = null;
451
452 LValueInstanceMember(Value value,
453 String memberName,
454 ThreadReference thread) throws ParseException {
455 if (!(value instanceof ObjectReference)) {
456 throw new ParseException(
457 "Cannot access field of primitive type: " + value);
458 }
459 this.obj = (ObjectReference)value;
460 this.thread = thread;
461 ReferenceType refType = obj.referenceType();
462 /*
463 * Can't tell yet whether this LValue will be accessed as a
464 * field or method, so we keep track of all the possibilities
465 */
466 matchingField = LValue.fieldByName(refType, memberName,
467 LValue.INSTANCE);
468 overloads = LValue.methodsByName(refType, memberName,
469 LValue.INSTANCE);
470 if ((matchingField == null) && overloads.size() == 0) {
471 throw new ParseException("No instance field or method with the name "
472 + memberName + " in " + refType.name());
473 }
474 }
475
476 @Override
477 Value getValue() throws InvocationException, InvalidTypeException,
478 ClassNotLoadedException, IncompatibleThreadStateException,
479 ParseException {
480 if (jdiValue != null) {
481 return jdiValue;
482 }
483 if (matchingMethod == null) {
484 if (matchingField == null) {
485 throw new ParseException("No such field in " + obj.referenceType().name());
486 }
487 return jdiValue = obj.getValue(matchingField);
488 } else {
489 return jdiValue = obj.invokeMethod(thread, matchingMethod, methodArguments, 0);
490 }
491 }
492
493 @Override
494 void setValue0(Value val) throws ParseException,
495 InvalidTypeException,
496 ClassNotLoadedException {
497 if (matchingMethod != null) {
498 throw new ParseException("Cannot assign to a method invocation");
499 }
500 obj.setValue(matchingField, val);
501 jdiValue = val;
502 }
503
504 @Override
505 void invokeWith(List<Value> arguments) throws ParseException {
506 if (matchingMethod != null) {
507 throw new ParseException("Invalid consecutive invocations");
508 }
509 methodArguments = arguments;
510 matchingMethod = LValue.resolveOverload(overloads, arguments);
511 }
512 }
513
514 private static class LValueStaticMember extends LValue {
515 final ReferenceType refType;
516 final ThreadReference thread;
517 final Field matchingField;
518 final List<Method> overloads;
519 Method matchingMethod = null;
520 List<Value> methodArguments = null;
521
522 LValueStaticMember(ReferenceType refType,
523 String memberName,
524 ThreadReference thread) throws ParseException {
525 this.refType = refType;
526 this.thread = thread;
527 /*
528 * Can't tell yet whether this LValue will be accessed as a
529 * field or method, so we keep track of all the possibilities
530 */
531 matchingField = LValue.fieldByName(refType, memberName,
532 LValue.STATIC);
533 overloads = LValue.methodsByName(refType, memberName,
534 LValue.STATIC);
535 if ((matchingField == null) && overloads.size() == 0) {
536 throw new ParseException("No static field or method with the name "
537 + memberName + " in " + refType.name());
538 }
539 }
540
541 @Override
542 Value getValue() throws InvocationException, InvalidTypeException,
543 ClassNotLoadedException, IncompatibleThreadStateException,
544 ParseException {
545 if (jdiValue != null) {
546 return jdiValue;
547 }
548 if (matchingMethod == null) {
549 return jdiValue = refType.getValue(matchingField);
550 } else if (refType instanceof ClassType) {
551 ClassType clazz = (ClassType)refType;
552 return jdiValue = clazz.invokeMethod(thread, matchingMethod, methodArguments, 0);
553 } else {
554 throw new InvalidTypeException("Cannot invoke static method on " +
555 refType.name());
556 }
557 }
558
559 @Override
560 void setValue0(Value val)
561 throws ParseException, InvalidTypeException,
562 ClassNotLoadedException {
563 if (matchingMethod != null) {
564 throw new ParseException("Cannot assign to a method invocation");
565 }
566 if (!(refType instanceof ClassType)) {
567 throw new ParseException(
568 "Cannot set interface field: " + refType);
569 }
570 ((ClassType)refType).setValue(matchingField, val);
571 jdiValue = val;
572 }
573
574 @Override
575 void invokeWith(List<Value> arguments) throws ParseException {
576 if (matchingMethod != null) {
577 throw new ParseException("Invalid consecutive invocations");
578 }
579 methodArguments = arguments;
580 matchingMethod = LValue.resolveOverload(overloads, arguments);
581 }
582 }
583
584 private static class LValueArrayLength extends LValue {
585 /*
586 * Since one can code "int myLen = myArray.length;",
587 * one might expect that these JDI calls would get a Value
588 * object for the length of an array in the debugee:
589 * Field xxx = ArrayType.fieldByName("length")
590 * Value lenVal= ArrayReference.getValue(xxx)
591 *
592 * However, this doesn't work because the array length isn't
593 * really stored as a field, and can't be accessed as such
594 * via JDI. Instead, the arrayRef.length() method has to be
595 * used.
596 */
597 final ArrayReference arrayRef;
598 LValueArrayLength (ArrayReference value) {
599 this.arrayRef = value;
600 }
601
602 @Override
603 Value getValue() {
604 if (jdiValue == null) {
605 jdiValue = arrayRef.virtualMachine().mirrorOf(arrayRef.length());
606 }
607 return jdiValue;
608 }
609
610 @Override
611 void setValue0(Value value) throws ParseException {
612 throw new ParseException("Cannot set constant: " + value);
613 }
614
615 @Override
616 void invokeWith(List<Value> arguments) throws ParseException {
617 throw new ParseException("Array element is not a method");
618 }
619 }
620
621 private static class LValueArrayElement extends LValue {
622 final ArrayReference array;
623 final int index;
624
625 LValueArrayElement(Value value, int index) throws ParseException {
626 if (!(value instanceof ArrayReference)) {
627 throw new ParseException(
628 "Must be array type: " + value);
629 }
630 this.array = (ArrayReference)value;
631 this.index = index;
632 }
633
634 @Override
635 Value getValue() {
636 if (jdiValue == null) {
637 jdiValue = array.getValue(index);
638 }
639 return jdiValue;
640 }
641
642 @Override
643 void setValue0(Value val) throws InvalidTypeException,
644 ClassNotLoadedException {
645 array.setValue(index, val);
646 jdiValue = val;
647 }
648
649 @Override
650 void invokeWith(List<Value> arguments) throws ParseException {
651 throw new ParseException("Array element is not a method");
652 }
653 }
654
655 private static class LValueConstant extends LValue {
656 final Value value;
657
658 LValueConstant(Value value) {
659 this.value = value;
660 }
661
662 @Override
663 Value getValue() {
664 if (jdiValue == null) {
665 jdiValue = value;
666 }
667 return jdiValue;
668 }
669
670 @Override
671 void setValue0(Value val) throws ParseException {
672 throw new ParseException("Cannot set constant: " + value);
673 }
674
675 @Override
676 void invokeWith(List<Value> arguments) throws ParseException {
677 throw new ParseException("Constant is not a method");
678 }
679 }
680
681 static LValue make(VirtualMachine vm, boolean val) {
682 return new LValueConstant(vm.mirrorOf(val));
683 }
684
685 static LValue make(VirtualMachine vm, byte val) {
686 return new LValueConstant(vm.mirrorOf(val));
687 }
688
689 static LValue make(VirtualMachine vm, char val) {
690 return new LValueConstant(vm.mirrorOf(val));
691 }
692
693 static LValue make(VirtualMachine vm, short val) {
694 return new LValueConstant(vm.mirrorOf(val));
695 }
696
697 static LValue make(VirtualMachine vm, int val) {
698 return new LValueConstant(vm.mirrorOf(val));
699 }
700
701 static LValue make(VirtualMachine vm, long val) {
702 return new LValueConstant(vm.mirrorOf(val));
703 }
704
705 static LValue make(VirtualMachine vm, float val) {
706 return new LValueConstant(vm.mirrorOf(val));
707 }
708
709 static LValue make(VirtualMachine vm, double val) {
710 return new LValueConstant(vm.mirrorOf(val));
711 }
712
713 static LValue make(VirtualMachine vm, String val) throws ParseException {
714 return new LValueConstant(vm.mirrorOf(val));
715 }
716
717 static LValue makeBoolean(VirtualMachine vm, Token token) {
718 return make(vm, token.image.charAt(0) == 't');
719 }
720
721 static LValue makeCharacter(VirtualMachine vm, Token token) {
722 return make(vm, token.image.charAt(1));
723 }
724
725 static LValue makeFloat(VirtualMachine vm, Token token) {
726 return make(vm, Float.valueOf(token.image).floatValue());
727 }
728
729 static LValue makeDouble(VirtualMachine vm, Token token) {
730 return make(vm, Double.valueOf(token.image).doubleValue());
731 }
732
733 static LValue makeInteger(VirtualMachine vm, Token token) {
734 return make(vm, Integer.parseInt(token.image));
735 }
736
737 static LValue makeShort(VirtualMachine vm, Token token) {
738 return make(vm, Short.parseShort(token.image));
739 }
740
741 static LValue makeLong(VirtualMachine vm, Token token) {
742 return make(vm, Long.parseLong(token.image));
743 }
744
745 static LValue makeByte(VirtualMachine vm, Token token) {
746 return make(vm, Byte.parseByte(token.image));
747 }
748
749 static LValue makeString(VirtualMachine vm,
750 Token token) throws ParseException {
751 int len = token.image.length();
752 return make(vm, token.image.substring(1,len-1));
753 }
754
755 static LValue makeNull(VirtualMachine vm,
756 Token token) throws ParseException {
757 return new LValueConstant(null);
758 }
759
760 static LValue makeThisObject(VirtualMachine vm,
761 ExpressionParser.GetFrame frameGetter,
762 Token token) throws ParseException {
763 if (frameGetter == null) {
764 throw new ParseException("No current thread");
765 } else {
766 try {
767 StackFrame frame = frameGetter.get();
768 ObjectReference thisObject = frame.thisObject();
769
770 if (thisObject==null) {
771 throw new ParseException(
772 "No 'this'. In native or static method");
773 } else {
774 return new LValueConstant(thisObject);
775 }
776 } catch (IncompatibleThreadStateException exc) {
777 throw new ParseException("Thread not suspended");
778 }
779 }
780 }
781
782 static LValue makeNewObject(VirtualMachine vm,
783 ExpressionParser.GetFrame frameGetter,
784 String className, List<Value> arguments) throws ParseException {
785 List<ReferenceType> classes = vm.classesByName(className);
786 if (classes.size() == 0) {
787 throw new ParseException("No class named: " + className);
788 }
789
790 if (classes.size() > 1) {
791 throw new ParseException("More than one class named: " +
792 className);
793 }
794 ReferenceType refType = classes.get(0);
795
796
797 if (!(refType instanceof ClassType)) {
798 throw new ParseException("Cannot create instance of interface " +
799 className);
800 }
801
802 ClassType classType = (ClassType)refType;
803 List<Method> methods = new ArrayList<Method>(classType.methods()); // writable
804 Iterator<Method> iter = methods.iterator();
805 while (iter.hasNext()) {
806 Method method = iter.next();
807 if (!method.isConstructor()) {
808 iter.remove();
809 }
810 }
811 Method constructor = LValue.resolveOverload(methods, arguments);
812
813 ObjectReference newObject;
814 try {
815 ThreadReference thread = frameGetter.get().thread();
816 newObject = classType.newInstance(thread, constructor, arguments, 0);
817 } catch (InvocationException ie) {
818 throw new ParseException("Exception in " + className + " constructor: " +
819 ie.exception().referenceType().name());
820 } catch (IncompatibleThreadStateException exc) {
821 throw new ParseException("Thread not suspended");
822 } catch (Exception e) {
823 /*
824 * TO DO: Better error handling
825 */
826 throw new ParseException("Unable to create " + className + " instance");
827 }
828 return new LValueConstant(newObject);
829 }
830
831 private static LValue nFields(LValue lval,
832 StringTokenizer izer,
833 ThreadReference thread)
834 throws ParseException {
835 if (!izer.hasMoreTokens()) {
836 return lval;
837 } else {
838 return nFields(lval.memberLValue(izer.nextToken(), thread), izer, thread);
839 }
840 }
841
842 static LValue makeName(VirtualMachine vm,
843 ExpressionParser.GetFrame frameGetter,
844 String name) throws ParseException {
845 StringTokenizer izer = new StringTokenizer(name, ".");
846 String first = izer.nextToken();
847 // check local variables
848 if (frameGetter != null) {
849 try {
850 StackFrame frame = frameGetter.get();
851 ThreadReference thread = frame.thread();
852 LocalVariable var;
853 try {
854 var = frame.visibleVariableByName(first);
855 } catch (AbsentInformationException e) {
856 var = null;
857 }
858 if (var != null) {
859 return nFields(new LValueLocal(frame, var), izer, thread);
860 } else {
861 ObjectReference thisObject = frame.thisObject();
862 if (thisObject != null) {
863 // check if it is a field of 'this'
864 LValue thisLValue = new LValueConstant(thisObject);
865 LValue fv;
866 try {
867 fv = thisLValue.memberLValue(first, thread);
868 } catch (ParseException exc) {
869 fv = null;
870 }
871 if (fv != null) {
872 return nFields(fv, izer, thread);
873 }
874 }
875 }
876 // check for class name
877 while (izer.hasMoreTokens()) {
878 List<ReferenceType> classes = vm.classesByName(first);
879 if (classes.size() > 0) {
880 if (classes.size() > 1) {
881 throw new ParseException("More than one class named: " +
882 first);
883 } else {
884 ReferenceType refType = classes.get(0);
885 LValue lval = new LValueStaticMember(refType,
886 izer.nextToken(), thread);
887 return nFields(lval, izer, thread);
888 }
889 }
890 first = first + '.' + izer.nextToken();
891 }
892 } catch (IncompatibleThreadStateException exc) {
893 throw new ParseException("Thread not suspended");
894 }
895 }
896 throw new ParseException("Name unknown: " + name);
897 }
898
899 static String stringValue(LValue lval, ExpressionParser.GetFrame frameGetter
900 ) throws ParseException {
901 Value val = lval.getMassagedValue(frameGetter);
902 if (val == null) {
903 return "null";
904 }
905 if (val instanceof StringReference) {
906 return ((StringReference)val).value();
907 }
908 return val.toString(); // is this correct in all cases?
909 }
910
911 static LValue booleanOperation(VirtualMachine vm, Token token,
912 LValue rightL,
913 LValue leftL) throws ParseException {
914 String op = token.image;
915 Value right = rightL.interiorGetValue();
916 Value left = leftL.interiorGetValue();
917 if ( !(right instanceof PrimitiveValue) ||
918 !(left instanceof PrimitiveValue) ) {
919 if (op.equals("==")) {
920 return make(vm, right.equals(left));
921 } else if (op.equals("!=")) {
922 return make(vm, !right.equals(left));
923 } else {
924 throw new ParseException("Operands or '" + op +
925 "' must be primitive");
926 }
927 }
928 // can compare any numeric doubles
929 double rr = ((PrimitiveValue)right).doubleValue();
930 double ll = ((PrimitiveValue)left).doubleValue();
931 boolean res;
932 if (op.equals("<")) {
933 res = rr < ll;
934 } else if (op.equals(">")) {
935 res = rr > ll;
936 } else if (op.equals("<=")) {
937 res = rr <= ll;
938 } else if (op.equals(">=")) {
939 res = rr >= ll;
940 } else if (op.equals("==")) {
941 res = rr == ll;
942 } else if (op.equals("!=")) {
943 res = rr != ll;
944 } else {
945 throw new ParseException("Unknown operation: " + op);
946 }
947 return make(vm, res);
948 }
949
950 static LValue operation(VirtualMachine vm, Token token,
951 LValue rightL, LValue leftL,
952 ExpressionParser.GetFrame frameGetter
953 ) throws ParseException {
954 String op = token.image;
955 Value right = rightL.interiorGetValue();
956 Value left = leftL.interiorGetValue();
957 if ((right instanceof StringReference) ||
958 (left instanceof StringReference)) {
959 if (op.equals("+")) {
960 // If one is an ObjectRef, we will need to invoke
961 // toString on it, so we need the thread.
962 return make(vm, stringValue(rightL, frameGetter) +
963 stringValue(leftL, frameGetter));
964 }
965 }
966 if ((right instanceof ObjectReference) ||
967 (left instanceof ObjectReference)) {
968 if (op.equals("==")) {
969 return make(vm, right.equals(left));
970 } else if (op.equals("!=")) {
971 return make(vm, !right.equals(left));
972 } else {
973 throw new ParseException("Invalid operation '" +
974 op + "' on an Object");
975 }
976 }
977 if ((right instanceof BooleanValue) ||
978 (left instanceof BooleanValue)) {
979 throw new ParseException("Invalid operation '" +
980 op + "' on a Boolean");
981 }
982 // from here on, we know it is a integer kind of type
983 PrimitiveValue primRight = (PrimitiveValue)right;
984 PrimitiveValue primLeft = (PrimitiveValue)left;
985 if ((primRight instanceof DoubleValue) ||
986 (primLeft instanceof DoubleValue)) {
987 double rr = primRight.doubleValue();
988 double ll = primLeft.doubleValue();
989 double res;
990 if (op.equals("+")) {
991 res = rr + ll;
992 } else if (op.equals("-")) {
993 res = rr - ll;
994 } else if (op.equals("*")) {
995 res = rr * ll;
996 } else if (op.equals("/")) {
997 res = rr / ll;
998 } else {
999 throw new ParseException("Unknown operation: " + op);
1000 }
1001 return make(vm, res);
1002 }
1003 if ((primRight instanceof FloatValue) ||
1004 (primLeft instanceof FloatValue)) {
1005 float rr = primRight.floatValue();
1006 float ll = primLeft.floatValue();
1007 float res;
1008 if (op.equals("+")) {
1009 res = rr + ll;
1010 } else if (op.equals("-")) {
1011 res = rr - ll;
1012 } else if (op.equals("*")) {
1013 res = rr * ll;
1014 } else if (op.equals("/")) {
1015 res = rr / ll;
1016 } else {
1017 throw new ParseException("Unknown operation: " + op);
1018 }
1019 return make(vm, res);
1020 }
1021 if ((primRight instanceof LongValue) ||
1022 (primLeft instanceof LongValue)) {
1023 long rr = primRight.longValue();
1024 long ll = primLeft.longValue();
1025 long res;
1026 if (op.equals("+")) {
1027 res = rr + ll;
1028 } else if (op.equals("-")) {
1029 res = rr - ll;
1030 } else if (op.equals("*")) {
1031 res = rr * ll;
1032 } else if (op.equals("/")) {
1033 res = rr / ll;
1034 } else {
1035 throw new ParseException("Unknown operation: " + op);
1036 }
1037 return make(vm, res);
1038 } else {
1039 int rr = primRight.intValue();
1040 int ll = primLeft.intValue();
1041 int res;
1042 if (op.equals("+")) {
1043 res = rr + ll;
1044 } else if (op.equals("-")) {
1045 res = rr - ll;
1046 } else if (op.equals("*")) {
1047 res = rr * ll;
1048 } else if (op.equals("/")) {
1049 res = rr / ll;
1050 } else {
1051 throw new ParseException("Unknown operation: " + op);
1052 }
1053 return make(vm, res);
1054 }
1055 }
1056}
java/pkg/com/sun/tools/example/debug/expr/ParseException.java+221−0
@@ -0,0 +1,221 @@
1/*
2 * Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 0.7pre6 */
27package com.sun.tools.example.debug.expr;
28
29/**
30 * This exception is thrown when parse errors are encountered.
31 * You can explicitly create objects of this exception type by
32 * calling the method generateParseException in the generated
33 * parser.
34 *
35 * You can modify this class to customize your error reporting
36 * mechanisms so long as you retain the public fields.
37 */
38public class ParseException extends Exception {
39
40 private static final long serialVersionUID = 7978489144303647901L;
41
42 /**
43 * This constructor is used by the method "generateParseException"
44 * in the generated parser. Calling this constructor generates
45 * a new object of this type with the fields "currentToken",
46 * "expectedTokenSequences", and "tokenImage" set. The boolean
47 * flag "specialConstructor" is also set to true to indicate that
48 * this constructor was used to create this object.
49 * This constructor calls its super class with the empty string
50 * to force the "toString" method of parent class "Throwable" to
51 * print the error message in the form:
52 * ParseException: <result of getMessage>
53 */
54 public ParseException(Token currentTokenVal,
55 int[][] expectedTokenSequencesVal,
56 String[] tokenImageVal
57 )
58 {
59 super("");
60 specialConstructor = true;
61 currentToken = currentTokenVal;
62 expectedTokenSequences = expectedTokenSequencesVal;
63 tokenImage = tokenImageVal;
64 }
65
66 /**
67 * The following constructors are for use by you for whatever
68 * purpose you can think of. Constructing the exception in this
69 * manner makes the exception behave in the normal way - i.e., as
70 * documented in the class "Throwable". The fields "errorToken",
71 * "expectedTokenSequences", and "tokenImage" do not contain
72 * relevant information. The JavaCC generated code does not use
73 * these constructors.
74 */
75
76 public ParseException() {
77 super();
78 specialConstructor = false;
79 }
80
81 public ParseException(String message) {
82 super(message);
83 specialConstructor = false;
84 }
85
86 /**
87 * This variable determines which constructor was used to create
88 * this object and thereby affects the semantics of the
89 * "getMessage" method (see below).
90 */
91 protected boolean specialConstructor;
92
93 /**
94 * This is the last token that has been consumed successfully. If
95 * this object has been created due to a parse error, the token
96 * followng this token will (therefore) be the first error token.
97 */
98 public Token currentToken;
99
100 /**
101 * Each entry in this array is an array of integers. Each array
102 * of integers represents a sequence of tokens (by their ordinal
103 * values) that is expected at this point of the parse.
104 */
105 public int[][] expectedTokenSequences;
106
107 /**
108 * This is a reference to the "tokenImage" array of the generated
109 * parser within which the parse error occurred. This array is
110 * defined in the generated ...Constants interface.
111 */
112 public String[] tokenImage;
113
114 /**
115 * This method has the standard behavior when this object has been
116 * created using the standard constructors. Otherwise, it uses
117 * "currentToken" and "expectedTokenSequences" to generate a parse
118 * error message and returns it. If this object has been created
119 * due to a parse error, and you do not catch it (it gets thrown
120 * from the parser), then this method is called during the printing
121 * of the final stack trace, and hence the correct error message
122 * gets displayed.
123 */
124 @Override
125 public String getMessage() {
126 if (!specialConstructor) {
127 return super.getMessage();
128 }
129 String expected = "";
130 int maxSize = 0;
131 for (int[] expectedTokenSequence : expectedTokenSequences) {
132 if (maxSize < expectedTokenSequence.length) {
133 maxSize = expectedTokenSequence.length;
134 }
135 for (int j = 0; j < expectedTokenSequence.length; j++) {
136 expected += tokenImage[expectedTokenSequence[j]] + " ";
137 }
138 if (expectedTokenSequence[expectedTokenSequence.length - 1] != 0) {
139 expected += "...";
140 }
141 expected += eol + " ";
142 }
143 String retval = "Encountered \"";
144 Token tok = currentToken.next;
145 for (int i = 0; i < maxSize; i++) {
146 if (i != 0) {
147 retval += " ";
148 }
149 if (tok.kind == 0) {
150 retval += tokenImage[0];
151 break;
152 }
153 retval += add_escapes(tok.image);
154 tok = tok.next;
155 }
156 retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn + "." + eol;
157 if (expectedTokenSequences.length == 1) {
158 retval += "Was expecting:" + eol + " ";
159 } else {
160 retval += "Was expecting one of:" + eol + " ";
161 }
162 retval += expected;
163 return retval;
164 }
165
166 /**
167 * The end of line string for this machine.
168 */
169 protected String eol = System.getProperty("line.separator", "\n");
170
171 /**
172 * Used to convert raw characters to their escaped version
173 * when these raw version cannot be used as part of an ASCII
174 * string literal.
175 */
176 protected String add_escapes(String str) {
177 StringBuffer retval = new StringBuffer();
178 char ch;
179 for (int i = 0; i < str.length(); i++) {
180 switch (str.charAt(i))
181 {
182 case 0 :
183 continue;
184 case '\b':
185 retval.append("\\b");
186 continue;
187 case '\t':
188 retval.append("\\t");
189 continue;
190 case '\n':
191 retval.append("\\n");
192 continue;
193 case '\f':
194 retval.append("\\f");
195 continue;
196 case '\r':
197 retval.append("\\r");
198 continue;
199 case '\"':
200 retval.append("\\\"");
201 continue;
202 case '\'':
203 retval.append("\\\'");
204 continue;
205 case '\\':
206 retval.append("\\\\");
207 continue;
208 default:
209 if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
210 String s = "0000" + Integer.toString(ch, 16);
211 retval.append("\\u" + s.substring(s.length() - 4, s.length()));
212 } else {
213 retval.append(ch);
214 }
215 continue;
216 }
217 }
218 return retval.toString();
219 }
220
221}
java/pkg/com/sun/tools/example/debug/expr/Token.java+107−0
@@ -0,0 +1,107 @@
1/*
2 * Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26/* Generated By:JavaCC: Do not edit this line. Token.java Version 0.7pre3 */
27package com.sun.tools.example.debug.expr;
28
29/**
30 * Describes the input token stream.
31 */
32
33public class Token {
34
35 /**
36 * An integer that describes the kind of this token. This numbering
37 * system is determined by JavaCCParser, and a table of these numbers is
38 * stored in the file ...Constants.java.
39 */
40 public int kind;
41
42 /**
43 * beginLine and beginColumn describe the position of the first character
44 * of this token; endLine and endColumn describe the position of the
45 * last character of this token.
46 */
47 public int beginLine, beginColumn, endLine, endColumn;
48
49 /**
50 * The string image of the token.
51 */
52 public String image;
53
54 /**
55 * A reference to the next regular (non-special) token from the input
56 * stream. If this is the last token from the input stream, or if the
57 * token manager has not read tokens beyond this one, this field is
58 * set to null. This is true only if this token is also a regular
59 * token. Otherwise, see below for a description of the contents of
60 * this field.
61 */
62 public Token next;
63
64 /**
65 * This field is used to access special tokens that occur prior to this
66 * token, but after the immediately preceding regular (non-special) token.
67 * If there are no such special tokens, this field is set to null.
68 * When there are more than one such special token, this field refers
69 * to the last of these special tokens, which in turn refers to the next
70 * previous special token through its specialToken field, and so on
71 * until the first special token (whose specialToken field is null).
72 * The next fields of special tokens refer to other special tokens that
73 * immediately follow it (without an intervening regular token). If there
74 * is no such token, this field is null.
75 */
76 public Token specialToken;
77
78 /**
79 * Returns the image.
80 */
81 @Override
82 public final String toString()
83 {
84 return image;
85 }
86
87 /**
88 * Returns a new Token object, by default. However, if you want, you
89 * can create and return subclass objects based on the value of ofKind.
90 * Simply add the cases to the switch for all those special cases.
91 * For example, if you have a subclass of Token called IDToken that
92 * you want to create if ofKind is ID, simlpy add something like :
93 *
94 * case MyParserConstants.ID : return new IDToken();
95 *
96 * to the following switch statement. Then you can cast matchedToken
97 * variable to the appropriate type and use it in your lexical actions.
98 */
99 public static final Token newToken(int ofKind)
100 {
101 switch(ofKind)
102 {
103 default : return new Token();
104 }
105 }
106
107}
java/pkg/com/sun/tools/example/debug/expr/TokenMgrError.java+161−0
@@ -0,0 +1,161 @@
1/*
2 * Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 0.7pre2 */
27package com.sun.tools.example.debug.expr;
28
29public class TokenMgrError extends Error
30{
31 /*
32 * Ordinals for various reasons why an Error of this type can be thrown.
33 */
34
35 private static final long serialVersionUID = -6236440836177601522L;
36
37 /**
38 * Lexical error occured.
39 */
40 static final int LEXICAL_ERROR = 0;
41
42 /**
43 * An attempt wass made to create a second instance of a static token manager.
44 */
45 static final int STATIC_LEXER_ERROR = 1;
46
47 /**
48 * Tried to change to an invalid lexical state.
49 */
50 static final int INVALID_LEXICAL_STATE = 2;
51
52 /**
53 * Detected (and bailed out of) an infinite loop in the token manager.
54 */
55 static final int LOOP_DETECTED = 3;
56
57 /**
58 * Indicates the reason why the exception is thrown. It will have
59 * one of the above 4 values.
60 */
61 int errorCode;
62
63 /**
64 * Replaces unprintable characters by their espaced (or unicode escaped)
65 * equivalents in the given string
66 */
67 protected static final String addEscapes(String str) {
68 StringBuffer retval = new StringBuffer();
69 char ch;
70 for (int i = 0; i < str.length(); i++) {
71 switch (str.charAt(i))
72 {
73 case 0 :
74 continue;
75 case '\b':
76 retval.append("\\b");
77 continue;
78 case '\t':
79 retval.append("\\t");
80 continue;
81 case '\n':
82 retval.append("\\n");
83 continue;
84 case '\f':
85 retval.append("\\f");
86 continue;
87 case '\r':
88 retval.append("\\r");
89 continue;
90 case '\"':
91 retval.append("\\\"");
92 continue;
93 case '\'':
94 retval.append("\\\'");
95 continue;
96 case '\\':
97 retval.append("\\\\");
98 continue;
99 default:
100 if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
101 String s = "0000" + Integer.toString(ch, 16);
102 retval.append("\\u" + s.substring(s.length() - 4, s.length()));
103 } else {
104 retval.append(ch);
105 }
106 continue;
107 }
108 }
109 return retval.toString();
110 }
111
112 /**
113 * Returns a detailed message for the Error when it is thrown by the
114 * token manager to indicate a lexical error.
115 * Parameters :
116 * EOFSeen : indicates if EOF caused the lexicl error
117 * curLexState : lexical state in which this error occured
118 * errorLine : line number when the error occured
119 * errorColumn : column number when the error occured
120 * errorAfter : prefix that was seen before this error occured
121 * curchar : the offending character
122 * Note: You can customize the lexical error message by modifying this method.
123 */
124 private static final String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) {
125 return("Lexical error at line " +
126 errorLine + ", column " +
127 errorColumn + ". Encountered: " +
128 (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") +
129 "after : \"" + addEscapes(errorAfter) + "\"");
130 }
131
132 /**
133 * You can also modify the body of this method to customize your error messages.
134 * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not
135 * of end-users concern, so you can return something like :
136 *
137 * "Internal Error : Please file a bug report .... "
138 *
139 * from this method for such cases in the release version of your parser.
140 */
141 @Override
142 public String getMessage() {
143 return super.getMessage();
144 }
145
146 /*
147 * Constructors of various flavors follow.
148 */
149
150 public TokenMgrError() {
151 }
152
153 public TokenMgrError(String message, int reason) {
154 super(message);
155 errorCode = reason;
156 }
157
158 public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) {
159 this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
160 }
161}
java/pkg/com/sun/tools/example/debug/expr/mkfile+15−0
@@ -0,0 +1,15 @@
1<../../../../../../../../mkconfig
2
3TARG=\
4 ASCII_UCodeESC_CharStream.dis\
5 ExpressionParser.dis\
6 ExpressionParserConstants.dis\
7 ExpressionParserTokenManager.dis\
8 LValue.dis\
9 ParseException.dis\
10 Token.dis\
11 TokenMgrError.dis\
12
13DISBIN=$ROOT/java/dis/java/java/com/sun/tools/example/debug/expr
14
15<$ROOT/mkfiles/mkjava