next up previous
Next: Qualified names Up: Applied occurrences of names Previous: Method names

Ambiguous names

Ambiguous names[25]:
TREE SYMBOL sAmbgIdUse     INHERITS VarIdUseEnv,
                                    FldIdUseEnv,  TypIdUseEnv,  IdentOcc END;
TREE SYMBOL qAmbgIdUse     INHERITS FldQualIdUse, TypQualIdUse, IdentOcc END;
TREE SYMBOL pAmbiguousName INHERITS PkgIdUseEnv COMPUTE
  SYNT.Sym=FullyQualifiedName(THIS.Ids);
END;

RULE: pAmbiguousName ::= sAmbgIdUse COMPUTE
  pAmbiguousName.Ids=SingleintList(sAmbgIdUse.Sym);
  pAmbiguousName.TypScopeKey=
    IF(NE(sAmbgIdUse.VarKey,NoKey),
      TransDefer(GetTypeOf(sAmbgIdUse.VarKey,NoKey)),
    IF(NE(sAmbgIdUse.FldKey,NoKey),
      TransDefer(GetTypeOf(sAmbgIdUse.FldKey,NoKey)),
    IF(NE(sAmbgIdUse.TypKey,NoKey),
      TransDefer(sAmbgIdUse.TypKey),
    pAmbiguousName.PkgKey)));
END;

RULE: pAmbiguousName ::= pAmbiguousName qAmbgIdUse COMPUTE
  pAmbiguousName[1].Ids=ConsintList(qAmbgIdUse.Sym,pAmbiguousName[2].Ids);
  pAmbiguousName[1].TypScopeKey=
    IF(NE(qAmbgIdUse.FldKey,NoKey),
      TransDefer(GetTypeOf(qAmbgIdUse.FldKey,NoKey)),
    IF(NE(qAmbgIdUse.TypKey,NoKey),
      TransDefer(qAmbgIdUse.TypKey),
    pAmbiguousName[1].PkgKey));
  qAmbgIdUse.TypScopeKey=pAmbiguousName[2].TypScopeKey;
  qAmbgIdUse.FldScopeKey=pAmbiguousName[2].TypScopeKey;
END;
This macro is invoked in definition 21.



2008-09-11