Handbook
Glossary
taf-body ( report str -- report )
Vocabulary
metar
.
private
Inputs
report
an
object
str
an
object
Outputs
report
an
object
Definition
USING:
accessors
ascii
kernel
regexp
sequences
splitting
;
IN:
metar.private
:
taf-body
( report str -- report )
[
blank?
]
split-when
[
"TAF"
=
]
find-one
drop
[
{
"AMD"
"COR"
"RTD"
}
member?
]
find-one
drop
[
re-station
matches?
]
find-one
[
pick
station<<
]
when*
[
re-timestamp
matches?
]
find-one
[
parse-timestamp
pick
timestamp<<
]
when*
[
re-valid-timestamp
matches?
]
find-one
[
parse-valid-timestamp
pick
valid-timestamp<<
]
when*
[
re-wind
matches?
]
find-one
[
parse-wind
pick
wind<<
]
when*
[
re-wind-variable
matches?
]
find-one
[
parse-wind-variable
pick
wind>>
prepend
pick
wind<<
]
when*
[
re-visibility
matches?
]
find-one
[
parse-visibility
pick
visibility<<
]
when*
[
re-rvr
matches?
]
find-all
join-words
[
parse-rvr
]
map
", "
join
pick
rvr<<
[
re-weather
matches?
]
find-all
[
parse-weather
]
map
", "
join
pick
weather<<
[
re-sky-condition
matches?
]
find-all
[
parse-sky-condition
]
map
", "
join
pick
sky-condition<<
drop
;