Git Product home page Git Product logo

vik-lexer's Introduction

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.

vik-lexer's People

Contributors

vikranth3140 avatar

Stargazers

TeckZ0rd avatar

Watchers

 avatar

Forkers

teckz0rd

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.