.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),
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); }$