diff --git a/jdk/src/share/classes/com/sun/tools/example/debug/expr/Expr.jj b/jdk/src/share/classes/com/sun/tools/example/debug/expr/Expr.jj index ffe12e35d7f..ece3be3d693 100644 --- a/jdk/src/share/classes/com/sun/tools/example/debug/expr/Expr.jj +++ b/jdk/src/share/classes/com/sun/tools/example/debug/expr/Expr.jj @@ -539,10 +539,10 @@ void MultiplicativeExpression() : } void UnaryExpression() : -{} +{Token tok;} { - ( "+" | "-" ) UnaryExpression() - { throw new ParseException("operation not yet supported"); } + ( tok = "+" | tok = "-" ) UnaryExpression() + { push( LValue.operation(vm, tok, pop(), frameGetter) ); } | PreIncrementExpression() | @@ -566,10 +566,10 @@ void PreDecrementExpression() : } void UnaryExpressionNotPlusMinus() : -{} +{Token tok;} { - ( "~" | "!" ) UnaryExpression() - { throw new ParseException("operation not yet supported"); } + ( tok = "~" | tok = "!" ) UnaryExpression() + { push( LValue.operation(vm, tok, pop(), frameGetter) ); } | LOOKAHEAD( CastLookahead() ) CastExpression() diff --git a/jdk/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParser.java b/jdk/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParser.java index 5a566671491..5cf2229d301 100644 --- a/jdk/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParser.java +++ b/jdk/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParser.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,38 +23,28 @@ * questions. */ -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - /* Generated By:JavaCC: Do not edit this line. ExpressionParser.java */ package com.sun.tools.example.debug.expr; import com.sun.jdi.*; - import java.util.Stack; import java.util.List; import java.util.ArrayList; public class ExpressionParser implements ExpressionParserConstants { - Stack stack = new Stack(); + Stack stack = new Stack(); VirtualMachine vm = null; GetFrame frameGetter = null; private static GetFrame lastFrameGetter; private static LValue lastLValue; LValue peek() { - return stack.peek(); + return (LValue)stack.peek(); } LValue pop() { - return stack.pop(); + return (LValue)stack.pop(); } void push(LValue lval) { @@ -62,7 +52,7 @@ void push(LValue lval) { } public static Value getMassagedValue() throws ParseException { - return lastLValue.getMassagedValue(lastFrameGetter); + return lastLValue.getMassagedValue(lastFrameGetter); } public interface GetFrame { @@ -70,14 +60,17 @@ public interface GetFrame { } public static Value evaluate(String expr, VirtualMachine vm, - GetFrame frameGetter) throws ParseException, InvocationException, - InvalidTypeException, ClassNotLoadedException, + GetFrame frameGetter) throws ParseException, + InvocationException, + InvalidTypeException, + ClassNotLoadedException, IncompatibleThreadStateException { // TODO StringBufferInputStream is deprecated. java.io.InputStream in = new java.io.StringBufferInputStream(expr); ExpressionParser parser = new ExpressionParser(in); parser.vm = vm; parser.frameGetter = frameGetter; + Value value = null; parser.Expression(); lastFrameGetter = frameGetter; lastLValue = parser.pop(); @@ -95,8 +88,8 @@ public static void main(String args[]) { try { parser = new ExpressionParser(new java.io.FileInputStream(args[0])); } catch (java.io.FileNotFoundException e) { - System.out.println("Java Parser Version 1.0.2: File " + args[0] - + " not found."); + System.out.println("Java Parser Version 1.0.2: File " + + args[0] + " not found."); return; } } else { @@ -143,7 +136,8 @@ final public void Type() throws ParseException { jj_consume_token(-1); throw new ParseException(); } - label_1: while (true) { + label_1: + while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: ; @@ -194,7 +188,8 @@ final public String Name() throws ParseException { StringBuffer sb = new StringBuffer(); jj_consume_token(IDENTIFIER); sb.append(token); - label_2: while (true) { + label_2: + while (true) { if (jj_2_1(2)) { ; } else { @@ -202,18 +197,16 @@ final public String Name() throws ParseException { } jj_consume_token(DOT); jj_consume_token(IDENTIFIER); - sb.append('.'); - sb.append(token); - } - if (true) { - return sb.toString(); - } + sb.append('.'); sb.append(token); + } + {if (true) return sb.toString();} throw new Error("Missing return statement in function"); } final public void NameList() throws ParseException { Name(); - label_3: while (true) { + label_3: + while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; @@ -267,9 +260,7 @@ final public void Assignment() throws ParseException { PrimaryExpression(); AssignmentOperator(); Expression(); - LValue exprVal = pop(); - pop().setValue(exprVal); - push(exprVal); + LValue exprVal = pop(); pop().setValue(exprVal); push(exprVal); } final public void AssignmentOperator() throws ParseException { @@ -325,18 +316,13 @@ final public void ConditionalExpression() throws ParseException { Expression(); jj_consume_token(COLON); ConditionalExpression(); - LValue falseBranch = pop(); - LValue trueBranch = pop(); + LValue falseBranch = pop(); LValue trueBranch = pop(); Value cond = pop().interiorGetValue(); if (cond instanceof BooleanValue) { - push(((BooleanValue) cond).booleanValue() ? trueBranch - : falseBranch); + push(((BooleanValue)cond).booleanValue()? + trueBranch : falseBranch); } else { - { - if (true) { - throw new ParseException("Condition must be boolean"); - } - } + {if (true) throw new ParseException("Condition must be boolean");} } break; default: @@ -347,7 +333,8 @@ final public void ConditionalExpression() throws ParseException { final public void ConditionalOrExpression() throws ParseException { ConditionalAndExpression(); - label_4: while (true) { + label_4: + while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SC_OR: ; @@ -358,17 +345,14 @@ final public void ConditionalOrExpression() throws ParseException { } jj_consume_token(SC_OR); ConditionalAndExpression(); - { - if (true) { - throw new ParseException("operation not yet supported"); - } - } + {if (true) throw new ParseException("operation not yet supported");} } } final public void ConditionalAndExpression() throws ParseException { InclusiveOrExpression(); - label_5: while (true) { + label_5: + while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SC_AND: ; @@ -379,17 +363,14 @@ final public void ConditionalAndExpression() throws ParseException { } jj_consume_token(SC_AND); InclusiveOrExpression(); - { - if (true) { - throw new ParseException("operation not yet supported"); - } - } + {if (true) throw new ParseException("operation not yet supported");} } } final public void InclusiveOrExpression() throws ParseException { ExclusiveOrExpression(); - label_6: while (true) { + label_6: + while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BIT_OR: ; @@ -400,17 +381,14 @@ final public void InclusiveOrExpression() throws ParseException { } jj_consume_token(BIT_OR); ExclusiveOrExpression(); - { - if (true) { - throw new ParseException("operation not yet supported"); - } - } + {if (true) throw new ParseException("operation not yet supported");} } } final public void ExclusiveOrExpression() throws ParseException { AndExpression(); - label_7: while (true) { + label_7: + while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case XOR: ; @@ -421,17 +399,14 @@ final public void ExclusiveOrExpression() throws ParseException { } jj_consume_token(XOR); AndExpression(); - { - if (true) { - throw new ParseException("operation not yet supported"); - } - } + {if (true) throw new ParseException("operation not yet supported");} } } final public void AndExpression() throws ParseException { EqualityExpression(); - label_8: while (true) { + label_8: + while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BIT_AND: ; @@ -442,18 +417,15 @@ final public void AndExpression() throws ParseException { } jj_consume_token(BIT_AND); EqualityExpression(); - { - if (true) { - throw new ParseException("operation not yet supported"); - } - } + {if (true) throw new ParseException("operation not yet supported");} } } final public void EqualityExpression() throws ParseException { Token tok; InstanceOfExpression(); - label_9: while (true) { + label_9: + while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EQ: case NE: @@ -487,11 +459,7 @@ final public void InstanceOfExpression() throws ParseException { case INSTANCEOF: jj_consume_token(INSTANCEOF); Type(); - { - if (true) { - throw new ParseException("operation not yet supported"); - } - } + {if (true) throw new ParseException("operation not yet supported");} break; default: jj_la1[14] = jj_gen; @@ -502,7 +470,8 @@ final public void InstanceOfExpression() throws ParseException { final public void RelationalExpression() throws ParseException { Token tok; ShiftExpression(); - label_10: while (true) { + label_10: + while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case GT: case LT: @@ -540,7 +509,8 @@ final public void RelationalExpression() throws ParseException { final public void ShiftExpression() throws ParseException { AdditiveExpression(); - label_11: while (true) { + label_11: + while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LSHIFT: case RSIGNEDSHIFT: @@ -567,18 +537,15 @@ final public void ShiftExpression() throws ParseException { throw new ParseException(); } AdditiveExpression(); - { - if (true) { - throw new ParseException("operation not yet supported"); - } - } + {if (true) throw new ParseException("operation not yet supported");} } } final public void AdditiveExpression() throws ParseException { Token tok; MultiplicativeExpression(); - label_12: while (true) { + label_12: + while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PLUS: case MINUS: @@ -609,7 +576,8 @@ final public void AdditiveExpression() throws ParseException { final public void MultiplicativeExpression() throws ParseException { Token tok; UnaryExpression(); - label_13: while (true) { + label_13: + while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STAR: case SLASH: @@ -642,15 +610,16 @@ final public void MultiplicativeExpression() throws ParseException { } final public void UnaryExpression() throws ParseException { + Token tok; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PLUS: case MINUS: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PLUS: - jj_consume_token(PLUS); + tok = jj_consume_token(PLUS); break; case MINUS: - jj_consume_token(MINUS); + tok = jj_consume_token(MINUS); break; default: jj_la1[23] = jj_gen; @@ -658,11 +627,7 @@ final public void UnaryExpression() throws ParseException { throw new ParseException(); } UnaryExpression(); - { - if (true) { - throw new ParseException("operation not yet supported"); - } - } + push( LValue.operation(vm, tok, pop(), frameGetter) ); break; case INCR: PreIncrementExpression(); @@ -696,33 +661,26 @@ final public void UnaryExpression() throws ParseException { final public void PreIncrementExpression() throws ParseException { jj_consume_token(INCR); PrimaryExpression(); - { - if (true) { - throw new ParseException("operation not yet supported"); - } - } + {if (true) throw new ParseException("operation not yet supported");} } final public void PreDecrementExpression() throws ParseException { jj_consume_token(DECR); PrimaryExpression(); - { - if (true) { - throw new ParseException("operation not yet supported"); - } - } + {if (true) throw new ParseException("operation not yet supported");} } final public void UnaryExpressionNotPlusMinus() throws ParseException { + Token tok; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BANG: case TILDE: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case TILDE: - jj_consume_token(TILDE); + tok = jj_consume_token(TILDE); break; case BANG: - jj_consume_token(BANG); + tok = jj_consume_token(BANG); break; default: jj_la1[25] = jj_gen; @@ -730,11 +688,7 @@ final public void UnaryExpressionNotPlusMinus() throws ParseException { throw new ParseException(); } UnaryExpression(); - { - if (true) { - throw new ParseException("operation not yet supported"); - } - } + push( LValue.operation(vm, tok, pop(), frameGetter) ); break; default: jj_la1[26] = jj_gen; @@ -765,10 +719,8 @@ final public void UnaryExpressionNotPlusMinus() throws ParseException { } } - // This production is to determine lookahead only. The LOOKAHEAD - // specifications - // below are not used, but they are there just to indicate that we know - // about +// This production is to determine lookahead only. The LOOKAHEAD specifications +// below are not used, but they are there just to indicate that we know about // this. final public void CastLookahead() throws ParseException { if (jj_2_4(2)) { @@ -841,11 +793,7 @@ final public void PostfixExpression() throws ParseException { break; case DECR: jj_consume_token(DECR); - { - if (true) { - throw new ParseException("operation not yet supported"); - } - } + {if (true) throw new ParseException("operation not yet supported");} break; default: jj_la1[30] = jj_gen; @@ -863,7 +811,8 @@ final public void CastExpression() throws ParseException { if (jj_2_6(2)) { jj_consume_token(LPAREN); PrimitiveType(); - label_14: while (true) { + label_14: + while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: ; @@ -882,7 +831,8 @@ final public void CastExpression() throws ParseException { case LPAREN: jj_consume_token(LPAREN); Name(); - label_15: while (true) { + label_15: + while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: ; @@ -907,7 +857,8 @@ final public void CastExpression() throws ParseException { final public void PrimaryExpression() throws ParseException { PrimaryPrefix(); - label_16: while (true) { + label_16: + while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: case LBRACKET: @@ -946,11 +897,7 @@ final public void PrimaryPrefix() throws ParseException { jj_consume_token(SUPER); jj_consume_token(DOT); jj_consume_token(IDENTIFIER); - { - if (true) { - throw new ParseException("operation not yet supported"); - } - } + {if (true) throw new ParseException("operation not yet supported");} break; case LPAREN: jj_consume_token(LPAREN); @@ -968,7 +915,7 @@ final public void PrimaryPrefix() throws ParseException { } final public void PrimarySuffix() throws ParseException { - List argList; + List argList; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: jj_consume_token(LBRACKET); @@ -1046,8 +993,8 @@ final public void NullLiteral() throws ParseException { jj_consume_token(NULL); } - final public List Arguments() throws ParseException { - List argList = new ArrayList(); + final public List Arguments() throws ParseException { + List argList = new ArrayList(); jj_consume_token(LPAREN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case FALSE: @@ -1075,18 +1022,15 @@ final public List Arguments() throws ParseException { ; } jj_consume_token(RPAREN); - { - if (true) { - return argList; - } - } + {if (true) return argList;} throw new Error("Missing return statement in function"); } - final public void ArgumentList(List argList) throws ParseException { + final public void ArgumentList(List argList) throws ParseException { Expression(); argList.add(pop().interiorGetValue()); - label_17: while (true) { + label_17: + while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; @@ -1102,8 +1046,7 @@ final public void ArgumentList(List argList) throws ParseException { } final public void AllocationExpression() throws ParseException { - List argList; - String className; + List argList; String className; if (jj_2_7(2)) { jj_consume_token(NEW); PrimitiveType(); @@ -1120,11 +1063,7 @@ final public void AllocationExpression() throws ParseException { break; case LBRACKET: ArrayDimensions(); - { - if (true) { - throw new ParseException("operation not yet supported"); - } - } + {if (true) throw new ParseException("operation not yet supported");} break; default: jj_la1[42] = jj_gen; @@ -1141,11 +1080,12 @@ final public void AllocationExpression() throws ParseException { } /* - * The second LOOKAHEAD specification below is to parse to PrimarySuffix if - * there is an expression between the "[...]". + * The second LOOKAHEAD specification below is to parse to PrimarySuffix + * if there is an expression between the "[...]". */ final public void ArrayDimensions() throws ParseException { - label_18: while (true) { + label_18: + while (true) { jj_consume_token(LBRACKET); Expression(); jj_consume_token(RBRACKET); @@ -1155,7 +1095,8 @@ final public void ArrayDimensions() throws ParseException { break label_18; } } - label_19: while (true) { + label_19: + while (true) { if (jj_2_9(2)) { ; } else { @@ -1166,2552 +1107,1060 @@ final public void ArrayDimensions() throws ParseException { } } - final private boolean jj_2_1(int xla) { - jj_la = xla; - jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_1(); - jj_save(0, xla); - return retval; + private boolean jj_2_1(int xla) { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_1(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(0, xla); } } - final private boolean jj_2_2(int xla) { - jj_la = xla; - jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_2(); - jj_save(1, xla); - return retval; + private boolean jj_2_2(int xla) { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_2(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(1, xla); } } - final private boolean jj_2_3(int xla) { - jj_la = xla; - jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_3(); - jj_save(2, xla); - return retval; + private boolean jj_2_3(int xla) { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_3(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(2, xla); } } - final private boolean jj_2_4(int xla) { - jj_la = xla; - jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_4(); - jj_save(3, xla); - return retval; + private boolean jj_2_4(int xla) { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_4(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(3, xla); } } - final private boolean jj_2_5(int xla) { - jj_la = xla; - jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_5(); - jj_save(4, xla); - return retval; + private boolean jj_2_5(int xla) { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_5(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(4, xla); } } - final private boolean jj_2_6(int xla) { - jj_la = xla; - jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_6(); - jj_save(5, xla); - return retval; + private boolean jj_2_6(int xla) { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_6(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(5, xla); } } - final private boolean jj_2_7(int xla) { - jj_la = xla; - jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_7(); - jj_save(6, xla); - return retval; + private boolean jj_2_7(int xla) { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_7(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(6, xla); } } - final private boolean jj_2_8(int xla) { - jj_la = xla; - jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_8(); - jj_save(7, xla); - return retval; + private boolean jj_2_8(int xla) { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_8(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(7, xla); } } - final private boolean jj_2_9(int xla) { - jj_la = xla; - jj_lastpos = jj_scanpos = token; - boolean retval = !jj_3_9(); - jj_save(8, xla); - return retval; + private boolean jj_2_9(int xla) { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_9(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(8, xla); } } - final private boolean jj_3R_154() { - if (jj_scan_token(INCR)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_94() { + if (jj_scan_token(DECR)) return true; + if (jj_3R_20()) return true; return false; } - final private boolean jj_3R_151() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_154()) { - jj_scanpos = xsp; - if (jj_3R_155()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_86() { + if (jj_3R_24()) return true; return false; } - final private boolean jj_3R_148() { - Token xsp; - xsp = jj_scanpos; - if (jj_3_6()) { - jj_scanpos = xsp; - if (jj_3R_150()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_93() { + if (jj_scan_token(INCR)) return true; + if (jj_3R_20()) return true; return false; } - final private boolean jj_3_6() { - if (jj_scan_token(LPAREN)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_23()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_152()) { - jj_scanpos = xsp; - break; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } - if (jj_scan_token(RPAREN)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_115()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_91() { + if (jj_3R_95()) return true; return false; } - final private boolean jj_3R_25() { + private boolean jj_3R_23() { Token xsp; xsp = jj_scanpos; - if (jj_3R_50()) { + if (jj_scan_token(10)) { jj_scanpos = xsp; - if (jj_3R_51()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + if (jj_scan_token(15)) { + jj_scanpos = xsp; + if (jj_scan_token(12)) { + jj_scanpos = xsp; + if (jj_scan_token(45)) { + jj_scanpos = xsp; + if (jj_scan_token(34)) { + jj_scanpos = xsp; + if (jj_scan_token(36)) { + jj_scanpos = xsp; + if (jj_scan_token(27)) { + jj_scanpos = xsp; + if (jj_scan_token(21)) return true; + } + } + } + } + } + } + } return false; } - final private boolean jj_3R_50() { - if (jj_3R_67()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_90() { + if (jj_3R_94()) return true; return false; } - final private boolean jj_3_5() { - if (jj_scan_token(LPAREN)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_24()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_scan_token(LBRACKET)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_89() { + if (jj_3R_93()) return true; return false; } - final private boolean jj_3R_149() { - if (jj_3R_20()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_85() { + if (jj_3R_23()) return true; + return false; + } + + private boolean jj_3R_60() { + if (jj_3R_58()) return true; + return false; + } + + private boolean jj_3R_88() { Token xsp; xsp = jj_scanpos; - if (jj_3R_151()) { - jj_scanpos = xsp; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + if (jj_scan_token(94)) { + jj_scanpos = xsp; + if (jj_scan_token(95)) return true; + } + if (jj_3R_83()) return true; return false; } - final private boolean jj_3R_41() { - if (jj_scan_token(LPAREN)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_24()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_scan_token(RPAREN)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_83() { Token xsp; xsp = jj_scanpos; - if (jj_3R_59()) { + if (jj_3R_88()) { jj_scanpos = xsp; - if (jj_3R_60()) { + if (jj_3R_89()) { jj_scanpos = xsp; - if (jj_3R_61()) { + if (jj_3R_90()) { jj_scanpos = xsp; - if (jj_3R_62()) { - jj_scanpos = xsp; - if (jj_3R_63()) { + if (jj_3R_91()) return true; + } + } + } + return false; + } + + private boolean jj_3R_82() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_85()) { jj_scanpos = xsp; - if (jj_3R_64()) { + if (jj_3R_86()) return true; + } + while (true) { + xsp = jj_scanpos; + if (jj_3R_87()) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3R_59() { + if (jj_3R_55()) return true; + return false; + } + + private boolean jj_3R_96() { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(96)) { jj_scanpos = xsp; - if (jj_3R_65()) { + if (jj_scan_token(97)) { jj_scanpos = xsp; - if (jj_3R_66()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + if (jj_scan_token(101)) return true; + } + } + if (jj_3R_83()) return true; return false; } - final private boolean jj_3R_40() { - if (jj_scan_token(LPAREN)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_24()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_scan_token(LBRACKET)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_scan_token(RBRACKET)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_80() { + if (jj_3R_83()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_96()) { jj_scanpos = xsp; break; } + } return false; } - final private boolean jj_3R_123() { - if (jj_scan_token(LBRACKET)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_scan_token(RBRACKET)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_92() { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(94)) { + jj_scanpos = xsp; + if (jj_scan_token(95)) return true; + } + if (jj_3R_80()) return true; return false; } - final private boolean jj_3_1() { - if (jj_scan_token(DOT)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_scan_token(IDENTIFIER)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3_8() { + if (jj_scan_token(LBRACKET)) return true; + if (jj_3R_25()) return true; + if (jj_scan_token(RBRACKET)) return true; return false; } - final private boolean jj_3_4() { - if (jj_scan_token(LPAREN)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_23()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_58() { + Token xsp; + if (jj_3_8()) return true; + while (true) { + xsp = jj_scanpos; + if (jj_3_8()) { jj_scanpos = xsp; break; } + } + while (true) { + xsp = jj_scanpos; + if (jj_3_9()) { jj_scanpos = xsp; break; } + } return false; } - final private boolean jj_3R_22() { + private boolean jj_3R_84() { Token xsp; xsp = jj_scanpos; - if (jj_3_4()) { + if (jj_scan_token(102)) { jj_scanpos = xsp; - if (jj_3R_40()) { + if (jj_scan_token(103)) { jj_scanpos = xsp; - if (jj_3R_41()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + if (jj_scan_token(104)) return true; + } + } + if (jj_3R_78()) return true; return false; } - final private boolean jj_3_3() { - if (jj_3R_22()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_78() { + if (jj_3R_80()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_92()) { jj_scanpos = xsp; break; } + } return false; } - final private boolean jj_3R_24() { - if (jj_scan_token(IDENTIFIER)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_54() { + if (jj_scan_token(NEW)) return true; + if (jj_3R_24()) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_59()) { + jj_scanpos = xsp; + if (jj_3R_60()) return true; + } + return false; + } + + private boolean jj_3R_76() { + if (jj_3R_78()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3_1()) { - jj_scanpos = xsp; - break; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + if (jj_3R_84()) { jj_scanpos = xsp; break; } } return false; } - final private boolean jj_3R_147() { - if (jj_scan_token(BANG)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_81() { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(81)) { + jj_scanpos = xsp; + if (jj_scan_token(80)) { + jj_scanpos = xsp; + if (jj_scan_token(87)) { + jj_scanpos = xsp; + if (jj_scan_token(88)) return true; + } + } + } + if (jj_3R_76()) return true; return false; } - final private boolean jj_3R_142() { - if (jj_3R_149()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_43() { + Token xsp; + xsp = jj_scanpos; + if (jj_3_7()) { + jj_scanpos = xsp; + if (jj_3R_54()) return true; + } return false; } - final private boolean jj_3R_122() { - if (jj_3R_24()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3_7() { + if (jj_scan_token(NEW)) return true; + if (jj_3R_23()) return true; + if (jj_3R_58()) return true; return false; } - final private boolean jj_3R_49() { - if (jj_scan_token(DOUBLE)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_67() { + if (jj_scan_token(COMMA)) return true; + if (jj_3R_25()) return true; return false; } - final private boolean jj_3R_141() { - if (jj_3R_148()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_64() { + if (jj_3R_25()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_67()) { jj_scanpos = xsp; break; } + } return false; } - final private boolean jj_3R_48() { - if (jj_scan_token(FLOAT)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_61() { + if (jj_3R_64()) return true; return false; } - final private boolean jj_3R_146() { - if (jj_scan_token(TILDE)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_79() { + if (jj_scan_token(INSTANCEOF)) return true; + if (jj_3R_82()) return true; return false; } - final private boolean jj_3R_47() { - if (jj_scan_token(LONG)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_74() { + if (jj_3R_76()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_81()) { jj_scanpos = xsp; break; } + } return false; } - final private boolean jj_3R_140() { + private boolean jj_3R_55() { + if (jj_scan_token(LPAREN)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_146()) { - jj_scanpos = xsp; - if (jj_3R_147()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_115()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + if (jj_3R_61()) jj_scanpos = xsp; + if (jj_scan_token(RPAREN)) return true; return false; } - final private boolean jj_3R_136() { + private boolean jj_3R_72() { + if (jj_3R_74()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_140()) { - jj_scanpos = xsp; - if (jj_3R_141()) { - jj_scanpos = xsp; - if (jj_3R_142()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + if (jj_3R_79()) jj_scanpos = xsp; return false; } - final private boolean jj_3R_46() { - if (jj_scan_token(INT)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_77() { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(86)) { + jj_scanpos = xsp; + if (jj_scan_token(89)) return true; + } + if (jj_3R_72()) return true; return false; } - final private boolean jj_3R_145() { - if (jj_scan_token(REM)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_75() { + if (jj_scan_token(BIT_AND)) return true; + if (jj_3R_70()) return true; return false; } - final private boolean jj_3R_45() { - if (jj_scan_token(SHORT)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_70() { + if (jj_3R_72()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_77()) { jj_scanpos = xsp; break; } + } return false; } - final private boolean jj_3R_44() { - if (jj_scan_token(BYTE)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_135() { - if (jj_scan_token(DECR)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_20()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_43() { - if (jj_scan_token(CHAR)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_23() { + private boolean jj_3R_57() { Token xsp; xsp = jj_scanpos; - if (jj_3R_42()) { - jj_scanpos = xsp; - if (jj_3R_43()) { + if (jj_scan_token(54)) { jj_scanpos = xsp; - if (jj_3R_44()) { - jj_scanpos = xsp; - if (jj_3R_45()) { - jj_scanpos = xsp; - if (jj_3R_46()) { - jj_scanpos = xsp; - if (jj_3R_47()) { - jj_scanpos = xsp; - if (jj_3R_48()) { - jj_scanpos = xsp; - if (jj_3R_49()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_42() { - if (jj_scan_token(BOOLEAN)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3_9() { - if (jj_scan_token(LBRACKET)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_scan_token(RBRACKET)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_121() { - if (jj_3R_23()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + if (jj_scan_token(24)) return true; + } return false; } - final private boolean jj_3R_144() { - if (jj_scan_token(SLASH)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_53() { + if (jj_scan_token(39)) return true; return false; } - final private boolean jj_3R_134() { - if (jj_scan_token(INCR)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_20()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_39() { + if (jj_3R_42()) return true; return false; } - final private boolean jj_3R_114() { + private boolean jj_3R_68() { + if (jj_3R_70()) return true; Token xsp; - xsp = jj_scanpos; - if (jj_3R_121()) { - jj_scanpos = xsp; - if (jj_3R_122()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } while (true) { xsp = jj_scanpos; - if (jj_3R_123()) { - jj_scanpos = xsp; - break; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + if (jj_3R_75()) { jj_scanpos = xsp; break; } } return false; } - final private boolean jj_3R_120() { - if (jj_scan_token(GE)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_133() { - if (jj_scan_token(MINUS)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_127() { - if (jj_3R_136()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_126() { - if (jj_3R_135()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_139() { - if (jj_scan_token(MINUS)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_125() { - if (jj_3R_134()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_132() { - if (jj_scan_token(PLUS)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_143() { - if (jj_scan_token(STAR)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_124() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_132()) { - jj_scanpos = xsp; - if (jj_3R_133()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_115()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_115() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_124()) { - jj_scanpos = xsp; - if (jj_3R_125()) { - jj_scanpos = xsp; - if (jj_3R_126()) { - jj_scanpos = xsp; - if (jj_3R_127()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_137() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_143()) { - jj_scanpos = xsp; - if (jj_3R_144()) { - jj_scanpos = xsp; - if (jj_3R_145()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_115()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_73() { + if (jj_scan_token(XOR)) return true; + if (jj_3R_68()) return true; return false; } - final private boolean jj_3R_131() { - if (jj_scan_token(RUNSIGNEDSHIFT)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_52() { + if (jj_3R_57()) return true; return false; } - final private boolean jj_3R_119() { - if (jj_scan_token(LE)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_51() { + if (jj_scan_token(STRING_LITERAL)) return true; return false; } - final private boolean jj_3R_138() { - if (jj_scan_token(PLUS)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_50() { + if (jj_scan_token(CHARACTER_LITERAL)) return true; return false; } - final private boolean jj_3R_112() { - if (jj_3R_115()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_65() { + if (jj_3R_68()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_137()) { - jj_scanpos = xsp; - break; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + if (jj_3R_73()) { jj_scanpos = xsp; break; } } return false; } - final private boolean jj_3R_88() { - if (jj_3R_86()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_71() { + if (jj_scan_token(BIT_OR)) return true; + if (jj_3R_65()) return true; return false; } - final private boolean jj_3R_130() { - if (jj_scan_token(RSIGNEDSHIFT)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_49() { + if (jj_scan_token(FLOATING_POINT_LITERAL)) return true; return false; } - final private boolean jj_3R_128() { + private boolean jj_3R_42() { Token xsp; xsp = jj_scanpos; - if (jj_3R_138()) { + if (jj_3R_48()) { jj_scanpos = xsp; - if (jj_3R_139()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_112()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_87() { - if (jj_3R_82()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_118() { - if (jj_scan_token(GT)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_129() { - if (jj_scan_token(LSHIFT)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_116() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_129()) { + if (jj_3R_49()) { jj_scanpos = xsp; - if (jj_3R_130()) { + if (jj_3R_50()) { jj_scanpos = xsp; - if (jj_3R_131()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_108()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_108() { - if (jj_3R_112()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_128()) { - jj_scanpos = xsp; - break; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + if (jj_3R_51()) { + jj_scanpos = xsp; + if (jj_3R_52()) { + jj_scanpos = xsp; + if (jj_3R_53()) return true; + } + } } - return false; - } - - final private boolean jj_3_8() { - if (jj_scan_token(LBRACKET)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_25()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_scan_token(RBRACKET)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_86() { - Token xsp; - if (jj_3_8()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - while (true) { - xsp = jj_scanpos; - if (jj_3_8()) { - jj_scanpos = xsp; - break; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } } - while (true) { - xsp = jj_scanpos; - if (jj_3_9()) { - jj_scanpos = xsp; - break; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } } return false; } - final private boolean jj_3R_117() { - if (jj_scan_token(LT)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_48() { + if (jj_scan_token(INTEGER_LITERAL)) return true; return false; } - final private boolean jj_3R_106() { - if (jj_3R_108()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_62() { + if (jj_3R_65()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_116()) { - jj_scanpos = xsp; - break; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + if (jj_3R_71()) { jj_scanpos = xsp; break; } } return false; } - final private boolean jj_3R_113() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_117()) { - jj_scanpos = xsp; - if (jj_3R_118()) { - jj_scanpos = xsp; - if (jj_3R_119()) { - jj_scanpos = xsp; - if (jj_3R_120()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_106()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_69() { + if (jj_scan_token(SC_AND)) return true; + if (jj_3R_62()) return true; return false; } - final private boolean jj_3R_111() { - if (jj_scan_token(NE)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_46() { + if (jj_3R_55()) return true; return false; } - final private boolean jj_3R_109() { - if (jj_scan_token(INSTANCEOF)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_114()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_45() { + if (jj_scan_token(DOT)) return true; + if (jj_scan_token(IDENTIFIER)) return true; return false; } - final private boolean jj_3R_104() { - if (jj_3R_106()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_56() { + if (jj_3R_62()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_113()) { - jj_scanpos = xsp; - break; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + if (jj_3R_69()) { jj_scanpos = xsp; break; } } return false; } - final private boolean jj_3R_81() { - if (jj_scan_token(NEW)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_24()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - Token xsp; - xsp = jj_scanpos; - if (jj_3R_87()) { - jj_scanpos = xsp; - if (jj_3R_88()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_66() { + if (jj_scan_token(SC_OR)) return true; + if (jj_3R_56()) return true; return false; } - final private boolean jj_3_7() { - if (jj_scan_token(NEW)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_23()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_86()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_44() { + if (jj_scan_token(LBRACKET)) return true; + if (jj_3R_25()) return true; + if (jj_scan_token(RBRACKET)) return true; return false; } - final private boolean jj_3R_70() { + private boolean jj_3R_38() { Token xsp; xsp = jj_scanpos; - if (jj_3_7()) { + if (jj_3R_44()) { jj_scanpos = xsp; - if (jj_3R_81()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_97() { - if (jj_scan_token(COMMA)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_25()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_39() { - if (jj_scan_token(ORASSIGN)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_110() { - if (jj_scan_token(EQ)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_102() { - if (jj_3R_104()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - Token xsp; - xsp = jj_scanpos; - if (jj_3R_109()) { - jj_scanpos = xsp; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_107() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_110()) { + if (jj_3R_45()) { jj_scanpos = xsp; - if (jj_3R_111()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_102()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_94() { - if (jj_3R_25()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_97()) { - jj_scanpos = xsp; - break; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + if (jj_3R_46()) return true; } - return false; - } - - final private boolean jj_3R_89() { - if (jj_3R_94()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_38() { - if (jj_scan_token(XORASSIGN)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_82() { - if (jj_scan_token(LPAREN)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - Token xsp; - xsp = jj_scanpos; - if (jj_3R_89()) { - jj_scanpos = xsp; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_scan_token(RPAREN)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_105() { - if (jj_scan_token(BIT_AND)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_100()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_100() { - if (jj_3R_102()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_107()) { - jj_scanpos = xsp; - break; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } } return false; } - final private boolean jj_3R_37() { - if (jj_scan_token(ANDASSIGN)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_37() { + if (jj_3R_43()) return true; return false; } - final private boolean jj_3R_85() { - if (jj_scan_token(NULL)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_27() { + if (jj_3R_38()) return true; return false; } - final private boolean jj_3R_103() { - if (jj_scan_token(XOR)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_98()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_36() { + if (jj_scan_token(LPAREN)) return true; + if (jj_3R_25()) return true; + if (jj_scan_token(RPAREN)) return true; return false; } - final private boolean jj_3R_98() { - if (jj_3R_100()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_47() { + if (jj_3R_56()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_105()) { - jj_scanpos = xsp; - break; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + if (jj_3R_66()) { jj_scanpos = xsp; break; } } return false; } - final private boolean jj_3R_92() { - if (jj_scan_token(FALSE)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_36() { - if (jj_scan_token(RUNSIGNEDSHIFTASSIGN)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_104() { + if (jj_scan_token(LBRACKET)) return true; + if (jj_scan_token(RBRACKET)) return true; return false; } - final private boolean jj_3R_91() { - if (jj_scan_token(TRUE)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_35() { + if (jj_scan_token(SUPER)) return true; + if (jj_scan_token(DOT)) return true; + if (jj_scan_token(IDENTIFIER)) return true; return false; } - final private boolean jj_3R_84() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_91()) { - jj_scanpos = xsp; - if (jj_3R_92()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_34() { + if (jj_scan_token(THIS)) return true; return false; } - final private boolean jj_3R_101() { - if (jj_scan_token(BIT_OR)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_95()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_63() { + if (jj_scan_token(HOOK)) return true; + if (jj_3R_25()) return true; + if (jj_scan_token(COLON)) return true; + if (jj_3R_41()) return true; return false; } - final private boolean jj_3R_95() { - if (jj_3R_98()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_103()) { - jj_scanpos = xsp; - break; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } + private boolean jj_3R_33() { + if (jj_3R_24()) return true; return false; } - final private boolean jj_3R_35() { - if (jj_scan_token(RSIGNEDSHIFTASSIGN)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_105() { + if (jj_scan_token(LBRACKET)) return true; + if (jj_scan_token(RBRACKET)) return true; return false; } - final private boolean jj_3R_80() { - if (jj_3R_85()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_32() { + if (jj_3R_42()) return true; return false; } - final private boolean jj_3R_66() { - if (jj_3R_69()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_79() { - if (jj_3R_84()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_78() { - if (jj_scan_token(STRING_LITERAL)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_99() { - if (jj_scan_token(SC_AND)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_90()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_90() { - if (jj_3R_95()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_101()) { - jj_scanpos = xsp; - break; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } - return false; - } - - final private boolean jj_3R_34() { - if (jj_scan_token(LSHIFTASSIGN)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_65() { - if (jj_scan_token(NEW)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_77() { - if (jj_scan_token(CHARACTER_LITERAL)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_76() { - if (jj_scan_token(FLOATING_POINT_LITERAL)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_33() { - if (jj_scan_token(MINUSASSIGN)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_69() { + private boolean jj_3R_26() { Token xsp; xsp = jj_scanpos; - if (jj_3R_75()) { + if (jj_3R_32()) { jj_scanpos = xsp; - if (jj_3R_76()) { + if (jj_3R_33()) { jj_scanpos = xsp; - if (jj_3R_77()) { + if (jj_3R_34()) { jj_scanpos = xsp; - if (jj_3R_78()) { + if (jj_3R_35()) { jj_scanpos = xsp; - if (jj_3R_79()) { + if (jj_3R_36()) { jj_scanpos = xsp; - if (jj_3R_80()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_75() { - if (jj_scan_token(INTEGER_LITERAL)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_96() { - if (jj_scan_token(SC_OR)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_83()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_83() { - if (jj_3R_90()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_99()) { - jj_scanpos = xsp; - break; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + if (jj_3R_37()) return true; + } + } + } } - return false; - } - - final private boolean jj_3R_64() { - if (jj_scan_token(SUPER)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_32() { - if (jj_scan_token(PLUSASSIGN)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_73() { - if (jj_3R_82()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_72() { - if (jj_scan_token(DOT)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_scan_token(IDENTIFIER)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_74() { - if (jj_3R_83()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_96()) { - jj_scanpos = xsp; - break; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } } return false; } - final private boolean jj_3R_63() { - if (jj_scan_token(THIS)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_31() { - if (jj_scan_token(REMASSIGN)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_20() { + if (jj_3R_26()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_27()) { jj_scanpos = xsp; break; } + } return false; } - final private boolean jj_3R_58() { + private boolean jj_3R_41() { + if (jj_3R_47()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_71()) { - jj_scanpos = xsp; - if (jj_3R_72()) { - jj_scanpos = xsp; - if (jj_3R_73()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + if (jj_3R_63()) jj_scanpos = xsp; return false; } - final private boolean jj_3R_71() { - if (jj_scan_token(LBRACKET)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_25()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_scan_token(RBRACKET)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_106() { + if (jj_scan_token(DECR)) return true; return false; } - final private boolean jj_3R_93() { - if (jj_scan_token(HOOK)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_25()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_scan_token(COLON)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_68()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_102() { + if (jj_scan_token(LPAREN)) return true; + if (jj_3R_24()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_105()) { jj_scanpos = xsp; break; } + } + if (jj_scan_token(RPAREN)) return true; + if (jj_3R_95()) return true; return false; } - final private boolean jj_3R_57() { - if (jj_3R_70()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_21() { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(79)) { + jj_scanpos = xsp; + if (jj_scan_token(107)) { + jj_scanpos = xsp; + if (jj_scan_token(108)) { + jj_scanpos = xsp; + if (jj_scan_token(112)) { + jj_scanpos = xsp; + if (jj_scan_token(105)) { + jj_scanpos = xsp; + if (jj_scan_token(106)) { + jj_scanpos = xsp; + if (jj_scan_token(113)) { + jj_scanpos = xsp; + if (jj_scan_token(114)) { + jj_scanpos = xsp; + if (jj_scan_token(115)) { + jj_scanpos = xsp; + if (jj_scan_token(109)) { + jj_scanpos = xsp; + if (jj_scan_token(111)) { + jj_scanpos = xsp; + if (jj_scan_token(110)) return true; + } + } + } + } + } + } + } + } + } + } + } return false; } - final private boolean jj_3R_30() { - if (jj_scan_token(SLASHASSIGN)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_103() { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(92)) { + jj_scanpos = xsp; + if (jj_3R_106()) return true; + } return false; } - final private boolean jj_3R_27() { - if (jj_3R_58()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_100() { + Token xsp; + xsp = jj_scanpos; + if (jj_3_6()) { + jj_scanpos = xsp; + if (jj_3R_102()) return true; + } return false; } - final private boolean jj_3R_56() { - if (jj_scan_token(LPAREN)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_25()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_scan_token(RPAREN)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3_6() { + if (jj_scan_token(LPAREN)) return true; + if (jj_3R_23()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_104()) { jj_scanpos = xsp; break; } + } + if (jj_scan_token(RPAREN)) return true; + if (jj_3R_83()) return true; return false; } - final private boolean jj_3R_152() { - if (jj_scan_token(LBRACKET)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_scan_token(RBRACKET)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3_2() { + if (jj_3R_20()) return true; + if (jj_3R_21()) return true; return false; } - final private boolean jj_3R_55() { - if (jj_scan_token(SUPER)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_scan_token(DOT)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_scan_token(IDENTIFIER)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_40() { + if (jj_3R_20()) return true; + if (jj_3R_21()) return true; + if (jj_3R_25()) return true; return false; } - final private boolean jj_3R_29() { - if (jj_scan_token(STARASSIGN)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3_5() { + if (jj_scan_token(LPAREN)) return true; + if (jj_3R_24()) return true; + if (jj_scan_token(LBRACKET)) return true; return false; } - final private boolean jj_3R_68() { - if (jj_3R_74()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_101() { + if (jj_3R_20()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_93()) { - jj_scanpos = xsp; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_54() { - if (jj_scan_token(THIS)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + if (jj_3R_103()) jj_scanpos = xsp; return false; } - final private boolean jj_3R_62() { - if (jj_scan_token(IDENTIFIER)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_31() { + if (jj_3R_41()) return true; return false; } - final private boolean jj_3R_53() { - if (jj_3R_24()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_30() { + if (jj_3R_40()) return true; return false; } - final private boolean jj_3R_153() { - if (jj_scan_token(LBRACKET)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_scan_token(RBRACKET)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_25() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_30()) { + jj_scanpos = xsp; + if (jj_3R_31()) return true; + } return false; } - final private boolean jj_3R_26() { + private boolean jj_3R_29() { + if (jj_scan_token(LPAREN)) return true; + if (jj_3R_24()) return true; + if (jj_scan_token(RPAREN)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_52()) { + if (jj_scan_token(83)) { jj_scanpos = xsp; - if (jj_3R_53()) { + if (jj_scan_token(82)) { jj_scanpos = xsp; - if (jj_3R_54()) { + if (jj_scan_token(70)) { jj_scanpos = xsp; - if (jj_3R_55()) { + if (jj_scan_token(67)) { jj_scanpos = xsp; - if (jj_3R_56()) { + if (jj_scan_token(50)) { jj_scanpos = xsp; - if (jj_3R_57()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + if (jj_scan_token(47)) { + jj_scanpos = xsp; + if (jj_scan_token(38)) { + jj_scanpos = xsp; + if (jj_3R_39()) return true; + } + } + } + } + } + } + } return false; } - final private boolean jj_3R_52() { - if (jj_3R_69()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_28() { + if (jj_scan_token(LPAREN)) return true; + if (jj_3R_24()) return true; + if (jj_scan_token(LBRACKET)) return true; + if (jj_scan_token(RBRACKET)) return true; + return false; + } + + private boolean jj_3_4() { + if (jj_scan_token(LPAREN)) return true; + if (jj_3R_23()) return true; return false; } - final private boolean jj_3R_21() { + private boolean jj_3R_22() { Token xsp; xsp = jj_scanpos; - if (jj_3R_28()) { - jj_scanpos = xsp; - if (jj_3R_29()) { - jj_scanpos = xsp; - if (jj_3R_30()) { - jj_scanpos = xsp; - if (jj_3R_31()) { - jj_scanpos = xsp; - if (jj_3R_32()) { - jj_scanpos = xsp; - if (jj_3R_33()) { - jj_scanpos = xsp; - if (jj_3R_34()) { - jj_scanpos = xsp; - if (jj_3R_35()) { - jj_scanpos = xsp; - if (jj_3R_36()) { - jj_scanpos = xsp; - if (jj_3R_37()) { + if (jj_3_4()) { jj_scanpos = xsp; - if (jj_3R_38()) { + if (jj_3R_28()) { jj_scanpos = xsp; - if (jj_3R_39()) { - return true; - } - if (jj_la == 0 - && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 - && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 - && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - return false; - } - - final private boolean jj_3R_28() { - if (jj_scan_token(ASSIGN)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + if (jj_3R_29()) return true; + } + } return false; } - final private boolean jj_3R_61() { - if (jj_scan_token(LPAREN)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3_3() { + if (jj_3R_22()) return true; return false; } - final private boolean jj_3_2() { - if (jj_3R_20()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_21()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_99() { + if (jj_3R_101()) return true; return false; } - final private boolean jj_3R_20() { - if (jj_3R_26()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_27()) { - jj_scanpos = xsp; - break; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } + private boolean jj_3R_87() { + if (jj_scan_token(LBRACKET)) return true; + if (jj_scan_token(RBRACKET)) return true; return false; } - final private boolean jj_3R_60() { - if (jj_scan_token(BANG)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_98() { + if (jj_3R_100()) return true; return false; } - final private boolean jj_3R_155() { - if (jj_scan_token(DECR)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3_1() { + if (jj_scan_token(DOT)) return true; + if (jj_scan_token(IDENTIFIER)) return true; return false; } - final private boolean jj_3R_67() { - if (jj_3R_20()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_21()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_25()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3_9() { + if (jj_scan_token(LBRACKET)) return true; + if (jj_scan_token(RBRACKET)) return true; return false; } - final private boolean jj_3R_150() { - if (jj_scan_token(LPAREN)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_24()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_97() { Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_153()) { - jj_scanpos = xsp; - break; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - } - if (jj_scan_token(RPAREN)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } - if (jj_3R_136()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + xsp = jj_scanpos; + if (jj_scan_token(83)) { + jj_scanpos = xsp; + if (jj_scan_token(82)) return true; + } + if (jj_3R_83()) return true; return false; } - final private boolean jj_3R_59() { - if (jj_scan_token(TILDE)) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_95() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_97()) { + jj_scanpos = xsp; + if (jj_3R_98()) { + jj_scanpos = xsp; + if (jj_3R_99()) return true; + } + } return false; } - final private boolean jj_3R_51() { - if (jj_3R_68()) { - return true; - } - if (jj_la == 0 && jj_scanpos == jj_lastpos) { - return false; - } + private boolean jj_3R_24() { + if (jj_scan_token(IDENTIFIER)) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3_1()) { jj_scanpos = xsp; break; } + } return false; } + /** Generated Token Manager. */ public ExpressionParserTokenManager token_source; - ASCII_UCodeESC_CharStream jj_input_stream; - public Token token, jj_nt; + JavaCharStream jj_input_stream; + /** Current token. */ + public Token token; + /** Next token. */ + public Token jj_nt; private int jj_ntk; private Token jj_scanpos, jj_lastpos; private int jj_la; - public boolean lookingAhead = false; private int jj_gen; final private int[] jj_la1 = new int[44]; - final private int[] jj_la1_0 = { 0x8209400, 0x0, 0x8209400, 0x0, 0x1000000, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x1000000, 0x0, 0x0, 0x1000000, 0x1000000, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1000000, 0x0, 0x1000000, - 0x1000000, 0x1000000, 0x0, 0x0, 0x0, }; - final private int[] jj_la1_1 = { 0x2014, 0x0, 0x2014, 0x0, 0x884480c0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x884480c0, 0x0, 0x0, 0x884480c0, 0x884480c0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x884480c0, 0x0, 0x88400080, 0x400000, - 0x884480c0, 0x0, 0x0, 0x40, }; - final private int[] jj_la1_2 = { 0x8, 0x400, 0x0, 0x2000, 0xf00c004e, - 0x8000, 0x100000, 0x4000000, 0x8000000, 0x0, 0x0, 0x0, 0x2400000, - 0x2400000, 0x0, 0x1830000, 0x1830000, 0x0, 0x0, 0xc0000000, - 0xc0000000, 0x0, 0x0, 0xc0000000, 0xf00c004e, 0xc0000, 0xc0000, 0x4e, - 0xc004e, 0x40, 0x30000000, 0x30000000, 0x400, 0x400, 0x40, 0x4440, - 0x4e, 0x4440, 0x6, 0x0, 0xf00c004e, 0x2000, 0x440, 0x0, }; - final private int[] jj_la1_3 = { 0x0, 0x0, 0x0, 0x0, 0x0, 0xffe00, 0x0, 0x0, - 0x0, 0x8, 0x10, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1c0, 0x1c0, 0x0, 0x0, - 0x23, 0x23, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, }; - final private JJExpressionParserCalls[] jj_2_rtns = new JJExpressionParserCalls[9]; + static private int[] jj_la1_0; + static private int[] jj_la1_1; + static private int[] jj_la1_2; + static private int[] jj_la1_3; + static { + jj_la1_init_0(); + jj_la1_init_1(); + jj_la1_init_2(); + jj_la1_init_3(); + } + private static void jj_la1_init_0() { + jj_la1_0 = new int[] {0x8209400,0x0,0x8209400,0x0,0x1000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000000,0x0,0x0,0x1000000,0x1000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000000,0x0,0x1000000,0x1000000,0x1000000,0x0,0x0,0x0,}; + } + private static void jj_la1_init_1() { + jj_la1_1 = new int[] {0x2014,0x0,0x2014,0x0,0x884480c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x884480c0,0x0,0x0,0x884480c0,0x884480c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x884480c0,0x0,0x88400080,0x400000,0x884480c0,0x0,0x0,0x40,}; + } + private static void jj_la1_init_2() { + jj_la1_2 = new int[] {0x8,0x400,0x0,0x2000,0xf00c004e,0x8000,0x100000,0x4000000,0x8000000,0x0,0x0,0x0,0x2400000,0x2400000,0x0,0x1830000,0x1830000,0x0,0x0,0xc0000000,0xc0000000,0x0,0x0,0xc0000000,0xf00c004e,0xc0000,0xc0000,0x4e,0xc004e,0x40,0x30000000,0x30000000,0x400,0x400,0x40,0x4440,0x4e,0x4440,0x6,0x0,0xf00c004e,0x2000,0x440,0x0,}; + } + private static void jj_la1_init_3() { + jj_la1_3 = new int[] {0x0,0x0,0x0,0x0,0x0,0xffe00,0x0,0x0,0x0,0x8,0x10,0x4,0x0,0x0,0x0,0x0,0x0,0x1c0,0x1c0,0x0,0x0,0x23,0x23,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; + } + final private JJCalls[] jj_2_rtns = new JJCalls[9]; private boolean jj_rescan = false; private int jj_gc = 0; + /** Constructor with InputStream. */ public ExpressionParser(java.io.InputStream stream) { - jj_input_stream = new ASCII_UCodeESC_CharStream(stream, 1, 1); + this(stream, null); + } + /** Constructor with InputStream and supplied encoding */ + public ExpressionParser(java.io.InputStream stream, String encoding) { + try { jj_input_stream = new JavaCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } token_source = new ExpressionParserTokenManager(jj_input_stream); token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 44; i++) { - jj_la1[i] = -1; - } - for (int i = 0; i < jj_2_rtns.length; i++) { - jj_2_rtns[i] = new JJExpressionParserCalls(); - } + for (int i = 0; i < 44; i++) jj_la1[i] = -1; + for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } + /** Reinitialise. */ public void ReInit(java.io.InputStream stream) { + ReInit(stream, null); + } + /** Reinitialise. */ + public void ReInit(java.io.InputStream stream, String encoding) { + try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } + token_source.ReInit(jj_input_stream); + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 44; i++) jj_la1[i] = -1; + for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); + } + + /** Constructor. */ + public ExpressionParser(java.io.Reader stream) { + jj_input_stream = new JavaCharStream(stream, 1, 1); + token_source = new ExpressionParserTokenManager(jj_input_stream); + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 44; i++) jj_la1[i] = -1; + for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); + } + + /** Reinitialise. */ + public void ReInit(java.io.Reader stream) { jj_input_stream.ReInit(stream, 1, 1); token_source.ReInit(jj_input_stream); token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 44; i++) { - jj_la1[i] = -1; - } - for (int i = 0; i < jj_2_rtns.length; i++) { - jj_2_rtns[i] = new JJExpressionParserCalls(); - } + for (int i = 0; i < 44; i++) jj_la1[i] = -1; + for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } + /** Constructor with generated Token Manager. */ public ExpressionParser(ExpressionParserTokenManager tm) { token_source = tm; token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 44; i++) { - jj_la1[i] = -1; - } - for (int i = 0; i < jj_2_rtns.length; i++) { - jj_2_rtns[i] = new JJExpressionParserCalls(); - } + for (int i = 0; i < 44; i++) jj_la1[i] = -1; + for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } + /** Reinitialise. */ public void ReInit(ExpressionParserTokenManager tm) { token_source = tm; token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 44; i++) { - jj_la1[i] = -1; - } - for (int i = 0; i < jj_2_rtns.length; i++) { - jj_2_rtns[i] = new JJExpressionParserCalls(); - } + for (int i = 0; i < 44; i++) jj_la1[i] = -1; + for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } - final private Token jj_consume_token(int kind) throws ParseException { + private Token jj_consume_token(int kind) throws ParseException { Token oldToken; - if ((oldToken = token).next != null) { - token = token.next; - } else { - token = token.next = token_source.getNextToken(); - } + if ((oldToken = token).next != null) token = token.next; + else token = token.next = token_source.getNextToken(); jj_ntk = -1; if (token.kind == kind) { jj_gen++; if (++jj_gc > 100) { jj_gc = 0; - for (JJExpressionParserCalls jj_2_rtn : jj_2_rtns) { - JJExpressionParserCalls c = jj_2_rtn; + for (int i = 0; i < jj_2_rtns.length; i++) { + JJCalls c = jj_2_rtns[i]; while (c != null) { - if (c.gen < jj_gen) { - c.first = null; - } + if (c.gen < jj_gen) c.first = null; c = c.next; } } @@ -3723,12 +2172,13 @@ final private Token jj_consume_token(int kind) throws ParseException { throw generateParseException(); } - final private boolean jj_scan_token(int kind) { + static private final class LookaheadSuccess extends java.lang.Error { } + final private LookaheadSuccess jj_ls = new LookaheadSuccess(); + private boolean jj_scan_token(int kind) { if (jj_scanpos == jj_lastpos) { jj_la--; if (jj_scanpos.next == null) { - jj_lastpos = jj_scanpos = jj_scanpos.next = token_source - .getNextToken(); + jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken(); } else { jj_lastpos = jj_scanpos = jj_scanpos.next; } @@ -3736,60 +2186,50 @@ final private boolean jj_scan_token(int kind) { jj_scanpos = jj_scanpos.next; } if (jj_rescan) { - int i = 0; - Token tok = token; - while (tok != null && tok != jj_scanpos) { - i++; - tok = tok.next; - } - if (tok != null) { - jj_add_error_token(kind, i); - } + int i = 0; Token tok = token; + while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; } + if (tok != null) jj_add_error_token(kind, i); } - return (jj_scanpos.kind != kind); + if (jj_scanpos.kind != kind) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls; + return false; } + +/** Get the next Token. */ final public Token getNextToken() { - if (token.next != null) { - token = token.next; - } else { - token = token.next = token_source.getNextToken(); - } + if (token.next != null) token = token.next; + else token = token.next = token_source.getNextToken(); jj_ntk = -1; jj_gen++; return token; } +/** Get the specific Token. */ final public Token getToken(int index) { - Token t = lookingAhead ? jj_scanpos : token; + Token t = token; for (int i = 0; i < index; i++) { - if (t.next != null) { - t = t.next; - } else { - t = t.next = token_source.getNextToken(); - } + if (t.next != null) t = t.next; + else t = t.next = token_source.getNextToken(); } return t; } - final private int jj_ntk() { - if ((jj_nt = token.next) == null) { + private int jj_ntk() { + if ((jj_nt=token.next) == null) return (jj_ntk = (token.next=token_source.getNextToken()).kind); - } else { + else return (jj_ntk = jj_nt.kind); } - } - private java.util.Vector jj_expentries = new java.util.Vector(); + private java.util.List jj_expentries = new java.util.ArrayList(); private int[] jj_expentry; private int jj_kind = -1; private int[] jj_lasttokens = new int[100]; private int jj_endpos; private void jj_add_error_token(int kind, int pos) { - if (pos >= 100) { - return; - } + if (pos >= 100) return; if (pos == jj_endpos + 1) { jj_lasttokens[jj_endpos++] = kind; } else if (jj_endpos != 0) { @@ -3797,38 +2237,26 @@ private void jj_add_error_token(int kind, int pos) { for (int i = 0; i < jj_endpos; i++) { jj_expentry[i] = jj_lasttokens[i]; } - boolean exists = false; - for (java.util.Enumeration enum_ = jj_expentries.elements(); enum_ - .hasMoreElements();) { - int[] oldentry = (enum_.nextElement()); + jj_entries_loop: for (java.util.Iterator it = jj_expentries.iterator(); it.hasNext();) { + int[] oldentry = (int[])(it.next()); if (oldentry.length == jj_expentry.length) { - exists = true; for (int i = 0; i < jj_expentry.length; i++) { if (oldentry[i] != jj_expentry[i]) { - exists = false; - break; + continue jj_entries_loop; } } - if (exists) { - break; - } - } - } - if (!exists) { - jj_expentries.addElement(jj_expentry); - } - if (pos != 0) { - jj_lasttokens[(jj_endpos = pos) - 1] = kind; - } + jj_expentries.add(jj_expentry); + break jj_entries_loop; + } + } + if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind; } } - final public ParseException generateParseException() { - jj_expentries.removeAllElements(); + /** Generate ParseException. */ + public ParseException generateParseException() { + jj_expentries.clear(); boolean[] la1tokens = new boolean[116]; - for (int i = 0; i < 116; i++) { - la1tokens[i] = false; - } if (jj_kind >= 0) { la1tokens[jj_kind] = true; jj_kind = -1; @@ -3855,7 +2283,7 @@ final public ParseException generateParseException() { if (la1tokens[i]) { jj_expentry = new int[1]; jj_expentry[0] = i; - jj_expentries.addElement(jj_expentry); + jj_expentries.add(jj_expentry); } } jj_endpos = 0; @@ -3863,80 +2291,60 @@ final public ParseException generateParseException() { jj_add_error_token(0, 0); int[][] exptokseq = new int[jj_expentries.size()][]; for (int i = 0; i < jj_expentries.size(); i++) { - exptokseq[i] = jj_expentries.elementAt(i); + exptokseq[i] = jj_expentries.get(i); } return new ParseException(token, exptokseq, tokenImage); } + /** Enable tracing. */ final public void enable_tracing() { } + /** Disable tracing. */ final public void disable_tracing() { } - final private void jj_rescan_token() { + private void jj_rescan_token() { jj_rescan = true; for (int i = 0; i < 9; i++) { - JJExpressionParserCalls p = jj_2_rtns[i]; + try { + JJCalls p = jj_2_rtns[i]; do { if (p.gen > jj_gen) { - jj_la = p.arg; - jj_lastpos = jj_scanpos = p.first; + jj_la = p.arg; jj_lastpos = jj_scanpos = p.first; switch (i) { - case 0: - jj_3_1(); - break; - case 1: - jj_3_2(); - break; - case 2: - jj_3_3(); - break; - case 3: - jj_3_4(); - break; - case 4: - jj_3_5(); - break; - case 5: - jj_3_6(); - break; - case 6: - jj_3_7(); - break; - case 7: - jj_3_8(); - break; - case 8: - jj_3_9(); - break; + case 0: jj_3_1(); break; + case 1: jj_3_2(); break; + case 2: jj_3_3(); break; + case 3: jj_3_4(); break; + case 4: jj_3_5(); break; + case 5: jj_3_6(); break; + case 6: jj_3_7(); break; + case 7: jj_3_8(); break; + case 8: jj_3_9(); break; } } p = p.next; } while (p != null); + } catch(LookaheadSuccess ls) { } } jj_rescan = false; } - final private void jj_save(int index, int xla) { - JJExpressionParserCalls p = jj_2_rtns[index]; + private void jj_save(int index, int xla) { + JJCalls p = jj_2_rtns[index]; while (p.gen > jj_gen) { - if (p.next == null) { - p = p.next = new JJExpressionParserCalls(); - break; - } + if (p.next == null) { p = p.next = new JJCalls(); break; } p = p.next; } - p.gen = jj_gen + xla - jj_la; - p.first = token; - p.arg = xla; + p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla; } -} + static final class JJCalls { + int gen; + Token first; + int arg; + JJCalls next; + } -final class JJExpressionParserCalls { - int gen; - Token first; - int arg; - JJExpressionParserCalls next; } diff --git a/jdk/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParserConstants.java b/jdk/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParserConstants.java index fd46b36d8fb..c74d21fa75e 100644 --- a/jdk/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParserConstants.java +++ b/jdk/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParserConstants.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,134 +23,243 @@ * questions. */ -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - /* Generated By:JavaCC: Do not edit this line. ExpressionParserConstants.java */ package com.sun.tools.example.debug.expr; + +/** + * Token literal values and constants. + * Generated by org.javacc.parser.OtherFilesGen#start() + */ public interface ExpressionParserConstants { + /** End of File. */ int EOF = 0; + /** RegularExpression Id. */ int SINGLE_LINE_COMMENT = 6; + /** RegularExpression Id. */ int FORMAL_COMMENT = 7; + /** RegularExpression Id. */ int MULTI_LINE_COMMENT = 8; + /** RegularExpression Id. */ int ABSTRACT = 9; + /** RegularExpression Id. */ int BOOLEAN = 10; + /** RegularExpression Id. */ int BREAK = 11; + /** RegularExpression Id. */ int BYTE = 12; + /** RegularExpression Id. */ int CASE = 13; + /** RegularExpression Id. */ int CATCH = 14; + /** RegularExpression Id. */ int CHAR = 15; + /** RegularExpression Id. */ int CLASS = 16; + /** RegularExpression Id. */ int CONST = 17; + /** RegularExpression Id. */ int CONTINUE = 18; + /** RegularExpression Id. */ int _DEFAULT = 19; + /** RegularExpression Id. */ int DO = 20; + /** RegularExpression Id. */ int DOUBLE = 21; + /** RegularExpression Id. */ int ELSE = 22; + /** RegularExpression Id. */ int EXTENDS = 23; + /** RegularExpression Id. */ int FALSE = 24; + /** RegularExpression Id. */ int FINAL = 25; + /** RegularExpression Id. */ int FINALLY = 26; + /** RegularExpression Id. */ int FLOAT = 27; + /** RegularExpression Id. */ int FOR = 28; + /** RegularExpression Id. */ int GOTO = 29; + /** RegularExpression Id. */ int IF = 30; + /** RegularExpression Id. */ int IMPLEMENTS = 31; + /** RegularExpression Id. */ int IMPORT = 32; + /** RegularExpression Id. */ int INSTANCEOF = 33; + /** RegularExpression Id. */ int INT = 34; + /** RegularExpression Id. */ int INTERFACE = 35; + /** RegularExpression Id. */ int LONG = 36; + /** RegularExpression Id. */ int NATIVE = 37; + /** RegularExpression Id. */ int NEW = 38; + /** RegularExpression Id. */ int NULL = 39; + /** RegularExpression Id. */ int PACKAGE = 40; + /** RegularExpression Id. */ int PRIVATE = 41; + /** RegularExpression Id. */ int PROTECTED = 42; + /** RegularExpression Id. */ int PUBLIC = 43; + /** RegularExpression Id. */ int RETURN = 44; + /** RegularExpression Id. */ int SHORT = 45; + /** RegularExpression Id. */ int STATIC = 46; + /** RegularExpression Id. */ int SUPER = 47; + /** RegularExpression Id. */ int SWITCH = 48; + /** RegularExpression Id. */ int SYNCHRONIZED = 49; + /** RegularExpression Id. */ int THIS = 50; + /** RegularExpression Id. */ int THROW = 51; + /** RegularExpression Id. */ int THROWS = 52; + /** RegularExpression Id. */ int TRANSIENT = 53; + /** RegularExpression Id. */ int TRUE = 54; + /** RegularExpression Id. */ int TRY = 55; + /** RegularExpression Id. */ int VOID = 56; + /** RegularExpression Id. */ int VOLATILE = 57; + /** RegularExpression Id. */ int WHILE = 58; + /** RegularExpression Id. */ int INTEGER_LITERAL = 59; + /** RegularExpression Id. */ int DECIMAL_LITERAL = 60; + /** RegularExpression Id. */ int HEX_LITERAL = 61; + /** RegularExpression Id. */ int OCTAL_LITERAL = 62; + /** RegularExpression Id. */ int FLOATING_POINT_LITERAL = 63; + /** RegularExpression Id. */ int EXPONENT = 64; + /** RegularExpression Id. */ int CHARACTER_LITERAL = 65; + /** RegularExpression Id. */ int STRING_LITERAL = 66; + /** RegularExpression Id. */ int IDENTIFIER = 67; + /** RegularExpression Id. */ int LETTER = 68; + /** RegularExpression Id. */ int DIGIT = 69; + /** RegularExpression Id. */ int LPAREN = 70; + /** RegularExpression Id. */ int RPAREN = 71; + /** RegularExpression Id. */ int LBRACE = 72; + /** RegularExpression Id. */ int RBRACE = 73; + /** RegularExpression Id. */ int LBRACKET = 74; + /** RegularExpression Id. */ int RBRACKET = 75; + /** RegularExpression Id. */ int SEMICOLON = 76; + /** RegularExpression Id. */ int COMMA = 77; + /** RegularExpression Id. */ int DOT = 78; + /** RegularExpression Id. */ int ASSIGN = 79; + /** RegularExpression Id. */ int GT = 80; + /** RegularExpression Id. */ int LT = 81; + /** RegularExpression Id. */ int BANG = 82; + /** RegularExpression Id. */ int TILDE = 83; + /** RegularExpression Id. */ int HOOK = 84; + /** RegularExpression Id. */ int COLON = 85; + /** RegularExpression Id. */ int EQ = 86; + /** RegularExpression Id. */ int LE = 87; + /** RegularExpression Id. */ int GE = 88; + /** RegularExpression Id. */ int NE = 89; + /** RegularExpression Id. */ int SC_OR = 90; + /** RegularExpression Id. */ int SC_AND = 91; + /** RegularExpression Id. */ int INCR = 92; + /** RegularExpression Id. */ int DECR = 93; + /** RegularExpression Id. */ int PLUS = 94; + /** RegularExpression Id. */ int MINUS = 95; + /** RegularExpression Id. */ int STAR = 96; + /** RegularExpression Id. */ int SLASH = 97; + /** RegularExpression Id. */ int BIT_AND = 98; + /** RegularExpression Id. */ int BIT_OR = 99; + /** RegularExpression Id. */ int XOR = 100; + /** RegularExpression Id. */ int REM = 101; + /** RegularExpression Id. */ int LSHIFT = 102; + /** RegularExpression Id. */ int RSIGNEDSHIFT = 103; + /** RegularExpression Id. */ int RUNSIGNEDSHIFT = 104; + /** RegularExpression Id. */ int PLUSASSIGN = 105; + /** RegularExpression Id. */ int MINUSASSIGN = 106; + /** RegularExpression Id. */ int STARASSIGN = 107; + /** RegularExpression Id. */ int SLASHASSIGN = 108; + /** RegularExpression Id. */ int ANDASSIGN = 109; + /** RegularExpression Id. */ int ORASSIGN = 110; + /** RegularExpression Id. */ int XORASSIGN = 111; + /** RegularExpression Id. */ int REMASSIGN = 112; + /** RegularExpression Id. */ int LSHIFTASSIGN = 113; + /** RegularExpression Id. */ int RSIGNEDSHIFTASSIGN = 114; + /** RegularExpression Id. */ int RUNSIGNEDSHIFTASSIGN = 115; + /** Lexical state. */ int DEFAULT = 0; + /** Literal token values. */ String[] tokenImage = { "", "\" \"", diff --git a/jdk/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParserTokenManager.java b/jdk/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParserTokenManager.java index 7e1f57090df..b2f16f03e57 100644 --- a/jdk/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParserTokenManager.java +++ b/jdk/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParserTokenManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,38 +23,39 @@ * questions. */ -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - /* Generated By:JavaCC: Do not edit this line. ExpressionParserTokenManager.java */ package com.sun.tools.example.debug.expr; +import com.sun.jdi.*; +import java.util.Stack; +import java.util.List; +import java.util.ArrayList; +/** Token Manager. */ public class ExpressionParserTokenManager implements ExpressionParserConstants { + + /** Debug output. */ + public java.io.PrintStream debugStream = System.out; + /** Set debug output. */ + public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; } private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) { switch (pos) { case 0: - if ((active1 & 0x4000L) != 0L) { + if ((active1 & 0x100200000000L) != 0L) + return 49; + if ((active1 & 0x4000L) != 0L) return 4; - } if ((active0 & 0x7fffffffffffe00L) != 0L) { jjmatchedKind = 67; return 28; } - if ((active1 & 0x100200000000L) != 0L) { - return 49; - } return -1; case 1: + if ((active0 & 0x40300000L) != 0L) + return 28; if ((active0 & 0x7ffffffbfcffe00L) != 0L) { if (jjmatchedPos != 1) @@ -64,11 +65,10 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) } return 28; } - if ((active0 & 0x40300000L) != 0L) { - return 28; - } return -1; case 2: + if ((active0 & 0x80004c10000000L) != 0L) + return 28; if ((active0 & 0x77fffb3afeffe00L) != 0L) { if (jjmatchedPos != 2) @@ -78,9 +78,6 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) } return 28; } - if ((active0 & 0x80004c10000000L) != 0L) { - return 28; - } return -1; case 3: if ((active0 & 0x63bff2b8faf4e00L) != 0L) @@ -89,11 +86,12 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) jjmatchedPos = 3; return 28; } - if ((active0 & 0x14400902040b000L) != 0L) { + if ((active0 & 0x14400902040b000L) != 0L) return 28; - } return -1; case 4: + if ((active0 & 0x418a0000f034800L) != 0L) + return 28; if ((active0 & 0x2235f2b80ac0600L) != 0L) { if (jjmatchedPos != 4) @@ -103,20 +101,16 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) } return 28; } - if ((active0 & 0x418a0000f034800L) != 0L) { - return 28; - } return -1; case 5: + if ((active0 & 0x11582100200000L) != 0L) + return 28; if ((active0 & 0x222070a848c0600L) != 0L) { jjmatchedKind = 67; jjmatchedPos = 5; return 28; } - if ((active0 & 0x11582100200000L) != 0L) { - return 28; - } return -1; case 6: if ((active0 & 0x222040a80040200L) != 0L) @@ -125,31 +119,28 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) jjmatchedPos = 6; return 28; } - if ((active0 & 0x30004880400L) != 0L) { + if ((active0 & 0x30004880400L) != 0L) return 28; - } return -1; case 7: + if ((active0 & 0x200000000040200L) != 0L) + return 28; if ((active0 & 0x22040a80000000L) != 0L) { jjmatchedKind = 67; jjmatchedPos = 7; return 28; } - if ((active0 & 0x200000000040200L) != 0L) { - return 28; - } return -1; case 8: + if ((active0 & 0x20040800000000L) != 0L) + return 28; if ((active0 & 0x2000280000000L) != 0L) { jjmatchedKind = 67; jjmatchedPos = 8; return 28; } - if ((active0 & 0x20040800000000L) != 0L) { - return 28; - } return -1; case 9: if ((active0 & 0x2000000000000L) != 0L) @@ -158,9 +149,8 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) jjmatchedPos = 9; return 28; } - if ((active0 & 0x280000000L) != 0L) { + if ((active0 & 0x280000000L) != 0L) return 28; - } return -1; case 10: if ((active0 & 0x2000000000000L) != 0L) @@ -178,21 +168,13 @@ private final int jjStartNfa_0(int pos, long active0, long active1) { return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0, active1), pos + 1); } -private final int jjStopAtPos(int pos, int kind) +private int jjStopAtPos(int pos, int kind) { jjmatchedKind = kind; jjmatchedPos = pos; return pos + 1; } -private final int jjStartNfaWithStates_0(int pos, int kind, int state) -{ - jjmatchedKind = kind; - jjmatchedPos = pos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return pos + 1; } - return jjMoveNfa_0(state, pos + 1); -} -private final int jjMoveStringLiteralDfa0_0() +private int jjMoveStringLiteralDfa0_0() { switch(curChar) { @@ -292,7 +274,7 @@ private final int jjMoveStringLiteralDfa0_0() return jjMoveNfa_0(0, 0); } } -private final int jjMoveStringLiteralDfa1_0(long active0, long active1) +private int jjMoveStringLiteralDfa1_0(long active0, long active1) { try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { @@ -302,19 +284,16 @@ private final int jjMoveStringLiteralDfa1_0(long active0, long active1) switch(curChar) { case 38: - if ((active1 & 0x8000000L) != 0L) { + if ((active1 & 0x8000000L) != 0L) return jjStopAtPos(1, 91); - } break; case 43: - if ((active1 & 0x10000000L) != 0L) { + if ((active1 & 0x10000000L) != 0L) return jjStopAtPos(1, 92); - } break; case 45: - if ((active1 & 0x20000000L) != 0L) { + if ((active1 & 0x20000000L) != 0L) return jjStopAtPos(1, 93); - } break; case 60: if ((active1 & 0x4000000000L) != 0L) @@ -324,31 +303,30 @@ private final int jjMoveStringLiteralDfa1_0(long active0, long active1) } return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x2000000000000L); case 61: - if ((active1 & 0x400000L) != 0L) { + if ((active1 & 0x400000L) != 0L) return jjStopAtPos(1, 86); - } else if ((active1 & 0x800000L) != 0L) { + else if ((active1 & 0x800000L) != 0L) return jjStopAtPos(1, 87); - } else if ((active1 & 0x1000000L) != 0L) { + else if ((active1 & 0x1000000L) != 0L) return jjStopAtPos(1, 88); - } else if ((active1 & 0x2000000L) != 0L) { + else if ((active1 & 0x2000000L) != 0L) return jjStopAtPos(1, 89); - } else if ((active1 & 0x20000000000L) != 0L) { + else if ((active1 & 0x20000000000L) != 0L) return jjStopAtPos(1, 105); - } else if ((active1 & 0x40000000000L) != 0L) { + else if ((active1 & 0x40000000000L) != 0L) return jjStopAtPos(1, 106); - } else if ((active1 & 0x80000000000L) != 0L) { + else if ((active1 & 0x80000000000L) != 0L) return jjStopAtPos(1, 107); - } else if ((active1 & 0x100000000000L) != 0L) { + else if ((active1 & 0x100000000000L) != 0L) return jjStopAtPos(1, 108); - } else if ((active1 & 0x200000000000L) != 0L) { + else if ((active1 & 0x200000000000L) != 0L) return jjStopAtPos(1, 109); - } else if ((active1 & 0x400000000000L) != 0L) { + else if ((active1 & 0x400000000000L) != 0L) return jjStopAtPos(1, 110); - } else if ((active1 & 0x800000000000L) != 0L) { + else if ((active1 & 0x800000000000L) != 0L) return jjStopAtPos(1, 111); - } else if ((active1 & 0x1000000000000L) != 0L) { + else if ((active1 & 0x1000000000000L) != 0L) return jjStopAtPos(1, 112); - } break; case 62: if ((active1 & 0x8000000000L) != 0L) @@ -364,9 +342,8 @@ private final int jjMoveStringLiteralDfa1_0(long active0, long active1) case 101: return jjMoveStringLiteralDfa2_0(active0, 0x104000080000L, active1, 0L); case 102: - if ((active0 & 0x40000000L) != 0L) { + if ((active0 & 0x40000000L) != 0L) return jjStartNfaWithStates_0(1, 30, 28); - } break; case 104: return jjMoveStringLiteralDfa2_0(active0, 0x41c200000008000L, active1, 0L); @@ -398,20 +375,18 @@ private final int jjMoveStringLiteralDfa1_0(long active0, long active1) case 121: return jjMoveStringLiteralDfa2_0(active0, 0x2000000001000L, active1, 0L); case 124: - if ((active1 & 0x4000000L) != 0L) { + if ((active1 & 0x4000000L) != 0L) return jjStopAtPos(1, 90); - } break; default : break; } return jjStartNfa_0(0, active0, active1); } -private final int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long active1) +private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long active1) { - if (((active0 &= old0) | (active1 &= old1)) == 0L) { + if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(0, old0, old1); - } try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(1, active0, active1); @@ -420,11 +395,10 @@ private final int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, switch(curChar) { case 61: - if ((active1 & 0x2000000000000L) != 0L) { + if ((active1 & 0x2000000000000L) != 0L) return jjStopAtPos(2, 113); - } else if ((active1 & 0x4000000000000L) != 0L) { + else if ((active1 & 0x4000000000000L) != 0L) return jjStopAtPos(2, 114); - } break; case 62: if ((active1 & 0x10000000000L) != 0L) @@ -454,9 +428,8 @@ private final int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, case 112: return jjMoveStringLiteralDfa3_0(active0, 0x800180000000L, active1, 0L); case 114: - if ((active0 & 0x10000000L) != 0L) { + if ((active0 & 0x10000000L) != 0L) return jjStartNfaWithStates_0(2, 28, 28); - } return jjMoveStringLiteralDfa3_0(active0, 0x18000000000000L, active1, 0L); case 115: return jjMoveStringLiteralDfa3_0(active0, 0x200402200L, active1, 0L); @@ -470,25 +443,22 @@ private final int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, case 117: return jjMoveStringLiteralDfa3_0(active0, 0x40000000200000L, active1, 0L); case 119: - if ((active0 & 0x4000000000L) != 0L) { + if ((active0 & 0x4000000000L) != 0L) return jjStartNfaWithStates_0(2, 38, 28); - } break; case 121: - if ((active0 & 0x80000000000000L) != 0L) { + if ((active0 & 0x80000000000000L) != 0L) return jjStartNfaWithStates_0(2, 55, 28); - } break; default : break; } return jjStartNfa_0(1, active0, active1); } -private final int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long active1) +private int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long active1) { - if (((active0 &= old0) | (active1 &= old1)) == 0L) { + if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(1, old0, old1); - } try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(2, active0, active1); @@ -497,9 +467,8 @@ private final int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, switch(curChar) { case 61: - if ((active1 & 0x8000000000000L) != 0L) { + if ((active1 & 0x8000000000000L) != 0L) return jjStopAtPos(3, 115); - } break; case 97: return jjMoveStringLiteralDfa4_0(active0, 0x20000000e080800L, active1, 0L); @@ -508,51 +477,44 @@ private final int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, case 99: return jjMoveStringLiteralDfa4_0(active0, 0x2000000004000L, active1, 0L); case 100: - if ((active0 & 0x100000000000000L) != 0L) { + if ((active0 & 0x100000000000000L) != 0L) return jjStartNfaWithStates_0(3, 56, 28); - } break; case 101: - if ((active0 & 0x1000L) != 0L) { + if ((active0 & 0x1000L) != 0L) return jjStartNfaWithStates_0(3, 12, 28); - } else if ((active0 & 0x2000L) != 0L) { + else if ((active0 & 0x2000L) != 0L) return jjStartNfaWithStates_0(3, 13, 28); - } else if ((active0 & 0x400000L) != 0L) { + else if ((active0 & 0x400000L) != 0L) return jjStartNfaWithStates_0(3, 22, 28); - } else if ((active0 & 0x40000000000000L) != 0L) { + else if ((active0 & 0x40000000000000L) != 0L) return jjStartNfaWithStates_0(3, 54, 28); - } return jjMoveStringLiteralDfa4_0(active0, 0x800800800000L, active1, 0L); case 103: - if ((active0 & 0x1000000000L) != 0L) { + if ((active0 & 0x1000000000L) != 0L) return jjStartNfaWithStates_0(3, 36, 28); - } break; case 105: return jjMoveStringLiteralDfa4_0(active0, 0x2000000000L, active1, 0L); case 107: return jjMoveStringLiteralDfa4_0(active0, 0x10000000000L, active1, 0L); case 108: - if ((active0 & 0x8000000000L) != 0L) { + if ((active0 & 0x8000000000L) != 0L) return jjStartNfaWithStates_0(3, 39, 28); - } return jjMoveStringLiteralDfa4_0(active0, 0x400080080000400L, active1, 0L); case 110: return jjMoveStringLiteralDfa4_0(active0, 0x20000000000000L, active1, 0L); case 111: - if ((active0 & 0x20000000L) != 0L) { + if ((active0 & 0x20000000L) != 0L) return jjStartNfaWithStates_0(3, 29, 28); - } return jjMoveStringLiteralDfa4_0(active0, 0x18000100000000L, active1, 0L); case 114: - if ((active0 & 0x8000L) != 0L) { + if ((active0 & 0x8000L) != 0L) return jjStartNfaWithStates_0(3, 15, 28); - } return jjMoveStringLiteralDfa4_0(active0, 0x200000000000L, active1, 0L); case 115: - if ((active0 & 0x4000000000000L) != 0L) { + if ((active0 & 0x4000000000000L) != 0L) return jjStartNfaWithStates_0(3, 50, 28); - } return jjMoveStringLiteralDfa4_0(active0, 0x1030000L, active1, 0L); case 116: return jjMoveStringLiteralDfa4_0(active0, 0x1440200040200L, active1, 0L); @@ -565,11 +527,10 @@ private final int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, } return jjStartNfa_0(2, active0, active1); } -private final int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, long active1) +private int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, long active1) { - if (((active0 &= old0) | (active1 &= old1)) == 0L) { + if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(2, old0, old1); - } try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(3, active0, 0L); @@ -582,23 +543,20 @@ private final int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, case 99: return jjMoveStringLiteralDfa5_0(active0, 0x1000000000000L); case 101: - if ((active0 & 0x1000000L) != 0L) { + if ((active0 & 0x1000000L) != 0L) return jjStartNfaWithStates_0(4, 24, 28); - } else if ((active0 & 0x400000000000000L) != 0L) { + else if ((active0 & 0x400000000000000L) != 0L) return jjStartNfaWithStates_0(4, 58, 28); - } return jjMoveStringLiteralDfa5_0(active0, 0x40080000400L); case 104: - if ((active0 & 0x4000L) != 0L) { + if ((active0 & 0x4000L) != 0L) return jjStartNfaWithStates_0(4, 14, 28); - } return jjMoveStringLiteralDfa5_0(active0, 0x2000000000000L); case 105: return jjMoveStringLiteralDfa5_0(active0, 0x480000040000L); case 107: - if ((active0 & 0x800L) != 0L) { + if ((active0 & 0x800L) != 0L) return jjStartNfaWithStates_0(4, 11, 28); - } break; case 108: if ((active0 & 0x2000000L) != 0L) @@ -610,23 +568,20 @@ private final int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, case 110: return jjMoveStringLiteralDfa5_0(active0, 0x800000L); case 114: - if ((active0 & 0x800000000000L) != 0L) { + if ((active0 & 0x800000000000L) != 0L) return jjStartNfaWithStates_0(4, 47, 28); - } return jjMoveStringLiteralDfa5_0(active0, 0x100900000200L); case 115: - if ((active0 & 0x10000L) != 0L) { + if ((active0 & 0x10000L) != 0L) return jjStartNfaWithStates_0(4, 16, 28); - } return jjMoveStringLiteralDfa5_0(active0, 0x20000000000000L); case 116: - if ((active0 & 0x20000L) != 0L) { + if ((active0 & 0x20000L) != 0L) return jjStartNfaWithStates_0(4, 17, 28); - } else if ((active0 & 0x8000000L) != 0L) { + else if ((active0 & 0x8000000L) != 0L) return jjStartNfaWithStates_0(4, 27, 28); - } else if ((active0 & 0x200000000000L) != 0L) { + else if ((active0 & 0x200000000000L) != 0L) return jjStartNfaWithStates_0(4, 45, 28); - } return jjMoveStringLiteralDfa5_0(active0, 0x200000000000000L); case 117: return jjMoveStringLiteralDfa5_0(active0, 0x80000L); @@ -644,11 +599,10 @@ private final int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, } return jjStartNfa_0(3, active0, 0L); } -private final int jjMoveStringLiteralDfa5_0(long old0, long active0) +private int jjMoveStringLiteralDfa5_0(long old0, long active0) { - if (((active0 &= old0)) == 0L) { + if (((active0 &= old0)) == 0L) return jjStartNfa_0(3, old0, 0L); - } try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(4, active0, 0L); @@ -659,29 +613,26 @@ private final int jjMoveStringLiteralDfa5_0(long old0, long active0) case 97: return jjMoveStringLiteralDfa6_0(active0, 0x600L); case 99: - if ((active0 & 0x80000000000L) != 0L) { + if ((active0 & 0x80000000000L) != 0L) return jjStartNfaWithStates_0(5, 43, 28); - } else if ((active0 & 0x400000000000L) != 0L) { + else if ((active0 & 0x400000000000L) != 0L) return jjStartNfaWithStates_0(5, 46, 28); - } return jjMoveStringLiteralDfa6_0(active0, 0x40000000000L); case 100: return jjMoveStringLiteralDfa6_0(active0, 0x800000L); case 101: - if ((active0 & 0x200000L) != 0L) { + if ((active0 & 0x200000L) != 0L) return jjStartNfaWithStates_0(5, 21, 28); - } else if ((active0 & 0x2000000000L) != 0L) { + else if ((active0 & 0x2000000000L) != 0L) return jjStartNfaWithStates_0(5, 37, 28); - } break; case 102: return jjMoveStringLiteralDfa6_0(active0, 0x800000000L); case 103: return jjMoveStringLiteralDfa6_0(active0, 0x10000000000L); case 104: - if ((active0 & 0x1000000000000L) != 0L) { + if ((active0 & 0x1000000000000L) != 0L) return jjStartNfaWithStates_0(5, 48, 28); - } break; case 105: return jjMoveStringLiteralDfa6_0(active0, 0x220000000000000L); @@ -690,32 +641,28 @@ private final int jjMoveStringLiteralDfa5_0(long old0, long active0) case 109: return jjMoveStringLiteralDfa6_0(active0, 0x80000000L); case 110: - if ((active0 & 0x100000000000L) != 0L) { + if ((active0 & 0x100000000000L) != 0L) return jjStartNfaWithStates_0(5, 44, 28); - } return jjMoveStringLiteralDfa6_0(active0, 0x200040000L); case 114: return jjMoveStringLiteralDfa6_0(active0, 0x2000000000000L); case 115: - if ((active0 & 0x10000000000000L) != 0L) { + if ((active0 & 0x10000000000000L) != 0L) return jjStartNfaWithStates_0(5, 52, 28); - } break; case 116: - if ((active0 & 0x100000000L) != 0L) { + if ((active0 & 0x100000000L) != 0L) return jjStartNfaWithStates_0(5, 32, 28); - } return jjMoveStringLiteralDfa6_0(active0, 0x20000000000L); default : break; } return jjStartNfa_0(4, active0, 0L); } -private final int jjMoveStringLiteralDfa6_0(long old0, long active0) +private int jjMoveStringLiteralDfa6_0(long old0, long active0) { - if (((active0 &= old0)) == 0L) { + if (((active0 &= old0)) == 0L) return jjStartNfa_0(4, old0, 0L); - } try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(5, active0, 0L); @@ -728,48 +675,42 @@ private final int jjMoveStringLiteralDfa6_0(long old0, long active0) case 99: return jjMoveStringLiteralDfa7_0(active0, 0x200000200L); case 101: - if ((active0 & 0x10000000000L) != 0L) { + if ((active0 & 0x10000000000L) != 0L) return jjStartNfaWithStates_0(6, 40, 28); - } else if ((active0 & 0x20000000000L) != 0L) { + else if ((active0 & 0x20000000000L) != 0L) return jjStartNfaWithStates_0(6, 41, 28); - } return jjMoveStringLiteralDfa7_0(active0, 0x20000080000000L); case 108: return jjMoveStringLiteralDfa7_0(active0, 0x200000000000000L); case 110: - if ((active0 & 0x400L) != 0L) { + if ((active0 & 0x400L) != 0L) return jjStartNfaWithStates_0(6, 10, 28); - } break; case 111: return jjMoveStringLiteralDfa7_0(active0, 0x2000000000000L); case 115: - if ((active0 & 0x800000L) != 0L) { + if ((active0 & 0x800000L) != 0L) return jjStartNfaWithStates_0(6, 23, 28); - } break; case 116: - if ((active0 & 0x80000L) != 0L) { + if ((active0 & 0x80000L) != 0L) return jjStartNfaWithStates_0(6, 19, 28); - } return jjMoveStringLiteralDfa7_0(active0, 0x40000000000L); case 117: return jjMoveStringLiteralDfa7_0(active0, 0x40000L); case 121: - if ((active0 & 0x4000000L) != 0L) { + if ((active0 & 0x4000000L) != 0L) return jjStartNfaWithStates_0(6, 26, 28); - } break; default : break; } return jjStartNfa_0(5, active0, 0L); } -private final int jjMoveStringLiteralDfa7_0(long old0, long active0) +private int jjMoveStringLiteralDfa7_0(long old0, long active0) { - if (((active0 &= old0)) == 0L) { + if (((active0 &= old0)) == 0L) return jjStartNfa_0(5, old0, 0L); - } try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(6, active0, 0L); @@ -780,29 +721,26 @@ private final int jjMoveStringLiteralDfa7_0(long old0, long active0) case 99: return jjMoveStringLiteralDfa8_0(active0, 0x800000000L); case 101: - if ((active0 & 0x40000L) != 0L) { + if ((active0 & 0x40000L) != 0L) return jjStartNfaWithStates_0(7, 18, 28); - } else if ((active0 & 0x200000000000000L) != 0L) { + else if ((active0 & 0x200000000000000L) != 0L) return jjStartNfaWithStates_0(7, 57, 28); - } return jjMoveStringLiteralDfa8_0(active0, 0x40200000000L); case 110: return jjMoveStringLiteralDfa8_0(active0, 0x22000080000000L); case 116: - if ((active0 & 0x200L) != 0L) { + if ((active0 & 0x200L) != 0L) return jjStartNfaWithStates_0(7, 9, 28); - } break; default : break; } return jjStartNfa_0(6, active0, 0L); } -private final int jjMoveStringLiteralDfa8_0(long old0, long active0) +private int jjMoveStringLiteralDfa8_0(long old0, long active0) { - if (((active0 &= old0)) == 0L) { + if (((active0 &= old0)) == 0L) return jjStartNfa_0(6, old0, 0L); - } try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(7, active0, 0L); @@ -811,34 +749,30 @@ private final int jjMoveStringLiteralDfa8_0(long old0, long active0) switch(curChar) { case 100: - if ((active0 & 0x40000000000L) != 0L) { + if ((active0 & 0x40000000000L) != 0L) return jjStartNfaWithStates_0(8, 42, 28); - } break; case 101: - if ((active0 & 0x800000000L) != 0L) { + if ((active0 & 0x800000000L) != 0L) return jjStartNfaWithStates_0(8, 35, 28); - } break; case 105: return jjMoveStringLiteralDfa9_0(active0, 0x2000000000000L); case 111: return jjMoveStringLiteralDfa9_0(active0, 0x200000000L); case 116: - if ((active0 & 0x20000000000000L) != 0L) { + if ((active0 & 0x20000000000000L) != 0L) return jjStartNfaWithStates_0(8, 53, 28); - } return jjMoveStringLiteralDfa9_0(active0, 0x80000000L); default : break; } return jjStartNfa_0(7, active0, 0L); } -private final int jjMoveStringLiteralDfa9_0(long old0, long active0) +private int jjMoveStringLiteralDfa9_0(long old0, long active0) { - if (((active0 &= old0)) == 0L) { + if (((active0 &= old0)) == 0L) return jjStartNfa_0(7, old0, 0L); - } try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(8, active0, 0L); @@ -847,14 +781,12 @@ private final int jjMoveStringLiteralDfa9_0(long old0, long active0) switch(curChar) { case 102: - if ((active0 & 0x200000000L) != 0L) { + if ((active0 & 0x200000000L) != 0L) return jjStartNfaWithStates_0(9, 33, 28); - } break; case 115: - if ((active0 & 0x80000000L) != 0L) { + if ((active0 & 0x80000000L) != 0L) return jjStartNfaWithStates_0(9, 31, 28); - } break; case 122: return jjMoveStringLiteralDfa10_0(active0, 0x2000000000000L); @@ -863,11 +795,10 @@ private final int jjMoveStringLiteralDfa9_0(long old0, long active0) } return jjStartNfa_0(8, active0, 0L); } -private final int jjMoveStringLiteralDfa10_0(long old0, long active0) +private int jjMoveStringLiteralDfa10_0(long old0, long active0) { - if (((active0 &= old0)) == 0L) { + if (((active0 &= old0)) == 0L) return jjStartNfa_0(8, old0, 0L); - } try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(9, active0, 0L); @@ -882,11 +813,10 @@ private final int jjMoveStringLiteralDfa10_0(long old0, long active0) } return jjStartNfa_0(9, active0, 0L); } -private final int jjMoveStringLiteralDfa11_0(long old0, long active0) +private int jjMoveStringLiteralDfa11_0(long old0, long active0) { - if (((active0 &= old0)) == 0L) { + if (((active0 &= old0)) == 0L) return jjStartNfa_0(9, old0, 0L); - } try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(10, active0, 0L); @@ -895,44 +825,21 @@ private final int jjMoveStringLiteralDfa11_0(long old0, long active0) switch(curChar) { case 100: - if ((active0 & 0x2000000000000L) != 0L) { + if ((active0 & 0x2000000000000L) != 0L) return jjStartNfaWithStates_0(11, 49, 28); - } break; default : break; } return jjStartNfa_0(10, active0, 0L); } -private final void jjCheckNAdd(int state) -{ - if (jjrounds[state] != jjround) - { - jjstateSet[jjnewStateCnt++] = state; - jjrounds[state] = jjround; - } -} -private final void jjAddStates(int start, int end) -{ - do { - jjstateSet[jjnewStateCnt++] = jjnextStates[start]; - } while (start++ != end); -} -private final void jjCheckNAddTwoStates(int state1, int state2) -{ - jjCheckNAdd(state1); - jjCheckNAdd(state2); -} -private final void jjCheckNAddStates(int start, int end) +private int jjStartNfaWithStates_0(int pos, int kind, int state) { - do { - jjCheckNAdd(jjnextStates[start]); - } while (start++ != end); -} -private final void jjCheckNAddStates(int start) -{ - jjCheckNAdd(jjnextStates[start]); - jjCheckNAdd(jjnextStates[start + 1]); + jjmatchedKind = kind; + jjmatchedPos = pos; + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { return pos + 1; } + return jjMoveNfa_0(state, pos + 1); } static final long[] jjbitVec0 = { 0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL @@ -958,7 +865,7 @@ private final void jjCheckNAddStates(int start) static final long[] jjbitVec8 = { 0x3fffffffffffL, 0x0L, 0x0L, 0x0L }; -private final int jjMoveNfa_0(int startState, int curPos) +private int jjMoveNfa_0(int startState, int curPos) { int startsAt = 0; jjnewStateCnt = 67; @@ -967,388 +874,312 @@ private final int jjMoveNfa_0(int startState, int curPos) int kind = 0x7fffffff; for (;;) { - if (++jjround == 0x7fffffff) { + if (++jjround == 0x7fffffff) ReInitRounds(); - } if (curChar < 64) { long l = 1L << curChar; - //MatchLoop do { switch(jjstateSet[--i]) { + case 49: + if (curChar == 42) + jjCheckNAddTwoStates(62, 63); + else if (curChar == 47) + jjCheckNAddStates(0, 2); + if (curChar == 42) + jjstateSet[jjnewStateCnt++] = 54; + break; case 0: - if ((0x3ff000000000000L & l) != 0L) { - jjCheckNAddStates(0, 6); - } else if (curChar == 47) { - jjAddStates(7, 9); - } else if (curChar == 36) + if ((0x3ff000000000000L & l) != 0L) + jjCheckNAddStates(3, 9); + else if (curChar == 47) + jjAddStates(10, 12); + else if (curChar == 36) { - if (kind > 67) { + if (kind > 67) kind = 67; - } jjCheckNAdd(28); } - else if (curChar == 34) { - jjCheckNAddStates(10, 12); - } else if (curChar == 39) { - jjAddStates(13, 14); - } else if (curChar == 46) { + else if (curChar == 34) + jjCheckNAddStates(13, 15); + else if (curChar == 39) + jjAddStates(16, 17); + else if (curChar == 46) jjCheckNAdd(4); - } if ((0x3fe000000000000L & l) != 0L) { - if (kind > 59) { + if (kind > 59) kind = 59; - } jjCheckNAddTwoStates(1, 2); } else if (curChar == 48) { - if (kind > 59) { + if (kind > 59) kind = 59; - } - jjCheckNAddStates(15, 17); - } - break; - case 49: - if (curChar == 42) { - jjCheckNAddTwoStates(62, 63); - } else if (curChar == 47) { jjCheckNAddStates(18, 20); } - if (curChar == 42) { - jjstateSet[jjnewStateCnt++] = 54; - } break; case 1: - if ((0x3ff000000000000L & l) == 0L) { + if ((0x3ff000000000000L & l) == 0L) break; - } - if (kind > 59) { + if (kind > 59) kind = 59; - } jjCheckNAddTwoStates(1, 2); break; case 3: - if (curChar == 46) { + if (curChar == 46) jjCheckNAdd(4); - } break; case 4: - if ((0x3ff000000000000L & l) == 0L) { + if ((0x3ff000000000000L & l) == 0L) break; - } - if (kind > 63) { + if (kind > 63) kind = 63; - } jjCheckNAddStates(21, 23); break; case 6: - if ((0x280000000000L & l) != 0L) { + if ((0x280000000000L & l) != 0L) jjCheckNAdd(7); - } break; case 7: - if ((0x3ff000000000000L & l) == 0L) { + if ((0x3ff000000000000L & l) == 0L) break; - } - if (kind > 63) { + if (kind > 63) kind = 63; - } jjCheckNAddTwoStates(7, 8); break; case 9: - if (curChar == 39) { - jjAddStates(13, 14); - } + if (curChar == 39) + jjAddStates(16, 17); break; case 10: - if ((0xffffff7fffffdbffL & l) != 0L) { + if ((0xffffff7fffffdbffL & l) != 0L) jjCheckNAdd(11); - } break; case 11: - if (curChar == 39 && kind > 65) { + if (curChar == 39 && kind > 65) kind = 65; - } break; case 13: - if ((0x8400000000L & l) != 0L) { + if ((0x8400000000L & l) != 0L) jjCheckNAdd(11); - } break; case 14: - if ((0xff000000000000L & l) != 0L) { + if ((0xff000000000000L & l) != 0L) jjCheckNAddTwoStates(15, 11); - } break; case 15: - if ((0xff000000000000L & l) != 0L) { + if ((0xff000000000000L & l) != 0L) jjCheckNAdd(11); - } break; case 16: - if ((0xf000000000000L & l) != 0L) { + if ((0xf000000000000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 17; - } break; case 17: - if ((0xff000000000000L & l) != 0L) { + if ((0xff000000000000L & l) != 0L) jjCheckNAdd(15); - } break; case 18: - if (curChar == 34) { - jjCheckNAddStates(10, 12); - } + if (curChar == 34) + jjCheckNAddStates(13, 15); break; case 19: - if ((0xfffffffbffffdbffL & l) != 0L) { - jjCheckNAddStates(10, 12); - } + if ((0xfffffffbffffdbffL & l) != 0L) + jjCheckNAddStates(13, 15); break; case 21: - if ((0x8400000000L & l) != 0L) { - jjCheckNAddStates(10, 12); - } + if ((0x8400000000L & l) != 0L) + jjCheckNAddStates(13, 15); break; case 22: - if (curChar == 34 && kind > 66) { + if (curChar == 34 && kind > 66) kind = 66; - } break; case 23: - if ((0xff000000000000L & l) != 0L) { + if ((0xff000000000000L & l) != 0L) jjCheckNAddStates(24, 27); - } break; case 24: - if ((0xff000000000000L & l) != 0L) { - jjCheckNAddStates(10, 12); - } + if ((0xff000000000000L & l) != 0L) + jjCheckNAddStates(13, 15); break; case 25: - if ((0xf000000000000L & l) != 0L) { + if ((0xf000000000000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 26; - } break; case 26: - if ((0xff000000000000L & l) != 0L) { + if ((0xff000000000000L & l) != 0L) jjCheckNAdd(24); - } break; case 27: - if (curChar != 36) { + if (curChar != 36) break; - } - if (kind > 67) { + if (kind > 67) kind = 67; - } jjCheckNAdd(28); break; case 28: - if ((0x3ff001000000000L & l) == 0L) { + if ((0x3ff001000000000L & l) == 0L) break; - } - if (kind > 67) { + if (kind > 67) kind = 67; - } jjCheckNAdd(28); break; case 29: - if ((0x3ff000000000000L & l) != 0L) { - jjCheckNAddStates(0, 6); - } + if ((0x3ff000000000000L & l) != 0L) + jjCheckNAddStates(3, 9); break; case 30: - if ((0x3ff000000000000L & l) != 0L) { + if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(30, 31); - } break; case 31: - if (curChar != 46) { + if (curChar != 46) break; - } - if (kind > 63) { + if (kind > 63) kind = 63; - } jjCheckNAddStates(28, 30); break; case 32: - if ((0x3ff000000000000L & l) == 0L) { + if ((0x3ff000000000000L & l) == 0L) break; - } - if (kind > 63) { + if (kind > 63) kind = 63; - } jjCheckNAddStates(28, 30); break; case 34: - if ((0x280000000000L & l) != 0L) { + if ((0x280000000000L & l) != 0L) jjCheckNAdd(35); - } break; case 35: - if ((0x3ff000000000000L & l) == 0L) { + if ((0x3ff000000000000L & l) == 0L) break; - } - if (kind > 63) { + if (kind > 63) kind = 63; - } jjCheckNAddTwoStates(35, 8); break; case 36: - if ((0x3ff000000000000L & l) != 0L) { + if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(36, 37); - } break; case 38: - if ((0x280000000000L & l) != 0L) { + if ((0x280000000000L & l) != 0L) jjCheckNAdd(39); - } break; case 39: - if ((0x3ff000000000000L & l) == 0L) { + if ((0x3ff000000000000L & l) == 0L) break; - } - if (kind > 63) { + if (kind > 63) kind = 63; - } jjCheckNAddTwoStates(39, 8); break; case 40: - if ((0x3ff000000000000L & l) != 0L) { + if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(31, 33); - } break; case 42: - if ((0x280000000000L & l) != 0L) { + if ((0x280000000000L & l) != 0L) jjCheckNAdd(43); - } break; case 43: - if ((0x3ff000000000000L & l) != 0L) { + if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(43, 8); - } break; case 44: - if (curChar != 48) { + if (curChar != 48) break; - } - if (kind > 59) { + if (kind > 59) kind = 59; - } - jjCheckNAddStates(15, 17); + jjCheckNAddStates(18, 20); break; case 46: - if ((0x3ff000000000000L & l) == 0L) { + if ((0x3ff000000000000L & l) == 0L) break; - } - if (kind > 59) { + if (kind > 59) kind = 59; - } jjCheckNAddTwoStates(46, 2); break; case 47: - if ((0xff000000000000L & l) == 0L) { + if ((0xff000000000000L & l) == 0L) break; - } - if (kind > 59) { + if (kind > 59) kind = 59; - } jjCheckNAddTwoStates(47, 2); break; case 48: - if (curChar == 47) { - jjAddStates(7, 9); - } + if (curChar == 47) + jjAddStates(10, 12); break; case 50: - if ((0xffffffffffffdbffL & l) != 0L) { - jjCheckNAddStates(18, 20); - } + if ((0xffffffffffffdbffL & l) != 0L) + jjCheckNAddStates(0, 2); break; case 51: - if ((0x2400L & l) != 0L && kind > 6) { + if ((0x2400L & l) != 0L && kind > 6) kind = 6; - } break; case 52: - if (curChar == 10 && kind > 6) { + if (curChar == 10 && kind > 6) kind = 6; - } break; case 53: - if (curChar == 13) { + if (curChar == 13) jjstateSet[jjnewStateCnt++] = 52; - } break; case 54: - if (curChar == 42) { + if (curChar == 42) jjCheckNAddTwoStates(55, 56); - } break; case 55: - if ((0xfffffbffffffffffL & l) != 0L) { + if ((0xfffffbffffffffffL & l) != 0L) jjCheckNAddTwoStates(55, 56); - } break; case 56: - if (curChar == 42) { + if (curChar == 42) jjCheckNAddStates(34, 36); - } break; case 57: - if ((0xffff7bffffffffffL & l) != 0L) { + if ((0xffff7bffffffffffL & l) != 0L) jjCheckNAddTwoStates(58, 56); - } break; case 58: - if ((0xfffffbffffffffffL & l) != 0L) { + if ((0xfffffbffffffffffL & l) != 0L) jjCheckNAddTwoStates(58, 56); - } break; case 59: - if (curChar == 47 && kind > 7) { + if (curChar == 47 && kind > 7) kind = 7; - } break; case 60: - if (curChar == 42) { + if (curChar == 42) jjstateSet[jjnewStateCnt++] = 54; - } break; case 61: - if (curChar == 42) { + if (curChar == 42) jjCheckNAddTwoStates(62, 63); - } break; case 62: - if ((0xfffffbffffffffffL & l) != 0L) { + if ((0xfffffbffffffffffL & l) != 0L) jjCheckNAddTwoStates(62, 63); - } break; case 63: - if (curChar == 42) { + if (curChar == 42) jjCheckNAddStates(37, 39); - } break; case 64: - if ((0xffff7bffffffffffL & l) != 0L) { + if ((0xffff7bffffffffffL & l) != 0L) jjCheckNAddTwoStates(65, 63); - } break; case 65: - if ((0xfffffbffffffffffL & l) != 0L) { + if ((0xfffffbffffffffffL & l) != 0L) jjCheckNAddTwoStates(65, 63); - } break; case 66: - if (curChar == 47 && kind > 8) { + if (curChar == 47 && kind > 8) kind = 8; - } break; default : break; } @@ -1357,97 +1188,79 @@ else if (curChar == 48) else if (curChar < 128) { long l = 1L << (curChar & 077); - //MatchLoop do { switch(jjstateSet[--i]) { case 0: case 28: - if ((0x7fffffe87fffffeL & l) == 0L) { + if ((0x7fffffe87fffffeL & l) == 0L) break; - } - if (kind > 67) { + if (kind > 67) kind = 67; - } jjCheckNAdd(28); break; case 2: - if ((0x100000001000L & l) != 0L && kind > 59) { + if ((0x100000001000L & l) != 0L && kind > 59) kind = 59; - } break; case 5: - if ((0x2000000020L & l) != 0L) { + if ((0x2000000020L & l) != 0L) jjAddStates(40, 41); - } break; case 8: - if ((0x5000000050L & l) != 0L && kind > 63) { + if ((0x5000000050L & l) != 0L && kind > 63) kind = 63; - } break; case 10: - if ((0xffffffffefffffffL & l) != 0L) { + if ((0xffffffffefffffffL & l) != 0L) jjCheckNAdd(11); - } break; case 12: - if (curChar == 92) { + if (curChar == 92) jjAddStates(42, 44); - } break; case 13: - if ((0x14404410000000L & l) != 0L) { + if ((0x14404410000000L & l) != 0L) jjCheckNAdd(11); - } break; case 19: - if ((0xffffffffefffffffL & l) != 0L) { - jjCheckNAddStates(10, 12); - } + if ((0xffffffffefffffffL & l) != 0L) + jjCheckNAddStates(13, 15); break; case 20: - if (curChar == 92) { + if (curChar == 92) jjAddStates(45, 47); - } break; case 21: - if ((0x14404410000000L & l) != 0L) { - jjCheckNAddStates(10, 12); - } + if ((0x14404410000000L & l) != 0L) + jjCheckNAddStates(13, 15); break; case 33: - if ((0x2000000020L & l) != 0L) { + if ((0x2000000020L & l) != 0L) jjAddStates(48, 49); - } break; case 37: - if ((0x2000000020L & l) != 0L) { + if ((0x2000000020L & l) != 0L) jjAddStates(50, 51); - } break; case 41: - if ((0x2000000020L & l) != 0L) { + if ((0x2000000020L & l) != 0L) jjAddStates(52, 53); - } break; case 45: - if ((0x100000001000000L & l) != 0L) { + if ((0x100000001000000L & l) != 0L) jjCheckNAdd(46); - } break; case 46: - if ((0x7e0000007eL & l) == 0L) { + if ((0x7e0000007eL & l) == 0L) break; - } - if (kind > 59) { + if (kind > 59) kind = 59; - } jjCheckNAddTwoStates(46, 2); break; case 50: - jjAddStates(18, 20); + jjAddStates(0, 2); break; case 55: jjCheckNAddTwoStates(55, 56); @@ -1474,57 +1287,47 @@ else if (curChar < 128) long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); - //MatchLoop do { switch(jjstateSet[--i]) { case 0: case 28: - if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) { + if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) break; - } - if (kind > 67) { + if (kind > 67) kind = 67; - } jjCheckNAdd(28); break; case 10: - if (jjCanMove_0(hiByte, i1, i2, l1, l2)) { + if (jjCanMove_0(hiByte, i1, i2, l1, l2)) jjstateSet[jjnewStateCnt++] = 11; - } break; case 19: - if (jjCanMove_0(hiByte, i1, i2, l1, l2)) { - jjAddStates(10, 12); - } + if (jjCanMove_0(hiByte, i1, i2, l1, l2)) + jjAddStates(13, 15); break; case 50: - if (jjCanMove_0(hiByte, i1, i2, l1, l2)) { - jjAddStates(18, 20); - } + if (jjCanMove_0(hiByte, i1, i2, l1, l2)) + jjAddStates(0, 2); break; case 55: - if (jjCanMove_0(hiByte, i1, i2, l1, l2)) { + if (jjCanMove_0(hiByte, i1, i2, l1, l2)) jjCheckNAddTwoStates(55, 56); - } break; case 57: case 58: - if (jjCanMove_0(hiByte, i1, i2, l1, l2)) { + if (jjCanMove_0(hiByte, i1, i2, l1, l2)) jjCheckNAddTwoStates(58, 56); - } break; case 62: - if (jjCanMove_0(hiByte, i1, i2, l1, l2)) { + if (jjCanMove_0(hiByte, i1, i2, l1, l2)) jjCheckNAddTwoStates(62, 63); - } break; case 64: case 65: - if (jjCanMove_0(hiByte, i1, i2, l1, l2)) { + if (jjCanMove_0(hiByte, i1, i2, l1, l2)) jjCheckNAddTwoStates(65, 63); - } break; default : break; } @@ -1537,16 +1340,15 @@ else if (curChar < 128) kind = 0x7fffffff; } ++curPos; - if ((i = jjnewStateCnt) == (startsAt = 67 - (jjnewStateCnt = startsAt))) { + if ((i = jjnewStateCnt) == (startsAt = 67 - (jjnewStateCnt = startsAt))) return curPos; - } try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } } } static final int[] jjnextStates = { - 30, 31, 36, 37, 40, 41, 8, 49, 60, 61, 19, 20, 22, 10, 12, 45, - 47, 2, 50, 51, 53, 4, 5, 8, 19, 20, 24, 22, 32, 33, 8, 40, + 50, 51, 53, 30, 31, 36, 37, 40, 41, 8, 49, 60, 61, 19, 20, 22, + 10, 12, 45, 47, 2, 4, 5, 8, 19, 20, 24, 22, 32, 33, 8, 40, 41, 8, 56, 57, 59, 63, 64, 66, 6, 7, 13, 14, 16, 21, 23, 25, 34, 35, 38, 39, 42, 43, }; @@ -1557,9 +1359,8 @@ private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, lo case 0: return ((jjbitVec2[i2] & l2) != 0L); default : - if ((jjbitVec0[i1] & l1) != 0L) { + if ((jjbitVec0[i1] & l1) != 0L) return true; - } return false; } } @@ -1578,12 +1379,13 @@ private static final boolean jjCanMove_1(int hiByte, int i1, int i2, long l1, lo case 61: return ((jjbitVec8[i2] & l2) != 0L); default : - if ((jjbitVec3[i1] & l1) != 0L) { + if ((jjbitVec3[i1] & l1) != 0L) return true; - } return false; } } + +/** Token literal values. */ public static final String[] jjstrLiteralImages = { "", null, null, null, null, null, null, null, null, "\141\142\163\164\162\141\143\164", "\142\157\157\154\145\141\156", "\142\162\145\141\153", "\142\171\164\145", @@ -1606,6 +1408,8 @@ private static final boolean jjCanMove_1(int hiByte, int i1, int i2, long l1, lo "\46\46", "\53\53", "\55\55", "\53", "\55", "\52", "\57", "\46", "\174", "\136", "\45", "\74\74", "\76\76", "\76\76\76", "\53\75", "\55\75", "\52\75", "\57\75", "\46\75", "\174\75", "\136\75", "\45\75", "\74\74\75", "\76\76\75", "\76\76\76\75", }; + +/** Lexer state names. */ public static final String[] lexStateNames = { "DEFAULT", }; @@ -1618,61 +1422,76 @@ private static final boolean jjCanMove_1(int hiByte, int i1, int i2, long l1, lo static final long[] jjtoSpecial = { 0x1c0L, 0x0L, }; -private ASCII_UCodeESC_CharStream input_stream; +protected JavaCharStream input_stream; private final int[] jjrounds = new int[67]; private final int[] jjstateSet = new int[134]; protected char curChar; -public ExpressionParserTokenManager(ASCII_UCodeESC_CharStream stream) -{ - if (ASCII_UCodeESC_CharStream.staticFlag) { +/** Constructor. */ +public ExpressionParserTokenManager(JavaCharStream stream){ + if (JavaCharStream.staticFlag) throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer."); - } input_stream = stream; } -public ExpressionParserTokenManager(ASCII_UCodeESC_CharStream stream, int lexState) -{ + +/** Constructor. */ +public ExpressionParserTokenManager(JavaCharStream stream, int lexState){ this(stream); SwitchTo(lexState); } -public void ReInit(ASCII_UCodeESC_CharStream stream) + +/** Reinitialise parser. */ +public void ReInit(JavaCharStream stream) { jjmatchedPos = jjnewStateCnt = 0; curLexState = defaultLexState; input_stream = stream; ReInitRounds(); } -private final void ReInitRounds() +private void ReInitRounds() { int i; jjround = 0x80000001; - for (i = 67; i-- > 0;) { + for (i = 67; i-- > 0;) jjrounds[i] = 0x80000000; } -} -public void ReInit(ASCII_UCodeESC_CharStream stream, int lexState) + +/** Reinitialise parser. */ +public void ReInit(JavaCharStream stream, int lexState) { ReInit(stream); SwitchTo(lexState); } + +/** Switch to specified lex state. */ public void SwitchTo(int lexState) { - if (lexState >= 1 || lexState < 0) { + if (lexState >= 1 || lexState < 0) throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); - } else { + else curLexState = lexState; } -} -private final Token jjFillToken() +protected Token jjFillToken() { - Token t = Token.newToken(jjmatchedKind); - t.kind = jjmatchedKind; + final Token t; + final String curTokenImage; + final int beginLine; + final int endLine; + final int beginColumn; + final int endColumn; String im = jjstrLiteralImages[jjmatchedKind]; - t.image = (im == null) ? input_stream.GetImage() : im; - t.beginLine = input_stream.getBeginLine(); - t.beginColumn = input_stream.getBeginColumn(); - t.endLine = input_stream.getEndLine(); - t.endColumn = input_stream.getEndColumn(); + curTokenImage = (im == null) ? input_stream.GetImage() : im; + beginLine = input_stream.getBeginLine(); + beginColumn = input_stream.getBeginColumn(); + endLine = input_stream.getEndLine(); + endColumn = input_stream.getEndColumn(); + t = Token.newToken(jjmatchedKind, curTokenImage); + + t.beginLine = beginLine; + t.endLine = endLine; + t.beginColumn = beginColumn; + t.endColumn = endColumn; + return t; } @@ -1683,7 +1502,8 @@ private final Token jjFillToken() int jjmatchedPos; int jjmatchedKind; -public final Token getNextToken() +/** Get the next Token. */ +public Token getNextToken() { Token specialToken = null; Token matchedToken; @@ -1704,20 +1524,18 @@ public final Token getNextToken() return matchedToken; } - try { - while (curChar <= 32 && (0x100003600L & (1L << curChar)) != 0L) { + try { input_stream.backup(0); + while (curChar <= 32 && (0x100003600L & (1L << curChar)) != 0L) curChar = input_stream.BeginToken(); } - } catch (java.io.IOException e1) { continue EOFLoop; } jjmatchedKind = 0x7fffffff; jjmatchedPos = 0; curPos = jjMoveStringLiteralDfa0_0(); if (jjmatchedKind != 0x7fffffff) { - if (jjmatchedPos + 1 < curPos) { + if (jjmatchedPos + 1 < curPos) input_stream.backup(curPos - jjmatchedPos - 1); - } if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) { matchedToken = jjFillToken(); @@ -1729,9 +1547,9 @@ public final Token getNextToken() if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) { matchedToken = jjFillToken(); - if (specialToken == null) { + if (specialToken == null) specialToken = matchedToken; - } else + else { matchedToken.specialToken = specialToken; specialToken = (specialToken.next = matchedToken); @@ -1751,9 +1569,9 @@ public final Token getNextToken() if (curChar == '\n' || curChar == '\r') { error_line++; error_column = 0; - } else { - error_column++; } + else + error_column++; } if (!EOFSeen) { input_stream.backup(1); @@ -1763,4 +1581,31 @@ public final Token getNextToken() } } +private void jjCheckNAdd(int state) +{ + if (jjrounds[state] != jjround) + { + jjstateSet[jjnewStateCnt++] = state; + jjrounds[state] = jjround; + } +} +private void jjAddStates(int start, int end) +{ + do { + jjstateSet[jjnewStateCnt++] = jjnextStates[start]; + } while (start++ != end); +} +private void jjCheckNAddTwoStates(int state1, int state2) +{ + jjCheckNAdd(state1); + jjCheckNAdd(state2); +} + +private void jjCheckNAddStates(int start, int end) +{ + do { + jjCheckNAdd(jjnextStates[start]); + } while (start++ != end); +} + } diff --git a/jdk/src/share/classes/com/sun/tools/example/debug/expr/JavaCharStream.java b/jdk/src/share/classes/com/sun/tools/example/debug/expr/JavaCharStream.java new file mode 100644 index 00000000000..cc4581f1a2a --- /dev/null +++ b/jdk/src/share/classes/com/sun/tools/example/debug/expr/JavaCharStream.java @@ -0,0 +1,642 @@ +/* + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* Generated By:JavaCC: Do not edit this line. JavaCharStream.java Version 5.0 */ +/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ +package com.sun.tools.example.debug.expr; + +/** + * An implementation of interface CharStream, where the stream is assumed to + * contain only ASCII characters (with java-like unicode escape processing). + */ + +public +class JavaCharStream +{ + /** Whether parser is static. */ + public static final boolean staticFlag = false; + + static final int hexval(char c) throws java.io.IOException { + switch(c) + { + case '0' : + return 0; + case '1' : + return 1; + case '2' : + return 2; + case '3' : + return 3; + case '4' : + return 4; + case '5' : + return 5; + case '6' : + return 6; + case '7' : + return 7; + case '8' : + return 8; + case '9' : + return 9; + + case 'a' : + case 'A' : + return 10; + case 'b' : + case 'B' : + return 11; + case 'c' : + case 'C' : + return 12; + case 'd' : + case 'D' : + return 13; + case 'e' : + case 'E' : + return 14; + case 'f' : + case 'F' : + return 15; + } + + throw new java.io.IOException(); // Should never come here + } + +/** Position in buffer. */ + public int bufpos = -1; + int bufsize; + int available; + int tokenBegin; + protected int bufline[]; + protected int bufcolumn[]; + + protected int column = 0; + protected int line = 1; + + protected boolean prevCharIsCR = false; + protected boolean prevCharIsLF = false; + + protected java.io.Reader inputStream; + + protected char[] nextCharBuf; + protected char[] buffer; + protected int maxNextCharInd = 0; + protected int nextCharInd = -1; + protected int inBuf = 0; + protected int tabSize = 8; + + protected void setTabSize(int i) { tabSize = i; } + protected int getTabSize(int i) { return tabSize; } + + protected void ExpandBuff(boolean wrapAround) + { + char[] newbuffer = new char[bufsize + 2048]; + int newbufline[] = new int[bufsize + 2048]; + int newbufcolumn[] = new int[bufsize + 2048]; + + try + { + if (wrapAround) + { + System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); + System.arraycopy(buffer, 0, newbuffer, bufsize - tokenBegin, bufpos); + buffer = newbuffer; + + System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); + System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos); + bufline = newbufline; + + System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); + System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos); + bufcolumn = newbufcolumn; + + bufpos += (bufsize - tokenBegin); + } + else + { + System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); + buffer = newbuffer; + + System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); + bufline = newbufline; + + System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); + bufcolumn = newbufcolumn; + + bufpos -= tokenBegin; + } + } + catch (Throwable t) + { + throw new Error(t.getMessage()); + } + + available = (bufsize += 2048); + tokenBegin = 0; + } + + protected void FillBuff() throws java.io.IOException + { + int i; + if (maxNextCharInd == 4096) + maxNextCharInd = nextCharInd = 0; + + try { + if ((i = inputStream.read(nextCharBuf, maxNextCharInd, + 4096 - maxNextCharInd)) == -1) + { + inputStream.close(); + throw new java.io.IOException(); + } + else + maxNextCharInd += i; + return; + } + catch(java.io.IOException e) { + if (bufpos != 0) + { + --bufpos; + backup(0); + } + else + { + bufline[bufpos] = line; + bufcolumn[bufpos] = column; + } + throw e; + } + } + + protected char ReadByte() throws java.io.IOException + { + if (++nextCharInd >= maxNextCharInd) + FillBuff(); + + return nextCharBuf[nextCharInd]; + } + +/** @return starting character for token. */ + public char BeginToken() throws java.io.IOException + { + if (inBuf > 0) + { + --inBuf; + + if (++bufpos == bufsize) + bufpos = 0; + + tokenBegin = bufpos; + return buffer[bufpos]; + } + + tokenBegin = 0; + bufpos = -1; + + return readChar(); + } + + protected void AdjustBuffSize() + { + if (available == bufsize) + { + if (tokenBegin > 2048) + { + bufpos = 0; + available = tokenBegin; + } + else + ExpandBuff(false); + } + else if (available > tokenBegin) + available = bufsize; + else if ((tokenBegin - available) < 2048) + ExpandBuff(true); + else + available = tokenBegin; + } + + protected void UpdateLineColumn(char c) + { + column++; + + if (prevCharIsLF) + { + prevCharIsLF = false; + line += (column = 1); + } + else if (prevCharIsCR) + { + prevCharIsCR = false; + if (c == '\n') + { + prevCharIsLF = true; + } + else + line += (column = 1); + } + + switch (c) + { + case '\r' : + prevCharIsCR = true; + break; + case '\n' : + prevCharIsLF = true; + break; + case '\t' : + column--; + column += (tabSize - (column % tabSize)); + break; + default : + break; + } + + bufline[bufpos] = line; + bufcolumn[bufpos] = column; + } + +/** Read a character. */ + public char readChar() throws java.io.IOException + { + if (inBuf > 0) + { + --inBuf; + + if (++bufpos == bufsize) + bufpos = 0; + + return buffer[bufpos]; + } + + char c; + + if (++bufpos == available) + AdjustBuffSize(); + + if ((buffer[bufpos] = c = ReadByte()) == '\\') + { + UpdateLineColumn(c); + + int backSlashCnt = 1; + + for (;;) // Read all the backslashes + { + if (++bufpos == available) + AdjustBuffSize(); + + try + { + if ((buffer[bufpos] = c = ReadByte()) != '\\') + { + UpdateLineColumn(c); + // found a non-backslash char. + if ((c == 'u') && ((backSlashCnt & 1) == 1)) + { + if (--bufpos < 0) + bufpos = bufsize - 1; + + break; + } + + backup(backSlashCnt); + return '\\'; + } + } + catch(java.io.IOException e) + { + // We are returning one backslash so we should only backup (count-1) + if (backSlashCnt > 1) + backup(backSlashCnt-1); + + return '\\'; + } + + UpdateLineColumn(c); + backSlashCnt++; + } + + // Here, we have seen an odd number of backslash's followed by a 'u' + try + { + while ((c = ReadByte()) == 'u') + ++column; + + buffer[bufpos] = c = (char)(hexval(c) << 12 | + hexval(ReadByte()) << 8 | + hexval(ReadByte()) << 4 | + hexval(ReadByte())); + + column += 4; + } + catch(java.io.IOException e) + { + throw new Error("Invalid escape character at line " + line + + " column " + column + "."); + } + + if (backSlashCnt == 1) + return c; + else + { + backup(backSlashCnt - 1); + return '\\'; + } + } + else + { + UpdateLineColumn(c); + return c; + } + } + + @Deprecated + /** + * @deprecated + * @see #getEndColumn + */ + public int getColumn() { + return bufcolumn[bufpos]; + } + + @Deprecated + /** + * @deprecated + * @see #getEndLine + */ + public int getLine() { + return bufline[bufpos]; + } + +/** Get end column. */ + public int getEndColumn() { + return bufcolumn[bufpos]; + } + +/** Get end line. */ + public int getEndLine() { + return bufline[bufpos]; + } + +/** @return column of token start */ + public int getBeginColumn() { + return bufcolumn[tokenBegin]; + } + +/** @return line number of token start */ + public int getBeginLine() { + return bufline[tokenBegin]; + } + +/** Retreat. */ + public void backup(int amount) { + + inBuf += amount; + if ((bufpos -= amount) < 0) + bufpos += bufsize; + } + +/** Constructor. */ + public JavaCharStream(java.io.Reader dstream, + int startline, int startcolumn, int buffersize) + { + inputStream = dstream; + line = startline; + column = startcolumn - 1; + + available = bufsize = buffersize; + buffer = new char[buffersize]; + bufline = new int[buffersize]; + bufcolumn = new int[buffersize]; + nextCharBuf = new char[4096]; + } + +/** Constructor. */ + public JavaCharStream(java.io.Reader dstream, + int startline, int startcolumn) + { + this(dstream, startline, startcolumn, 4096); + } + +/** Constructor. */ + public JavaCharStream(java.io.Reader dstream) + { + this(dstream, 1, 1, 4096); + } +/** Reinitialise. */ + public void ReInit(java.io.Reader dstream, + int startline, int startcolumn, int buffersize) + { + inputStream = dstream; + line = startline; + column = startcolumn - 1; + + if (buffer == null || buffersize != buffer.length) + { + available = bufsize = buffersize; + buffer = new char[buffersize]; + bufline = new int[buffersize]; + bufcolumn = new int[buffersize]; + nextCharBuf = new char[4096]; + } + prevCharIsLF = prevCharIsCR = false; + tokenBegin = inBuf = maxNextCharInd = 0; + nextCharInd = bufpos = -1; + } + +/** Reinitialise. */ + public void ReInit(java.io.Reader dstream, + int startline, int startcolumn) + { + ReInit(dstream, startline, startcolumn, 4096); + } + +/** Reinitialise. */ + public void ReInit(java.io.Reader dstream) + { + ReInit(dstream, 1, 1, 4096); + } +/** Constructor. */ + public JavaCharStream(java.io.InputStream dstream, String encoding, int startline, + int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException + { + this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); + } + +/** Constructor. */ + public JavaCharStream(java.io.InputStream dstream, int startline, + int startcolumn, int buffersize) + { + this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096); + } + +/** Constructor. */ + public JavaCharStream(java.io.InputStream dstream, String encoding, int startline, + int startcolumn) throws java.io.UnsupportedEncodingException + { + this(dstream, encoding, startline, startcolumn, 4096); + } + +/** Constructor. */ + public JavaCharStream(java.io.InputStream dstream, int startline, + int startcolumn) + { + this(dstream, startline, startcolumn, 4096); + } + +/** Constructor. */ + public JavaCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException + { + this(dstream, encoding, 1, 1, 4096); + } + +/** Constructor. */ + public JavaCharStream(java.io.InputStream dstream) + { + this(dstream, 1, 1, 4096); + } + +/** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, String encoding, int startline, + int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException + { + ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); + } + +/** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, int startline, + int startcolumn, int buffersize) + { + ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize); + } +/** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, String encoding, int startline, + int startcolumn) throws java.io.UnsupportedEncodingException + { + ReInit(dstream, encoding, startline, startcolumn, 4096); + } +/** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, int startline, + int startcolumn) + { + ReInit(dstream, startline, startcolumn, 4096); + } +/** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException + { + ReInit(dstream, encoding, 1, 1, 4096); + } + +/** Reinitialise. */ + public void ReInit(java.io.InputStream dstream) + { + ReInit(dstream, 1, 1, 4096); + } + + /** @return token image as String */ + public String GetImage() + { + if (bufpos >= tokenBegin) + return new String(buffer, tokenBegin, bufpos - tokenBegin + 1); + else + return new String(buffer, tokenBegin, bufsize - tokenBegin) + + new String(buffer, 0, bufpos + 1); + } + + /** @return suffix */ + public char[] GetSuffix(int len) + { + char[] ret = new char[len]; + + if ((bufpos + 1) >= len) + System.arraycopy(buffer, bufpos - len + 1, ret, 0, len); + else + { + System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0, + len - bufpos - 1); + System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1); + } + + return ret; + } + + /** Set buffers back to null when finished. */ + public void Done() + { + nextCharBuf = null; + buffer = null; + bufline = null; + bufcolumn = null; + } + + /** + * Method to adjust line and column numbers for the start of a token. + */ + public void adjustBeginLineColumn(int newLine, int newCol) + { + int start = tokenBegin; + int len; + + if (bufpos >= tokenBegin) + { + len = bufpos - tokenBegin + inBuf + 1; + } + else + { + len = bufsize - tokenBegin + bufpos + 1 + inBuf; + } + + int i = 0, j = 0, k = 0; + int nextColDiff = 0, columnDiff = 0; + + while (i < len && bufline[j = start % bufsize] == bufline[k = ++start % bufsize]) + { + bufline[j] = newLine; + nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j]; + bufcolumn[j] = newCol + columnDiff; + columnDiff = nextColDiff; + i++; + } + + if (i < len) + { + bufline[j] = newLine++; + bufcolumn[j] = newCol + columnDiff; + + while (i++ < len) + { + if (bufline[j = start % bufsize] != bufline[++start % bufsize]) + bufline[j] = newLine++; + else + bufline[j] = newLine; + } + } + + line = bufline[j]; + column = bufcolumn[j]; + } + +} +/* JavaCC - OriginalChecksum=17a580b005f6229e8445521923427bab (do not edit this line) */ diff --git a/jdk/src/share/classes/com/sun/tools/example/debug/expr/LValue.java b/jdk/src/share/classes/com/sun/tools/example/debug/expr/LValue.java index 1737137b9ca..4ae7d68b413 100644 --- a/jdk/src/share/classes/com/sun/tools/example/debug/expr/LValue.java +++ b/jdk/src/share/classes/com/sun/tools/example/debug/expr/LValue.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -743,7 +743,30 @@ static LValue makeDouble(VirtualMachine vm, Token token) { } static LValue makeInteger(VirtualMachine vm, Token token) { - return make(vm, Integer.parseInt(token.image)); + String image = token.image; + + // Here we have to deal with the fact that an INTEGER_LITERAL + // can be DECIMAL_LITERAL, HEX_LITERAL or OCTAL_LITERAL. All of these + // can have an optional "L" or "l" at the end signifying that it is + // a long value. Otherwise, we treat values that are in range for an + // int as int and anything else as long. + + if (image.endsWith("L") || image.endsWith("l")) { + // This is a long without doubt - drop the final "Ll" and decode + image = image.substring(0, image.length() - 1); + return make(vm, Long.decode(image)); + } + + long longValue = Long.decode(image); + int intValue = (int) longValue; + if (intValue == longValue) { + // the value fits in an integer, lets return it as an integer + return make(vm, intValue); + } + else { + // otherwise treat it as a long + return make(vm, longValue); + } } static LValue makeShort(VirtualMachine vm, Token token) { @@ -1065,4 +1088,76 @@ static LValue operation(VirtualMachine vm, Token token, return make(vm, res); } } + + static LValue operation(VirtualMachine vm, Token token, LValue rightL, + ExpressionParser.GetFrame frameGetter) + throws ParseException { + String op = token.image; + Value right = rightL.interiorGetValue(); + if (right instanceof ObjectReference) { + throw new ParseException("Invalid operation '" + op + + "' on an Object"); + } + if (right instanceof BooleanValue) { + if (op.equals("!")) { + boolean rr = ((BooleanValue) right).value(); + return make(vm, !rr); + } + throw new ParseException("Invalid operation '" + op + + "' on a Boolean"); + } + // from here on, we know it is a integer kind of type + PrimitiveValue primRight = (PrimitiveValue) right; + if (primRight instanceof DoubleValue) { + double rr = primRight.doubleValue(); + double res; + if (op.equals("+")) { + res = rr; + } else if (op.equals("-")) { + res = -rr; + } else { + throw new ParseException("Unknown operation: " + op); + } + return make(vm, res); + } + if (primRight instanceof FloatValue) { + float rr = primRight.floatValue(); + float res; + if (op.equals("+")) { + res = rr; + } else if (op.equals("-")) { + res = -rr; + } else { + throw new ParseException("Unknown operation: " + op); + } + return make(vm, res); + } + if (primRight instanceof LongValue) { + long rr = primRight.longValue(); + long res; + if (op.equals("+")) { + res = rr; + } else if (op.equals("-")) { + res = -rr; + } else if (op.equals("~")) { + res = ~rr; + } else { + throw new ParseException("Unknown operation: " + op); + } + return make(vm, res); + } else { + int rr = primRight.intValue(); + int res; + if (op.equals("+")) { + res = rr; + } else if (op.equals("-")) { + res = -rr; + } else if (op.equals("~")) { + res = ~rr; + } else { + throw new ParseException("Unknown operation: " + op); + } + return make(vm, res); + } + } } diff --git a/jdk/src/share/classes/com/sun/tools/example/debug/expr/ParseException.java b/jdk/src/share/classes/com/sun/tools/example/debug/expr/ParseException.java index 795b40c0011..6df5e4bafc6 100644 --- a/jdk/src/share/classes/com/sun/tools/example/debug/expr/ParseException.java +++ b/jdk/src/share/classes/com/sun/tools/example/debug/expr/ParseException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,16 +23,8 @@ * questions. */ -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 0.7pre6 */ +/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 5.0 */ +/* JavaCCOptions:KEEP_LINE_COL=null */ package com.sun.tools.example.debug.expr; /** @@ -46,27 +38,25 @@ */ public class ParseException extends Exception { - private static final long serialVersionUID = 7978489144303647901L; + /** + * The version identifier for this Serializable class. + * Increment only if the serialized form of the + * class changes. + */ + private static final long serialVersionUID = 1L; /** * This constructor is used by the method "generateParseException" * in the generated parser. Calling this constructor generates * a new object of this type with the fields "currentToken", - * "expectedTokenSequences", and "tokenImage" set. The boolean - * flag "specialConstructor" is also set to true to indicate that - * this constructor was used to create this object. - * This constructor calls its super class with the empty string - * to force the "toString" method of parent class "Throwable" to - * print the error message in the form: - * ParseException: + * "expectedTokenSequences", and "tokenImage" set. */ public ParseException(Token currentTokenVal, int[][] expectedTokenSequencesVal, String[] tokenImageVal ) { - super(""); - specialConstructor = true; + super(initialise(currentTokenVal, expectedTokenSequencesVal, tokenImageVal)); currentToken = currentTokenVal; expectedTokenSequences = expectedTokenSequencesVal; tokenImage = tokenImageVal; @@ -84,20 +74,13 @@ public ParseException(Token currentTokenVal, public ParseException() { super(); - specialConstructor = false; } + /** Constructor with message. */ public ParseException(String message) { super(message); - specialConstructor = false; } - /** - * This variable determines which constructor was used to create - * this object and thereby affects the semantics of the - * "getMessage" method (see below). - */ - protected boolean specialConstructor; /** * This is the last token that has been consumed successfully. If @@ -121,54 +104,52 @@ public ParseException(String message) { public String[] tokenImage; /** - * This method has the standard behavior when this object has been - * created using the standard constructors. Otherwise, it uses - * "currentToken" and "expectedTokenSequences" to generate a parse + * It uses "currentToken" and "expectedTokenSequences" to generate a parse * error message and returns it. If this object has been created * due to a parse error, and you do not catch it (it gets thrown - * from the parser), then this method is called during the printing - * of the final stack trace, and hence the correct error message + * from the parser) the correct error message * gets displayed. */ - @Override - public String getMessage() { - if (!specialConstructor) { - return super.getMessage(); - } - String expected = ""; + private static String initialise(Token currentToken, + int[][] expectedTokenSequences, + String[] tokenImage) { + String eol = System.getProperty("line.separator", "\n"); + StringBuffer expected = new StringBuffer(); int maxSize = 0; - for (int[] expectedTokenSequence : expectedTokenSequences) { - if (maxSize < expectedTokenSequence.length) { - maxSize = expectedTokenSequence.length; + for (int i = 0; i < expectedTokenSequences.length; i++) { + if (maxSize < expectedTokenSequences[i].length) { + maxSize = expectedTokenSequences[i].length; } - for (int j = 0; j < expectedTokenSequence.length; j++) { - expected += tokenImage[expectedTokenSequence[j]] + " "; + for (int j = 0; j < expectedTokenSequences[i].length; j++) { + expected.append(tokenImage[expectedTokenSequences[i][j]]).append(' '); } - if (expectedTokenSequence[expectedTokenSequence.length - 1] != 0) { - expected += "..."; + if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) { + expected.append("..."); } - expected += eol + " "; + expected.append(eol).append(" "); } String retval = "Encountered \""; Token tok = currentToken.next; for (int i = 0; i < maxSize; i++) { - if (i != 0) { - retval += " "; - } + if (i != 0) retval += " "; if (tok.kind == 0) { retval += tokenImage[0]; break; } + retval += " " + tokenImage[tok.kind]; + retval += " \""; retval += add_escapes(tok.image); + retval += " \""; tok = tok.next; } - retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn + "." + eol; + retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn; + retval += "." + eol; if (expectedTokenSequences.length == 1) { retval += "Was expecting:" + eol + " "; } else { retval += "Was expecting one of:" + eol + " "; } - retval += expected; + retval += expected.toString(); return retval; } @@ -182,7 +163,7 @@ public String getMessage() { * when these raw version cannot be used as part of an ASCII * string literal. */ - protected String add_escapes(String str) { + static String add_escapes(String str) { StringBuffer retval = new StringBuffer(); char ch; for (int i = 0; i < str.length(); i++) { @@ -228,3 +209,4 @@ protected String add_escapes(String str) { } } +/* JavaCC - OriginalChecksum=3c9f049ed2bb6ade635c5bf58a386169 (do not edit this line) */ diff --git a/jdk/src/share/classes/com/sun/tools/example/debug/expr/Token.java b/jdk/src/share/classes/com/sun/tools/example/debug/expr/Token.java index a1c17bf3f3f..3bfd69506f8 100644 --- a/jdk/src/share/classes/com/sun/tools/example/debug/expr/Token.java +++ b/jdk/src/share/classes/com/sun/tools/example/debug/expr/Token.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,23 +23,22 @@ * questions. */ -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -/* Generated By:JavaCC: Do not edit this line. Token.java Version 0.7pre3 */ +/* Generated By:JavaCC: Do not edit this line. Token.java Version 5.0 */ +/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ package com.sun.tools.example.debug.expr; /** * Describes the input token stream. */ -public class Token { +public class Token implements java.io.Serializable { + + /** + * The version identifier for this Serializable class. + * Increment only if the serialized form of the + * class changes. + */ + private static final long serialVersionUID = 1L; /** * An integer that describes the kind of this token. This numbering @@ -48,12 +47,14 @@ public class Token { */ public int kind; - /** - * beginLine and beginColumn describe the position of the first character - * of this token; endLine and endColumn describe the position of the - * last character of this token. - */ - public int beginLine, beginColumn, endLine, endColumn; + /** The line number of the first character of this Token. */ + public int beginLine; + /** The column number of the first character of this Token. */ + public int beginColumn; + /** The line number of the last character of this Token. */ + public int endLine; + /** The column number of the last character of this Token. */ + public int endColumn; /** * The string image of the token. @@ -84,13 +85,46 @@ public class Token { */ public Token specialToken; + /** + * An optional attribute value of the Token. + * Tokens which are not used as syntactic sugar will often contain + * meaningful values that will be used later on by the compiler or + * interpreter. This attribute value is often different from the image. + * Any subclass of Token that actually wants to return a non-null value can + * override this method as appropriate. + */ + public Object getValue() { + return null; + } + + /** + * No-argument constructor + */ + public Token() {} + + /** + * Constructs a new token for the specified Image. + */ + public Token(int kind) + { + this(kind, null); + } + + /** + * Constructs a new token for the specified Image and Kind. + */ + public Token(int kind, String image) + { + this.kind = kind; + this.image = image; + } + /** * Returns the image. */ - @Override - public final String toString() + public String toString() { - return image; + return image; } /** @@ -98,19 +132,25 @@ public final String toString() * can create and return subclass objects based on the value of ofKind. * Simply add the cases to the switch for all those special cases. * For example, if you have a subclass of Token called IDToken that - * you want to create if ofKind is ID, simlpy add something like : + * you want to create if ofKind is ID, simply add something like : * - * case MyParserConstants.ID : return new IDToken(); + * case MyParserConstants.ID : return new IDToken(ofKind, image); * * to the following switch statement. Then you can cast matchedToken - * variable to the appropriate type and use it in your lexical actions. + * variable to the appropriate type and use sit in your lexical actions. */ - public static final Token newToken(int ofKind) + public static Token newToken(int ofKind, String image) + { + switch(ofKind) + { + default : return new Token(ofKind, image); + } + } + + public static Token newToken(int ofKind) { - switch(ofKind) - { - default : return new Token(); - } + return newToken(ofKind, null); } } +/* JavaCC - OriginalChecksum=1f1783cae2d4cc94bc225889842dfa8b (do not edit this line) */ diff --git a/jdk/src/share/classes/com/sun/tools/example/debug/expr/TokenMgrError.java b/jdk/src/share/classes/com/sun/tools/example/debug/expr/TokenMgrError.java index b9f2328c960..5bc49c343a6 100644 --- a/jdk/src/share/classes/com/sun/tools/example/debug/expr/TokenMgrError.java +++ b/jdk/src/share/classes/com/sun/tools/example/debug/expr/TokenMgrError.java @@ -23,148 +23,150 @@ * questions. */ -/* - * This source code is provided to illustrate the usage of a given feature - * or technique and has been deliberately simplified. Additional steps - * required for a production-quality application, such as security checks, - * input validation and proper error handling, might not be present in - * this sample code. - */ - - -/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 0.7pre2 */ +/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 5.0 */ +/* JavaCCOptions: */ package com.sun.tools.example.debug.expr; +/** Token Manager Error. */ public class TokenMgrError extends Error { - /* - * Ordinals for various reasons why an Error of this type can be thrown. - */ - - private static final long serialVersionUID = -6236440836177601522L; - - /** - * Lexical error occurred. - */ - static final int LEXICAL_ERROR = 0; - - /** - * An attempt wass made to create a second instance of a static token manager. - */ - static final int STATIC_LEXER_ERROR = 1; - - /** - * Tried to change to an invalid lexical state. - */ - static final int INVALID_LEXICAL_STATE = 2; - - /** - * Detected (and bailed out of) an infinite loop in the token manager. - */ - static final int LOOP_DETECTED = 3; - - /** - * Indicates the reason why the exception is thrown. It will have - * one of the above 4 values. - */ - int errorCode; - - /** - * Replaces unprintable characters by their espaced (or unicode escaped) - * equivalents in the given string - */ - protected static final String addEscapes(String str) { - StringBuffer retval = new StringBuffer(); - char ch; - for (int i = 0; i < str.length(); i++) { - switch (str.charAt(i)) - { - case 0 : - continue; - case '\b': - retval.append("\\b"); - continue; - case '\t': - retval.append("\\t"); - continue; - case '\n': - retval.append("\\n"); - continue; - case '\f': - retval.append("\\f"); - continue; - case '\r': - retval.append("\\r"); - continue; - case '\"': - retval.append("\\\""); - continue; - case '\'': - retval.append("\\\'"); - continue; - case '\\': - retval.append("\\\\"); - continue; - default: - if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { - String s = "0000" + Integer.toString(ch, 16); - retval.append("\\u" + s.substring(s.length() - 4, s.length())); - } else { - retval.append(ch); - } - continue; - } + + /** + * The version identifier for this Serializable class. + * Increment only if the serialized form of the + * class changes. + */ + private static final long serialVersionUID = 1L; + + /* + * Ordinals for various reasons why an Error of this type can be thrown. + */ + + /** + * Lexical error occurred. + */ + static final int LEXICAL_ERROR = 0; + + /** + * An attempt was made to create a second instance of a static token manager. + */ + static final int STATIC_LEXER_ERROR = 1; + + /** + * Tried to change to an invalid lexical state. + */ + static final int INVALID_LEXICAL_STATE = 2; + + /** + * Detected (and bailed out of) an infinite loop in the token manager. + */ + static final int LOOP_DETECTED = 3; + + /** + * Indicates the reason why the exception is thrown. It will have + * one of the above 4 values. + */ + int errorCode; + + /** + * Replaces unprintable characters by their escaped (or unicode escaped) + * equivalents in the given string + */ + protected static final String addEscapes(String str) { + StringBuffer retval = new StringBuffer(); + char ch; + for (int i = 0; i < str.length(); i++) { + switch (str.charAt(i)) + { + case 0 : + continue; + case '\b': + retval.append("\\b"); + continue; + case '\t': + retval.append("\\t"); + continue; + case '\n': + retval.append("\\n"); + continue; + case '\f': + retval.append("\\f"); + continue; + case '\r': + retval.append("\\r"); + continue; + case '\"': + retval.append("\\\""); + continue; + case '\'': + retval.append("\\\'"); + continue; + case '\\': + retval.append("\\\\"); + continue; + default: + if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { + String s = "0000" + Integer.toString(ch, 16); + retval.append("\\u" + s.substring(s.length() - 4, s.length())); + } else { + retval.append(ch); + } + continue; } - return retval.toString(); - } - - /** - * Returns a detailed message for the Error when it is thrown by the - * token manager to indicate a lexical error. - * Parameters : - * EOFSeen : indicates if EOF caused the lexicl error - * curLexState : lexical state in which this error occurred - * errorLine : line number when the error occurred - * errorColumn : column number when the error occurred - * errorAfter : prefix that was seen before this error occurred - * curchar : the offending character - * Note: You can customize the lexical error message by modifying this method. - */ - private static final String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { - return("Lexical error at line " + - errorLine + ", column " + - errorColumn + ". Encountered: " + - (EOFSeen ? " " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + - "after : \"" + addEscapes(errorAfter) + "\""); - } - - /** - * You can also modify the body of this method to customize your error messages. - * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not - * of end-users concern, so you can return something like : - * - * "Internal Error : Please file a bug report .... " - * - * from this method for such cases in the release version of your parser. - */ - @Override - public String getMessage() { - return super.getMessage(); - } - - /* - * Constructors of various flavors follow. - */ - - public TokenMgrError() { - } - - public TokenMgrError(String message, int reason) { - super(message); - errorCode = reason; - } - - public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) { - this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); - } + } + return retval.toString(); + } + + /** + * Returns a detailed message for the Error when it is thrown by the + * token manager to indicate a lexical error. + * Parameters : + * EOFSeen : indicates if EOF caused the lexical error + * curLexState : lexical state in which this error occurred + * errorLine : line number when the error occurred + * errorColumn : column number when the error occurred + * errorAfter : prefix that was seen before this error occurred + * curchar : the offending character + * Note: You can customize the lexical error message by modifying this method. + */ + protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { + return("Lexical error at line " + + errorLine + ", column " + + errorColumn + ". Encountered: " + + (EOFSeen ? " " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + + "after : \"" + addEscapes(errorAfter) + "\""); + } + + /** + * You can also modify the body of this method to customize your error messages. + * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not + * of end-users concern, so you can return something like : + * + * "Internal Error : Please file a bug report .... " + * + * from this method for such cases in the release version of your parser. + */ + public String getMessage() { + return super.getMessage(); + } + + /* + * Constructors of various flavors follow. + */ + + /** No arg constructor. */ + public TokenMgrError() { + } + + /** Constructor with message and reason. */ + public TokenMgrError(String message, int reason) { + super(message); + errorCode = reason; + } + + /** Full Constructor. */ + public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) { + this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); + } } +/* JavaCC - OriginalChecksum=9b5d040f247411cad7f77688386c48e7 (do not edit this line) */ diff --git a/jdk/test/com/sun/jdi/JdbExprTest.sh b/jdk/test/com/sun/jdi/JdbExprTest.sh new file mode 100644 index 00000000000..e60b51b7acb --- /dev/null +++ b/jdk/test/com/sun/jdi/JdbExprTest.sh @@ -0,0 +1,158 @@ +#!/bin/sh + +# +# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# @test +# @bug 4660158 +# @author Staffan Larsen +# @run shell JdbExprTest.sh + +# These are variables that can be set to control execution + +#pkg=untitled7 +classname=JdbExprTest +compileOptions=-g +#java="java_g" +#set -x + +createJavaFile() +{ + cat < $classname.java.1 +import java.util.*; +import java.net.URLClassLoader; +import java.net.URL; + +class $classname { + + static long aLong; + static int anInt; + static boolean aBoolean; + + public static void bkpt() { + int i = 0; //@1 breakpoint + } + + public static void main(String[] args) { + bkpt(); + } +} +EOF +} + + +# drive jdb by sending cmds to it and examining its output +dojdbCmds() +{ + setBkpts @1 + runToBkpt @1 + + cmd print java.lang.Long.MAX_VALUE + jdbFailIfNotPresent " \= 9223372036854775807" 3 + + cmd print java.lang.Long.MIN_VALUE + jdbFailIfNotPresent " \= \-9223372036854775808" 3 + + cmd print 9223372036854775807L + jdbFailIfNotPresent "9223372036854775807L = 9223372036854775807" 3 + cmd print 9223372036854775807 + jdbFailIfNotPresent "9223372036854775807 = 9223372036854775807" 3 + + cmd print -9223372036854775807L + jdbFailIfNotPresent "\-9223372036854775807L = \-9223372036854775807" 3 + cmd print -9223372036854775807 + jdbFailIfNotPresent "\-9223372036854775807 = \-9223372036854775807" 3 + + cmd print -1 + jdbFailIfNotPresent "\-1 = \-1" 3 + cmd print 1L + jdbFailIfNotPresent "1L = 1" 3 + cmd print -1L + jdbFailIfNotPresent "\-1L = \-1" 3 + cmd print 0x1 + jdbFailIfNotPresent "0x1 = 1" 3 + + cmd set $classname.aLong = 9223372036854775807L + cmd print $classname.aLong + jdbFailIfNotPresent "$classname.aLong = 9223372036854775807" 3 + + cmd set $classname.anInt = java.lang.Integer.MAX_VALUE + 1 + cmd print $classname.anInt + jdbFailIfNotPresent "$classname.anInt = \-2147483648" 3 + + cmd set $classname.aLong = java.lang.Integer.MAX_VALUE + 1L + cmd print $classname.aLong + jdbFailIfNotPresent "$classname.aLong = 2147483648" 3 + + cmd set $classname.anInt = 0x80000000 + jdbFailIfNotPresent "Can\'t convert 2147483648 to int" 3 + cmd set $classname.anInt = 0x8000000000000000L + jdbFailIfNotPresent "java.lang.NumberFormatException: For input string: \"8000000000000000\"" 3 + + cmd set $classname.anInt = 0x7fffffff + jdbFailIfNotPresent "0x7fffffff = 2147483647" 3 + cmd set $classname.aLong = 0x7fffffffffffffff + jdbFailIfNotPresent "0x7fffffffffffffff = 9223372036854775807" 3 + + cmd print 3.1415 + jdbFailIfNotPresent "3.1415 = 3.1415" 3 + cmd print -3.1415 + jdbFailIfNotPresent "\-3.1415 = \-3.1415" 3 + cmd print 011 + jdbFailIfNotPresent "011 = 9" 3 + + cmd set $classname.aBoolean = false + jdbFailIfNotPresent "JdbExprTest.aBoolean = false = false" 3 + cmd print $classname.aBoolean + jdbFailIfNotPresent "JdbExprTest.aBoolean = false" 3 + cmd print !$classname.aBoolean + jdbFailIfNotPresent "JdbExprTest.aBoolean = true" 3 + + cmd print ~1 + jdbFailIfNotPresent "~1 = -2" 3 + + cmd quit +} + + +mysetup() +{ + if [ -z "$TESTSRC" ] ; then + TESTSRC=. + fi + + for ii in . $TESTSRC $TESTSRC/.. ; do + if [ -r "$ii/ShellScaffold.sh" ] ; then + . $ii/ShellScaffold.sh + break + fi + done +} + +# You could replace this next line with the contents +# of ShellScaffold.sh and this script will run just the same. +mysetup + +runit +jdbFailIfNotPresent "Breakpoint hit" +pass