next | previous | forward | backward | up | top | index | toc | home
Parsing > Parser > optP

optP -- making a parser optional

Synopsis

Description

After the first token, the parser is no slower than p would have been.

i1 : (optP constParser "abc" : charAnalyzer) "abc"

o1 = abc
i2 : (optP constParser "abc" : charAnalyzer) ""

o2 = nil

o2 : Symbol

See also