Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: §wip/metasyntax/rascal-types/extracted
Source used for this grammar: Mark Hills, Jurgen J. Vinju, lang::rascal::types::*
, 2009–2013
TagKind
, RName
, Symbol
, LabelSource
, Modifier
, Vis
, AbstractValue
, LabelStackItem
, Timing
, Configuration
, DefOrUse
, LiteralNodeInfo
, MapNodeInfo
, PatternTree
, BindResult
, AssignableTree
, ATResult
, RuntimeException
, Bindings
, RSignatureItem
, RSignature
), 0 root (—), 5 top (BindResult
, ATResult
, RuntimeException
, Bindings
, RSignature
), 6 bottom (Production
, Signature
, Message
2, TypeArg
, Type
4, UserType
3).[functionKind]
, [variableKind]
, [allKind]
, [annoKind]
, [dataKind]
, [viewKind]
, [aliasKind]
, [moduleKind]
, [tagKind]
2, [name]
27, [RSimpleName]
, [nameParts]
, [RCompoundName]
, [rname]
, [parameters]
, [user]
, [messages]
2, [failure]
, [uniqueId]
, [inferred]
2, [overloads]
, [overloaded]
, [visitLabel]
, [blockLabel]
, [forLabel]
, [whileLabel]
, [doWhileLabel]
, [ifLabel]
, [switchLabel]
, [caseLabel]
, [javaModifier]
, [testModifier]
, [defaultModifier]
, [publicVis]
, [privateVis]
, [defaultVis]
, [source]
, [containedIn]
13, [at]
29, [label]
, [rtype]
17, [variable]
, [isVarArgs]
, [throwsTypes]
, [function]
, [closure]
, [module]
, [items]
, [overload]
, [ats]
2, [datatype]
, [sorttype]
, [constructor]
, [production]
, [onTypes]
2, [annotation]
, [tkind]
, [tag]
, [alias]
, [booleanScope]
, [blockScope]
, [labelName]
, [labelSource]
, [labelType]
, [labelStackItem]
, [tmsg]
, [tstart]
, [tend]
, [timing]
, [locationTypes]
, [labelEnv]
, [fcvEnv]
, [typeEnv]
, [modEnv]
, [annotationEnv]
, [tagEnv]
, [visibilities]
, [store]
, [adtFields]
, [nonterminalFields]
, [functionModifiers]
, [definitions]
, [uses]
, [adtConstructors]
, [nonterminalConstructors]
, [stack]
, [labelStack]
, [timings]
, [nextLoc]
, [uniqueify]
, [config]
, [def]
, [use]
, [literalNodeInfo]
, [mapNodeInfo]
, [children]
5, [setNode]
, [listNode]
, [nameNode]
, [multiNameNode]
, [spliceNodePlus]
2, [spliceNodeStar]
2, [child]
7, [negativeNode]
, [literalNode]
2, [names]
, [tupleNode]
, [typedNameNode]
, [mapChildren]
, [mapNode]
, [s]
, [d]
, [reifiedTypeNode]
, [head]
, [args]
2, [callOrTreeNode]
, [concreteSyntaxNode]
, [varBecomesNode]
, [asTypeNode]
, [deepNode]
, [antiNode]
, [tvarBecomesNode]
, [bracketNode]
, [variableNode]
, [receiver]
4, [subscriptType]
, [subscriptNode]
, [fieldAccessNode]
, [defaultType]
, [ifDefinedOrDefaultNode]
, [constructorNode]
, [tupleNodeAT]
, [annotationNode]
, [t1]
4, [UnexpectedRType]
, [t2]
2, [UnexpectedRTypes]
, [UnimplementedRType]
, [l]
, [CannotCalculateBindings]
, [varName]
2, [typeLub]
, [typeBound]
, [invalidMatch]
2, [targetType]
, [sourceType]
, [varType]
, [aliasName]
, [aliasType]
, [aliasedType]
, [AliasSigItem]
, [functionName]
, [sig]
, [FunctionSigItem]
, [variableName]
, [variableType]
, [VariableSigItem]
, [adtName]
, [adtType]
2, [ADTSigItem]
, [conName]
, [argTypes]
, [adtAt]
, [ConstructorSigItem]
, [prod]
, [sortAt]
, [ProductionSigItem]
, [annName]
, [annType]
, [onType]
, [AnnotationSigItem]
, [tagName]
, [taggedTypes]
, [TagSigItem]
, [sortName]
4, [sort]
4, [LexicalSigItem]
, [ContextfreeSigItem]
, [KeywordSigItem]
, [LayoutSigItem]
, [datatypes]
, [lexicalNonterminals]
, [contextfreeNonterminals]
, [keywordNonterminals]
, [layoutNonterminals]
, [aliases]
, [tags]
, [annotations]
, [publicVariables]
, [publicFunctions]
, [publicConstructors]
, [publicProductions]
, [privateVariables]
, [privateFunctions]
, [imports]
, [rsignature]
.TagKind ::= [functionKind]::ε [variableKind]::ε [allKind]::ε [annoKind]::ε [dataKind]::ε [viewKind]::ε [aliasKind]::ε [moduleKind]::ε [tagKind]::ε
RName ::=
[RSimpleName]::[name]::string
[RCompoundName]::[nameParts]::string
Symbol ::= [user]::[rname]::RName [parameters]::Symbol [failure]::[messages]::Message [inferred]::[uniqueId]::integer [overloaded]::[overloads]::Symbol
LabelSource ::= [visitLabel]::ε [blockLabel]::ε [forLabel]::ε [whileLabel]::ε [doWhileLabel]::ε [ifLabel]::ε [switchLabel]::ε [caseLabel]::ε
Modifier ::= [javaModifier]::ε [testModifier]::ε [defaultModifier]::ε
Vis ::= [publicVis]::ε [privateVis]::ε [defaultVis]::ε
AbstractValue ::= [label]::"true""false" [containedIn]::integer [at]::string [function]:: [name]::RName [rtype]::Symbol [isVarArgs]::"true""false" [containedIn]::integer [throwsTypes]::Symbol [at]::string [closure]:: [rtype]::Symbol [containedIn]::integer [at]::string [module]:: [name]::RName [at]::string [overload]:: [items]::integer [rtype]::Symbol [datatype]:: [name]::RName [rtype]::Symbol [containedIn]::integer [ats]::string [sorttype]:: [name]::RName [rtype]::Symbol [containedIn]::integer [ats]::string [constructor]:: [name]::RName [rtype]::Symbol [containedIn]::integer [at]::string [production]:: [name]::RName [rtype]::Symbol [containedIn]::integer [at]::string [annotation]:: [name]::RName [rtype]::Symbol [onTypes]::Symbol [containedIn]::integer [at]::string [tag]:: [name]::RName [tkind]::TagKind [onTypes]::Symbol [containedIn]::integer [at]::string [alias]:: [name]::RName [rtype]::Symbol [containedIn]::integer [at]::string [booleanScope]:: [containedIn]::integer [at]::string [blockScope]:: [containedIn]::integer [at]::string[name]::RName [source]::LabelSource [containedIn]::integer [at]::string [variable]:: [name]::RName [rtype]::Symbol [inferred]::
LabelStackItem ::= [labelStackItem]::[labelName]::RName [labelSource]::LabelSource [labelType]::Symbol
Timing ::= [timing]::[tmsg]::string [tstart]::string [tend]::string
Configuration ::= [config]::[messages]::Message [locationTypes]:: string Symbol [labelEnv]:: RName integer [fcvEnv]:: RName integer [typeEnv]:: RName integer [modEnv]:: RName integer [annotationEnv]:: RName integer [tagEnv]:: RName integer [visibilities]:: integer Vis [store]:: integer AbstractValue [adtFields]:: integer string Symbol [nonterminalFields]:: integer string Symbol [functionModifiers]:: integer Modifier [definitions]:: integer string [uses]:: integer string [adtConstructors]:: integer integer [nonterminalConstructors]:: integer integer [stack]::integer [labelStack]::LabelStackItem [timings]::Timing [nextLoc]::integer [uniqueify]::integer
DefOrUse ::= [def]::[name]::RName [use]::[name]::RName
LiteralNodeInfo ::= [literalNodeInfo]::DefOrUse string
MapNodeInfo ::= [mapNodeInfo]::PatternTree PatternTree
PatternTree ::= [setNode]::[children]::PatternTree[listNode]::[children]::PatternTree [nameNode]::[name]::RName [multiNameNode]::[name]::RName [spliceNodePlus]::[name]::RName [spliceNodePlus]:: [name]::RName [at]::string [rtype]::Symbol [spliceNodeStar]::[name]::RName [spliceNodeStar]:: [name]::RName [at]::string [rtype]::Symbol [negativeNode]::[child]::PatternTree [literalNode]::[rtype]::Symbol [literalNode]::[names]::LiteralNodeInfo [tupleNode]::[children]::PatternTree [typedNameNode]:: [name]::RName [at]::string [rtype]::Symbol [mapNode]::[mapChildren]::MapNodeInfo [reifiedTypeNode]:: [s]::PatternTree [d]::PatternTree [callOrTreeNode]:: [head]::PatternTree [args]::PatternTree [concreteSyntaxNode]:: [rtype]::Symbol [args]::PatternTree [varBecomesNode]:: [name]::RName [at]::string [child]::PatternTree [asTypeNode]:: [rtype]::Symbol [child]::PatternTree [deepNode]::[child]::PatternTree [antiNode]::[child]::PatternTree [tvarBecomesNode]:: [rtype]::Symbol [name]::RName [at]::string [child]::PatternTree
BindResult ::= Configuration PatternTree
AssignableTree ::= [bracketNode]::[child]::AssignableTree [variableNode]::[name]::RName [subscriptNode]::[receiver]::AssignableTree [subscriptType]::Symbol [fieldAccessNode]:: [receiver]::AssignableTree [name]::RName [ifDefinedOrDefaultNode]:: [receiver]::AssignableTree [defaultType]::Symbol [constructorNode]:: [name]::RName [children]::AssignableTree [tupleNodeAT]::[children]::AssignableTree [annotationNode]:: [receiver]::AssignableTree [name]::RName
ATResult ::= Configuration AssignableTree
RuntimeException ::= [UnexpectedRType]::[t1]::Symbol [UnexpectedRTypes]::[t1]::Symbol [t2]::Symbol [UnimplementedRType]::[t1]::Symbol [CannotCalculateBindings]:: [t1]::Symbol [t2]::Symbol [l]::string [invalidMatch]:: [varName]::string [typeLub]::Symbol [typeBound]::Symbol [invalidMatch]:: [targetType]::Symbol [sourceType]::Symbol
Bindings ::=[varName]::string [varType]::Symbol
RSignatureItem ::= [AliasSigItem]::[aliasName]::RName [aliasType]::UserType [aliasedType]::Type [at]::string [FunctionSigItem]:: [functionName]::RName [sig]::Signature [at]::string [VariableSigItem]:: [variableName]::RName [variableType]::Type [at]::string [ADTSigItem]:: [adtName]::RName [adtType]::UserType [at]::string [ConstructorSigItem]:: [conName]::RName [adtType]::UserType [argTypes]::TypeArg [adtAt]::string [at]::string [ProductionSigItem]:: [prod]::Production [sortAt]::string [at]::string [AnnotationSigItem]:: [annName]::RName [annType]::Type [onType]::Type [at]::string [TagSigItem]:: [tagName]::RName [tagKind]::TagKind [taggedTypes]::Symbol [at]::string [LexicalSigItem]:: [sortName]::RName [sort]::Symbol [at]::string [ContextfreeSigItem]:: [sortName]::RName [sort]::Symbol [at]::string [KeywordSigItem]:: [sortName]::RName [sort]::Symbol [at]::string [LayoutSigItem]:: [sortName]::RName [sort]::Symbol [at]::string
RSignature ::= [rsignature]::[datatypes]::RSignatureItem [lexicalNonterminals]::RSignatureItem [contextfreeNonterminals]::RSignatureItem [keywordNonterminals]::RSignatureItem [layoutNonterminals]::RSignatureItem [aliases]::RSignatureItem [tags]::RSignatureItem [annotations]::RSignatureItem [publicVariables]::RSignatureItem [publicFunctions]::RSignatureItem [publicConstructors]::RSignatureItem [publicProductions]::RSignatureItem [privateVariables]::RSignatureItem [privateFunctions]::RSignatureItem [imports]::RName