index 38cfe53fb66928cd5a963fefe207c8c10bcf7e90..4cbeb5034a515d9fd03c2c49645099b87889eea4 100644 (file)
END;
IF trap IN options THEN HALT(100) END;
ELSIF (n <= -700) & (errors < maxErrors) THEN
END;
IF trap IN options THEN HALT(100) END;
ELSIF (n <= -700) & (errors < maxErrors) THEN
- errNo[errors] := -n; errPos[errors] := pos; INC(errors)
+ errNo[errors] := n; errPos[errors] := pos; INC(errors)
END
END Mark;
END
END Mark;
PROCEDURE GetErrorMsg (err: INTEGER; OUT msg: ARRAY OF CHAR);
BEGIN
PROCEDURE GetErrorMsg (err: INTEGER; OUT msg: ARRAY OF CHAR);
BEGIN
- CASE err OF
+ CASE ABS(err) OF
| 0: msg := 'undeclared identifier'
| 1: msg := 'multiply defined identifier'
| 2: msg := 'illegal character in number'
| 0: msg := 'undeclared identifier'
| 1: msg := 'multiply defined identifier'
| 2: msg := 'illegal character in number'
| 301: msg := 'implicit type cast'
| 302: msg := 'guarded variable can be side-effected'
| 303: msg := 'open array (or pointer to array) containing pointers'
| 301: msg := 'implicit type cast'
| 302: msg := 'guarded variable can be side-effected'
| 303: msg := 'open array (or pointer to array) containing pointers'
+ | 401: msg := 'bytecode restriction: no structured assignment'
+ | 402: msg := 'bytecode restriction: no procedure types'
+ | 403: msg := 'bytecode restriction: no nested procedures'
+ | 404: msg := 'bytecode restriction: illegal SYSTEM function'
+ | 410: msg := 'variable may not have been assigned'
+ | 411: msg := 'no proofable return'
+ | 412: msg := 'illegal constructor call'
+ | 413: msg := 'missing constructor call'
+ | 501: msg := 'user defined error'
+(* COM-related
+ | 700: msg := '700'
+ | 701: msg := '701'
+ | 702: msg := '702'
+ | 703: msg := '703'
+*)
+ | 777: msg := 'register not released'
+ | 778: msg := 'float register not released'
+ | 779: msg := 'float register overallocated'
| 900: msg := 'never used'
| 901: msg := 'never set'
| 902: msg := 'used before set'
| 900: msg := 'never used'
| 901: msg := 'never set'
| 902: msg := 'used before set'
| 912: msg := 'superfluous type guard'
| 913: msg := 'call might depend on evaluation sequence of params.'
| 930: msg := 'superfluous semicolon'
| 912: msg := 'superfluous type guard'
| 913: msg := 'call might depend on evaluation sequence of params.'
| 930: msg := 'superfluous semicolon'
- | 401: msg := 'bytecode restriction: no structured assignment'
- | 402: msg := 'bytecode restriction: no procedure types'
- | 403: msg := 'bytecode restriction: no nested procedures'
- | 404: msg := 'bytecode restriction: illegal SYSTEM function'
- | 410: msg := 'variable may not have been assigned'
- | 411: msg := 'no proofable return'
- | 412: msg := 'illegal constructor call'
- | 413: msg := 'missing constructor call'
ELSE Strings.IntToString(err, msg)
END
END GetErrorMsg;
ELSE Strings.IntToString(err, msg)
END
END GetErrorMsg;
Console.WriteChar(":");
Strings.IntToString(errPos[n], s); Console.WriteStr(s);
Console.WriteStr(": ");
Console.WriteChar(":");
Strings.IntToString(errPos[n], s); Console.WriteStr(s);
Console.WriteStr(": ");
+ IF errNo[n] >= 0 THEN Console.WriteStr("error: ")
+ ELSE Console.WriteStr("warning: ")
+ END;
GetErrorMsg(errNo[n], s);
Console.WriteStr(s);
Console.WriteLn;
GetErrorMsg(errNo[n], s);
Console.WriteStr(s);
Console.WriteLn;