summaryrefslogtreecommitdiff
path: root/src/pkg/regexp
AgeCommit message (Collapse)AuthorFilesLines
2015-01-15Imported Upstream version 1.4upstream/1.4Tianon Gravi27-14990/+0
2014-06-19Imported Upstream version 1.3upstream/1.3Michael Stapelberg13-28/+1049
2013-12-03Imported Upstream version 1.2upstream/1.2Michael Stapelberg9-41/+70
2013-05-14Imported Upstream version 1.1upstream/1.1Michael Stapelberg2-11/+13
2013-03-04Imported Upstream version 1.1~hg20130304upstream/1.1_hg20130304Michael Stapelberg7-65/+453
2012-06-14Imported Upstream version 1.0.2upstream/1.0.2Ondřej Surý3-4/+15
2012-04-06Imported Upstream version 1upstream/1Ondřej Surý23-939/+12081
2011-09-13Imported Upstream version 60upstream/60Ondřej Surý4-0/+2397
2011-09-13Imported Upstream version 60Ondřej Surý4-2397/+0
2011-08-03Imported Upstream version 59upstream/59Ondřej Surý1-10/+11
2011-06-30Imported Upstream version 58upstream/58Ondřej Surý1-1/+1
2011-02-18Imported Upstream version 2011.02.15upstream/2011.02.15Ondřej Surý3-79/+242
2011-02-14Imported Upstream version 2011-02-01.1upstream/2011-02-01.1Ondřej Surý2-29/+24
2011-01-17Imported Upstream version 2011.01.12upstream/2011.01.12Ondřej Surý4-745/+1145
2010-06-22regexp: restore accidentally deleted test item.Rob Pike1-0/+1
R=rsc CC=golang-dev http://codereview.appspot.com/1714044
2010-06-22regexp: bug fix: need to track whether match begins with fixed prefix.Rob Pike2-17/+20
Fixes issue 872. R=rsc CC=golang-dev http://codereview.appspot.com/1731043
2010-06-02 Optimization to regexp _CharClass: keep track of overall range ofKyle Consalus2-10/+48
charclass to avoid unnecessarily iterating over ranges. Also, use the fact that IntVector is an []int to avoid method calls. On my machine, this brings us from ~27500 ns/op to ~17500 ns/op in the benchmark I've added (it is also faster in the case where a range check doesn't help, added a benchmark for this too.) I'd also like to propose that "[]", and "[^]" be disallowed. They aren't useful as far as I can tell, they aren't widely supported, and they make reasoning about character classes a bit more complicated. R=r CC=golang-dev http://codereview.appspot.com/1495041 Committer: Rob Pike <r@golang.org>
2010-04-26regexp: allow escaping of any punctuationRuss Cox2-4/+13
More in line with other regexp packages and egrep; accommodates overzealous escapers. R=r CC=golang-dev http://codereview.appspot.com/1008041
2010-03-31testing/regexp: use recover.Rob Pike1-3/+1
R=rsc CC=golang-dev http://codereview.appspot.com/816042 Committer: Rob Pike <r@golang.org>
2010-03-31regexp: use panic/recover to handle errorsRob Pike1-72/+50
R=rsc, gri CC=golang-dev http://codereview.appspot.com/821046
2010-03-26regexp: don't return non-nil *Regexp if there is an error.Rob Pike1-0/+3
R=gri CC=golang-dev http://codereview.appspot.com/787041
2010-03-24delete all uses of panicln by rewriting them using panic or,Rob Pike1-1/+1
in the tests, println+panic. gofmt some tests too. R=rsc CC=golang-dev http://codereview.appspot.com/741041
2010-03-16gofmt: more consistent formatting of const/var declsRobert Griesemer1-11/+11
- gofmt -w src misc - only manually modified file: src/pkg/go/printer/nodes.go R=rsc CC=golang-dev, r http://codereview.appspot.com/606041
2010-03-07regex: Remove unneeded imports from test.Christopher Wedgwood1-3/+0
R=rsc, adg, r CC=golang-dev http://codereview.appspot.com/264041 Committer: Rob Pike <r@golang.org>
2010-03-07regexp: add ReplaceAllFunc and ReplaceAllStringFuncAndrew Gerrand2-2/+64
R=r CC=golang-dev http://codereview.appspot.com/247041 Committer: Andrew Gerrand <adg@golang.org>
2010-02-25strings: delete Runes, BytesRuss Cox1-5/+5
gofmt -w -r 'strings.Bytes(a) -> []byte(a)' src/cmd src/pkg test/bench gofmt -w -r 'strings.Runes(a) -> []int(a)' src/cmd src/pkg test/bench delete unused imports R=r CC=golang-dev http://codereview.appspot.com/224062
2010-02-17The prefix optimization applies only to the first iteration.Rob Pike2-6/+17
Fixes issue 596. R=rsc CC=golang-dev http://codereview.appspot.com/206101 Committer: Rob Pike <r@golang.org>
2009-12-24Add query to find number of subexpressions.Peter Froehlich2-0/+31
This was convenient for me to have without being forced to parse the regexp myself. I'd understand if it's not really wanted, but I also think that some meta information about compiled regexps would be fine. R=r, rsc CC=golang-dev http://codereview.appspot.com/183044 Committer: Rob Pike <r@golang.org>
2009-12-151) Change default gofmt default settings forRobert Griesemer2-549/+549
parsing and printing to new syntax. Use -oldparser to parse the old syntax, use -oldprinter to print the old syntax. 2) Change default gofmt formatting settings to use tabs for indentation only and to use spaces for alignment. This will make the code alignment insensitive to an editor's tabwidth. Use -spaces=false to use tabs for alignment. 3) Manually changed src/exp/parser/parser_test.go so that it doesn't try to parse the parser's source files using the old syntax (they have new syntax now). 4) gofmt -w src misc test/bench 4th set of files. R=rsc CC=golang-dev http://codereview.appspot.com/180049
2009-11-24Change to container/vector interface:Robert Griesemer1-2/+2
- removed New(len int) in favor of new(Vector).Resize(len, cap) - removed Init(len int) in favor of Resize(len, cap) - runs all.bash Fixes issue 294. R=rsc, r, r1 http://codereview.appspot.com/157143
2009-11-23go: makes it build for the case $GOROOT has whitespacesSergio Luis O. B. Correia1-2/+2
the bash scripts and makefiles for building go didn't take into account the fact $GOROOT / $GOBIN could both be directories containing whitespaces, and was not possible to build it in such a situation. this commit adjusts the various makefiles/scripts to make it aware of that possibility, and now it builds successfully when using a path with whitespaces as well. Fixes issue 115. R=rsc, dsymonds1 http://codereview.appspot.com/157067 Committer: Russ Cox <rsc@golang.org>
2009-11-23fix bug in prefix code: must stop one character before any potential match ↵Rob Pike2-3/+8
of an empty string Fixes issue 308. R=rsc CC=golang-dev http://codereview.appspot.com/157142
2009-11-20gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkgRuss Cox1-7/+7
R=r, gri CC=golang-dev http://codereview.appspot.com/156115
2009-11-20fix buildRob Pike1-1/+0
R=rsc http://codereview.appspot.com/159044
2009-11-20slight simplification made possible by the code now processing match statesRob Pike1-4/+3
in order of discovery. R=rsc http://codereview.appspot.com/157112
2009-11-19add a match arena to regexp to avoid generating garbage.Rob Pike2-46/+133
simple regexps run 20x faster. the regex-dna benchmark goes 3x faster. R=rsc CC=golang-dev http://codereview.appspot.com/156108
2009-11-19two easy optimizations for regexp:Rob Pike2-13/+83
1) if char class contains a single character, make it a single character. (this is used to quote, e.g. [.] rather than \. 2) if regexp begins with ordinary text substring, use plain string match to start engine R=rsc CC=golang-dev http://codereview.appspot.com/157095
2009-11-18remove bytes.CopyRob Pike1-15/+7
replace all calls with calls to copy use copy in regexp and bytes.Buffer R=rsc CC=golang-dev http://codereview.appspot.com/157073
2009-11-14move evaluation of null-matching instructions one iteration earlier.Rob Pike2-41/+53
performance hit of about 20% but more intuitive results for submatches. we need a good regexp package at some point. Fixes issue 110. R=rsc CC=golang-dev http://codereview.appspot.com/152131
2009-11-12remove dead code from testRob Pike1-68/+8
R=rsc CC=golang-dev http://codereview.appspot.com/152118
2009-11-09- replaced gofmt expression formatting algorithm withRobert Griesemer2-25/+25
rsc's algorithm - applied gofmt -w misc src - partial CL (last chunk) R=rsc, r http://go/go-review/1024041
2009-11-09remove semis after statements in one-statement statement listsRobert Griesemer2-100/+100
R=rsc, r http://go/go-review/1025029
2009-11-06- fine-tuning of one-line func heuristic (nodes.go)Robert Griesemer1-93/+31
- enabled for function declarations (not just function literals) - applied gofmt -w $GOROOT/src (look for instance at src/pkg/debug/elf/elf.go) R=r, rsc CC=go-dev http://go/go-review/1026006
2009-11-05gofmt'ed missing regexp fileRobert Griesemer1-137/+187
(one-line functions will be re-established once we have all formatted uniformly) R=r http://go/go-review/1023004
2009-11-05manual fix for better gofmt resultRobert Griesemer1-2/+1
R=r http://go/go-review/1019005
2009-11-04panic can't print interfaces well so use err.String()Rob Pike1-1/+1
R=rsc http://go/go-review/1016041
2009-11-02eliminate goroutine from testing/regexp too.Rob Pike1-2/+2
R=rsc CC=go-dev http://go/go-review/1018021
2009-11-02take goroutines out of regexp so they can be createdRob Pike1-53/+77
during initialization. R=rsc CC=go-dev http://go/go-review/1016023
2009-10-08more lgtm files from gofmtRuss Cox1-3/+3
R=gri OCL=35485 CL=35488
2009-10-07apply gofmt to rand reflect regexp rpc runtime sort strconv strings sync ↵Russ Cox1-93/+95
syscall testing time unicode unsafe utf8 R=gri DELTA=1409 (79 added, 24 deleted, 1306 changed) OCL=35415 CL=35437