]> ocean-lang.org Git - ocean/commitdiff
Remove excess blank lines
authorNeilBrown <neil@brown.name>
Wed, 29 May 2019 08:31:55 +0000 (18:31 +1000)
committerNeilBrown <neil@brown.name>
Wed, 29 May 2019 08:31:55 +0000 (18:31 +1000)
We never need 2 blank lines in a row.

Signed-off-by: NeilBrown <neil@brown.name>
csrc/indent_test.mdc
csrc/mdcode.mdc
csrc/oceani-tests.mdc
csrc/oceani.mdc
csrc/parsergen.mdc
csrc/scanner-tests.mdc
csrc/scanner.mdc

index 699b3ca1b08c5502889526a547675579cbd05b51..55a0fe65a468a9d7217e28fedc51852c36b401b5 100644 (file)
@@ -123,7 +123,6 @@ with complete bracketing and indenting.
                exit(0);
        }
 
                exit(0);
        }
 
-
 # indent: grammar
 
 ~~~~~~
 # indent: grammar
 
 ~~~~~~
index e1498cea31ab05c22628861fc301c3af7d947bdb..2789671a6bf0ba9780dfeec773965d4b624fbabe 100644 (file)
@@ -119,7 +119,6 @@ will "do the right thing".
        libmdcode.o : libmdcode.c mdcode.h
                $(CC) $(CFLAGS) -c libmdcode.c
 
        libmdcode.o : libmdcode.c mdcode.h
                $(CC) $(CFLAGS) -c libmdcode.c
 
-
 ### File: md2c.c
 
        #include <unistd.h>
 ### File: md2c.c
 
        #include <unistd.h>
@@ -577,7 +576,6 @@ end of the code, we don't need to check for these blank lines.
                return c;
        }
 
                return c;
        }
 
-
        static char *take_code(char *pos, char *end, char *marker,
                               struct psection **table, struct text section,
                               int *line_nop)
        static char *take_code(char *pos, char *end, char *marker,
                               struct psection **table, struct text section,
                               int *line_nop)
@@ -774,7 +772,6 @@ error message - a `code_err_fn`.
 
        struct section *code_extract(char *pos, char *end, code_err_fn error);
 
 
        struct section *code_extract(char *pos, char *end, code_err_fn error);
 
-
 ## Using the library
 
 Now that we can extract code from a document and link it all together
 ## Using the library
 
 Now that we can extract code from a document and link it all together
@@ -883,7 +880,6 @@ And now we take a single file name, extract the code, and if there are
 no error we write out a file for each appropriate code section.  And
 we are done.
 
 no error we write out a file for each appropriate code section.  And
 we are done.
 
-
 ##### client includes
 
        #include <fcntl.h>
 ##### client includes
 
        #include <fcntl.h>
index 04b9458dbf422cc4659fcc8596cba089a66043c9..d7253b354e079c433ad5289bd3ce7ee18b9c7840 100644 (file)
@@ -98,7 +98,6 @@ calculations on them.
 ###### test list
        oceani_tests += "valvar"
 
 ###### test list
        oceani_tests += "valvar"
 
-
 ###### test: valvar
 
        program:
 ###### test: valvar
 
        program:
@@ -797,7 +796,6 @@ various places that `type_err()` are called.
        .tmp.code:3:12: error: unhandled parse error: :
        oceani: no program found.
 
        .tmp.code:3:12: error: unhandled parse error: :
        oceani: no program found.
 
-
 ## Test erroneous command line args
 
 To improve coverage, we want to test correct handling of strange command
 ## Test erroneous command line args
 
 To improve coverage, we want to test correct handling of strange command
@@ -820,7 +818,6 @@ command list possible.
            ./coverage_oceani $${1+"$$@"} > /dev/null 2>&1 ;\
        done || true
 
            ./coverage_oceani $${1+"$$@"} > /dev/null 2>&1 ;\
        done || true
 
-
 ###### test list
        oceani_special_tests += "cmd"
        oceani_special_tests += "cmd,-zyx"
 ###### test list
        oceani_special_tests += "cmd"
        oceani_special_tests += "cmd,-zyx"
