]> Cypherpunks repositories - gostls13.git/commit
exp/regexp: bug fixes and RE2 tests
authorRuss Cox <rsc@golang.org>
Wed, 7 Sep 2011 19:48:06 +0000 (15:48 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 7 Sep 2011 19:48:06 +0000 (15:48 -0400)
commit08ae1a5a23e68056dad09ea48e53c4fae36e37b1
tree54f9a72220d259af4f95cade7e05a7048c7cc3b8
parenta2c2c874396f50301d48efa6e456573a53bea98c
exp/regexp: bug fixes and RE2 tests

Also add exp/regexp to build (forgot before).

At this point I am very confident in exp/regexp's
behavior.  It should be usable as a drop-in
replacement for regexp now.

Later CLs could introduce a CompilePOSIX
to get at traditional POSIX ``extended regular expressions''
as in egrep and also an re.MatchLongest method to
change the matching mode to leftmost longest
instead of leftmost first.  On the other hand, I expect
very few people to use either.

R=r, r, gustavo
CC=golang-dev
https://golang.org/cl/4990041
12 files changed:
src/pkg/Makefile
src/pkg/exp/regexp/exec.go
src/pkg/exp/regexp/exec_test.go [new file with mode: 0644]
src/pkg/exp/regexp/find_test.go
src/pkg/exp/regexp/re2.txt.gz [new file with mode: 0644]
src/pkg/exp/regexp/regexp.go
src/pkg/exp/regexp/syntax/compile.go
src/pkg/exp/regexp/syntax/parse.go
src/pkg/exp/regexp/syntax/parse_test.go
src/pkg/exp/regexp/syntax/prog.go
src/pkg/exp/regexp/syntax/prog_test.go
src/pkg/exp/regexp/syntax/regexp.go