| (* Data Inspection Language (DIL) definition - LLDB Debug Expressions *) | |
| (* This is currently a subset of the final DIL Language, matching the current | |
| DIL implementation. *) | |
| expression = assignment_expression ; | |
| assignment_expression = conditional_expression | |
| | logical_or_expression assignment_operator pure_expression ; | |
| assignment_operator = "=" | |
| | "+=" | |
| | "-=" | |
| | "*=" | |
| | "/=" | |
| | "%=" | |
| | "&=" | |
| | "^=" | |
| | "|=" | |
| | "<<=" | |
| | ">>=" ; | |
| pure_expression = conditional_expression ; | |
| conditional_expression = logical_or_expression | |
| | logical_or_expression "?" pure_expression ":" pure_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 | |
| | unary_operator cast_expression ; | |
| unary_operator = "*" | "&" | "+" | "-" | "~" | "!" ; | |
| postfix_expression = primary_expression | |
| | postfix_expression "[" pure_expression "]" | |
| | postfix_expression "[" pure_expression ":" pure_expression "]" | |
| | postfix_expression "." id_expression | |
| | postfix_expression "->" id_expression ; | |
| primary_expression = numeric_literal | |
| | boolean_literal | |
| | id_expression | |
| | "(" pure_expression ")" | |
| | "sizeof" "(" pure_expression ")" | |
| | "sizeof" "(" type_id ")" ; | |
| id_expression = unqualified_id | |
| | qualified_id | |
| | register | |
| | null_pointer ; | |
| unqualified_id = identifier ; | |
| qualified_id = ["::"] [nested_name_specifier] unqualified_id | |
| | ["::"] identifier ; | |
| identifier = ? C99 Identifier ? ; | |
| numeric_literal = ? Integer constant: hexademical, decimal, octal, binary ? | |
| | ? Floating constant ? ; | |
| boolean_literal = "true" | "false" ; | |
| null_pointer = "nullptr" ; | |
| register = "$" ? Register name ? ; | |
| nested_name_specifier = type_name "::" | |
| | namespace_name '::' | |
| | nested_name_specifier identifier "::" ; | |
| type_id = type_specifier_seq [abstract_declarator] ; | |
| type_specifier_seq = type_specifier [type_specifier]; | |
| type_specifier = ["::"] [nested_name_specifier] type_name | |
| | builtin_typename ; | |
| nested_name_specifier = type_name "::" | |
| | namespace_name "::" | |
| | nested_name_specifier identifier "::" ; | |
| abstract_declarator = ptr_operator [abstract_declarator] ; | |
| ptr_operator = "*" | |
| | "&"; | |
| type_name = class_name | |
| | enum_name | |
| | typedef_name; | |
| builtin_typename = identifier_seq; | |
| class_name = identifier ; | |
| enum_name = identifier ; | |
| typedef_name = identifier ; | |
| namespace_name = identifier ; | |
| identifier_seq = identifier | |
| | identifier identifier_seq; | |