|
list | __all__ = [ "NEWLINE", "HEX", "NON_ASCII", "UNICODE", "ESCAPE", "NMSTART", "NMCHAR", "STRING1", "STRING2", "IDENT", "NAME", "HASH", "NUM", "STRING", "URL", "SPACE", "WHITESPACE", "COMMENT", "QUANTITY", "PUNC" ] |
|
list | __author__ |
|
string | COMMENT = r'/\*[^*]*\*+([^/*][^*]*\*+)*/' |
|
string | ESCAPE = r'(?:' + UNICODE + r'|\\[^\r\n\f0-9a-f])' |
|
string | HASH = r'#' + NAME |
|
string | HEX = r'[0-9a-f]' |
|
string | IDENT = r'-?' + NMSTART + NMCHAR + '*' |
|
string | KEYWORD = r'(?:\@(?:import|page|media|charset))' |
|
string | NAME = NMCHAR + r'+' |
|
string | NEWLINE = r'\n|\r\n|\r|\f' |
|
string | NMCHAR = r'(?:[_a-z0-9-]|' + NON_ASCII + r'|' + ESCAPE + r')' |
|
string | NMSTART = r'(?:[_a-z]|' + NON_ASCII + r'|' + ESCAPE + r')' |
|
string | NON_ASCII = r'[\200-\377]' |
|
string | NUM = r'(?:[0-9]*\.[0-9]+|[0-9]+)' |
|
string | PUNC = r'<!--|-->|~=|\|=|[\{\+>,:;]' |
|
string | QUANTITY = '%s(?:%s%s|%s)?' % (NUM, WHITESPACE, UNIT, IDENT) |
|
string | SPACE = r'[ \t\r\n\f]' |
|
string | STRING = '(?:' + STRING1 + r'|' + STRING2 + ')' |
|
string | STRING1 = r'"(?:[^\"\\]|\\.)*"' |
|
string | STRING2 = r"'(?:[^\'\\]|\\.)*'" |
|
string | UNICODE = r'(?:(?:\\' + HEX + r'{1,6})(?:\r\n|[ \t\r\n\f])?)' |
|
string | UNIT = r'(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)' |
|
string | URL = r'url\(%s(%s|%s)%s\)' % (WHITESPACE, STRING, URL_CHARS, WHITESPACE) |
|
string | URL_CHARS = r'(?:%s|%s|%s)*' % (URL_SPECIAL_CHARS, NON_ASCII, ESCAPE) |
|
string | URL_SPECIAL_CHARS = r'[!#$%&*-~]' |
|
string | WHITESPACE = '(?:' + SPACE + r'*)' |
|