class documentation

Metaclass for RegexLexer, creates the self._tokens attribute from self.tokens on the first instantiation.

Method __call__ Instantiate cls after preprocessing its token definitions.
Method get_tokendefs Merge tokens from superclasses in MRO order, returning a single tokendef dictionary.
Method process_tokendef Preprocess a dictionary of token definitions.
Method _process_new_state Preprocess the state transition action of a token definition.
Method _process_regex Preprocess the regular expression component of a token definition.
Method _process_state Preprocess a single state definition.
Method _process_token Preprocess the token component of a token definition.

Inherited from LexerMeta:

Method __new__ Undocumented
def __call__(cls, *args, **kwds): (source)

Instantiate cls after preprocessing its token definitions.

def get_tokendefs(cls): (source)

Merge tokens from superclasses in MRO order, returning a single tokendef dictionary. Any state that is not defined by a subclass will be inherited automatically. States that *are* defined by subclasses will, by default, override that state in the superclass. If a subclass wishes to inherit definitions from a superclass, it can use the special value "inherit", which will cause the superclass' state definition to be included at that point in the state.

def process_tokendef(cls, name, tokendefs=None): (source)

Preprocess a dictionary of token definitions.

def _process_new_state(cls, new_state, unprocessed, processed): (source)

Preprocess the state transition action of a token definition.

def _process_regex(cls, regex, rflags, state): (source)

Preprocess the regular expression component of a token definition.

def _process_state(cls, unprocessed, processed, state): (source)

Preprocess a single state definition.

def _process_token(cls, token): (source)

Preprocess the token component of a token definition.