next up previous
Next: Multiple definition errors Up: Check Context Conditions Previous: Types, values, and variables

Names

Names[5]:
TREE SYMBOL TypeIdDef INHERITS ChkTypeDefDefId END;

RULE: TypeName ::= Name $pTypeName COMPUTE
  TypeName.Sym=pTypeName.Sym;
  TypeName.Type=pTypeName.Type;
END;

TREE SYMBOL TypeName INHERITS ChkTypeDefUseId COMPUTE
  IF(EQ(THIS.Type,NoKey),
    message(
      ERROR,
      CatStrInd("Invalid type name: ",THIS.Sym),
      0,
      COORDREF));
END;

RULE: Expression ::= Name $pExpressionName COMPUTE
  IF(AND(
      NE(pExpressionName.Sym,NoStrIndex),
      EQ(pExpressionName.Key,NoKey)),
    message(
      ERROR,
      CatStrInd(
        "Invalid variable or field name: ",
        pExpressionName.Sym),
      0,
      COORDREF));
END;

RULE: MethodName ::= Name $pMethodName COMPUTE
  MethodName.Sym=pMethodName.Sym;
END;

TREE SYMBOL MethodName COMPUTE
  IF(EQ(THIS.Key,NoKey),
    message(
      ERROR,
      CatStrInd("Invalid method name: ",THIS.Sym),
      0,
      COORDREF))
    <- INCLUDING Goal.GotAllConstants;
END;

TREE SYMBOL InhName COMPUTE
  IF(EQ(THIS.Key,NoKey),
    message(
      ERROR,
      CatStrInd("Invalid Type name: ",THIS.Sym),
      0,
      COORDREF))
    <- INCLUDING Goal.GotAllConstants;
END;

RULE: SingleTypeImportDeclaration ::= 'import' QualInhName COMPUTE
  IF(EQ(QualInhName.Key,NoKey),
    message(
      ERROR,
      CatStrInd("Invalid Type name: ",QualInhName.Sym),
      0,
      COORDREF))
    <- INCLUDING Goal.GotAllConstants;
END;

Multiple definition errors[6]
This macro is invoked in definition 1.



Subsections

2008-09-11