Source Code

Loading...

Compiler Visualization Dashboard

"Run Compiler" to start the compilation process. You'll see each phase step by step.

🔍 Lexical Analysis

  • Breaks code into tokens (lexemes)
  • Identifies keywords, identifiers, operators
  • Removes whitespace and comments
  • First step in understanding code structure

🌳 Syntax Analysis

  • Builds abstract syntax tree (AST)
  • Validates code structure and grammar
  • Checks for proper nesting and brackets
  • Ensures code follows language rules

✨ Semantic Analysis

  • Checks variable declarations and types
  • Validates scope and visibility
  • Ensures proper type compatibility
  • Builds symbol table for references

🔄 Intermediate Code

  • Converts AST to three-address code
  • Platform-independent representation
  • Prepares code for optimization
  • Simplifies complex expressions

⚡ Optimization

  • Improves code efficiency
  • Removes redundant operations
  • Simplifies expressions
  • Enhances performance

💻 Code Generation

  • Produces target machine code
  • Handles memory allocation
  • Generates executable instructions
  • Final compilation phase