Using graph algorithm to simulate NFAs.
Input: NFA file, target string
Output: Accept/Reject, path (if accepted)
Parse regular expressions (only with '(', ')', '|', '*') with PDA, construct a tree. Then convert the tree into NFA.
Input: regexp, lines of strings
Output: strings that match the regexp
Add group to the regexp parser to simulate the mini-sed (msed). Prove msed is Turing-Complete by implementing a translation from Turing machines to msed.
Add backreference to the regexp parser.
Prove regexp with backreferences is NP-Complete by reducing it into SAT problem in polynomial time
- Language: Python
- Standard Libraries Used: All standard libraries except
re