Skip to content

Latest commit

 

History

History
35 lines (27 loc) · 939 Bytes

File metadata and controls

35 lines (27 loc) · 939 Bytes

SQL Lexer using PLY

Overview

The lexer identifies and categorizes SQL tokens like keywords, datatypes, operators, symbols, and identifiers. It demonstrates how a lexical analyzer breaks down SQL code into meaningful tokens — the first step in building a compiler or interpreter.


Features

  1. Function Declaration / DefinitionCREATE FUNCTION ... RETURNS ...
  2. Simple Data Type DeclarationINT, VARCHAR, DATE, FLOAT
  3. Selection StatementsIF, THEN, ELSE, CASE, WHEN
  4. Looping ConstructWHILE, DO, END WHILE
  5. Array / List Representation – using IN ( ... )

To Use

  1. Clone this repository:
    git clone https://github.com/Mitxh13/lexiSQL.git
    cd lexiSQL
  2. Run the lexer:
    python lex.py
  3. The lexer will display tokenized output for the given SQL input.

Team

  1. Kurumeti Mitesh
  2. Tahir