next up previous
Next: Expression names Up: Applied occurrences of names Previous: Applied occurrences of names

Type names

Type names[22]:
RULE: TypeName ::= Name $pTypeName COMPUTE
  TypeName.Key=pTypeName.Key;
END;

TREE SYMBOL sTypeIdUse    INHERITS TypIdUseEnv,  IdentOcc END;
TREE SYMBOL qTypeIdUse    INHERITS TypQualIdUse, IdentOcc END;
TREE SYMBOL pPkgOrTypName INHERITS PkgIdUseEnv COMPUTE
  SYNT.Sym=FullyQualifiedName(THIS.Ids);
END;
TREE SYMBOL pTypeName COMPUTE
  SYNT.Sym=FullyQualifiedName(THIS.Ids);
END;

RULE: pTypeName ::= sTypeIdUse COMPUTE
  pTypeName.Ids=SingleintList(sTypeIdUse.Sym);
  pTypeName.Key=sTypeIdUse.TypKey;
END;

RULE: pTypeName ::= pPkgOrTypName qTypeIdUse COMPUTE
  pTypeName.Ids=ConsintList(qTypeIdUse.Sym,pPkgOrTypName.Ids);
  pTypeName.Key=qTypeIdUse.TypKey;
  qTypeIdUse.TypScopeKey=TransDefer(pPkgOrTypName.TypScopeKey);
END;

RULE: pPkgOrTypName ::= sTypeIdUse COMPUTE
  pPkgOrTypName.Ids=SingleintList(sTypeIdUse.Sym);
  pPkgOrTypName.TypScopeKey=
    IF(NE(sTypeIdUse.TypKey,NoKey),TransDefer(sTypeIdUse.TypKey),
    pPkgOrTypName.PkgKey);
END;

RULE: pPkgOrTypName ::= pPkgOrTypName qTypeIdUse COMPUTE
  pPkgOrTypName[1].Ids=ConsintList(qTypeIdUse.Sym,pPkgOrTypName[2].Ids);
  pPkgOrTypName[1].TypScopeKey=
    IF(NE(qTypeIdUse.TypKey,NoKey),TransDefer(qTypeIdUse.TypKey),
    pPkgOrTypName[1].PkgKey);
  qTypeIdUse.TypScopeKey=pPkgOrTypName[2].TypScopeKey;
END;
This macro is defined in definitions 22.
This macro is invoked in definition 21.



2008-09-11