Skip to content

Commit c53b340

Browse files
committed
add readme
1 parent 7529b5a commit c53b340

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Regex compiler
2+
3+
Thompson's algorithm for parsing regular expressions
4+
5+
Steps:
6+
* parse infix to postfix
7+
* compile postfix to NFA
8+
* walk nfa with input
9+
10+
Supported grammars:
11+
* `|`
12+
* `(` `)`
13+
* `*`
14+
15+
Inspired by <a href="https://swtch.com/~rsc/regexp/regexp1.html">Regular Expression Matching Can Be Simple And Fast </a> by Russ Cox

0 commit comments

Comments
 (0)