A regular expression engine built in the Go programming langauge
The aim of this project is to write a program in the Go programming language that can build a non-deterministic finite automaton (NFA) from a regular expression, and can use the NFA to check if the regular expression matches any given string of text.
This program uses the Go programming language .
If you do not currently have Go installed click on the following link to download INSTALL GO
To clone the repository to your local machine, using your prefered command prompt, navigate to the folder you wish to download the files to and enter
git clone https://github.com/EddieEldridge/GoLangAutomaton
There is two ways to run this program
- Build and Run Navigate to the GoLangAutomata\main folder and enter the following to compile the code
go build main.go
This will create a .exe file in your current directory.To run the file that is created (note, unless specified, Go will name the .exe after the name of the folder which contrains the main.go file. E.g. in my case, my folder is called 'main' so an .exe called 'main.exe' is created)
main.exe
- Run to simply run the program in your command prompt enter the following
go run main.go
For more information on concepts discussed and used in this program, please refer to the Wiki and resources below.
-
Thompson's Construction (For help understanding the concepts that this project is based upon)
Edward Eldridge (G00337490)
- Dr. Ian Mcloughlin - For help with the foundations of the project
- Cian Gannon - For bringing my attention to the fact that '/r' and '/n' characters were being passed into the PostMatch function
