From 575c9075448b26316195c26dbcc600656ad44849 Mon Sep 17 00:00:00 2001 From: Michael Munday Date: Wed, 30 Nov 2016 17:07:17 -0500 Subject: [PATCH] Minor cleanup of regular expressions. --- dynasm/dasm_s390x.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dynasm/dasm_s390x.lua b/dynasm/dasm_s390x.lua index eac9d603..c15719b7 100644 --- a/dynasm/dasm_s390x.lua +++ b/dynasm/dasm_s390x.lua @@ -242,7 +242,7 @@ local map_cond = { local parse_reg_type local function parse_gpr(expr) - local r = match(expr, "^r([1-3]?[0-9])$") + local r = match(expr, "^r(1?[0-9])$") if r then r = tonumber(r) if r <= 15 then return r, tp end @@ -251,7 +251,7 @@ local function parse_gpr(expr) end local function parse_fpr(expr) - local r = match(expr, "^f([1-3]?[0-9])$") + local r = match(expr, "^f(1?[0-9])$") if r then r = tonumber(r) if r <= 15 then return r end @@ -292,7 +292,7 @@ end -- Split a memory operand of the form d(b) or d(x,b) into d, x and b. -- If x is not specified then it is 0. local function split_memop(arg) - local reg = "r[0-1]?[0-9]" + local reg = "r1?[0-9]" local d, x, b = match(arg, "^(.*)%(("..reg.."), ("..reg..")%)$") if d then return d, parse_gpr(x), parse_gpr(b)