Changeset: f0ab2de5d65e for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f0ab2de5d65e
Modified Files:
        monetdb5/mal/Tests/tst010.stable.err
        monetdb5/mal/mal_function.c
Branch: default
Log Message:

Relax the flow check when END has not been reached.


diffs (41 lines):

diff --git a/monetdb5/mal/Tests/tst010.stable.err 
b/monetdb5/mal/Tests/tst010.stable.err
--- a/monetdb5/mal/Tests/tst010.stable.err
+++ b/monetdb5/mal/Tests/tst010.stable.err
@@ -78,7 +78,6 @@ ERROR = !SyntaxException:user.main[6]:la
         !SyntaxException:user.main[30]:exit-label 'B' doesnot match 'A'
         !SyntaxException:user.main[32]:exit-label 'F' without begin-label
         !SyntaxException:user.main[42]:exit-label 'A' without begin-label
-        !SyntaxException:user.main[45]:barrier 'unfinished' without exit in 
main[46]
         !SyntaxException:parseError:end foo;
         !SyntaxException:parseError:   ^non matching end label
 
diff --git a/monetdb5/mal/mal_function.c b/monetdb5/mal/mal_function.c
--- a/monetdb5/mal/mal_function.c
+++ b/monetdb5/mal/mal_function.c
@@ -77,7 +77,7 @@ void chkFlow(stream *out, MalBlkPtr mb)
        int  var[DEPTH];
        InstrPtr stmt[DEPTH];
        int btop=0;
-       int retseen=0, yieldseen=0;
+       int endseen=0, retseen=0, yieldseen=0;
        int fixed=1;
        InstrPtr p;
 
@@ -200,6 +200,9 @@ void chkFlow(stream *out, MalBlkPtr mb)
                        break;
            case RAISEsymbol:
                break;
+           case ENDsymbol:
+                       endseen =1;
+               break;
                default:
                        if( isaSignature(p) ){
                                if( p->token == REMsymbol){
@@ -221,6 +224,7 @@ void chkFlow(stream *out, MalBlkPtr mb)
 #endif
                mb->errors++;
        }
+       if( endseen)
        for(btop--; btop>=0;btop--){
                showScriptException(out, mb,lastInstruction, SYNTAX,
                        "barrier '%s' without exit in %s[%d]",
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to