From Jason Turner

[gram.lex]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmplo1xtl68/{from.md → to.md} +52 -55
tmp/tmplo1xtl68/{from.md → to.md} RENAMED
@@ -1,16 +1,15 @@
1
  ## Lexical conventions <a id="gram.lex">[[gram.lex]]</a>
2
 
3
  ``` bnf
4
- n-char: one of
5
  any member of the translation character set except the U+007d (right curly bracket) or new-line character
6
  ```
7
 
8
  ``` bnf
9
  n-char-sequence:
10
- n-char
11
- n-char-sequence n-char
12
  ```
13
 
14
  ``` bnf
15
  named-universal-character:
16
  '\N{' n-char-sequence '}'
@@ -21,12 +20,11 @@ hex-quad:
21
  hexadecimal-digit hexadecimal-digit hexadecimal-digit hexadecimal-digit
22
  ```
23
 
24
  ``` bnf
25
  simple-hexadecimal-digit-sequence:
26
- hexadecimal-digit
27
- simple-hexadecimal-digit-sequence hexadecimal-digit
28
  ```
29
 
30
  ``` bnf
31
  universal-character-name:
32
  '\u' hex-quad
@@ -49,39 +47,29 @@ preprocessing-token:
49
  user-defined-string-literal
50
  preprocessing-op-or-punc
51
  each non-whitespace character that cannot be one of the above
52
  ```
53
 
54
- ``` bnf
55
- token:
56
- identifier
57
- keyword
58
- literal
59
- operator-or-punctuator
60
- ```
61
-
62
  ``` bnf
63
  header-name:
64
  '<' h-char-sequence '>'
65
  '"' q-char-sequence '"'
66
  ```
67
 
68
  ``` bnf
69
  h-char-sequence:
70
- h-char
71
- h-char-sequence h-char
72
  ```
73
 
74
  ``` bnf
75
  h-char:
76
  any member of the translation character set except new-line and U+003e (greater-than sign)
77
  ```
78
 
79
  ``` bnf
80
  q-char-sequence:
81
- q-char
82
- q-char-sequence q-char
83
  ```
84
 
85
  ``` bnf
86
  q-char:
87
  any member of the translation character set except new-line and U+0022 (quotation mark)
@@ -99,10 +87,44 @@ pp-number:
99
  pp-number 'p' sign
100
  pp-number 'P' sign
101
  pp-number '.'
102
  ```
103
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  ``` bnf
105
  identifier:
106
  identifier-start
107
  identifier identifier-continue
108
  ```
@@ -139,35 +161,10 @@ keyword:
139
  *import-keyword*
140
  *module-keyword*
141
  *export-keyword*
142
  ```
143
 
144
- ``` bnf
145
- preprocessing-op-or-punc:
146
- preprocessing-operator
147
- operator-or-punctuator
148
- ```
149
-
150
- ``` bnf
151
- %% Ed. note: character protrusion would misalign various operators.
152
- preprocessing-operator: one of
153
- '# ## %: %:%:'
154
- ```
155
-
156
- ``` bnf
157
- operator-or-punctuator: one of
158
- '{ } [ ] ( )'
159
- '<: :> <% %> ; : ...'
160
- '? :: . .* -> ->* ~'
161
- '! + - * / % ^ & |'
162
- '= += -= *= /= %= ^= &= |='
163
- '== != < > <= >= <=> && ||'
164
- '<< >> <<= >>= ++ -- ,'
165
- 'and or xor not bitand bitor compl'
166
- 'and_eq or_eq xor_eq not_eq'
167
- ```
168
-
169
  ``` bnf
170
  literal:
171
  integer-literal
172
  character-literal
173
  floating-point-literal
@@ -282,12 +279,11 @@ encoding-prefix: one of
282
  'u8' 'u' 'U' 'L'
283
  ```
284
 
285
  ``` bnf
286
  c-char-sequence:
287
- c-char
288
- c-char-sequence c-char
289
  ```
290
 
291
  ``` bnf
292
  c-char:
