index 03c3fe40dc5605797ee685f63cffa3b39de739e0..b1787397516a9f973992d5c622f678c85bc985c4 100644 (file)
END;
VAR
- ch: CHAR; (* current character *)
+ ch-: CHAR; (* current character *)
name: DevCPT.Name; (* ident *)
VAR
END
END Get;
- PROCEDURE New (IN name: DevCPT.Name; val: BOOLEAN): Selector;
+ PROCEDURE New (IN name: DevCPT.Name): 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
+ IF s.next = NIL THEN NEW(s.next); s.next.name := name$; s.next.val := FALSE
ELSE err(1)
END;
RETURN s.next
PROCEDURE Parse*;
VAR val: BOOLEAN; s: Selector;
BEGIN
- Get(sym);
+ ch := " "; Get(sym);
IF sym = new THEN
Get(sym);
- IF sym = ident THEN s := New(name, FALSE); Get(sym)
+ IF sym = ident THEN
+ s := New(name); Get(sym);
+ IF (sym = plus) OR (sym = minus) THEN
+ s.val := sym = plus; Get(sym)
+ END
ELSE err(48)
- END;
+ END
+ ELSIF sym = ident THEN
+ s := Old(name); Get(sym);
IF (sym = plus) OR (sym = minus) THEN
s.val := sym = plus; Get(sym)
+ ELSE err(41)
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)
- ELSIF sym = minus THEN Old(name).val := FALSE; Get(sym)
- ELSE err(41)
- END
ELSIF sym = if THEN
Get(sym); Expression(val); If(val);
IF sym = then THEN Get(sym)