Package net.percederberg.grammatica.parser

Examples of net.percederberg.grammatica.parser.ProductionPatternAlternative.addProduction()


        pattern = new ProductionPattern(Asn1Constants.CHOICE_TYPE,
                                        "ChoiceType");
        alt = new ProductionPatternAlternative();
        alt.addToken(Asn1Constants.CHOICE, 1, 1);
        alt.addToken(Asn1Constants.LEFT_BRACE, 1, 1);
        alt.addProduction(Asn1Constants.ELEMENT_TYPE_LIST, 1, 1);
        alt.addToken(Asn1Constants.RIGHT_BRACE, 1, 1);
        pattern.addAlternative(alt);
        addPattern(pattern);

        pattern = new ProductionPattern(Asn1Constants.ENUMERATED_TYPE,
View Full Code Here


        pattern = new ProductionPattern(Asn1Constants.ENUMERATED_TYPE,
                                        "EnumeratedType");
        alt = new ProductionPatternAlternative();
        alt.addToken(Asn1Constants.ENUMERATED, 1, 1);
        alt.addProduction(Asn1Constants.NAMED_NUMBER_LIST, 1, 1);
        pattern.addAlternative(alt);
        addPattern(pattern);

        pattern = new ProductionPattern(Asn1Constants.SELECTION_TYPE,
                                        "SelectionType");
View Full Code Here

        pattern = new ProductionPattern(Asn1Constants.SELECTION_TYPE,
                                        "SelectionType");
        alt = new ProductionPatternAlternative();
        alt.addToken(Asn1Constants.IDENTIFIER_STRING, 1, 1);
        alt.addToken(Asn1Constants.LESS_THAN, 1, 1);
        alt.addProduction(Asn1Constants.TYPE, 1, 1);
        pattern.addAlternative(alt);
        addPattern(pattern);

        pattern = new ProductionPattern(Asn1Constants.TAGGED_TYPE,
                                        "TaggedType");
View Full Code Here

        addPattern(pattern);

        pattern = new ProductionPattern(Asn1Constants.TAGGED_TYPE,
                                        "TaggedType");
        alt = new ProductionPatternAlternative();
        alt.addProduction(Asn1Constants.TAG, 1, 1);
        alt.addProduction(Asn1Constants.EXPLICIT_OR_IMPLICIT_TAG, 0, 1);
        alt.addProduction(Asn1Constants.TYPE, 1, 1);
        pattern.addAlternative(alt);
        addPattern(pattern);
View Full Code Here

        pattern = new ProductionPattern(Asn1Constants.TAGGED_TYPE,
                                        "TaggedType");
        alt = new ProductionPatternAlternative();
        alt.addProduction(Asn1Constants.TAG, 1, 1);
        alt.addProduction(Asn1Constants.EXPLICIT_OR_IMPLICIT_TAG, 0, 1);
        alt.addProduction(Asn1Constants.TYPE, 1, 1);
        pattern.addAlternative(alt);
        addPattern(pattern);

        pattern = new ProductionPattern(Asn1Constants.TAG,
View Full Code Here

        pattern = new ProductionPattern(Asn1Constants.TAGGED_TYPE,
                                        "TaggedType");
        alt = new ProductionPatternAlternative();
        alt.addProduction(Asn1Constants.TAG, 1, 1);
        alt.addProduction(Asn1Constants.EXPLICIT_OR_IMPLICIT_TAG, 0, 1);
        alt.addProduction(Asn1Constants.TYPE, 1, 1);
        pattern.addAlternative(alt);
        addPattern(pattern);

        pattern = new ProductionPattern(Asn1Constants.TAG,
                                        "Tag");
View Full Code Here

        pattern = new ProductionPattern(Asn1Constants.TAG,
                                        "Tag");
        alt = new ProductionPatternAlternative();
        alt.addToken(Asn1Constants.LEFT_BRACKET, 1, 1);
        alt.addProduction(Asn1Constants.CLASS, 0, 1);
        alt.addToken(Asn1Constants.NUMBER_STRING, 1, 1);
        alt.addToken(Asn1Constants.RIGHT_BRACKET, 1, 1);
        pattern.addAlternative(alt);
        addPattern(pattern);
View Full Code Here

        addPattern(pattern);

        pattern = new ProductionPattern(Asn1Constants.ELEMENT_TYPE_LIST,
                                        "ElementTypeList");
        alt = new ProductionPatternAlternative();
        alt.addProduction(Asn1Constants.ELEMENT_TYPE, 1, 1);
        alt.addProduction(SUBPRODUCTION_2, 0, -1);
        pattern.addAlternative(alt);
        addPattern(pattern);

        pattern = new ProductionPattern(Asn1Constants.ELEMENT_TYPE,
View Full Code Here

        pattern = new ProductionPattern(Asn1Constants.ELEMENT_TYPE_LIST,
                                        "ElementTypeList");
        alt = new ProductionPatternAlternative();
        alt.addProduction(Asn1Constants.ELEMENT_TYPE, 1, 1);
        alt.addProduction(SUBPRODUCTION_2, 0, -1);
        pattern.addAlternative(alt);
        addPattern(pattern);

        pattern = new ProductionPattern(Asn1Constants.ELEMENT_TYPE,
                                        "ElementType");
View Full Code Here

        pattern = new ProductionPattern(Asn1Constants.ELEMENT_TYPE,
                                        "ElementType");
        alt = new ProductionPatternAlternative();
        alt.addToken(Asn1Constants.IDENTIFIER_STRING, 0, 1);
        alt.addProduction(Asn1Constants.TYPE, 1, 1);
        alt.addProduction(Asn1Constants.OPTIONAL_OR_DEFAULT_ELEMENT, 0, 1);
        pattern.addAlternative(alt);
        alt = new ProductionPatternAlternative();
        alt.addToken(Asn1Constants.IDENTIFIER_STRING, 0, 1);
        alt.addToken(Asn1Constants.COMPONENTS, 1, 1);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.