2
0

table.lua 283 B

123456789101112
  1. -- make table, grouping all data for the same item
  2. -- input is 2 columns (item, data)
  3. local A
  4. while 1 do
  5. local l=io.read()
  6. if l==nil then break end
  7. local _,_,a,b=string.find(l,'"?([_%w]+)"?%s*(.*)$')
  8. if a~=A then A=a io.write("\n",a,":") end
  9. io.write(" ",b)
  10. end
  11. io.write("\n")