Handbook
Glossary
read-token ( -- token/f )
Vocabulary
pbrt
.
private
Inputs
None
Outputs
token/f
an
object
Definition
USING:
ascii
combinators
kernel
math.parser
pbrt
;
IN:
pbrt.private
:
read-token
( -- token/f )
skip-ws
pbrt-read1
{
{
[
dup
not
]
[
]
}
{
[
dup
34
=
]
[
drop
read-quoted-string
]
}
{
[
dup
91
=
]
[
drop
open-bracket
]
}
{
[
dup
93
=
]
[
drop
close-bracket
]
}
{
[
dup
digit-or-sign?
]
[
read-number-string
string>number
]
}
{
[
dup
Letter?
]
[
read-bare-word
]
}
[
"Unexpected character"
pbrt-parse-error
]
}
cond
;