Retrieve the previous token from the command and
store it in m_token string.
436716
private final void prevToken()
  {

    if (m_queueMark > 0)
    {
      m_queueMark--;

      m_token = (String) m_ops.m_tokenQueue.elementAt(m_queueMark);
      m_tokenChar = m_token.charAt(0);
    }
    else
    {
      m_token = null;
      m_tokenChar = 0;
    }
  }
167842
def get_token(self):
        """"""
        # Generate string formatted timestamps for not_before and not_after,
        # for the lifetime specified in minutes.
        now = datetime.datetime.utcnow()
        # Start the not_before time x minutes in the past, to avoid clock skew
        # issues.
        _not_before = now - datetime.timedelta(minutes=TOKEN_SKEW)
        not_before = _not_before.strftime(TIME_FORMAT)
        # Set the not_after time in the future, by the lifetime, but ensure the
        # skew we applied to not_before is taken into account.
        _not_after = now + datetime.timedelta(
            minutes=self.token_lifetime - TOKEN_SKEW
        )
        not_after = _not_after.strftime(TIME_FORMAT)
        # Generate a json string for the encryption payload contents.
        payload = json.dumps({
            'not_before': not_before,
            'not_after': not_after
        })
        token = self._get_cached_token()
        if token:
            return token
        # Generate a base64 encoded KMS encrypted token to use for
        # authentication. We encrypt the token lifetime information as the
        # payload for verification in Confidant.
        try:
            token = self.kms_client.encrypt(
                KeyId=self.auth_key,
                Plaintext=payload,
                EncryptionContext=self.auth_context
            )['CiphertextBlob']
            token = base64.b64encode(ensure_bytes(token))
        except (ConnectionError, EndpointConnectionError) as e:
            logging.exception('Failure connecting to AWS: {}'.format(str(e)))
            raise ServiceConnectionError()
        except Exception:
            logging.exception('Failed to create auth token.')
            raise TokenGenerationError()
        self._cache_token(token, not_after)
        return token
874148
def next_token(self):
        """"""
        if self.lookahead:
            self.current_token = self.lookahead.popleft()
            return self.current_token

        self.current_token = self._parse_next_token()
        return self.current_token
177731
def next(self):
        """"""
        self.current_token = next(self.token_stream, None)
        if self.current_token is None:
            self.token_span = self.token_span[1], self.token_span[1]
            raise self.error('Unexpected end of input')
        self.token_span = self.current_token.span
        return self
84249
function process_token(token, index, tokens) {
	var last = (index === (tokens.length - 1));
	if (token[0] === "+") return process_single(token, last);
	else if (token[0] === "#") return process_multi(token, last);
	else return process_raw(token, last);
}
536171
def get_token(username, length=20, timeout=20):
    
    redis = get_redis_client()
    token = get_random_string(length)
    token_key = 'token:{}'.format(token)
    redis.set(token_key, username)
    redis.expire(token_key, timeout)
    return token
1037626
function getFirstBlockToken(token) {
      let prev;
      let first = token;

      do {
        prev = first;
        first = sourceCode.getTokenAfter(first, { includeComments: true });
      } while (isComment(first) && first.loc.start.line === prev.loc.end.line);

      return first;
    }
1144161
private KeyToken key(Token prev) {

    // Store keys as normal Strings; we don't want keys to contain spans.
    StringBuilder sb = new StringBuilder();

    // Consume the opening '{'.
    consume();
    while ((curChar >= 'a' && curChar <= 'z') || curChar == '_') {
      sb.append(curChar);
      consume();
    }

    // Consume the closing '}'.
    if (curChar != '}') {
      throw new IllegalArgumentException("Unexpected character '" + curChar
          + "'; expecting lower case a-z, '_', or '}'");
    }
    consume();

    // Disallow empty keys: {}.
    if (sb.length() == 0) {
      throw new IllegalArgumentException("Empty key: {}");
    }

    String key = sb.toString();
    keys.add(key);
    return new KeyToken(prev, key);
  }
