| LLDB mainline
    | 
Pure recursive descent parser for C++ like expressions. More...
#include <DILParser.h>
| Public Member Functions | |
| ~DILParser ()=default | |
| bool | UseSynthetic () | 
| bool | UseFragileIvar () | 
| bool | CheckPtrVsMember () | 
| lldb::DynamicValueType | UseDynamic () | 
| Static Public Member Functions | |
| static llvm::Expected< ASTNodeUP > | Parse (llvm::StringRef dil_input_expr, DILLexer lexer, std::shared_ptr< StackFrame > frame_sp, lldb::DynamicValueType use_dynamic, bool use_synthetic, bool fragile_ivar, bool check_ptr_vs_member) | 
| Private Member Functions | |
| DILParser (llvm::StringRef dil_input_expr, DILLexer lexer, std::shared_ptr< StackFrame > frame_sp, lldb::DynamicValueType use_dynamic, bool use_synthetic, bool fragile_ivar, bool check_ptr_vs_member, llvm::Error &error) | |
| ASTNodeUP | Run () | 
| ASTNodeUP | ParseExpression () | 
| ASTNodeUP | ParseUnaryExpression () | 
| ASTNodeUP | ParsePostfixExpression () | 
| ASTNodeUP | ParsePrimaryExpression () | 
| std::string | ParseNestedNameSpecifier () | 
| std::string | ParseIdExpression () | 
| std::string | ParseUnqualifiedId () | 
| std::optional< int64_t > | ParseIntegerConstant () | 
| ASTNodeUP | ParseNumericLiteral () | 
| ASTNodeUP | ParseIntegerLiteral () | 
| ASTNodeUP | ParseFloatingPointLiteral () | 
| ASTNodeUP | ParseBooleanLiteral () | 
| void | BailOut (const std::string &error, uint32_t loc, uint16_t err_len) | 
| void | Expect (Token::Kind kind) | 
| void | ExpectOneOf (std::vector< Token::Kind > kinds_vec) | 
| void | TentativeParsingRollback (uint32_t saved_idx) | 
| Token | CurToken () | 
| Private Attributes | |
| std::shared_ptr< StackFrame > | m_ctx_scope | 
| llvm::StringRef | m_input_expr | 
| DILLexer | m_dil_lexer | 
| llvm::Error & | m_error | 
| lldb::DynamicValueType | m_use_dynamic | 
| bool | m_use_synthetic | 
| bool | m_fragile_ivar | 
| bool | m_check_ptr_vs_member | 
Pure recursive descent parser for C++ like expressions.
EBNF grammar for the parser is described in lldb/docs/dil-expr-lang.ebnf
Definition at line 61 of file DILParser.h.
| 
 | default | 
| 
 | explicitprivate | 
Definition at line 62 of file DILParser.cpp.
References error(), m_check_ptr_vs_member, m_ctx_scope, m_dil_lexer, m_error, m_fragile_ivar, m_input_expr, m_use_dynamic, and m_use_synthetic.
Referenced by Parse().
| 
 | private | 
Definition at line 356 of file DILParser.cpp.
References error(), m_dil_lexer, m_error, and m_input_expr.
Referenced by Expect(), ExpectOneOf(), ParseNestedNameSpecifier(), ParseNumericLiteral(), ParsePostfixExpression(), and ParsePrimaryExpression().
| 
 | inline | 
Definition at line 76 of file DILParser.h.
References m_check_ptr_vs_member.
| 
 | inlineprivate | 
Definition at line 116 of file DILParser.h.
References m_dil_lexer.
Referenced by Expect(), ExpectOneOf(), ParseBooleanLiteral(), ParseFloatingPointLiteral(), ParseIdExpression(), ParseIntegerConstant(), ParseIntegerLiteral(), ParseNestedNameSpecifier(), ParseNumericLiteral(), ParsePostfixExpression(), ParsePrimaryExpression(), ParseUnaryExpression(), and ParseUnqualifiedId().
| 
 | private | 
Definition at line 457 of file DILParser.cpp.
References BailOut(), and CurToken().
Referenced by ParseIdExpression(), ParseNestedNameSpecifier(), ParsePostfixExpression(), ParsePrimaryExpression(), ParseUnqualifiedId(), and Run().
| 
 | private | 
Definition at line 464 of file DILParser.cpp.
References BailOut(), and CurToken().
Referenced by ParseBooleanLiteral().
| 
 | static | 
Definition at line 46 of file DILParser.cpp.
References DILParser(), error(), and Run().
Referenced by lldb_private::StackFrame::DILGetValueForVariableExpressionPath().
| 
 | private | 
Definition at line 348 of file DILParser.cpp.
References CurToken(), ExpectOneOf(), lldb_private::dil::Token::GetLocation(), lldb_private::dil::Token::Is(), lldb_private::dil::Token::kw_false, lldb_private::dil::Token::kw_true, and m_dil_lexer.
Referenced by ParsePrimaryExpression().
| 
 | private | 
Definition at line 85 of file DILParser.cpp.
References ParseUnaryExpression().
Referenced by ParsePrimaryExpression(), ParseUnaryExpression(), and Run().
| 
 | private | 
Definition at line 441 of file DILParser.cpp.
References CurToken(), lldb_private::dil::Token::GetLocation(), and lldb_private::dil::Token::GetSpelling().
Referenced by ParseNumericLiteral().
| 
 | private | 
