Package cssutils :: Module token :: Class Tokenre
[hide private]
[frames] | no frames]

Class Tokenre

source code

object --+
         |
        Tokenre

regexes for CSS tokens, on initialization all attributes will be compiled to re.match objects

Instance Methods [hide private]
 
__init__(self)
compile class attribute values to re.match objects
source code
 
_expand_macros(self, tokdict)
Expand macros in token dictionary
source code
 
_compile_regexes(self, tokdict)
Compile all regular expressions into callable objects
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]
  DIMENSION = '{num}{ident}'
  HASH = '#{name}'
  URI = u'url\\({w}{string}{w}\\)|url\\({w}{url}{w}\\)'
  atkeyword = '^@[-]?{nmstart}{nmchar}*'
  ident = '[-]?{nmstart}{nmchar}*'
  name = '{nmchar}+'
  nmstart = '[_a-z]|{nonascii}|{escape}'
  nonascii = '[^\\0-\\177]'
  unicode = '\\\\[0-9a-f]{1,6}(\\r\\n|[ \\n\\r\\t\\f])?'
  escape = '{unicode}|\\\\[ -~\\200-\\777]'
  int = '[-]?\\d+'
  nmchar = '[\\w-]|{nonascii}|{escape}'
  num = '[-]?\\d+|\\d*\\.\\d+'
  number = '{num}'
  string = '{string1}|{string2}'
  string1 = '"(\\\\\\"|[^\\"])*"'
  string2 = '\'(\\\\\\\'|[^\\\'])*\''
  url = u'([!#$%&*-~]|{nonascii}|{escape})*'
  nl = '\\n|\\r\\n|\\r|\\f'
  w = '\\s*'
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 
compile class attribute values to re.match objects
Overrides: object.__init__