Skip to content

Commit

Permalink
Make compatible with lua 5.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgiven committed Aug 1, 2022
1 parent 50d3354 commit 5dd6e8c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions h/em_table_lib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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] = {
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion util/ncgg/make_enterkeyw_c.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 5dd6e8c

Please sign in to comment.