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

GetLL1EBNFBlock() public method

public GetLL1EBNFBlock ( GrammarAST ebnfRoot, IList alts ) : Choice
ebnfRoot Antlr4.Tool.Ast.GrammarAST
alts IList
return Antlr4.Codegen.Model.Choice
        public override Choice GetLL1EBNFBlock(GrammarAST ebnfRoot, IList<CodeBlockForAlt> alts)
        {
            int ebnf = 0;
            if (ebnfRoot != null)
                ebnf = ebnfRoot.Type;
            Choice c = null;
            switch (ebnf)
            {
            case ANTLRParser.OPTIONAL:
                if (alts.Count == 1)
                    c = new LL1OptionalBlockSingleAlt(this, ebnfRoot, alts);
                else
                    c = new LL1OptionalBlock(this, ebnfRoot, alts);
                break;
            case ANTLRParser.CLOSURE:
                if (alts.Count == 1)
                    c = new LL1StarBlockSingleAlt(this, ebnfRoot, alts);
                else
                    c = GetComplexEBNFBlock(ebnfRoot, alts);
                break;
            case ANTLRParser.POSITIVE_CLOSURE:
                if (alts.Count == 1)
                    c = new LL1PlusBlockSingleAlt(this, ebnfRoot, alts);
                else
                    c = GetComplexEBNFBlock(ebnfRoot, alts);
                break;
            }
            return c;
        }