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

ZZParser -- a parser that accepts (and returns) an integer, one character at a time

Description

i1 : (ZZParser : charAnalyzer) "123456789"

o1 = 123456789
i2 : (ZZParser : charAnalyzer) "-123456789"

o2 = -123456789
i3 : class oo

o3 = ZZ

o3 : Ring

Code

../../../../Macaulay2/packages/Parsing.m2:94:50-94:123: --source code:
Function % Parser := (fun,p) -> new Parser from ( c -> if (p' := p c) =!= null then if c === null then fun p' else fun % p' )
| symbol  class             value                                                    location of symbol
| ------  -----             -----                                                    ------------------                                   
| p       Parser            Parser[../../../../Macaulay2/packages/Parsing.m2:121:5.  ../../../../Macaulay2/packages/Parsing.m2:94:26-94:27
| fun     CompiledFunction  times                                                    ../../../../Macaulay2/packages/Parsing.m2:94:22-94:25

See also

For the programmer

The object ZZParser is a parser.


The source of this document is in Parsing.m2:478:0.