Skip to content

Regular expression parser written in C++ for school project

License

Notifications You must be signed in to change notification settings

Adilius/regex-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Regular Expression Parser

Regular expression parser written in C++ for school project

Grammar

<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

Build

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

Run regex-parser from terminal. .\regex-parser.exe "Waterloo" input.txt First argument is the regex. Second argument is the file containing the text

Output

output1 output2 output3

About

Regular expression parser written in C++ for school project

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages