Skip to content

aggstam/grammar_checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

% java Main.java

Execution example

❯ 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

About

This program checks if a word can be produced by a Grammar using Depth-First Search.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages