From: NeilBrown Date: Thu, 2 Oct 2014 10:49:14 +0000 (+1000) Subject: More indent_test.cgm mods. X-Git-Tag: workingparser~21 X-Git-Url: https://ocean-lang.org/code/?p=ocean;a=commitdiff_plain;h=07af4a4109151a22c445f1061e0c28f218514189 More indent_test.cgm mods. Still trying to figure it out. Want to make sure only the right things are line-like. Signed-off-by: NeilBrown --- diff --git a/csrc/indent_test.cgm b/csrc/indent_test.cgm index e7b176f..d5c3156 100644 --- a/csrc/indent_test.cgm +++ b/csrc/indent_test.cgm @@ -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 ${