index a3eba942acbd3cd92e407ee61b83446e1893bbf0..342182ee3ae6804f08950595bd3d6a3361eb95f5 100644 (file)
@@ -1034,7 +1034,6 @@ Each variable records a scope depth and is in one of four states:
   in scope.  It is permanently out of scope now and can be removed from
   the "in scope" stack.
 
   in scope.  It is permanently out of scope now and can be removed from
   the "in scope" stack.
 
-
 ###### variable fields
        int depth, min_depth;
        enum { OutScope, PendingScope, CondScope, InScope } scope;
 ###### variable fields
        int depth, min_depth;
        enum { OutScope, PendingScope, CondScope, InScope } scope;
@@ -1491,7 +1490,6 @@ in `val` or the pointer to a value in `lval`.  If `lval` is set, but a
 simple value is required, `inter_exec()` will dereference `lval` to
 get the value.
 
 simple value is required, `inter_exec()` will dereference `lval` to
 get the value.
 
-
 ###### core functions
 
        struct lrval {
 ###### core functions
 
        struct lrval {
@@ -2948,7 +2946,6 @@ precedence is handled better I might be able to discard this.
                rv.str = text_join(left.str, right.str);
                break;
 
                rv.str = text_join(left.str, right.str);
                break;
 
-
 ###### value functions
 
        static struct text text_join(struct text a, struct text b)
 ###### value functions
 
        static struct text text_join(struct text a, struct text b)
@@ -3605,7 +3602,6 @@ defined.
                        var_block_close(config2context(config), CloseElse);
                }$
 
                        var_block_close(config2context(config), CloseElse);
                }$
 
-
        $*exec
        // These scopes are closed in CondSuffix
        ForPart -> for OpenScope SimpleStatements ${
        $*exec
        // These scopes are closed in CondSuffix
        ForPart -> for OpenScope SimpleStatements ${
@@ -4056,7 +4052,6 @@ analysis is a bit more interesting at this level.
                        c->prog = $<1;
        } }$
 
                        c->prog = $<1;
        } }$
 
-
        $*binode
        Program -> program OpenScope Varlist Block OptNL ${
                $0 = new(binode);
        $*binode
        Program -> program OpenScope Varlist Block OptNL ${
                $0 = new(binode);
index a236f83b6843337058ad097612e94b4a52feb432..94c29df1d2c7665f61903d413918d0cbee44e720 100644 (file)
@@ -21,7 +21,6 @@ There are several distinct sections.
    `parsergen` program built from the C code in this file can extract
    that grammar directly from this file and process it.
 
    `parsergen` program built from the C code in this file can extract
    that grammar directly from this file and process it.
 
-
 ###### File: parsergen.c
        #include <unistd.h>
        #include <stdlib.h>
 ###### File: parsergen.c
        #include <unistd.h>
        #include <stdlib.h>
@@ -839,7 +838,6 @@ array like the productions.
                return sl->ss;
        }
 
                return sl->ss;
        }
 
-
 ### Setting `nullable`
 
 We set `nullable` on the head symbol for any production for which all
 ### Setting `nullable`
 
 We set `nullable` on the head symbol for any production for which all
@@ -890,7 +888,6 @@ If a symbol cannot derive a NEWLINE, then it is only part of a line -
 so is word-like.  If it can derive a NEWLINE, then we consider it to
 be like a line.
 
 so is word-like.  If it can derive a NEWLINE, then we consider it to
 be like a line.
 
-
 Clearly the `TK_newline` token can derive a NEWLINE.  Any symbol which
 is the head of a production that contains a line_like symbol is also a
 line-like symbol.  We use a new field `line_like` to record this
 Clearly the `TK_newline` token can derive a NEWLINE.  Any symbol which
 is the head of a production that contains a line_like symbol is also a
 line-like symbol.  We use a new field `line_like` to record this
@@ -1659,7 +1656,6 @@ The LA sets which are (possibly) reported with each item:
 
 Then the go to sets:
 
 
 Then the go to sets:
 
-
        static void report_goto(struct grammar *g, struct symset gt)
        {
                int i;
        static void report_goto(struct grammar *g, struct symset gt)
        {
                int i;
@@ -1857,7 +1853,6 @@ include newlines as token.
                return cnt;
        }
 
                return cnt;
        }
 
