Package rxpy :: Package engine :: Module base :: Class BaseEngine
[hide private]
[frames] | no frames]

Class BaseEngine

source code


Instance Methods [hide private]
 
__init__(self, parser_state, graph)
Create an engine instance.
source code
 
run(self, text, pos=0, search=False)
Search or match the given text.
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, parser_state, graph)
(Constructor)

source code 

Create an engine instance.

  • parser_state is an instance of ParserState and contains things like alphabet and flags.
  • graph is the entry node into a graph of opcodes
Overrides: object.__init__

run(self, text, pos=0, search=False)

source code 

Search or match the given text.

  • text is the input to match (terminated appropriately)
  • pos is the initial position to start matching at
  • search is True if characters (from pos on) can be discarded while searching for a match; if False the match must start at text[pos].

A Groups instance should be returned.