]> git.mdlowis.com Git - proto/obnc.git/commitdiff
changed case of some builtin types
authormike lowis <mike@mdlowis.com>
Fri, 9 Apr 2021 16:38:49 +0000 (12:38 -0400)
committermike lowis <mike@mdlowis.com>
Fri, 9 Apr 2021 16:38:49 +0000 (12:38 -0400)
.gitignore
lib/obnc/In.c
lib/obnc/In.obn
lib/obnc/InTest.obn
lib/obnc/Out.c
lib/obnc/Out.obn
lib/obnc/OutTest.obn
src/Table.c
src/y.tab.c
tests/obnc/passing/T4Expressions.obn

index a081f0ec7a0ca51e5ee22e1825a382d93b710663..d58198e0e62d8ff2d0be9f9f70ff476a88ced97f 100644 (file)
@@ -11,3 +11,4 @@ MapsTest
 TableTest
 UtilTest
 lex.yyTest
+tags
index a69e83c14c6540b46d8b9adc5168da25a5d78ec6..5865538dbcc012b6623b55c26742c520ea76a40c 100644 (file)
@@ -22,7 +22,7 @@ void In__Open_(void)
 }
 
 
-void In__Char_(char *ch)
+void In__Character_(char *ch)
 {
        int d;
 
@@ -35,7 +35,7 @@ void In__Char_(char *ch)
 }
 
 
-void In__Int_(OBNC_INTEGER *x)
+void In__Integer_(OBNC_INTEGER *x)
 {
        int ch, i, n;
        char buf[(CHAR_BIT * sizeof (OBNC_INTEGER) / 3) + 3];
@@ -81,7 +81,7 @@ void In__Int_(OBNC_INTEGER *x)
 }
 
 
-void In__Real_(OBNC_REAL *x)
+void In__RealNum_(OBNC_REAL *x)
 {
        int scanCount;
 
index 608d1c0209f0c0821c2f411536174b8d1af4ddd6..4ae284f311965765ad071bc67d3978e577928cda 100644 (file)
@@ -18,27 +18,27 @@ Implements the basic library module from "The Oakwood Guidelines for Oberon-2 Co
        end Open;
 
 
-       procedure Char*(var ch: Char);
+       procedure Character*(var ch: Char);
 (**returns in ch the character at the current position*)
-       end Char;
+       end Character;
 
 
-       procedure Int*(var i: Int);
+       procedure Integer*(var i: Int);
 (**returns in i the integer constant at the current position according to the format
 
        integer = digit {digit} | digit {hexDigit} "H".
        hexDigit = digit | "A" | "B" | "C" | "D" | "E" | "F".
 *)
-       end Int;
+       end Integer;
 
 
-       procedure Real*(var x: Real);
+       procedure RealNum*(var x: Real);
 (**returns in x the real constant at the current position according to the format
 
        real = digit {digit} "." {digit} [ScaleFactor].
        ScaleFactor = "E" ["+" | "-"] digit {digit}.
 *)
-       end Real;
+       end RealNum;
 
 
        procedure String*(var str: array of Char);
index 1c148eb2136181ee351000b63a6aa1f95cc2502e..23581b718ad83cf3c990d27da876cd53b4a35965 100644 (file)
@@ -29,19 +29,19 @@ module InTest;
                s: array 12 of Char;
 
 begin
-       In.Char(ch);
+       In.Character(ch);
        ASSERT(In.Done);
        ASSERT(ch = "a");
 
-       In.Int(n);
+       In.Integer(n);
        ASSERT(In.Done);
        ASSERT(n = 37);
 
-       In.Int(n);
+       In.Integer(n);
        ASSERT(In.Done);
        ASSERT(n = 37H);
 
-       In.Real(x);
+       In.RealNum(x);
        ASSERT(In.Done);
        ASSERT(x >= 3.14 - eps);
        ASSERT(x <= 3.14 + eps);
index 93614e03c04c6e00254af198a39a13937f07630b..bd577748548cdfe1d9b1c10f00ba2b594d9653ad 100644 (file)
@@ -14,7 +14,7 @@ void Out__Open_(void)
 }
 
 
