next | previous | forward | backward | up | top | index | toc | Macaulay2 website
Parsing > Analyzer > nonspaceAnalyzer

nonspaceAnalyzer -- a lexical analyzer that provides non-white-space characters from a string one at a time

Description

i1 : a = nonspaceAnalyzer " a b c "

o1 = a

o1 : FunctionClosure
i2 : peek a()

o2 = (1, "a")
i3 : peek a()

o3 = (3, "b")
i4 : peek a()

o4 = (5, "c")
i5 : peek a()

o5 = null
i6 : (constParser "abc" : nonspaceAnalyzer) " a b c "

o6 = abc

See also

For the programmer

The object nonspaceAnalyzer is a lexical analyzer.