NaBL files with more than 3 rules are ambiguous
Any NaBL file with more than 3 rules is ambiguous, for example:
'module(unparameterized(m), _, _): defines Module m scopes Sort 'module(unparameterized(m)): imports Sort from Module m
is fine but
'module(unparameterized(m), _, _): defines Module m scopes Sort 'module(unparameterized(m)): imports Sort from Module m TemplateProduction(s, _, _): defines non-unique Sort s SortDef(s): defines non-unique Sort s
produces an ambiguity:
Submitted by Gabriël Konat on 13 December 2013 at 12:13Fragment is ambiguous: amb([[BindingRule(NoAnnoList(Op("'module",[NoAnnoList(Op("unparameterized", [Var("m")])),Wld,Wld])),[],[DefClause(Explicit,Unique,[],NamespaceRef("Module"),VarRef("m"),[],Current, []),ScopeClause([NamespaceRef("Sort")])]),BindingRule(NoAnnoList(Op("'module", [NoAnnoList(Op("unparameterized",[Var("m")]))])),[], [ImportClause([WildcardImport([Restricted([],NamespaceRef("Sort"))], [],Context(All,NamespaceRef("Module"),VarRef("m"),[],Current),Current, [])])]),BindingRule(NoAnnoList(Op("TemplateProduction",[Var("s"),Wld,Wld])),[], [amb([DefClause(Explicit,NonUnique,[],NamespaceRef("Sort"),VarRef("s"),[],Current,[]),DefClause(Explicit,Unique, [QualityRef("non-unique")],NamespaceRef("Sort"),VarRef("s"),[],Current, [])])]),BindingRule(NoAnnoList(Op("SortDef",[Var("s")])),[],[amb([DefClause(Explicit,NonUnique, [],NamespaceRef("Sort"),VarRef("s"),[],Current,[]),DefClause(Explicit,Unique,[QualityRef("non- unique")],NamespaceRef("Sort"),VarRef("s"),[],Current,[])])])],[BindingRule(NoAnnoList(Op("'module", [NoAnnoList(Op("unparameterized",[Var("m")])),Wld,Wld])),[],[DefClause(Explicit,Unique, [],NamespaceRef("Module"),VarRef("m"),[],Current, []),ScopeClause([NamespaceRef("Sort")])]),BindingRule(NoAnnoList(Op("'module", [NoAnnoList(Op("unparameterized",[Var("m")]))])),[], [ImportClause([WildcardImport([Restricted([],NamespaceRef("Sort"))], [],Context(All,NamespaceRef("Module"),VarRef("m"),[],Current),Current, [])])]),BindingRule(NoAnnoList(Op("TemplateProduction",[Var("s"),Wld,Wld])),[],[DefClause(Explicit,NonUnique, [QualityRef("Sort")],NamespaceRef("s"),VarRef("SortDef"),[],Current, [])]),BindingRule(NoAnnoList(Tuple([Var("s")])),[],[amb([DefClause(Explicit,NonUnique, [],NamespaceRef("Sort"),VarRef("s"),[],Current,[]),DefClause(Explicit,Unique,[QualityRef("non- unique")],NamespaceRef("Sort"),VarRef("s"),[],Current,[])])])]])
Issue Log
On 13 December 2013 at 12:27 Gabriël Konat commented:
This is caused by https://github.com/metaborg/nabl/commit/13082574147876c7d971e2c1de3ae6b6025a573d, I’ve reversed the commit for now.
On 17 December 2013 at 15:05 Guido Wachsmuth commented:
Fixed with a new syntax for qualities.
On 17 December 2013 at 15:05 Guido Wachsmuth closed this issue.
Log in to post comments