]> ocean-lang.org Git - ocean/commitdiff
parsergen - adjust for recent scanner fix.
authorNeilBrown <neilb@suse.de>
Sun, 21 Jul 2013 07:58:34 +0000 (17:58 +1000)
committerNeilBrown <neilb@suse.de>
Sun, 21 Jul 2013 08:16:51 +0000 (18:16 +1000)
scanner was recently fixed to correctly skip over C code with
a string immediately after a '(', so we can remove the extra
spaces we inserted before.

For this to work, we need to stop ignoring TK_String

Signed-off-by: NeilBrown <neilb@suse.de>
csrc/parsergen.mdc

index ddf03ab27d640ab38f8a07c342f9c5ee9dc66324..5d5ea1ebc352b13eacfd809a11416ce1ba2e5e18 100644 (file)
@@ -528,7 +528,7 @@ Now we are ready to read in the grammar.
                        .ignored = (1 << TK_line_comment)
                                 | (1 << TK_block_comment)
                                 | (0 << TK_number)
-                                | (0 << TK_string)
+                                | (1 << TK_string)
                                 | (1 << TK_multi_string)
                                 | (1 << TK_indent)
                                 | (1 << TK_undent),
@@ -2523,23 +2523,23 @@ something like this.
        Session -> Session Line
                | Line
 
-       Line -> Expression NEWLINE ${ gmp_printf( "Answer = %Qd\n", $1.val);
+       Line -> Expression NEWLINE ${ gmp_printf("Answer = %Qd\n", $1.val);
                                        { mpf_t fl; mpf_init2(fl, 20); mpf_set_q(fl, $1.val);
-                                       gmp_printf( "  or as a decimal: %Fg\n", fl);
+                                       gmp_printf("  or as a decimal: %Fg\n", fl);
                                        mpf_clear(fl);
                                        }
                                     }$
                | Expression = Expression NEWLINE ${
                        if (mpq_equal($1.val, $3.val))
-                               gmp_printf( "Both equal %Qd\n", $1.val);
+                               gmp_printf("Both equal %Qd\n", $1.val);
                        else {
-                               gmp_printf( "NOT EQUAL: %Qd\n      != : %Qd\n",
+                               gmp_printf("NOT EQUAL: %Qd\n      != : %Qd\n",
                                        $1.val, $3.val);
                                exit(1);
                        }
                }$
-               |  NEWLINE ${ printf( "Blank line\n"); }$
-               | ERROR NEWLINE ${ printf( "Skipped a bad line\n"); }$
+               |  NEWLINE ${ printf("Blank line\n"); }$
+               | ERROR NEWLINE ${ printf("Skipped a bad line\n"); }$
 
        $number
        Expression -> Expression +  Term ${ mpq_init($0.val); mpq_add($0.val, $1.val, $3.val); }$