Regular expression parser written in C++ for school project
<RE> ::= <simple-RE>
<simple-RE> ::= concatenation> | <basic-RE>
<concatenation> ::= <basic-RE> <simple-RE>
<basic-RE> ::= <star> | <plus> | <count> | <elementary-RE>
<star> ::= <elementary-RE> "*"
<count> ::= <elementary-Re> "{" any number "}"
<elementary-RE> ::= <character> | <group> | <any>
<group> ::= "(" <RE> ")"
<any> ::= "."
<character> ::= any non metacharacter
Either build by running the regex-parser.sln file containing the Visual Studio 2019 project file. Or build it with a C++ compiler and including all the headers and main.cpp file.
Run regex-parser from terminal.
.\regex-parser.exe "Waterloo" input.txt
First argument is the regex.
Second argument is the file containing the text