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

Side by Side Diff: runtime/vm/regexp_parser.h

Issue 539153002: Port and integrate the irregexp engine from V8 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Port remaining V8 regexp tests and fix exposed bugs. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_REGEXP_PARSER_H_ 5 #ifndef VM_REGEXP_PARSER_H_
6 #define VM_REGEXP_PARSER_H_ 6 #define VM_REGEXP_PARSER_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/growable_array.h" 9 #include "vm/growable_array.h"
10 #include "vm/regexp_ast.h" 10 #include "vm/regexp_ast.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #define LAST(x) 47 #define LAST(x)
48 #endif 48 #endif
49 }; 49 };
50 50
51 class RegExpParser : public ValueObject { 51 class RegExpParser : public ValueObject {
52 public: 52 public:
53 RegExpParser(const String& in, 53 RegExpParser(const String& in,
54 String* error, 54 String* error,
55 bool multiline_mode); 55 bool multiline_mode);
56 56
57 static bool ParseFunction(ParsedFunction* parsed_function);
58
57 static bool ParseRegExp(const String& input, 59 static bool ParseRegExp(const String& input,
58 bool multiline, 60 bool multiline,
59 RegExpCompileData* result); 61 RegExpCompileData* result);
60 62
61 RegExpTree* ParsePattern(); 63 RegExpTree* ParsePattern();
62 RegExpTree* ParseDisjunction(); 64 RegExpTree* ParseDisjunction();
63 RegExpTree* ParseGroup(); 65 RegExpTree* ParseGroup();
64 RegExpTree* ParseCharacterClass(); 66 RegExpTree* ParseCharacterClass();
65 67
66 // Parses a {...,...} quantifier and stores the range in the given 68 // Parses a {...,...} quantifier and stores the range in the given
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 bool multiline_; 167 bool multiline_;
166 bool simple_; 168 bool simple_;
167 bool contains_anchor_; 169 bool contains_anchor_;
168 bool is_scanned_for_captures_; 170 bool is_scanned_for_captures_;
169 bool failed_; 171 bool failed_;
170 }; 172 };
171 173
172 } // namespace dart 174 } // namespace dart
173 175
174 #endif // VM_REGEXP_PARSER_H_ 176 #endif // VM_REGEXP_PARSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698