Contextual scoping is broken
Contextual scoping, e.g.
defines x in y
, seems to be broken in the latest nightly:x
is not visible iny
. Here is an example:NaBL:
namespaces Variable binding rules Foreach(t, v, exp, body): defines unique Variable v of type t in body VarRef(v): refers to Variable v
SDF3:
context-free syntax Start.Start = <<Foreach>> Foreach.Foreach = <for (<Type> <ID> : <Exp>) { <Body> }> Type.Int = <int> Exp.Exp = <<VarRef>> Body.Body = <<Exp*>> VarRef.VarRef = <<ID>>
Example program:
Submitted by Oskar van Rest on 24 December 2014 at 12:44for (int i : i) { // second 'i' unresolved is expected i // but this 'i' should not be unresolved, but it is! }
Issue Log
On 28 December 2014 at 13:49 Eelco Visser commented:
This has been broken for a while; not just in current nightly
On 28 December 2014 at 23:38 Guido Wachsmuth commented:
I am looking into it and into #117 and #118 tonight and tomorrow.
On 12 January 2015 at 03:47 Guido Wachsmuth commented:
I found the issue in the generator. There is a too generic check, which rules out all rules with explicit definition clauses. This is clearly wrong, but I still need to investigate what removing the check means for combinations of implicit definition and scoping clauses.
Log in to post comments