Antlr4.Codegen.ParserFactory.GetEBNFBlock C# (CSharp) Method

GetEBNFBlock() public method

public GetEBNFBlock ( GrammarAST ebnfRoot, IList alts ) : Choice
ebnfRoot Antlr4.Tool.Ast.GrammarAST
alts IList
return Antlr4.Codegen.Model.Choice
        public override Choice GetEBNFBlock(GrammarAST ebnfRoot, IList<CodeBlockForAlt> alts)
        {
            if (!g.tool.force_atn)
            {
                int decision;
                if (ebnfRoot.Type == ANTLRParser.POSITIVE_CLOSURE)
                {
                    decision = ((PlusLoopbackState)ebnfRoot.atnState).decision;
                }
                else if (ebnfRoot.Type == ANTLRParser.CLOSURE)
                {
                    decision = ((StarLoopEntryState)ebnfRoot.atnState).decision;
                }
                else
                {
                    decision = ((DecisionState)ebnfRoot.atnState).decision;
                }

                if (AnalysisPipeline.Disjoint(g.decisionLOOK[decision]))
                {
                    return GetLL1EBNFBlock(ebnfRoot, alts);
                }
            }

            return GetComplexEBNFBlock(ebnfRoot, alts);
        }