-void Out__Char_(char ch)
+void Out__Character_(char ch)
 {
        putchar(ch);
 }
@@ -32,7 +32,7 @@ void Out__String_(const char s[], OBNC_INTEGER sLen)
 }
 
 
-void Out__Int_(OBNC_INTEGER i, OBNC_INTEGER n)
+void Out__Integer_(OBNC_INTEGER i, OBNC_INTEGER n)
 {
        OBNC_WriteInt(i, n, stdout);
 }
@@ -44,7 +44,7 @@ void Out__Hex_(OBNC_INTEGER i)
 }
 
 
-void Out__Real_(OBNC_REAL x, OBNC_INTEGER n)
+void Out__RealNum_(OBNC_REAL x, OBNC_INTEGER n)
 {
        printf("%*" OBNC_REAL_MOD_W "E", (int) n, x);
 }
index 56f205c1c84fdd044e3eaf933228e146fac340cf..3b5e8092f68206940600bb9299a42114b3b8c6c8 100644 (file)
@@ -16,9 +16,9 @@ Implements the basic library module from "The Oakwood Guidelines for Oberon-2 Co
        end Open;
 
 
-       procedure Char*(ch: Char);
+       procedure Character*(ch: Char);
 (**writes the character ch to the end of the output stream*)
-       end Char;
+       end Character;
 
 
        procedure String*(s: array of Char);
@@ -26,9 +26,9 @@ Implements the basic library module from "The Oakwood Guidelines for Oberon-2 Co
        end String;
 
 
-       procedure Int*(i, n: Int);
+       procedure Integer*(i, n: Int);
 (**writes the integer i to the end of the output stream. If the textual representation of i requires m characters, i is right adjusted in a field of Max(n, m) characters padded with blanks at the left end. A plus sign is not written.*)
-       end Int;
+       end Integer;
 
 
        procedure Hex*(i: Int);
@@ -36,9 +36,9 @@ Implements the basic library module from "The Oakwood Guidelines for Oberon-2 Co
        end Hex;
 
 
-       procedure Real*(x: Real; n: Int);
+       procedure RealNum*(x: Real; n: Int);
 (**writes the real number x to the end of the output stream using an exponential form. If the textual representation of x requires m characters (including a two-digit signed exponent), x is right adjusted in a field of Max(n, m) characters padded with blanks at the left end. A plus sign of the mantissa is not written.*)
-       end Real;
+       end RealNum;
 
 
        procedure Ln*;
index d5777aef86c4886eaddec5e85c8738d1583485a2..becc087d9888d6e3275a5e885ab28555e84e9656 100644 (file)
@@ -20,22 +20,22 @@ module OutTest;
        import Out;
 
 begin
-       Out.Char("a"); Out.Ln;
+       Out.Character("a"); Out.Ln;
        Out.String("abc"); Out.Ln;
-       Out.Int(-07FFFH - 1, 0); Out.Ln; (*minimum 16-bit integer*)
-       Out.Int(-1, 0); Out.Ln;
-       Out.Int(-1, 3); Out.Ln;
-       Out.Int(0, 0); Out.Ln;
-       Out.Int(1, 0); Out.Ln;
-       Out.Int(37, 0); Out.Ln;
-       Out.Int(07FFFH, 0); Out.Ln; (*maximum 16-bit integer*)
+       Out.Integer(-07FFFH - 1, 0); Out.Ln; (*minimum 16-bit integer*)
+       Out.Integer(-1, 0); Out.Ln;
+       Out.Integer(-1, 3); Out.Ln;
+       Out.Integer(0, 0); Out.Ln;
+       Out.Integer(1, 0); Out.Ln;
+       Out.Integer(37, 0); Out.Ln;
+       Out.Integer(07FFFH, 0); Out.Ln; (*maximum 16-bit integer*)
        Out.Hex(0); Out.Ln;
        Out.Hex(1); Out.Ln;
        Out.Hex(0BEEFH); Out.Ln;
