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

charAnalyzer -- a lexical analyzer that provides characters from a string one at a time

Description

i1 : a = charAnalyzer "abc"

o1 = a

o1 : FunctionClosure
i2 : peek a()

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

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

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

o5 = null
i6 : (constParser "abc" : charAnalyzer) "abc"

o6 = abc

See also

For the programmer

The object charAnalyzer is a lexical analyzer.