possibile aggiungere commenti
This commit is contained in:
parent
e518029485
commit
7b972fc406
@ -485,13 +485,13 @@ ops_sizes = {"reg2reg": 2,
|
|||||||
ops = [VMComponent(le[0], i, le[1]) for i, le in enumerate(op_names)]
|
ops = [VMComponent(le[0], i, le[1]) for i, le in enumerate(op_names)]
|
||||||
regs = [VMComponent(s.casefold(), i) for i, s in enumerate(reg_names)]
|
regs = [VMComponent(s.casefold(), i) for i, s in enumerate(reg_names)]
|
||||||
instruction_re = re.compile(
|
instruction_re = re.compile(
|
||||||
"^([\w]{4})(?:\ +(?:([\w]+)\ *(?:,[\ ]*([\w]+))*))?$") # 1: opcode 2+: args
|
"^([\w]{4})(?:(?:\ *\#\ *[\w]*)|(?:\ +(?:([\w]+)\ *(?:,[\ ]*([\w]+))?)(?:\ *\#\ *[\w]*)?))?$") # 1: opcode 2+: args
|
||||||
function_re = re.compile("(?:def\ )([a-zA-Z]*)\:")
|
function_re = re.compile("(?:def\ )([a-zA-Z]*)\:")
|
||||||
immediate_re = re.compile("(?:0x)?[0-9a-fA-F]+$")
|
immediate_re = re.compile("(?:0x)?[0-9a-fA-F]+$")
|
||||||
alpha_re = re.compile("^[a-zA-Z]*$")
|
alpha_re = re.compile("^[a-zA-Z]*$")
|
||||||
register_re = re.compile("(^[rRsS][0-4]$)|([iIrRsS][pP]$)")
|
register_re = re.compile("(^[rRsS][0-4]$)|([iIrRsS][pP]$)")
|
||||||
label_re = re.compile("^([a-zA-Z]+)\:$")
|
label_re = re.compile("^([a-zA-Z]+)\:(?:\ *\#\ *[\w]*)?$")
|
||||||
symcall_re = re.compile("^(?:[jJ][pPmM][pPaAbBeEnN][iIrR]|(?:[cC][aA][lL]{2}))\ +([\w]*)$")
|
symcall_re = re.compile("^(?:[jJ][pPmM][pPaAbBeEnN][iIrR]|(?:[cC][aA][lL]{2}))(\ +[\w]+)(?:\ *\#\ *[\w]*)?$")
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
Loading…
Reference in New Issue
Block a user