v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::torque::ls::JsonGrammar Class Reference
Inheritance diagram for v8::internal::torque::ls::JsonGrammar:
Collaboration diagram for v8::internal::torque::ls::JsonGrammar:

Public Member Functions

 JsonGrammar ()
 
- Public Member Functions inherited from v8::internal::torque::Grammar
 Grammar (Symbol *start)
 
std::optional< ParseResultParse (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
 
SymbolelementList = List<JsonValue>(&value, Token(","))
 
Symbol array = {Rule({Token("["), elementList, Token("]")})}
 
Symbol member = {Rule({&stringLiteral, Token(":"), &value}, MakeMember)}
 
SymbolmemberList = 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

- Public Types inherited from v8::internal::torque::Grammar
using PatternFunction = Lexer::PatternFunction
 
- Protected Member Functions inherited from v8::internal::torque::Grammar
SymbolToken (const std::string &s)
 
SymbolPattern (PatternFunction pattern)
 
void SetWhitespace (PatternFunction ws)
 
SymbolNewSymbol (std::initializer_list< Rule > rules={})
 
SymbolSequence (std::vector< Symbol * > symbols)
 
template<class T , class Result = T>
SymbolTryOrDefault (Symbol *s)
 
template<class T >
SymbolNonemptyList (Symbol *element, std::optional< Symbol * > separator={})
 
template<class T >
SymbolList (Symbol *element, std::optional< Symbol * > separator={})
 
template<class T >
SymbolOptional (Symbol *x)
 
SymbolCheckIf (Symbol *x)
 
Lexerlexer ()
 
- Static Protected Member Functions inherited from v8::internal::torque::Grammar
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< ParseResultYieldMatchedInput (ParseResultIterator *child_results)
 
template<class T , T value>
static std::optional< ParseResultYieldIntegralConstant (ParseResultIterator *child_results)
 
template<class T >
static std::optional< ParseResultYieldDefaultValue (ParseResultIterator *child_results)
 
template<class From , class To >
static std::optional< ParseResultCastParseResult (ParseResultIterator *child_results)
 
template<class T >
static std::optional< ParseResultMakeSingletonVector (ParseResultIterator *child_results)
 
template<class T >
static std::optional< ParseResultMakeExtendedVector (ParseResultIterator *child_results)
 

Detailed Description

Definition at line 84 of file json-parser.cc.

Constructor & Destructor Documentation

◆ JsonGrammar()

v8::internal::torque::ls::JsonGrammar::JsonGrammar ( )
inline

Definition at line 150 of file json-parser.cc.

Here is the call graph for this function:

Member Function Documentation

◆ MatchDecimalLiteral()

static bool v8::internal::torque::ls::JsonGrammar::MatchDecimalLiteral ( InputPosition * pos)
inlinestaticprivate

Definition at line 129 of file json-parser.cc.

Here is the call graph for this function:

◆ MatchHexLiteral()

static bool v8::internal::torque::ls::JsonGrammar::MatchHexLiteral ( InputPosition * pos)
inlinestaticprivate

Definition at line 117 of file json-parser.cc.

Here is the call graph for this function:

◆ MatchStringLiteral()

static bool v8::internal::torque::ls::JsonGrammar::MatchStringLiteral ( InputPosition * pos)
inlinestaticprivate

Definition at line 91 of file json-parser.cc.

Here is the call graph for this function:

◆ MatchWhitespace()

static bool v8::internal::torque::ls::JsonGrammar::MatchWhitespace ( InputPosition * pos)
inlinestaticprivate

Definition at line 85 of file json-parser.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ array

Symbol v8::internal::torque::ls::JsonGrammar::array = {Rule({Token("["), elementList, Token("]")})}

Definition at line 164 of file json-parser.cc.

◆ decimalLiteral

Symbol v8::internal::torque::ls::JsonGrammar::decimalLiteral
Initial value:
= {
Symbol * Pattern(PatternFunction pattern)
static std::optional< ParseResult > YieldMatchedInput(ParseResultIterator *child_results)
static bool MatchHexLiteral(InputPosition *pos)
static bool MatchDecimalLiteral(InputPosition *pos)

Definition at line 156 of file json-parser.cc.

◆ elementList

Symbol* v8::internal::torque::ls::JsonGrammar::elementList = List<JsonValue>(&value, Token(","))

Definition at line 163 of file json-parser.cc.

◆ falseLiteral

Symbol v8::internal::torque::ls::JsonGrammar::falseLiteral = {Rule({Token("false")})}

Definition at line 153 of file json-parser.cc.

◆ file

Symbol v8::internal::torque::ls::JsonGrammar::file = {Rule({&value})}

Definition at line 178 of file json-parser.cc.

◆ member

Symbol v8::internal::torque::ls::JsonGrammar::member = {Rule({&stringLiteral, Token(":"), &value}, MakeMember)}

Definition at line 166 of file json-parser.cc.

◆ memberList

Symbol* v8::internal::torque::ls::JsonGrammar::memberList = List<JsonMember>(&member, Token(","))

Definition at line 167 of file json-parser.cc.

◆ nullLiteral

Symbol v8::internal::torque::ls::JsonGrammar::nullLiteral = {Rule({Token("null")})}

Definition at line 154 of file json-parser.cc.

◆ object

Symbol v8::internal::torque::ls::JsonGrammar::object = {Rule({Token("{"), memberList, Token("}")})}

Definition at line 168 of file json-parser.cc.

◆ stringLiteral

Symbol v8::internal::torque::ls::JsonGrammar::stringLiteral
Initial value:
= {
static bool MatchStringLiteral(InputPosition *pos)

Definition at line 160 of file json-parser.cc.

◆ trueLiteral

Symbol v8::internal::torque::ls::JsonGrammar::trueLiteral = {Rule({Token("true")})}

Definition at line 152 of file json-parser.cc.

◆ value

Symbol v8::internal::torque::ls::JsonGrammar::value
Initial value:
Rule({&object}, MakeObject),
Rule({&array}, MakeArray)}
std::optional< ParseResult > MakeNumberLiteral(ParseResultIterator *child_results)
std::optional< ParseResult > MakeNullLiteral(ParseResultIterator *child_results)
std::optional< ParseResult > MakeObject(ParseResultIterator *child_results)
std::optional< ParseResult > MakeBoolLiteral(ParseResultIterator *child_results)
std::optional< ParseResult > MakeArray(ParseResultIterator *child_results)
std::optional< ParseResult > MakeStringLiteral(ParseResultIterator *child_results)

Definition at line 170 of file json-parser.cc.


The documentation for this class was generated from the following file: