Consume a string of  and advance the state as necessary.
775517
def process(self, chars):
        

        while len(chars) > 0:
            self.consume(chars[0])
            chars = chars[1:]
398055
public void consumeUntil(Parser recognizer, IntervalSet follow, CSSLexerState.RecoveryMode mode, CSSLexerState ls) {
        CSSToken t;
        boolean finish;
        TokenStream input = recognizer.getInputStream();
        do {
            Token next = input.LT(1);
            if (next instanceof CSSToken) {
                t = (CSSToken) input.LT(1);
                if (t.getType() == Token.EOF) {
                    logger.trace("token eof ");
                    break;
                }
            } else
                break; /* not a CSSToken, probably EOF */
            // consume token if does not match
            finish = (t.getLexerState().isBalanced(mode, ls, t) && follow.contains(t.getType()));
            if (!finish) {
                logger.trace("Skipped: {}", t);
                input.consume();
            }
        } while (!finish);
    }
429220
private void consume() {
    curCharIndex++;
    curChar = (curCharIndex == pattern.length()) ? EOF : pattern.charAt(curCharIndex);
  }
822036
private JsonToken advance() throws IOException {
        peek();

        JsonToken result = token;
        token = null;
        value = null;
        name = null;
        return result;
    }
281315
def consume_file(self, filename):
        """"""
        with screed.open(filename) as sequences:
            for seq in sequences:
                self.consume(seq['sequence'])
424255
function chain(stream, state, parser) {
        state.tokenize = parser;
        return parser(stream, state);
    }
218288
def consume(iterator: Iterator[T], n: Optional[int] = None) -> None:
    """"""
    # Use functions that consume iterators at C speed.
    if n is None:
        # feed the entire iterator into a zero-length deque
        collections.deque(iterator, maxlen=0)
    else:
        # advance to the empty slice starting at position n
        next(itertools.islice(iterator, n, n), None)
1034605
def advance(parser):
    # type: (Parser) -> None
    """"""
    prev_end = parser.token.end
    parser.prev_end = prev_end
    parser.token = parser.lexer.next_token(prev_end)
870467
def _advance(self):
        
        cur_val = None if self.cur_token is None else self.cur_token.value
        try:
            self.cur_token = next(self._tokenizer)
        except StopIteration:
            self.cur_token = None
        return cur_val
1164228
def process (self, c):
        """"""
        if isinstance(c, bytes):
            c = self._decode(c)
        self.state.process(c)
1269642
def _coerce_state_from_string(value: Union[int, str]) -> str:
        """"""
        try:
            return STATE_MAP[int(value)]
        except KeyError:
            _LOGGER.error('Unknown state: %s', value)
            return STATE_UNKNOWN
659572
def advance(self):
        """"""
        self.cursor += 1
        if self.cursor >= len(self.raw):
            self.char = None
        else:
            self.char = self.raw[self.cursor]
807781
function advance(id, t) {
    switch (state.tokens.curr.id) {
    case "(number)":
      if (state.tokens.next.id === ".") {
        warning("W005", state.tokens.curr);
      }
      break;
    case "-":
      if (state.tokens.next.id === "-" || state.tokens.next.id === "--") {
        warning("W006");
      }
      break;
    case "+":
      if (state.tokens.next.id === "+" || state.tokens.next.id === "++") {
        warning("W007");
      }
      break;
    }

    if (state.tokens.curr.type === "(string)" || state.tokens.curr.identifier) {
      anonname = state.tokens.curr.value;
    }

    if (id && state.tokens.next.id !== id) {
      if (t) {
        if (state.tokens.next.id === "(end)") {
          error("E019", t, t.id);
        } else {
          error("E020", state.tokens.next, id, t.id, t.line, state.tokens.next.value);
        }
      } else if (state.tokens.next.type !== "(identifier)" || state.tokens.next.value !== id) {
        warning("W116", state.tokens.next, id, state.tokens.next.value);
      }
    }

    state.tokens.prev = state.tokens.curr;
    state.tokens.curr = state.tokens.next;
    for (;;) {
      state.tokens.next = lookahead.shift() || lex.token();

      if (!state.tokens.next) { // No more tokens left, give up
        quit("E041", state.tokens.curr.line);
      }

      if (state.tokens.next.id === "(end)" || state.tokens.next.id === "(error)") {
        return;
      }

      if (state.tokens.next.check) {
        state.tokens.next.check();
      }

      if (state.tokens.next.isSpecial) {
        doOption();
      } else {
        if (state.tokens.next.id !== "(endline)") {
          break;
        }
      }
    }
  }
235961
public void consumeUntilGreedy(Parser recognizer, IntervalSet follow, CSSLexerState.RecoveryMode mode, CSSLexerState ls) {
        consumeUntil(recognizer, follow, mode, ls);
        recognizer.getInputStream().consume();
    }
50407
public String consumeTo(String seq) {
        int offset = queue.indexOf(seq, pos);
        if (offset != -1) {
            String consumed = queue.substring(pos, offset);
            pos += consumed.length();
            return consumed;
        } else {
            return remainder();
        }
    }
676240
private State nextState(State currentState, int i) {
        switch (currentState) {
            case FREE_TEXT:
                return jumpFromFreeText(str, i);
            case PARAM_START:
                return jumpFromParamStart(str, i);
            case PARAM:
                return jumpFromParam(str, i);
            case PARAM_END:
                return jumpFromParamEnd(str, i);
            case ESCAPE_CHAR:
                return State.FREE_TEXT;
            // Should never go here
            default:
                throw UncheckedTemplateException.invalidStateException(currentState);
        }
    }
371982
def repeat_str(state):
    """"""
    if state == const.REPEAT_STATE_OFF:
        return 'Off'
    if state == const.REPEAT_STATE_TRACK:
        return 'Track'
    if state == const.REPEAT_STATE_ALL:
        return 'All'
    return 'Unsupported'