p:identifier {
....
#propertyRef = lookupProperty(#propertyRef,false,true);//do the same as below
resolve(#p) if it don't resolved in some case.
....
resolve(#p);//change the class name with the table name and primary id.(em,
a in "select a.name from Aclass a" will change to
aclassTable.id)
#propertyRef = #p;
}
---------------------------------------------------------------------------------------------------------------------------
selectExpr
: p:propertyRef { resolveSelectExpression(#p);}//change the type ast text to a reable text.
// For example, DOT LHS RHS ,before resolveSelectExpression the
// ast root text will be DOT(.),after resolveSelectExpression, the ast root
// text maybe table alias+column name.
.....
;
-------------------------------------------------------------------------------------------------------------------------
posted on 2006-09-13 14:03
R.Zeus 阅读(277)
评论(0) 编辑 收藏 所属分类:
ANTLR