C# Класс Antlr4.Runtime.Atn.LL1Analyzer

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
LL1Analyzer ( ATN atn ) : System.Collections.Generic

Защищенные методы

Метод Описание
Look ( ATNState s, ATNState stopState, PredictionContext ctx, IntervalSet look, HashSet lookBusy, BitSet calledRuleStack, bool seeThruPreds, bool addEOF ) : void

Compute set of tokens that can follow s in the ATN in the specified ctx .

If ctx is PredictionContext.EmptyLocal and stopState or the end of the rule containing s is reached, TokenConstants.EPSILON is added to the result set. If ctx is not PredictionContext.EmptyLocal and addEOF is and stopState or the end of the outermost rule is reached, TokenConstants.EOF is added to the result set.

Приватные методы

Метод Описание
GetDecisionLookahead ( ATNState s ) : Antlr4.Runtime.Misc.IntervalSet[]
Look ( ATNState s, ATNState stopState, RuleContext ctx ) : IntervalSet
Look ( ATNState s, RuleContext ctx ) : IntervalSet

Описание методов

LL1Analyzer() публичный метод

public LL1Analyzer ( ATN atn ) : System.Collections.Generic
atn ATN
Результат System.Collections.Generic

Look() защищенный метод

Compute set of tokens that can follow s in the ATN in the specified ctx .

If ctx is PredictionContext.EmptyLocal and stopState or the end of the rule containing s is reached, TokenConstants.EPSILON is added to the result set. If ctx is not PredictionContext.EmptyLocal and addEOF is and stopState or the end of the outermost rule is reached, TokenConstants.EOF is added to the result set.

protected Look ( ATNState s, ATNState stopState, PredictionContext ctx, IntervalSet look, HashSet lookBusy, BitSet calledRuleStack, bool seeThruPreds, bool addEOF ) : void
s ATNState the ATN state.
stopState ATNState /// the ATN state to stop at. This can be a /// /// to detect epsilon paths through a closure. ///
ctx PredictionContext /// The outer context, or /// /// if /// the outer context should not be used. ///
look Antlr4.Runtime.Misc.IntervalSet The result lookahead set.
lookBusy HashSet /// A set used for preventing epsilon closures in the ATN /// from causing a stack overflow. Outside code should pass /// new HashSet<ATNConfig> /// for this argument. ///
calledRuleStack Sharpen.BitSet /// A set used for preventing left recursion in the /// ATN from causing a stack overflow. Outside code should pass /// new BitSet() /// for this argument. ///
seeThruPreds bool /// /// /// to true semantic predicates as /// implicitly /// /// and "see through them", otherwise /// /// to treat semantic predicates as opaque and add /// /// to the /// result if one is encountered. ///
addEOF bool /// Add /// /// to the result if the end of the /// outermost context is reached. This parameter has no effect if /// /// is /// /// . ///
Результат void