Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,30 @@
|
|||
procedure main(A)
|
||||
ws := ' \t'
|
||||
vars := table()
|
||||
every line := !&input do {
|
||||
line ? {
|
||||
tab(many(ws))
|
||||
if any('#;') | pos(0) then next
|
||||
vars[map(tab(upto(ws)\1|0))] := getValue()
|
||||
}
|
||||
}
|
||||
show(vars)
|
||||
end
|
||||
|
||||
procedure getValue()
|
||||
ws := ' \t'
|
||||
a := []
|
||||
while not pos(0) do {
|
||||
tab(many(ws))
|
||||
put(a, trim(tab(upto(',')|0)))
|
||||
move(1)
|
||||
}
|
||||
return a
|
||||
end
|
||||
|
||||
procedure show(t)
|
||||
every pair := !sort(t) do {
|
||||
every (s := pair[1]||" = ") ||:= !pair[2] || ", "
|
||||
write(s[1:-2])
|
||||
}
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue