1
0
mirror of https://github.com/brouhaha/dis6502.git synced 2024-06-02 10:41:30 +00:00

add support for negative integers

This commit is contained in:
Eric Smith 2008-03-26 15:06:23 +00:00
parent dae274100d
commit d062b9037f

5
lex.l
View File

@ -63,6 +63,11 @@ alphanum [0-9a-zA-Z_]
\.[Jj][Tt][Aa][Bb] { return TJTAB; }
\-{digit}+ {
(void)sscanf(yytext, "%d", &token.ival);
return NUMBER;
}
{digit}+ {
(void)sscanf(yytext, "%d", &token.ival);
return NUMBER;