mirror of
https://github.com/brouhaha/dis6502.git
synced 2024-06-08 04:29:49 +00:00
don't require line numbers for equates.
This commit is contained in:
parent
895706eae4
commit
0f0013cdc1
39
main.c
39
main.c
|
@ -312,32 +312,19 @@ void get_predef (void)
|
||||||
while (yylex() != '\n')
|
while (yylex() != '\n')
|
||||||
;
|
;
|
||||||
break;
|
break;
|
||||||
case NUMBER:
|
case NAME:
|
||||||
switch (yylex()) {
|
name = token.sval;
|
||||||
case LI:
|
if (yylex() != EQ)
|
||||||
case COMMENT:
|
crash("name can only be used with equate in defines file");
|
||||||
while (yylex() != '\n')
|
if (yylex() != NUMBER)
|
||||||
;
|
crash("EQ operand must be a number");
|
||||||
break;
|
loc = token.ival;
|
||||||
case '\n':
|
if (loc > 0x10000 || loc < 0)
|
||||||
break;
|
crash("Number out of range");
|
||||||
case NAME:
|
f[loc] |= NAMED;
|
||||||
name = token.sval;
|
save_name(loc, name);
|
||||||
if (yylex() != EQ)
|
while (yylex() != '\n')
|
||||||
crash("Only EQ and LI supported in defines file");
|
;
|
||||||
if (yylex() != NUMBER)
|
|
||||||
crash("EQ operand must be a number");
|
|
||||||
loc = token.ival;
|
|
||||||
if (loc > 0x10000 || loc < 0)
|
|
||||||
crash("Number out of range");
|
|
||||||
f[loc] |= NAMED;
|
|
||||||
save_name(loc, name);
|
|
||||||
while (yylex() != '\n')
|
|
||||||
;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
crash("Invalid line in predef file");
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
crash("Invalid line in predef file");
|
crash("Invalid line in predef file");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user