next | previous | forward | backward | up | top | index | toc | home
Parsing > Parser > ZZParser

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

See also

Code

-- ../../../../Macaulay2/packages/Parsing.m2:88
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
| ------   -----               ----- ------------------                                   
| fun    : CompiledFunction -- times ../../../../Macaulay2/packages/Parsing.m2:88:22-88:22
| p      : Parser           -- ...   ../../../../Macaulay2/packages/Parsing.m2:88:26-88:26