0001: /* Generated By:JavaCC: Do not edit this line. ELParser.java */
0002: package org.jbpm.jpdl.el.parser;
0003:
0004: import org.jbpm.jpdl.el.impl.*;
0005:
0006: import java.util.ArrayList;
0007: import java.util.List;
0008:
0009: /**
0010: * Generated EL parser.
0011: *
0012: * @author Nathan Abramson
0013: * @author Shawn Bayern
0014: */
0015:
0016: public class ELParser implements ELParserConstants {
0017:
0018: public static void main(String args[]) throws ParseException {
0019: ELParser parser = new ELParser(System.in);
0020: parser.ExpressionString();
0021: }
0022:
0023: /*****************************************
0024: * GRAMMAR PRODUCTIONS *
0025: *****************************************/
0026:
0027: /**
0028: *
0029: * Returns a String if the expression string is a single String, an
0030: * Expression if the expression string is a single Expression, an
0031: * ExpressionString if it's a mixture of both.
0032: **/
0033: final public Object ExpressionString() throws ParseException {
0034: Object ret = "";
0035: List elems = null;
0036: Object elem;
0037: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0038: case NON_EXPRESSION_TEXT:
0039: ret = AttrValueString();
0040: break;
0041: case START_EXPRESSION:
0042: ret = AttrValueExpression();
0043: break;
0044: default:
0045: jj_la1[0] = jj_gen;
0046: jj_consume_token(-1);
0047: throw new ParseException();
0048: }
0049: label_1: while (true) {
0050: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0051: case NON_EXPRESSION_TEXT:
0052: case START_EXPRESSION:
0053: ;
0054: break;
0055: default:
0056: jj_la1[1] = jj_gen;
0057: break label_1;
0058: }
0059: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0060: case NON_EXPRESSION_TEXT:
0061: elem = AttrValueString();
0062: break;
0063: case START_EXPRESSION:
0064: elem = AttrValueExpression();
0065: break;
0066: default:
0067: jj_la1[2] = jj_gen;
0068: jj_consume_token(-1);
0069: throw new ParseException();
0070: }
0071: if (elems == null) {
0072: elems = new ArrayList();
0073: elems.add(ret);
0074: }
0075: elems.add(elem);
0076: }
0077: if (elems != null) {
0078: ret = new ExpressionString(elems.toArray());
0079: }
0080: {
0081: if (true)
0082: return ret;
0083: }
0084: throw new Error("Missing return statement in function");
0085: }
0086:
0087: final public String AttrValueString() throws ParseException {
0088: ELToken t;
0089: t = jj_consume_token(NON_EXPRESSION_TEXT);
0090: {
0091: if (true)
0092: return t.image;
0093: }
0094: throw new Error("Missing return statement in function");
0095: }
0096:
0097: final public Expression AttrValueExpression() throws ParseException {
0098: Expression exp;
0099: jj_consume_token(START_EXPRESSION);
0100: exp = Expression();
0101: jj_consume_token(END_EXPRESSION);
0102: {
0103: if (true)
0104: return exp;
0105: }
0106: throw new Error("Missing return statement in function");
0107: }
0108:
0109: final public Expression Expression() throws ParseException {
0110: Expression ret;
0111: if (jj_2_1(2147483647)) {
0112: ret = ConditionalExpression();
0113: } else {
0114: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0115: case INTEGER_LITERAL:
0116: case FLOATING_POINT_LITERAL:
0117: case STRING_LITERAL:
0118: case TRUE:
0119: case FALSE:
0120: case NULL:
0121: case LPAREN:
0122: case MINUS:
0123: case NOT1:
0124: case NOT2:
0125: case EMPTY:
0126: case IDENTIFIER:
0127: ret = OrExpression();
0128: break;
0129: default:
0130: jj_la1[3] = jj_gen;
0131: jj_consume_token(-1);
0132: throw new ParseException();
0133: }
0134: }
0135: {
0136: if (true)
0137: return ret;
0138: }
0139: throw new Error("Missing return statement in function");
0140: }
0141:
0142: final public Expression OrExpression() throws ParseException {
0143: Expression startExpression;
0144: BinaryOperator operator;
0145: Expression expression;
0146: List operators = null;
0147: List expressions = null;
0148: startExpression = AndExpression();
0149: label_2: while (true) {
0150: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0151: case OR1:
0152: case OR2:
0153: ;
0154: break;
0155: default:
0156: jj_la1[4] = jj_gen;
0157: break label_2;
0158: }
0159: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0160: case OR1:
0161: jj_consume_token(OR1);
0162: break;
0163: case OR2:
0164: jj_consume_token(OR2);
0165: break;
0166: default:
0167: jj_la1[5] = jj_gen;
0168: jj_consume_token(-1);
0169: throw new ParseException();
0170: }
0171: operator = OrOperator.SINGLETON;
0172: expression = AndExpression();
0173: if (operators == null) {
0174: operators = new ArrayList();
0175: expressions = new ArrayList();
0176: }
0177: operators.add(operator);
0178: expressions.add(expression);
0179: }
0180: if (operators != null) {
0181: {
0182: if (true)
0183: return new BinaryOperatorExpression(
0184: startExpression, operators, expressions);
0185: }
0186: } else {
0187: {
0188: if (true)
0189: return startExpression;
0190: }
0191: }
0192: throw new Error("Missing return statement in function");
0193: }
0194:
0195: final public Expression AndExpression() throws ParseException {
0196: Expression startExpression;
0197: BinaryOperator operator;
0198: Expression expression;
0199: List operators = null;
0200: List expressions = null;
0201: startExpression = EqualityExpression();
0202: label_3: while (true) {
0203: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0204: case AND1:
0205: case AND2:
0206: ;
0207: break;
0208: default:
0209: jj_la1[6] = jj_gen;
0210: break label_3;
0211: }
0212: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0213: case AND1:
0214: jj_consume_token(AND1);
0215: break;
0216: case AND2:
0217: jj_consume_token(AND2);
0218: break;
0219: default:
0220: jj_la1[7] = jj_gen;
0221: jj_consume_token(-1);
0222: throw new ParseException();
0223: }
0224: operator = AndOperator.SINGLETON;
0225: expression = EqualityExpression();
0226: if (operators == null) {
0227: operators = new ArrayList();
0228: expressions = new ArrayList();
0229: }
0230: operators.add(operator);
0231: expressions.add(expression);
0232: }
0233: if (operators != null) {
0234: {
0235: if (true)
0236: return new BinaryOperatorExpression(
0237: startExpression, operators, expressions);
0238: }
0239: } else {
0240: {
0241: if (true)
0242: return startExpression;
0243: }
0244: }
0245: throw new Error("Missing return statement in function");
0246: }
0247:
0248: final public Expression EqualityExpression() throws ParseException {
0249: Expression startExpression;
0250: BinaryOperator operator;
0251: Expression expression;
0252: List operators = null;
0253: List expressions = null;
0254: startExpression = RelationalExpression();
0255: label_4: while (true) {
0256: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0257: case EQ1:
0258: case EQ2:
0259: case NE1:
0260: case NE2:
0261: ;
0262: break;
0263: default:
0264: jj_la1[8] = jj_gen;
0265: break label_4;
0266: }
0267: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0268: case EQ1:
0269: case EQ2:
0270: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0271: case EQ1:
0272: jj_consume_token(EQ1);
0273: break;
0274: case EQ2:
0275: jj_consume_token(EQ2);
0276: break;
0277: default:
0278: jj_la1[9] = jj_gen;
0279: jj_consume_token(-1);
0280: throw new ParseException();
0281: }
0282: operator = EqualsOperator.SINGLETON;
0283: break;
0284: case NE1:
0285: case NE2:
0286: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0287: case NE1:
0288: jj_consume_token(NE1);
0289: break;
0290: case NE2:
0291: jj_consume_token(NE2);
0292: break;
0293: default:
0294: jj_la1[10] = jj_gen;
0295: jj_consume_token(-1);
0296: throw new ParseException();
0297: }
0298: operator = NotEqualsOperator.SINGLETON;
0299: break;
0300: default:
0301: jj_la1[11] = jj_gen;
0302: jj_consume_token(-1);
0303: throw new ParseException();
0304: }
0305: expression = RelationalExpression();
0306: if (operators == null) {
0307: operators = new ArrayList();
0308: expressions = new ArrayList();
0309: }
0310: operators.add(operator);
0311: expressions.add(expression);
0312: }
0313: if (operators != null) {
0314: {
0315: if (true)
0316: return new BinaryOperatorExpression(
0317: startExpression, operators, expressions);
0318: }
0319: } else {
0320: {
0321: if (true)
0322: return startExpression;
0323: }
0324: }
0325: throw new Error("Missing return statement in function");
0326: }
0327:
0328: final public Expression RelationalExpression()
0329: throws ParseException {
0330: Expression startExpression;
0331: BinaryOperator operator;
0332: Expression expression;
0333: List operators = null;
0334: List expressions = null;
0335: startExpression = AddExpression();
0336: label_5: while (true) {
0337: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0338: case GT1:
0339: case GT2:
0340: case LT1:
0341: case LT2:
0342: case LE1:
0343: case LE2:
0344: case GE1:
0345: case GE2:
0346: ;
0347: break;
0348: default:
0349: jj_la1[12] = jj_gen;
0350: break label_5;
0351: }
0352: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0353: case LT1:
0354: case LT2:
0355: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0356: case LT1:
0357: jj_consume_token(LT1);
0358: break;
0359: case LT2:
0360: jj_consume_token(LT2);
0361: break;
0362: default:
0363: jj_la1[13] = jj_gen;
0364: jj_consume_token(-1);
0365: throw new ParseException();
0366: }
0367: operator = LessThanOperator.SINGLETON;
0368: break;
0369: case GT1:
0370: case GT2:
0371: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0372: case GT1:
0373: jj_consume_token(GT1);
0374: break;
0375: case GT2:
0376: jj_consume_token(GT2);
0377: break;
0378: default:
0379: jj_la1[14] = jj_gen;
0380: jj_consume_token(-1);
0381: throw new ParseException();
0382: }
0383: operator = GreaterThanOperator.SINGLETON;
0384: break;
0385: case GE1:
0386: case GE2:
0387: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0388: case GE1:
0389: jj_consume_token(GE1);
0390: break;
0391: case GE2:
0392: jj_consume_token(GE2);
0393: break;
0394: default:
0395: jj_la1[15] = jj_gen;
0396: jj_consume_token(-1);
0397: throw new ParseException();
0398: }
0399: operator = GreaterThanOrEqualsOperator.SINGLETON;
0400: break;
0401: case LE1:
0402: case LE2:
0403: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0404: case LE1:
0405: jj_consume_token(LE1);
0406: break;
0407: case LE2:
0408: jj_consume_token(LE2);
0409: break;
0410: default:
0411: jj_la1[16] = jj_gen;
0412: jj_consume_token(-1);
0413: throw new ParseException();
0414: }
0415: operator = LessThanOrEqualsOperator.SINGLETON;
0416: break;
0417: default:
0418: jj_la1[17] = jj_gen;
0419: jj_consume_token(-1);
0420: throw new ParseException();
0421: }
0422: expression = AddExpression();
0423: if (operators == null) {
0424: operators = new ArrayList();
0425: expressions = new ArrayList();
0426: }
0427: operators.add(operator);
0428: expressions.add(expression);
0429: }
0430: if (operators != null) {
0431: {
0432: if (true)
0433: return new BinaryOperatorExpression(
0434: startExpression, operators, expressions);
0435: }
0436: } else {
0437: {
0438: if (true)
0439: return startExpression;
0440: }
0441: }
0442: throw new Error("Missing return statement in function");
0443: }
0444:
0445: final public Expression AddExpression() throws ParseException {
0446: Expression startExpression;
0447: BinaryOperator operator;
0448: Expression expression;
0449: List operators = null;
0450: List expressions = null;
0451: startExpression = MultiplyExpression();
0452: label_6: while (true) {
0453: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0454: case PLUS:
0455: case MINUS:
0456: ;
0457: break;
0458: default:
0459: jj_la1[18] = jj_gen;
0460: break label_6;
0461: }
0462: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0463: case PLUS:
0464: jj_consume_token(PLUS);
0465: operator = PlusOperator.SINGLETON;
0466: break;
0467: case MINUS:
0468: jj_consume_token(MINUS);
0469: operator = MinusOperator.SINGLETON;
0470: break;
0471: default:
0472: jj_la1[19] = jj_gen;
0473: jj_consume_token(-1);
0474: throw new ParseException();
0475: }
0476: expression = MultiplyExpression();
0477: if (operators == null) {
0478: operators = new ArrayList();
0479: expressions = new ArrayList();
0480: }
0481: operators.add(operator);
0482: expressions.add(expression);
0483: }
0484: if (operators != null) {
0485: {
0486: if (true)
0487: return new BinaryOperatorExpression(
0488: startExpression, operators, expressions);
0489: }
0490: } else {
0491: {
0492: if (true)
0493: return startExpression;
0494: }
0495: }
0496: throw new Error("Missing return statement in function");
0497: }
0498:
0499: final public Expression MultiplyExpression() throws ParseException {
0500: Expression startExpression;
0501: BinaryOperator operator;
0502: Expression expression;
0503: List operators = null;
0504: List expressions = null;
0505: startExpression = UnaryExpression();
0506: label_7: while (true) {
0507: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0508: case MULTIPLY:
0509: case DIVIDE1:
0510: case DIVIDE2:
0511: case MODULUS1:
0512: case MODULUS2:
0513: ;
0514: break;
0515: default:
0516: jj_la1[20] = jj_gen;
0517: break label_7;
0518: }
0519: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0520: case MULTIPLY:
0521: jj_consume_token(MULTIPLY);
0522: operator = MultiplyOperator.SINGLETON;
0523: break;
0524: case DIVIDE1:
0525: case DIVIDE2:
0526: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0527: case DIVIDE1:
0528: jj_consume_token(DIVIDE1);
0529: break;
0530: case DIVIDE2:
0531: jj_consume_token(DIVIDE2);
0532: break;
0533: default:
0534: jj_la1[21] = jj_gen;
0535: jj_consume_token(-1);
0536: throw new ParseException();
0537: }
0538: operator = DivideOperator.SINGLETON;
0539: break;
0540: case MODULUS1:
0541: case MODULUS2:
0542: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0543: case MODULUS1:
0544: jj_consume_token(MODULUS1);
0545: break;
0546: case MODULUS2:
0547: jj_consume_token(MODULUS2);
0548: break;
0549: default:
0550: jj_la1[22] = jj_gen;
0551: jj_consume_token(-1);
0552: throw new ParseException();
0553: }
0554: operator = ModulusOperator.SINGLETON;
0555: break;
0556: default:
0557: jj_la1[23] = jj_gen;
0558: jj_consume_token(-1);
0559: throw new ParseException();
0560: }
0561: expression = UnaryExpression();
0562: if (operators == null) {
0563: operators = new ArrayList();
0564: expressions = new ArrayList();
0565: }
0566: operators.add(operator);
0567: expressions.add(expression);
0568: }
0569: if (operators != null) {
0570: {
0571: if (true)
0572: return new BinaryOperatorExpression(
0573: startExpression, operators, expressions);
0574: }
0575: } else {
0576: {
0577: if (true)
0578: return startExpression;
0579: }
0580: }
0581: throw new Error("Missing return statement in function");
0582: }
0583:
0584: final public Expression ConditionalExpression()
0585: throws ParseException {
0586: Expression condition, trueBranch, falseBranch;
0587: condition = OrExpression();
0588: jj_consume_token(COND);
0589: trueBranch = Expression();
0590: jj_consume_token(COLON);
0591: falseBranch = Expression();
0592: {
0593: if (true)
0594: return new ConditionalExpression(condition, trueBranch,
0595: falseBranch);
0596: }
0597: throw new Error("Missing return statement in function");
0598: }
0599:
0600: final public Expression UnaryExpression() throws ParseException {
0601: Expression expression;
0602: UnaryOperator singleOperator = null;
0603: UnaryOperator operator;
0604: List operators = null;
0605: label_8: while (true) {
0606: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0607: case MINUS:
0608: case NOT1:
0609: case NOT2:
0610: case EMPTY:
0611: ;
0612: break;
0613: default:
0614: jj_la1[24] = jj_gen;
0615: break label_8;
0616: }
0617: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0618: case NOT1:
0619: case NOT2:
0620: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0621: case NOT1:
0622: jj_consume_token(NOT1);
0623: break;
0624: case NOT2:
0625: jj_consume_token(NOT2);
0626: break;
0627: default:
0628: jj_la1[25] = jj_gen;
0629: jj_consume_token(-1);
0630: throw new ParseException();
0631: }
0632: operator = NotOperator.SINGLETON;
0633: break;
0634: case MINUS:
0635: jj_consume_token(MINUS);
0636: operator = UnaryMinusOperator.SINGLETON;
0637: break;
0638: case EMPTY:
0639: jj_consume_token(EMPTY);
0640: operator = EmptyOperator.SINGLETON;
0641: break;
0642: default:
0643: jj_la1[26] = jj_gen;
0644: jj_consume_token(-1);
0645: throw new ParseException();
0646: }
0647: if (singleOperator == null) {
0648: singleOperator = operator;
0649: } else if (operators == null) {
0650: operators = new ArrayList();
0651: operators.add(singleOperator);
0652: operators.add(operator);
0653: } else {
0654: operators.add(operator);
0655: }
0656: }
0657: expression = Value();
0658: if (operators != null) {
0659: {
0660: if (true)
0661: return new UnaryOperatorExpression(null, operators,
0662: expression);
0663: }
0664: } else if (singleOperator != null) {
0665: {
0666: if (true)
0667: return new UnaryOperatorExpression(singleOperator,
0668: null, expression);
0669: }
0670: } else {
0671: {
0672: if (true)
0673: return expression;
0674: }
0675: }
0676: throw new Error("Missing return statement in function");
0677: }
0678:
0679: final public Expression Value() throws ParseException {
0680: Expression prefix;
0681: ValueSuffix suffix;
0682: List suffixes = null;
0683: prefix = ValuePrefix();
0684: label_9: while (true) {
0685: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0686: case DOT:
0687: case LBRACKET:
0688: ;
0689: break;
0690: default:
0691: jj_la1[27] = jj_gen;
0692: break label_9;
0693: }
0694: suffix = ValueSuffix();
0695: if (suffixes == null) {
0696: suffixes = new ArrayList();
0697: }
0698: suffixes.add(suffix);
0699: }
0700: if (suffixes == null) {
0701: {
0702: if (true)
0703: return prefix;
0704: }
0705: } else {
0706: {
0707: if (true)
0708: return new ComplexValue(prefix, suffixes);
0709: }
0710: }
0711: throw new Error("Missing return statement in function");
0712: }
0713:
0714: /**
0715: * This is an element that can start a value
0716: **/
0717: final public Expression ValuePrefix() throws ParseException {
0718: Expression ret;
0719: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0720: case INTEGER_LITERAL:
0721: case FLOATING_POINT_LITERAL:
0722: case STRING_LITERAL:
0723: case TRUE:
0724: case FALSE:
0725: case NULL:
0726: ret = Literal();
0727: break;
0728: case LPAREN:
0729: jj_consume_token(LPAREN);
0730: ret = Expression();
0731: jj_consume_token(RPAREN);
0732: break;
0733: default:
0734: jj_la1[28] = jj_gen;
0735: if (jj_2_2(2147483647)) {
0736: ret = FunctionInvocation();
0737: } else {
0738: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0739: case IDENTIFIER:
0740: ret = NamedValue();
0741: break;
0742: default:
0743: jj_la1[29] = jj_gen;
0744: jj_consume_token(-1);
0745: throw new ParseException();
0746: }
0747: }
0748: }
0749: {
0750: if (true)
0751: return ret;
0752: }
0753: throw new Error("Missing return statement in function");
0754: }
0755:
0756: final public NamedValue NamedValue() throws ParseException {
0757: ELToken t;
0758: t = jj_consume_token(IDENTIFIER);
0759: {
0760: if (true)
0761: return new NamedValue(t.image);
0762: }
0763: throw new Error("Missing return statement in function");
0764: }
0765:
0766: final public FunctionInvocation FunctionInvocation()
0767: throws ParseException {
0768: String qualifiedName;
0769: List argumentList = new ArrayList();
0770: Expression exp;
0771: qualifiedName = QualifiedName();
0772: jj_consume_token(LPAREN);
0773: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0774: case INTEGER_LITERAL:
0775: case FLOATING_POINT_LITERAL:
0776: case STRING_LITERAL:
0777: case TRUE:
0778: case FALSE:
0779: case NULL:
0780: case LPAREN:
0781: case MINUS:
0782: case NOT1:
0783: case NOT2:
0784: case EMPTY:
0785: case IDENTIFIER:
0786: exp = Expression();
0787: argumentList.add(exp);
0788: label_10: while (true) {
0789: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0790: case COMMA:
0791: ;
0792: break;
0793: default:
0794: jj_la1[30] = jj_gen;
0795: break label_10;
0796: }
0797: jj_consume_token(COMMA);
0798: exp = Expression();
0799: argumentList.add(exp);
0800: }
0801: break;
0802: default:
0803: jj_la1[31] = jj_gen;
0804: ;
0805: }
0806: jj_consume_token(RPAREN);
0807: {
0808: if (true)
0809: return new FunctionInvocation(qualifiedName,
0810: argumentList);
0811: }
0812: throw new Error("Missing return statement in function");
0813: }
0814:
0815: final public ValueSuffix ValueSuffix() throws ParseException {
0816: ValueSuffix suffix;
0817: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0818: case DOT:
0819: suffix = PropertySuffix();
0820: break;
0821: case LBRACKET:
0822: suffix = ArraySuffix();
0823: break;
0824: default:
0825: jj_la1[32] = jj_gen;
0826: jj_consume_token(-1);
0827: throw new ParseException();
0828: }
0829: {
0830: if (true)
0831: return suffix;
0832: }
0833: throw new Error("Missing return statement in function");
0834: }
0835:
0836: final public PropertySuffix PropertySuffix() throws ParseException {
0837: // ELToken t;
0838: String property;
0839: jj_consume_token(DOT);
0840: property = Identifier();
0841: {
0842: if (true)
0843: return new PropertySuffix(property);
0844: }
0845: throw new Error("Missing return statement in function");
0846: }
0847:
0848: final public ArraySuffix ArraySuffix() throws ParseException {
0849: Expression index;
0850: jj_consume_token(LBRACKET);
0851: index = Expression();
0852: jj_consume_token(RBRACKET);
0853: {
0854: if (true)
0855: return new ArraySuffix(index);
0856: }
0857: throw new Error("Missing return statement in function");
0858: }
0859:
0860: final public Literal Literal() throws ParseException {
0861: Literal ret;
0862: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0863: case TRUE:
0864: case FALSE:
0865: ret = BooleanLiteral();
0866: break;
0867: case INTEGER_LITERAL:
0868: ret = IntegerLiteral();
0869: break;
0870: case FLOATING_POINT_LITERAL:
0871: ret = FloatingPointLiteral();
0872: break;
0873: case STRING_LITERAL:
0874: ret = StringLiteral();
0875: break;
0876: case NULL:
0877: ret = NullLiteral();
0878: break;
0879: default:
0880: jj_la1[33] = jj_gen;
0881: jj_consume_token(-1);
0882: throw new ParseException();
0883: }
0884: {
0885: if (true)
0886: return ret;
0887: }
0888: throw new Error("Missing return statement in function");
0889: }
0890:
0891: final public BooleanLiteral BooleanLiteral() throws ParseException {
0892: switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
0893: case TRUE:
0894: jj_consume_token(TRUE);
0895: {
0896: if (true)
0897: return BooleanLiteral.TRUE;
0898: }
0899: break;
0900: case FALSE:
0901: jj_consume_token(FALSE);
0902: {
0903: if (true)
0904: return BooleanLiteral.FALSE;
0905: }
0906: break;
0907: default:
0908: jj_la1[34] = jj_gen;
0909: jj_consume_token(-1);
0910: throw new ParseException();
0911: }
0912: throw new Error("Missing return statement in function");
0913: }
0914:
0915: final public StringLiteral StringLiteral() throws ParseException {
0916: ELToken t;
0917: t = jj_consume_token(STRING_LITERAL);
0918: {
0919: if (true)
0920: return StringLiteral.fromToken(t.image);
0921: }
0922: throw new Error("Missing return statement in function");
0923: }
0924:
0925: final public IntegerLiteral IntegerLiteral() throws ParseException {
0926: ELToken t;
0927: t = jj_consume_token(INTEGER_LITERAL);
0928: {
0929: if (true)
0930: return new IntegerLiteral(t.image);
0931: }
0932: throw new Error("Missing return statement in function");
0933: }
0934:
0935: final public FloatingPointLiteral FloatingPointLiteral()
0936: throws ParseException {
0937: ELToken t;
0938: t = jj_consume_token(FLOATING_POINT_LITERAL);
0939: {
0940: if (true)
0941: return new FloatingPointLiteral(t.image);
0942: }
0943: throw new Error("Missing return statement in function");
0944: }
0945:
0946: final public NullLiteral NullLiteral() throws ParseException {
0947: jj_consume_token(NULL);
0948: {
0949: if (true)
0950: return NullLiteral.SINGLETON;
0951: }
0952: throw new Error("Missing return statement in function");
0953: }
0954:
0955: final public String Identifier() throws ParseException {
0956: ELToken t;
0957: t = jj_consume_token(IDENTIFIER);
0958: {
0959: if (true)
0960: return t.image;
0961: }
0962: throw new Error("Missing return statement in function");
0963: }
0964:
0965: final public String QualifiedName() throws ParseException {
0966: String prefix = null, localPart = null;
0967: if (jj_2_3(2147483647)) {
0968: prefix = Identifier();
0969: jj_consume_token(COLON);
0970: } else {
0971: ;
0972: }
0973: localPart = Identifier();
0974: if (prefix == null) {
0975: if (true)
0976: return localPart;
0977: } else {
0978: if (true)
0979: return prefix + ":" + localPart;
0980: }
0981: throw new Error("Missing return statement in function");
0982: }
0983:
0984: final private boolean jj_2_1(int xla) {
0985: jj_la = xla;
0986: jj_lastpos = jj_scanpos = token;
0987: boolean retval = !jj_3_1();
0988: jj_save(0, xla);
0989: return retval;
0990: }
0991:
0992: final private boolean jj_2_2(int xla) {
0993: jj_la = xla;
0994: jj_lastpos = jj_scanpos = token;
0995: boolean retval = !jj_3_2();
0996: jj_save(1, xla);
0997: return retval;
0998: }
0999:
1000: final private boolean jj_2_3(int xla) {
1001: jj_la = xla;
1002: jj_lastpos = jj_scanpos = token;
1003: boolean retval = !jj_3_3();
1004: jj_save(2, xla);
1005: return retval;
1006: }
1007:
1008: final private boolean jj_3R_42() {
1009: if (jj_scan_token(NE2))
1010: return true;
1011: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1012: return false;
1013: return false;
1014: }
1015:
1016: final private boolean jj_3R_91() {
1017: if (jj_scan_token(FLOATING_POINT_LITERAL))
1018: return true;
1019: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1020: return false;
1021: return false;
1022: }
1023:
1024: final private boolean jj_3R_40() {
1025: if (jj_scan_token(EQ2))
1026: return true;
1027: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1028: return false;
1029: return false;
1030: }
1031:
1032: final private boolean jj_3R_41() {
1033: if (jj_scan_token(NE1))
1034: return true;
1035: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1036: return false;
1037: return false;
1038: }
1039:
1040: final private boolean jj_3R_32() {
1041: ELToken xsp;
1042: xsp = jj_scanpos;
1043: if (jj_3R_41()) {
1044: jj_scanpos = xsp;
1045: if (jj_3R_42())
1046: return true;
1047: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1048: return false;
1049: } else if (jj_la == 0 && jj_scanpos == jj_lastpos)
1050: return false;
1051: return false;
1052: }
1053:
1054: final private boolean jj_3R_90() {
1055: if (jj_scan_token(INTEGER_LITERAL))
1056: return true;
1057: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1058: return false;
1059: return false;
1060: }
1061:
1062: final private boolean jj_3R_39() {
1063: if (jj_scan_token(EQ1))
1064: return true;
1065: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1066: return false;
1067: return false;
1068: }
1069:
1070: final private boolean jj_3R_31() {
1071: ELToken xsp;
1072: xsp = jj_scanpos;
1073: if (jj_3R_39()) {
1074: jj_scanpos = xsp;
1075: if (jj_3R_40())
1076: return true;
1077: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1078: return false;
1079: } else if (jj_la == 0 && jj_scanpos == jj_lastpos)
1080: return false;
1081: return false;
1082: }
1083:
1084: final private boolean jj_3R_26() {
1085: ELToken xsp;
1086: xsp = jj_scanpos;
1087: if (jj_3R_31()) {
1088: jj_scanpos = xsp;
1089: if (jj_3R_32())
1090: return true;
1091: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1092: return false;
1093: } else if (jj_la == 0 && jj_scanpos == jj_lastpos)
1094: return false;
1095: if (jj_3R_25())
1096: return true;
1097: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1098: return false;
1099: return false;
1100: }
1101:
1102: final private boolean jj_3R_70() {
1103: if (jj_scan_token(NOT2))
1104: return true;
1105: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1106: return false;
1107: return false;
1108: }
1109:
1110: final private boolean jj_3R_21() {
1111: if (jj_3R_25())
1112: return true;
1113: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1114: return false;
1115: ELToken xsp;
1116: while (true) {
1117: xsp = jj_scanpos;
1118: if (jj_3R_26()) {
1119: jj_scanpos = xsp;
1120: break;
1121: }
1122: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1123: return false;
1124: }
1125: return false;
1126: }
1127:
1128: final private boolean jj_3R_92() {
1129: if (jj_scan_token(STRING_LITERAL))
1130: return true;
1131: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1132: return false;
1133: return false;
1134: }
1135:
1136: final private boolean jj_3R_62() {
1137: if (jj_scan_token(EMPTY))
1138: return true;
1139: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1140: return false;
1141: return false;
1142: }
1143:
1144: final private boolean jj_3R_61() {
1145: if (jj_scan_token(MINUS))
1146: return true;
1147: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1148: return false;
1149: return false;
1150: }
1151:
1152: final private boolean jj_3R_69() {
1153: if (jj_scan_token(NOT1))
1154: return true;
1155: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1156: return false;
1157: return false;
1158: }
1159:
1160: final private boolean jj_3R_60() {
1161: ELToken xsp;
1162: xsp = jj_scanpos;
1163: if (jj_3R_69()) {
1164: jj_scanpos = xsp;
1165: if (jj_3R_70())
1166: return true;
1167: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1168: return false;
1169: } else if (jj_la == 0 && jj_scanpos == jj_lastpos)
1170: return false;
1171: return false;
1172: }
1173:
1174: final private boolean jj_3R_55() {
1175: ELToken xsp;
1176: xsp = jj_scanpos;
1177: if (jj_3R_60()) {
1178: jj_scanpos = xsp;
1179: if (jj_3R_61()) {
1180: jj_scanpos = xsp;
1181: if (jj_3R_62())
1182: return true;
1183: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1184: return false;
1185: } else if (jj_la == 0 && jj_scanpos == jj_lastpos)
1186: return false;
1187: } else if (jj_la == 0 && jj_scanpos == jj_lastpos)
1188: return false;
1189: return false;
1190: }
1191:
1192: final private boolean jj_3R_96() {
1193: if (jj_scan_token(FALSE))
1194: return true;
1195: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1196: return false;
1197: return false;
1198: }
1199:
1200: final private boolean jj_3R_43() {
1201: ELToken xsp;
1202: while (true) {
1203: xsp = jj_scanpos;
1204: if (jj_3R_55()) {
1205: jj_scanpos = xsp;
1206: break;
1207: }
1208: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1209: return false;
1210: }
1211: if (jj_3R_56())
1212: return true;
1213: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1214: return false;
1215: return false;
1216: }
1217:
1218: final private boolean jj_3R_95() {
1219: if (jj_scan_token(TRUE))
1220: return true;
1221: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1222: return false;
1223: return false;
1224: }
1225:
1226: final private boolean jj_3R_89() {
1227: ELToken xsp;
1228: xsp = jj_scanpos;
1229: if (jj_3R_95()) {
1230: jj_scanpos = xsp;
1231: if (jj_3R_96())
1232: return true;
1233: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1234: return false;
1235: } else if (jj_la == 0 && jj_scanpos == jj_lastpos)
1236: return false;
1237: return false;
1238: }
1239:
1240: final private boolean jj_3R_85() {
1241: if (jj_3R_93())
1242: return true;
1243: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1244: return false;
1245: return false;
1246: }
1247:
1248: final private boolean jj_3R_84() {
1249: if (jj_3R_92())
1250: return true;
1251: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1252: return false;
1253: return false;
1254: }
1255:
1256: final private boolean jj_3R_83() {
1257: if (jj_3R_91())
1258: return true;
1259: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1260: return false;
1261: return false;
1262: }
1263:
1264: final private boolean jj_3R_82() {
1265: if (jj_3R_90())
1266: return true;
1267: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1268: return false;
1269: return false;
1270: }
1271:
1272: final private boolean jj_3R_28() {
1273: if (jj_scan_token(AND2))
1274: return true;
1275: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1276: return false;
1277: return false;
1278: }
1279:
1280: final private boolean jj_3R_81() {
1281: if (jj_3R_89())
1282: return true;
1283: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1284: return false;
1285: return false;
1286: }
1287:
1288: final private boolean jj_3R_76() {
1289: ELToken xsp;
1290: xsp = jj_scanpos;
1291: if (jj_3R_81()) {
1292: jj_scanpos = xsp;
1293: if (jj_3R_82()) {
1294: jj_scanpos = xsp;
1295: if (jj_3R_83()) {
1296: jj_scanpos = xsp;
1297: if (jj_3R_84()) {
1298: jj_scanpos = xsp;
1299: if (jj_3R_85())
1300: return true;
1301: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1302: return false;
1303: } else if (jj_la == 0 && jj_scanpos == jj_lastpos)
1304: return false;
1305: } else if (jj_la == 0 && jj_scanpos == jj_lastpos)
1306: return false;
1307: } else if (jj_la == 0 && jj_scanpos == jj_lastpos)
1308: return false;
1309: } else if (jj_la == 0 && jj_scanpos == jj_lastpos)
1310: return false;
1311: return false;
1312: }
1313:
1314: final private boolean jj_3R_11() {
1315: if (jj_3R_14())
1316: return true;
1317: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1318: return false;
1319: if (jj_scan_token(COND))
1320: return true;
1321: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1322: return false;
1323: if (jj_3R_15())
1324: return true;
1325: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1326: return false;
1327: if (jj_scan_token(COLON))
1328: return true;
1329: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1330: return false;
1331: if (jj_3R_15())
1332: return true;
1333: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1334: return false;
1335: return false;
1336: }
1337:
1338: final private boolean jj_3R_27() {
1339: if (jj_scan_token(AND1))
1340: return true;
1341: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1342: return false;
1343: return false;
1344: }
1345:
1346: final private boolean jj_3R_22() {
1347: ELToken xsp;
1348: xsp = jj_scanpos;
1349: if (jj_3R_27()) {
1350: jj_scanpos = xsp;
1351: if (jj_3R_28())
1352: return true;
1353: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1354: return false;
1355: } else if (jj_la == 0 && jj_scanpos == jj_lastpos)
1356: return false;
1357: if (jj_3R_21())
1358: return true;
1359: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1360: return false;
1361: return false;
1362: }
1363:
1364: final private boolean jj_3R_17() {
1365: if (jj_3R_21())
1366: return true;
1367: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1368: return false;
1369: ELToken xsp;
1370: while (true) {
1371: xsp = jj_scanpos;
1372: if (jj_3R_22()) {
1373: jj_scanpos = xsp;
1374: break;
1375: }
1376: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1377: return false;
1378: }
1379: return false;
1380: }
1381:
1382: final private boolean jj_3R_68() {
1383: if (jj_scan_token(MODULUS2))
1384: return true;
1385: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1386: return false;
1387: return false;
1388: }
1389:
1390: final private boolean jj_3R_88() {
1391: if (jj_scan_token(LBRACKET))
1392: return true;
1393: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1394: return false;
1395: if (jj_3R_15())
1396: return true;
1397: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1398: return false;
1399: if (jj_scan_token(RBRACKET))
1400: return true;
1401: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1402: return false;
1403: return false;
1404: }
1405:
1406: final private boolean jj_3R_66() {
1407: if (jj_scan_token(DIVIDE2))
1408: return true;
1409: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1410: return false;
1411: return false;
1412: }
1413:
1414: final private boolean jj_3R_67() {
1415: if (jj_scan_token(MODULUS1))
1416: return true;
1417: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1418: return false;
1419: return false;
1420: }
1421:
1422: final private boolean jj_3R_59() {
1423: ELToken xsp;
1424: xsp = jj_scanpos;
1425: if (jj_3R_67()) {
1426: jj_scanpos = xsp;
1427: if (jj_3R_68())
1428: return true;
1429: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1430: return false;
1431: } else if (jj_la == 0 && jj_scanpos == jj_lastpos)
1432: return false;
1433: return false;
1434: }
1435:
1436: final private boolean jj_3R_65() {
1437: if (jj_scan_token(DIVIDE1))
1438: return true;
1439: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1440: return false;
1441: return false;
1442: }
1443:
1444: final private boolean jj_3R_87() {
1445: if (jj_scan_token(DOT))
1446: return true;
1447: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1448: return false;
1449: if (jj_3R_13())
1450: return true;
1451: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1452: return false;
1453: return false;
1454: }
1455:
1456: final private boolean jj_3R_58() {
1457: ELToken xsp;
1458: xsp = jj_scanpos;
1459: if (jj_3R_65()) {
1460: jj_scanpos = xsp;
1461: if (jj_3R_66())
1462: return true;
1463: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1464: return false;
1465: } else if (jj_la == 0 && jj_scanpos == jj_lastpos)
1466: return false;
1467: return false;
1468: }
1469:
1470: final private boolean jj_3R_57() {
1471: if (jj_scan_token(MULTIPLY))
1472: return true;
1473: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1474: return false;
1475: return false;
1476: }
1477:
1478: final private boolean jj_3R_44() {
1479: ELToken xsp;
1480: xsp = jj_scanpos;
1481: if (jj_3R_57()) {
1482: jj_scanpos = xsp;
1483: if (jj_3R_58()) {
1484: jj_scanpos = xsp;
1485: if (jj_3R_59())
1486: return true;
1487: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1488: return false;
1489: } else if (jj_la == 0 && jj_scanpos == jj_lastpos)
1490: return false;
1491: } else if (jj_la == 0 && jj_scanpos == jj_lastpos)
1492: return false;
1493: if (jj_3R_43())
1494: return true;
1495: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1496: return false;
1497: return false;
1498: }
1499:
1500: final private boolean jj_3R_24() {
1501: if (jj_scan_token(OR2))
1502: return true;
1503: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1504: return false;
1505: return false;
1506: }
1507:
1508: final private boolean jj_3R_80() {
1509: if (jj_3R_88())
1510: return true;
1511: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1512: return false;
1513: return false;
1514: }
1515:
1516: final private boolean jj_3R_33() {
1517: if (jj_3R_43())
1518: return true;
1519: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1520: return false;
1521: ELToken xsp;
1522: while (true) {
1523: xsp = jj_scanpos;
1524: if (jj_3R_44()) {
1525: jj_scanpos = xsp;
1526: break;
1527: }
1528: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1529: return false;
1530: }
1531: return false;
1532: }
1533:
1534: final private boolean jj_3R_79() {
1535: if (jj_3R_87())
1536: return true;
1537: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1538: return false;
1539: return false;
1540: }
1541:
1542: final private boolean jj_3R_75() {
1543: ELToken xsp;
1544: xsp = jj_scanpos;
1545: if (jj_3R_79()) {
1546: jj_scanpos = xsp;
1547: if (jj_3R_80())
1548: return true;
1549: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1550: return false;
1551: } else if (jj_la == 0 && jj_scanpos == jj_lastpos)
1552: return false;
1553: return false;
1554: }
1555:
1556: final private boolean jj_3R_23() {
1557: if (jj_scan_token(OR1))
1558: return true;
1559: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1560: return false;
1561: return false;
1562: }
1563:
1564: final private boolean jj_3R_18() {
1565: ELToken xsp;
1566: xsp = jj_scanpos;
1567: if (jj_3R_23()) {
1568: jj_scanpos = xsp;
1569: if (jj_3R_24())
1570: return true;
1571: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1572: return false;
1573: } else if (jj_la == 0 && jj_scanpos == jj_lastpos)
1574: return false;
1575: if (jj_3R_17())
1576: return true;
1577: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1578: return false;
1579: return false;
1580: }
1581:
1582: final private boolean jj_3R_14() {
1583: if (jj_3R_17())
1584: return true;
1585: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1586: return false;
1587: ELToken xsp;
1588: while (true) {
1589: xsp = jj_scanpos;
1590: if (jj_3R_18()) {
1591: jj_scanpos = xsp;
1592: break;
1593: }
1594: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1595: return false;
1596: }
1597: return false;
1598: }
1599:
1600: final private boolean jj_3R_94() {
1601: if (jj_scan_token(COMMA))
1602: return true;
1603: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1604: return false;
1605: if (jj_3R_15())
1606: return true;
1607: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1608: return false;
1609: return false;
1610: }
1611:
1612: final private boolean jj_3_1() {
1613: if (jj_3R_11())
1614: return true;
1615: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1616: return false;
1617: return false;
1618: }
1619:
1620: final private boolean jj_3R_86() {
1621: if (jj_3R_15())
1622: return true;
1623: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1624: return false;
1625: ELToken xsp;
1626: while (true) {
1627: xsp = jj_scanpos;
1628: if (jj_3R_94()) {
1629: jj_scanpos = xsp;
1630: break;
1631: }
1632: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1633: return false;
1634: }
1635: return false;
1636: }
1637:
1638: final private boolean jj_3R_20() {
1639: if (jj_3R_14())
1640: return true;
1641: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1642: return false;
1643: return false;
1644: }
1645:
1646: final private boolean jj_3R_19() {
1647: if (jj_3R_11())
1648: return true;
1649: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1650: return false;
1651: return false;
1652: }
1653:
1654: final private boolean jj_3R_46() {
1655: if (jj_scan_token(MINUS))
1656: return true;
1657: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1658: return false;
1659: return false;
1660: }
1661:
1662: final private boolean jj_3R_15() {
1663: ELToken xsp;
1664: xsp = jj_scanpos;
1665: if (jj_3R_19()) {
1666: jj_scanpos = xsp;
1667: if (jj_3R_20())
1668: return true;
1669: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1670: return false;
1671: } else if (jj_la == 0 && jj_scanpos == jj_lastpos)
1672: return false;
1673: return false;
1674: }
1675:
1676: final private boolean jj_3R_45() {
1677: if (jj_scan_token(PLUS))
1678: return true;
1679: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1680: return false;
1681: return false;
1682: }
1683:
1684: final private boolean jj_3R_34() {
1685: ELToken xsp;
1686: xsp = jj_scanpos;
1687: if (jj_3R_45()) {
1688: jj_scanpos = xsp;
1689: if (jj_3R_46())
1690: return true;
1691: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1692: return false;
1693: } else if (jj_la == 0 && jj_scanpos == jj_lastpos)
1694: return false;
1695: if (jj_3R_33())
1696: return true;
1697: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1698: return false;
1699: return false;
1700: }
1701:
1702: final private boolean jj_3R_77() {
1703: if (jj_3R_12())
1704: return true;
1705: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1706: return false;
1707: if (jj_scan_token(LPAREN))
1708: return true;
1709: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1710: return false;
1711: ELToken xsp;
1712: xsp = jj_scanpos;
1713: if (jj_3R_86())
1714: jj_scanpos = xsp;
1715: else if (jj_la == 0 && jj_scanpos == jj_lastpos)
1716: return false;
1717: if (jj_scan_token(RPAREN))
1718: return true;
1719: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1720: return false;
1721: return false;
1722: }
1723:
1724: final private boolean jj_3R_29() {
1725: if (jj_3R_33())
1726: return true;
1727: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1728: return false;
1729: ELToken xsp;
1730: while (true) {
1731: xsp = jj_scanpos;
1732: if (jj_3R_34()) {
1733: jj_scanpos = xsp;
1734: break;
1735: }
1736: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1737: return false;
1738: }
1739: return false;
1740: }
1741:
1742: final private boolean jj_3_2() {
1743: if (jj_3R_12())
1744: return true;
1745: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1746: return false;
1747: if (jj_scan_token(LPAREN))
1748: return true;
1749: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1750: return false;
1751: return false;
1752: }
1753:
1754: final private boolean jj_3R_78() {
1755: if (jj_scan_token(IDENTIFIER))
1756: return true;
1757: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1758: return false;
1759: return false;
1760: }
1761:
1762: final private boolean jj_3R_74() {
1763: if (jj_3R_78())
1764: return true;
1765: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1766: return false;
1767: return false;
1768: }
1769:
1770: final private boolean jj_3R_73() {
1771: if (jj_3R_77())
1772: return true;
1773: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1774: return false;
1775: return false;
1776: }
1777:
1778: final private boolean jj_3R_72() {
1779: if (jj_scan_token(LPAREN))
1780: return true;
1781: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1782: return false;
1783: if (jj_3R_15())
1784: return true;
1785: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1786: return false;
1787: if (jj_scan_token(RPAREN))
1788: return true;
1789: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1790: return false;
1791: return false;
1792: }
1793:
1794: final private boolean jj_3R_71() {
1795: if (jj_3R_76())
1796: return true;
1797: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1798: return false;
1799: return false;
1800: }
1801:
1802: final private boolean jj_3_3() {
1803: if (jj_3R_13())
1804: return true;
1805: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1806: return false;
1807: if (jj_scan_token(COLON))
1808: return true;
1809: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1810: return false;
1811: return false;
1812: }
1813:
1814: final private boolean jj_3R_63() {
1815: ELToken xsp;
1816: xsp = jj_scanpos;
1817: if (jj_3R_71()) {
1818: jj_scanpos = xsp;
1819: if (jj_3R_72()) {
1820: jj_scanpos = xsp;
1821: if (jj_3R_73()) {
1822: jj_scanpos = xsp;
1823: if (jj_3R_74())
1824: return true;
1825: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1826: return false;
1827: } else if (jj_la == 0 && jj_scanpos == jj_lastpos)
1828: return false;
1829: } else if (jj_la == 0 && jj_scanpos == jj_lastpos)
1830: return false;
1831: } else if (jj_la == 0 && jj_scanpos == jj_lastpos)
1832: return false;
1833: return false;
1834: }
1835:
1836: final private boolean jj_3R_54() {
1837: if (jj_scan_token(LE2))
1838: return true;
1839: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1840: return false;
1841: return false;
1842: }
1843:
1844: final private boolean jj_3R_52() {
1845: if (jj_scan_token(GE2))
1846: return true;
1847: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1848: return false;
1849: return false;
1850: }
1851:
1852: final private boolean jj_3R_50() {
1853: if (jj_scan_token(GT2))
1854: return true;
1855: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1856: return false;
1857: return false;
1858: }
1859:
1860: final private boolean jj_3R_48() {
1861: if (jj_scan_token(LT2))
1862: return true;
1863: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1864: return false;
1865: return false;
1866: }
1867:
1868: final private boolean jj_3R_53() {
1869: if (jj_scan_token(LE1))
1870: return true;
1871: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1872: return false;
1873: return false;
1874: }
1875:
1876: final private boolean jj_3R_16() {
1877: if (jj_3R_13())
1878: return true;
1879: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1880: return false;
1881: if (jj_scan_token(COLON))
1882: return true;
1883: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1884: return false;
1885: return false;
1886: }
1887:
1888: final private boolean jj_3R_38() {
1889: ELToken xsp;
1890: xsp = jj_scanpos;
1891: if (jj_3R_53()) {
1892: jj_scanpos = xsp;
1893: if (jj_3R_54())
1894: return true;
1895: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1896: return false;
1897: } else if (jj_la == 0 && jj_scanpos == jj_lastpos)
1898: return false;
1899: return false;
1900: }
1901:
1902: final private boolean jj_3R_51() {
1903: if (jj_scan_token(GE1))
1904: return true;
1905: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1906: return false;
1907: return false;
1908: }
1909:
1910: final private boolean jj_3R_37() {
1911: ELToken xsp;
1912: xsp = jj_scanpos;
1913: if (jj_3R_51()) {
1914: jj_scanpos = xsp;
1915: if (jj_3R_52())
1916: return true;
1917: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1918: return false;
1919: } else if (jj_la == 0 && jj_scanpos == jj_lastpos)
1920: return false;
1921: return false;
1922: }
1923:
1924: final private boolean jj_3R_49() {
1925: if (jj_scan_token(GT1))
1926: return true;
1927: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1928: return false;
1929: return false;
1930: }
1931:
1932: final private boolean jj_3R_36() {
1933: ELToken xsp;
1934: xsp = jj_scanpos;
1935: if (jj_3R_49()) {
1936: jj_scanpos = xsp;
1937: if (jj_3R_50())
1938: return true;
1939: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1940: return false;
1941: } else if (jj_la == 0 && jj_scanpos == jj_lastpos)
1942: return false;
1943: return false;
1944: }
1945:
1946: final private boolean jj_3R_47() {
1947: if (jj_scan_token(LT1))
1948: return true;
1949: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1950: return false;
1951: return false;
1952: }
1953:
1954: final private boolean jj_3R_35() {
1955: ELToken xsp;
1956: xsp = jj_scanpos;
1957: if (jj_3R_47()) {
1958: jj_scanpos = xsp;
1959: if (jj_3R_48())
1960: return true;
1961: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1962: return false;
1963: } else if (jj_la == 0 && jj_scanpos == jj_lastpos)
1964: return false;
1965: return false;
1966: }
1967:
1968: final private boolean jj_3R_12() {
1969: ELToken xsp;
1970: xsp = jj_scanpos;
1971: if (jj_3R_16())
1972: jj_scanpos = xsp;
1973: else if (jj_la == 0 && jj_scanpos == jj_lastpos)
1974: return false;
1975: if (jj_3R_13())
1976: return true;
1977: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1978: return false;
1979: return false;
1980: }
1981:
1982: final private boolean jj_3R_30() {
1983: ELToken xsp;
1984: xsp = jj_scanpos;
1985: if (jj_3R_35()) {
1986: jj_scanpos = xsp;
1987: if (jj_3R_36()) {
1988: jj_scanpos = xsp;
1989: if (jj_3R_37()) {
1990: jj_scanpos = xsp;
1991: if (jj_3R_38())
1992: return true;
1993: if (jj_la == 0 && jj_scanpos == jj_lastpos)
1994: return false;
1995: } else if (jj_la == 0 && jj_scanpos == jj_lastpos)
1996: return false;
1997: } else if (jj_la == 0 && jj_scanpos == jj_lastpos)
1998: return false;
1999: } else if (jj_la == 0 && jj_scanpos == jj_lastpos)
2000: return false;
2001: if (jj_3R_29())
2002: return true;
2003: if (jj_la == 0 && jj_scanpos == jj_lastpos)
2004: return false;
2005: return false;
2006: }
2007:
2008: final private boolean jj_3R_25() {
2009: if (jj_3R_29())
2010: return true;
2011: if (jj_la == 0 && jj_scanpos == jj_lastpos)
2012: return false;
2013: ELToken xsp;
2014: while (true) {
2015: xsp = jj_scanpos;
2016: if (jj_3R_30()) {
2017: jj_scanpos = xsp;
2018: break;
2019: }
2020: if (jj_la == 0 && jj_scanpos == jj_lastpos)
2021: return false;
2022: }
2023: return false;
2024: }
2025:
2026: final private boolean jj_3R_64() {
2027: if (jj_3R_75())
2028: return true;
2029: if (jj_la == 0 && jj_scanpos == jj_lastpos)
2030: return false;
2031: return false;
2032: }
2033:
2034: final private boolean jj_3R_13() {
2035: if (jj_scan_token(IDENTIFIER))
2036: return true;
2037: if (jj_la == 0 && jj_scanpos == jj_lastpos)
2038: return false;
2039: return false;
2040: }
2041:
2042: final private boolean jj_3R_56() {
2043: if (jj_3R_63())
2044: return true;
2045: if (jj_la == 0 && jj_scanpos == jj_lastpos)
2046: return false;
2047: ELToken xsp;
2048: while (true) {
2049: xsp = jj_scanpos;
2050: if (jj_3R_64()) {
2051: jj_scanpos = xsp;
2052: break;
2053: }
2054: if (jj_la == 0 && jj_scanpos == jj_lastpos)
2055: return false;
2056: }
2057: return false;
2058: }
2059:
2060: final private boolean jj_3R_93() {
2061: if (jj_scan_token(NULL))
2062: return true;
2063: if (jj_la == 0 && jj_scanpos == jj_lastpos)
2064: return false;
2065: return false;
2066: }
2067:
2068: public ELParserTokenManager token_source;
2069: SimpleCharStream jj_input_stream;
2070: public ELToken token, jj_nt;
2071: private int jj_ntk;
2072: private ELToken jj_scanpos, jj_lastpos;
2073: private int jj_la;
2074: public boolean lookingAhead = false;
2075: // private boolean jj_semLA;
2076: private int jj_gen;
2077: final private int[] jj_la1 = new int[35];
2078: final private int[] jj_la1_0 = { 0x6, 0x6, 0x6, 0x20007580, 0x0,
2079: 0x0, 0x0, 0x0, 0x18600000, 0x600000, 0x18000000,
2080: 0x18600000, 0x79e0000, 0x180000, 0x60000, 0x6000000,
2081: 0x1800000, 0x79e0000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2082: 0x0, 0x0, 0x10000, 0x20007580, 0x0, 0x80000000, 0x20007580,
2083: 0x10000, 0x7580, 0x3000, };
2084: final private int[] jj_la1_1 = { 0x0, 0x0, 0x0, 0x50c10, 0xc000,
2085: 0xc000, 0x3000, 0x3000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2086: 0x0, 0x0, 0x0, 0x18, 0x18, 0x3e0, 0xc0, 0x300, 0x3e0,
2087: 0x10c10, 0xc00, 0x10c10, 0x2, 0x0, 0x40000, 0x0, 0x50c10,
2088: 0x2, 0x0, 0x0, };
2089: final private JJCalls[] jj_2_rtns = new JJCalls[3];
2090: private boolean jj_rescan = false;
2091: private int jj_gc = 0;
2092:
2093: public ELParser(java.io.InputStream stream) {
2094: jj_input_stream = new SimpleCharStream(stream, 1, 1);
2095: token_source = new ELParserTokenManager(jj_input_stream);
2096: token = new ELToken();
2097: jj_ntk = -1;
2098: jj_gen = 0;
2099: for (int i = 0; i < 35; i++)
2100: jj_la1[i] = -1;
2101: for (int i = 0; i < jj_2_rtns.length; i++)
2102: jj_2_rtns[i] = new JJCalls();
2103: }
2104:
2105: public void ReInit(java.io.InputStream stream) {
2106: jj_input_stream.ReInit(stream, 1, 1);
2107: token_source.ReInit(jj_input_stream);
2108: token = new ELToken();
2109: jj_ntk = -1;
2110: jj_gen = 0;
2111: for (int i = 0; i < 35; i++)
2112: jj_la1[i] = -1;
2113: for (int i = 0; i < jj_2_rtns.length; i++)
2114: jj_2_rtns[i] = new JJCalls();
2115: }
2116:
2117: public ELParser(java.io.Reader stream) {
2118: jj_input_stream = new SimpleCharStream(stream, 1, 1);
2119: token_source = new ELParserTokenManager(jj_input_stream);
2120: token = new ELToken();
2121: jj_ntk = -1;
2122: jj_gen = 0;
2123: for (int i = 0; i < 35; i++)
2124: jj_la1[i] = -1;
2125: for (int i = 0; i < jj_2_rtns.length; i++)
2126: jj_2_rtns[i] = new JJCalls();
2127: }
2128:
2129: public void ReInit(java.io.Reader stream) {
2130: jj_input_stream.ReInit(stream, 1, 1);
2131: token_source.ReInit(jj_input_stream);
2132: token = new ELToken();
2133: jj_ntk = -1;
2134: jj_gen = 0;
2135: for (int i = 0; i < 35; i++)
2136: jj_la1[i] = -1;
2137: for (int i = 0; i < jj_2_rtns.length; i++)
2138: jj_2_rtns[i] = new JJCalls();
2139: }
2140:
2141: public ELParser(ELParserTokenManager tm) {
2142: token_source = tm;
2143: token = new ELToken();
2144: jj_ntk = -1;
2145: jj_gen = 0;
2146: for (int i = 0; i < 35; i++)
2147: jj_la1[i] = -1;
2148: for (int i = 0; i < jj_2_rtns.length; i++)
2149: jj_2_rtns[i] = new JJCalls();
2150: }
2151:
2152: public void ReInit(ELParserTokenManager tm) {
2153: token_source = tm;
2154: token = new ELToken();
2155: jj_ntk = -1;
2156: jj_gen = 0;
2157: for (int i = 0; i < 35; i++)
2158: jj_la1[i] = -1;
2159: for (int i = 0; i < jj_2_rtns.length; i++)
2160: jj_2_rtns[i] = new JJCalls();
2161: }
2162:
2163: final private ELToken jj_consume_token(int kind)
2164: throws ParseException {
2165: ELToken oldToken;
2166: if ((oldToken = token).next != null)
2167: token = token.next;
2168: else
2169: token = token.next = token_source.getNextToken();
2170: jj_ntk = -1;
2171: if (token.kind == kind) {
2172: jj_gen++;
2173: if (++jj_gc > 100) {
2174: jj_gc = 0;
2175: for (int i = 0; i < jj_2_rtns.length; i++) {
2176: JJCalls c = jj_2_rtns[i];
2177: while (c != null) {
2178: if (c.gen < jj_gen)
2179: c.first = null;
2180: c = c.next;
2181: }
2182: }
2183: }
2184: return token;
2185: }
2186: token = oldToken;
2187: jj_kind = kind;
2188: throw generateParseException();
2189: }
2190:
2191: final private boolean jj_scan_token(int kind) {
2192: if (jj_scanpos == jj_lastpos) {
2193: jj_la--;
2194: if (jj_scanpos.next == null) {
2195: jj_lastpos = jj_scanpos = jj_scanpos.next = token_source
2196: .getNextToken();
2197: } else {
2198: jj_lastpos = jj_scanpos = jj_scanpos.next;
2199: }
2200: } else {
2201: jj_scanpos = jj_scanpos.next;
2202: }
2203: if (jj_rescan) {
2204: int i = 0;
2205: ELToken tok = token;
2206: while (tok != null && tok != jj_scanpos) {
2207: i++;
2208: tok = tok.next;
2209: }
2210: if (tok != null)
2211: jj_add_error_token(kind, i);
2212: }
2213: return (jj_scanpos.kind != kind);
2214: }
2215:
2216: final public ELToken getNextToken() {
2217: if (token.next != null)
2218: token = token.next;
2219: else
2220: token = token.next = token_source.getNextToken();
2221: jj_ntk = -1;
2222: jj_gen++;
2223: return token;
2224: }
2225:
2226: final public ELToken getToken(int index) {
2227: ELToken t = lookingAhead ? jj_scanpos : token;
2228: for (int i = 0; i < index; i++) {
2229: if (t.next != null)
2230: t = t.next;
2231: else
2232: t = t.next = token_source.getNextToken();
2233: }
2234: return t;
2235: }
2236:
2237: final private int jj_ntk() {
2238: if ((jj_nt = token.next) == null)
2239: return (jj_ntk = (token.next = token_source.getNextToken()).kind);
2240: else
2241: return (jj_ntk = jj_nt.kind);
2242: }
2243:
2244: private java.util.Vector jj_expentries = new java.util.Vector();
2245: private int[] jj_expentry;
2246: private int jj_kind = -1;
2247: private int[] jj_lasttokens = new int[100];
2248: private int jj_endpos;
2249:
2250: private void jj_add_error_token(int kind, int pos) {
2251: if (pos >= 100)
2252: return;
2253: if (pos == jj_endpos + 1) {
2254: jj_lasttokens[jj_endpos++] = kind;
2255: } else if (jj_endpos != 0) {
2256: jj_expentry = new int[jj_endpos];
2257: for (int i = 0; i < jj_endpos; i++) {
2258: jj_expentry[i] = jj_lasttokens[i];
2259: }
2260: boolean exists = false;
2261: for (java.util.Enumeration e = jj_expentries.elements(); e
2262: .hasMoreElements();) {
2263: int[] oldentry = (int[]) (e.nextElement());
2264: if (oldentry.length == jj_expentry.length) {
2265: exists = true;
2266: for (int i = 0; i < jj_expentry.length; i++) {
2267: if (oldentry[i] != jj_expentry[i]) {
2268: exists = false;
2269: break;
2270: }
2271: }
2272: if (exists)
2273: break;
2274: }
2275: }
2276: if (!exists)
2277: jj_expentries.addElement(jj_expentry);
2278: if (pos != 0)
2279: jj_lasttokens[(jj_endpos = pos) - 1] = kind;
2280: }
2281: }
2282:
2283: final public ParseException generateParseException() {
2284: jj_expentries.removeAllElements();
2285: boolean[] la1tokens = new boolean[55];
2286: for (int i = 0; i < 55; i++) {
2287: la1tokens[i] = false;
2288: }
2289: if (jj_kind >= 0) {
2290: la1tokens[jj_kind] = true;
2291: jj_kind = -1;
2292: }
2293: for (int i = 0; i < 35; i++) {
2294: if (jj_la1[i] == jj_gen) {
2295: for (int j = 0; j < 32; j++) {
2296: if ((jj_la1_0[i] & (1 << j)) != 0) {
2297: la1tokens[j] = true;
2298: }
2299: if ((jj_la1_1[i] & (1 << j)) != 0) {
2300: la1tokens[32 + j] = true;
2301: }
2302: }
2303: }
2304: }
2305: for (int i = 0; i < 55; i++) {
2306: if (la1tokens[i]) {
2307: jj_expentry = new int[1];
2308: jj_expentry[0] = i;
2309: jj_expentries.addElement(jj_expentry);
2310: }
2311: }
2312: jj_endpos = 0;
2313: jj_rescan_token();
2314: jj_add_error_token(0, 0);
2315: int[][] exptokseq = new int[jj_expentries.size()][];
2316: for (int i = 0; i < jj_expentries.size(); i++) {
2317: exptokseq[i] = (int[]) jj_expentries.elementAt(i);
2318: }
2319: return new ParseException(token, exptokseq, tokenImage);
2320: }
2321:
2322: final public void enable_tracing() {
2323: }
2324:
2325: final public void disable_tracing() {
2326: }
2327:
2328: final private void jj_rescan_token() {
2329: jj_rescan = true;
2330: for (int i = 0; i < 3; i++) {
2331: JJCalls p = jj_2_rtns[i];
2332: do {
2333: if (p.gen > jj_gen) {
2334: jj_la = p.arg;
2335: jj_lastpos = jj_scanpos = p.first;
2336: switch (i) {
2337: case 0:
2338: jj_3_1();
2339: break;
2340: case 1:
2341: jj_3_2();
2342: break;
2343: case 2:
2344: jj_3_3();
2345: break;
2346: }
2347: }
2348: p = p.next;
2349: } while (p != null);
2350: }
2351: jj_rescan = false;
2352: }
2353:
2354: final private void jj_save(int index, int xla) {
2355: JJCalls p = jj_2_rtns[index];
2356: while (p.gen > jj_gen) {
2357: if (p.next == null) {
2358: p = p.next = new JJCalls();
2359: break;
2360: }
2361: p = p.next;
2362: }
2363: p.gen = jj_gen + xla - jj_la;
2364: p.first = token;
2365: p.arg = xla;
2366: }
2367:
2368: static final class JJCalls {
2369: int gen;
2370: ELToken first;
2371: int arg;
2372: JJCalls next;
2373: }
2374:
2375: }
|