|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.antlr.analysis.LL1Analyzer
public class LL1Analyzer
Created by IntelliJ IDEA. User: parrt Date: Dec 31, 2007 Time: 1:31:16 PM To change this template use File | Settings | File Templates.
Field Summary | |
---|---|
static int |
DETECT_PRED_EOR
0 if we hit end of rule and invoker should keep going (epsilon) |
static int |
DETECT_PRED_FOUND
1 if we found a nonautobacktracking pred |
static int |
DETECT_PRED_NOT_FOUND
2 if we didn't find such a pred |
java.util.Map<NFAState,LookaheadSet> |
FIRSTCache
|
java.util.Map<Rule,LookaheadSet> |
FOLLOWCache
|
Grammar |
grammar
|
protected java.util.Set<NFAState> |
lookBusy
Used during LOOK to detect computation cycles |
Constructor Summary | |
---|---|
LL1Analyzer(Grammar grammar)
|
Method Summary | |
---|---|
protected int |
_detectConfoundingPredicates(NFAState s,
Rule enclosingRule,
boolean chaseFollowTransitions)
|
protected LookaheadSet |
_FIRST(NFAState s,
boolean chaseFollowTransitions)
|
protected SemanticContext |
_getPredicates(NFAState s,
NFAState altStartState)
|
boolean |
detectConfoundingPredicates(NFAState s)
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. |
LookaheadSet |
FIRST(NFAState s)
From an NFA state, s, find the set of all labels reachable from s. |
LookaheadSet |
FOLLOW(Rule r)
|
SemanticContext |
getPredicates(NFAState altStartState)
Return predicate expression found via epsilon edges from s. |
LookaheadSet |
LOOK(NFAState s)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DETECT_PRED_EOR
public static final int DETECT_PRED_FOUND
public static final int DETECT_PRED_NOT_FOUND
public Grammar grammar
protected java.util.Set<NFAState> lookBusy
public java.util.Map<NFAState,LookaheadSet> FIRSTCache
public java.util.Map<Rule,LookaheadSet> FOLLOWCache
Constructor Detail |
---|
public LL1Analyzer(Grammar grammar)
Method Detail |
---|
public LookaheadSet FIRST(NFAState s)
public LookaheadSet FOLLOW(Rule r)
public LookaheadSet LOOK(NFAState s)
protected LookaheadSet _FIRST(NFAState s, boolean chaseFollowTransitions)
public boolean detectConfoundingPredicates(NFAState s)
protected int _detectConfoundingPredicates(NFAState s, Rule enclosingRule, boolean chaseFollowTransitions)
public SemanticContext getPredicates(NFAState altStartState)
protected SemanticContext _getPredicates(NFAState s, NFAState altStartState)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |