A bit more tidying of case alignment

This commit is contained in:
David Brown 2016-08-13 00:25:09 +01:00
parent 58556457bc
commit f28c1d22cf

View file

@ -176,95 +176,99 @@ MODULE OPS; (* NW, RC 6.3.89 / 18.10.92 *) (* object model 3.6.92 *)
END END
END ; END ;
CASE ch OF (* ch > " " *) CASE ch OF (* ch > " " *)
| 22X, 27X : Str(s) | 22X,
| "#" : s := OPM.neq; OPM.Get(ch) 27X: Str(s)
| "&" : s := OPM.and; OPM.Get(ch) | "#": s := OPM.neq; OPM.Get(ch)
| "(" : OPM.Get(ch); | "&": s := OPM.and; OPM.Get(ch)
IF ch = "*" THEN Comment; Get(s) ELSE s := OPM.lparen END | "(": OPM.Get(ch);
| ")" : s := OPM.rparen; OPM.Get(ch) IF ch = "*" THEN Comment; Get(s) ELSE s := OPM.lparen END
| "*" : s := OPM.times; OPM.Get(ch) | ")": s := OPM.rparen; OPM.Get(ch)
| "+" : s := OPM.plus; OPM.Get(ch) | "*": s := OPM.times; OPM.Get(ch)
| "," : s := OPM.comma; OPM.Get(ch) | "+": s := OPM.plus; OPM.Get(ch)
| "-" : s := OPM.minus; OPM.Get(ch) | ",": s := OPM.comma; OPM.Get(ch)
| "." : OPM.Get(ch); | "-": s := OPM.minus; OPM.Get(ch)
IF ch = "." THEN OPM.Get(ch); s := OPM.upto ELSE s := OPM.period END | ".": OPM.Get(ch);
| "/" : s := OPM.slash; OPM.Get(ch) IF ch = "." THEN OPM.Get(ch); s := OPM.upto ELSE s := OPM.period END
| "0".."9": Number; s := OPM.number | "/": s := OPM.slash; OPM.Get(ch)
| ":" : OPM.Get(ch); | "0".."9": Number; s := OPM.number
IF ch = "=" THEN OPM.Get(ch); s := OPM.becomes ELSE s := OPM.colon END | ":": OPM.Get(ch);
| ";" : s := OPM.semicolon; OPM.Get(ch) IF ch = "=" THEN OPM.Get(ch); s := OPM.becomes ELSE s := OPM.colon END
| "<" : OPM.Get(ch); | ";": s := OPM.semicolon; OPM.Get(ch)
IF ch = "=" THEN OPM.Get(ch); s := OPM.leq ELSE s := OPM.lss END | "<": OPM.Get(ch);
| "=" : s := OPM.eql; OPM.Get(ch) IF ch = "=" THEN OPM.Get(ch); s := OPM.leq ELSE s := OPM.lss END
| ">" : OPM.Get(ch); | "=": s := OPM.eql; OPM.Get(ch)
IF ch = "=" THEN OPM.Get(ch); s := OPM.geq ELSE s := OPM.gtr END | ">": OPM.Get(ch);
| "A": Identifier(s); IF name = "ARRAY" THEN s := OPM.array END IF ch = "=" THEN OPM.Get(ch); s := OPM.geq ELSE s := OPM.gtr END
| "B": Identifier(s); | "A": Identifier(s); IF name = "ARRAY" THEN s := OPM.array END
IF name = "BEGIN" THEN s := OPM.begin | "B": Identifier(s);
ELSIF name = "BY" THEN s := OPM.by IF name = "BEGIN" THEN s := OPM.begin
END ELSIF name = "BY" THEN s := OPM.by
| "C": Identifier(s); END
IF name = "CASE" THEN s := OPM.case | "C": Identifier(s);
ELSIF name = "CONST" THEN s := OPM.const IF name = "CASE" THEN s := OPM.case
END ELSIF name = "CONST" THEN s := OPM.const
| "D": Identifier(s); END
IF name = "DO" THEN s := OPM.do | "D": Identifier(s);
ELSIF name = "DIV" THEN s := OPM.div IF name = "DO" THEN s := OPM.do
END ELSIF name = "DIV" THEN s := OPM.div
| "E": Identifier(s); END
IF name = "END" THEN s := OPM.end | "E": Identifier(s);
ELSIF name = "ELSE" THEN s := OPM.else IF name = "END" THEN s := OPM.end
ELSIF name = "ELSIF" THEN s := OPM.elsif ELSIF name = "ELSE" THEN s := OPM.else
ELSIF name = "EXIT" THEN s := OPM.exit ELSIF name = "ELSIF" THEN s := OPM.elsif
END ELSIF name = "EXIT" THEN s := OPM.exit
| "F": Identifier(s); IF name = "FOR" THEN s := OPM.for END END
| "I": Identifier(s); | "F": Identifier(s); IF name = "FOR" THEN s := OPM.for END
IF name = "IF" THEN s := OPM.if | "I": Identifier(s);
ELSIF name = "IN" THEN s := OPM.in IF name = "IF" THEN s := OPM.if
ELSIF name = "IS" THEN s := OPM.is ELSIF name = "IN" THEN s := OPM.in
ELSIF name = "IMPORT" THEN s := OPM.import ELSIF name = "IS" THEN s := OPM.is
END ELSIF name = "IMPORT" THEN s := OPM.import
| "L": Identifier(s); IF name = "LOOP" THEN s := OPM.loop END END
| "M": Identifier(s); | "L": Identifier(s); IF name = "LOOP" THEN s := OPM.loop END
IF name = "MOD" THEN s := OPM.mod | "M": Identifier(s);
ELSIF name = "MODULE" THEN s := OPM.module IF name = "MOD" THEN s := OPM.mod
END ELSIF name = "MODULE" THEN s := OPM.module
| "N": Identifier(s); IF name = "NIL" THEN s := OPM.nil END END
| "O": Identifier(s); | "N": Identifier(s); IF name = "NIL" THEN s := OPM.nil END
IF name = "OR" THEN s := OPM.or | "O": Identifier(s);
ELSIF name = "OF" THEN s := OPM.of IF name = "OR" THEN s := OPM.or
END ELSIF name = "OF" THEN s := OPM.of
| "P": Identifier(s); END
IF name = "PROCEDURE" THEN s := OPM.procedure | "P": Identifier(s);
ELSIF name = "POINTER" THEN s := OPM.pointer IF name = "PROCEDURE" THEN s := OPM.procedure
END ELSIF name = "POINTER" THEN s := OPM.pointer
| "R": Identifier(s); END
IF name = "RECORD" THEN s := OPM.record | "R": Identifier(s);
ELSIF name = "REPEAT" THEN s := OPM.repeat IF name = "RECORD" THEN s := OPM.record
ELSIF name = "RETURN" THEN s := OPM.return ELSIF name = "REPEAT" THEN s := OPM.repeat
END ELSIF name = "RETURN" THEN s := OPM.return
| "T": Identifier(s); END
IF name = "THEN" THEN s := OPM.then | "T": Identifier(s);
ELSIF name = "TO" THEN s := OPM.to IF name = "THEN" THEN s := OPM.then
ELSIF name = "TYPE" THEN s := OPM.type ELSIF name = "TO" THEN s := OPM.to
END ELSIF name = "TYPE" THEN s := OPM.type
| "U": Identifier(s); IF name = "UNTIL" THEN s := OPM.until END END
| "V": Identifier(s); IF name = "VAR" THEN s := OPM.var END | "U": Identifier(s); IF name = "UNTIL" THEN s := OPM.until END
| "W": Identifier(s); | "V": Identifier(s); IF name = "VAR" THEN s := OPM.var END
IF name = "WHILE" THEN s := OPM.while | "W": Identifier(s);
ELSIF name = "WITH" THEN s := OPM.with IF name = "WHILE" THEN s := OPM.while
END ELSIF name = "WITH" THEN s := OPM.with
| "G".."H", "J", "K", "Q", "S", "X".."Z": Identifier(s) END
| "[" : s := OPM.lbrak; OPM.Get(ch) | "G".."H",
| "]" : s := OPM.rbrak; OPM.Get(ch) "J".."K",
| "^" : s := OPM.arrow; OPM.Get(ch) "Q", "S",
| "a".."z": Identifier(s) "X".."Z": Identifier(s)
| "{" : s := OPM.lbrace; OPM.Get(ch) | "[": s := OPM.lbrak; OPM.Get(ch)
| "|" : s := OPM.bar; OPM.Get(ch) | "]": s := OPM.rbrak; OPM.Get(ch)
| "}" : s := OPM.rbrace; OPM.Get(ch) | "^": s := OPM.arrow; OPM.Get(ch)
| "~" : s := OPM.not; OPM.Get(ch) | "a".."z": Identifier(s)
| 7FX : s := OPM.upto; OPM.Get(ch) | "{": s := OPM.lbrace; OPM.Get(ch)
ELSE s := OPM.null; OPM.Get(ch) | "|": s := OPM.bar; OPM.Get(ch)
| "}": s := OPM.rbrace; OPM.Get(ch)
| "~": s := OPM.not; OPM.Get(ch)
| 7FX: s := OPM.upto; OPM.Get(ch)
ELSE s := OPM.null; OPM.Get(ch)
END ; END ;
sym := s sym := s
END Get; END Get;