293
  basic-c-char
@@ -324,12 +320,11 @@ numeric-escape-sequence:
324
  hexadecimal-escape-sequence
325
  ```
326
 
327
  ``` bnf
328
  simple-octal-digit-sequence:
329
- octal-digit
330
- simple-octal-digit-sequence octal-digit
331
  ```
332
 
333
  ``` bnf
334
  octal-escape-sequence:
335
  '\' octal-digit
@@ -418,12 +413,11 @@ string-literal:
418
  encoding-prefixₒₚₜ 'R' raw-string
419
  ```
420
 
421
  ``` bnf
422
  s-char-sequence:
423
- s-char
424
- s-char-sequence s-char
425
  ```
426
 
427
  ``` bnf
428
  s-char:
429
  basic-s-char
@@ -442,42 +436,45 @@ raw-string:
442
  '"' d-char-sequenceₒₚₜ '(' r-char-sequenceₒₚₜ ')' d-char-sequenceₒₚₜ '"'
443
  ```
444
 
445
  ``` bnf
446
  r-char-sequence:
447
- r-char
448
- r-char-sequence r-char
449
  ```
450
 
451
  ``` bnf
452
  r-char:
453
  any member of the translation character set, except a U+0029 (right parenthesis) followed by
454
  the initial *d-char-sequence* (which may be empty) followed by a U+0022 (quotation mark)
455
  ```
456
 
457
  ``` bnf
458
  d-char-sequence:
459
- d-char
460
- d-char-sequence d-char
461
  ```
462
 
463
  ``` bnf
464
  d-char:
465
  any member of the basic character set except:
466
  U+0020 (space), U+0028 (left parenthesis), U+0029 (right parenthesis), U+005c (reverse solidus),
467
  U+0009 (character tabulation), U+000b (line tabulation), U+000c (form feed), and new-line
468
  ```
469
 
 
 
 
 
 
470
  ``` bnf
471
  boolean-literal:
472
- 'false'
473
- 'true'
474
  ```
475
 
476
  ``` bnf
477
  pointer-literal:
478
- 'nullptr'
479
  ```
480
 
481
  ``` bnf
482
  user-defined-literal:
483
  user-defined-integer-literal
 
1
  ## Lexical conventions <a id="gram.lex">[[gram.lex]]</a>
2
 
3
  ``` bnf
4
+ n-char:
5
  any member of the translation character set except the U+007d (right curly bracket) or new-line character
6
  ```
7
 
8
  ``` bnf
9
  n-char-sequence:
10
+ n-char n-char-sequenceₒₚₜ
 
11
  ```
12
 
13
  ``` bnf
14
  named-universal-character:
15
  '\N{' n-char-sequence '}'
 
20
  hexadecimal-digit hexadecimal-digit hexadecimal-digit hexadecimal-digit
21
  ```
22
 
23
  ``` bnf
24
  simple-hexadecimal-digit-sequence:
25
+ hexadecimal-digit simple-hexadecimal-digit-sequenceₒₚₜ
 
26
  ```
27
 
28
  ``` bnf
29
  universal-character-name:
30
  '\u' hex-quad
 
47
  user-defined-string-literal
48
  preprocessing-op-or-punc
49
  each non-whitespace character that cannot be one of the above
50
  ```
51
 
 
 
 
 
 
 
 
 
52
  ``` bnf
53
  header-name:
54
  '<' h-char-sequence '>'
55
  '"' q-char-sequence '"'
56
  ```
57
 
58
  ``` bnf
59
  h-char-sequence:
60
+ h-char h-char-sequenceₒₚₜ
 
61
  ```
62
 
63
  ``` bnf
64
  h-char:
65
  any member of the translation character set except new-line and U+003e (greater-than sign)
66
  ```
67
 
68
  ``` bnf
69
  q-char-sequence:
70
+ q-char q-char-sequenceₒₚₜ
 
71
  ```
72
 
73
  ``` bnf
74
  q-char:
75
  any member of the translation character set except new-line and U+0022 (quotation mark)
 
87
  pp-number 'p' sign
88
  pp-number 'P' sign
89
  pp-number '.'
90
  ```
