forked from GitHub/lad
make opcodes case insensitive
This commit is contained in:
+3
-3
@@ -100,7 +100,7 @@ grammar = [[
|
||||
label <- <name> ":"
|
||||
string <- '"' ('\\' / '\"' / !'"' .)* '"'
|
||||
instruction <- ( <s> ( {<label>} / <number>)? <s> <ln>? <s> {<op>} ( <s> {<param>} )+ <s> ( %nl )+ ) -> {}
|
||||
op <- [A-Z]+
|
||||
op <- [A-Za-z]+
|
||||
param <- <register> / <number> / <name> / <string>
|
||||
register <- ( "R[" <number> "]" )
|
||||
s <- ( !%nl %s )*
|
||||
@@ -310,10 +310,10 @@ function parse_inst(table, parsed, n)
|
||||
local b = 3
|
||||
local c = 4
|
||||
if check_label(table[1]) == nil then
|
||||
op = table[1]
|
||||
op = string.upper (table[1])
|
||||
else
|
||||
set_label(table[1], parsed, n)
|
||||
op = table[2]
|
||||
op = string.upper (table[2])
|
||||
a = 3
|
||||
b = 4
|
||||
c = 5
|
||||
|
||||
Reference in New Issue
Block a user