[Lldb-commits] [lldb] [LLDB] Add AST node classes, functions, etc. for Data Inspection Lang… (PR #95738)
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 24 01:02:44 PDT 2024
================
@@ -0,0 +1,165 @@
+(* LLDB Debug Expressions, a subset of C++ *)
+(* Insired by https://www.nongnu.org/hcb *)
+
+expression = assignment_expression ;
+
+assignment_expression = conditional_expression
+ logical_or_expression assignment_operator assignment_expression ;
+
+assignment_operator = "="
+ | "*="
+ | "/="
+ | "%="
+ | "+="
+ | "-="
+ | ">>="
+ | "<<="
+ | "&="
+ | "^="
+ | "|=" ;
+
+conditional_expression = logical_or_expression
+ | logical_or_expression "?" expression ":" assignment_expression ;
+
+logical_or_expression = logical_and_expression {"||" logical_and_expression} ;
+
+logical_and_expression = inclusive_or_expression {"&&" inclusive_or_expression} ;
+
+inclusive_or_expression = exclusive_or_expression {"|" exclusive_or_expression} ;
+
+exclusive_or_expression = and_expression {"^" and_expression} ;
+
+and_expression = equality_expression {"&" equality_expression} ;
+
+equality_expression = relational_expression {"==" relational_expression}
+ | relational_expression {"!=" relational_expression} ;
+
+relational_expression = shift_expression {"<" shift_expression}
+ | shift_expression {">" shift_expression}
+ | shift_expression {"<=" shift_expression}
+ | shift_expression {">=" shift_expression} ;
+
+shift_expression = additive_expression {"<<" additive_expression}
+ | additive_expression {">>" additive_expression} ;
+
+additive_expression = multiplicative_expression {"+" multiplicative_expression}
+ | multiplicative_expression {"-" multiplicative_expression} ;
+
+multiplicative_expression = cast_expression {"*" cast_expression}
+ | cast_expression {"/" cast_expression}
+ | cast_expression {"%" cast_expression} ;
+
+cast_expression = unary_expression
+ | "(" type_id ")" cast_expression ;
+
+unary_expression = postfix_expression
----------------
Michael137 wrote:
Do we really want to allow state-changing expressions in the `frame var` language?
https://github.com/llvm/llvm-project/pull/95738
More information about the lldb-commits
mailing list