$(BNF PrimaryExpr := IdentifierExpr | ModuleScopeExpr | / LambdaExpr | TypeofExpr | ThisExpr | SuperExpr | / NullExpr | BoolExpr | DollarExpr | IntExpr | FloatExpr | / CharExpr | StringExpr | ArrayLiteralExpr | AArrayLiteralExpr | / FuncLiteralExpr | AssertExpr | MixinExpr | ImportExpr | / TypeidExpr | IsExpr | ParenExpr | TraitsExpr | TypeDotIdExpr | / SpecialTokenExpr /TypeofExpr := TypeofType /ThisExpr := this /SuperExpr := super /NullExpr := null /BoolExpr := true | false /DollarExpr := "$" /IntExpr := IntegerLiteral /FloatExpr := FloatLiteral /CharExpr := CharacterLiteral /StringExpr := StringLiteral+ /StringLiteral := NormalStringLiteral | EscapeStringLiteral | / RawStringLiteral | HexStringLiteral | DelimitedStringLiteral | / TokenStringLiteral /ArrayLiteralExpr := "[" ExpressionList2 "]" /AArrayLiteralExpr := "[" KeyValue ("," KeyValue)* ","? "]" /KeyValue := (AssignExpr ":" AssignExpr) /FuncLiteralExpr := (function | delegate)? / (ReturnType? ParameterList FunctionPostfix?)? "{" Statements "}" /AssertExpr := assert "(" AssignExpr ("," AssignExpr)? ")" /MixinExpr := mixin "(" AssignExpr ")" /ImportExpr := import "(" AssignExpr ")" /TypeidExpr := typeid "(" Type ")" /IsExpr := is "(" Declarator (Specialization TemplateParameterList2)? ")" /Specialization := ((":" | "==") (SpecToken | Type)) /SpecToken := typedef | struct | union | class | interface | enum | / function | delegate | super | return | / const | immutable | inout | shared /ParenExpr := "(" Expression ")" /TraitsExpr := __traits "(" Identifier ("," TemplateArguments)? ")" /TypeDotIdExpr := "(" Type ")" "." Identifier /SpecialTokenExpr := SpecialToken)
See Implementation
$(BNF PrimaryExpr := IdentifierExpr | ModuleScopeExpr | / LambdaExpr | TypeofExpr | ThisExpr | SuperExpr | / NullExpr | BoolExpr | DollarExpr | IntExpr | FloatExpr | / CharExpr | StringExpr | ArrayLiteralExpr | AArrayLiteralExpr | / FuncLiteralExpr | AssertExpr | MixinExpr | ImportExpr | / TypeidExpr | IsExpr | ParenExpr | TraitsExpr | TypeDotIdExpr | / SpecialTokenExpr /TypeofExpr := TypeofType /ThisExpr := this /SuperExpr := super /NullExpr := null /BoolExpr := true | false /DollarExpr := "$" /IntExpr := IntegerLiteral /FloatExpr := FloatLiteral /CharExpr := CharacterLiteral /StringExpr := StringLiteral+ /StringLiteral := NormalStringLiteral | EscapeStringLiteral | / RawStringLiteral | HexStringLiteral | DelimitedStringLiteral | / TokenStringLiteral /ArrayLiteralExpr := "[" ExpressionList2 "]" /AArrayLiteralExpr := "[" KeyValue ("," KeyValue)* ","? "]" /KeyValue := (AssignExpr ":" AssignExpr) /FuncLiteralExpr := (function | delegate)? / (ReturnType? ParameterList FunctionPostfix?)? "{" Statements "}" /AssertExpr := assert "(" AssignExpr ("," AssignExpr)? ")" /MixinExpr := mixin "(" AssignExpr ")" /ImportExpr := import "(" AssignExpr ")" /TypeidExpr := typeid "(" Type ")" /IsExpr := is "(" Declarator (Specialization TemplateParameterList2)? ")" /Specialization := ((":" | "==") (SpecToken | Type)) /SpecToken := typedef | struct | union | class | interface | enum | / function | delegate | super | return | / const | immutable | inout | shared /ParenExpr := "(" Expression ")" /TraitsExpr := __traits "(" Identifier ("," TemplateArguments)? ")" /TypeDotIdExpr := "(" Type ")" "." Identifier /SpecialTokenExpr := SpecialToken)