## valgrind test code
@[ -n "$$SKIP_COVERAGE_CHECK" ] || awk '/NOTEST/ { next } /^ *[1-9]/ {ran+=1} /^ *###/ {skip+=1} \
END {printf "coverage: %6.2f%%\n", ran * 100 / (ran + skip); \
- if (ran < (ran + skip) *0.968) exit(1) }' \
+ if (ran < (ran + skip) *0.973) exit(1) }' \
coverage/oceani.mdc.gcov
coverage_oceani: oceani.c
| ERROR ${ tok_err(c, "Syntax error in struct field", &$1); }$
Field -> IDENTIFIER : Type = Expression ${ {
- int ok; // UNTESTED
+ int ok;
$0 = calloc(1, sizeof(struct fieldlist));
$0->f.name = $1.txt;
static void structure_print_type(struct type *t, FILE *f);
###### value functions
- static void structure_print_type(struct type *t, FILE *f) // UNTESTED
- { // UNTESTED
- int i; // UNTESTED
+ static void structure_print_type(struct type *t, FILE *f)
+ {
+ int i;
fprintf(f, "struct %.*s\n", t->name.len, t->name.txt);
}
###### print type decls
- { // UNTESTED
- struct type *t; // UNTESTED
+ {
+ struct type *t;
int target = -1;
while (target != 0) {
}
c -= 1;
}
- fputs("\n", f);
for (i = 0; i < p->body_size; i++) {
if (p->body[i]->struct_name.txt &&
used[i]) {
// assume this has been copied out
if (p->body[i]->isref)
- fprintf(f, "\t\t*(void**)body[%d] = NULL;\n", i);
+ fprintf(f, "\t\t*(void**)body[%d] = NULL;", i);
else
- fprintf(f, "\t\tmemset(body[%d], 0, sizeof(struct %.*s));\n", i, p->body[i]->struct_name.len, p->body[i]->struct_name.txt);
+ fprintf(f, "\t\tmemset(body[%d], 0, sizeof(struct %.*s));", i, p->body[i]->struct_name.len, p->body[i]->struct_name.txt);
}
}
+ fputs("\n", f);
free(used);
}
if (p->code.txt) {
fprintf(f, "#line %d \"%s\"\n", p->code_line, file);
gen_code(p, f, g);
+ fprintf(f, "#line 7 \"gen_reduce\"\n");
}
if (p->head->struct_name.txt)