Check() public method

public Check ( Rule enclosingRule, ATNState s, ISet visitedStates ) : bool
enclosingRule Antlr4.Tool.Rule
s Antlr4.Runtime.Atn.ATNState
visitedStates ISet
return bool
Exemplo n.º 1
0
        public virtual void Process()
        {
            // LEFT-RECURSION CHECK
            LeftRecursionDetector lr = new LeftRecursionDetector(g, g.atn);
            lr.Check();
            if (lr.listOfRecursiveCycles.Count > 0)
                return; // bail out

            if (g.IsLexer())
            {
                ProcessLexer();
            }
            else
            {
                // BUILD DFA FOR EACH DECISION
                ProcessParser();
            }
        }
Exemplo n.º 2
0
        public virtual void Process()
        {
            // LEFT-RECURSION CHECK
            LeftRecursionDetector lr = new LeftRecursionDetector(g, g.atn);

            lr.Check();
            if (lr.listOfRecursiveCycles.Count > 0)
            {
                return; // bail out
            }
            if (g.IsLexer())
            {
                ProcessLexer();
            }
            else
            {
                // BUILD DFA FOR EACH DECISION
                ProcessParser();
            }
        }