Home Learn Explore About ⭐ GitHub
 🌟

About FLang

Learn how FLang works under the hood, and meet the creator!

🎮 What is FLang?

FLang (Fun Language) is a Domain Specific Language (DSL) designed for educational purposes. It uses a English-like syntax — making it super readable and beginner-friendly!

🐍 Built with Python
🔄 Transpiles to Python
📚 Educational DSL
🆓 Open Source
👶 Beginner Friendly
⚙️ How Does FLang Work?

FLang doesn't run on its own — it's a transpiler! That means it reads your FLang code and converts it to Python, then runs the Python. Here's the journey your code takes:

📝
Your Code
.fun file
🔍
Lexer/Parser
Reads & tokenizes keywords
🔄
Transpiler
FLang → Python code
🐍
Python Runtime
exec() runs it
🎉
Output!
Your results
🔬 Architecture Deep Dive
1. Lexer/Parser
The interpreter reads your FLang script and tokenizes keywords like SET, IF, TO and operators. It understands your FLang code structure.
2. Transpiler (Core Engine)
The most important part! It translates FLang syntax into valid Python 3 code. For example, SET x TO 5 becomes x = 5, and DISP becomes print().
3. Runtime Environment
The generated Python code runs using exec() inside a controlled environment that has the standard library and all of FLang's 30+ built-in functions pre-loaded.
4. Error Handling
The system catches Python errors (like NameError, TypeError) and converts them to simple, friendly error messages that beginners can understand!
🔁 FLang → Python Cheat Sheet
FLang Python What it does
SET x TO 5 x = 5 Assign variable
DISP x print(x) Print to screen
IF x = 5: if x == 5: Equality check
NEXT continue Skip loop iteration
END break Stop loop
ASK INT "Age? " int(input("Age? ")) Get number input
x & y x and y Logical AND
x | y x or y Logical OR
!x not x Logical NOT
👨‍💻 Meet the Creator
👨‍💻
Muhammad Abubakar Siddique Ansari
Creator of FLang • Python Developer • Open Source Enthusiast
🚀 How to Run FLang

Install Python, download FLang from GitHub, save your code as a .fun file, then run:

python -m flang your_file.fun

Check out the GitHub repository for full installation instructions and examples!