| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
pyparsing.ParseElementEnhance Class Reference
Inheritance diagram for pyparsing.ParseElementEnhance:
[legend]
Collaboration diagram for pyparsing.ParseElementEnhance:
[legend]

## Public Member Functions
def | __init__
def | parseImpl
def | leaveWhitespace
def | ignore
def | streamline
def | checkRecursion
def | validate
def | __str__
Public Member Functions inherited from pyparsing.ParserElement
def | setDefaultWhitespaceChars
def | __init__
def | copy
def | setName
def | setResultsName
def | setBreak
def | setParseAction
def | addParseAction
def | setFailAction
def | preParse
def | parseImpl
def | postParse
def | tryParse
def | resetCache
def | enablePackrat
def | parseString
def | scanString
def | transformString
def | searchString
def | __add__
def | __radd__
def | __sub__
def | __rsub__
def | __mul__
def | __rmul__
def | __or__
def | __ror__
def | __xor__
def | __rxor__
def | __and__
def | __rand__
def | __invert__
def | __call__
def | suppress
def | leaveWhitespace
def | setWhitespaceChars
def | parseWithTabs
def | ignore
def | setDebugActions
def | setDebug
def | __str__
def | __repr__
def | streamline
def | checkRecursion
def | validate
def | parseFile
def | getException
def | __getattr__
def | __eq__
def | __ne__
def | __hash__
def | __req__
def | __rne__

## Public Attributes
| expr
| strRepr
| mayIndexError
| mayReturnEmpty
| skipWhitespace
| saveAsList
| callPreparse
Public Attributes inherited from pyparsing.ParserElement
| parseAction
| failAction
| strRepr
| resultsName
| saveAsList
| skipWhitespace
| whiteChars
| copyDefaultWhiteChars
| mayReturnEmpty
| keepTabs
| ignoreExprs
| debug
| streamlined
| mayIndexError
| errmsg
| modalResults
| debugActions
| re
| callPreparse
| callDuringTry
| name
| myException

## Additional Inherited Members
Static Public Attributes inherited from pyparsing.ParserElement
string | DEFAULT_WHITE_CHARS " \n\t\r"
tuple | setDefaultWhitespaceChars staticmethod(setDefaultWhitespaceChars)
tuple | resetCache staticmethod(resetCache)
tuple | enablePackrat staticmethod(enablePackrat)

## Detailed Description

    Abstract subclass of ParserElement, for combining and post-processing parsed tokens.

Definition at line 2585 of file pyparsing.py.

## Constructor & Destructor Documentation

def pyparsing.ParseElementEnhance.__init__ | ( |  | self,
|  |  | expr,
|  |  | savelist = `False`
| ) |  |

Definition at line 2587 of file pyparsing.py.

2587
2588 def __init__( self, expr, savelist=False ):
2589 super(ParseElementEnhance,self).__init__(savelist)
2590 if isinstance( expr, basestring ):
2591 expr = Literal(expr)
2592 self.expr = expr
2593 self.strRepr = None
2594 if expr is not None:
2595 self.mayIndexError = expr.mayIndexError
2596 self.mayReturnEmpty = expr.mayReturnEmpty
2597 self.setWhitespaceChars( expr.whiteChars )
2598 self.skipWhitespace = expr.skipWhitespace
2599 self.saveAsList = expr.saveAsList
2600 self.callPreparse = expr.callPreparse
2601 self.ignoreExprs.extend(expr.ignoreExprs)

## Member Function Documentation

def pyparsing.ParseElementEnhance.__str__ | ( |  | self | ) |

Definition at line 2646 of file pyparsing.py.

2646
2647 def __str__( self ):
2648 try:
2649 return super(ParseElementEnhance,self).__str__()
2650 except:
2651 pass
2652
2653 if self.strRepr is None and self.expr is not None:
2654 self.strRepr = "%s:(%s)" % ( self.__class__.__name__, _ustr(self.expr) )
2655 return self.strRepr
2656

def pyparsing.ParseElementEnhance.checkRecursion | ( |  | self,
|  |  | parseElementList
| ) |  |

Definition at line 2633 of file pyparsing.py.

2633
2634 def checkRecursion( self, parseElementList ):
2635 if self in parseElementList:
2636 raise RecursiveGrammarException( parseElementList+[self] )
2637 subRecCheckList = parseElementList[:] + [ self ]
2638 if self.expr is not None:
2639 self.expr.checkRecursion( subRecCheckList )

def pyparsing.ParseElementEnhance.ignore | ( |  | self,
|  |  | other
| ) |  |

Definition at line 2615 of file pyparsing.py.

2615
2616 def ignore( self, other ):
2617 if isinstance( other, Suppress ):
2618 if other not in self.ignoreExprs:
2619 super( ParseElementEnhance, self).ignore( other )
2620 if self.expr is not None:
2621 self.expr.ignore( self.ignoreExprs[-1] )
2622 else:
2623 super( ParseElementEnhance, self).ignore( other )
2624 if self.expr is not None:
2625 self.expr.ignore( self.ignoreExprs[-1] )
2626 return self

def pyparsing.ParseElementEnhance.leaveWhitespace | ( |  | self | ) |

Definition at line 2608 of file pyparsing.py.

2608
2609 def leaveWhitespace( self ):
2610 self.skipWhitespace = False
2611 self.expr = self.expr.copy()
2612 if self.expr is not None:
2613 self.expr.leaveWhitespace()
2614 return self

def pyparsing.ParseElementEnhance.parseImpl | ( |  | self,
|  |  | instring,
|  |  | loc,
|  |  | doActions = `True`
| ) |  |

Definition at line 2602 of file pyparsing.py.

2602
2603 def parseImpl( self, instring, loc, doActions=True ):
2604 if self.expr is not None:
2605 return self.expr._parse( instring, loc, doActions, callPreParse=False )
2606 else:
2607 raise ParseException("",loc,self.errmsg,self)

def pyparsing.ParseElementEnhance.streamline | ( |  | self | ) |

Definition at line 2627 of file pyparsing.py.

2627
2628 def streamline( self ):
2629 super(ParseElementEnhance,self).streamline()
2630 if self.expr is not None:
2631 self.expr.streamline()
2632 return self

def pyparsing.ParseElementEnhance.validate | ( |  | self,
|  |  | validateTrace = `[]`
| ) |  |

Definition at line 2640 of file pyparsing.py.

2640
2641 def validate( self, validateTrace=[] ):
2642 tmp = validateTrace[:]+[self]
2643 if self.expr is not None:
2644 self.expr.validate(tmp)
2645 self.checkRecursion( [] )

## Member Data Documentation

pyparsing.ParseElementEnhance.callPreparse

Definition at line 2599 of file pyparsing.py.

pyparsing.ParseElementEnhance.expr

Definition at line 2591 of file pyparsing.py.

pyparsing.ParseElementEnhance.mayIndexError

Definition at line 2594 of file pyparsing.py.

pyparsing.ParseElementEnhance.mayReturnEmpty

Definition at line 2595 of file pyparsing.py.

pyparsing.ParseElementEnhance.saveAsList

Definition at line 2598 of file pyparsing.py.

pyparsing.ParseElementEnhance.skipWhitespace

Definition at line 2597 of file pyparsing.py.

pyparsing.ParseElementEnhance.strRepr

Definition at line 2592 of file pyparsing.py.

The documentation for this class was generated from the following file:

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v25r0/cmake/cmt2cmake/pyparsing.py