Changeset: 3e387084ea8c for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3e387084ea8c
Modified Files:
monetdb5/mal/Tests/tst606.stable.out
monetdb5/mal/mal_parser.mx
Branch: Mar2011
Log Message:
Let also parseFunction() trigger a parse error in case address is not found
(just like parseCommandPattern()).
Approved new output of test monetdb5/mal/Tests/tst606.mal
diffs (31 lines):
diff --git a/monetdb5/mal/Tests/tst606.stable.out
b/monetdb5/mal/Tests/tst606.stable.out
--- a/monetdb5/mal/Tests/tst606.stable.out
+++ b/monetdb5/mal/Tests/tst606.stable.out
@@ -59,6 +59,13 @@
BoxException := "releasing a constant is forbidden";
raise BoxException;
end release;
+!SyntaxException:parseError:address space_deposit;
+!SyntaxException:parseError: ^<address> not found
+!SyntaxException:parseError:
+!<identifier> expected
+function constants.deposit(v:any_1,name:str):void;
+ ;
+end deposit;
# 08:01:25 >
# 08:01:25 > Done.
diff --git a/monetdb5/mal/mal_parser.mx b/monetdb5/mal/mal_parser.mx
--- a/monetdb5/mal/mal_parser.mx
+++ b/monetdb5/mal/mal_parser.mx
@@ -1372,6 +1372,10 @@
nme = idCopy(cntxt,i);
curInstr->fcn = getAddress(cntxt->srcFile, cntxt->nspace->name,
nme,TRUE);
GDKfree(nme);
+ if (curInstr->fcn == NULL) {
+ parseError(cntxt, "<address> not found\n");
+ return 0;
+ }
skipSpace(cntxt);
}
/* block is terminated at the END statement */
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list