]> git.mdlowis.com Git - proto/obnc.git/commitdiff
removed ASR and LSL
authormike lowis <mike@mdlowis.com>
Sat, 10 Apr 2021 00:23:26 +0000 (20:23 -0400)
committermike lowis <mike@mdlowis.com>
Sat, 10 Apr 2021 00:23:26 +0000 (20:23 -0400)
src/Oberon.y
src/Table.c
src/y.tab.c
tests/obnc/passing/T4Expressions.obn

index c25df75b944c152a81c16a9b728ab4aa4de6d99a..dbe1e65d1490e33b177309b777744b7cf04a73b8 100644 (file)
@@ -3589,7 +3589,6 @@ static Trees_Node PredeclaredProcedureAST(const char procName[], Trees_Node expL
 {
        static const struct { const char *name; int symbol; } symbols[] = {
                {"ABS", TREES_ABS_PROC},
-               {"ASR", TREES_ASR_PROC},
                {"Assert", TREES_ASSERT_PROC},
                {"CHR", TREES_CHR_PROC},
                {"DEC", TREES_DEC_PROC},
@@ -3598,7 +3597,6 @@ static Trees_Node PredeclaredProcedureAST(const char procName[], Trees_Node expL
                {"FLT", TREES_FLT_PROC},
                {"INC", TREES_INC_PROC},
                {"INCL", TREES_INCL_PROC},
-               {"LSL", TREES_LSL_PROC},
                {"Length", TREES_LEN_PROC},
                {"New", TREES_NEW_PROC},
                {"ORD", TREES_ORD_PROC},
index 9280fed9bc78545753d02130e27fa25eea3ff127..2e782534aac01bac20738c25ef067fc96bd65aca 100644 (file)
@@ -68,7 +68,7 @@ struct ScopeDesc {
 
 static int initialized = 0;
 
-static const char *predeclaredNames[20];
+static const char *predeclaredNames[18];
 static Trees_Node predeclaredNodes[LEN(predeclaredNames)];
 
 static Scope globalScope, currentScope;
@@ -88,7 +88,6 @@ void Table_Init(void)
 */
        static const struct { const char *name; int kind, type; } predecIdents[] = {
                {"ABS", TREES_PROCEDURE_KIND, TREES_ABS_PROC},       /* Remove */
-               {"ASR", TREES_PROCEDURE_KIND, TREES_ASR_PROC},       /* Operator */
                {"Assert", TREES_PROCEDURE_KIND, TREES_ASSERT_PROC},
                {"Bool", TREES_TYPE_KIND, TREES_BOOLEAN_TYPE},
                {"Byte", TREES_TYPE_KIND, TREES_BYTE_TYPE},
@@ -101,7 +100,6 @@ void Table_Init(void)
                {"INC", TREES_PROCEDURE_KIND, TREES_INC_PROC},       /* Operator */
                {"INCL", TREES_PROCEDURE_KIND, TREES_INCL_PROC},
                {"Int", TREES_TYPE_KIND, TREES_INTEGER_TYPE},
-               {"LSL", TREES_PROCEDURE_KIND, TREES_LSL_PROC},       /* Operator */
                {"Length", TREES_PROCEDURE_KIND, TREES_LEN_PROC},
                {"New", TREES_PROCEDURE_KIND, TREES_NEW_PROC},
                {"ORD", TREES_PROCEDURE_KIND, TREES_ORD_PROC},
index 86b5194101bfd6e2ecc839575ec6751bee9d83d6..167005b5a4ef88d9a30005fbcf7502aaee9ce2c4 100644 (file)
@@ -5567,7 +5567,6 @@ static Trees_Node PredeclaredProcedureAST(const char procName[], Trees_Node expL
 {
        static const struct { const char *name; int symbol; } symbols[] = {
                {"ABS", TREES_ABS_PROC},
-               {"ASR", TREES_ASR_PROC},
                {"Assert", TREES_ASSERT_PROC},
                {"CHR", TREES_CHR_PROC},
                {"DEC", TREES_DEC_PROC},
@@ -5576,7 +5575,6 @@ static Trees_Node PredeclaredProcedureAST(const char procName[], Trees_Node expL
                {"FLT", TREES_FLT_PROC},
                {"INC", TREES_INC_PROC},
                {"INCL", TREES_INCL_PROC},
-               {"LSL", TREES_LSL_PROC},
                {"Length", TREES_LEN_PROC},
                {"New", TREES_NEW_PROC},
                {"ORD", TREES_ORD_PROC},
index 88c45674b117785b525b9938e199f32877ddc652..3e57b7f6d0d64558d1cf2bbd484b28927634a728 100644 (file)
@@ -379,8 +379,6 @@ Out.Integer(ORD({1, 2, a, 5, b, 8} = {1, 2, a..b, 8}), 0); Out.Ln;
                const eps = 0.01;
                        (*make sure function procedures with constant parameters are constant expressions*)
                        absConst = ABS(0);
-                       lslConst = LSL(0, 0);
-                       asrConst = ASR(0, 0);
                        floorConst = FLOOR(eps);
                        fltConst = FLT(0);
                        ordConst = ORD(true);
@@ -408,16 +406,6 @@ Out.Integer(ORD({1, 2, a, 5, b, 8} = {1, 2, a..b, 8}), 0); Out.Ln;
                a := "";
                Assert(Length(a) = 10);
 
-               Assert(LSL(0, 0) = 0);
-               Assert(LSL(0, 1) = 0);
-               Assert(LSL(1, 0) = 1);
-               Assert(LSL(1, 1) = 2);
-
-               Assert(ASR(0, 0) = 0);
-               Assert(ASR(0, 1) = 0);
-               Assert(ASR(1, 0) = 1);
-               Assert(ASR(1, 1) = 0);
-
                Assert(FLOOR(-1.5) = -2);
                Assert(FLOOR(0.0) = 0);
                Assert(FLOOR(1.5) = 1);
@@ -463,8 +451,6 @@ Out.Integer(ORD({1, 2, a, 5, b, 8} = {1, 2, a..b, 8}), 0); Out.Ln;
                Assert(CHR(x) = 1X);
 
                i := absConst;
-               i := lslConst;
-               i := asrConst;
                i := floorConst;
                r := fltConst;
                i := ordConst;