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.
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.