Skip to content

Latest commit

 

History

History
26 lines (22 loc) · 649 Bytes

README.md

File metadata and controls

26 lines (22 loc) · 649 Bytes

Regex Parser

This is a regex parser implementing by c++.

how to start

#include "regex.h"
#include<iostream>
using namespace std;

int main(){
    string pattern = "abc|ade";
    string input_str = "ade";
    Regex reg(it.pattern);//NFA
    Regex reg1(it.pattern,2);//DFA
    Regex reg2(it.pattern,2,True);//DFA minimize
    cout<<reg.match(input_str)<<endl;
    cout<<reg1.match(input_str)<<endl;
    cout<<reg2.match(input_str)<<endl;
    return 0;
}