An open API service indexing awesome lists of open source software.

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.

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