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
- Grammar Input Phase:
- User enters grammar rules
- System validates grammar format
- System processes grammar (left recursion elimination, etc.)
- Parser Generation Phase:
- User selects parser type (LR(0) or LL(1))
- System generates appropriate sets and tables
- System displays the generated tables
- 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
Core Components:
- Grammar Module:
- Grammar representation
- Grammar validation
- Grammar transformation algorithms
- Analysis Module:
- FIRST/FOLLOW set calculation
- Item set construction
- Closure algorithms
- Table Construction Module:
- LL(1) table generator
- LR(0) table generator
- Conflict detection and reporting
- Parsing Engine:
- Stack-based parser implementation for both types
- Step-by-step execution logic
- Error detection
- 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
- Grammar Input Phase:
- User enters grammar rules
- System validates grammar format
- System processes grammar (left recursion elimination, etc.)
- Parser Generation Phase:
- User selects parser type (LR(0) or LL(1))
- System generates appropriate sets and tables
- System displays the generated tables
- 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
Core Components:
- Grammar Module:
- Grammar representation
- Grammar validation
- Grammar transformation algorithms
- Analysis Module:
- FIRST/FOLLOW set calculation
- Item set construction
- Closure algorithms
- Table Construction Module:
- LL(1) table generator
- LR(0) table generator
- Conflict detection and reporting
- Parsing Engine:
- Stack-based parser implementation for both types
- Step-by-step execution logic
- Error detection
- User Interface:
- Grammar input interface
- Table visualization
- Parsing simulation controls and display