代码代写｜Programming Assignment 1
In this assignment, you will be writing code to simulate a FSA based regular expression engine.
The system you develop will need to generate the FSA structures that match a given Regex dynamically and then evaluate several series’ of inputs against that FSA to determine whether they are a match.
This assignment requires you to apply concepts and techniques covered in Chapters 0-4 of the Notes on FSAs (see course readings).
You’ll also need to document and thoroughly test your code using unit tests to ensure robust event handling techniques are being used.
The system will need to:
Event Driven systems are particularly prone to errors so you’ll also need to:
Version Control System
Your work must be stored and submitted using GitHub
You will need to log your progress by commenting on your commits
You will need to use Java & JUnit to complete this assignment.
Your code will be run using JDK 11
Your test code will be run using JUnit 4
Your implementation must not use any of the programming language’s inbuilt regular
expression parsing/evaluation libraries/classes.
Your implementation may use any other libraries/classes available in the standard JDK
and JUnit, but no other external libraries/classes.
Your programs will be executed with the commands shown below:
or for verbose mode
java RegexEngine -v
Tests compiled with:
Each Test run with:
java org.junit.runner.JUnitCore TestName_Test
Your program will need to read input from the terminal/command line’s standard input ( System.in ).
The expected input format is as follows:
In this assignment, a regular expression can consist of lower and upper case
letters, numbers, spaces, the alternation operator ( | ), the Kleene star and Kleene
plus operators ( * and + ), as well as brackets ( ( and ) ).
You are not expected to handle nested brackets.
Invalid input in this section should cause the program to print an error message
and exit with an exit code of 1.
Each string is on its own line; when a new line is entered, another string begins
(don’t forget to reset states)
A string can be empty/blank.
A string can contain whitespace and other control characters.