Package org.parboiled.errors

Examples of org.parboiled.errors.GrammarException


        }
    }

    @Override
    public Rule suppressNode() {
        throw new GrammarException("Actions cannot be marked with @SuppressNode or @SuppressSubnodes");
    }
View Full Code Here


        // collect all further matches as well
        int lastIndex = context.getCurrentIndex();
        while (subMatcher.getSubContext(context).runMatcher()) {
            int currentIndex = context.getCurrentIndex();
            if (currentIndex == lastIndex) {
                throw new GrammarException("The inner rule of OneOrMore rule '%s' must not allow empty matches",
                        context.getPath());
            }
            lastIndex = currentIndex;
        }
View Full Code Here

    public boolean match(@NotNull MatcherContext context) {
        int lastIndex = context.getCurrentIndex();
        while (subMatcher.getSubContext(context).runMatcher()) {
            int currentLocation = context.getCurrentIndex();
            if (currentLocation == lastIndex) {
                throw new GrammarException("The inner rule of ZeroOrMore rule '%s' must not allow empty matches",
                        context.getPath());
            }
            lastIndex = currentLocation;
        }
View Full Code Here

TOP

Related Classes of org.parboiled.errors.GrammarException

Copyright © 2018 www.massapicom. 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.