From 365f5ba645cc67406ec94867bd24bdfa4b59a9f8 Mon Sep 17 00:00:00 2001 From: Marius Date: Thu, 24 May 2012 11:20:14 +0300 Subject: beta 2012.05.24 09:57 --- scripts/context/lua/mtxrun.lua | 16 ++++++++-------- scripts/context/stubs/mswin/mtxrun.lua | 16 ++++++++-------- scripts/context/stubs/unix/mtxrun | 16 ++++++++-------- 3 files changed, 24 insertions(+), 24 deletions(-) (limited to 'scripts') diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua index 326feecd1..eec7f0d4f 100644 --- a/scripts/context/lua/mtxrun.lua +++ b/scripts/context/lua/mtxrun.lua @@ -11004,27 +11004,30 @@ local function f_second(a,b) return concat(t,",") end +-- old {a,b}{c,d} => ac ad bc bd +-- -- local function f_both(a,b) -- local t, n = { }, 0 --- for sb in gmatch(b,"[^,]+") do -- and not sa --- for sa in gmatch(a,"[^,]+") do -- sb +-- for sa in gmatch(a,"[^,]+") do +-- for sb in gmatch(b,"[^,]+") do -- n = n + 1 ; t[n] = sa .. sb -- end -- end -- return concat(t,",") -- end +-- +-- new {a,b}{c,d} => ac bc ad bd local function f_both(a,b) local t, n = { }, 0 - for sa in gmatch(a,"[^,]+") do - for sb in gmatch(b,"[^,]+") do + for sb in gmatch(b,"[^,]+") do -- and not sa + for sa in gmatch(a,"[^,]+") do -- sb n = n + 1 ; t[n] = sa .. sb end end return concat(t,",") end - local left = P("{") local right = P("}") local var = P((1 - S("{}" ))^0) @@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right local stripper_1 = lpeg.stripper ("{}@") local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, } --- old {a,b}{c,d} => ac ad bc bd --- new {a,b}{c,d} => ac bc ad bd - local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise). if trace_expansions then report_expansions("expanding variable '%s'",str) diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua index 326feecd1..eec7f0d4f 100644 --- a/scripts/context/stubs/mswin/mtxrun.lua +++ b/scripts/context/stubs/mswin/mtxrun.lua @@ -11004,27 +11004,30 @@ local function f_second(a,b) return concat(t,",") end +-- old {a,b}{c,d} => ac ad bc bd +-- -- local function f_both(a,b) -- local t, n = { }, 0 --- for sb in gmatch(b,"[^,]+") do -- and not sa --- for sa in gmatch(a,"[^,]+") do -- sb +-- for sa in gmatch(a,"[^,]+") do +-- for sb in gmatch(b,"[^,]+") do -- n = n + 1 ; t[n] = sa .. sb -- end -- end -- return concat(t,",") -- end +-- +-- new {a,b}{c,d} => ac bc ad bd local function f_both(a,b) local t, n = { }, 0 - for sa in gmatch(a,"[^,]+") do - for sb in gmatch(b,"[^,]+") do + for sb in gmatch(b,"[^,]+") do -- and not sa + for sa in gmatch(a,"[^,]+") do -- sb n = n + 1 ; t[n] = sa .. sb end end return concat(t,",") end - local left = P("{") local right = P("}") local var = P((1 - S("{}" ))^0) @@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right local stripper_1 = lpeg.stripper ("{}@") local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, } --- old {a,b}{c,d} => ac ad bc bd --- new {a,b}{c,d} => ac bc ad bd - local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise). if trace_expansions then report_expansions("expanding variable '%s'",str) diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun index 326feecd1..eec7f0d4f 100644 --- a/scripts/context/stubs/unix/mtxrun +++ b/scripts/context/stubs/unix/mtxrun @@ -11004,27 +11004,30 @@ local function f_second(a,b) return concat(t,",") end +-- old {a,b}{c,d} => ac ad bc bd +-- -- local function f_both(a,b) -- local t, n = { }, 0 --- for sb in gmatch(b,"[^,]+") do -- and not sa --- for sa in gmatch(a,"[^,]+") do -- sb +-- for sa in gmatch(a,"[^,]+") do +-- for sb in gmatch(b,"[^,]+") do -- n = n + 1 ; t[n] = sa .. sb -- end -- end -- return concat(t,",") -- end +-- +-- new {a,b}{c,d} => ac bc ad bd local function f_both(a,b) local t, n = { }, 0 - for sa in gmatch(a,"[^,]+") do - for sb in gmatch(b,"[^,]+") do + for sb in gmatch(b,"[^,]+") do -- and not sa + for sa in gmatch(a,"[^,]+") do -- sb n = n + 1 ; t[n] = sa .. sb end end return concat(t,",") end - local left = P("{") local right = P("}") local var = P((1 - S("{}" ))^0) @@ -11039,9 +11042,6 @@ local l_rest = Cs( ( left * var * (left/"") * var * (right/"") * var * right local stripper_1 = lpeg.stripper ("{}@") local replacer_1 = lpeg.replacer { { ",}", ",@}" }, { "{,", "{@," }, } --- old {a,b}{c,d} => ac ad bc bd --- new {a,b}{c,d} => ac bc ad bd - local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpegging it (nice exercise). if trace_expansions then report_expansions("expanding variable '%s'",str) -- cgit v1.2.3