Leopold Toetsch <[EMAIL PROTECTED]> writes:

> > I just implemented macro expansion in imcc.

[...]

> Here something fishy must happen:
> 
> $ cat t/op/arithmetics_22.pasm | imcc -
> error:imcc: file - line 1: unknown macro '.macro'
> 
> $ imcc t/op/arithmetics_22.pasm
> ok 1

Very strange. During development i regulary checked the later one, and
never tried the first one. Will have a look.

> I tried to run tests and skipped writing the $assembly to a file:
> 
>   if (($imcc = $ENV{IMCC})) {
>    system("echo '$assembly' | $imcc $TEST_PROG_ARGS -- - > $out_f 2>&1");
>   }

I had a replacement version of assemble.pl (just an exec
"languages/imcc" with argument munging) and did regulary run make test

> The $out_f could be skipped to by just catching STDIN and STDERR.
> 
> 
> > bye
> > boe
> 
> 
> One minor note: Could you replace these "yyerror"
> 
> 
> > +   if (!expand_macro(valp, interp, yytext+1)) yyerror("unknown macro");
> 
> 
> with a little more informative message:
> 
>              fataly(1, "", line, "unknown macro '%s'\n", yytext);
> 
> fataly could also take a function name (.sub argument or bsr label?)

No problem. Will do this.

bye
boe

Reply via email to