Ryan Avery

Regex to NFA


This project takes a regular expression and a number of strings as its input and then outputs whether or not each string is a part of the language described by the given regular expression. I created this project in Fall of 2016 for my CS-361, Theory of Computation class at Boiselarge project picture State University.

The way it works is first, the given regular expression is parsed using a recursive decent parser. Once this is finished, a Nondeterministic Finite Automata (NFA) is created to represent the language described by the regular expression. Finally, each input string is input into the NFA and the result is displayed as a yes or no value indicating whether or not the string is accepted into the language that was input.

The code for the NFA that is used for this project cannot be seen on the GitHub link below because for this project we were meant to use a jar of the NFA we had made earlier in the semester for a different project. If you want to see the code for the NFA, you can use the link below to get to GitHub or Bitbucket and look in the CS-361 directory for a project named NFA.