def _parse_tokens(self, tokens, i, actions=True):
    start_i = i
    tokens_length = len(tokens)
    while (i <= tokens_length):
        try:
            self.expr.parse(tokens, i, actions=False)
            results = [E(safe_name(t[1]), t[0]) for t in tokens[start_i:i]]
            if self.include:
                (match_result, i) = self.expr.parse(tokens, i, actions)
                if match_result:
                    results.extend(match_result)
            return (results, i)
        except (ParseException, IndexError):
            i += 1
    raise ParseException(tokens, i, '', self)
def _parse_tokens(self, tokens, i, actions=True):
    start_i = i
    tokens_length = len(tokens)
    while (i <= tokens_length):
        try:
            self.expr.parse(tokens, i, actions=False)
            results = [E(safe_name(t[1]), t[0]) for t in tokens[start_i:i]]
            if self.include:
                (match_result, i) = self.expr.parse(tokens, i, actions)
                if match_result:
                    results.extend(match_result)
            return (results, i)
        except (ParseException, IndexError):
            i += 1
    raise ParseException(tokens, i, , self)