gbrolo / thompson-algorithm

Java program that creates an NFA from a valid regular expression using Thompson's algorithm.
MIT License
3 stars 2 forks source link

String match #1

Closed imrannazirbhat closed 4 years ago

imrannazirbhat commented 4 years ago

Hello,

Is there any provision to check if string matches with the given regex pattern?

Thank you!

gbrolo commented 4 years ago

Hi!

This was the first part of an SLR parser project. So, in this repository there's not any kind of string matching.

Checkout the other repositories in which RE is converted to an NFA and DFA: https://github.com/gbrolo/afd-construction https://github.com/gbrolo/dfa-minimization https://github.com/gbrolo/RE-to-NFA-DFA

And finally the SLR parser that works only for Cocol grammar: https://github.com/gbrolo/slr-parser

Note that this was just intended to be the first part on a compiler construction.