Home | Trees | Index | Help |
|
---|
Module pyparsing :: Class ParserElement |
|
object
--+
|
ParserElement
ParseElementEnhance
,
ParseExpression
,
Token
Method Summary | |
---|---|
__init__(self,
savelist)
| |
__add__(self,
other)
| |
__invert__(self)
| |
__or__(self,
other)
| |
__radd__(self,
other)
| |
__repr__(self)
| |
__ror__(self,
other)
| |
__rxor__(self,
other)
| |
__str__(self)
| |
__xor__(self,
other)
| |
checkRecursion(self,
parseElementList)
| |
getResultsName(self)
| |
Define expression to be ignored (e.g., comments) while doing pattern matching; may be called repeatedly, to define multiple comment or other ignorable patterns. | |
leaveWhitespace(self)
| |
parse(self,
instring,
loc,
doActions)
| |
parseImpl(self,
instring,
loc,
doActions)
| |
Execute the parse expression with the given string. | |
postParse(self,
instring,
loc,
tokenlist)
| |
preParse(self,
instring,
loc)
| |
scanString(self,
instring)
| |
Enable display of debugging messages while doing pattern matching. | |
Define name for this expression, for use in debugging. | |
Define action to perform when successfully matching parse element definition. | |
Define name for referencing matching tokens as a nested attribute of the returned parse results. | |
skipIgnorables(self,
instring,
loc)
| |
streamline(self)
| |
Suppresses the output of this ParseElement; useful to keep punctuation from cluttering up returned output. | |
tryParse(self,
instring,
loc)
| |
validate(self,
validateTrace)
| |
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__
Inherited from type :
__new__
|
Method Details |
---|
ignore(self, other)Define expression to be ignored (e.g., comments) while doing pattern matching; may be called repeatedly, to define multiple comment or other ignorable patterns. |
parseString(self, instring)Execute the parse expression with the given string. This is the main interface to the client code, once the complete expression has been built. |
setDebug(self, flag=True)Enable display of debugging messages while doing pattern matching. |
setName(self, name)Define name for this expression, for use in debugging. |
setParseAction(self, fn)Define action to perform when successfully matching parse element definition. Parse action fn is a callable method with the arguments (s, loc, toks) where:
|
setResultsName(self, name)Define name for referencing matching tokens as a nested attribute of the returned parse results. NOTE: this returns a *copy* of the original ParseElement object; this is so that the client can define a basic element, such as an integer, and reference it in multiple places with different names. |
suppress(self)Suppresses the output of this ParseElement; useful to keep punctuation from cluttering up returned output. |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.0 on Sat Mar 20 09:58:33 2004 | http://epydoc.sf.net |