aboutsummaryrefslogtreecommitdiff
path: root/compiler/compiler.go
blob: 153ad779899e442dfc2b31d0948cc6b5977f46cd (plain) (blame)
1
2
3
4
5
6
7
8
9
package compiler

func Compile(regexps map[int][]byte) (*DFA, error) {
	root, symTab, err := parse(regexps)
	if err != nil {
		return nil, err
	}
	return genDFA(root, symTab), nil
}