diff --git a/src/modal.c b/src/modal.c index 6413661..35b4c26 100644 --- a/src/modal.c +++ b/src/modal.c @@ -89,9 +89,8 @@ tokenize(char *t, FILE *f) r->a = parse_rulefrag(f), r->b = parse_rulefrag(f); return; } - while(f && fread(&c, 1, 1, f) && c && c != 0xa) - *prog_++ = c; - *prog_++ = 0x20; + while(f && fread(&c, 1, 1, f) && c) + *prog_++ = c == 0xa ? 0x20 : c; } static int diff --git a/test.modal b/test.modal index 05359ed..10e1116 100644 --- a/test.modal +++ b/test.modal @@ -1,3 +1,5 @@ +<> (?x world) (?x whurl) <> (?b bar) (?b baz) +(hello world) ((foo baz) bar) \ No newline at end of file