Skip to content

Commit

Permalink
Editorial: Make grammar recursion more clear (#593)
Browse files Browse the repository at this point in the history
  • Loading branch information
leebyron authored Jul 23, 2019
1 parent a3087c2 commit dfd7571
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions spec/Appendix A -- Notation Conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ A definition may refer to itself, which describes repetitive sequences,
for example:

ListOfLetterA :
- `a`
- ListOfLetterA `a`
- `a`


## Lexical and Syntactical Grammar
Expand Down Expand Up @@ -108,11 +108,11 @@ Sentence : Noun Verb Adverb?
is shorthand for

Sentence :
- Noun Verb
- Noun Verb Adverb
- Noun Verb

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

As an example:

Expand All @@ -123,8 +123,8 @@ is shorthand for
Book : Cover Page_list Cover

Page_list :
- Page
- Page_list Page
- Page


**Parameterized Grammar Productions**
Expand Down
6 changes: 3 additions & 3 deletions spec/Appendix B -- Grammar Summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ ObjectTypeExtension :
- extend type Name ImplementsInterfaces

ImplementsInterfaces :
- implements `&`? NamedType
- ImplementsInterfaces & NamedType
- implements `&`? NamedType

FieldsDefinition : { FieldDefinition+ }

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

UnionMemberTypes :
- = `|`? NamedType
- UnionMemberTypes | NamedType
- = `|`? NamedType

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

DirectiveLocations :
- `|`? DirectiveLocation
- DirectiveLocations | DirectiveLocation
- `|`? DirectiveLocation

DirectiveLocation :
- ExecutableDirectiveLocation
Expand Down
6 changes: 3 additions & 3 deletions spec/Section 3 -- Type System.md
Original file line number Diff line number Diff line change
Expand Up @@ -553,8 +553,8 @@ Scalar type extensions have the potential to be invalid if incorrectly defined.
ObjectTypeDefinition : Description? type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition?

ImplementsInterfaces :
- implements `&`? NamedType
- ImplementsInterfaces & NamedType
- implements `&`? NamedType

FieldsDefinition : { FieldDefinition+ }

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

UnionMemberTypes :
- = `|`? NamedType
- UnionMemberTypes | NamedType
- = `|`? NamedType

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

DirectiveLocations :
- `|`? DirectiveLocation
- DirectiveLocations | DirectiveLocation
- `|`? DirectiveLocation

DirectiveLocation :
- ExecutableDirectiveLocation
Expand Down

0 comments on commit dfd7571

Please sign in to comment.