PDAFT is a Pushdown Automaton (PDA) simulation example that checks the validity of a given mathematical expression.
This simulation involves:
- PDA Class: Implements the core logic of the PDA, including state transitions and stack operations.
- State Transitions: Defines how the PDA transitions between states based on input characters.
- Logging: Keeps a log of each stage of the PDA processing for debugging and educational purposes.
- Flask Web Interface: Provides a web interface to input mathematical expressions and visualize the PDA processing stages.
- Validation: The PDA can determine if the mathematical expression is valid or invalid based on the final state and stack configuration.
- User Interaction: Users can input mathematical expressions through the web interface, and the results are displayed along with the detailed processing stages.
The PDA simulation supports the following characters:
- Digits (0-9)
- Operators (+, -, *, /)
- Parentheses (())
- Positive Numbers
The primary goal of this simulation is to provide a clear and interactive way to understand how a Pushdown Automaton works, especially in the context of validating mathematical expressions.