Package lepl :: Package stream :: Module maxdepth
[hide private]
[frames] | no frames]

Module maxdepth

source code

Raise an exception if the stream is not consumed entirely.
Classes [hide private]
  FullFirstMatchException
The exception raised by FullFirstMatch.
Functions [hide private]
 
FullFirstMatch(matcher, eos=True)
Raise an exception if the first match fails (if eos=False) or does not consume the entire input stream (eos=True).
source code
Function Details [hide private]

FullFirstMatch(matcher, eos=True)

source code 

Raise an exception if the first match fails (if eos=False) or does not consume the entire input stream (eos=True). The exception includes information about the location of the deepest match.

This only works for the first match because we cannot reset the stream facade for subsequent matches (also, if you want multiple matches you probably want more sophisticated error handling than this).

Decorators:
  • @trampoline_matcher_factory()