public virtual void match(BitSet b) { if (!b.member(cached_LA1)) { throw new MismatchedCharException(cached_LA1, b, false, this); } consume(); }
/*Consume chars until one matches the given set */ public virtual void consumeUntil(BitSet bset) { while (cached_LA1 != EOF_CHAR && !bset.member(cached_LA1)) { consume(); } }
/*Consume tokens until one matches the given token set */ public virtual void consumeUntil(BitSet bset) { while (LA(1) != Token.EOF_TYPE && !bset.member(LA(1))) { consume(); } }
/*Make sure current lookahead symbol matches the given set * Throw an exception upon mismatch, which is catch by either the * error handler or by the syntactic predicate. */ public virtual void match(BitSet b) { if (!b.member(LA(1))) throw new MismatchedTokenException(tokenNames, LT(1), b, false, getFilename()); else consume(); }
/*Make sure current lookahead symbol matches the given set * Throw an exception upon mismatch, which is catch by either the * error handler or by the syntactic predicate. */ public virtual void match(AST t, BitSet b) { if (t == null || t == ASTNULL || !b.member(t.Type)) { throw new MismatchedTokenException(getTokenNames(), t, b, false); } }