================ @@ -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 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits