Note: The initial compilation may take a few seconds on first visit due to cold start latency in Render's free deployment tier.
Enter input values here, one per line
Breaks down source code into individual tokens (keywords, operators, identifiers, etc.)
Run compilation to see tokens...
Builds a tree structure representing the grammatical structure of the program
Run compilation to see AST...
Checks for semantic errors like undefined variables and type mismatches
Run compilation to see semantic analysis...
Generates three-address code as an intermediate representation
Run compilation to see intermediate code...
Uses reinforcement learning to optimize code through constant folding, dead code elimination, etc.
Optimized code will appear here...
Translates optimized intermediate code into executable Python
Run compilation to see generated Python code...
Secure execution of the generated Python code with captured output
Run compilation to see output...
This custom programming language is designed to demonstrate the core phases of compilation through a simple and readable syntax. It is translated into Python using a structured pipeline that includes tokenization, syntax analysis, semantic validation, intermediate code generation, and optimization. The language serves as an educational tool to explore how compilers work end-to-end, focusing on clarity, transformation accuracy, and performance-aware code generation.
x = 10; name = "John"; print(x); print(name);
10 John
x = 5; x += 3; // x = x + 3 print(x);
8
a = 10; b = 3; print(a + b); print(a - b); print(a * b); print(a / b);
13 7 30 3.3333333333333335
age = 20; if (age >= 18) { print("Adult"); } else { print("Minor"); }
Adult
counter = 1; while (counter <= 3) { print(counter); counter += 1; }
1 2 3
print("Enter name:"); scan(name); print("Hello"); print(name);
Enter name: Hello Alice
+
Addition-
Subtraction*
Multiplication/
Division>
Greater than<
Less than>=
Greater than or equal<=
Less than or equal==
Equal to!=
Not equal to&&
Logical AND||
Logical OR!
Logical NOT=
Assign+=
Add and assign-=
Subtract and assign