Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(230)

Issue 9110: Experimental: Fixed bug in RegExp Parser. Added feature counting in parser. (Closed)

Created:
12 years, 1 month ago by Lasse Reichstein
Modified:
9 years, 6 months ago
CC:
v8-dev
Visibility:
Public.

Description

The RegExp parser properly handles special escapes and quantifiers after atoms. The RegExp Compile function reuses the pattern as indexOf argument if it doesn't contain escapes (otherwise the parsed atom text is used).

Patch Set 1 #

Patch Set 2 : Rewrite of RegExp parser to a bottom-up model. #

Patch Set 3 : Addresses review comments (formatting) #

Patch Set 4 : Merged changes to tip of experimental branch. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+578 lines, -275 lines) Patch
M regexp2000/src/ast.h View 1 2 3 2 chunks +6 lines, -4 lines 0 comments Download
M regexp2000/src/jsregexp.h View 1 2 3 2 chunks +8 lines, -4 lines 0 comments Download
M regexp2000/src/jsregexp.cc View 1 2 3 3 chunks +16 lines, -9 lines 0 comments Download
M regexp2000/src/list.h View 1 chunk +1 line, -1 line 0 comments Download
M regexp2000/src/list-inl.h View 1 chunk +1 line, -1 line 0 comments Download
M regexp2000/src/parser.h View 1 1 chunk +3 lines, -1 line 0 comments Download
M regexp2000/src/parser.cc View 1 2 3 25 chunks +453 lines, -231 lines 0 comments Download
M regexp2000/test/cctest/test-regexp.cc View 1 2 3 8 chunks +88 lines, -22 lines 0 comments Download
M regexp2000/test/mjsunit/non-ascii-replace.js View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Lasse Reichstein
RegExp code review
12 years, 1 month ago (2008-11-04 13:57:11 UTC) #1
Christian Plesner Hansen
As discussed I think we need to tune this a bit more. http://codereview.chromium.org/9110/diff/1/3 File regexp2000/src/jsregexp.cc ...
12 years, 1 month ago (2008-11-04 14:31:01 UTC) #2
Lasse Reichstein
Addressed comments by removing generalized features and rewriting parser to favor literal characters. Please re-review.
12 years, 1 month ago (2008-11-05 12:18:26 UTC) #3
Christian Plesner Hansen
12 years, 1 month ago (2008-11-05 12:44:11 UTC) #4
Lgtm, except for a bit of indentation confusion in the parser.

http://codereview.chromium.org/9110/diff/204/208
File regexp2000/src/parser.cc (right):

http://codereview.chromium.org/9110/diff/204/208#newcode3522
Line 3522: case kEndMarker:
Case clauses should be indented.

http://codereview.chromium.org/9110/diff/204/208#newcode3571
Line 3571: switch (next()) {
4-character indentation?

http://codereview.chromium.org/9110/diff/204/208#newcode3572
Line 3572: case kEndMarker:
Should be indented.

http://codereview.chromium.org/9110/diff/204/208#newcode3691
Line 3691: case '*':
1-character indentation?!?

Powered by Google App Engine
This is Rietveld 408576698