mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 19:12:25 +00:00
A bit more tidying of case alignment
This commit is contained in:
parent
58556457bc
commit
f28c1d22cf
1 changed files with 93 additions and 89 deletions
|
|
@ -176,27 +176,28 @@ 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)
|
||||||
|
| "(": OPM.Get(ch);
|
||||||
IF ch = "*" THEN Comment; Get(s) ELSE s := OPM.lparen END
|
IF ch = "*" THEN Comment; Get(s) ELSE s := OPM.lparen END
|
||||||
| ")" : s := OPM.rparen; OPM.Get(ch)
|
| ")": s := OPM.rparen; OPM.Get(ch)
|
||||||
| "*" : s := OPM.times; OPM.Get(ch)
|
| "*": s := OPM.times; OPM.Get(ch)
|
||||||
| "+" : s := OPM.plus; OPM.Get(ch)
|
| "+": s := OPM.plus; OPM.Get(ch)
|
||||||
| "," : s := OPM.comma; OPM.Get(ch)
|
| ",": s := OPM.comma; OPM.Get(ch)
|
||||||
| "-" : s := OPM.minus; OPM.Get(ch)
|
| "-": s := OPM.minus; OPM.Get(ch)
|
||||||
| "." : OPM.Get(ch);
|
| ".": OPM.Get(ch);
|
||||||
IF ch = "." THEN OPM.Get(ch); s := OPM.upto ELSE s := OPM.period END
|
IF ch = "." THEN OPM.Get(ch); s := OPM.upto ELSE s := OPM.period END
|
||||||
| "/" : s := OPM.slash; OPM.Get(ch)
|
| "/": s := OPM.slash; OPM.Get(ch)
|
||||||
| "0".."9": Number; s := OPM.number
|
| "0".."9": Number; s := OPM.number
|
||||||
| ":" : OPM.Get(ch);
|
| ":": OPM.Get(ch);
|
||||||
IF ch = "=" THEN OPM.Get(ch); s := OPM.becomes ELSE s := OPM.colon END
|
IF ch = "=" THEN OPM.Get(ch); s := OPM.becomes ELSE s := OPM.colon END
|
||||||
| ";" : s := OPM.semicolon; OPM.Get(ch)
|
| ";": s := OPM.semicolon; OPM.Get(ch)
|
||||||
| "<" : OPM.Get(ch);
|
| "<": OPM.Get(ch);
|
||||||
IF ch = "=" THEN OPM.Get(ch); s := OPM.leq ELSE s := OPM.lss END
|
IF ch = "=" THEN OPM.Get(ch); s := OPM.leq ELSE s := OPM.lss END
|
||||||
| "=" : s := OPM.eql; OPM.Get(ch)
|
| "=": s := OPM.eql; OPM.Get(ch)
|
||||||
| ">" : OPM.Get(ch);
|
| ">": OPM.Get(ch);
|
||||||
IF ch = "=" THEN OPM.Get(ch); s := OPM.geq ELSE s := OPM.gtr END
|
IF ch = "=" THEN OPM.Get(ch); s := OPM.geq ELSE s := OPM.gtr END
|
||||||
| "A": Identifier(s); IF name = "ARRAY" THEN s := OPM.array END
|
| "A": Identifier(s); IF name = "ARRAY" THEN s := OPM.array END
|
||||||
| "B": Identifier(s);
|
| "B": Identifier(s);
|
||||||
|
|
@ -254,16 +255,19 @@ MODULE OPS; (* NW, RC 6.3.89 / 18.10.92 *) (* object model 3.6.92 *)
|
||||||
IF name = "WHILE" THEN s := OPM.while
|
IF name = "WHILE" THEN s := OPM.while
|
||||||
ELSIF name = "WITH" THEN s := OPM.with
|
ELSIF name = "WITH" THEN s := OPM.with
|
||||||
END
|
END
|
||||||
| "G".."H", "J", "K", "Q", "S", "X".."Z": Identifier(s)
|
| "G".."H",
|
||||||
| "[" : s := OPM.lbrak; OPM.Get(ch)
|
"J".."K",
|
||||||
| "]" : s := OPM.rbrak; OPM.Get(ch)
|
"Q", "S",
|
||||||
| "^" : s := OPM.arrow; OPM.Get(ch)
|
"X".."Z": Identifier(s)
|
||||||
|
| "[": s := OPM.lbrak; OPM.Get(ch)
|
||||||
|
| "]": s := OPM.rbrak; OPM.Get(ch)
|
||||||
|
| "^": s := OPM.arrow; OPM.Get(ch)
|
||||||
| "a".."z": Identifier(s)
|
| "a".."z": Identifier(s)
|
||||||
| "{" : s := OPM.lbrace; OPM.Get(ch)
|
| "{": s := OPM.lbrace; OPM.Get(ch)
|
||||||
| "|" : s := OPM.bar; OPM.Get(ch)
|
| "|": s := OPM.bar; OPM.Get(ch)
|
||||||
| "}" : s := OPM.rbrace; OPM.Get(ch)
|
| "}": s := OPM.rbrace; OPM.Get(ch)
|
||||||
| "~" : s := OPM.not; OPM.Get(ch)
|
| "~": s := OPM.not; OPM.Get(ch)
|
||||||
| 7FX : s := OPM.upto; OPM.Get(ch)
|
| 7FX: s := OPM.upto; OPM.Get(ch)
|
||||||
ELSE s := OPM.null; OPM.Get(ch)
|
ELSE s := OPM.null; OPM.Get(ch)
|
||||||
END ;
|
END ;
|
||||||
sym := s
|
sym := s
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue