+
    VBi.                         R t ^ RIt]P                  ! ]]]]R7       ^RIHt ^RIHtHtH	t	 ]! 4       t
 ! R R4      tR# )z3
Python Lexical Analyser

Scanning an input stream
N)BOLEOLEOF	NOT_FOUND)Errors)r   r   r   c                      a  ] tR t^t o RtRR ltR tR tR tR t	]
P                  R 4       tV 3R	 lR
 ltR tR tRR ltR t]R 4       tRtV tR# )Scannera  
A Scanner is used to read tokens from a stream of characters
using the token set specified by a Plex.Lexicon.

Constructor:

  Scanner(lexicon, stream, name = '')

    See the docstring of the __init__ method for details.

Methods:

  See the docstrings of the individual methods for more
  information.

  read() --> (value, text)
    Reads the next lexical token from the stream.

  position() --> (name, line, col)
    Returns the position of the last token read using the
    read() method.

  begin(state_name)
    Causes scanner to change state.

  produce(value [, text])
    Causes return of a token value to the caller of the
    Scanner.

Nc                   ^ V n         RV n        ^ V n        ^ V n        ^ V n        ^V n        ^ V n        RV n        RV n        RV n	        RV n
        Wn        W n        W0n        . V n        RV n        V P!                  R4       ^ V n        ^ V n        ^ V n        \$        V n        ^V n        Ve!   V^,          V^,          ) uV n        V n        R# R# )aC  
Scanner(lexicon, stream, name = '')

  |lexicon| is a Plex.Lexicon instance specifying the lexical tokens
  to be recognised.

  |stream| can be a file object or anything which implements a
  compatible read() method.

  |name| is optional, and may be the name of the file being
  scanned or any other identifying string.
 N)r
       r   )tracebufferbuf_start_posnext_poscur_poscur_line	start_poscurrent_scanner_position_tuplelast_token_position_tupletext
state_namelexiconstreamnamequeueinitial_statebegincur_line_startr   cur_charinput_state)selfr   r   r   initial_poss   &&&&&9/usr/lib/python3.14/site-packages/Cython/Plex/Scanners.py__init__Scanner.__init__J   s     
.8+)3&		
!

2"1<Q+a..DM4. #    c                :   V P                   pV'       gt   V P                  4       w  V n        pVf$   V P                  R4       V P	                  4        KG  VP                  W P                  4      pVf   Kh  V P                  V4       K{  V^ ,          w  q@n        V^  V# )z
Read the next lexical token from the stream and return a
tuple (value, text), where |value| is the value associated with
the token as specified by the Lexicon, and |text| is the actual
string read from the stream. Returns (None, '') on end of file.
N)r   scan_a_tokenr   produceeofperformr   )r    r   actionvalueresults   &    r"   readScanner.readr   s~     

 $ 1 1 3DIv~T"
tYY7$LL'16q..!Hr%   c                D    V P                   P                  ^ W3V34       R# )r   N)r   insert)r    tokenr,   positions   &&&&r"   unreadScanner.unread   s    

!unh78r%   c                    V P                   # N)r   r    s   &r"   get_current_scan_posScanner.get_current_scan_pos   s    222r%   c                   V P                   V n        V P                  V P                  V P                   V P                  ,
          3V n        V P                  4       pVe   V P                  '       d)   \        RWP                  V P                   3,          4       V P                  V P                  V P                  ,
          V P                   V P                  ,
           pW!3# V P                   V P                  8X  d%   V P                  e   V P                  \        J d   R# \        P                  ! W P                  4      h)zv
Read the next input sequence recognised by the machine
and return (text, action). Returns ('', None) on end of
file.
z"Scanner: read: Performing %s %d:%dr
   N)r   r   r   r   r   r   run_machine_inlinedr   printr   r   r   r   r   UnrecognizedInputr   )r    r+   r   s   &  r"   r'   Scanner.scan_a_token   s     IIt}}dllT5H5H&H/
