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

GetComplexEBNFBlock() public method

public GetComplexEBNFBlock ( GrammarAST ebnfRoot, IList alts ) : Choice
ebnfRoot Antlr4.Tool.Ast.GrammarAST
alts IList
return Antlr4.Codegen.Model.Choice
        public override Choice GetComplexEBNFBlock(GrammarAST ebnfRoot, IList<CodeBlockForAlt> alts)
        {
            int ebnf = 0;
            if (ebnfRoot != null)
                ebnf = ebnfRoot.Type;
            Choice c = null;
            switch (ebnf)
            {
            case ANTLRParser.OPTIONAL:
                c = new OptionalBlock(this, ebnfRoot, alts);
                break;
            case ANTLRParser.CLOSURE:
                c = new StarBlock(this, ebnfRoot, alts);
                break;
            case ANTLRParser.POSITIVE_CLOSURE:
                c = new PlusBlock(this, ebnfRoot, alts);
                break;
            }
            return c;
        }