Module pyparsing :: Class _PendingSkip
[hide private]
[frames] | no frames]

Class _PendingSkip

source code

   object --+    
            |    
ParserElement --+
                |
               _PendingSkip

Nested Classes [hide private]
Instance Methods [hide private]
 
__init__(self, expr, must_skip=False)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__add__(self, other)
Implementation of + operator - returns :class:`And`.
source code
 
__repr__(self)
repr(x)
source code
 
parseImpl(self, *args) source code

Inherited from ParserElement: __and__, __call__, __eq__, __getitem__, __hash__, __invert__, __iter__, __mul__, __ne__, __or__, __radd__, __rand__, __req__, __rmul__, __rne__, __ror__, __rsub__, __rxor__, __str__, __sub__, __xor__, addCondition, addParseAction, canParseNext, checkRecursion, copy, ignore, leaveWhitespace, matches, parseFile, parseString, parseWithTabs, postParse, preParse, runTests, scanString, searchString, setBreak, setDebug, setDebugActions, setFailAction, setName, setParseAction, setResultsName, setWhitespaceChars, split, streamline, suppress, transformString, tryParse, validate

Inherited from object: __delattr__, __format__, __getattribute__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Static Methods [hide private]

Inherited from ParserElement: enablePackrat, inlineLiteralsUsing, resetCache, setDefaultWhitespaceChars

Class Variables [hide private]

Inherited from ParserElement: DEFAULT_WHITE_CHARS, packrat_cache, packrat_cache_lock, packrat_cache_stats, verbose_stacktrace

Inherited from ParserElement (private): _packratEnabled

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, expr, must_skip=False)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__add__(self, other)
(Addition operator)

source code 

Implementation of + operator - returns :class:`And`. Adding strings to a ParserElement
converts them to :class:`Literal`s by default.

Example::

    greet = Word(alphas) + "," + Word(alphas) + "!"
    hello = "Hello, World!"
    print (hello, "->", greet.parseString(hello))

prints::

    Hello, World! -> ['Hello', ',', 'World', '!']

``...`` may be used as a parse expression as a short form of :class:`SkipTo`.

    Literal('start') + ... + Literal('end')

is equivalent to:

    Literal('start') + SkipTo('end')("_skipped*") + Literal('end')

Note that the skipped text is returned with '_skipped' as a results name,
and to support having multiple skips in the same parser, the value returned is
a list of all skipped text.

Overrides: ParserElement.__add__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

parseImpl(self, *args)

source code 
Overrides: ParserElement.parseImpl