mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 02:52:24 +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 ;
|
||||
CASE ch OF (* ch > " " *)
|
||||
| 22X, 27X : Str(s)
|
||||
| "#" : s := OPM.neq; OPM.Get(ch)
|
||||
| "&" : s := OPM.and; OPM.Get(ch)
|
||||
| "(" : OPM.Get(ch);
|
||||
| 22X,
|
||||
27X: Str(s)
|
||||
| "#": s := OPM.neq; OPM.Get(ch)
|
||||
| "&": s := OPM.and; OPM.Get(ch)
|
||||
| "(": OPM.Get(ch);
|
||||
IF ch = "*" THEN Comment; Get(s) ELSE s := OPM.lparen END
|
||||
| ")" : s := OPM.rparen; OPM.Get(ch)
|
||||
| "*" : s := OPM.times; OPM.Get(ch)
|
||||
| "+" : s := OPM.plus; OPM.Get(ch)
|
||||
| "," : s := OPM.comma; OPM.Get(ch)
|
||||
| "-" : s := OPM.minus; OPM.Get(ch)
|
||||
| "." : OPM.Get(ch);
|
||||
| ")": s := OPM.rparen; OPM.Get(ch)
|
||||
| "*": s := OPM.times; OPM.Get(ch)
|
||||
| "+": s := OPM.plus; OPM.Get(ch)
|
||||
| ",": s := OPM.comma; OPM.Get(ch)
|
||||
| "-": s := OPM.minus; OPM.Get(ch)
|
||||
| ".": OPM.Get(ch);
|
||||
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
|
||||
| ":" : OPM.Get(ch);
|
||||
| ":": OPM.Get(ch);
|
||||
IF ch = "=" THEN OPM.Get(ch); s := OPM.becomes ELSE s := OPM.colon END
|
||||
| ";" : s := OPM.semicolon; OPM.Get(ch)
|
||||
| "<" : OPM.Get(ch);
|
||||
| ";": s := OPM.semicolon; OPM.Get(ch)
|
||||
| "<": OPM.Get(ch);
|
||||
IF ch = "=" THEN OPM.Get(ch); s := OPM.leq ELSE s := OPM.lss END
|
||||
| "=" : s := OPM.eql; OPM.Get(ch)
|
||||
| ">" : OPM.Get(ch);
|
||||
| "=": s := OPM.eql; OPM.Get(ch)
|
||||
| ">": OPM.Get(ch);
|
||||
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
|
||||
| "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
|
||||
ELSIF name = "WITH" THEN s := OPM.with
|
||||
END
|
||||
| "G".."H", "J", "K", "Q", "S", "X".."Z": Identifier(s)
|
||||
| "[" : s := OPM.lbrak; OPM.Get(ch)
|
||||
| "]" : s := OPM.rbrak; OPM.Get(ch)
|
||||
| "^" : s := OPM.arrow; OPM.Get(ch)
|
||||
| "G".."H",
|
||||
"J".."K",
|
||||
"Q", "S",
|
||||
"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)
|
||||
| "{" : s := OPM.lbrace; 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)
|
||||
| "{": s := OPM.lbrace; 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 ;
|
||||
sym := s
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue