// Path: src/main/java/org/smallibs/suitcase/utils/Pair.java
// public class Pair<T1, T2> {
// 
//     public final T1 _1;
//     public final T2 _2;
// 
//     public Pair(T1 _1, T2 _2) {
//         this._1 = _1;
//         this._2 = _2;
//     }
// }


import org.smallibs.suitcase.utils.Pair;
import java.io.IOException;
import java.util.Optional;
            final Optional<? extends Token<?>> recognize = token.recognize(sequence);
            if (recognize.isPresent()) {
                this.sequence.commit(recognize.get().length());
                return recognize.get();
            }
        }

        throw new UnexpectedCharException(sequence.index, sequence.charAt(0));
    }

    public boolean isEmpty() {
        performSkip();
        return sequence.length() == 0;
    }

    private void performSkip() {
        boolean skipped;
        do {
            skipped = false;
            for (Tokenizer<?> token : lexer.getSkipped()) {
                final Optional<? extends Token<?>> recognize = token.recognize(sequence);
                if (recognize.isPresent()) {
                    this.sequence.commit(recognize.get().length());
                    skipped = true;
                    break;
                }
            }
        } while (skipped);
    }

// Path: src/main/java/org/smallibs/suitcase/utils/Pair.java
// public class Pair<T1, T2> {
// 
//     public final T1 _1;
//     public final T2 _2;
// 
//     public Pair(T1 _1, T2 _2) {
//         this._1 = _1;
//         this._2 = _2;
//     }
// }


// Path: src/main/java/org/smallibs/suitcase/cases/genlex/TokenStream.java
import org.smallibs.suitcase.utils.Pair;
import java.io.IOException;
import java.util.Optional;

            final Optional<? extends Token<?>> recognize = token.recognize(sequence);
            if (recognize.isPresent()) {
                this.sequence.commit(recognize.get().length());
                return recognize.get();
            }
        }

        throw new UnexpectedCharException(sequence.index, sequence.charAt(0));
    }

    public boolean isEmpty() {
        performSkip();
        return sequence.length() == 0;
    }

    private void performSkip() {
        boolean skipped;
        do {
            skipped = false;
            for (Tokenizer<?> token : lexer.getSkipped()) {
                final Optional<? extends Token<?>> recognize = token.recognize(sequence);
                if (recognize.isPresent()) {
                    this.sequence.commit(recognize.get().length());
                    skipped = true;
                    break;
                }
            }
        } while (skipped);
    }

    public Pair<TokenStream, Lexer> setLexer(Lexer lexer) {