-- file ErrorTab.Mesa
-- last modified by Satterthwaite, April 9, 1986 11:06:50 am PST
-- last modified by Donahue, 11-Dec-81 13:58:57

DIRECTORY
  Log: TYPE USING [ErrorCode],
  Tree: TYPE USING [NodeName];

ErrorTab: PROGRAM = {

  OpName: ARRAY Tree.NodeName[$assignx..$uparrow] OF STRING = [
    "←", "←",
    " OR ", " AND ", "=", "#", "<", ">=", ">", "<=", " IN ", " ~IN ",
    "+", "-", "*", "/", " MOD ",
    ".", ".", ".",
    " NEW ", "~", "-", "@", "↑"];

  FnName: ARRAY Tree.NodeName[$min..$new] OF STRING = [
    "MIN", "MAX", "LONG", "ABS", "ALL", "SIZE",
    "FIRST", "LAST", "PRED", "SUCC",
    "DESCRIPTOR", "LENGTH", "BASE", "LOOPHOLE", "NIL", "NEW"];

  ApplName: ARRAY Tree.NodeName[$apply..$joinx] OF STRING = [
    "APPLY", "APPLY", "", "SIGNAL", "ERROR", "ERROR",
    "START", "FORK", "JOIN"];

  FApplName: ARRAY Tree.NodeName[$restart..$broadcast] OF STRING = [
    "RESTART", "STOP", "LOCK", "WAIT", "NOTIFY", "BROADCAST"];

  ErrorMessages: ARRAY Log.ErrorCode OF STRING = [
    
 -- general purpose errors (no parameters)
    --compilerError,
        "FATAL COMPILER ERROR",
    --unimplemented,
        "unimplemented construct",
    --other,
        "unspecified error",
    --aborted,
        "compilation aborted",

 -- errors with no parameters
    --arraySize,
        "array too large for implementation",
    --attrClash
        "invalid attribute combination",
    --bodyType,
        "illegal initialization to body",
    --catchLabel,
        "misplaced RETRY or CONTINUE",
    --descriptor,
        "misused DESCRIPTOR",
    --discrimForm,
        "incorrect discrimination",
    --exit,
        "misplaced EXIT or LOOP",
    --illDefinedReturn,
        "default return of anonymous value",
    --implicitCall,
        "implicit system call",
    --indexType,
        "illegal index type",
    --inlineChecked,
        "MACHINE CODE cannot be CHECKED",
    --inlineType,
        "illegal initialization to MACHINE CODE",
    --instLength,
        "instruction has incorrect length",
    --interfaceString,
        "string literals not permitted in DEFINITIONS",
    --keys,
        "keywords not permitted",
    --long,
        "misused LONG",
    --longPath,
        "must be in MDS",
    --machDep,
        "type must be MACHINE DEPENDENT",
    --misplacedCatch,
        "misplaced catch phrase",
    --misplacedEntry,
        "unmonitored ENTRY or INTERNAL",
    --misplacedMonitorRef,
        "unmonitored WAIT or NOTIFY",
    --misplacedResume,
        "misplaced REJECT or RESUME",
    --misplacedReturn,
        "misplaced RETURN",
    --misplacedStop,
        "misplaced STOP",
    --misplacedType,
        "misplaced opaque type declaration",
    --mixedPositions,
        "mixed explicit and implicit field positions",
    --noAccess,
        "attempt to access private fields",
    --nonOrderedType,
        "index or interval type must be ordered",
    --nonTypeCons,
        "unrecognizable type constructor",
    --nonVoidStmt,
        "procedure used as a statement returns a value",
    --opaqueTest,
        "discrimination on opaque types is unimplemented",
    --relative,
        "misused RELATIVE",
    --stateVector,
        "state vector has improper offset",
    --staticNesting,
        "body or catch phrase nested too deeply",
    --subrangeNesting,
        "interval bounds are out of range",
    --unsafeBlock,
        "improper use of an unsafe block",
    --var,
        "misused VAR",

   -- errors mapping hash to sei parameters
    --unknownId,
        "is undeclared",
    --unknownField,
        "is not valid as a field selector",

   -- errors with hash parameters
    --ambiguousId,
        "is ambiguous without discrimination",
    --duplicateId,
        "is multiply defined",
    --missingImport,
        "is an unmatched implicit import",
    --unknownTag,
        "is not a legal variant tag",
    --duplicateTag,
        "labels multiple variants",
    --unknownVariant,
        "does not name a variant",
    --unknownKey,
        "is not valid as a key",
    --duplicateKey,
        "is repeated as a key",
    --omittedKey,
        "cannot be defaulted",
    --openId,
        "must label a record",
    --fileName,
        "cannot be opened",
    --fileWrong,
        "found in wrong version",
    --moduleId,
        "is not a module name",

   -- errors with sei parameters
    --addressOverflow,
        "exceeds addressing limits",
    --circularType,
        "leads to a circular type definition", 
    --circularValue,
        "has ill-defined or circular value",
    --elision,
        "cannot be defaulted or voided",
    --enumOrder,
        "is out of order",
    --exportAttr,
        "is exported with incorrect attributes",
    --exportClash,
        "is exported with incorrect type",
    --fieldPosition,
        "has invalid field width or alignment",
    --forwardRef,
        "is used before set",
    --internalCall,
        "is a misused INTERNAL",
    --missingBase,
        "requires a base value",
    --missingInit,
        "requires an initial value",
    --missingLock,
        "required for lock",
    --nonDefinition,
        "improperly defined for a DEFINITIONS module",
    --nonTagType,
        "has a type illegal for a tag",
    --nonTypeId,
        "is not a type",
    --notImported,
        "must come from an imported interface",
    --position,
        "cannot have a specified position",
    --privateId,
        "is private",
    --recordGap,
        "is followed by a gap",
    --recordOverlap,
        "overlaps another field",
    --recursiveInline,
        "is INLINE and recursive",
    --typeLength,
        "has unknown or ill-defined size",
     --updateClash,
        "must be exported as READONLY",
   --varExport,
        "has no exportable value",

   -- errors with tree parameters
    --boundsFault,
        "is out of range",
    --controlId,
        "is an improper control variable",
    --defaultForm,
        "has an invalid default",
    --duplicateLabel,
        "is multiply defined",
    --missingBinding,
        "lacks a tag needed for discrimination",
    --misusedInline,
        "is an incorrectly used inline",
    --mixedRepresentation,
        "has signed/unsigned ambiguity",
    --noApplication,
        "does not allow an argument list",
    --nonAddressable,
        "does not allow indirect reference",
    --nonConstant,
        "has nonconstant value",
    --nonInterface,
        "must have an interface type",
    --nonLHS,
        "is not a variable",
    --nonVar,
        "is not address (@) of a variable",
    --nonVariantLabel,
        "specifies an inadmissable test",
    --noTarget,
        "requires explicit type",
    --notPortable,
        "is not importable/exportable",
    --noVariants,
        "has no variants",
    --overflow,
        "overflows",
    --operandSize,
        "has a size exceeding implementation limits",
    --scopeFault,
        "is being assigned out of scope",
    --sizeClash,
        "has incorrect or ambiguous length",
    --spuriousBinding,
        "explicit selection not permitted",
    --typeClash,
        "has incorrect type",
    --unknownLabel,
        "is undeclared",
    -- unsafeOperation,
        "uses an unsafe operation",
    -- unsafeSelection,
        "is discriminated unsafely",

   -- errors with tree and operator parameters
    --missingAttr
        "has no ",
    --missingOp
        "has a type with no ",
    -- unsafeOp,
        "uses an unsafe ",

   -- errors with numeric parameters
    --bodyEntries,
        "too many procedure or signal definitions",
    --exportedVars,
        "too many exported variables",
    --interfaceEntries,
        "too many interface items",
    --listShort
        "too few elements in list",
    --listLong
        "too many elements in list",

   -- warnings with no parameters
    --pointerInit
        "multiple initialization with a pointer",
    --unreachable,
        "unreachable code",

   -- warnings with sei parameters
    --paddedField
        "has been padded",
    --privateExport
        "is private but matches an export",
    --uninitialized
        "appears uninitialized",
    --unusedExport
        "receives no exported values",
    --unusedId
        "is never referenced",
    --unusedImport
        "supplies no imported values",
    --voidExport
        "matches a constant in an exported interface",

   -- warnings with substring parameters
    --replString
        "has global strings preventing replacement",
    --replId
        "has incompatible attributes for replacement",

   -- warnings with tree parameters
    --emptyArray,
        "has zero length",
    --fileVersion,
        "referenced in different versions",
    --unsignedCompare
        "will use unsigned comparison"

    ];

}.