-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fixed a bug in `Re2.find_all_exn`, extant since 2014-01-23, in which it returns spurious extra matches. Using pattern `b` and input `aaaaaaaaaaaab` is expected to return a single match at the end of the input but instead returned the match multiple times, approximately as many times as `input length / min(match length, 1)`. Added tests for this function and also `get_matches` which uses the same code. - Updated to new version of upstream library.
- Loading branch information
Showing
70 changed files
with
743 additions
and
238 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
RE2 uses Gerrit instead of GitHub pull requests. | ||
See the [Contributing](https://github.com/google/re2/wiki/Contribute) wiki page. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright (c) 2009 The RE2 Authors. All rights reserved. | ||
// | ||
// Redistribution and use in source and binary forms, with or without | ||
// modification, are permitted provided that the following conditions are | ||
// met: | ||
// | ||
// * Redistributions of source code must retain the above copyright | ||
// notice, this list of conditions and the following disclaimer. | ||
// * Redistributions in binary form must reproduce the above | ||
// copyright notice, this list of conditions and the following disclaimer | ||
// in the documentation and/or other materials provided with the | ||
// distribution. | ||
// * Neither the name of Google Inc. nor the names of its | ||
// contributors may be used to endorse or promote products derived from | ||
// this software without specific prior written permission. | ||
// | ||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
This is the source code repository for RE2, a regular expression library. | ||
|
||
For documentation about how to install and use RE2, | ||
visit http://code.google.com/p/re2/. | ||
|
||
The short version is: | ||
|
||
make | ||
make test | ||
make install | ||
make testinstall | ||
|
||
Unless otherwise noted, the RE2 source files are distributed | ||
under the BSD-style license found in the LICENSE file. | ||
|
||
RE2's native language is C++. | ||
An Inferno wrapper is at http://code.google.com/p/inferno-re2/. | ||
A Python wrapper is at http://github.com/facebook/pyre2/. | ||
A Ruby wrapper is at http://github.com/axic/rre2/. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
out=$GOROOT/src/regexp/syntax/doc.go | ||
cp syntax.txt $out | ||
sam -d $out <<'!' | ||
,x g/NOT SUPPORTED/d | ||
/^Unicode character class/,$d | ||
,s/[«»]//g | ||
,x g/^Possessive repetitions:/d | ||
,x g/\\C/d | ||
,x g/Flag syntax/d | ||
,s/.=(true|false)/flag &/g | ||
,s/^Flags:/ Flag syntax is xyz (set) or -xyz (clear) or xy-z (set xy, clear z). The flags are:\n/ | ||
,s/\n\n\n+/\n\n/g | ||
,x/(^.* .*\n)+/ | awk -F' ' '{printf(" %-14s %s\n", $1, $2)}' | ||
1,2c | ||
// Copyright 2012 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
// DO NOT EDIT. This file is generated by mksyntaxgo from the RE2 distribution. | ||
/* | ||
Package syntax parses regular expressions into parse trees and compiles | ||
parse trees into programs. Most clients of regular expressions will use the | ||
facilities of package regexp (such as Compile and Match) instead of this package. | ||
Syntax | ||
The regular expression syntax understood by this package when parsing with the Perl flag is as follows. | ||
Parts of the syntax can be disabled by passing alternate flags to Parse. | ||
. | ||
$a | ||
*/ | ||
package syntax | ||
. | ||
w | ||
q | ||
! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.