Ñò
Žf¯Jc @ sB d Z d d k Z d e f d „ ƒ YZ d e f d „ ƒ YZ d S( s
pygments.scanner
~~~~~~~~~~~~~~~~
This library implements a regex based scanner. Some languages
like Pascal are easy to parse but have some keywords that
depend on the context. Because of this it's impossible to lex
that just by using a regular expression lexer like the
`RegexLexer`.
Have a look at the `DelphiLexer` to get an idea of how to use
this scanner.
:copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
iÿÿÿÿNt EndOfTextc B s e Z d Z RS( sZ
Raise if end of text is reached and the user
tried to call a match function.
( t __name__t
__module__t __doc__( ( ( s4 /usr/lib/python2.6/site-packages/pygments/scanner.pyR s t Scannerc B sb e Z d Z d d „ Z d „ Z e e e i ƒ Z d „ Z d „ Z d „ Z d „ Z d „ Z
RS( sp
Simple scanner
All method patterns are regular expression strings (not
compiled expressions!)
i c C sR | | _ t | ƒ | _ d | _ d | _ | | _ d | _ d | _ h | _ d S( s{
:param text: The text which should be scanned
:param flags: default regular expression flags
i N(
t datat lent data_lengtht start_post post flagst Nonet lastt matcht _re_cache( t selft textR
( ( s4 /usr/lib/python2.6/site-packages/pygments/scanner.pyt __init__$ s c C s | i | i j S( s. `True` if the scanner reached the end of text.( R R ( R ( ( s4 /usr/lib/python2.6/site-packages/pygments/scanner.pyt eos2 s c C sd | i o
t ƒ ‚ n | | i j o t i | | i ƒ | i |