![]() |
v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
|
Public Member Functions | |
JsonGrammar () | |
![]() | |
Grammar (Symbol *start) | |
std::optional< ParseResult > | Parse (const std::string &input) |
Public Attributes | |
Symbol | trueLiteral = {Rule({Token("true")})} |
Symbol | falseLiteral = {Rule({Token("false")})} |
Symbol | nullLiteral = {Rule({Token("null")})} |
Symbol | decimalLiteral |
Symbol | stringLiteral |
Symbol * | elementList = List<JsonValue>(&value, Token(",")) |
Symbol | array = {Rule({Token("["), elementList, Token("]")})} |
Symbol | member = {Rule({&stringLiteral, Token(":"), &value}, MakeMember)} |
Symbol * | memberList = List<JsonMember>(&member, Token(",")) |
Symbol | object = {Rule({Token("{"), memberList, Token("}")})} |
Symbol | value |
Symbol | file = {Rule({&value})} |
Static Private Member Functions | |
static bool | MatchWhitespace (InputPosition *pos) |
static bool | MatchStringLiteral (InputPosition *pos) |
static bool | MatchHexLiteral (InputPosition *pos) |
static bool | MatchDecimalLiteral (InputPosition *pos) |
Additional Inherited Members | |
![]() | |
using | PatternFunction = Lexer::PatternFunction |
![]() | |
Symbol * | Token (const std::string &s) |
Symbol * | Pattern (PatternFunction pattern) |
void | SetWhitespace (PatternFunction ws) |
Symbol * | NewSymbol (std::initializer_list< Rule > rules={}) |
Symbol * | Sequence (std::vector< Symbol * > symbols) |
template<class T , class Result = T> | |
Symbol * | TryOrDefault (Symbol *s) |
template<class T > | |
Symbol * | NonemptyList (Symbol *element, std::optional< Symbol * > separator={}) |
template<class T > | |
Symbol * | List (Symbol *element, std::optional< Symbol * > separator={}) |
template<class T > | |
Symbol * | Optional (Symbol *x) |
Symbol * | CheckIf (Symbol *x) |
Lexer & | lexer () |
![]() | |
static V8_EXPORT_PRIVATE bool | MatchChar (int(*char_class)(int), InputPosition *pos) |
static V8_EXPORT_PRIVATE bool | MatchChar (bool(*char_class)(char), InputPosition *pos) |
static V8_EXPORT_PRIVATE bool | MatchAnyChar (InputPosition *pos) |
static V8_EXPORT_PRIVATE bool | MatchString (const char *s, InputPosition *pos) |
static std::optional< ParseResult > | YieldMatchedInput (ParseResultIterator *child_results) |
template<class T , T value> | |
static std::optional< ParseResult > | YieldIntegralConstant (ParseResultIterator *child_results) |
template<class T > | |
static std::optional< ParseResult > | YieldDefaultValue (ParseResultIterator *child_results) |
template<class From , class To > | |
static std::optional< ParseResult > | CastParseResult (ParseResultIterator *child_results) |
template<class T > | |
static std::optional< ParseResult > | MakeSingletonVector (ParseResultIterator *child_results) |
template<class T > | |
static std::optional< ParseResult > | MakeExtendedVector (ParseResultIterator *child_results) |
Definition at line 84 of file json-parser.cc.
|
inline |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
Definition at line 85 of file json-parser.cc.
Symbol v8::internal::torque::ls::JsonGrammar::array = {Rule({Token("["), elementList, Token("]")})} |
Definition at line 164 of file json-parser.cc.
Symbol v8::internal::torque::ls::JsonGrammar::decimalLiteral |
Definition at line 156 of file json-parser.cc.
Definition at line 163 of file json-parser.cc.
Definition at line 153 of file json-parser.cc.
Definition at line 178 of file json-parser.cc.
Symbol v8::internal::torque::ls::JsonGrammar::member = {Rule({&stringLiteral, Token(":"), &value}, MakeMember)} |
Definition at line 166 of file json-parser.cc.
Symbol* v8::internal::torque::ls::JsonGrammar::memberList = List<JsonMember>(&member, Token(",")) |
Definition at line 167 of file json-parser.cc.
Definition at line 154 of file json-parser.cc.
Symbol v8::internal::torque::ls::JsonGrammar::object = {Rule({Token("{"), memberList, Token("}")})} |
Definition at line 168 of file json-parser.cc.
Symbol v8::internal::torque::ls::JsonGrammar::stringLiteral |
Definition at line 160 of file json-parser.cc.
Definition at line 152 of file json-parser.cc.
Symbol v8::internal::torque::ls::JsonGrammar::value |
Definition at line 170 of file json-parser.cc.