Changeset: 76a674e0247e for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=76a674e0247e
Modified Files:
        monetdb5/mal/Tests/dynamicload.stable.err
        monetdb5/mal/Tests/tst054.stable.err
        monetdb5/mal/mal_parser.c
        monetdb5/mal/mal_session.c
Branch: malparsing
Log Message:

Continue parsing after end of separate include handling


diffs (65 lines):

diff --git a/monetdb5/mal/Tests/dynamicload.stable.err 
b/monetdb5/mal/Tests/dynamicload.stable.err
--- a/monetdb5/mal/Tests/dynamicload.stable.err
+++ b/monetdb5/mal/Tests/dynamicload.stable.err
@@ -91,7 +91,7 @@ QUERY = # examples of non-bindable instr
         comment "Should not be callable";
         
         wrong();
-
+ERROR = !SyntaxException: include UNKNOWlib;
         !SyntaxException:^19 MALException:mal.import:#WARNING: could not open 
file: UNKNOWlib
         !TypeException:user.main[1]:object code for command user.wrong missing
         !TypeException:user.main[1]:'user.wrong' undefined in:     
user.wrong();
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
@@ -76,8 +76,9 @@ QUERY = function z()( :int,:int,:int,:in
         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);
         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:^9 left-hand-side <identifier> expected
+        !SyntaxException:RETURN missing
         !TypeException:user.main[1]:'user.z' undefined in:     user.z();
 
 # 11:11:08 >  
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
@@ -1521,10 +1521,11 @@ part2:  /* consume <operator><term> part
        }
 part3:
        skipSpace(cntxt);
-       if (*cntxt->lineptr != ';')
+       if (*cntxt->lineptr != ';' && cntxt->curprg->def->errors == MAL_SUCCEED)
                parseError(cntxt, "';' expected\n");
        pushInstruction(curBlk, curInstr);
-       if (cntrl == RETURNsymbol && !(curInstr->token == ASSIGNsymbol || 
getModuleId(curInstr) != 0))
+       if (cntrl == RETURNsymbol && !(curInstr->token == ASSIGNsymbol || 
getModuleId(curInstr) != 0) 
+               && cntxt->curprg->def->errors == MAL_SUCCEED)
                parseError(cntxt, "return assignment expected\n");
 }
 
diff --git a/monetdb5/mal/mal_session.c b/monetdb5/mal/mal_session.c
--- a/monetdb5/mal/mal_session.c
+++ b/monetdb5/mal/mal_session.c
@@ -616,6 +616,7 @@ MALreader(Client c)
                                        fprintf(stderr,"Pop the input stream 
for client %d\n", c->idx);
 #endif
                                        MCpopClientInput(c);
+                                       nr = -1; // force reading next part 
                                } else{
                                        // if we have unprocessed data we 
should return and await its consumption
                                        if(c->line && *c->line){
@@ -624,8 +625,8 @@ MALreader(Client c)
                                        MT_lock_set(&mal_contextLock);
                                        c->mode = FINISHCLIENT;
                                        MT_lock_unset(&mal_contextLock);
+                                       return MAL_SUCCEED;
                                }
-                               return MAL_SUCCEED;
                        }
                        if (!nr && blocked ){
                                nr = bstream_next(c->fdin); // check for eof 
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to