| # 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
Classes | Public Member Functions | Public Attributes | List of all members
pyparsing.And Class Reference
Inheritance diagram for pyparsing.And:
[legend]
Collaboration diagram for pyparsing.And:
[legend]

## Classes
class | _ErrorStop

## Public Member Functions
def | __init__
def | parseImpl
def | __iadd__
def | checkRecursion
def | __str__
Public Member Functions inherited from pyparsing.ParseExpression
def | __init__
def | __getitem__
def | append
def | leaveWhitespace
def | ignore
def | __str__
def | streamline
def | setResultsName
def | validate
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
| mayReturnEmpty
| skipWhitespace
| callPreparse
| strRepr
Public Attributes inherited from pyparsing.ParseExpression
| exprs
| callPreparse
| strRepr
| skipWhitespace
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

    Requires all given ParseExpressions to be found in the given order.
       Expressions may be separated by whitespace.
       May be constructed using the '+' operator.

Definition at line 2311 of file pyparsing.py.

## Constructor & Destructor Documentation

def pyparsing.And.__init__ | ( |  | self,
|  |  | exprs,
|  |  | savelist = `True`
| ) |  |

Definition at line 2322 of file pyparsing.py.

2322
2323 def __init__( self, exprs, savelist = True ):
2324 super(And,self).__init__(exprs, savelist)
2325 self.mayReturnEmpty = True
2326 for e in self.exprs:
2327 if not e.mayReturnEmpty:
2328 self.mayReturnEmpty = False
2329 break
2330 self.setWhitespaceChars( exprs[0].whiteChars )
2331 self.skipWhitespace = exprs[0].skipWhitespace
2332 self.callPreparse = True

## Member Function Documentation

def pyparsing.And.__iadd__ | ( |  | self,
|  |  | other
| ) |  |

Definition at line 2357 of file pyparsing.py.

2357
2358 def __iadd__(self, other ):
2359 if isinstance( other, basestring ):
2360 other = Literal( other )
2361 return self.append( other ) #And( [ self, other ] )

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

Definition at line 2369 of file pyparsing.py.

2369
2370 def __str__( self ):
2371 if hasattr(self,"name"):
2372 return self.name
2373
2374 if self.strRepr is None:
2375 self.strRepr = "{" + " ".join( [ _ustr(e) for e in self.exprs ] ) + "}"
2376
2377 return self.strRepr
2378

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

Definition at line 2362 of file pyparsing.py.

2362
2363 def checkRecursion( self, parseElementList ):
2364 subRecCheckList = parseElementList[:] + [ self ]
2365 for e in self.exprs:
2366 e.checkRecursion( subRecCheckList )
2367 if not e.mayReturnEmpty:
2368 break

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

Definition at line 2333 of file pyparsing.py.

2333
2334 def parseImpl( self, instring, loc, doActions=True ):
2335 # pass False as last arg to _parse for first element, since we already
2336 # pre-parsed the string as part of our And pre-parsing
2337 loc, resultlist = self.exprs[0]._parse( instring, loc, doActions, callPreParse=False )
2338 errorStop = False
2339 for e in self.exprs[1:]:
2340 if isinstance(e, And._ErrorStop):
2341 errorStop = True
2342 continue
2343 if errorStop:
2344 try:
2345 loc, exprtokens = e._parse( instring, loc, doActions )
2346 except ParseSyntaxException:
2347 raise
2348 except ParseBaseException, pe:
2349 raise ParseSyntaxException(pe)
2350 except IndexError, ie:
2351 raise ParseSyntaxException( ParseException(instring, len(instring), self.errmsg, self) )
2352 else:
2353 loc, exprtokens = e._parse( instring, loc, doActions )
2354 if exprtokens or exprtokens.keys():
2355 resultlist += exprtokens
2356 return loc, resultlist

## Member Data Documentation

pyparsing.And.callPreparse

Definition at line 2331 of file pyparsing.py.

pyparsing.And.mayReturnEmpty

Definition at line 2324 of file pyparsing.py.

pyparsing.And.skipWhitespace

Definition at line 2330 of file pyparsing.py.

pyparsing.And.strRepr

Definition at line 2374 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