Skip to content

Commit

Permalink
[create-pull-request] automated change
Browse files Browse the repository at this point in the history
  • Loading branch information
BillWagner authored and jskeet committed May 5, 2021
1 parent 89a6dcf commit a977b20
Showing 1 changed file with 54 additions and 55 deletions.
109 changes: 54 additions & 55 deletions standard/grammar.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Input_Element
// Source: §7.3.2 Line terminators
New_Line
: New_Line_Character
| '<Carriage return character (U+000D) followed by line feed character (U+000A)>'
| '\u000D\u000A' // carriage return, line feed
;
// Source: §7.3.3 Comments
Expand All @@ -55,15 +55,15 @@ Single_Line_Comment
;
Input_Character
: '<Any Unicode character except a New_Line_Character>'
: ~('\u000D' | '\u000A' | '\u0085' | '\u2028' | '\u2029') // anything but New_Line_Character
;
New_Line_Character
: '<Carriage return character (U+000D)>'
| '<Line feed character (U+000A)>'
| '<Next line character (U+0085)>'
| '<Line separator character (U+2028)>'
| '<Paragraph separator character (U+2029)>'
: '\u000D' // carriage return
| '\u000A' // line feed
| '\u0085' // next line
| '\u2028' // line separator
| '\u2029' // paragraph separator
;
Delimited_Comment
Expand All @@ -76,15 +76,15 @@ Delimited_Comment_Section
;
Not_Slash_Or_Asterisk
: '<Any Unicode character except SLASH or ASTERISK>'
: ~('/' | '*') // Any except SLASH or ASTERISK
;
// Source: §7.3.4 White space
Whitespace
: '<Any character with Unicode class Zs>'
| '<Horizontal tab character (U+0009)>'
| '<Vertical tab character (U+000B)>'
| '<Form feed character (U+000C)>'
: [\p{Zs}] // any character with Unicode class Zs
| '\u0009' // horizontal tab
| '\u000B' // vertical tab
| '\u000C' // form feed
;
// Source: §7.4.1 General
Expand All @@ -111,7 +111,7 @@ Identifier
;
Available_Identifier
: '<An Identifier_Or_Keyword that is not a Keyword>'
: Identifier_Or_Keyword { IsNotAKeyword() }?
;
Identifier_Or_Keyword
Expand All @@ -124,8 +124,8 @@ Identifier_Start_Character
;
Underscore_Character
: '<_ the underscore character (U+005F)>'
| '<A Unicode_Escape_Sequence representing the character U+005F>'
: '_' // underscore
| '\\u005' [fF] // Unicode_Escape_Sequence for underscore
;
Identifier_Part_Character
Expand All @@ -137,28 +137,28 @@ Identifier_Part_Character
;
Letter_Character
: '<A Unicode character of classes Lu, Ll, Lt, Lm, Lo, or Nl>'
| '<A Unicode_Escape_Sequence representing a character of classes Lu, Ll, Lt, Lm, Lo, or Nl>'
: [\p{L}\p{Nl}] // category Letter, all subcategories; category Number, subcategory letter
| Unicode_Escape_Sequence { IsLetterCharacter() }?
;
Combining_Character
: '<A Unicode character of classes Mn or Mc>'
| '<A Unicode_Escape_Sequence representing a character of classes Mn or Mc>'
: [\p{Mn}\p{Mc}] // category Mark, subcategories non-spacing and spacing combining
| Unicode_Escape_Sequence { IsCombiningCharacter() }?
;
Decimal_Digit_Character
: '<A Unicode character of the class Nd>'
| '<A Unicode_Escape_Sequence representing a character of the class Nd>'
: [\p{Nd}] // category Number, subcategory decimal digit
| Unicode_Escape_Sequence { IsDecimalDigitCharacter() }?
;
Connecting_Character
: '<A Unicode character of the class Pc>'
| '<A Unicode_Escape_Sequence representing a character of the class Pc>'
: [\p{Pc}] // category Punctuation, subcategory connector
| Unicode_Escape_Sequence { IsConnectingCharacter() }?
;
Formatting_Character
: '<A Unicode character of the class Cf>'
| '<A Unicode_Escape_Sequence representing a character of the class Cf>'
: [\p{Cf}] // category Other, subcategory format
| Unicode_Escape_Sequence { IsFormattingCharacter() }?
;
// Source: §7.4.4 Keywords
Expand Down Expand Up @@ -218,21 +218,20 @@ Decimal_Integer_Literal
;
Decimal_Digit
: '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'
: '0'..'9'
;
Integer_Type_Suffix
: 'U' | 'u' | 'L' | 'l' | 'UL' | 'Ul' | 'uL' | 'ul' | 'LU' | 'Lu' | 'lU' | 'lu'
;
Hexadecimal_Integer_Literal
: '0x' Hex_Digit+ Integer_Type_Suffix?
| '0X' Hex_Digit+ Integer_Type_Suffix?
: ('0x' | '0X') Hex_Digit+ Integer_Type_Suffix?
;
Hex_Digit
: '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'
| 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'a' | 'b' | 'c' | 'd' | 'e' | 'f';
: '0'..'9' | 'A'..'F' | 'a'..'f'
;
// Source: §7.4.5.4 Real literals
Real_Literal
Expand All @@ -243,8 +242,7 @@ Real_Literal
;
Exponent_Part
: 'e' Sign? Decimal_Digit+
| 'E' Sign? Decimal_Digit+
: ('e' | 'E') Sign? Decimal_Digit+
;
Sign
Expand All @@ -268,7 +266,7 @@ Character
;
Single_Character
: '<Any character except \' (U+0027), \\ (U+005C), and New_Line_Character>'
: ~['\\\u000D\u000A\u0085\u2028\u2029] // anything but ', \, and New_Line_Character
;
Simple_Escape_Sequence
Expand Down Expand Up @@ -297,7 +295,7 @@ Regular_String_Literal_Character
;
Single_Regular_String_Literal_Character
: '<Any character except " (U+0022), \\ (U+005C), and New_Line_Character>'
: ~["\\\u000D\u000A\u0085\u2028\u2029] // anything but ", \, and New_Line_Character
;
Verbatim_String_Literal
Expand All @@ -310,7 +308,7 @@ Verbatim_String_Literal_Character
;
Single_Verbatim_String_Literal_Character
: '<any character except ">'
: ~["] // anything but quotation mark (U+0022)
;
Quote_Escape_Sequence
Expand Down Expand Up @@ -351,7 +349,7 @@ Pp_Directive
// Source: §7.5.2 Conditional compilation symbols
Conditional_Symbol
: '<Any Identifier_Or_Keyword except true or false>'
: Identifier_Or_Keyword { IsNotTrueOrFalse() }?
;
// Source: §7.5.3 Pre-processing expressions
Expand Down Expand Up @@ -433,7 +431,7 @@ Skipped_Characters
;
Not_Number_Sign
: '<Any Input_Character except #>'
: ~('\u000D' | '\u000A' | '\u0085' | '\u2028' | '\u2029' | '#') // any Input_Character except #
;
// Source: §7.5.6 Diagnostic directives
Expand Down Expand Up @@ -477,7 +475,7 @@ Compilation_Unit_Name
;
Compilation_Unit_Name_Character
: '<Any input_character except " (U+0022), and New_Line_Character>'
: ~('\u000D' | '\u000A' | '\u0085' | '\u2028' | '\u2029' | '#') // any Input_Character except "
;
// Source: §7.5.9 Pragma directives
Expand Down Expand Up @@ -2132,32 +2130,32 @@ attribute_argument_expression
// Source: §23.2 Unsafe contexts
class_modifier
: ...
: '...'
| 'unsafe'
;
struct_modifier
: ...
: '...'
| 'unsafe'
;
interface_modifier
: ...
: '...'
| 'unsafe'
;
delegate_modifier
: ...
: '...'
| 'unsafe'
;
field_modifier
: ...
: '...'
| 'unsafe'
;
method_modifier
: ...
: '...'
| 'unsafe'
;
Expand All @@ -2167,21 +2165,22 @@ property_modifier
;
event_modifier
: ...
: '...'
| 'unsafe'
;
indexer_modifier
: ...
: '...'
| 'unsafe'
;
operator_modifier
: ...
: '...'
| 'unsafe'
;
constructor_modifier
: ...
: '...'
| 'unsafe'
;
Expand All @@ -2200,7 +2199,7 @@ static_constructor_modifiers
;
embedded_statement
: ...
: '...'
| unsafe_statement
| fixed_statement
;
Expand All @@ -2211,12 +2210,12 @@ unsafe_statement
// Source: §23.3 Pointer types
type
: ...
: '...'
| pointer_type
;
non_array_type
: ...
: '...'
| pointer_type
;
Expand All @@ -2232,13 +2231,13 @@ unmanaged_type
// Source: §23.6.1 General
primary_no_array_creation_expression
: ...
: '...'
| pointer_member_access
| pointer_element_access
;
unary_expression
: ...
: '...'
| pointer_indirection_expression
| addressof_expression
;
Expand Down Expand Up @@ -2283,7 +2282,7 @@ fixed_pointer_initializer
// Source: §23.8.2 Fixed-size buffer declarations
struct_member_declaration
: ...
: '...'
| fixed_size_buffer_declaration
;
Expand All @@ -2310,7 +2309,7 @@ fixed_size_buffer_declarator
// Source: §23.9 Stack allocation
local_variable_initializer
: ...
: '...'
| stackalloc_initializer
;
Expand Down

0 comments on commit a977b20

Please sign in to comment.