本文整理匯總了Java中org.antlr.tool.Rule類的典型用法代碼示例。如果您正苦於以下問題:Java Rule類的具體用法?Java Rule怎麽用?Java Rule使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Rule類屬於org.antlr.tool包,在下文中一共展示了Rule類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: FOLLOW
import org.antlr.tool.Rule; //導入依賴的package包/類
public LookaheadSet FOLLOW(Rule r) {
LookaheadSet f = FOLLOWCache.get(r);
if ( f!=null ) {
return f;
}
f = _FIRST(r.stopState, true);
FOLLOWCache.put(r, f);
return f;
}
示例2: RuleClosureTransition
import org.antlr.tool.Rule; //導入依賴的package包/類
public RuleClosureTransition(Rule rule,
NFAState ruleStart,
NFAState followState)
{
super(Label.EPSILON, ruleStart);
this.rule = rule;
this.followState = followState;
}
示例3: detectConfoundingPredicates
import org.antlr.tool.Rule; //導入依賴的package包/類
/** Is there a non-syn-pred predicate visible from s that is not in
* the rule enclosing s? This accounts for most predicate situations
* and lets ANTLR do a simple LL(1)+pred computation.
*
* TODO: what about gated vs regular preds?
*/
public boolean detectConfoundingPredicates(NFAState s) {
lookBusy.clear();
Rule r = s.enclosingRule;
return _detectConfoundingPredicates(s, r, false) == DETECT_PRED_FOUND;
}