An advanced, educational programming language interpreter built in Python. Features variables, functions, control flow, and more!
- Variables & Types:
let x = 10, strings, numbers, booleans - Functions:
fun name(args) { return value } - Control Flow:
if/elif/else,whileloops - Operators: Arithmetic (
+,-,*,/,**), comparisons, boolean logic - Built-ins:
print(),input(),len(),int(),float(),str() - Interactive REPL: Test code interactively
- Web Interface: Online code editor and executor
git clone https://github.com/SarthakMitra323/Mitra-Codiga.git
cd mitra-codiga# Run a .mc file
python run_mc.py demo.mc
# Start interactive REPL
python mc_lang.pypip install -r requirements.txt
python web_app.py
# Visit http://localhost:5000# Variables and arithmetic
let x = 10;
let y = 20;
print("Sum:", x + y);
# Functions
fun fibonacci(n) {
if n <= 1 { return n; }
return fibonacci(n-1) + fibonacci(n-2);
}
print("Fib(10):", fibonacci(10));
# Control flow
let i = 0;
while i < 5 {
print("Count:", i);
i = i + 1;
}- Fork this repository
- Import to Repl.it
- Runs immediately with web interface
# Add these files:
# - Procfile
# - requirements.txt
# - runtime.txt
heroku create your-app-name
git push heroku main- Connect your GitHub repo
- Automatic deployment from
mainbranch - Zero configuration needed
- Connect GitHub repository
- Select "Web Service"
- Build:
pip install -r requirements.txt - Start:
python web_app.py
- Install Vercel CLI:
npm i -g vercel - Run:
vercel --prod - Automatic deployments from GitHub
- Drag & drop the folder to Netlify
- Or connect via GitHub for auto-deployment
- Lexer: Converts source code to tokens
- Parser: Builds Abstract Syntax Tree (AST)
- Interpreter: Executes the AST with symbol tables
- New operators: Modify lexer tokens and interpreter logic
- Built-in functions: Add to
inject_builtins() - Language constructs: Add AST nodes and parser rules
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
MIT License - feel free to use this for educational purposes!
Built as an educational project to demonstrate:
- Programming language design
- Interpreter implementation
- Web deployment strategies
- Modern development practices
Made with ❤️