@@ -1206,20 +1206,29 @@ the definition of the symbol. There is this directive:
1206
1206
the following definition. If the definition spans multiple lines, each
1207
1207
continuation line must begin with a colon placed at the same column as in
1208
1208
the first line.
1209
+ Blank lines are not allowed within ``productionlist `` directive arguments.
1210
+
1211
+ The definition can contain token names which are marked as interpreted text
1212
+ (e.g., "``sum ::= `integer` "+" `integer` ``") -- this generates
1213
+ cross-references to the productions of these tokens. Outside of the
1214
+ production list, you can reference to token productions using
1215
+ :rst:role: `token `.
1209
1216
1210
1217
The *productionGroup * argument to :rst:dir: `productionlist ` serves to
1211
1218
distinguish different sets of production lists that belong to different
1212
1219
grammars. Multiple production lists with the same *productionGroup * thus
1213
1220
define rules in the same scope.
1214
1221
1215
- Blank lines are not allowed within ``productionlist `` directive arguments.
1222
+ Inside of the production list, tokens implicitly refer to productions
1223
+ from the current group. You can refer to the production of another
1224
+ grammar by prefixing the token with its group name and a colon, e.g,
1225
+ "``otherGroup:sum ``". If the group of the token should not be shown in
1226
+ the production, it can be prefixed by a tilde, e.g.,
1227
+ "``~otherGroup:sum ``". To refer to a production from an unnamed
1228
+ grammar, the token should be prefixed by a colon, e.g., "``:sum ``".
1216
1229
1217
- The definition can contain token names which are marked as interpreted text
1218
- (e.g. "``sum ::= `integer` "+" `integer` ``") -- this generates
1219
- cross-references to the productions of these tokens. Outside of the
1220
- production list, you can reference to token productions using
1221
- :rst:role: `token `.
1222
- However, if you have given a *productionGroup * argument you must prefix the
1230
+ Outside of the production list,
1231
+ if you have given a *productionGroup * argument you must prefix the
1223
1232
token name in the cross-reference with the group name and a colon,
1224
1233
e.g., "``myGroup:sum ``" instead of just "``sum ``".
1225
1234
If the group should not be shown in the title of the link either
0 commit comments