Skip to content

Latest commit

 

History

History
131 lines (105 loc) · 3.79 KB

File metadata and controls

131 lines (105 loc) · 3.79 KB

Key Features for MVP

Grammar Management:

  • Input and validate context-free grammar
  • Convert grammar to proper format (eliminate left recursion, left factoring for LL(1))
  • Calculate FIRST and FOLLOW sets (essential for LL(1))

Parser Generation:

  • Construct LR(0) items and canonical collection
  • Build LR(0) parsing table with actions and go-to functions
  • Generate LL(1) parsing table

Parsing Simulation:

  • Step-by-step simulation of the parsing process
  • Display current stack, input, and actions at each step
  • Show derivations and reductions as they occur

Basic Visualization:

  • Text-based representation of automaton states
  • Visual representation of parse tables
  • Simple trace of parsing steps

Workflow

  1. Grammar Input Phase:
    • User enters grammar rules
    • System validates grammar format
    • System processes grammar (left recursion elimination, etc.)
  2. Parser Generation Phase:
    • User selects parser type (LR(0) or LL(1))
    • System generates appropriate sets and tables
    • System displays the generated tables
  3. Parsing Simulation Phase:
    • User enters an input string
    • User can step through the parsing process
    • System shows each step of the parsing process
    • System indicates acceptance or rejection of the input

Architecture

Core Components:

  1. Grammar Module:
    • Grammar representation
    • Grammar validation
    • Grammar transformation algorithms
  2. Analysis Module:
    • FIRST/FOLLOW set calculation
    • Item set construction
    • Closure algorithms
  3. Table Construction Module:
    • LL(1) table generator
    • LR(0) table generator
    • Conflict detection and reporting
  4. Parsing Engine:
    • Stack-based parser implementation for both types
    • Step-by-step execution logic
    • Error detection
  5. User Interface:
    • Grammar input interface
    • Table visualization
    • Parsing simulation controls and display## Key Features for MVP

Grammar Management:

  • Input and validate context-free grammar
  • Convert grammar to proper format (eliminate left recursion, left factoring for LL(1))
  • Calculate FIRST and FOLLOW sets (essential for LL(1))

Parser Generation:

  • Construct LR(0) items and canonical collection
  • Build LR(0) parsing table with actions and go-to functions
  • Generate LL(1) parsing table

Parsing Simulation:

  • Step-by-step simulation of the parsing process
  • Display current stack, input, and actions at each step
  • Show derivations and reductions as they occur

Basic Visualization:

  • Text-based representation of automaton states
  • Visual representation of parse tables
  • Simple trace of parsing steps

Workflow

  1. Grammar Input Phase:
    • User enters grammar rules
    • System validates grammar format
    • System processes grammar (left recursion elimination, etc.)
  2. Parser Generation Phase:
    • User selects parser type (LR(0) or LL(1))
    • System generates appropriate sets and tables
    • System displays the generated tables
  3. Parsing Simulation Phase:
    • User enters an input string
    • User can step through the parsing process
    • System shows each step of the parsing process
    • System indicates acceptance or rejection of the input

Architecture

Core Components:

  1. Grammar Module:
    • Grammar representation
    • Grammar validation
    • Grammar transformation algorithms
  2. Analysis Module:
    • FIRST/FOLLOW set calculation
    • Item set construction
    • Closure algorithms
  3. Table Construction Module:
    • LL(1) table generator
    • LR(0) table generator
    • Conflict detection and reporting
  4. Parsing Engine:
    • Stack-based parser implementation for both types
    • Step-by-step execution logic
    • Error detection
  5. User Interface:
    • Grammar input interface
    • Table visualization
    • Parsing simulation controls and display