OLD | NEW |
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 RUNTIME_VM_REGEXP_PARSER_H_ | 5 #ifndef RUNTIME_VM_REGEXP_PARSER_H_ |
6 #define RUNTIME_VM_REGEXP_PARSER_H_ | 6 #define RUNTIME_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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 #define LAST(x) last_added_ = x; | 46 #define LAST(x) last_added_ = x; |
47 #else | 47 #else |
48 #define LAST(x) | 48 #define LAST(x) |
49 #endif | 49 #endif |
50 }; | 50 }; |
51 | 51 |
52 class RegExpParser : public ValueObject { | 52 class RegExpParser : public ValueObject { |
53 public: | 53 public: |
54 RegExpParser(const String& in, String* error, bool multiline_mode); | 54 RegExpParser(const String& in, String* error, bool multiline_mode); |
55 | 55 |
56 static bool ParseFunction(ParsedFunction* parsed_function); | |
57 | |
58 static bool ParseRegExp(const String& input, | 56 static bool ParseRegExp(const String& input, |
59 bool multiline, | 57 bool multiline, |
60 RegExpCompileData* result); | 58 RegExpCompileData* result); |
61 | 59 |
62 RegExpTree* ParsePattern(); | 60 RegExpTree* ParsePattern(); |
63 RegExpTree* ParseDisjunction(); | 61 RegExpTree* ParseDisjunction(); |
64 RegExpTree* ParseGroup(); | 62 RegExpTree* ParseGroup(); |
65 RegExpTree* ParseCharacterClass(); | 63 RegExpTree* ParseCharacterClass(); |
66 | 64 |
67 // Parses a {...,...} quantifier and stores the range in the given | 65 // Parses a {...,...} quantifier and stores the range in the given |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 bool multiline_; | 165 bool multiline_; |
168 bool simple_; | 166 bool simple_; |
169 bool contains_anchor_; | 167 bool contains_anchor_; |
170 bool is_scanned_for_captures_; | 168 bool is_scanned_for_captures_; |
171 bool failed_; | 169 bool failed_; |
172 }; | 170 }; |
173 | 171 |
174 } // namespace dart | 172 } // namespace dart |
175 | 173 |
176 #endif // RUNTIME_VM_REGEXP_PARSER_H_ | 174 #endif // RUNTIME_VM_REGEXP_PARSER_H_ |
OLD | NEW |