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