Skip to content

Editorial: Make grammar recursion more clear #593

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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