+ ))+zzz:NNDLL>: : ;;;!3!33t1113D >!||t~~-==(DMMS,@%%**4AAr%   c           	        V P                   pV P                  pV P                  pV P                  pV P                  pV P
                  pV P                  pV P                  pV P                  p	\        V4      p
Rw  rrpppV P                  p V'       d&   \        RVR,          Wb\        V4      3,          4       VR,          pVe   VW#WEWg3w  rrpppTpVP                  V\        4      pV\        J d   T;'       d    VP                  R4      pV'       EdF   V'       d   \        RVR,          ,          4       TpV^8X  d   TpWy,
          pVV
8  d   VV,          pV^,          pMV P                  V	,
          pV P                   P#                  R4      pV P                  VR V,           pWn        V	V,          p	Wn        \        V4      p
VV,          pV'       d   VV,          pV^,          pMRpVR	8X  d   \$        p^pEKw  V'       g   \$        p^pEK  TpEK  V^8X  d   R	p^pEK  V^8X  d   V^,          pT;rB\&        p^pEK  V^8X  d   \(        p^pEK  RpEK  V'       d   \        R
4       Ve   WWVVV3w  pr#prVpMRp Y n        Y0n        Y@n        YPn        Y`n        Ypn        T'       d   Te   \        RT,          4       T# )z+
Inlined version of run_machine for speed.
Nr
   zState %d, %d/%d:%s -->numberr+   elsezState %di   
blockedzDoing %s)Nr   r   r   r
   r   r   )r   r   r   r   r   r   r   r   r   lenr   r>   reprgetr   r   r   r.   r   r   r   )r    stater   r   r   r   r   r   r   r   buf_lenb_action	b_cur_pos
b_cur_lineb_cur_line_start
b_cur_charb_input_state
b_next_posr   r+   c	new_state	buf_indexdiscarddatas   &                        r"   r=   Scanner.run_machine_inlined   s   
 ((%)\\&*mm,0,?,?==#'#3#3&*mmkk+/+=+=%([
 $ 	aZ:}V` "ZZ.(O[4>2K K L 8_F!G~^ iZ:}^h A		!Y/II%33%))F"3	y*y'::;!!#&G ( 8I 7*"9- A"&..="@#{{//7!%WX!6!=&,%0-:*"%f+!W,	 &y 1A$MH "ADy#&&'#&&'#$ A%#H"#K A%MH/77N"H"#K A%"H"#K!H )$' "j#]J@6VWH "F  , & !j6)*r%   c                    < V ^8  d   QhRS[ /# )   return)tuple)format__classdict__s   "r"   __annotate__Scanner.__annotate__  s     	. 	.% 	.r%   c                    V P                   # )a5  
Return a tuple (name, line, col) representing the location of
the last token read using the read() method. |name| is the
name that was provided to the Scanner constructor; |line|
is the line number in the stream (1-based); |col| is the
position within the line of the first character of the token
(0-based).
r   r8   s   &r"   r3   Scanner.position  s     ---r%   c                "    V P                  4       # )zH
Python accessible wrapper around position(), only for error reporting.
)r3   r8   s   &r"   get_positionScanner.get_position$  s     }}r%   c                R    V P                   P                  V4      V n        Wn        R# )z8Set the current state of the scanner to the named state.N)r   get_initial_stater   r   )r    r   s   &&r"   r   Scanner.begin*  s#     LL**:6 	$r%   c                v    Vf   V P                   pV P                  P                  W3V P                  34       R# )a  
Called from an action procedure, causes |value| to be returned
as the token value from read(). If |text| is supplied, it is
returned in place of the scanned text.

produce() can be called more than once during a single call to an action
procedure, in which case the tokens are queued up and returned one
at a time by subsequent calls to read(), until the queue is empty,
whereupon scanning resumes.
N)r   r   appendr   )r    r,   r   s   &&&r"   r(   Scanner.produce0  s1     <99D

E=$*M*MNOr%   c                    R# )zG
Override this method if you want something to be done at
end of file.
N r8   s   &r"   r)   Scanner.eof?  s    
 	r%   c                (    V P                   ^,          # )   ra   r8   s   &r"   
start_lineScanner.start_lineF  s    --a00r%   )r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r<   r7   )__name__
__module____qualname____firstlineno____doc__r#   r.   r4   r9   r'   cythonfinalr=   r3   rd   r   r(   r)   propertyrq   __static_attributes____classdictcell__)r]   s   @r"   r   r      su     p&QP*93B2 \\o ob	. 	.%P 1 1r%   r   )rw   rx   declareobjectr
   r   Regexpsr   r   r   r   r   rm   r%   r"   <module>r      s=     6v6V D  " "H	w1 w1r%   