Visual Educational Compiler: An Interactive Web-Based Tool for Visualising Compiler Design Phases

The Visual Educational Compiler is designed to address the gap between theoretical understanding and practical experience in compiler design. Although students typically learn the roles of the lexer, parser, abstract syntax tree (AST), semantic analyser, and code generator, their understanding is often limited to conceptual diagrams and theoretical descriptions. The proposed system provides a visual, step-by-step representation of the compilation process, enabling students to observe the transformation of source code into tokens, an AST, semantic representations, and, ultimately, executable code. The system accepts programs written in a simplified teaching language that supports variables, integer arithmetic operations, conditional statements, and print functions. The compilation process is implemented in Python and consists of five phases: lexical analysis, parsing, AST construction, semantic analysis, and code generation. The final phase generates equivalent Python code. Each compilation phase is presented through a dedicated tab in the Streamlit-based interface, allowing students to inspect intermediate artifacts and compare outputs across different stages of compilation. Errors are reported by phase, enabling students to understand the specific responsibilities of each compiler component. Deliberate errors, including missing semicolons, undeclared variables, and type-related errors, were incorporated to demonstrate phase-specific error detection. The system was evaluated using ten programs of increasing complexity, along with their corresponding erroneous versions. The results showed that all syntactically valid programs successfully progressed through the complete compilation pipeline, while the introduced errors were detected at the appropriate compilation phases and accompanied by relevant diagnostic messages. The teaching language was intentionally designed with limited functionality to maintain transparency of the compilation process and avoid obscuring individual compiler phases within complex code. Future work will focus on extending the language capabilities and incorporating a dedicated code optimisation phase.

Authors

Institutions

Publication Details

Journal
Revolutionary Advances in Computing and Electronics An International Journal
Published
2026-10-30
DOI
https://doi.org/10.65890/race.v2i3.212
Primary Topic
Teaching and Learning Programming
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Visual Educational Compiler: An Interactive Web-Based Tool for Visualising Compiler Design Phases

Dhivya Shree A, Christy Joseph, J. Jabez, Dharsini P S et al.
1 links
Revolutionary Advances in Computing and Electronics An International Journal
Teaching and Learning Programming
article

Visual Educational Compiler: An Interactive Web-Based Tool for Visualising Compiler Design Phases

Dhivya Shree A, Christy Joseph, J. Jabez, Dharsini P S, Dharshana R, Devanshi S, Dheja sree R
article en

Abstract

The Visual Educational Compiler is designed to address the gap between theoretical understanding and practical experience in compiler design. Although students typically learn the roles of the lexer, parser, abstract syntax tree (AST), semantic analyser, and code generator, their understanding is often limited to conceptual diagrams and theoretical descriptions. The proposed system provides a visual, step-by-step representation of the compilation process, enabling students to observe the transformation of source code into tokens, an AST, semantic representations, and, ultimately, executable code. The system accepts programs written in a simplified teaching language that supports variables, integer arithmetic operations, conditional statements, and print functions. The compilation process is implemented in Python and consists of five phases: lexical analysis, parsing, AST construction, semantic analysis, and code generation. The final phase generates equivalent Python code. Each compilation phase is presented through a dedicated tab in the Streamlit-based interface, allowing students to inspect intermediate artifacts and compare outputs across different stages of compilation. Errors are reported by phase, enabling students to understand the specific responsibilities of each compiler component. Deliberate errors, including missing semicolons, undeclared variables, and type-related errors, were incorporated to demonstrate phase-specific error detection. The system was evaluated using ten programs of increasing complexity, along with their corresponding erroneous versions. The results showed that all syntactically valid programs successfully progressed through the complete compilation pipeline, while the introduced errors were detected at the appropriate compilation phases and accompanied by relevant diagnostic messages. The teaching language was intentionally designed with limited functionality to maintain transparency of the compilation process and avoid obscuring individual compiler phases within complex code. Future work will focus on extending the language capabilities and incorporating a dedicated code optimisation phase.

Revolutionary Advances in Computing and Electronics An International JournalVol. 2(3)
Sathyabama Institute of Science and Technology (IN)
Quality education
Openalex Percentile: Top 7%
Teaching and Learning Programming
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon