Macaulay2 » Documentation
Packages » Parsing » Parser » nullParser
next | previous | forward | backward | up | index | toc

# nullParser -- a terminal parser that returns the value nil

## Code

    ../Parsing.m2:59:41-59:68: --source code:
    terminalParser = val -> new Parser from (c -> if c === null then val)
    | symbol  class   value  location of symbol
    | ------  -----   -----  ------------------
    | val     Symbol  nil    ../Parsing.m2:59:17-59:20

## See also

- nil -- a symbol a parser may return to indicate acceptance of the empty string of tokens

## For the programmer

The object nullParser is a parser.

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