Handbook
Glossary
rpn-parse ( string -- tokens )
Vocabulary
rpn
Inputs
string
an
object
Outputs
tokens
an
object
Definition
USING:
combinators
kernel
lists
math.parser
;
IN:
rpn
:
rpn-parse
( string -- tokens )
rpn-tokenize
[
{
{
"+"
[
add-insn
]
}
{
"-"
[
sub-insn
]
}
{
"*"
[
mul-insn
]
}
{
"/"
[
div-insn
]
}
[
string>number
push-insn
boa
]
}
case
]
lmap
;