diff options
author | Alexey Zaytsev <alexey.zaytsev@gmail.com> | 2008-07-18 00:47:28 +0400 |
---|---|---|
committer | Alexey Zaytsev <zaytsev.a@protei.ru> | 2008-07-18 00:47:28 +0400 |
commit | 5589a6e296427110474e74fbbd3ef9c512fe0ff4 (patch) | |
tree | 388c521c3b6262ccda9385fa29f36df7a4851e6d /com32/lua/test/table.lua | |
parent | fa6a60e177786fea2b834691a66319fd3b177038 (diff) | |
download | syslinux-5589a6e296427110474e74fbbd3ef9c512fe0ff4.tar.gz |
Import Lua 5.1.3
Signed-off-by: Alexey Zaytsev <zaytsev.a@protei.ru>
Diffstat (limited to 'com32/lua/test/table.lua')
-rw-r--r-- | com32/lua/test/table.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/com32/lua/test/table.lua b/com32/lua/test/table.lua new file mode 100644 index 00000000..235089c0 --- /dev/null +++ b/com32/lua/test/table.lua @@ -0,0 +1,12 @@ +-- make table, grouping all data for the same item +-- input is 2 columns (item, data) + +local A +while 1 do + local l=io.read() + if l==nil then break end + local _,_,a,b=string.find(l,'"?([_%w]+)"?%s*(.*)$') + if a~=A then A=a io.write("\n",a,":") end + io.write(" ",b) +end +io.write("\n") |