Definition at line 290 of file DILParser.cpp.
References lldb_private::dil::Token::coloncolon, CurToken(), Expect(), lldb_private::dil::Token::GetSpelling(), lldb_private::dil::Token::identifier, m_dil_lexer, ParseNestedNameSpecifier(), and ParseUnqualifiedId().
Referenced by ParsePostfixExpression(), and ParsePrimaryExpression().
| 
 | private | 
Definition at line 375 of file DILParser.cpp.
References CurToken(), GetKind(), m_dil_lexer, and lldb_private::dil::Token::minus.
Referenced by ParsePostfixExpression().
| 
 | private | 
Definition at line 416 of file DILParser.cpp.
References CurToken(), lldb_private::dil::Token::GetLocation(), lldb_private::dil::Token::GetSpelling(), lldb_private::dil::Long, lldb_private::dil::LongLong, and lldb_private::dil::None.
Referenced by ParseNumericLiteral().
| 
 | private | 
Definition at line 222 of file DILParser.cpp.
References BailOut(), lldb_private::dil::Token::coloncolon, CurToken(), Expect(), GetKind(), lldb_private::dil::Token::GetSpelling(), lldb_private::dil::Token::identifier, lldb_private::dil::Token::l_paren, m_dil_lexer, ParseNestedNameSpecifier(), and lldb_private::dil::Token::r_paren.
Referenced by ParseIdExpression(), and ParseNestedNameSpecifier().
| 
 | private | 
Definition at line 400 of file DILParser.cpp.
References BailOut(), CurToken(), lldb_private::dil::Token::integer_constant, m_dil_lexer, ParseFloatingPointLiteral(), and ParseIntegerLiteral().
Referenced by ParsePrimaryExpression().
| 
 | private | 
Definition at line 127 of file DILParser.cpp.
References lldb_private::dil::Token::arrow, BailOut(), CurToken(), Expect(), GetKind(), lldb_private::dil::Token::GetKind(), lldb_private::dil::Token::GetLocation(), lldb_private::dil::Token::l_square, m_dil_lexer, lldb_private::dil::Token::minus, ParseIdExpression(), ParseIntegerConstant(), ParsePrimaryExpression(), lldb_private::dil::Token::period, and lldb_private::dil::Token::r_square.
Referenced by ParseUnaryExpression().
| 
 | private | 
Definition at line 187 of file DILParser.cpp.
References BailOut(), lldb_private::dil::Token::coloncolon, CurToken(), Expect(), lldb_private::dil::Token::float_constant, lldb_private::dil::Token::GetLocation(), lldb_private::dil::Token::identifier, lldb_private::dil::Token::integer_constant, lldb_private::dil::Token::kw_false, lldb_private::dil::Token::kw_true, lldb_private::dil::Token::l_paren, m_dil_lexer, ParseBooleanLiteral(), ParseExpression(), ParseIdExpression(), ParseNumericLiteral(), and lldb_private::dil::Token::r_paren.
Referenced by ParsePostfixExpression().
| 
 | private | 
Definition at line 97 of file DILParser.cpp.
References lldb_private::dil::AddrOf, lldb_private::dil::Token::amp, CurToken(), lldb_private::dil::Deref, lldb_private::dil::Token::GetKind(), lldb_private::dil::Token::GetLocation(), m_dil_lexer, ParseExpression(), ParsePostfixExpression(), and lldb_private::dil::Token::star.
Referenced by ParseExpression().
| 
 | private | 
Definition at line 335 of file DILParser.cpp.
References CurToken(), Expect(), lldb_private::dil::Token::GetSpelling(), lldb_private::dil::Token::identifier, and m_dil_lexer.
Referenced by ParseIdExpression().
| 
 | private | 
Definition at line 72 of file DILParser.cpp.
References lldb_private::dil::Token::eof, Expect(), and ParseExpression().
Referenced by Parse().
| 
 | inlineprivate | 
Definition at line 110 of file DILParser.h.
References m_dil_lexer, and m_error.
| 
 | inline | 
Definition at line 78 of file DILParser.h.
References m_use_dynamic.
| 
 | inline | 
Definition at line 74 of file DILParser.h.
References m_fragile_ivar.
| 
 | inline | 
Definition at line 72 of file DILParser.h.
References m_use_synthetic.
| 
 | private | 
Definition at line 133 of file DILParser.h.
Referenced by CheckPtrVsMember(), and DILParser().
| 
 | private | 
Definition at line 121 of file DILParser.h.
Referenced by DILParser().
| 
 | private | 
Definition at line 125 of file DILParser.h.
Referenced by BailOut(), CurToken(), DILParser(), ParseBooleanLiteral(), ParseIdExpression(), ParseIntegerConstant(), ParseNestedNameSpecifier(), ParseNumericLiteral(), ParsePostfixExpression(), ParsePrimaryExpression(), ParseUnaryExpression(), ParseUnqualifiedId(), and TentativeParsingRollback().
| 
 | private | 
Definition at line 128 of file DILParser.h.
Referenced by BailOut(), DILParser(), and TentativeParsingRollback().
| 
 | private | 
Definition at line 132 of file DILParser.h.
Referenced by DILParser(), and UseFragileIvar().
| 
 | private | 
Definition at line 123 of file DILParser.h.
Referenced by BailOut(), and DILParser().
| 
 | private | 
Definition at line 130 of file DILParser.h.
Referenced by DILParser(), and UseDynamic().
| 
 | private | 
Definition at line 131 of file DILParser.h.
Referenced by DILParser(), and UseSynthetic().