Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ansleysze/bracketpda
Simulate a PDA by final state in Python that accepts a string containing balanced brackets of different types. A valid string starts and ends with an exclamation point (!)
https://github.com/ansleysze/bracketpda
Last synced: 12 days ago
JSON representation
Simulate a PDA by final state in Python that accepts a string containing balanced brackets of different types. A valid string starts and ends with an exclamation point (!)
- Host: GitHub
- URL: https://github.com/ansleysze/bracketpda
- Owner: ansleysze
- Created: 2024-04-02T04:03:56.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-07-23T06:18:51.000Z (4 months ago)
- Last Synced: 2024-07-23T08:20:58.390Z (4 months ago)
- Language: Python
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Created for a school project requirement
# BracketPDA
This Python project implements a Pushdown Automaton (PDA) to validate strings for balanced bracket sequences. The PDA simulates the behavior of a stack machine to check whether the brackets in a given string are properly balanced. Provide input strings when prompted. Make sure the input string starts and ends with an exclamation mark (!) .The program should simulate the way a PDA would process strings. The PDA’s components (e.g. states, transitions, stack) should be represented through some methods or data structures in Python.
Debugged by Teodoro Cruz III# Features
Validates strings for balanced bracket sequences.
Handles the following bracket types: (), [], {}, <>.
Handles nested brackets.
Provides detailed error messages for invalid strings.
Implemented using Python.