[Lldb-commits] [lldb] [LLDB] Add AST node classes, functions, etc. for Data Inspection Lang… (PR #95738)
via lldb-commits
lldb-commits at lists.llvm.org
Sun Jul 14 09:12:52 PDT 2024
================
@@ -0,0 +1,43 @@
+(* LLDB Debug Expressions, a subset of C++ *)
+(* Insired by https://www.nongnu.org/hcb *)
+
+expression = cast_expression;
+
+cast_expression = unary_expression;
+
+unary_expression = postfix_expression
+ | unary_operator cast_expression;
+
+unary_operator = "*" | "&" | "-" ;
+
+postfix_expression = primary_expression
+ | postfix_expression "[" expression "]"
+ | postfix_expression "." id_expression
+ | postfix_expression "->" id_expression
+
+primary_expression = numeric_literal
+ | boolean_literal
+ | pointer_literal
+ | id_expression
+ | "this" ;
+
+nested_name_specifier = namespace_name '::'
+ | nested_name_specifier identifier "::";
+
+namespace_name = identifier ;
+
+id_expression = unqualified_id
+ | qualified_id ;
+
+unqualified_id = identifier ;
+
+qualified_id = [nested_name_specifier] unqualified_id
+ | identifier ;
+
+identifier = ? clang::tok::identifier ? ;
+
+numeric_literal = ? clang::tok::numeric_constant ? ;
+
+boolean_literal = "true" | "false" ;
+
+pointer_literal = "nullptr" ;
----------------
cmtice wrote:
Would it be acceptable for me to replace the quoted strings with something like: true_token, false_token, nullptr_token?
https://github.com/llvm/llvm-project/pull/95738
More information about the lldb-commits
mailing list