91
 
92
+ ``` bnf
93
+ preprocessing-op-or-punc:
94
+ preprocessing-operator
95
+ operator-or-punctuator
96
+ ```
97
+
98
+ ``` bnf
99
+ %% Ed. note: character protrusion would misalign various operators.
100
+
101
+ preprocessing-operator: one of
102
+ '# ## %: %:%:'
103
+ ```
104
+
105
+ ``` bnf
106
+ operator-or-punctuator: one of
107
+ '{ } [ ] ( ) [: :]'
108
+ '<% %> <: :> ; : ...'
109
+ '? :: . .* -> ->* ^^ ~'
110
+ '! + - * / % ^ & |'
111
+ '= += -= *= /= %= ^= &= |='
112
+ '== != < > <= >= <=> && ||'
113
+ '<< >> <<= >>= ++ -- ,'
114
+ 'and or xor not bitand bitor compl'
115
+ 'and_eq or_eq xor_eq not_eq'
116
+ ```
117
+
118
+ ``` bnf
119
+ token:
120
+ identifier
121
+ keyword
122
+ literal
123
+ operator-or-punctuator
124
+ ```
125
+
126
  ``` bnf
127
  identifier:
128
  identifier-start
129
  identifier identifier-continue
130
  ```
 
161
  *import-keyword*
162
  *module-keyword*
163
  *export-keyword*
164
  ```
165
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
166
  ``` bnf
167
  literal:
168
  integer-literal
169
  character-literal
170
  floating-point-literal
 
279
  'u8' 'u' 'U' 'L'
280
  ```
281
 
282
  ``` bnf
283
  c-char-sequence:
284
+ c-char c-char-sequenceₒₚₜ
 
285
  ```
286
 
287
  ``` bnf
288
  c-char:
289
  basic-c-char
 
320
  hexadecimal-escape-sequence
321
  ```
322
 
323
  ``` bnf
324
  simple-octal-digit-sequence:
325
+ octal-digit simple-octal-digit-sequenceₒₚₜ
 
326
  ```
327
 
328
  ``` bnf
329
  octal-escape-sequence:
330
  '\' octal-digit
 
413
  encoding-prefixₒₚₜ 'R' raw-string
414
  ```
415
 
416
  ``` bnf
417
  s-char-sequence:
418
+ s-char s-char-sequenceₒₚₜ
 
419
  ```
420
 
421
  ``` bnf
422
  s-char:
423
  basic-s-char
 
436
  '"' d-char-sequenceₒₚₜ '(' r-char-sequenceₒₚₜ ')' d-char-sequenceₒₚₜ '"'
437
  ```
438
 
439
  ``` bnf
440
  r-char-sequence:
441
+ r-char r-char-sequenceₒₚₜ
 
442
  ```
443
 
444
  ``` bnf
445
  r-char:
446
  any member of the translation character set, except a U+0029 (right parenthesis) followed by
447
  the initial *d-char-sequence* (which may be empty) followed by a U+0022 (quotation mark)
448
  ```
449
 
450
  ``` bnf
451
  d-char-sequence:
452
+ d-char d-char-sequenceₒₚₜ
 
453
  ```
454
 
455
  ``` bnf
456
  d-char:
457
  any member of the basic character set except:
458
  U+0020 (space), U+0028 (left parenthesis), U+0029 (right parenthesis), U+005c (reverse solidus),
459
  U+0009 (character tabulation), U+000b (line tabulation), U+000c (form feed), and new-line
460
  ```
461
 
462
+ ``` bnf
463
+ unevaluated-string:
464
+ string-literal
465
+ ```
466
+
467
  ``` bnf
468
  boolean-literal:
469
+ false
470
+ true
471
  ```
472
 
473
  ``` bnf
474
  pointer-literal:
475
+ nullptr
476
  ```
477
 
478
  ``` bnf
479
  user-defined-literal:
480
  user-defined-integer-literal