|
@@ -1,4 +1,4 @@
|
|
-MODULE ORP; (*N. Wirth 1.7.97 / 17.9.2018 Oberon compiler for RISC in Oberon-07*)
|
|
|
|
|
|
+MODULE ORP; (*N. Wirth 1.7.97 / 31.5.2019 Oberon compiler for RISC in Oberon-07*)
|
|
IMPORT Texts, Oberon, ORS, ORB, ORG;
|
|
IMPORT Texts, Oberon, ORS, ORB, ORG;
|
|
(*Author: Niklaus Wirth, 2014.
|
|
(*Author: Niklaus Wirth, 2014.
|
|
Parser of Oberon-RISC compiler. Uses Scanner ORS to obtain symbols (tokens),
|
|
Parser of Oberon-RISC compiler. Uses Scanner ORS to obtain symbols (tokens),
|
|
@@ -110,7 +110,7 @@ MODULE ORP; (*N. Wirth 1.7.97 / 17.9.2018 Oberon compiler for RISC in Oberon-07
|
|
END
|
|
END
|
|
ELSE ORS.Mark("incompatible types")
|
|
ELSE ORS.Mark("incompatible types")
|
|
END
|
|
END
|
|
- ELSIF ~guard THEN ORG.MakeConstItem(x, ORB.boolType, 1)
|
|
|
|
|
|
+ ELSIF ~guard THEN ORG.TypeTest(x, NIL, FALSE, FALSE)
|
|
END
|
|
END
|
|
ELSE ORS.Mark("type mismatch")
|
|
ELSE ORS.Mark("type mismatch")
|
|
END ;
|
|
END ;
|
|
@@ -898,14 +898,14 @@ MODULE ORP; (*N. Wirth 1.7.97 / 17.9.2018 Oberon compiler for RISC in Oberon-07
|
|
BEGIN Texts.WriteString(W, " compiling "); ORS.Get(sym);
|
|
BEGIN Texts.WriteString(W, " compiling "); ORS.Get(sym);
|
|
IF sym = ORS.module THEN
|
|
IF sym = ORS.module THEN
|
|
ORS.Get(sym);
|
|
ORS.Get(sym);
|
|
- IF sym = ORS.times THEN version := 0; Texts.Write(W, "*"); ORS.Get(sym) ELSE version := 1 END ;
|
|
|
|
|
|
+ IF sym = ORS.times THEN version := 0; dc := 8; Texts.Write(W, "*"); ORS.Get(sym) ELSE dc := 0; version := 1 END ;
|
|
ORB.Init; ORB.OpenScope;
|
|
ORB.Init; ORB.OpenScope;
|
|
IF sym = ORS.ident THEN
|
|
IF sym = ORS.ident THEN
|
|
ORS.CopyId(modid); ORS.Get(sym);
|
|
ORS.CopyId(modid); ORS.Get(sym);
|
|
Texts.WriteString(W, modid); Texts.Append(Oberon.Log, W.buf)
|
|
Texts.WriteString(W, modid); Texts.Append(Oberon.Log, W.buf)
|
|
ELSE ORS.Mark("identifier expected")
|
|
ELSE ORS.Mark("identifier expected")
|
|
END ;
|
|
END ;
|
|
- Check(ORS.semicolon, "no ;"); level := 0; dc := 0; exno := 1; key := 0;
|
|
|
|
|
|
+ Check(ORS.semicolon, "no ;"); level := 0; exno := 1; key := 0;
|
|
IF sym = ORS.import THEN
|
|
IF sym = ORS.import THEN
|
|
ORS.Get(sym);
|
|
ORS.Get(sym);
|
|
WHILE sym = ORS.ident DO
|
|
WHILE sym = ORS.ident DO
|
|
@@ -990,7 +990,7 @@ MODULE ORP; (*N. Wirth 1.7.97 / 17.9.2018 Oberon compiler for RISC in Oberon-07
|
|
Oberon.Collect(0)
|
|
Oberon.Collect(0)
|
|
END Compile;
|
|
END Compile;
|
|
|
|
|
|
-BEGIN Texts.OpenWriter(W); Texts.WriteString(W, "OR Compiler 17.9.2018");
|
|
|
|
|
|
+BEGIN Texts.OpenWriter(W); Texts.WriteString(W, "OR Compiler 31.5.2019");
|
|
Texts.WriteLn(W); Texts.Append(Oberon.Log, W.buf);
|
|
Texts.WriteLn(W); Texts.Append(Oberon.Log, W.buf);
|
|
NEW(dummy); dummy.class := ORB.Var; dummy.type := ORB.intType;
|
|
NEW(dummy); dummy.class := ORB.Var; dummy.type := ORB.intType;
|
|
expression := expression0; Type := Type0; FormalType := FormalType0
|
|
expression := expression0; Type := Type0; FormalType := FormalType0
|