📄 ognl.jj
字号:
/*@egen*/
)
}
void keyValueExpression() : {}
{/*@bgen(jjtree) KeyValue */
{
ASTKeyValue jjtn001 = new ASTKeyValue(JJTKEYVALUE);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
}
try {
/*@egen*/
( assignmentExpression() (":" assignmentExpression())? )/*@bgen(jjtree)*/
} catch (Throwable jjte001) {
if (jjtc001) {
jjtree.clearNodeScope(jjtn001);
jjtc001 = false;
} else {
jjtree.popNode();
}
if (jjte001 instanceof RuntimeException) {
throw (RuntimeException)jjte001;
}
if (jjte001 instanceof ParseException) {
throw (ParseException)jjte001;
}
throw (Error)jjte001;
} finally {
if (jjtc001) {
jjtree.closeNodeScope(jjtn001, true);
}
}
/*@egen*/
}
void staticReference() : {
String className = "java.lang.Math";
Token t;
}
{
className=classReference()
( // Prevent the "eval" ambiguity from issuing a warning; see discussion elsewhere.
LOOKAHEAD(2)
staticMethodCall( className )
|
t=<IDENT>/*@bgen(jjtree) #StaticField( 0) */
{
ASTStaticField jjtn001 = new ASTStaticField(JJTSTATICFIELD);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
}
try {
/*@egen*//*@bgen(jjtree)*/
{
jjtree.closeNodeScope(jjtn001, 0);
jjtc001 = false;
}
/*@egen*/ { jjtn001.init( className, t.image ); }/*@bgen(jjtree)*/
} finally {
if (jjtc001) {
jjtree.closeNodeScope(jjtn001, 0);
}
}
/*@egen*/
)
}
String classReference(): {
String result = "java.lang.Math";
}
{
"@" ( result=className() )? "@" { return result; }
}
String className(): {
Token t;
StringBuffer result;
}
{
t=<IDENT> { result = new StringBuffer( t.image ); }
( "." t=<IDENT> { result.append('.').append( t.image ); }
)* { return new String(result); }
}
void constructorCall() : {/*@bgen(jjtree) Ctor */
ASTCtor jjtn000 = new ASTCtor(JJTCTOR);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/
String className;
Token t;
StringBuffer sb;
}
{/*@bgen(jjtree) Ctor */
try {
/*@egen*/
"new" className=className()
(
LOOKAHEAD(2) (
"(" [ assignmentExpression() ( "," assignmentExpression() )* ] ")"/*@bgen(jjtree)*/
{
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
}
/*@egen*/
{
jjtn000.setClassName(className);
}
)
|
LOOKAHEAD(2) (
"[" "]" "{"/*@bgen(jjtree) List */
{
ASTList jjtn001 = new ASTList(JJTLIST);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
}
try {
/*@egen*/ [assignmentExpression() ("," assignmentExpression())*]/*@bgen(jjtree)*/
} catch (Throwable jjte001) {
if (jjtc001) {
jjtree.clearNodeScope(jjtn001);
jjtc001 = false;
} else {
jjtree.popNode();
}
if (jjte001 instanceof RuntimeException) {
throw (RuntimeException)jjte001;
}
if (jjte001 instanceof ParseException) {
throw (ParseException)jjte001;
}
throw (Error)jjte001;
} finally {
if (jjtc001) {
jjtree.closeNodeScope(jjtn001, true);
}
}
/*@egen*/ "}"/*@bgen(jjtree)*/
{
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
}
/*@egen*/
{
jjtn000.setClassName(className);
jjtn000.setArray(true);
}
)
|
LOOKAHEAD(2) (
"[" assignmentExpression() "]"/*@bgen(jjtree)*/
{
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
}
/*@egen*/
{
jjtn000.setClassName(className);
jjtn000.setArray(true);
}
)
)/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof ParseException) {
throw (ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
void propertyName() : {/*@bgen(jjtree) Property */
ASTProperty jjtn000 = new ASTProperty(JJTPROPERTY);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/
Token t;
}
{/*@bgen(jjtree) Property */
try {
/*@egen*/
t=<IDENT>/*@bgen(jjtree) Const */
{
ASTConst jjtn001 = new ASTConst(JJTCONST);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
}
try {
/*@egen*//*@bgen(jjtree)*/
{
jjtree.closeNodeScope(jjtn001, true);
jjtc001 = false;
}
/*@egen*/ { jjtn001.setValue( t.image ); }/*@bgen(jjtree)*/
} finally {
if (jjtc001) {
jjtree.closeNodeScope(jjtn001, true);
}
}
/*@egen*//*@bgen(jjtree)*/
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
void staticMethodCall( String className ) : {/*@bgen(jjtree) StaticMethod */
ASTStaticMethod jjtn000 = new ASTStaticMethod(JJTSTATICMETHOD);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/
Token t;
}
{/*@bgen(jjtree) StaticMethod */
try {
/*@egen*/
t=<IDENT> "(" [ assignmentExpression() ( "," assignmentExpression() )* ] ")"/*@bgen(jjtree)*/
{
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
}
/*@egen*/
{ jjtn000.init( className, t.image ); }/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof ParseException) {
throw (ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
void methodCall() : {/*@bgen(jjtree) Method */
ASTMethod jjtn000 = new ASTMethod(JJTMETHOD);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/
Token t;
}
{/*@bgen(jjtree) Method */
try {
/*@egen*/
t=<IDENT> "(" [ assignmentExpression() ( "," assignmentExpression() )* ] ")"/*@bgen(jjtree)*/
{
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
}
/*@egen*/
{ jjtn000.setMethodName( t.image ); }/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof ParseException) {
throw (ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
/**
* Apply an expression to all elements of a collection, creating a new collection
* as the result.
*/
void projection() : {/*@bgen(jjtree) Project */
ASTProject jjtn000 = new ASTProject(JJTPROJECT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/}
{/*@bgen(jjtree) Project */
try {
/*@egen*/
"{" expression() "}"/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof ParseException) {
throw
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -