A programming language inspired by Marathi, designed to make programming accessible to Marathi speakers.
- Marathi Keywords: Uses Marathi words for programming constructs
- Unicode Support: Full support for Devanagari script
- GUI IDE: Built-in graphical interface for coding
- REPL Mode: Interactive programming environment
- Standard Library: Built-in modules for common operations
- Clone or download this repository
- Ensure you have Python 3.7+ installed
- Install required dependencies:
pip install tkinter
python marathi_ide.pypython run_marathi.py filename.mrpython main.pyचल नाव = "राम" // Variable declaration
स्थिर PI = ३.१४ // Constant declaration
चल संख्या = १० // Number (Marathi numerals)
चल संख्या = 10 // Number (Arabic numerals)
चल शब्द = "नमस्कार" // String
चल बूलियन = सत्य // Boolean (true)
चल बूलियन = असत्य // Boolean (false)
चल रिक्त = शून्य // Null
चल यादी = [१, २, ३] // Array
मुद्रण("नमस्कार जग!") // Print statement
मुद्रण("नाव:", नाव) // Print with variables
कार्य वर्ग(x) {
परत x * x
}
कार्य नमस्कार(नाव) {
मुद्रण("नमस्कार", नाव)
}
जर वय >= १८ {
मुद्रण("प्रौढ")
} नाहीतर {
मुद्रण("अल्पवयीन")
}
चल i = १
जोपर्यंत i <= ५ {
मुद्रण("संख्या:", i)
i = i + १
}
चल यादी = [१, २, ३, ४, ५]
प्रत्येक item मध्ये यादी {
मुद्रण("आयटम:", item)
}
+(addition)-(subtraction)*(multiplication)/(division)%(modulo)
==(equal)!=(not equal)<(less than)>(greater than)<=(less than or equal)>=(greater than or equal)
आणि(and)किंवा(or)नाही(not)
| Marathi | English | Description |
|---|---|---|
| चल | var | Variable declaration |
| स्थिर | const | Constant declaration |
| कार्य | function | Function declaration |
| परत | return | Return statement |
| जर | if | If statement |
| नाहीतर | else | Else statement |
| जोपर्यंत | while | While loop |
| प्रत्येक | foreach | For-each loop |
| मध्ये | in | In operator |
| मुद्रण | Print statement | |
| सत्य | true | Boolean true |
| असत्य | false | Boolean false |
| शून्य | null | Null value |
| आणि | and | Logical AND |
| किंवा | or | Logical OR |
| नाही | not | Logical NOT |
मुद्रण("नमस्कार जग!")
कार्य फिबो(n) {
जर n <= १ {
परत n
}
परत फिबो(n - १) + फिबो(n - २)
}
चल परिणाम = फिबो(८)
मुद्रण("फिबोनाची संख्या:", परिणाम)
कार्य फॅक्टोरियल(n) {
जर n <= १ {
परत १
}
परत n * फॅक्टोरियल(n - १)
}
मुद्रण("फॅक्टोरियल:", फॅक्टोरियल(५))
चल यादी = [१, २, ३, ४, ५]
मुद्रण("यादी:", यादी)
मुद्रण("पहिला element:", यादी[०])
प्रत्येक num मध्ये यादी {
मुद्रण("संख्या:", num)
}
The built-in IDE (marathi_ide.py) provides:
- Code Editor: Syntax-highlighted text editor
- Run Code: Execute Marathi programs with F5 or Run button
- File Operations: New, Open, Save files
- Output Display: Shows program output and errors
- Status Bar: Shows current operation status
- Keyboard Shortcuts:
F5orCtrl+R: Run codeCtrl+N: New fileCtrl+O: Open fileCtrl+S: Save file
When running in REPL mode:
मदतorhelp: Show helpबाहेरorexit: Exit REPLइतिहास: Show command historyचल: Show variablesदस्त: Show documentationउदाहरण [topic]: Show examples
marathi-lang/
├── main.py # Main interpreter entry point
├── run_marathi.py # Unicode-safe wrapper script
├── marathi_ide.py # GUI IDE
├── interpreter/
│ ├── __init__.py
│ ├── lexer.py # Tokenizer
│ ├── parser.py # Parser (AST generation)
│ ├── evaluator.py # Evaluator (execution)
│ └── stdlib/ # Standard library
│ ├── __init__.py
│ ├── ganit.py # Math module
│ ├── shabd.py # String module
│ └── pravesh.py # Input/Output module
├── examples/ # Example programs
│ ├── hello.mr
│ ├── fibonacci.mr
│ └── loops.mr
└── README.md # This file
The interpreter provides error messages in both Marathi and English:
- Syntax errors show line and column information
- Runtime errors provide descriptive messages
- Unicode encoding issues are handled automatically
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new features
- Submit a pull request
If you encounter Unicode display issues:
- Use
run_marathi.pyinstead ofmain.py - Ensure your console supports UTF-8
- The IDE handles Unicode automatically
- File not found: Ensure the file path is correct and the file exists
- Syntax errors: Check for proper Marathi keywords and syntax
- Runtime errors: Verify variable declarations and function calls
- VS Code extension for syntax highlighting
- More comprehensive standard library
- Package management system
- Advanced debugging features
- Web-based IDE
- Mobile app support
This project is open source and available under the MIT License.
Created to promote programming in regional languages and make coding accessible to Marathi speakers.
मराठी भाषेतील प्रोग्रामिंग शिका आणि तंत्रज्ञानात योगदान द्या!
Learn programming in Marathi and contribute to technology!