mirror of
https://github.com/brouhaha/dis6502.git
synced 2024-06-07 13:39:33 +00:00
add support for negative integers
This commit is contained in:
parent
dae274100d
commit
d062b9037f
5
lex.l
5
lex.l
|
@ -63,6 +63,11 @@ alphanum [0-9a-zA-Z_]
|
||||||
|
|
||||||
\.[Jj][Tt][Aa][Bb] { return TJTAB; }
|
\.[Jj][Tt][Aa][Bb] { return TJTAB; }
|
||||||
|
|
||||||
|
\-{digit}+ {
|
||||||
|
(void)sscanf(yytext, "%d", &token.ival);
|
||||||
|
return NUMBER;
|
||||||
|
}
|
||||||
|
|
||||||
{digit}+ {
|
{digit}+ {
|
||||||
(void)sscanf(yytext, "%d", &token.ival);
|
(void)sscanf(yytext, "%d", &token.ival);
|
||||||
return NUMBER;
|
return NUMBER;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user