Skip to content

VikLang is a simple programming language designed for basic operations such as arithmetic calculations, variable assignment, and string manipulation.

License

Notifications You must be signed in to change notification settings

Vikranth3140/Vik-Lexer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vik Lexer

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

File Structure

Vik-Lexer
│
├── VikLang
│   └── lexer.py
│
├── main.py
├── requirements.txt
├── LICENSE
├── README.md
├── .gitignore

Examples

Example Input

a = 10 + 20 * 5

Expected Output (Tokens)

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

How to Use

  1. Clone the repository.

    git clone https://github.com/Vikranth3140/Vik-Lexer.git
  2. Install required dependencies.

    pip install -r requirements.txt
  3. 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.

  4. Choose option 1 to enter VikLang code and see tokenized output.

  5. Choose option 2 to view the usage instructions and examples.

How to Contribute

Contributions to VikLang are welcome! If you'd like to contribute, please follow these steps:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-new-feature).
  3. Make your changes and commit them (git commit -am 'Add new feature').
  4. Push to the branch (git push origin feature-new-feature).
  5. Create a new Pull Request.

License

This project is licensed under the MIT License.

About

VikLang is a simple programming language designed for basic operations such as arithmetic calculations, variable assignment, and string manipulation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages