代码代写|Programming Assignment 1

这是一篇来自澳洲的编写代码来模拟基于FSA的正则表达式引擎的代码代写

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

Programming Language

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:

Compiled with

javac RegexEngine.java

Run with:

java RegexEngine

or for verbose mode

java RegexEngine -v

Tests compiled with:

javac *_Test.java

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.

expression.

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.