AnnotType ::= SimpleType {Annotation}
ArgType ::= Type
CompoundType ::= AnnotType {with AnnotType} [Refinement]
| Refinement
InfixType ::= CompoundType {id [nl] CompoundType}
Pattern ::= Pattern1 { `|' Pattern1 }
SeqPattern ::= SeqPattern1 { `|' SeqPattern1 }
Pattern1 ::= varid `:' TypePat
| `_' `:' TypePat
| Pattern2
SeqPattern1 ::= varid `:' TypePat
| `_' `:' TypePat
| [SeqPattern2]
Pattern2 ::= varid [ @ Pattern3 ]
| Pattern3
SeqPattern2 ::= varid [ @ SeqPattern3 ]
| SeqPattern3
Pattern3 ::= SimplePattern
| SimplePattern {Id [nl] SimplePattern}
Patterns ::= Pattern { `,' Pattern }
SeqPatterns ::= SeqPattern { `,' SeqPattern }
SimplePattern ::= varid
| `_'
| literal
| XmlPattern
| StableId /[TypeArgs]/ [`(' [Patterns] `)']
| StableId [`(' [Patterns] `)']
| StableId [`(' [Patterns] `,' [varid `@'] `_' `*' `)']
| `(' [Patterns] `)'XXX: Hook for IDE
SimpleType ::= SimpleType TypeArgs
| SimpleType `#' Id
| StableId
| Path `.' type
| `(' Types `)'
| WildcardType
Type ::= InfixType `=>' Type | `(' [`=>' Type] `)' `=>' Type | InfixType [ExistentialClause] ExistentialClause ::= forSome `{' ExistentialDcl {semi ExistentialDcl}} `}' ExistentialDcl ::= type TypeDcl | val ValDcl
TypeArgs ::= `[' ArgType {`,' ArgType} `]'
Types ::= Type {`,' Type}
The implementation for parsing inside of patterns at points where sequences are disallowed.