Package net.percederberg.grammatica.parser

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


        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);
        alt.addToken(Asn1Constants.OF, 1, 1);
View Full Code Here


        pattern.addAlternative(alt);
        alt = new ProductionPatternAlternative();
        alt.addToken(Asn1Constants.IDENTIFIER_STRING, 0, 1);
        alt.addToken(Asn1Constants.COMPONENTS, 1, 1);
        alt.addToken(Asn1Constants.OF, 1, 1);
        alt.addProduction(Asn1Constants.TYPE, 1, 1);
        pattern.addAlternative(alt);
        addPattern(pattern);

        pattern = new ProductionPattern(Asn1Constants.OPTIONAL_OR_DEFAULT_ELEMENT,
                                        "OptionalOrDefaultElement");
View Full Code Here

        alt.addToken(Asn1Constants.OPTIONAL, 1, 1);
        pattern.addAlternative(alt);
        alt = new ProductionPatternAlternative();
        alt.addToken(Asn1Constants.DEFAULT, 1, 1);
        alt.addToken(Asn1Constants.IDENTIFIER_STRING, 0, 1);
        alt.addProduction(Asn1Constants.VALUE, 1, 1);
        pattern.addAlternative(alt);
        addPattern(pattern);

        pattern = new ProductionPattern(Asn1Constants.VALUE_OR_CONSTRAINT_LIST,
                                        "ValueOrConstraintList");
View Full Code Here

        addPattern(pattern);

        pattern = new ProductionPattern(Asn1Constants.VALUE_OR_CONSTRAINT_LIST,
                                        "ValueOrConstraintList");
        alt = new ProductionPatternAlternative();
        alt.addProduction(Asn1Constants.NAMED_NUMBER_LIST, 1, 1);
        pattern.addAlternative(alt);
        alt = new ProductionPatternAlternative();
        alt.addProduction(Asn1Constants.CONSTRAINT_LIST, 1, 1);
        pattern.addAlternative(alt);
        addPattern(pattern);
View Full Code Here

                                        "ValueOrConstraintList");
        alt = new ProductionPatternAlternative();
        alt.addProduction(Asn1Constants.NAMED_NUMBER_LIST, 1, 1);
        pattern.addAlternative(alt);
        alt = new ProductionPatternAlternative();
        alt.addProduction(Asn1Constants.CONSTRAINT_LIST, 1, 1);
        pattern.addAlternative(alt);
        addPattern(pattern);

        pattern = new ProductionPattern(Asn1Constants.NAMED_NUMBER_LIST,
                                        "NamedNumberList");
View Full Code Here

        pattern = new ProductionPattern(Asn1Constants.NAMED_NUMBER_LIST,
                                        "NamedNumberList");
        alt = new ProductionPatternAlternative();
        alt.addToken(Asn1Constants.LEFT_BRACE, 1, 1);
        alt.addProduction(Asn1Constants.NAMED_NUMBER, 1, 1);
        alt.addProduction(SUBPRODUCTION_3, 0, -1);
        alt.addToken(Asn1Constants.RIGHT_BRACE, 1, 1);
        pattern.addAlternative(alt);
        addPattern(pattern);
View Full Code Here

        pattern = new ProductionPattern(Asn1Constants.NAMED_NUMBER_LIST,
                                        "NamedNumberList");
        alt = new ProductionPatternAlternative();
        alt.addToken(Asn1Constants.LEFT_BRACE, 1, 1);
        alt.addProduction(Asn1Constants.NAMED_NUMBER, 1, 1);
        alt.addProduction(SUBPRODUCTION_3, 0, -1);
        alt.addToken(Asn1Constants.RIGHT_BRACE, 1, 1);
        pattern.addAlternative(alt);
        addPattern(pattern);

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

        pattern = new ProductionPattern(Asn1Constants.NAMED_NUMBER,
                                        "NamedNumber");
        alt = new ProductionPatternAlternative();
        alt.addToken(Asn1Constants.IDENTIFIER_STRING, 1, 1);
        alt.addToken(Asn1Constants.LEFT_PAREN, 1, 1);
        alt.addProduction(Asn1Constants.NUMBER, 1, 1);
        alt.addToken(Asn1Constants.RIGHT_PAREN, 1, 1);
        pattern.addAlternative(alt);
        addPattern(pattern);

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

        addPattern(pattern);

        pattern = new ProductionPattern(Asn1Constants.NUMBER,
                                        "Number");
        alt = new ProductionPatternAlternative();
        alt.addProduction(Asn1Constants.NUMBER_VALUE, 1, 1);
        pattern.addAlternative(alt);
        alt = new ProductionPatternAlternative();
        alt.addProduction(Asn1Constants.BINARY_VALUE, 1, 1);
        pattern.addAlternative(alt);
        alt = new ProductionPatternAlternative();
View Full Code Here

                                        "Number");
        alt = new ProductionPatternAlternative();
        alt.addProduction(Asn1Constants.NUMBER_VALUE, 1, 1);
        pattern.addAlternative(alt);
        alt = new ProductionPatternAlternative();
        alt.addProduction(Asn1Constants.BINARY_VALUE, 1, 1);
        pattern.addAlternative(alt);
        alt = new ProductionPatternAlternative();
        alt.addProduction(Asn1Constants.HEXADECIMAL_VALUE, 1, 1);
        pattern.addAlternative(alt);
        alt = new ProductionPatternAlternative();
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.