📄 ognlparser.java
字号:
/* Generated By:JJTree&JavaCC: Do not edit this line. OgnlParser.java */
package ognl;
/**
* OgnlParser is a JavaCC parser class; it translates OGNL expressions into abstract
* syntax trees (ASTs) that can then be interpreted by the getValue and setValue methods.
*/
public class OgnlParser/*@bgen(jjtree)*/implements OgnlParserTreeConstants, OgnlParserConstants {/*@bgen(jjtree)*/
protected JJTOgnlParserState jjtree = new JJTOgnlParserState();
/**
* This is the top-level construct of OGNL.
*/
final public Node topLevelExpression() throws ParseException {
expression();
jj_consume_token(0);
{if (true) return jjtree.rootNode();}
throw new Error("Missing return statement in function");
}
// sequence (level 14)
final public void expression() throws ParseException {
assignmentExpression();
label_1:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case 1:
;
break;
default:
jj_la1[0] = jj_gen;
break label_1;
}
jj_consume_token(1);
ASTSequence jjtn001 = new ASTSequence(JJTSEQUENCE);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
try {
assignmentExpression();
} catch (Throwable jjte001) {
if (jjtc001) {
jjtree.clearNodeScope(jjtn001);
jjtc001 = false;
} else {
jjtree.popNode();
}
if (jjte001 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte001;}
}
if (jjte001 instanceof ParseException) {
{if (true) throw (ParseException)jjte001;}
}
{if (true) throw (Error)jjte001;}
} finally {
if (jjtc001) {
jjtree.closeNodeScope(jjtn001, 2);
}
}
}
}
// assignment expression (level 13)
final public void assignmentExpression() throws ParseException {
conditionalTestExpression();
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case 2:
jj_consume_token(2);
ASTAssign jjtn001 = new ASTAssign(JJTASSIGN);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
try {
assignmentExpression();
} catch (Throwable jjte001) {
if (jjtc001) {
jjtree.clearNodeScope(jjtn001);
jjtc001 = false;
} else {
jjtree.popNode();
}
if (jjte001 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte001;}
}
if (jjte001 instanceof ParseException) {
{if (true) throw (ParseException)jjte001;}
}
{if (true) throw (Error)jjte001;}
} finally {
if (jjtc001) {
jjtree.closeNodeScope(jjtn001, 2);
}
}
break;
default:
jj_la1[1] = jj_gen;
;
}
}
// conditional test (level 12)
final public void conditionalTestExpression() throws ParseException {
logicalOrExpression();
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case 3:
jj_consume_token(3);
conditionalTestExpression();
jj_consume_token(4);
ASTTest jjtn001 = new ASTTest(JJTTEST);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
try {
conditionalTestExpression();
} catch (Throwable jjte001) {
if (jjtc001) {
jjtree.clearNodeScope(jjtn001);
jjtc001 = false;
} else {
jjtree.popNode();
}
if (jjte001 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte001;}
}
if (jjte001 instanceof ParseException) {
{if (true) throw (ParseException)jjte001;}
}
{if (true) throw (Error)jjte001;}
} finally {
if (jjtc001) {
jjtree.closeNodeScope(jjtn001, 3);
}
}
break;
default:
jj_la1[2] = jj_gen;
;
}
}
// logical or (||) (level 11)
final public void logicalOrExpression() throws ParseException {
logicalAndExpression();
label_2:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case 5:
case 6:
;
break;
default:
jj_la1[3] = jj_gen;
break label_2;
}
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case 5:
jj_consume_token(5);
break;
case 6:
jj_consume_token(6);
break;
default:
jj_la1[4] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
ASTOr jjtn001 = new ASTOr(JJTOR);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
try {
logicalAndExpression();
} catch (Throwable jjte001) {
if (jjtc001) {
jjtree.clearNodeScope(jjtn001);
jjtc001 = false;
} else {
jjtree.popNode();
}
if (jjte001 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte001;}
}
if (jjte001 instanceof ParseException) {
{if (true) throw (ParseException)jjte001;}
}
{if (true) throw (Error)jjte001;}
} finally {
if (jjtc001) {
jjtree.closeNodeScope(jjtn001, 2);
}
}
}
}
// logical and (&&) (level 10)
final public void logicalAndExpression() throws ParseException {
inclusiveOrExpression();
label_3:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case 7:
case 8:
;
break;
default:
jj_la1[5] = jj_gen;
break label_3;
}
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case 7:
jj_consume_token(7);
break;
case 8:
jj_consume_token(8);
break;
default:
jj_la1[6] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
ASTAnd jjtn001 = new ASTAnd(JJTAND);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
try {
inclusiveOrExpression();
} catch (Throwable jjte001) {
if (jjtc001) {
jjtree.clearNodeScope(jjtn001);
jjtc001 = false;
} else {
jjtree.popNode();
}
if (jjte001 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte001;}
}
if (jjte001 instanceof ParseException) {
{if (true) throw (ParseException)jjte001;}
}
{if (true) throw (Error)jjte001;}
} finally {
if (jjtc001) {
jjtree.closeNodeScope(jjtn001, 2);
}
}
}
}
// bitwise or non-short-circuiting or (|) (level 9)
final public void inclusiveOrExpression() throws ParseException {
exclusiveOrExpression();
label_4:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case 9:
case 10:
;
break;
default:
jj_la1[7] = jj_gen;
break label_4;
}
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case 9:
jj_consume_token(9);
break;
case 10:
jj_consume_token(10);
break;
default:
jj_la1[8] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
ASTBitOr jjtn001 = new ASTBitOr(JJTBITOR);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
try {
exclusiveOrExpression();
} catch (Throwable jjte001) {
if (jjtc001) {
jjtree.clearNodeScope(jjtn001);
jjtc001 = false;
} else {
jjtree.popNode();
}
if (jjte001 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte001;}
}
if (jjte001 instanceof ParseException) {
{if (true) throw (ParseException)jjte001;}
}
{if (true) throw (Error)jjte001;}
} finally {
if (jjtc001) {
jjtree.closeNodeScope(jjtn001, 2);
}
}
}
}
// exclusive or (^) (level 8)
final public void exclusiveOrExpression() throws ParseException {
andExpression();
label_5:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case 11:
case 12:
;
break;
default:
jj_la1[9] = jj_gen;
break label_5;
}
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case 11:
jj_consume_token(11);
break;
case 12:
jj_consume_token(12);
break;
default:
jj_la1[10] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
ASTXor jjtn001 = new ASTXor(JJTXOR);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
try {
andExpression();
} catch (Throwable jjte001) {
if (jjtc001) {
jjtree.clearNodeScope(jjtn001);
jjtc001 = false;
} else {
jjtree.popNode();
}
if (jjte001 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte001;}
}
if (jjte001 instanceof ParseException) {
{if (true) throw (ParseException)jjte001;}
}
{if (true) throw (Error)jjte001;}
} finally {
if (jjtc001) {
jjtree.closeNodeScope(jjtn001, 2);
}
}
}
}
// bitwise or non-short-circuiting and (&) (level 7)
final public void andExpression() throws ParseException {
equalityExpression();
label_6:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case 13:
case 14:
;
break;
default:
jj_la1[11] = jj_gen;
break label_6;
}
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case 13:
jj_consume_token(13);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -