Make compatible with lua 5.1.
This commit is contained in:
parent
50d3354ccb
commit
5dd6e8c856
|
@ -33,9 +33,9 @@ function load_table()
|
|||
break
|
||||
end
|
||||
|
||||
local _, _, name, num, flags = line:find("^(%w+)%s+(%d+)%s+(%g+)$")
|
||||
local _, _, name, num, flags = line:find("^(%w+)%s+(%d+)%s+([^ \t]+)$")
|
||||
if not name then
|
||||
error("malformed pseudo line in em_table")
|
||||
error("malformed pseudo line in em_table: ")
|
||||
end
|
||||
|
||||
pseudos[#pseudos+1] = {
|
||||
|
@ -54,7 +54,7 @@ function load_table()
|
|||
break
|
||||
end
|
||||
|
||||
local _, _, name, flags1, flags2 = line:find("^(%w+)%s+(%g+)%s+(%g+)$")
|
||||
local _, _, name, flags1, flags2 = line:find("^(%w+)%s+([^ \t]+)%s+([^ \t]+)$")
|
||||
if not name then
|
||||
error("malformed mnemonic line in em_table")
|
||||
end
|
||||
|
|
|
@ -13,7 +13,7 @@ void enterkeyw(void) {
|
|||
|
||||
for line in io.stdin:lines() do
|
||||
if not line:find("^#") then
|
||||
local _, _, w1, w2 = line:find("^(%g+)%s+(%g+)$")
|
||||
local _, _, w1, w2 = line:find("^([^ \t]+)%s+([^ \t]+)$")
|
||||
print(string.format([[
|
||||
lookup("%s", symkeyw, newsymbol)->sy_value.syv_keywno = %s;
|
||||
]], w1, w2))
|
||||
|
|
Loading…
Reference in a new issue