only allow lower case hex character for jump locations so labels like FINISH WORK

This commit is contained in:
Henrik Böving
2020-11-29 21:07:10 +01:00
parent 5cd2ce4dad
commit abe5b3a45f

View File

@@ -18,11 +18,11 @@ jump_instruction = {"JMP"}
arg_instruction = {"LDA" | "ADD" | "SUB"} arg_instruction = {"LDA" | "ADD" | "SUB"}
no_arg_instruction = { "NOP" } no_arg_instruction = { "NOP" }
jump_argument = { jump_location | label} jump_argument = { jump_location | label }
argument = { memory_location | digit_literal } argument = { memory_location | digit_literal }
memory_location = { "(" ~ ASCII_HEX_DIGIT ~")" } memory_location = { "(" ~ ASCII_HEX_DIGIT ~")" }
digit_literal = {"#" ~ ASCII_HEX_DIGIT} digit_literal = {"#" ~ ASCII_HEX_DIGIT}
jump_location = { ASCII_HEX_DIGIT } jump_location = { '0'..'9' | 'a'..'f' }
label = { ASCII_ALPHA_UPPER+ } label = { ASCII_ALPHA_UPPER+ }