summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e52a3df)
raw | patch | inline | side by side (parent: e52a3df)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sat, 14 Dec 2019 18:49:55 +0000 (21:49 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sat, 14 Dec 2019 18:49:55 +0000 (21:49 +0300) |
src/generic/Dev/Mod/CPM.cp | patch | blob | history | |
src/generic/Dev/Mod/CPR.cp | patch | blob | history |
index 97c6b3e569837bc50cd58638a8484bd0e05fe5e4..4cbeb5034a515d9fd03c2c49645099b87889eea4 100644 (file)
| 301: msg := 'implicit type cast'
| 302: msg := 'guarded variable can be side-effected'
| 303: msg := 'open array (or pointer to array) containing pointers'
- | 900: msg := 'never used'
- | 901: msg := 'never set'
- | 902: msg := 'used before set'
- | 903: msg := 'set but never used'
- | 904: msg := 'used as varpar, possibly not set'
- | 905: msg := 'also declared in outer scope'
- | 906: msg := 'access/assignment to intermediate'
- | 907: msg := 'redefinition'
- | 908: msg := 'new definition'
- | 909: msg := 'statement after RETURN/EXIT'
- | 910: msg := 'for loop variable set'
- | 911: msg := 'implied type guard'
- | 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'
| 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'
| 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'
+ | 903: msg := 'set but never used'
+ | 904: msg := 'used as varpar, possibly not set'
+ | 905: msg := 'also declared in outer scope'
+ | 906: msg := 'access/assignment to intermediate'
+ | 907: msg := 'redefinition'
+ | 908: msg := 'new definition'
+ | 909: msg := 'statement after RETURN/EXIT'
+ | 910: msg := 'for loop variable set'
+ | 911: msg := 'implied type guard'
+ | 912: msg := 'superfluous type guard'
+ | 913: msg := 'call might depend on evaluation sequence of params.'
+ | 930: msg := 'superfluous semicolon'
ELSE Strings.IntToString(err, msg)
END
END GetErrorMsg;
index b43b539bd2beebe3747961b7bd2aa1acb037a02e..851d82e8b6000813164542de76d1b619d3e42194 100644 (file)
(* symbol values *)
null = 0;
- if = 1; then = 2; else = 3; elsif = 4; end = 5; new = 6;
- ident = 7; plus = 8; minus = 9;
- not = 10; and = 11; or = 12; rpar = 13; lpar = 14;
- endcom = 15; eof = 16;
+ if = 1; then = 2; else = 3; elsif = 4; end = 5;
+ new = 6; error = 7; ident = 8; plus = 9; minus = 10;
+ not = 11; and = 12; or = 13; rpar = 14; lpar = 15;
+ endcom = 16; eof = 17;
(* func numbers *)
var = 0; defined = 1;
IF name = "END" THEN sym := end
ELSIF name = "ELSE" THEN sym := else
ELSIF name = "ELSIF" THEN sym := elsif
+ ELSIF name = "ERROR" THEN sym := error
END
| "I": Identifier(sym); IF name = "IF" THEN sym := if END
| "N": Identifier(sym); IF name = "NEW" THEN sym := new END
IF top = NIL THEN err(51); fold := 0; If(TRUE) END
END End;
+ PROCEDURE Printable* (): BOOLEAN;
+ VAR c: Context;
+ BEGIN
+ c := top;
+ WHILE (c # NIL) & c.val DO c := c.next END;
+ RETURN c = NIL
+ END Printable;
+
PROCEDURE Parse*;
VAR val: BOOLEAN; s: Selector;
BEGIN
IF sym = ident THEN s := New(name, FALSE); Get(sym)
ELSE err(48)
END
+ ELSIF sym = error THEN
+ IF Printable() THEN err(501) END; Get(sym)
ELSIF sym = ident THEN
Get(sym);
IF sym = plus THEN Old(name).val := TRUE; Get(sym)
IF sym # endcom THEN err(5) ELSE DevCPM.errpos := DevCPM.curpos - 1 END
END Parse;
- PROCEDURE Printable* (): BOOLEAN;
- VAR c: Context;
- BEGIN
- c := top;
- WHILE (c # NIL) & c.val DO c := c.next END;
- RETURN c = NIL
- END Printable;
-
PROCEDURE Check*;
BEGIN
IF fold # 1 THEN err(14) END