Skip to content

YeleLang is a custom programming language built as a wrapper around C++, designed to help users learn the fundamentals of programming language creation, lexing, parsing, and interpretation.

Notifications You must be signed in to change notification settings

sajalbatra/YeleLang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YeleLang: A Simple Custom Programming Language

Welcome to YeleLang! This is a simple yet powerful programming language built on top of C++ that allows you to declare variables, perform arithmetic operations, and print results. The language was created as part of a learning project to explore language design, lexers, and parsers. This README provides an overview of the language, how to use it, and how to set up the development environment.


Features:

  • Variable Declaration: yele keyword for declaring variables and assigning values.
  • Operations: Use yekar for performing operations like addition and subtraction.
  • Output: Use printkr to print the result of a calculation or a variable.

Example Code:

// Declare variables
yele x = 5
yele y = 10

// Perform arithmetic operations
yekar z = x + y

// Print the result
printkr z

Expected Output:

15

How It Works:

  1. Lexer: The lexer scans through the input code, dividing it into tokens like keywords (yele, yekar, printkr), variable names, operators (+, -), and values.
  2. Parser: The parser reads the tokens generated by the lexer, identifies the operations to be performed (e.g., assignment, arithmetic), and executes them.
  3. Execution: The parsed operations are executed in the C++ environment, with results being printed or stored in variables.

Installation and Setup:

To try out YeleLang, you need a C++ compiler (like g++) and a development environment.

  1. Clone the repository:

    git clone https://github.com/sajalbatra/YeleLang.git
  2. Navigate to the project directory:

    cd YeleLang
  3. Compile the code:

    g++ -o yelelang main.cpp
  4. Run the program:

    ./yelelang

You can modify the source code to write your own programs and experiment with the syntax.


Contributing:

Feel free to fork the repository, create issues, and submit pull requests if you’d like to improve or contribute to the language. Contributions are welcome!


Contact:

For any questions or suggestions, feel free to reach out via email or GitHub issues.

About

YeleLang is a custom programming language built as a wrapper around C++, designed to help users learn the fundamentals of programming language creation, lexing, parsing, and interpretation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages