Module pyparsing :: Class ParseResults
[frames | no frames]

Type ParseResults

object --+
         |
        ParseResults


Structured parse results, to provide multiple means of access to the parsed data:
Method Summary
  __init__(self, toklist, name, asList, modal)
  __contains__(self, k)
  __delitem__(self, i)
  __getattr__(self, name)
  __getitem__(self, i)
  __iadd__(self, other)
  __iter__(self)
  __len__(self)
  __new__(cls, toklist, name, asList, modal)
(Static method)
  __repr__(self)
  __setitem__(self, k, v)
  __str__(self)
  asDict(self)
Returns the named parse results as dictionary.
  asList(self)
Returns the parse results as a nested list of matching tokens, all converted to strings.
  asXML(self, doctag, namedItemsOnly, indent, formatted)
Returns the parse results as XML.
  copy(self)
Returns a new copy of a ParseResults object.
  getName(self)
Returns the results name for this token expression.
  items(self)
Returns all named result keys and values as a list of tuples.
  keys(self)
Returns all named result keys.
  values(self)
Returns all named result values.
Inherited from object: __delattr__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __setattr__

Class Variable Summary
tuple __slots__ = ('__toklist', '__tokdict', '__doinit', '__na...

Instance Method Details

asDict(self)

Returns the named parse results as dictionary.

asList(self)

Returns the parse results as a nested list of matching tokens, all converted to strings.

asXML(self, doctag=None, namedItemsOnly=False, indent='', formatted=True)

Returns the parse results as XML. Tags are created for tokens and lists that have defined results names.

copy(self)

Returns a new copy of a ParseResults object.

getName(self)

Returns the results name for this token expression.

items(self)

Returns all named result keys and values as a list of tuples.

keys(self)

Returns all named result keys.

values(self)

Returns all named result values.

Class Variable Details

__slots__

Type:
tuple
Value:
('__toklist', '__tokdict', '__doinit', '__name', '__parent', '__modal'\
)                                                                      

Generated by Epydoc 2.1 on Sun Jun 12 22:30:07 2005 http://epydoc.sf.net