repo.or.cz
/
lua.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Too many variables in an assignment may cause a C stack overflow. (7)
[lua.git]
/
test
/
table.lua
blob
235089c04b109904926768b6df52b70b86289404
1
-- make table, grouping all data for the same item
2
-- input is 2 columns (item, data)
3
4
local
A
5
while
1
do
6
local
l
=
io
.
read
()
7
if
l
==
nil then break end
8
local
_
,
_
,
a
,
b
=
string
.
find
(
l
,
'"?([_%w]+)"?%s*(.*)$'
)
9
if
a
~=
A
then
A
=
a io
.
write
(
"
\n
"
,
a
,
":"
)
end
10
io
.
write
(
" "
,
b
)
11
end
12
io
.
write
(
"
\n
"
)