| Server IP : 65.108.144.40 / Your IP : 216.73.217.165 Web Server : Apache/2.4.52 (Ubuntu) System : Linux ubuntu-8gb-hel1-1 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64 User : dev ( 1000) PHP Version : 8.2.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/local/lib/python3.10/dist-packages/sqlparse/__pycache__/ |
Upload File : |
o
t`gg � @ s\ d Z ddlZddlmZ ddlmZ ddlmZmZ ddl m
Z
G dd� d�Zdd d
�ZdS )z SQL Lexer� N)�Lock)�
TextIOBase)�tokens�keywords)�consumec @ sX e Zd ZdZdZe� Zedd� �Zdd� Z dd� Z
d d
� Zdd� Zd
d� Z
ddd�ZdS )�LexerzrThe Lexer supports configurable syntax.
To add support for additional keywords, use the `add_keywords` method.Nc C s^ | j �! | jdu r| � | _| j�� W d � | jS W d � | jS 1 s'w Y | jS )zRReturns the lexer instance used internally
by the sqlparse core functions.N)�_lock�_default_instance�default_initialization)�cls� r �9/usr/local/lib/python3.10/dist-packages/sqlparse/lexer.py�get_default_instance0 s
��
��zLexer.get_default_instancec C s� | � � | �tj� | �tj� | �tj� | �tj� | �tj� | �tj � | �tj
� | �tj� | �tj� | �tj
� dS )zlInitialize 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��selfr r r
r
: s zLexer.default_initializationc C s g | _ g | _dS )z�Clear 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 r r r
r I s
zLexer.clearc s$ t jt jB � � fdd�|D �| _dS )z.Set the list of regex that will parse the SQL.c s"