summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d1c9d1e)
raw | patch | inline | side by side (parent: d1c9d1e)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sat, 14 Dec 2019 19:14:53 +0000 (22:14 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sat, 14 Dec 2019 19:14:53 +0000 (22:14 +0300) |
src/generic/Dev/Mod/CPR.cp | patch | blob | history |
index aaf4c8afb54ce95487c4b72639b82485e631594f..03c3fe40dc5605797ee685f63cffa3b39de739e0 100644 (file)
END
END Get;
- PROCEDURE New (IN name: DevCPT.Name; val: BOOLEAN);
+ PROCEDURE New (IN name: DevCPT.Name; val: BOOLEAN): Selector;
VAR s: Selector;
BEGIN
s := scope;
WHILE (s.next # NIL) & (s.next.name$ # name$) DO s := s.next END;
IF s.next = NIL THEN NEW(s.next); s.next.name := name$; s.next.val := val
ELSE err(1)
- END
+ END;
+ RETURN s.next
END New;
PROCEDURE Old (IN name: DevCPT.Name): Selector;
END Printable;
PROCEDURE Parse*;
- VAR val: BOOLEAN;
+ VAR val: BOOLEAN; s: Selector;
BEGIN
Get(sym);
IF sym = new THEN
Get(sym);
- IF sym = ident THEN New(name, FALSE); Get(sym)
+ IF sym = ident THEN s := New(name, FALSE); Get(sym)
ELSE err(48)
+ END;
+ IF (sym = plus) OR (sym = minus) THEN
+ s.val := sym = plus; Get(sym)
END
ELSIF sym = error THEN
IF Printable() THEN err(501) END; Get(sym)
Close;
If(TRUE);
NEW(scope);
- New("TRUE", TRUE);
- New("FALSE", FALSE)
+ Set("TRUE", TRUE);
+ Set("FALSE", FALSE)
END Init;
END DevCPR.