v8
3.14.5(node0.10.28)
V8 is Google's open source JavaScript engine
|
#include <parser.h>
Public Member Functions | |
RegExpParser (FlatStringReader *in, Handle< String > *error, bool multiline_mode, Zone *zone) | |
RegExpTree * | ParsePattern () |
RegExpTree * | ParseDisjunction () |
RegExpTree * | ParseGroup () |
RegExpTree * | ParseCharacterClass () |
bool | ParseIntervalQuantifier (int *min_out, int *max_out) |
uc32 | ParseClassCharacterEscape () |
bool | ParseHexEscape (int length, uc32 *value) |
uc32 | ParseOctalLiteral () |
bool | ParseBackReferenceIndex (int *index_out) |
CharacterRange | ParseClassAtom (uc16 *char_class) |
RegExpTree * | ReportError (Vector< const char > message) |
void | Advance () |
void | Advance (int dist) |
void | Reset (int pos) |
bool | simple () |
bool | contains_anchor () |
void | set_contains_anchor () |
int | captures_started () |
int | position () |
bool | failed () |
Static Public Member Functions | |
static bool | ParseRegExp (FlatStringReader *input, bool multiline, RegExpCompileData *result, Zone *zone) |
Static Public Attributes | |
static const int | kMaxCaptures = 1 << 16 |
static const uc32 | kEndMarker = (1 << 21) |
RegExpParser | ( | FlatStringReader * | in, |
Handle< String > * | error, | ||
bool | multiline_mode, | ||
Zone * | zone | ||
) |
Definition at line 5010 of file parser.cc.
References RegExpParser::Advance().
void Advance | ( | ) |
Definition at line 5041 of file parser.cc.
References check(), v8::internal::CStrVector(), FlatStringReader::Get(), RegExpParser::kEndMarker, Isolate::kStackOverflowMessage, and RegExpParser::ReportError().
Referenced by RegExpParser::Advance(), RegExpParser::ParseBackReferenceIndex(), RegExpParser::ParseCharacterClass(), RegExpParser::ParseClassAtom(), RegExpParser::ParseClassCharacterEscape(), RegExpParser::ParseDisjunction(), RegExpParser::ParseHexEscape(), RegExpParser::ParseIntervalQuantifier(), RegExpParser::ParseOctalLiteral(), RegExpParser::RegExpParser(), and RegExpParser::Reset().
void Advance | ( | int | dist | ) |
Definition at line 5065 of file parser.cc.
References RegExpParser::Advance().
|
inline |
Definition at line 347 of file parser.h.
References v8::internal::NULL.
Referenced by RegExpParser::ParseBackReferenceIndex(), RegExpParser::ParseDisjunction(), and RegExpParser::ParseRegExp().
|
inline |
Definition at line 345 of file parser.h.
Referenced by RegExpParser::ParseRegExp().
|
inline |
Definition at line 349 of file parser.h.
Referenced by RegExpParser::ParseRegExp().
bool ParseBackReferenceIndex | ( | int * | index_out | ) |
Definition at line 5487 of file parser.cc.
References RegExpParser::Advance(), ASSERT, ASSERT_EQ, RegExpParser::captures_started(), v8::internal::IsDecimalDigit(), RegExpParser::kMaxCaptures, RegExpParser::position(), and RegExpParser::Reset().
Referenced by RegExpParser::ParseDisjunction().
RegExpTree * ParseCharacterClass | ( | ) |
Definition at line 5752 of file parser.cc.
References List< T, ZoneAllocationPolicy >::Add(), RegExpParser::Advance(), ASSERT_EQ, CHECK_FAILED, v8::internal::CStrVector(), CharacterRange::Everything(), CharacterRange::from(), RegExpParser::kEndMarker, RegExpParser::ParseClassAtom(), CharacterRange::Range(), RegExpParser::ReportError(), CharacterRange::Singleton(), and CharacterRange::to().
Referenced by RegExpParser::ParseDisjunction().
CharacterRange ParseClassAtom | ( | uc16 * | char_class | ) |
Definition at line 5712 of file parser.cc.
References RegExpParser::Advance(), ASSERT_EQ, CHECK_FAILED, v8::internal::CStrVector(), RegExpParser::kEndMarker, RegExpParser::ParseClassCharacterEscape(), RegExpParser::ReportError(), and CharacterRange::Singleton().
Referenced by RegExpParser::ParseCharacterClass().
uc32 ParseClassCharacterEscape | ( | ) |
Definition at line 5631 of file parser.cc.
References RegExpParser::Advance(), ASSERT, RegExpParser::ParseHexEscape(), and RegExpParser::ParseOctalLiteral().
Referenced by RegExpParser::ParseClassAtom().
RegExpTree * ParseDisjunction | ( | ) |
Definition at line 5109 of file parser.cc.
References RegExpBuilder::AddAssertion(), RegExpBuilder::AddAtom(), RegExpBuilder::AddCharacter(), CharacterRange::AddClassEscape(), RegExpBuilder::AddEmpty(), RegExpBuilder::AddQuantifierToAtom(), RegExpParser::Advance(), ASSERT, ASSERT_EQ, ASSERT_NE, RegExpAssertion::BOUNDARY, RegExpParser::captures_started(), CHECK_FAILED, v8::internal::CStrVector(), RegExpAssertion::END_OF_INPUT, RegExpAssertion::END_OF_LINE, RegExpQuantifier::GREEDY, RegExpParser::kEndMarker, RegExpTree::kInfinity, RegExpParser::kMaxCaptures, RegExpBuilder::NewAlternative(), RegExpAssertion::NON_BOUNDARY, RegExpQuantifier::NON_GREEDY, v8::internal::NULL, RegExpParser::ParseBackReferenceIndex(), RegExpParser::ParseCharacterClass(), RegExpParser::ParseHexEscape(), RegExpParser::ParseIntervalQuantifier(), RegExpParser::ParseOctalLiteral(), RegExpQuantifier::POSSESSIVE, RegExpParser::ReportError(), RegExpParser::set_contains_anchor(), RegExpAssertion::START_OF_INPUT, RegExpAssertion::START_OF_LINE, and RegExpBuilder::ToRegExp().
Referenced by RegExpParser::ParsePattern().
RegExpTree* ParseGroup | ( | ) |
bool ParseHexEscape | ( | int | length, |
uc32 * | value | ||
) |
Definition at line 5609 of file parser.cc.
References RegExpParser::Advance(), v8::internal::HexValue(), RegExpParser::position(), and RegExpParser::Reset().
Referenced by RegExpParser::ParseClassCharacterEscape(), and RegExpParser::ParseDisjunction().
bool ParseIntervalQuantifier | ( | int * | min_out, |
int * | max_out | ||
) |
Definition at line 5531 of file parser.cc.
References RegExpParser::Advance(), ASSERT_EQ, v8::internal::IsDecimalDigit(), RegExpTree::kInfinity, RegExpParser::position(), and RegExpParser::Reset().
Referenced by RegExpParser::ParseDisjunction().
uc32 ParseOctalLiteral | ( | ) |
Definition at line 5591 of file parser.cc.
References RegExpParser::Advance(), and ASSERT.
Referenced by RegExpParser::ParseClassCharacterEscape(), and RegExpParser::ParseDisjunction().
RegExpTree * ParsePattern | ( | ) |
Definition at line 5087 of file parser.cc.
References ASSERT, CHECK_FAILED, FlatStringReader::length(), and RegExpParser::ParseDisjunction().
Referenced by RegExpParser::ParseRegExp().
|
static |
Definition at line 5921 of file parser.cc.
References ASSERT, RegExpCompileData::capture_count, RegExpParser::captures_started(), RegExpParser::contains_anchor(), RegExpCompileData::contains_anchor, RegExpCompileData::error, RegExpParser::failed(), Handle< T >::is_null(), v8::internal::NULL, RegExpParser::ParsePattern(), RegExpParser::simple(), RegExpCompileData::simple, and RegExpCompileData::tree.
Referenced by RegExpImpl::Compile().
|
inline |
Definition at line 348 of file parser.h.
Referenced by RegExpParser::ParseBackReferenceIndex(), RegExpParser::ParseHexEscape(), and RegExpParser::ParseIntervalQuantifier().
RegExpTree * ReportError | ( | Vector< const char > | message | ) |
Definition at line 5075 of file parser.cc.
References RegExpParser::kEndMarker, FlatStringReader::length(), v8::internal::NOT_TENURED, and v8::internal::NULL.
Referenced by RegExpParser::Advance(), RegExpParser::ParseCharacterClass(), RegExpParser::ParseClassAtom(), and RegExpParser::ParseDisjunction().
void Reset | ( | int | pos | ) |
Definition at line 5059 of file parser.cc.
References RegExpParser::Advance().
Referenced by RegExpParser::ParseBackReferenceIndex(), RegExpParser::ParseHexEscape(), and RegExpParser::ParseIntervalQuantifier().
|
inline |
Definition at line 346 of file parser.h.
Referenced by RegExpParser::ParseDisjunction().
bool simple | ( | ) |
Definition at line 5071 of file parser.cc.
Referenced by RegExpParser::ParseRegExp().
|
static |
Definition at line 352 of file parser.h.
Referenced by RegExpParser::Advance(), RegExpParser::ParseCharacterClass(), RegExpParser::ParseClassAtom(), RegExpParser::ParseDisjunction(), and RegExpParser::ReportError().
|
static |
Definition at line 351 of file parser.h.
Referenced by RegExpParser::ParseBackReferenceIndex(), and RegExpParser::ParseDisjunction().