| Home | Trees | Index | Help |
|
|---|
| Package yagdoc :: Module parser :: Class Parser |
|
object --+
|
Parser
Token soup parser.
Attributes are only available afterparse.
| Method Summary | |
|---|---|
__init__(self)
| |
Define identifiers that produce special tokens. | |
Parse token soup into code statements. | |
rectify_tokens(self,
srctokens,
srcranges)
| |
Inherited from object:
__delattr__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__str__
| |
| Instance Variable Summary | |
|---|---|
list of ParserError |
errors: Errors encountered. |
ranges: Dictionary of special ranges, the same as tokenizer.Tokenizer.ranges, but with
positions recalculated for tokens. | |
str |
source: Equal to tokenizer.Tokenizer.source instance
variable. |
list of tokenizer.Token |
tokens: Rectified token soup, this is what is actually parsed instead of what
we obtained from the tokenizer. |
tree: Parse tree in simpleparser.parser form. | |
| Method Details |
|---|
add_keywords(self, typ, *words)Define identifiers that produce special tokens.
|
parse(self, tokenizer)Parse token soup into code statements. After parser() finishes, tokenizer's data is no longer needed and can be used for something else without breaking the parser state.
|
| Instance Variable Details |
|---|
errorsErrors encountered.
|
rangesDictionary of special ranges, the same astokenizer.Tokenizer.ranges, but with
positions recalculated for tokens.
|
sourceEqual totokenizer.Tokenizer.source instance
variable.
|
tokensRectified token soup, this is what is actually parsed instead of what we obtained from the tokenizer.
|
treeParse tree insimpleparser.parser form. Position
references are to the token soup.
|
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Fri Oct 5 00:36:53 2007 | http://epydoc.sf.net |