https://github.com/aggstam/grammar_checker
This program checks if a word can be produced by a Grammar using Depth-First Search.
https://github.com/aggstam/grammar_checker
depth-first-search grammar-checker java
Last synced: about 2 months ago
JSON representation
This program checks if a word can be produced by a Grammar using Depth-First Search.
- Host: GitHub
- URL: https://github.com/aggstam/grammar_checker
- Owner: aggstam
- License: apache-2.0
- Created: 2018-06-28T16:50:15.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-31T17:42:59.000Z (over 3 years ago)
- Last Synced: 2025-01-12T20:33:33.813Z (over 1 year ago)
- Topics: depth-first-search, grammar-checker, java
- Language: Java
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# grammar_checker
This program checks if a word (given by the user) can be produced by a Grammar (read from a file given by the user),
using Depth-First Search [1].
A grammar example file has been provided to play with.
Note: project requires *java* to be installed.
## Usage
```shell
$ java Main.java
```
## Execution example
```shell
$ java Main.java
Give file name:
Grammar.txt
Enter a word:
12321
Word is not valid for the specific Grammar. Try again.
Enter a word:
101001
HOORAY!! The word can be produced by the specified Grammar.
```
## References
[1] https://en.wikipedia.org/wiki/Depth-first_search