类的使用
org.antlr.analysis.SemanticContext
-
使用SemanticContext的程序包 程序包 说明 org.antlr.analysis org.antlr.tool -
-
org.antlr.analysis中SemanticContext的使用
org.antlr.analysis中SemanticContext的子类 修饰符和类型 类 说明 static classSemanticContext.ANDstatic classSemanticContext.CommutativePredicatestatic classSemanticContext.FalsePredicatestatic classSemanticContext.NOTstatic classSemanticContext.ORstatic classSemanticContext.Predicatestatic classSemanticContext.TruePredicate声明为SemanticContext的org.antlr.analysis中的字段 修饰符和类型 字段 说明 protected SemanticContextSemanticContext.NOT. ctxstatic SemanticContextSemanticContext. EMPTY_SEMANTIC_CONTEXTCreate a default value for the semantic context shared among all NFAConfigurations that do not have an actual semantic context.SemanticContextNFAConfiguration. semanticContextThe set of semantic predicates associated with this NFA configuration.protected SemanticContextPredicateLabel. semanticContextA tree of semantic predicates from the grammar AST if label==SEMPRED.类型参数类型为SemanticContext的org.antlr.analysis中的字段 修饰符和类型 字段 说明 protected java.util.Set<SemanticContext>SemanticContext.CommutativePredicate. operandsprotected java.util.Map<DFAState,java.util.Map<java.lang.Integer,SemanticContext>>DecisionProbe. stateToAltSetWithSemanticPredicatesMapTrack the predicates for each alt per DFA state; more than one DFA state might have syntactically ambig alt prediction.返回SemanticContext的org.antlr.analysis中的方法 修饰符和类型 方法 说明 protected SemanticContextLL1Analyzer. _getPredicates(NFAState s, NFAState altStartState)static SemanticContextSemanticContext. and(SemanticContext a, SemanticContext b)SemanticContextSemanticContext.AND. combinePredicates(SemanticContext left, SemanticContext right)abstract SemanticContextSemanticContext.CommutativePredicate. combinePredicates(SemanticContext left, SemanticContext right)SemanticContextSemanticContext.OR. combinePredicates(SemanticContext left, SemanticContext right)static SemanticContext[]SemanticContext. factorAnd(SemanticContext a, SemanticContext b)static SemanticContext[]SemanticContext. factorOr(SemanticContext a, SemanticContext b)SemanticContextSemanticContext.CommutativePredicate. getGatedPredicateContext()abstract SemanticContextSemanticContext. getGatedPredicateContext()Given a semantic context expression tree, return a tree with all nongated predicates set to true and then reduced.SemanticContextSemanticContext.NOT. getGatedPredicateContext()SemanticContextSemanticContext.Predicate. getGatedPredicateContext()SemanticContextDFAState. getGatedPredicatesInNFAConfigurations()For gated productions, we need an OR'd list of all predicates for the target of an edge so we can gate the edge based upon the predicates associated with taking that path (if any).SemanticContextLL1Analyzer. getPredicates(NFAState altStartState)Return predicate expression found via epsilon edges from s.SemanticContextLabel. getSemanticContext()SemanticContextPredicateLabel. getSemanticContext()SemanticContextDecisionProbe. getSemanticContextForAlt(DFAState d, int alt)Each state in the DFA represents a different input sequence for an alt of the decision.protected static SemanticContextNFAToDFAConverter. getUnionOfPredicates(java.util.Map<?,SemanticContext> altToPredMap)OR together all predicates from the alts.static SemanticContextSemanticContext. not(SemanticContext a)static SemanticContextSemanticContext. or(SemanticContext a, SemanticContext b)返回变量类型为SemanticContext的类型的org.antlr.analysis中的方法 修饰符和类型 方法 说明 static java.util.Collection<SemanticContext>SemanticContext. getAndOperands(SemanticContext context)java.util.Set<? extends SemanticContext>DFAState. getGatedSyntacticPredicatesInNFAConfigurations()static java.util.Collection<SemanticContext>SemanticContext. getOrOperands(SemanticContext context)protected java.util.Map<java.lang.Integer,SemanticContext>NFAToDFAConverter. getPredicatesPerNonDeterministicAlt(DFAState d, java.util.Set<java.lang.Integer> nondeterministicAlts)Return a mapping from nondeterministc alt to combined list of predicates.参数类型为SemanticContext的org.antlr.analysis中的方法 修饰符和类型 方法 说明 NFAConfigurationDFAState. addNFAConfiguration(NFAState state, int alt, NFAContext context, SemanticContext semanticContext)static SemanticContextSemanticContext. and(SemanticContext a, SemanticContext b)voidNFAToDFAConverter. closure(NFAState p, int alt, NFAContext context, SemanticContext semanticContext, DFAState d, boolean collectPredicates)Where can we get from NFA state p traversing only epsilon transitions? Add new NFA states + context to DFA state d.SemanticContextSemanticContext.AND. combinePredicates(SemanticContext left, SemanticContext right)abstract SemanticContextSemanticContext.CommutativePredicate. combinePredicates(SemanticContext left, SemanticContext right)SemanticContextSemanticContext.OR. combinePredicates(SemanticContext left, SemanticContext right)static SemanticContext[]SemanticContext. factorAnd(SemanticContext a, SemanticContext b)static SemanticContext[]SemanticContext. factorOr(SemanticContext a, SemanticContext b)static java.util.Collection<SemanticContext>SemanticContext. getAndOperands(SemanticContext context)static java.util.Collection<SemanticContext>SemanticContext. getOrOperands(SemanticContext context)static SemanticContextSemanticContext. not(SemanticContext a)static SemanticContextSemanticContext. or(SemanticContext a, SemanticContext b)类型变量类型为SemanticContext的org.antlr.analysis中的方法参数 修饰符和类型 方法 说明 protected static SemanticContextNFAToDFAConverter. getUnionOfPredicates(java.util.Map<?,SemanticContext> altToPredMap)OR together all predicates from the alts.voidDecisionProbe. reportAltPredicateContext(DFAState d, java.util.Map<java.lang.Integer,? extends SemanticContext> altPredicateContext)Report the list of predicates found for each alternative; copy the list because this set gets altered later by the method tryToResolveWithSemanticPredicates() while flagging NFA configurations in d as resolved.参数类型为SemanticContext的org.antlr.analysis中的构造器 构造器 说明 AND(SemanticContext a, SemanticContext b)CommutativePredicate(SemanticContext a, SemanticContext b)NFAConfiguration(int state, int alt, NFAContext context, SemanticContext semanticContext)NOT(SemanticContext ctx)OR(SemanticContext a, SemanticContext b)PredicateLabel(SemanticContext semCtx)Make a semantic predicates label类型变量类型为SemanticContext的org.antlr.analysis中的构造器参数 构造器 说明 AND(java.util.HashSet<SemanticContext> contexts)CommutativePredicate(java.util.HashSet<SemanticContext> contexts)OR(java.util.HashSet<SemanticContext> contexts) -
org.antlr.tool中SemanticContext的使用
参数类型为SemanticContext的org.antlr.tool中的方法 修饰符和类型 方法 说明 voidGrammar. synPredUsedInDFA(DFA dfa, SemanticContext semCtx)
-