Changeset: f8894d8a689c for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f8894d8a689c
Modified Files:
monetdb5/mal/Tests/tst002.stable.err
monetdb5/mal/Tests/tst054.stable.err
monetdb5/mal/Tests/tst058.stable.err
monetdb5/mal/mal_parser.c
Branch: default
Log Message:
Fix minor bug in parsing hg nil values as integers.
diffs (89 lines):
diff --git a/monetdb5/mal/Tests/tst002.stable.err
b/monetdb5/mal/Tests/tst002.stable.err
--- a/monetdb5/mal/Tests/tst002.stable.err
+++ b/monetdb5/mal/Tests/tst002.stable.err
@@ -39,9 +39,9 @@ QUERY = # reserved names may not be used
b:= false;
exit barrier;
ERROR = !SyntaxException:parseError: true:= 23;
- !SyntaxException:parseError: ^<identifier> expected
+ !SyntaxException:parseError: ^<identifier> or <literal> expected
!SyntaxException:parseError: false:= 24;
- !SyntaxException:parseError: ^<identifier> expected
+ !SyntaxException:parseError: ^<identifier> or <literal> expected
# 22:10:35 >
# 22:10:35 > "Done."
diff --git a/monetdb5/mal/Tests/tst054.stable.err
b/monetdb5/mal/Tests/tst054.stable.err
--- a/monetdb5/mal/Tests/tst054.stable.err
+++ b/monetdb5/mal/Tests/tst054.stable.err
@@ -77,7 +77,7 @@ QUERY = function z()( :int,:int,:int,:in
end z;
z();
ERROR = !SyntaxException:parseError:return
(1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0);
- !SyntaxException:parseError: ^<identifier> expected
+ !SyntaxException:parseError: ^<identifier> or <literal> expected
!SyntaxException:parseError:end z;
!SyntaxException:parseError: ^non matching end label
diff --git a/monetdb5/mal/Tests/tst058.stable.err
b/monetdb5/mal/Tests/tst058.stable.err
--- a/monetdb5/mal/Tests/tst058.stable.err
+++ b/monetdb5/mal/Tests/tst058.stable.err
@@ -76,9 +76,7 @@ QUERY = -- some typos
i:= 1 + 1 + 1;
j:= 1 + + 1;
ERROR = !SyntaxException:parseError:-- some typos
- !SyntaxException:parseError:^convertConstant: integer parse error
- !SyntaxException:parseError:i:= 1 + 1 + 1;
- !SyntaxException:parseError:^<identifier> expected
+ !SyntaxException:parseError:^<identifier> or <literal> expected
!SyntaxException:parseError:i:= 1 + 1 + 1;
!SyntaxException:parseError: ^';' expected
!SyntaxException:parseError:j:= 1 + + 1;
diff --git a/monetdb5/mal/mal_parser.c b/monetdb5/mal/mal_parser.c
--- a/monetdb5/mal/mal_parser.c
+++ b/monetdb5/mal/mal_parser.c
@@ -588,8 +588,6 @@ handleInts:
} else {
cst->vtype = TYPE_hge;
cst->val.hval = l;
- if (is_hge_nil(l))
- parseError(cntxt, "convertConstant:
integer parse error\n");
}
#else
size_t len = sizeof(lng);
@@ -603,8 +601,6 @@ handleInts:
} else {
cst->vtype = TYPE_lng;
cst->val.lval = l;
- if (is_lng_nil(l))
- parseError(cntxt, "convertConstant:
integer parse error\n");
}
#endif
}
@@ -1563,7 +1559,7 @@ parseAssign(Client cntxt, int cntrl)
l = idLength(cntxt);
i = cstToken(cntxt, &cst);
if (l == 0 || i) {
- parseError(cntxt, "<identifier> expected\n");
+ parseError(cntxt, "<identifier> or <literal>
expected\n");
freeInstruction(curInstr);
return;
}
@@ -1604,7 +1600,7 @@ parseAssign(Client cntxt, int cntrl)
curInstr->argv[0] = getBarrierEnvelop(curBlk);
if (currChar(cntxt) != ';') {
freeInstruction(curInstr);
- parseError(cntxt, "<identifier>
expected in control statement\n");
+ parseError(cntxt, "<identifier> or
<literal> expected in control statement\n");
return;
}
pushInstruction(curBlk, curInstr);
@@ -1612,7 +1608,7 @@ parseAssign(Client cntxt, int cntrl)
}
getArg(curInstr, 0) = newTmpVariable(curBlk, TYPE_any);
freeInstruction(curInstr);
- parseError(cntxt, "<identifier> expected\n");
+ parseError(cntxt, "<identifier> or <literal>
expected\n");
return;
}
/* Check if we are dealing with module.fcn call*/
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list