| Home | Trees | Indices | Help |
|---|
|
|
Given a graph this constructs a transition table and an associated matcher. The matcher attempts to find longest matches but does not guarantee termination (if a possible empty match is repeated).
Note that the matcher returns a triple, including label. This is not the same interface as the matchers used in recursive descent parsing.
Evaluation order for transition: - Transition with character, if defined - Empty transition to largest numbered node these ensure we do deepest match first.
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
|
Use the table to match a stream.
The stack holds the current state, which is consumed from left to
right. An entry on the stack contains:
- map_ - a map from character to [(dest state, terminals)]
- matched - the [(dest state, terminals)] generated by the map for
a given character
- empties - empty transitions for this state
- match - the current match, as a list of tokens consumed from the
stream
- stream - the current stream
|
|
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Sat Jun 9 21:50:57 2012 | http://epydoc.sourceforge.net |