Here is the "Junk at end of line" case that I wanted to catch.

This commit is contained in:
Olaf Seibert 2021-01-23 17:18:08 +01:00
parent 5df0db5b58
commit af0cf5f7bc
2 changed files with 4 additions and 2 deletions

View File

@ -35,7 +35,7 @@ static int check_eol(
return 1;
}
report(stack->top, "Junk at end of line ('%c')", *cp);
report(stack->top, "Junk at end of line ('%c')\n", *cp);
return 0;
}
@ -1375,7 +1375,7 @@ static int assemble(
store_word(stack->top, tr, 2, word);
mode_extension(tr, &mode, stack->top);
}
return 1;
return CHECK_EOL;
case OC_2GEN:
/* Two general addressing modes */ {

View File

@ -143,7 +143,9 @@
120 000420 172127 140263 addd #-1.4,ac1 ; as float
121
122 ; TODO: let parser check for junk at end of line
test-float.mac:123: ***ERROR Junk at end of line ('5')
123 000424 170627 000002 absf #2.5 ; bad: operand is destination
test-float.mac:124: ***ERROR Junk at end of line ('5')
124 000430 170527 000002 tstd #2.5 ; bad: operand is considered FDST by the arch handbook
125 000434 174027 000002 stf ac0,#2.5 ; bad: junk at end of line
126 000440 174027 000002 stf ac0,#2 ; doesn't makes sense but MACRO11 allows it