Macaulay2 » Documentation
Packages » Parsing » Analyzer » nonspaceAnalyzer
next | previous | forward | backward | up | index | toc

# 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

- constParser -- produce a parser that accepts a fixed string, one character at a time
- Parser : Analyzer -- combine a parser with a lexical analyzer to make a complete system

## For the programmer

The object nonspaceAnalyzer is a lexical analyzer.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Parsing.m2:273:0.