-
 ## Generating the parser
 
 The exported part of the parser is the `parse_XX` function, where the name
 ## Generating the parser
 
 The exported part of the parser is the `parse_XX` function, where the name
@@ -1960,7 +1955,6 @@ The go to table is stored in a simple array of `sym` and corresponding
                short min_prefix;
        };
 
                short min_prefix;
        };
 
-
 ###### functions
 
        static void gen_goto(FILE *f, struct grammar *g)
 ###### functions
 
        static void gen_goto(FILE *f, struct grammar *g)
index 9756b08b708fd54285eaa9a5b76a46548c17d2b7..3496f79eb645e1d2550aa8931fb6bdea927726d5 100644 (file)
@@ -45,7 +45,6 @@ about each test.
                        scanner.c libscanner.c \
                        libmdcode.o libnumber.o libstring.o -licuuc -lgmp
 
                        scanner.c libscanner.c \
                        libmdcode.o libnumber.o libstring.o -licuuc -lgmp
 
-
 ## Basic tests
 
 Some simple tests... maybe all tests are simple.
 ## Basic tests
 
 Some simple tests... maybe all tests are simple.
index 705e02e096939e4b20e3e3ad4da5a91264d107a3..42001ff895b0196a7ab83e30afb5c50b5eae1cf0 100644 (file)
@@ -85,7 +85,6 @@ from token to token.
 ###### token_next init
        int ignored = state->conf->ignored;
 
 ###### token_next init
        int ignored = state->conf->ignored;
 
-
 The different tokens are numbers, words, marks, strings, comments,
 newlines, EOF, and indents, each of which is examined in detail below.
 
 The different tokens are numbers, words, marks, strings, comments,
 newlines, EOF, and indents, each of which is examined in detail below.
 
@@ -805,7 +804,6 @@ information and return one token.
                continue;
        }
 
                continue;
        }
 
-
 ###### delayed tokens
 
        if (state->check_indent || state->delayed_lines) {
 ###### delayed tokens
 
        if (state->check_indent || state->delayed_lines) {
@@ -848,7 +846,6 @@ tokens will continue to return the same end-of-file token.
 ###### token types
        TK_eof,
 
 ###### token types
        TK_eof,
 
-
 ###### white space
        if (ch == WEOF) {
                if (state->col) {
 ###### white space
        if (ch == WEOF) {
                if (state->col) {
@@ -1093,7 +1090,6 @@ parsed too much already.  For that there is `reset_token`.
                tok->txt.len = 0;
        }
 
                tok->txt.len = 0;
        }
 
-
 Tokens make not cross into the next `code_node`, and some tokens can
 include the newline at the and of a `code_node`, we must be able to
 easily check if we have reached the end.  Equally we need to know if
 Tokens make not cross into the next `code_node`, and some tokens can
 include the newline at the and of a `code_node`, we must be able to
 easily check if we have reached the end.  Equally we need to know if
@@ -1525,7 +1521,6 @@ character `expc`.
        tok.txt += d;
        tok.len -= d;
 
        tok.txt += d;
        tok.len -= d;
 
-
 Now that we have the mantissa and the exponent we can multiply them
 together, also allowing for the number of digits after the decimal
 mark.
 Now that we have the mantissa and the exponent we can multiply them
 together, also allowing for the number of digits after the decimal
 mark.
@@ -1589,7 +1584,6 @@ Now we are ready to parse a number: the base, mantissa, and exponent.
 If all goes well we check for the possible trailing letters and
 return.  Return value is 1 for success and 0 for failure.
 
 If all goes well we check for the possible trailing letters and
 return.  Return value is 1 for success and 0 for failure.
 
-
 ###### number functions
        int number_parse(mpq_t num, char tail[3], struct text tok)
        {
 ###### number functions
        int number_parse(mpq_t num, char tail[3], struct text tok)
        {
@@ -1924,7 +1918,6 @@ String parsing goes in `libstring.c`
        libstring.o : libstring.c
                $(CC) $(CFLAGS) -c libstring.c
 
        libstring.o : libstring.c
                $(CC) $(CFLAGS) -c libstring.c
 
-
 ## Testing
 
 As "untested code is buggy code" we need a program to easily test
 ## Testing
 
 As "untested code is buggy code" we need a program to easily test