VikLang is a simple programming language designed for basic operations such as arithmetic calculations, variable assignment, and string manipulation. This project includes a lexer module that tokenizes VikLang code into meaningful tokens for further processing.
![image](https://private-user-images.githubusercontent.com/122410275/316345960-c770918f-59dc-45c8-a8d0-68d8ea4d4ad2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM3NDkzMjIsIm5iZiI6MTcyMzc0OTAyMiwicGF0aCI6Ii8xMjI0MTAyNzUvMzE2MzQ1OTYwLWM3NzA5MThmLTU5ZGMtNDVjOC1hOGQwLTY4ZDhlYTRkNGFkMi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODE1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgxNVQxOTEwMjJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jZGVhYzBkZGE2MTAzOTgyMWFlMTM1NjQxNmEzNzVlNjE4ZjJhODdiZjc0YjJiODg0NTU0ODRmZTJkMjU1MGViJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.FIuLg4UaCLJB0jLxs0LJW0ubDJrGY8cMXmOk7TFiDME)
Vik-Lexer
│
├── VikLang
│ └── lexer.py
│
├── main.py
├── requirements.txt
├── LICENSE
├── README.md
├── .gitignore
a = 10 + 20 * 5
[<STRING: a>, <EQUALS>, <INT: 10>, <PLUS>, <INT: 20>, <MUL>, <INT: 5>]
This output represents the tokens generated from the input code. Each token type is enclosed in angle brackets.
-
Clone the repository.
git clone https://github.com/Vikranth3140/Vik-Lexer.git
-
Install required dependencies.
pip install -r requirements.txt
-
Run the VikLang Shell.
python main.py
This will start an interactive shell where you can test out your code or use it for writing programs in VikLang.
-
Choose option 1 to enter VikLang code and see tokenized output.
-
Choose option 2 to view the usage instructions and examples.
Contributions to VikLang are welcome! If you'd like to contribute, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-new-feature
). - Make your changes and commit them (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature-new-feature
). - Create a new Pull Request.
This project is licensed under the MIT License.