/Lexo

Compiler Design Mini Project

Primary LanguageJupyter Notebook

Lexo

Description

Lexical analysis is the first phase of a compiler. It takes modified source code from language preprocessors that are written in the form of sentences. The lexical analyzer breaks these syntaxes into a series of tokens, by removing any whitespace or comments in the source code.

If the lexical analyzer finds a token invalid, it generates an error. The lexical analyzer works closely with the syntax analyzer. It reads character streams from the source code, checks for legal tokens, and passes the data to the syntax analyzer when it demands.

How to use

  1. Clone the repository and change the directory
git clone https://github.com/mishra1683/Lexo.git
cd Lexo
  1. Create a virtual environment
pip install virtualenv
virtualenv lexo_env
source lexo_env/bin/activate
  1. Install the required libraries
pip install -r requirements.txt
  1. Run the python file
cd src
python3 Lexo.py

Example

example

Contributors

  1. Umang Shringi
  2. Aditya Mishra
  3. Archi Halder