演算子 *
, |
とカッコ ()
のみ対応した正規表現エンジンです。
機能は以下の3つです。
- パースした構文木の出力
- NFAの状態遷移図の出力
- 正規表現の受理判定
$ go run main.go -regexp "(a|bc)*" -input "aabcabcbca"
(a|bc)* accepts aabcabcbca.
(a|bc)*
- Golang
- Graphviz処理ツール
$ go run main.go -regexp <Regular expression> -ast
$ go run main.go -regexp <Regular expression> -state-diagram
$ go run main.go -regexp <Regular expression> -input <Input string>