BlockIt
blockit::external::pyparsing::ParseResults Class Reference

List of all members.

Public Member Functions

def __new__
def __init__
def __getitem__
def __setitem__
def __delitem__
def __contains__
def __len__
def __bool__
def __iter__
def __reversed__
def keys
def pop
def get
def insert
def items
def values
def __getattr__
def __add__
def __iadd__
def __repr__
def __str__
def asList
def asDict
def copy
def asXML
def getName
def dump
def __getstate__
def __setstate__
def __dir__

Private Member Functions

def _asStringList
def __lookup

Private Attributes

 __doinit
 __name
 __parent
 __accumNames
 __toklist
 __tokdict

Static Private Attributes

tuple __slots__ = ( "__toklist", "__tokdict", "__doinit", "__name", "__parent", "__accumNames", "__weakref__" )
 __nonzero__ = __bool__

Detailed Description

Structured parse results, to provide multiple means of access to the parsed data:
   - as a list (len(results))
   - by list index (results[0], results[1], etc.)
   - by attribute (results.<resultsName>)
   

Definition at line 268 of file pyparsing.py.


Constructor & Destructor Documentation

def blockit::external::pyparsing::ParseResults::__init__ (   self,
  toklist,
  name = None,
  asList = True,
  modal = True 
)

Definition at line 284 of file pyparsing.py.


Member Function Documentation

def blockit::external::pyparsing::ParseResults::__add__ (   self,
  other 
)

Definition at line 416 of file pyparsing.py.

def blockit::external::pyparsing::ParseResults::__bool__ (   self)

Definition at line 365 of file pyparsing.py.

def blockit::external::pyparsing::ParseResults::__contains__ (   self,
  k 
)

Definition at line 361 of file pyparsing.py.

def blockit::external::pyparsing::ParseResults::__delitem__ (   self,
  i 
)

Definition at line 339 of file pyparsing.py.

def blockit::external::pyparsing::ParseResults::__dir__ (   self)

Definition at line 616 of file pyparsing.py.

def blockit::external::pyparsing::ParseResults::__getattr__ (   self,
  name 
)

Definition at line 405 of file pyparsing.py.

def blockit::external::pyparsing::ParseResults::__getitem__ (   self,
  i 
)

Definition at line 317 of file pyparsing.py.

def blockit::external::pyparsing::ParseResults::__getstate__ (   self)

Definition at line 596 of file pyparsing.py.

def blockit::external::pyparsing::ParseResults::__iadd__ (   self,
  other 
)

Definition at line 421 of file pyparsing.py.

def blockit::external::pyparsing::ParseResults::__iter__ (   self)

Definition at line 367 of file pyparsing.py.

def blockit::external::pyparsing::ParseResults::__len__ (   self)

Definition at line 364 of file pyparsing.py.

def blockit::external::pyparsing::ParseResults::__lookup (   self,
  sub 
) [private]

Definition at line 547 of file pyparsing.py.

def blockit::external::pyparsing::ParseResults::__new__ (   cls,
  toklist,
  name = None,
  asList = True,
  modal = True 
)

Definition at line 275 of file pyparsing.py.

def blockit::external::pyparsing::ParseResults::__repr__ (   self)

Definition at line 438 of file pyparsing.py.

def blockit::external::pyparsing::ParseResults::__reversed__ (   self)

Definition at line 368 of file pyparsing.py.

def blockit::external::pyparsing::ParseResults::__setitem__ (   self,
  k,
  v 
)

Definition at line 326 of file pyparsing.py.

def blockit::external::pyparsing::ParseResults::__setstate__ (   self,
  state 
)

Definition at line 603 of file pyparsing.py.

def blockit::external::pyparsing::ParseResults::__str__ (   self)

Definition at line 441 of file pyparsing.py.

def blockit::external::pyparsing::ParseResults::_asStringList (   self,
  sep = '' 
) [private]

Definition at line 453 of file pyparsing.py.

def blockit::external::pyparsing::ParseResults::asDict (   self)
Returns the named parse results as dictionary.

Definition at line 474 of file pyparsing.py.

def blockit::external::pyparsing::ParseResults::asList (   self)
Returns the parse results as a nested list of matching tokens, all converted to strings.

Definition at line 464 of file pyparsing.py.

def blockit::external::pyparsing::ParseResults::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.

Definition at line 487 of file pyparsing.py.

def blockit::external::pyparsing::ParseResults::copy (   self)
Returns a new copy of a ParseResults object.

Definition at line 478 of file pyparsing.py.

def blockit::external::pyparsing::ParseResults::dump (   self,
  indent = '',
  depth = 0 
)
Diagnostic method for listing out the contents of a ParseResults.
   Accepts an optional indent argument so that this string can be embedded
   in a nested display of other data.

Definition at line 571 of file pyparsing.py.

def blockit::external::pyparsing::ParseResults::get (   self,
  key,
  defaultValue = None 
)
Returns named result matching the given key, or if there is no
   such name, then returns the given defaultValue or None if no
   defaultValue is specified.

Definition at line 380 of file pyparsing.py.

def blockit::external::pyparsing::ParseResults::getName (   self)
Returns the results name for this token expression.

Definition at line 554 of file pyparsing.py.

def blockit::external::pyparsing::ParseResults::insert (   self,
  index,
  insStr 
)

Definition at line 389 of file pyparsing.py.

def blockit::external::pyparsing::ParseResults::items (   self)
Returns all named result keys and values as a list of tuples.

Definition at line 397 of file pyparsing.py.

def blockit::external::pyparsing::ParseResults::keys (   self)
Returns all named result keys.

Definition at line 369 of file pyparsing.py.

def blockit::external::pyparsing::ParseResults::pop (   self,
  index = -1 
)
Removes and returns item at specified index (default=last).
   Will work with either numeric indices or dict-key indicies.

Definition at line 373 of file pyparsing.py.

def blockit::external::pyparsing::ParseResults::values (   self)
Returns all named result values.

Definition at line 401 of file pyparsing.py.


Member Data Documentation

Definition at line 366 of file pyparsing.py.

tuple blockit::external::pyparsing::ParseResults::__slots__ = ( "__toklist", "__tokdict", "__doinit", "__name", "__parent", "__accumNames", "__weakref__" ) [static, private]

Definition at line 274 of file pyparsing.py.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Properties