+
    Qjg                     d    R t ^ RIt^ RIHt ^ RIHt ^ RIHtHt ^ RI	H
t
  ! R R4      tR	R ltR# )
z	SQL LexerN)Lock)
TextIOBase)tokenskeywords)consumec                   n   a  ] tR t^t o RtRt]! 4       t]R 4       t	R t
R tR tR tR tRR	 ltR
tV tR# )LexerznThe Lexer supports configurable syntax.
To add support for additional keywords, use the `add_keywords` method.Nc                    V P                   ;_uu_ 4        V P                  f'   V ! 4       V n        V P                  P                  4        RRR4       V P                  #   + '       g   i     T P                  # ; i)zJReturns the lexer instance used internally
by the sqlparse core functions.N)_lock_default_instancedefault_initialization)clss   &C/var/www/idalgo/venv/lib/python3.14/site-packages/sqlparse/lexer.pyget_default_instanceLexer.get_default_instance0   s^     YYY$$,(+%%%<<>  $$$	 Y $$$s   5AA9	c                   V P                  4        V P                  \        P                  4       V P	                  \        P
                  4       V P	                  \        P                  4       V P	                  \        P                  4       V P	                  \        P                  4       V P	                  \        P                  4       V P	                  \        P                  4       V P	                  \        P                  4       V P	                  \        P                  4       V P	                  \        P                  4       R# )zdInitialize the lexer with default dictionaries.
Useful if you need to revert custom syntax settings.N)clearset_SQL_REGEXr   	SQL_REGEXadd_keywordsKEYWORDS_COMMONKEYWORDS_ORACLEKEYWORDS_MYSQLKEYWORDS_PLPGSQLKEYWORDS_HQLKEYWORDS_MSACCESSKEYWORDS_SNOWFLAKEKEYWORDS_BIGQUERYKEYWORDSselfs   &r   r   Lexer.default_initialization:   s     	

8--.(223(223(112(334(//0(445(556(445(++,    c                "    . V n         . V n        R# )zClear all syntax configurations.
Useful if you want to load a reduced set of syntax configurations.
After this call, regexps and keyword dictionaries need to be loaded
to make the lexer functional again.N
_SQL_REGEX	_keywordsr   s   &r   r   Lexer.clearI   s    
 r"   c                    \         P                  \         P                  ,          pV UUu. uF'  w  r4\         P                  ! W24      P                  V3NK)  	  uppV n        R# u uppi )z.Set the list of regex that will parse the SQL.N)re
IGNORECASEUNICODEcompilematchr%   )r    r   FLAGSrxtts   &&   r   r   Lexer.set_SQL_REGEXQ   sP    

* $
# ZZ"(("-#
 
s   -A#c                <    V P                   P                  V4       R# )z`Add keyword dictionaries. Keywords are looked up in the same order
that dictionaries were added.N)r&   append)r    r   s   &&r   r   Lexer.add_keywordsY   s     	h'r"   c                    VP                  4       pV P                   F  pW#9   g   K  W2,          V3u # 	  \        P                  V3# )zChecks for a keyword.

If the given value is in one of the KEYWORDS_* dictionary
it's considered a keyword. Otherwise, tokens.Name is returned.
)upperr&   r   Name)r    valuevalkwdicts   &&  r   
is_keywordLexer.is_keyword^   s@     kkmnnF}{E)) % ;;%%r"   c              #  ^  "   \        V\        4      '       d   VP                  4       p\        V\        4      '       d   Mf\        V\        4      '       d.   V'       d   VP                  V4      pM6 VP                  R4      pM#\        RP                  \        V4      4      4      h\        V4      pV F  w  rEV P                   F  w  rgV! W4      pV'       g   K  \        V\        P                  4      '       d   WxP                  4       3x  M5V\        P                   J d"   V P#                  VP                  4       4      x  \%        W8P'                  4       V,
          ^,
          4        K  	  \        P(                  V3x  K  	  R#   \         d    TP                  R4      p ELi ; i5i)as  
Return an iterable of (tokentype, value) pairs generated from
`text`. If `unfiltered` is set to `True`, the filtering mechanism
is bypassed even if filters are defined.

Also preprocess the text, i.e. expand tabs and strip it if
wanted and applies registered filters.

Split ``text`` into (tokentype, text) pairs.

``stack`` is the initial stack (default: ``['root']``)
zutf-8zunicode-escapez+Expected text or file-like object, got {!r}N)
isinstancer   readstrbytesdecodeUnicodeDecodeError	TypeErrorformattype	enumerater%   r   
_TokenTypegroupr   PROCESS_AS_KEYWORDr;   r   endError)	r    textencodingiterableposcharrexmatchactionms	   &&&      r   
get_tokensLexer.get_tokensk   sG     dJ''99;DdC  e$${{8,9;;w/D I"F4:.0 0 T?!IC$(OO T'(9(9:: '')++x::://!'')44%%'C-!"34 %4 llD(( " * 9;;'78D9s1   AF-F-1F
 DF-
F*&F-)F**F-r$   N)__name__
__module____qualname____firstlineno____doc__r   r   r
   classmethodr   r   r   r   r   r;   rU   __static_attributes____classdictcell__)__classdict__s   @r   r   r      sQ     N FE( % %-
(
&-) -)r"   r   c                H    \         P                  4       P                  W4      # )zuTokenize sql.

Tokenize *sql* using the :class:`Lexer` and return a 2-tuple stream
of ``(token type, value)`` items.
)r   r   rU   )sqlrN   s   &&r   tokenizerc      s     %%'223AAr"   rW   )r\   r)   	threadingr   ior   sqlparser   r   sqlparse.utilsr   r   rc    r"   r   <module>ri      s.     	   % "A) A)HBr"   