-       Out.Real(-1.0, 0); Out.Ln;
-       Out.Real(0.0, 0); Out.Ln;
-       Out.Real(0.0, 14); Out.Ln;
-       Out.Real(1.0, 0); Out.Ln;
-       Out.Real(37.0, 0); Out.Ln;
-       Out.Real(0.37, 0); Out.Ln
+       Out.RealNum(-1.0, 0); Out.Ln;
+       Out.RealNum(0.0, 0); Out.Ln;
+       Out.RealNum(0.0, 14); Out.Ln;
+       Out.RealNum(1.0, 0); Out.Ln;
+       Out.RealNum(37.0, 0); Out.Ln;
+       Out.RealNum(0.37, 0); Out.Ln
 end OutTest.
index 48104b5a462bcddcb878c6b72e7187bc8bc184e4..d09e36e90f869ea015248933e0f34d3817941846 100644 (file)
@@ -84,8 +84,8 @@ void Table_Init(void)
                {"ASSERT", TREES_PROCEDURE_KIND, TREES_ASSERT_PROC},
                {"Bool", TREES_TYPE_KIND, TREES_BOOLEAN_TYPE},
                {"Byte", TREES_TYPE_KIND, TREES_BYTE_TYPE},
-               {"Char", TREES_TYPE_KIND, TREES_CHAR_TYPE},
                {"CHR", TREES_PROCEDURE_KIND, TREES_CHR_PROC},
+               {"Char", TREES_TYPE_KIND, TREES_CHAR_TYPE},
                {"DEC", TREES_PROCEDURE_KIND, TREES_DEC_PROC},
                {"EXCL", TREES_PROCEDURE_KIND, TREES_EXCL_PROC},
                {"FLOOR", TREES_PROCEDURE_KIND, TREES_FLOOR_PROC},
@@ -99,10 +99,11 @@ void Table_Init(void)
                {"ODD", TREES_PROCEDURE_KIND, TREES_ODD_PROC},
                {"ORD", TREES_PROCEDURE_KIND, TREES_ORD_PROC},
                {"PACK", TREES_PROCEDURE_KIND, TREES_PACK_PROC},
-               {"Real", TREES_TYPE_KIND, TREES_REAL_TYPE},
                {"ROR", TREES_PROCEDURE_KIND, TREES_ROR_PROC},
+               {"Real", TREES_TYPE_KIND, TREES_REAL_TYPE},
                {"SET", TREES_TYPE_KIND, TREES_SET_TYPE},
-               {"UNPK", TREES_PROCEDURE_KIND, TREES_UNPK_PROC}};
+               {"UNPK", TREES_PROCEDURE_KIND, TREES_UNPK_PROC}
+       };
 
        int i;
        Trees_Node node;
index 47c244948e14679a6053eb8a3472d2972a9c7823..c754de49043bc345694cedafccfdd1b893a176fe 100644 (file)
@@ -4408,9 +4408,7 @@ static Trees_Node ResolvedType(Trees_Node type, int isTypeDecl)
        result = NULL;
        if (Trees_Symbol(type) == IDENT) {
                name = Trees_Name(type);
-                fprintf(stderr,"%s\n", name);
                identDef = Table_At(name);
-                fprintf(stderr,"%p\n", identDef);
                if (identDef != NULL) {
                        if (Trees_Kind(identDef) == TREES_TYPE_KIND) {
                                typeStruct = Types_Structure(identDef);
index c89eb1180af7a8a0e461ba7ec917afd5e3b2bd8b..366080debc5341bd30f6d6fbf7218dee7004c164 100644 (file)
@@ -73,9 +73,9 @@ module T4Expressions;
        begin
                a := 4;
                b := 6;
-Out.Int(ORD({1, 2, a, 5, b, 8}), 0); Out.Ln;
-Out.Int(ORD({1, 2, a..b, 8}), 0); Out.Ln;
-Out.Int(ORD({1, 2, a, 5, b, 8} = {1, 2, a..b, 8}), 0); Out.Ln;
+Out.Integer(ORD({1, 2, a, 5, b, 8}), 0); Out.Ln;
+Out.Integer(ORD({1, 2, a..b, 8}), 0); Out.Ln;
+Out.Integer(ORD({1, 2, a, 5, b, 8} = {1, 2, a..b, 8}), 0); Out.Ln;
                ASSERT({1, 2, a, 5, b, 8} = {1, 2, a..b, 8});
                i := 0;
                j := 0;