1268032
def token(self):
        
        if self._token is None or \
           datetime.datetime.now() >= self._token_expires_on:
            result = self._getTokenArcMap()
            if 'error' in result:
                self._valid = False
                self._message = result
            else:
                self._valid = True
                self._message = "Token Generated"
        return self._token
1340387
def string_token
      if %w(' ").include?(@chunk[0])
        result = process_string @chunk[0..-1], @chunk[0]
        if @looking_for_args
          token :Argument, result.str, attrs: { quoted_by: @chunk[0] }
        else
          token :Command, result.str
        end
        result.consumed_length
      else
        did_not_match
      end
    end
181358
def get_tok(self, tok):
        '''
        
        '''
        tdata = self.tokens["{0}.get_token".format(self.opts['eauth_tokens'])](self.opts, tok)
        if not tdata:
            return {}

        rm_tok = False
        if 'expire' not in tdata:
            # invalid token, delete it!
            rm_tok = True
        if tdata.get('expire', '0') < time.time():
            rm_tok = True
        if rm_tok:
            self.rm_token(tok)

        return tdata
169246
function() {
    var captures;
    if (captures = /^([.]{1,3}|&&|\|\||[!<>=?:]=|\*\*|[-+*\/%]=?|[,=?:!~<>&\[\]])([ \t]*)/.exec(this.str)) {
      var op = captures[1];
      this.skip(captures);
      op = alias[op] || op;
      var tok = new Token(op, op);
      tok.space = captures[2];
      this.isURL = false;
      return tok;
    }
  }
1042577
private void previousSegment() {
        assert(checkDir < 0 && seq == rawSeq && pos != start);
        // The input text [pos..segmentLimit[ passes the FCD check.
        int p = pos;
        int nextCC = 0;
        for(;;) {
            // Fetch the previous character's fcd16 value.
            int q = p;
            int c = Character.codePointBefore(seq, p);
            p -= Character.charCount(c);
            int fcd16 = nfcImpl.getFCD16(c);
            int trailCC = fcd16 & 0xff;
            if(trailCC == 0 && q != pos) {
                // FCD boundary after the [p, q[ character.
                start = segmentStart = q;
                break;
            }
            if(trailCC != 0 && ((nextCC != 0 && trailCC > nextCC) ||
                                CollationFCD.isFCD16OfTibetanCompositeVowel(fcd16))) {
                // Fails FCD check. Find the previous FCD boundary and normalize.
                do {
                    q = p;
                    if(fcd16 <= 0xff || p == rawStart) { break; }
                    c = Character.codePointBefore(seq, p);
                    p -= Character.charCount(c);
                } while((fcd16 = nfcImpl.getFCD16(c)) != 0);
                normalize(q, pos);
                pos = limit;
                break;
            }
            nextCC = fcd16 >> 8;
            if(p == rawStart || nextCC == 0) {
                // FCD boundary before the following character.
                start = segmentStart = p;
                break;
            }
        }
        assert(pos != start);
        checkDir = 0;
    }
805077
def complete_command_help(self, tokens: List[str], text: str, line: str, begidx: int, endidx: int) -> List[str]:
        """"""
        for idx, token in enumerate(tokens):
            if idx >= self._token_start_index:
                if self._positional_completers:
                    # For now argparse only allows 1 sub-command group per level
                    # so this will only loop once.
                    for completers in self._positional_completers.values():
                        if token in completers:
                            return completers[token].complete_command_help(tokens, text, line, begidx, endidx)
                        else:
                            return self._cmd2_app.basic_complete(text, line, begidx, endidx, completers.keys())
        return []
522420
def get_next_token(self, length=15, **kwargs):
        
        return self.get_available_tokens(count=1,
                                         token_length=length,
                                         **kwargs)[0]
1198592
public Token lookahead() {
        Token current = token;
        if (current.next == null) {
            current.next = token_source.getNextToken();
        }
        return current.next;
    }
538870
def tokenize_command(text):
    
    if text.peek() == '\\':
        c = text.forward(1)
        tokens = set(string.punctuation + string.whitespace) - {'*'}
        while text.hasNext() and (c == '\\' or text.peek() not in tokens) and c not in MATH_TOKENS:
            c += text.forward(1)
        return c