home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyc (Python 2.6)
-
- __all__ = [
- 'CSSProductions',
- 'MACROS',
- 'PRODUCTIONS']
- __docformat__ = 'restructuredtext'
- __version__ = '$Id: cssproductions.py 1855 2009-10-07 17:03:19Z cthedot $'
- MACROS = {
- 'nonascii': '[^\\0-\\177]',
- 'unicode': '\\\\[0-9A-Fa-f]{1,6}(?:{nl}|{s})?',
- 'escape': '{unicode}|\\\\[^\\n\\r\\f0-9a-f]',
- 'nmstart': '[_a-zA-Z]|{nonascii}|{escape}',
- 'nmchar': '[-_a-zA-Z0-9]|{nonascii}|{escape}',
- 'string1': '"([^\\n\\r\\f\\\\"]|\\\\{nl}|{escape})*"',
- 'string2': "'([^\\n\\r\\f\\\\']|\\\\{nl}|{escape})*'",
- 'invalid1': '\\"([^\\n\\r\\f\\\\"]|\\\\{nl}|{escape})*',
- 'invalid2': "\\'([^\\n\\r\\f\\\\']|\\\\{nl}|{escape})*",
- 'comment': '\\/\\*[^*]*\\*+([^/][^*]*\\*+)*\\/',
- 'ident': '[-]?{nmstart}{nmchar}*',
- 'name': '{nmchar}+',
- 'num': '[0-9]*\\.[0-9]+|[0-9]+',
- 'string': '{string1}|{string2}',
- 'invalid': '{invalid1}|{invalid2}',
- 'url': '[\\x09\\x21\\x23-\\x26\\x28\\x2a-\\x7E]|{nonascii}|{escape}',
- 's': '\\t|\\r|\\n|\\f|\\x20',
- 'w': '{s}*',
- 'nl': '\\n|\\r\\n|\\r|\\f',
- 'A': 'A|a|\\\\0{0,4}(?:41|61)(?:\\r\\n|[ \\t\\r\\n\\f])?',
- 'B': 'B|b|\\\\0{0,4}(?:42|62)(?:\\r\\n|[ \\t\\r\\n\\f])?',
- 'C': 'C|c|\\\\0{0,4}(?:43|63)(?:\\r\\n|[ \\t\\r\\n\\f])?',
- 'D': 'D|d|\\\\0{0,4}(?:44|64)(?:\\r\\n|[ \\t\\r\\n\\f])?',
- 'E': 'E|e|\\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\\r\\n|[ \\t\\r\\n\\f])?|\\\\V|\\\\v',
- 'X': 'X|x|\\\\0{0,4}(?:58|78)(?:\\r\\n|[ \\t\\r\\n\\f])?|\\\\X|\\\\x',
- 'Z': 'Z|z|\\\\0{0,4}(?:5a|7a)(?:\\r\\n|[ \\t\\r\\n\\f])?|\\\\Z|\\\\z' }
- PRODUCTIONS = [
- ('BOM', '\\xFEFF'),
- ('S', '{s}+'),
- ('URI', '{U}{R}{L}\\({w}({string}|{url}*){w}\\)'),
- ('FUNCTION', '{ident}\\('),
- ('UNICODE-RANGE', '{U}\\+[0-9A-Fa-f?]{1,6}(\\-[0-9A-Fa-f]{1,6})?'),
- ('IDENT', '{ident}'),
- ('STRING', '{string}'),
- ('INVALID', '{invalid}'),
- ('HASH', '\\#{name}'),
- ('PERCENTAGE', '{num}\\%'),
- ('DIMENSION', '{num}{ident}'),
- ('NUMBER', '{num}'),
- ('COMMENT', '{comment}'),
- ('ATKEYWORD', '@{ident}'),
- ('CDO', '\\<\\!\\-\\-'),
- ('CDC', '\\-\\-\\>'),
- ('INCLUDES', '\\~\\='),
- ('DASHMATCH', '\\|\\='),
- ('PREFIXMATCH', '\\^\\='),
- ('SUFFIXMATCH', '\\$\\='),
- ('SUBSTRINGMATCH', '\\*\\='),
- ('CHAR', '[^"\\\']')]
-
- class CSSProductions(object):
- EOF = True
- CHARSET_SYM = 'CHARSET_SYM'
- FONT_FACE_SYM = 'FONT_FACE_SYM'
- MEDIA_SYM = 'MEDIA_SYM'
- IMPORT_SYM = 'IMPORT_SYM'
- NAMESPACE_SYM = 'NAMESPACE_SYM'
- PAGE_SYM = 'PAGE_SYM'
- VARIABLES_SYM = 'VARIABLES_SYM'
-
- for i, t in enumerate(PRODUCTIONS):
- setattr(CSSProductions, t[0].replace('-', '_'), t[0])
-
- _DXImageTransform = ('FUNCTION', 'progid\\:DXImageTransform\\.Microsoft\\..+\\(')
-