tmp/tmpuy4dciqd/{from.md → to.md}
RENAMED
|
@@ -1,10 +1,26 @@
|
|
| 1 |
## Preprocessing directives <a id="gram.cpp">[[gram.cpp]]</a>
|
| 2 |
|
| 3 |
``` bnf
|
| 4 |
preprocessing-file:
|
| 5 |
groupₒₚₜ
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
```
|
| 7 |
|
| 8 |
``` bnf
|
| 9 |
group:
|
| 10 |
group-part
|
|
@@ -17,21 +33,58 @@ group-part:
|
|
| 17 |
if-section
|
| 18 |
text-line
|
| 19 |
'#' conditionally-supported-directive
|
| 20 |
```
|
| 21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
``` bnf
|
| 23 |
if-section:
|
| 24 |
if-group elif-groupsₒₚₜ else-groupₒₚₜ endif-line
|
| 25 |
```
|
| 26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
``` bnf
|
| 28 |
elif-groups:
|
| 29 |
elif-group
|
| 30 |
elif-groups elif-group
|
| 31 |
```
|
| 32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
``` bnf
|
| 34 |
text-line:
|
| 35 |
pp-tokensₒₚₜ new-line
|
| 36 |
```
|
| 37 |
|
|
@@ -82,14 +135,40 @@ h-preprocessing-token:
|
|
| 82 |
h-pp-tokens:
|
| 83 |
h-preprocessing-token
|
| 84 |
h-pp-tokens h-preprocessing-token
|
| 85 |
```
|
| 86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
``` bnf
|
| 88 |
has-include-expression:
|
| 89 |
-
'__has_include (
|
| 90 |
-
'__has_include (
|
| 91 |
-
|
| 92 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
```
|
| 94 |
|
| 95 |
|
|
|
|
| 1 |
## Preprocessing directives <a id="gram.cpp">[[gram.cpp]]</a>
|
| 2 |
|
| 3 |
``` bnf
|
| 4 |
preprocessing-file:
|
| 5 |
groupₒₚₜ
|
| 6 |
+
module-file
|
| 7 |
+
```
|
| 8 |
+
|
| 9 |
+
``` bnf
|
| 10 |
+
module-file:
|
| 11 |
+
pp-global-module-fragmentₒₚₜ pp-module groupₒₚₜ pp-private-module-fragmentₒₚₜ
|
| 12 |
+
```
|
| 13 |
+
|
| 14 |
+
``` bnf
|
| 15 |
+
pp-global-module-fragment:
|
| 16 |
+
module ';' new-line groupₒₚₜ
|
| 17 |
+
```
|
| 18 |
+
|
| 19 |
+
``` bnf
|
| 20 |
+
pp-private-module-fragment:
|
| 21 |
+
module ':' private ';' new-line groupₒₚₜ
|
| 22 |
```
|
| 23 |
|
| 24 |
``` bnf
|
| 25 |
group:
|
| 26 |
group-part
|
|
|
|
| 33 |
if-section
|
| 34 |
text-line
|
| 35 |
'#' conditionally-supported-directive
|
| 36 |
```
|
| 37 |
|
| 38 |
+
``` bnf
|
| 39 |
+
control-line:
|
| 40 |
+
'# include' pp-tokens new-line
|
| 41 |
+
pp-import
|
| 42 |
+
'# define ' identifier replacement-list new-line
|
| 43 |
+
'# define ' identifier lparen identifier-listₒₚₜ ')' replacement-list new-line
|
| 44 |
+
'# define ' identifier lparen '... )' replacement-list new-line
|
| 45 |
+
'# define ' identifier lparen identifier-list ', ... )' replacement-list new-line
|
| 46 |
+
'# undef ' identifier new-line
|
| 47 |
+
'# line ' pp-tokens new-line
|
| 48 |
+
'# error ' pp-tokensₒₚₜ new-line
|
| 49 |
+
'# pragma ' pp-tokensₒₚₜ new-line
|
| 50 |
+
'# 'new-line
|
| 51 |
+
```
|
| 52 |
+
|
| 53 |
``` bnf
|
| 54 |
if-section:
|
| 55 |
if-group elif-groupsₒₚₜ else-groupₒₚₜ endif-line
|
| 56 |
```
|
| 57 |
|
| 58 |
+
``` bnf
|
| 59 |
+
if-group:
|
| 60 |
+
'# if ' constant-expression new-line groupₒₚₜ
|
| 61 |
+
'# ifdef ' identifier new-line groupₒₚₜ
|
| 62 |
+
'# ifndef ' identifier new-line groupₒₚₜ
|
| 63 |
+
```
|
| 64 |
+
|
| 65 |
``` bnf
|
| 66 |
elif-groups:
|
| 67 |
elif-group
|
| 68 |
elif-groups elif-group
|
| 69 |
```
|
| 70 |
|
| 71 |
+
``` bnf
|
| 72 |
+
elif-group:
|
| 73 |
+
'# elif ' constant-expression new-line groupₒₚₜ
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
``` bnf
|
| 77 |
+
else-group:
|
| 78 |
+
'# else ' new-line groupₒₚₜ
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
``` bnf
|
| 82 |
+
endif-line:
|
| 83 |
+
'# endif ' new-line
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
``` bnf
|
| 87 |
text-line:
|
| 88 |
pp-tokensₒₚₜ new-line
|
| 89 |
```
|
| 90 |
|
|
|
|
| 135 |
h-pp-tokens:
|
| 136 |
h-preprocessing-token
|
| 137 |
h-pp-tokens h-preprocessing-token
|
| 138 |
```
|
| 139 |
|
| 140 |
+
``` bnf
|
| 141 |
+
header-name-tokens:
|
| 142 |
+
string-literal
|
| 143 |
+
'<' h-pp-tokens '>'
|
| 144 |
+
```
|
| 145 |
+
|
| 146 |
``` bnf
|
| 147 |
has-include-expression:
|
| 148 |
+
'__has_include' '(' header-name ')'
|
| 149 |
+
'__has_include' '(' header-name-tokens ')'
|
| 150 |
+
```
|
| 151 |
+
|
| 152 |
+
``` bnf
|
| 153 |
+
has-attribute-expression:
|
| 154 |
+
'__has_cpp_attribute (' pp-tokens ')'
|
| 155 |
+
```
|
| 156 |
+
|
| 157 |
+
``` bnf
|
| 158 |
+
pp-module:
|
| 159 |
+
exportₒₚₜ module pp-tokensₒₚₜ ';' new-line
|
| 160 |
+
```
|
| 161 |
+
|
| 162 |
+
``` bnf
|
| 163 |
+
pp-import:
|
| 164 |
+
exportₒₚₜ import header-name pp-tokensₒₚₜ ';' new-line
|
| 165 |
+
exportₒₚₜ import header-name-tokens pp-tokensₒₚₜ ';' new-line
|
| 166 |
+
exportₒₚₜ import pp-tokens ';' new-line
|
| 167 |
+
```
|
| 168 |
+
|
| 169 |
+
``` bnf
|
| 170 |
+
va-opt-replacement:
|
| 171 |
+
'__VA_OPT__ (' pp-tokensₒₚₜ ')'
|
| 172 |
```
|
| 173 |
|
| 174 |
|