src/main/java/ca/gobits/bnf/parser/BNFParserImpl.java
private void rewindToNextSymbolOrRepetition() {
        while (!this.stack.isEmpty()) {
            BNFParserState holder = this.stack.peek();

            if (holder.getRepetition() == BNFRepetition.ZERO_OR_MORE && holder.isComplete()) {
                holder.reset();
                if (holder.getRepetition() != BNFRepetition.NONE) {
                    holder.setParserRepetition(BNFParserRepetition.ZERO_OR_MORE_LOOKING_FOR_FIRST_MATCH);
                }
                break;
            } else if (holder.isSequence() && !holder.isComplete()) {
                if (holder.getParserRepetition() == BNFParserRepetition.ZERO_OR_MORE_LOOKING_FOR_FIRST_MATCH) {
                    holder.setParserRepetition(BNFParserRepetition.NONE);
                }

                break;
            }

            this.stack.pop();
        }
    }
/**
     * Rewinds to next incomplete sequence or to ZERO_OR_MORE repetition which
     * ever one is first.
     */
Rewinds to next incomplete sequence or to ZERO_OR_MORE repetition which
ever one is first.
Rewinds to next incomplete sequence or to ZERO_OR_MORE repetition which ever one is first .
private void rewindToNextSymbolOrRepetition() {
        while (!this.stack.isEmpty()) {
            BNFParserState holder = this.stack.peek();
            if (holder.getRepetition() == BNFRepetition.ZERO_OR_MORE && holder.isComplete()) {
                holder.reset();
                if (holder.getRepetition() != BNFRepetition.NONE) {
                    holder.setParserRepetition(BNFParserRepetition.ZERO_OR_MORE_LOOKING_FOR_FIRST_MATCH);
                }
                break;
            } else if (holder.isSequence() && !holder.isComplete()) {
                if (holder.getParserRepetition() == BNFParserRepetition.ZERO_OR_MORE_LOOKING_FOR_FIRST_MATCH) {
                    holder.setParserRepetition(BNFParserRepetition.NONE);
                }
                break;
            }
            this.stack.pop();
        }
    }
private void rewindToNextSymbolOrRepetition ( ) { while ( ! this . stack . isEmpty ( ) ) { BNFParserState holder = this . stack . peek ( ) ; if ( holder . getRepetition ( ) == BNFRepetition . ZERO_OR_MORE && holder . isComplete ( ) ) { holder . reset ( ) ; if ( holder . getRepetition ( ) != BNFRepetition . NONE ) { holder . setParserRepetition ( BNFParserRepetition . ZERO_OR_MORE_LOOKING_FOR_FIRST_MATCH ) ; } break ; } else if ( holder . isSequence ( ) && ! holder . isComplete ( ) ) { if ( holder . getParserRepetition ( ) == BNFParserRepetition . ZERO_OR_MORE_LOOKING_FOR_FIRST_MATCH ) { holder . setParserRepetition ( BNFParserRepetition . NONE ) ; } break ; } this . stack . pop ( ) ; } }
Rewinds to next incomplete sequence or to ZERO_OR_MORE repetition which
 ever one is first.
Rewinds to next incomplete sequence or to ZERO_OR_MORE repetition which ever one is first .