thompson-regex-js
thompson-regex-js copied to clipboard
Thompson's NFA construction algorithm in javascript
thompson-regex-js
Click here for a demo
This code implements a regular expression library, including:
- A parser that maps regular expressions to an abstract syntax tree
- A compiler that evaluates the abstract syntax tree to an automaton
- A simulator that runs the automaton against input strings
This is largely a reimplementation of Russ Cox's work in javascript.