Look() private method

private Look ( ATNState s, ATNState stopState, RuleContext ctx ) : IntervalSet
s ATNState
stopState ATNState
ctx RuleContext
return Antlr4.Runtime.Misc.IntervalSet
Esempio n. 1
0
        public virtual IntervalSet NextTokens(ATNState s, RuleContext ctx)
        {
            LL1Analyzer anal = new LL1Analyzer(this);

            IntervalSet next = anal.Look(s, ctx);

            return(next);
        }
Esempio n. 2
0
        public virtual IntervalSet NextTokens(ATNState s, PredictionContext ctx)
        {
            Args.NotNull("ctx", ctx);

            LL1Analyzer anal = new LL1Analyzer(this);
            IntervalSet next = anal.Look(s, ctx);

            return(next);
        }
Esempio n. 3
0
        protected virtual void ProcessLexer()
        {
            // make sure all non-fragment lexer rules must match at least one symbol
            foreach (Rule rule in g.rules.Values)
            {
                if (rule.IsFragment())
                {
                    continue;
                }

                LL1Analyzer analyzer = new LL1Analyzer(g.atn);
                IntervalSet look = analyzer.Look(g.atn.ruleToStartState[rule.index], PredictionContext.EmptyLocal);
                if (look.Contains(TokenConstants.Epsilon))
                {
                    g.tool.errMgr.GrammarError(ErrorType.EPSILON_TOKEN, g.fileName, ((GrammarAST)rule.ast.GetChild(0)).Token, rule.name);
                }
            }
        }
Esempio n. 4
0
 public virtual IntervalSet NextTokens(ATNState s, PredictionContext ctx)
 {
     Args.NotNull("ctx", ctx);
     LL1Analyzer anal = new LL1Analyzer(this);
     IntervalSet next = anal.Look(s, ctx);
     return next;
 }