]> ocean-lang.org Git - ocean/commitdiff
More indent_test.cgm mods.
authorNeilBrown <neilb@suse.de>
Thu, 2 Oct 2014 10:49:14 +0000 (20:49 +1000)
committerNeilBrown <neilb@suse.de>
Thu, 2 Oct 2014 10:49:14 +0000 (20:49 +1000)
Still trying to figure it out.

Want to make sure only the right things are line-like.

Signed-off-by: NeilBrown <neil@brown.name>
csrc/indent_test.cgm

index e7b176fd0ced16f162faaa05e010b96ccedf01e1..d5c31561f415dc780a56f01059b83a24836854cc 100644 (file)
@@ -117,6 +117,9 @@ Program -> Statementlist ${ print_statement($1, 0); }$
 OptNL -> NEWLINE
        |
 
+Newlines -> NEWLINE
+       | NEWLINE Newlines
+
 $*statement
        Statementlist -> SimpleStatements ${ $0 = $<1; }$
                | Statements ${ $0 = $<1; }$
@@ -156,13 +159,12 @@ $*statement
                        $0->expr->op = $2.txt;
                        $0->expr->right = $<3;
                        }$
-       Statement -> SimpleStatements NEWLINE ${
+       Statement -> SimpleStatements Newlines ${
                        $0 = $<1;
                        }$
-               | SimpleStatements ; NEWLINE ${
+               | SimpleStatements ; Newlines ${
                        $0 = $<1;
                        }$
-               | NEWLINE ${ $0 = NULL; }$
                | IfStatement ${ $0 = $<1; }$
 
        IfStatement -> if Expression Block ${