summaryrefslogtreecommitdiff
path: root/src/regexp/syntax/parse_test.go
Commit message (Collapse)AuthorAgeFilesLines
* all: make copyright headers consistent with one space after periodBrad Fitzpatrick2016-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | This is a subset of https://golang.org/cl/20022 with only the copyright header lines, so the next CL will be smaller and more reviewable. Go policy has been single space after periods in comments for some time. The copyright header template at: https://golang.org/doc/contribute.html#copyright also uses a single space. Make them all consistent. Change-Id: Icc26c6b8495c3820da6b171ca96a74701b4a01b0 Reviewed-on: https://go-review.googlesource.com/20111 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
* regexp/syntax: fix factoring of common prefixes in alternationsPaul Wankadia2016-01-081-3/+4
| | | | | | | | | | | | | In the past, `a.*?c|a.*?b` was factored to `a.*?[bc]`. Thus, given "abc" as its input string, the automaton would consume "ab" and then stop (when unanchored) whereas it should consume all of "abc" as per leftmost semantics. Fixes #13812. Change-Id: I67ac0a353d7793b3d0c9c4aaf22d157621dfe784 Reviewed-on: https://go-review.googlesource.com/18357 Reviewed-by: Russ Cox <rsc@golang.org>
* regexp/syntax: fix handling of \Q...\ERuss Cox2015-12-011-0/+2
| | | | | | | | | | | | | | | It's not a group: must handle the inside as a sequence of literal chars, not a single literal string. That is, \Qab\E+ is the same as ab+, not (ab)+. Fixes #11187. Change-Id: I5406d05ccf7efff3a7f15395bdb0cfb2bd23a8ed Reviewed-on: https://go-review.googlesource.com/17233 Reviewed-by: David Crawshaw <crawshaw@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* regexp/syntax: reject large repetitions created by nesting small onesRuss Cox2014-09-301-0/+13
| | | | | | | | | Fixes #7609. LGTM=r R=r CC=golang-codereviews https://golang.org/cl/150270043
* build: move package sources from src/pkg to srcRuss Cox2014-09-081-0/+559
Preparation was in CL 134570043. This CL contains only the effect of 'hg mv src/pkg/* src'. For more about the move, see golang.org/s/go14nopkg.