diff options
author | Hans Hagen <pragma@wxs.nl> | 2011-09-14 12:21:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2011-09-14 12:21:00 +0200 |
commit | e6e373fe2dfcbf28514a4361d19d2cf503e54230 (patch) | |
tree | adcfeae92c85c64de5cf93a0e02ea12ae690bb96 /scripts | |
parent | 4cfc854a468fdfb00073bfad6067174da6b80b0d (diff) | |
download | context-e6e373fe2dfcbf28514a4361d19d2cf503e54230.tar.gz |
beta 2011.09.14 12:21
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/context/lua/mtxrun.lua | 23 | ||||
-rw-r--r-- | scripts/context/stubs/mswin/mtxrun.lua | 23 | ||||
-rwxr-xr-x | scripts/context/stubs/unix/mtxrun | 23 |
3 files changed, 69 insertions, 0 deletions
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua index 91491c3d6..7061c54d5 100644 --- a/scripts/context/lua/mtxrun.lua +++ b/scripts/context/lua/mtxrun.lua @@ -1670,6 +1670,29 @@ function lpeg.append(list,pp,delayed) return p end +-- function lpeg.exact_match(words,case_insensitive) +-- local pattern = concat(words) +-- if case_insensitive then +-- local pattern = S(upper(characters)) + S(lower(characters)) +-- local list = { } +-- for i=1,#words do +-- list[lower(words[i])] = true +-- end +-- return Cmt(pattern^1, function(_,i,s) +-- return list[lower(s)] and i +-- end) +-- else +-- local pattern = S(concat(words)) +-- local list = { } +-- for i=1,#words do +-- list[words[i]] = true +-- end +-- return Cmt(pattern^1, function(_,i,s) +-- return list[s] and i +-- end) +-- end +-- end + end -- of closure diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua index 91491c3d6..7061c54d5 100644 --- a/scripts/context/stubs/mswin/mtxrun.lua +++ b/scripts/context/stubs/mswin/mtxrun.lua @@ -1670,6 +1670,29 @@ function lpeg.append(list,pp,delayed) return p end +-- function lpeg.exact_match(words,case_insensitive) +-- local pattern = concat(words) +-- if case_insensitive then +-- local pattern = S(upper(characters)) + S(lower(characters)) +-- local list = { } +-- for i=1,#words do +-- list[lower(words[i])] = true +-- end +-- return Cmt(pattern^1, function(_,i,s) +-- return list[lower(s)] and i +-- end) +-- else +-- local pattern = S(concat(words)) +-- local list = { } +-- for i=1,#words do +-- list[words[i]] = true +-- end +-- return Cmt(pattern^1, function(_,i,s) +-- return list[s] and i +-- end) +-- end +-- end + end -- of closure diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun index 91491c3d6..7061c54d5 100755 --- a/scripts/context/stubs/unix/mtxrun +++ b/scripts/context/stubs/unix/mtxrun @@ -1670,6 +1670,29 @@ function lpeg.append(list,pp,delayed) return p end +-- function lpeg.exact_match(words,case_insensitive) +-- local pattern = concat(words) +-- if case_insensitive then +-- local pattern = S(upper(characters)) + S(lower(characters)) +-- local list = { } +-- for i=1,#words do +-- list[lower(words[i])] = true +-- end +-- return Cmt(pattern^1, function(_,i,s) +-- return list[lower(s)] and i +-- end) +-- else +-- local pattern = S(concat(words)) +-- local list = { } +-- for i=1,#words do +-- list[words[i]] = true +-- end +-- return Cmt(pattern^1, function(_,i,s) +-- return list[s] and i +-- end) +-- end +-- end + end -- of closure |