KalpanaLang - Programming in Your Native Languageđ§âđģ
Click here to read README in Bangla
KalpanaLang is an interpreter-based programming language designed to allow programmers to write code in their native language. The initial version supports Bengali (Bangla) as the primary language with translations from English, Russian, and Hindi.
Features
- Native Language Support: Write code in Bengali (with English, Russian, and Hindi translations)
- Rich Standard Library: Includes common programming constructs and algorithms
- Multi-language Input: Automatically detects and translates from English, Russian, or Hindi to Bengali
- Array Operations: Built-in support for arrays with sorting and searching algorithms
- Interactive Input: Get user input with type checking
Language Syntax
Data Types
āĻĒā§āϰā§āĻŖāϏāĻāĻā§āϝāĻž(Integer)āĻāĻā§āύāĻžāĻāĻļ(Float/Double)āĻŦāĻžāĻā§āϝ(String)āĻŦā§āϞāĻŋāϝāĻŧāĻžāύ(Boolean)
Control Structures
āϝāĻĻāĻŋ(if)āϝāĻĻāĻŋāĻŦāĻž(else if)āĻŦāĻž(else)āϞā§āĻĒ(for/while loop)āĻāĻžāĻā§(break)āĻāĻĄāĻŧāĻžāĻ(continue)
Functions
āĻĢāĻžāĻāĻļāύ(function)āĻĢā§āϰāϤ(return)āĻāĻžāϞāĻŋ(void)
Arrays
āĻĒā§āϰā§āĻŖāϏāĻāĻā§āϝāĻžāϰ_āĻ ā§āϝāĻžāϰā§(Integer array)āĻāĻā§āύāĻžāĻāĻļā§āϰ_āĻ ā§āϝāĻžāϰā§(Float array)āĻŦāĻžāĻā§āϝā§āϰ_āĻ ā§āϝāĻžāϰā§(String array)āĻŦā§āϞāĻŋāϝāĻŧāĻžāύā§āϰ_āĻ ā§āϝāĻžāϰā§(Boolean array)āĻ ā§āϝāĻžāϰā§āϰ_āĻāĻāĻžāϰ(Array size)āĻŦāĻžāĻŦāϞ_āϏāϰā§āĻ(Bubble sort)āĻā§āĻāĻ_āϏāϰā§āĻ(Quick sort)āĻŦāĻžāĻāύāĻžāϰāĻŋ_āϏāĻžāϰā§āĻ(Binary search)
Built-in functions:
āĻŦāύā§āϧ(exit)āĻāύāϏā§āϞ_āĻŽā§āĻā§(clearConsole)āĻā§āϝāĻžāϰāĻŋāϝāĻŧā§āĻŦāϞ_āĻŽā§āĻā§(delete_var)āĻĒā§āϰā§āϏā§_āĻĨāĻžāĻŽā§(stopOnEnter)āĻĒā§āϰā§āϏā§_āĻļā§āώ(hold)āĻĨāĻžāĻŽā§(sleep)
Library support
math.klm
Getting Started
Prerequisites
- Java 21 or higher
Running the Interpreter
- Clone this repository
- Compile the Java files:
- Create a source file (e.g.,
Demo.kls) with your code - Run the interpreter:
- To run jar file directly:
java -jar KalpanaLang.jar Demo.kls
- Or, you can run directly by calling Makefile:
make make run FILE=Demo.kls make clean
Example Programs
Hello World
Fibonacci Series
āĻĒā§āϰā§āĻŖāϏāĻāĻā§āϝāĻž n = 10;
āĻĒā§āϰā§āĻŖāϏāĻāĻā§āϝāĻžāϰ_āĻ
ā§āϝāĻžāϰ⧠fib[n];
fib[1] = 1;
fib[2] = 1;
āϞā§āĻĒ (āĻĒā§āϰā§āĻŖāϏāĻāĻā§āϝāĻž i = 3; i <= n; i++)
{
fib[i] = fib[i-1] + fib[i-2];
}
āϞā§āĻĒ (āĻĒā§āϰā§āĻŖāϏāĻāĻā§āϝāĻž i = 1; i <= n; i++)
{
āĻĻā§āĻāĻžāĻ(fib[i]);
}
Function Example
āĻĢāĻžāĻāĻļāύ āĻĒā§āϰā§āĻŖāϏāĻāĻā§āϝāĻž factorial(āĻĒā§āϰā§āĻŖāϏāĻāĻā§āϝāĻž n)
{
āϝāĻĻāĻŋ (n == 0)
{
āĻĢā§āϰāϤ 1;
}
āĻĢā§āϰāϤ n * factorial(n - 1);
}
āĻĻā§āĻāĻžāĻ(factorial(5));
Supported Language Translations
| English | Bengali | Russian | Hindi |
|---|---|---|---|
| āĻĻā§āĻāĻžāĻ | ĐŋĐĩŅаŅŅ | ā¤ĒāĨ⤰ā¤ŋā¤ā¤ | |
| integer | āĻĒā§āϰā§āĻŖāϏāĻāĻā§āϝāĻž | ŅĐĩĐģ | ā¤ĒāĨ⤰āĨā¤Ŗā¤žā¤ā¤ |
| float | āĻāĻā§āύāĻžāĻāĻļ | Đ´ŅĐžĐąŅ | ā¤ā¤ŋ⤍āĨ⤍ |
| string | āĻŦāĻžāĻā§āϝ | ŅŅŅĐžĐēа | ⤏āĨā¤āĨ⤰ā¤ŋā¤ā¤ |
| if | āϝāĻĻāĻŋ | ĐĩŅĐģи | ⤠ā¤ā¤° |
| else | āĻŦāĻž | иĐŊаŅĐĩ | ā¤ā¤° |
| function | āĻĢāĻžāĻāĻļāύ | ŅŅĐŊĐēŅĐ¸Ņ | ā¤Ģā¤ā¤āĨā¤ļ⤍ |
Project Structure
KalpanaLang/
âââ Main.java - Main entry point
âââ KalpanaLang.jar -Signed jar file of interpreter
âââ LICENSE - License file
âââ Demo.kls - An example of my language, kls means KalpanaLangSource
âââ math.klm - A math library for interpreter. klm means KalpanaLangModiule
âââ Makefile - Automatic source building
âââ README.md - This file
Contributing
Contributions are welcome! Please fork the repository and submit a pull request with your changes.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Inspired by the need for native language programming tools.
- Built with Java for portability and performance.
Project Team
Core Development:
- Hasin Israk (Toaha) - Author, Main Programmer
Documentation:
- Fabiha Islam (Deeba).
- Hafsa Akter.
- Ritu Moni.
Quality Assurance & Bug Fixing:
- Akash Mitro (Nill).
- Sifat Hossen.
- Sojib Islam (Akash).
Project Management:
- Lamia Akter - Version Control.
- Sarmin Akter - Version Control.
- Siam Hossen - Class Manager, Mascot Designer.
Research & Development:
- Sahanaj Mim - JDK Selection.
- Avijit Dewry - Utility Function.
Special Thanks To:
- All beta testers and early adopters.
- The open source community for their invaluable resources.
Known bugs:
- Need to update language pack in class LanguageTranslator.
Used Tools & Technologies
- Termux.
- OpenJDK 21.
- QuickEdit.
- Memory Card.
Warning â ī¸
- Building from source can be cause an Error. To solve it, replace,
__COMPILE_TIMESTAMP__to accual date-time when you're building.
This project is the result of collaborative effort from all team members who contributed their time, skills, and creativity to make KalpanaLang a reality.
Note
A special edition will be release in memory of the "Milestone School and College" plain crash tragedy. Decicated to all my brother & sisters â¤ī¸. Please pray for them.