Files
llvm/lldb/docs/dil-expr-lang.ebnf
cmtice 9855d546a4 [LLDB] Add boolean literals to DIL. (#157992)
This adds the ability to recognize (and create ValueObjects for) boolean
literals ("true", "false") to DIL. This is a preliminary step to adding
type casting (and also for the ternary op).
2025-09-16 16:04:42 -07:00

62 lines
1.5 KiB
EBNF

(* Data Inspection Language (DIL) definition - LLDB Debug Expressions *)
(* This is currently a subset of the final DIL Language, matching the current
DIL implementation. *)
expression = unary_expression ;
unary_expression = postfix_expression
| unary_operator expression ;
unary_operator = "*" | "&" ;
postfix_expression = primary_expression
| postfix_expression "[" integer_literal "]"
| postfix_expression "." id_expression
| postfix_expression "->" id_expression ;
primary_expression = numeric_literal
| boolean_literal
| id_expression
| "(" expression ")" ;
id_expression = unqualified_id
| qualified_id
| register ;
unqualified_id = identifier ;
qualified_id = ["::"] [nested_name_specifier] unqualified_id
| ["::"] identifier ;
identifier = ? C99 Identifier ? ;
integer_literal = ? Integer constant: hexademical, decimal, octal, binary ? ;
numeric_literal = ? Integer constant: hexademical, decimal, octal, binary ?
| ? Floating constant ? ;
boolean_literal = "true" | "false" ;
register = "$" ? Register name ? ;
nested_name_specifier = type_name "::"
| namespace_name '::'
| nested_name_specifier identifier "::" ;
type_name = class_name
| enum_name
| typedef_name;
class_name = identifier ;
enum_name = identifier ;
typedef_name = identifier ;
namespace_name = identifier ;