| Home | Trees | Indices | Help |
|---|
|
|
Base class for states in the parser (called Builder rather than State to avoid confusion with the parser state).
The parser can be though of as a state machine, implemented via a separate
loop (parse()) that repeatedly calls .append_character() on the current
state, using whatever is returned as the next state.
The graph is assembled within the states, which either assemble locally or extend the state in a "parent" state (so states may reference parent states, but the evaluation process remains just a single level deep).
It is also possible for one state to delegate to the append_character method of another state (escapes are handled in this way, for example).
After all characters have been parsed, None is used as a final character
to flush any state that is waiting for lookahead.
|
|||
|
|||
|
|||
|
Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
|
Accept the given character, returning a new builder. A value of None is passed at the end of the input, allowing cleanup. If escaped is true then the value is always treated as a literal. |
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Tue Jun 29 03:38:26 2010 | http://epydoc.sourceforge.net |