]> ocean-lang.org Git - ocean/blobdiff - csrc/oceani.mdc
oceani: exercise more parsing options for blocks.
[ocean] / csrc / oceani.mdc
index ad0d1b5c6905e8be8c7a7867f2c4c132e35367f3..cd37f1b8b8766eeb8371bb9ec5171a34cdc70e0a 100644 (file)
@@ -4553,20 +4553,24 @@ the common header for all reductions to use.
        Block -> { IN OptNL Statementlist OUT OptNL } ${ $0 = $<Sl; }$
        |        { SimpleStatements } ${ $0 = reorder_bilist($<SS); }$
        |        SimpleStatements ; ${ $0 = reorder_bilist($<SS); }$
-       |        SimpleStatements EOL ${ $0 = reorder_bilist($<SS); }$
+       |        SimpleStatements EOL ${ $0 = reorder_bilist($<SS); 
+               }$
        |        IN OptNL Statementlist OUT ${ $0 = $<Sl; }$
 
-       OpenBlock -> OpenScope { IN OptNL Statementlist OUT OptNL } ${ $0 = $<Sl; }$
+       OpenBlock -> OpenScope { IN OptNL Statementlist OUT OptNL } ${ $0 = $<Sl;       // UNTESTED
+               }$
        |        OpenScope { SimpleStatements } ${ $0 = reorder_bilist($<SS); }$
        |        OpenScope SimpleStatements ; ${ $0 = reorder_bilist($<SS); }$
        |        OpenScope SimpleStatements EOL ${ $0 = reorder_bilist($<SS); }$
        |        IN OpenScope OptNL Statementlist OUT ${ $0 = $<Sl; }$
 
-       UseBlock -> { OpenScope IN OptNL Statementlist OUT OptNL } ${ $0 = $<Sl; }$
+       UseBlock -> { OpenScope IN OptNL Statementlist OUT OptNL } ${ $0 = $<Sl;        // UNTESTED
+               }$
        |        { OpenScope SimpleStatements } ${ $0 = reorder_bilist($<SS); }$
        |        IN OpenScope OptNL Statementlist OUT ${ $0 = $<Sl; }$
 
-       ColonBlock -> { IN OptNL Statementlist OUT OptNL } ${ $0 = $<Sl; }$
+       ColonBlock -> { IN OptNL Statementlist OUT OptNL } ${ $0 = $<Sl;        // UNTESTED
+               }$
        |        { SimpleStatements } ${ $0 = reorder_bilist($<SS); }$
        |        : SimpleStatements ; ${ $0 = reorder_bilist($<SS); }$
        |        : SimpleStatements EOL ${ $0 = reorder_bilist($<SS); }$
@@ -5784,7 +5788,7 @@ is a bit more interesting at this level.
                $0 = declare_function(c, $<FN, $<Ar, $<Ty, NULL, $<Bl);
        }$
        | func FuncName ( OpenScope ArgsLine ) : ( ArgsLine ) Block Newlines ${
-               $0 = declare_function(c, $<FN, $<AL, NULL, $<AL2, $<Bl);        // UNTESTED
+               $0 = declare_function(c, $<FN, $<AL, NULL, $<AL2, $<Bl);
        }$
        | func FuncName IN OpenScope Args OUT OptNL return Type Newlines do Block Newlines ${
                $0 = declare_function(c, $<FN, $<Ar, $<Ty, NULL, $<Bl);
@@ -5796,7 +5800,7 @@ is a bit more interesting at this level.
                $0 = declare_function(c, $<FN, $<Ar, NULL, $<Ar2, $<Bl);
        }$
        | func FuncName NEWLINE OpenScope return IN Args OUT OptNL do Block Newlines ${
-               $0 = declare_function(c, $<FN, NULL, NULL, $<Ar, $<Bl); // UNTESTED
+               $0 = declare_function(c, $<FN, NULL, NULL, $<Ar, $<Bl);
        }$
 
 ###### print func decls