Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -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