GithubHelp home page GithubHelp logo

solatar / regextonfa Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 405 KB

University course project on Data Structures and Algorithms

Java 100.00%
automata java-11 java-fx maven regular-expressions shunting-yard-algorithm thompson-construction

regextonfa's Introduction

RegexToNfa Application

University course project on Data Structures and Algorithms.

The app takes a regular expression and a string as input, builds an NFA fron the regex and checks whether it accepts the string.

The application uses Shunting-Yard and Thompson's construction algorithms. Due to the nature of the latter, the app adds character '.' between concatenated characters. For example, (a|b|c)*abc becomes (a|b|c)*.a.b.c. User may enter their regex in regular form. Parentheses are used for grouping characters but they are dropped when regex is converted into postfix form.

Currently the app supports these regular expression operations (in the order of precedence): . for concatenation, | for alternation * for closure (zero or more) and + for one or more.

Requirements specification

User Manual

Implementation report

Testing report

Weekly progress

regextonfa's People

Contributors

solatar avatar

Watchers

 avatar

regextonfa's Issues

Code review

Downloaded zip-file 8.10.2022 at 5pm

I was not able to run the code on my computer due to the JavaFx dependencies, so I settled for just reading the code.
The quality of code seems good and comments made to the code helped a lot in reading the code. Unit testing is also comprehensive enough, testing the important classes.

Couple of suggestions:

-All the classes are currently in the same package. I think dividing UI classes and functionality classes into different packages would make things more clear.

-The method constructNfa is quite long. Would it be possible to divide it into smaller methods?

I found it quite hard to find things to suggest, which I suppose means that the project is in a really good state. Good luck with the rest of the project!

Peer review

Downloaded the project at 22.00 on October 15.

Running the application works and the tests (9) show no failures or errors.

Due to the project being about regular epressions and nfa, it takes some time to understand the code, but the code is very well commented which helps a lot. The algorithms do their job nicely.

I would divide the UI and application logic classes into different packages, and add a small explanation what each class does at the top of the class.

If I were to suggest an addition, I would include a small guide/a few examples in the UI of simple regex expressions the user can try.

Nice work and good luck with the rest of the project ๐Ÿ‘

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.