Example #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();
            }
        }
Example #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();
            }
        }