Antlr4.Analysis.AnalysisPipeline.ProcessParser C# (CSharp) Method

ProcessParser() protected method

protected ProcessParser ( ) : void
return void
        protected virtual void ProcessParser()
        {
            g.decisionLOOK = new List<IntervalSet[]>(g.atn.NumberOfDecisions + 1);
            foreach (DecisionState s in g.atn.decisionToState)
            {
                g.tool.Log("LL1", "\nDECISION " + s.decision + " in rule " + g.GetRule(s.ruleIndex).name);
                IntervalSet[] look;
                if (s.nonGreedy)
                { // nongreedy decisions can't be LL(1)
                    look = new IntervalSet[s.NumberOfTransitions + 1];
                }
                else
                {
                    LL1Analyzer anal = new LL1Analyzer(g.atn);
                    look = anal.GetDecisionLookahead(s);
                    g.tool.Log("LL1", "look=[" + string.Join(", ", look.AsEnumerable()) + "]");
                }

                Debug.Assert(s.decision + 1 >= g.decisionLOOK.Count);
                Utils.SetSize(g.decisionLOOK, s.decision + 1);
                g.decisionLOOK[s.decision] = look;
                g.tool.Log("LL1", "LL(1)? " + Disjoint(look));
            }
        }