Lines Matching +full:no +full:- +full:control +full:- +full:regex
1 # -*- coding: utf-8 -*-
36 e[+\-]?(\d+_)*\d+ # exponent part
48 # Python 2, no Unicode support, use ASCII identifiers
49 name_re = re.compile(r"[a-zA-Z_][a-zA-Z0-9_]*")
112 "-": TOKEN_SUB,
142 "(%s)" % "|".join(re.escape(x) for x in sorted(operators, key=lambda x: -len(x)))
380 Use the built-in :func:`next` instead of calling this directly.
453 # Even though it looks like a no-op, creating instances fails
496 # non-whitespace between the newline and block.
511 r"(?P<raw_begin>%s(\-|\+|)\s*raw\s*(?:\-%s\s*|%s))"
519 r"(?P<%s>%s(\-|\+|))" % (n, r)
534 r"(.*?)((?:\-%s\s*|%s)%s)"
550 r"(?:\-%s\s*|%s)%s"
566 r"\-%s\s*|%s"
581 r"(.*?)((?:%s(\-|\+|))\s*endraw\s*(?:\-%s\s*|%s%s))"
646 self._normalize_newlines(value[1:-1])
648 .decode("unicode-escape")
651 msg = str(e).split(":")[-1].strip()
680 statetokens = self.rules[stack[-1]]
689 for regex, tokens, new_state in statetokens:
690 m = regex.match(source, pos)
691 # if no match we try again with the next rule
712 # text, block type, whitespace control, type, control, ...
716 # whitespace control for each type. One of the groups will be
717 # -, +, or empty string instead of None.
720 if strip_sign == "-":
758 " but no group matched" % regex
798 line_starting = m.group()[-1:] == "\n"
820 " no group matched" % regex
825 statetokens = self.rules[stack[-1]]
826 # we are still at the same position and no stack change.
831 "%r yielded empty string without stack change" % regex