Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(86)

Issue 4237051: code review 4237051: re2: add endpos to RE2::Match, fix bugs (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 7 months ago by rsc
Modified:
14 years, 7 months ago
Reviewers:
CC:
r, rsc_swtch, re2-dev_googlegroups.com
Visibility:
Public.

Description

re2: add endpos to RE2::Match, fix bugs Adding endpos to RE2::Match allows callers to limit the ending position of matches to points before the end of the text. Found and fixed a few bugs involving startpos and endpos not being handled properly. These would only affect callers using Match directly. They cannot affect callers using FullMatch, PartialMatch, and DoMatch, because those always use startpos == 0.

Patch Set 1 #

Patch Set 2 : diff -r 160e31271912 https://re2.googlecode.com/hg/ #

Patch Set 3 : diff -r 160e31271912 https://re2.googlecode.com/hg/ #

Total comments: 1

Patch Set 4 : diff -r 160e31271912 https://re2.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+160 lines, -96 lines) Patch
M re2/dfa.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M re2/re2.h View 1 2 chunks +3 lines, -1 line 0 comments Download
M re2/re2.cc View 1 8 chunks +18 lines, -5 lines 0 comments Download
M re2/regexp.cc View 1 2 1 chunk +36 lines, -40 lines 0 comments Download
M re2/testing/re2_test.cc View 1 3 chunks +7 lines, -5 lines 0 comments Download
M re2/testing/search_test.cc View 1 1 chunk +33 lines, -0 lines 0 comments Download
M re2/testing/tester.h View 1 2 3 2 chunks +13 lines, -0 lines 0 comments Download
M re2/testing/tester.cc View 1 2 8 chunks +48 lines, -44 lines 0 comments Download

Messages

Total messages: 4
rsc
Hello r (cc: re2-dev@googlegroups.com), I'd like you to review this change to https://re2.googlecode.com/hg/
14 years, 7 months ago (2011-03-02 20:47:19 UTC) #1
r
LGTM http://codereview.appspot.com/4237051/diff/5001/re2/testing/tester.h File re2/testing/tester.h (right): http://codereview.appspot.com/4237051/diff/5001/re2/testing/tester.h#newcode44 re2/testing/tester.h:44: } i'll presume this is necessary without further ...
14 years, 7 months ago (2011-03-02 20:54:42 UTC) #2
rsc_swtch
// Make normal math on the enum preserve the type. // By default, C++ doesn't ...
14 years, 7 months ago (2011-03-02 20:58:13 UTC) #3
rsc
14 years, 7 months ago (2011-03-02 20:59:51 UTC) #4
*** Submitted as http://code.google.com/p/re2/source/detail?r=d9f8806c004d ***

re2: add endpos to RE2::Match, fix bugs

Adding endpos to RE2::Match allows callers to limit the ending
position of matches to points before the end of the text.

Found and fixed a few bugs involving startpos and endpos not
being handled properly.  These would only affect callers using
Match directly.  They cannot affect callers using FullMatch,
PartialMatch, and DoMatch, because those always use startpos == 0.

R=r, rsc_swtch
CC=re2-dev
http://codereview.appspot.com/4237051
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b