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: css2productions.py 1394 2008-07-27 13:29:22Z cthedot $'
- MACROS = {
- 'h': '[0-9a-f]',
- 'nonascii': '[^\\0-\\177]',
- 'unicode': '\\\\{h}{1,6}(\\r\\n|[ \\t\\r\\n\\f])?',
- 'escape': '{unicode}|\\\\[^\\r\\n\\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': '([!#$%&*-~]|{nonascii}|{escape})*',
- 's': '[ \\t\\r\\n\\f]+',
- 'w': '{s}?',
- 'nl': '\\n|\\r\\n|\\r|\\f',
- 'range': '\\?{1,6}|{h}(\\?{0,5}|{h}(\\?{0,4}|{h}(\\?{0,3}|{h}(\\?{0,2}|{h}(\\??|{h})))))',
- 'A': 'a|\\\\0{0,4}(41|61)(\\r\\n|[ \\t\\r\\n\\f])?',
- 'C': 'c|\\\\0{0,4}(43|63)(\\r\\n|[ \\t\\r\\n\\f])?',
- 'D': 'd|\\\\0{0,4}(44|64)(\\r\\n|[ \\t\\r\\n\\f])?',
- 'E': 'e|\\\\0{0,4}(45|65)(\\r\\n|[ \\t\\r\\n\\f])?',
- 'F': 'f|\\\\0{0,4}(46|66)(\\r\\n|[ \\t\\r\\n\\f])?',
- 'G': 'g|\\\\0{0,4}(47|67)(\\r\\n|[ \\t\\r\\n\\f])?|\\\\g',
- 'H': 'h|\\\\0{0,4}(48|68)(\\r\\n|[ \\t\\r\\n\\f])?|\\\\h',
- 'I': 'i|\\\\0{0,4}(49|69)(\\r\\n|[ \\t\\r\\n\\f])?|\\\\i',
- 'K': 'k|\\\\0{0,4}(4b|6b)(\\r\\n|[ \\t\\r\\n\\f])?|\\\\k',
- 'M': 'm|\\\\0{0,4}(4d|6d)(\\r\\n|[ \\t\\r\\n\\f])?|\\\\m',
- 'N': 'n|\\\\0{0,4}(4e|6e)(\\r\\n|[ \\t\\r\\n\\f])?|\\\\n',
- 'O': 'o|\\\\0{0,4}(51|71)(\\r\\n|[ \\t\\r\\n\\f])?|\\\\o',
- 'P': 'p|\\\\0{0,4}(50|70)(\\r\\n|[ \\t\\r\\n\\f])?|\\\\p',
- 'R': 'r|\\\\0{0,4}(52|72)(\\r\\n|[ \\t\\r\\n\\f])?|\\\\r',
- 'S': 's|\\\\0{0,4}(53|73)(\\r\\n|[ \\t\\r\\n\\f])?|\\\\s',
- 'T': 't|\\\\0{0,4}(54|74)(\\r\\n|[ \\t\\r\\n\\f])?|\\\\t',
- 'X': 'x|\\\\0{0,4}(58|78)(\\r\\n|[ \\t\\r\\n\\f])?|\\\\x',
- 'Z': 'z|\\\\0{0,4}(5a|7a)(\\r\\n|[ \\t\\r\\n\\f])?|\\\\z' }
- PRODUCTIONS = [
- ('URI', 'url\\({w}{string}{w}\\)'),
- ('URI', 'url\\({w}{url}{w}\\)'),
- ('FUNCTION', '{ident}\\('),
- ('IMPORT_SYM', '@{I}{M}{P}{O}{R}{T}'),
- ('PAGE_SYM', '@{P}{A}{G}{E}'),
- ('MEDIA_SYM', '@{M}{E}{D}{I}{A}'),
- ('FONT_FACE_SYM', '@{F}{O}{N}{T}\\-{F}{A}{C}{E}'),
- ('CHARSET_SYM', '@charset '),
- ('NAMESPACE_SYM', '@{N}{A}{M}{E}{S}{P}{A}{C}{E}'),
- ('ATKEYWORD', '\\@{ident}'),
- ('IDENT', '{ident}'),
- ('STRING', '{string}'),
- ('INVALID', '{invalid}'),
- ('HASH', '\\#{name}'),
- ('PERCENTAGE', '{num}%'),
- ('LENGTH', '{num}{E}{M}'),
- ('LENGTH', '{num}{E}{X}'),
- ('LENGTH', '{num}{P}{X}'),
- ('LENGTH', '{num}{C}{M}'),
- ('LENGTH', '{num}{M}{M}'),
- ('LENGTH', '{num}{I}{N}'),
- ('LENGTH', '{num}{P}{T}'),
- ('LENGTH', '{num}{P}{C}'),
- ('ANGLE', '{num}{D}{E}{G}'),
- ('ANGLE', '{num}{R}{A}{D}'),
- ('ANGLE', '{num}{G}{R}{A}{D}'),
- ('TIME', '{num}{M}{S}'),
- ('TIME', '{num}{S}'),
- ('FREQ', '{num}{H}{Z}'),
- ('FREQ', '{num}{K}{H}{Z}'),
- ('DIMEN', '{num}{ident}'),
- ('NUMBER', '{num}'),
- ('UNICODE-RANGE', '[0-9A-F?]{1,6}(\\-[0-9A-F]{1,6})?'),
- ('CDO', '\\<\\!\\-\\-'),
- ('CDC', '\\-\\-\\>'),
- ('S', '{s}'),
- ('INCLUDES', '\\~\\='),
- ('DASHMATCH', '\\|\\='),
- ('LBRACE', '\\{'),
- ('PLUS', '\\+'),
- ('GREATER', '\\>'),
- ('COMMA', '\\,'),
- ('IMPORTANT_SYM', '\\!({w}|{comment})*{I}{M}{P}{O}{R}{T}{A}{N}{T}'),
- ('COMMENT', '\\/\\*[^*]*\\*+([^/][^*]*\\*+)*\\/'),
- ('CLASS', '\\.'),
- ('CHAR', '[^"\\\']')]
-
- class CSSProductions(object):
- pass
-
- for i, t in enumerate(PRODUCTIONS):
- setattr(CSSProductions, t[0].replace('-', '_'), t[0])
-
-