?? elparser.java
字號:
jj_consume_token(-1);
throw new ParseException();
}
}
}
/*
* Unary
* For '-' '!' 'not' 'empty', then Value
*/
final public void Unary() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case MINUS:
jj_consume_token(MINUS);
AstNegative jjtn001 = new AstNegative(JJTNEGATIVE);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
try {
Unary();
} 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, true);
}
}
break;
case NOT0:
case NOT1:
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case NOT0:
jj_consume_token(NOT0);
break;
case NOT1:
jj_consume_token(NOT1);
break;
default:
jj_la1[23] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
AstNot jjtn002 = new AstNot(JJTNOT);
boolean jjtc002 = true;
jjtree.openNodeScope(jjtn002);
try {
Unary();
} catch (Throwable jjte002) {
if (jjtc002) {
jjtree.clearNodeScope(jjtn002);
jjtc002 = false;
} else {
jjtree.popNode();
}
if (jjte002 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte002;}
}
if (jjte002 instanceof ParseException) {
{if (true) throw (ParseException)jjte002;}
}
{if (true) throw (Error)jjte002;}
} finally {
if (jjtc002) {
jjtree.closeNodeScope(jjtn002, true);
}
}
break;
case EMPTY:
jj_consume_token(EMPTY);
AstEmpty jjtn003 = new AstEmpty(JJTEMPTY);
boolean jjtc003 = true;
jjtree.openNodeScope(jjtn003);
try {
Unary();
} catch (Throwable jjte003) {
if (jjtc003) {
jjtree.clearNodeScope(jjtn003);
jjtc003 = false;
} else {
jjtree.popNode();
}
if (jjte003 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte003;}
}
if (jjte003 instanceof ParseException) {
{if (true) throw (ParseException)jjte003;}
}
{if (true) throw (Error)jjte003;}
} finally {
if (jjtc003) {
jjtree.closeNodeScope(jjtn003, true);
}
}
break;
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case STRING_LITERAL:
case TRUE:
case FALSE:
case NULL:
case LPAREN:
case IDENTIFIER:
Value();
break;
default:
jj_la1[24] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
/*
* Value
* Defines Prefix plus zero or more Suffixes
*/
final public void Value() throws ParseException {
AstValue jjtn001 = new AstValue(JJTVALUE);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
try {
ValuePrefix();
label_9:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case DOT:
case LBRACK:
;
break;
default:
jj_la1[25] = jj_gen;
break label_9;
}
ValueSuffix();
}
} 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, jjtree.nodeArity() > 1);
}
}
}
/*
* ValuePrefix
* For Literals, Variables, and Functions
*/
final public void ValuePrefix() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case STRING_LITERAL:
case TRUE:
case FALSE:
case NULL:
Literal();
break;
case LPAREN:
case IDENTIFIER:
NonLiteral();
break;
default:
jj_la1[26] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
/*
* ValueSuffix
* Either dot or bracket notation
*/
final public void ValueSuffix() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case DOT:
DotSuffix();
break;
case LBRACK:
BracketSuffix();
break;
default:
jj_la1[27] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
/*
* DotSuffix
* Dot Property
*/
final public void DotSuffix() throws ParseException {
/*@bgen(jjtree) DotSuffix */
AstDotSuffix jjtn000 = new AstDotSuffix(JJTDOTSUFFIX);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);Token t = null;
try {
jj_consume_token(DOT);
t = jj_consume_token(IDENTIFIER);
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
jjtn000.setImage(t.image);
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
}
/*
* BracketSuffix
* Sub Expression Suffix
*/
final public void BracketSuffix() throws ParseException {
/*@bgen(jjtree) BracketSuffix */
AstBracketSuffix jjtn000 = new AstBracketSuffix(JJTBRACKETSUFFIX);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
try {
jj_consume_token(LBRACK);
Expression();
jj_consume_token(RBRACK);
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
}
/*
* NonLiteral
* For Grouped Operations, Identifiers, and Functions
*/
final public void NonLiteral() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LPAREN:
jj_consume_token(LPAREN);
Expression();
jj_consume_token(RPAREN);
break;
default:
jj_la1[28] = jj_gen;
if (jj_2_1(2)) {
Function();
} else {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case IDENTIFIER:
Identifier();
break;
default:
jj_la1[29] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
}
}
/*
* Identifier
* Java Language Identifier
*/
final public void Identifier() throws ParseException {
/*@bgen(jjtree) Identifier */
AstIdentifier jjtn000 = new AstIdentifier(JJTIDENTIFIER);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);Token t = null;
try {
t = jj_consume_token(IDENTIFIER);
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
jjtn000.setImage(t.image);
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
}
/*
* Function
* Namespace:Name(a,b,c)
*/
final public void Function() throws ParseException {
/*@bgen(jjtree) Function */
AstFunction jjtn000 = new AstFunction(JJTFUNCTION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);Token t0 = null;
Token t1 = null;
try {
t0 = jj_consume_token(IDENTIFIER);
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case FUNCTIONSUFFIX:
t1 = jj_consume_token(FUNCTIONSUFFIX);
break;
default:
jj_la1[30] = jj_gen;
;
}
if (t1 != null) {
jjtn000.setPrefix(t0.image);
jjtn000.setLocalName(t1.image.substring(1));
} else {
jjtn000.setLocalName(t0.image);
}
jj_consume_token(LPAREN);
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case STRING_LITERAL:
case TRUE:
case FALSE:
case NULL:
case LPAREN:
case NOT0:
case NOT1:
case EMPTY:
case MINUS:
case IDENTIFIER:
Expression();
label_10:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case COMMA:
;
break;
default:
jj_la1[31] = jj_gen;
break label_10;
}
jj_consume_token(COMMA);
Expression();
}
break;
default:
jj_la1[32] = jj_gen;
;
}
jj_consume_token(RPAREN);
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{if (true) throw (RuntimeException)jjte000;}
}
if (jjte000 instanceof ParseException) {
{if (true) throw (ParseException)jjte000;}
}
{if (true) throw (Error)jjte000;}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
}
/*
* Literal
* Reserved Keywords
*/
final public void Literal() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case TRUE:
case FALSE:
Boolean();
break;
case FLOATING_POINT_LITERAL:
FloatingPoint();
break;
case INTEGER_LITERAL:
Integer();
break;
case STRING_LITERAL:
String();
break;
case NULL:
Null();
break;
default:
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -