Gaudi Framework, version v25r1

Home   Generated: Mon Mar 24 2014
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
pyparsing.SkipTo Class Reference
Inheritance diagram for pyparsing.SkipTo:
Inheritance graph
[legend]
Collaboration diagram for pyparsing.SkipTo:
Collaboration graph
[legend]

Public Member Functions

def __init__
 
def parseImpl
 
- Public Member Functions inherited from pyparsing.ParseElementEnhance
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

 ignoreExpr
 
 mayReturnEmpty
 
 mayIndexError
 
 includeMatch
 
 asList
 
 failOn
 
 errmsg
 
- Public Attributes inherited from pyparsing.ParseElementEnhance
 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

Token for skipping over all undefined text until the matched expression is found.
   If include is set to true, the matched expression is also parsed (the skipped text
   and matched expression are returned as a 2-element list).  The ignore
   argument is used to define grammars (typically quoted strings and comments) that
   might contain false matches.

Definition at line 2823 of file pyparsing.py.

Constructor & Destructor Documentation

def pyparsing.SkipTo.__init__ (   self,
  other,
  include = False,
  ignore = None,
  failOn = None 
)

Definition at line 2830 of file pyparsing.py.

2831  def __init__( self, other, include=False, ignore=None, failOn=None ):
2832  super( SkipTo, self ).__init__( other )
2833  self.ignoreExpr = ignore
2834  self.mayReturnEmpty = True
2835  self.mayIndexError = False
2836  self.includeMatch = include
2837  self.asList = False
2838  if failOn is not None and isinstance(failOn, basestring):
2839  self.failOn = Literal(failOn)
2840  else:
2841  self.failOn = failOn
2842  self.errmsg = "No match found for "+_ustr(self.expr)
2843  #self.myException = ParseException("",0,self.errmsg,self)

Member Function Documentation

def pyparsing.SkipTo.parseImpl (   self,
  instring,
  loc,
  doActions = True 
)

Definition at line 2844 of file pyparsing.py.

2845  def parseImpl( self, instring, loc, doActions=True ):
2846  startLoc = loc
2847  instrlen = len(instring)
2848  expr = self.expr
2849  failParse = False
2850  while loc <= instrlen:
2851  try:
2852  if self.failOn:
2853  try:
2854  self.failOn.tryParse(instring, loc)
2855  except ParseBaseException:
2856  pass
2857  else:
2858  failParse = True
2859  raise ParseException(instring, loc, "Found expression " + str(self.failOn))
2860  failParse = False
2861  if self.ignoreExpr is not None:
2862  while 1:
2863  try:
2864  loc = self.ignoreExpr.tryParse(instring,loc)
2865  print "found ignoreExpr, advance to", loc
2866  except ParseBaseException:
2867  break
2868  expr._parse( instring, loc, doActions=False, callPreParse=False )
2869  skipText = instring[startLoc:loc]
2870  if self.includeMatch:
2871  loc,mat = expr._parse(instring,loc,doActions,callPreParse=False)
2872  if mat:
2873  skipRes = ParseResults( skipText )
2874  skipRes += mat
2875  return loc, [ skipRes ]
2876  else:
2877  return loc, [ skipText ]
2878  else:
2879  return loc, [ skipText ]
2880  except (ParseException,IndexError):
2881  if failParse:
2882  raise
2883  else:
2884  loc += 1
2885  exc = self.myException
2886  exc.loc = loc
2887  exc.pstr = instring
2888  raise exc

Member Data Documentation

pyparsing.SkipTo.asList

Definition at line 2836 of file pyparsing.py.

pyparsing.SkipTo.errmsg

Definition at line 2841 of file pyparsing.py.

pyparsing.SkipTo.failOn

Definition at line 2838 of file pyparsing.py.

pyparsing.SkipTo.ignoreExpr

Definition at line 2832 of file pyparsing.py.

pyparsing.SkipTo.includeMatch

Definition at line 2835 of file pyparsing.py.

pyparsing.SkipTo.mayIndexError

Definition at line 2834 of file pyparsing.py.

pyparsing.SkipTo.mayReturnEmpty

Definition at line 2833 of file pyparsing.py.


The documentation for this class was generated from the following file:
Generated at Mon Mar 24 2014 18:27:54 for Gaudi Framework, version v25r1 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004