mirror of
https://gitlab.os-k.eu/os-k-team/kvisc.git
synced 2023-08-25 14:05:46 +02:00
fix
This commit is contained in:
parent
2ca9869233
commit
0d5fd176e3
10
as/k-as.py
10
as/k-as.py
@ -71,7 +71,6 @@ pdata_pad = 0
|
||||
def name_valid(name):
|
||||
for c in name.lower():
|
||||
if not(c in 'abcdefghijklmnopqrstuvwxyz0123456789[$._+]=,'):
|
||||
print("BAD '{}'".format(c))
|
||||
return False
|
||||
return True
|
||||
|
||||
@ -152,7 +151,6 @@ def parse():
|
||||
source.seek(0)
|
||||
|
||||
for count, line in enumerate(source):
|
||||
print(line)
|
||||
line = line.rstrip()
|
||||
|
||||
if len(line) == 0:
|
||||
@ -198,11 +196,6 @@ def parse_preproc(line):
|
||||
|
||||
tok = line.split(' ', 2)
|
||||
|
||||
#for word in tok:
|
||||
# if not name_valid(word):
|
||||
# print("Invalid token in line: {}".format(line))
|
||||
# return
|
||||
|
||||
# preprocessor
|
||||
if len(tok) > 1 and tok[1] == ':=':
|
||||
if len(tok) < 3:
|
||||
@ -322,7 +315,6 @@ def parse_instr(line):
|
||||
pref = None
|
||||
|
||||
# memory length prefixes
|
||||
#print(word)
|
||||
if len(word) > 2 and '[' in word:
|
||||
if word[0] == 'b':
|
||||
pref = "%b"
|
||||
@ -333,7 +325,7 @@ def parse_instr(line):
|
||||
elif word[0] == 'q':
|
||||
pref = "%q"
|
||||
else:
|
||||
print("Bad memory length prefix")
|
||||
print("Bad memory length prefix: {}".format(line))
|
||||
leave()
|
||||
sys.exit(1)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user