Adding new tokens to the assembler isn't quite as easy as I thought: ensure
that NUMBERF is stored properly in the temporary file.
This commit is contained in:
parent
5264db860d
commit
a8df9721d3
1 changed files with 3 additions and 0 deletions
|
@ -144,6 +144,7 @@ void putval(int c)
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case STRING:
|
case STRING:
|
||||||
|
case NUMBERF:
|
||||||
v = stringlen;
|
v = stringlen;
|
||||||
putc(c, tempfile);
|
putc(c, tempfile);
|
||||||
putc(c >> 8, tempfile);
|
putc(c >> 8, tempfile);
|
||||||
|
@ -238,6 +239,7 @@ int getval(int c)
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case STRING:
|
case STRING:
|
||||||
|
case NUMBERF:
|
||||||
getval(getc(tempfile) + NUMBER0);
|
getval(getc(tempfile) + NUMBER0);
|
||||||
stringlen = n = yylval.y_valu;
|
stringlen = n = yylval.y_valu;
|
||||||
p = stringbuf;
|
p = stringbuf;
|
||||||
|
@ -456,6 +458,7 @@ floatconstant:
|
||||||
*p++ = c;
|
*p++ = c;
|
||||||
c = nextchar();
|
c = nextchar();
|
||||||
} while (isdigit(c) || (c == '.') || (c == 'E') || (c == '+') || (c == '-'));
|
} while (isdigit(c) || (c == '.') || (c == 'E') || (c == '+') || (c == '-'));
|
||||||
|
peekc = c;
|
||||||
|
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
stringbuf = strdup(num);
|
stringbuf = strdup(num);
|
||||||
|
|
Loading…
Add table
Reference in a new issue