Skip to content

Commit dfd7571

Browse files
authored
Editorial: Make grammar recursion more clear (#593)
1 parent a3087c2 commit dfd7571

3 files changed

+11
-11
lines changed

spec/Appendix A -- Notation Conventions.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ A definition may refer to itself, which describes repetitive sequences,
4040
for example:
4141

4242
ListOfLetterA :
43-
- `a`
4443
- ListOfLetterA `a`
44+
- `a`
4545

4646

4747
## Lexical and Syntactical Grammar
@@ -108,11 +108,11 @@ Sentence : Noun Verb Adverb?
108108
is shorthand for
109109

110110
Sentence :
111-
- Noun Verb
112111
- Noun Verb Adverb
112+
- Noun Verb
113113

114-
A subscript suffix "{Symbol+}" is shorthand for a list of
115-
one or more of that symbol.
114+
A subscript suffix "{Symbol+}" is shorthand for a list of one or more of that
115+
symbol, represented as an additional recursive production.
116116

117117
As an example:
118118

@@ -123,8 +123,8 @@ is shorthand for
123123
Book : Cover Page_list Cover
124124

125125
Page_list :
126-
- Page
127126
- Page_list Page
127+
- Page
128128

129129

130130
**Parameterized Grammar Productions**

spec/Appendix B -- Grammar Summary.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,8 @@ ObjectTypeExtension :
233233
- extend type Name ImplementsInterfaces
234234

235235
ImplementsInterfaces :
236-
- implements `&`? NamedType
237236
- ImplementsInterfaces & NamedType
237+
- implements `&`? NamedType
238238

239239
FieldsDefinition : { FieldDefinition+ }
240240

@@ -253,8 +253,8 @@ InterfaceTypeExtension :
253253
UnionTypeDefinition : Description? union Name Directives[Const]? UnionMemberTypes?
254254

255255
UnionMemberTypes :
256-
- = `|`? NamedType
257256
- UnionMemberTypes | NamedType
257+
- = `|`? NamedType
258258

259259
UnionTypeExtension :
260260
- extend union Name Directives[Const]? UnionMemberTypes
@@ -281,8 +281,8 @@ InputObjectTypeExtension :
281281
DirectiveDefinition : Description? directive @ Name ArgumentsDefinition? on DirectiveLocations
282282

283283
DirectiveLocations :
284-
- `|`? DirectiveLocation
285284
- DirectiveLocations | DirectiveLocation
285+
- `|`? DirectiveLocation
286286

287287
DirectiveLocation :
288288
- ExecutableDirectiveLocation

spec/Section 3 -- Type System.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -553,8 +553,8 @@ Scalar type extensions have the potential to be invalid if incorrectly defined.
553553
ObjectTypeDefinition : Description? type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition?
554554

555555
ImplementsInterfaces :
556-
- implements `&`? NamedType
557556
- ImplementsInterfaces & NamedType
557+
- implements `&`? NamedType
558558

559559
FieldsDefinition : { FieldDefinition+ }
560560

@@ -1125,8 +1125,8 @@ Interface type extensions have the potential to be invalid if incorrectly define
11251125
UnionTypeDefinition : Description? union Name Directives[Const]? UnionMemberTypes?
11261126

11271127
UnionMemberTypes :
1128-
- = `|`? NamedType
11291128
- UnionMemberTypes | NamedType
1129+
- = `|`? NamedType
11301130

11311131
GraphQL Unions represent an object that could be one of a list of GraphQL
11321132
Object types, but provides for no guaranteed fields between those types.
@@ -1610,8 +1610,8 @@ Expected Type | Internal Value | Coerced Result
16101610
DirectiveDefinition : Description? directive @ Name ArgumentsDefinition? on DirectiveLocations
16111611

16121612
DirectiveLocations :
1613-
- `|`? DirectiveLocation
16141613
- DirectiveLocations | DirectiveLocation
1614+
- `|`? DirectiveLocation
16151615

16161616
DirectiveLocation :
16171617
- ExecutableDirectiveLocation

0 commit comments

Comments
 (0)