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):
|
def name_valid(name):
|
||||||
for c in name.lower():
|
for c in name.lower():
|
||||||
if not(c in 'abcdefghijklmnopqrstuvwxyz0123456789[$._+]=,'):
|
if not(c in 'abcdefghijklmnopqrstuvwxyz0123456789[$._+]=,'):
|
||||||
print("BAD '{}'".format(c))
|
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@ -152,7 +151,6 @@ def parse():
|
|||||||
source.seek(0)
|
source.seek(0)
|
||||||
|
|
||||||
for count, line in enumerate(source):
|
for count, line in enumerate(source):
|
||||||
print(line)
|
|
||||||
line = line.rstrip()
|
line = line.rstrip()
|
||||||
|
|
||||||
if len(line) == 0:
|
if len(line) == 0:
|
||||||
@ -198,11 +196,6 @@ def parse_preproc(line):
|
|||||||
|
|
||||||
tok = line.split(' ', 2)
|
tok = line.split(' ', 2)
|
||||||
|
|
||||||
#for word in tok:
|
|
||||||
# if not name_valid(word):
|
|
||||||
# print("Invalid token in line: {}".format(line))
|
|
||||||
# return
|
|
||||||
|
|
||||||
# preprocessor
|
# preprocessor
|
||||||
if len(tok) > 1 and tok[1] == ':=':
|
if len(tok) > 1 and tok[1] == ':=':
|
||||||
if len(tok) < 3:
|
if len(tok) < 3:
|
||||||
@ -322,7 +315,6 @@ def parse_instr(line):
|
|||||||
pref = None
|
pref = None
|
||||||
|
|
||||||
# memory length prefixes
|
# memory length prefixes
|
||||||
#print(word)
|
|
||||||
if len(word) > 2 and '[' in word:
|
if len(word) > 2 and '[' in word:
|
||||||
if word[0] == 'b':
|
if word[0] == 'b':
|
||||||
pref = "%b"
|
pref = "%b"
|
||||||
@ -333,7 +325,7 @@ def parse_instr(line):
|
|||||||
elif word[0] == 'q':
|
elif word[0] == 'q':
|
||||||
pref = "%q"
|
pref = "%q"
|
||||||
else:
|
else:
|
||||||
print("Bad memory length prefix")
|
print("Bad memory length prefix: {}".format(line))
|
||||||
leave()
|
leave()
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user