Browsable Rascal Type Grammar

CC-BY

Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: api/rascal/type/extracted
Source used for this grammar: Jurgen J. Vinju, Type, 2009–2013 [Explore]

Summary

Syntax

Symbol ::=
	[int]::ε
	[bool]::ε
	[real]::ε
	[rat]::ε
	[str]::ε
	[num]::ε
	[node]::ε
	[void]::ε
	[value]::ε
	[loc]::ε
	[datetime]::ε
Symbol ::=
	[label]::(name⟩:stringsymbol⟩:Symbol)
Symbol ::=
	[set]::⟨symbol⟩:Symbol
	[rel]::⟨symbols⟩:Symbol*
	[lrel]::⟨symbols⟩:Symbol*
	[tuple]::⟨symbols⟩:Symbol*
	[list]::⟨symbol⟩:Symbol
	[map]::(from⟩:Symbolto⟩:Symbol)
	[bag]::⟨symbol⟩:Symbol
	[adt]::(name⟩:stringparameters⟩:Symbol*)
	[cons]::(adt⟩:Symbolname⟩:stringparameters⟩:Symbol*)
	[alias]::(name⟩:stringparameters⟩:Symbol*aliased⟩:Symbol)
	[func]::(ret⟩:Symbolparameters⟩:Symbol*)
	[var-func]::(ret⟩:Symbolparameters⟩:Symbol*varArg⟩:Symbol)
	[reified]::⟨symbol⟩:Symbol
Symbol ::=
	[parameter]::(name⟩:stringbound⟩:Symbol)
Production ::=
	[cons]::(def⟩:Symbolsymbols⟩:Symbol*kwTypes⟩:Symbol*kwDefaults⟩:(string (string α)*)*attributes⟩:Attr*)
	[func]::(def⟩:Symbolsymbols⟩:Symbol*kwTypes⟩:Symbol*kwDefaults⟩:(string (string α)*)*attributes⟩:Attr*)
	[choice]::(def⟩:Symbolalternatives⟩:Production*)
Attr ::=
	[tag]::⟨tag⟩:α
Exception ::=
	[typeCastException]::(from⟩:Symbolto⟩:φ)

GrammarLabMaintained by Dr. Vadim Zaytsev a.k.a. @grammarware. Last updated in September 2015. []