An abbreviation for andP(p,q) is p@q.
If one of the arguments is a string then constParser is used to convert it into a parser.
|
../../../../../Macaulay2/packages/Parsing.m2:120:25-127:84: --source code:
Parser @ Parser := (p,q) -> new Parser from (
c -> (
if c =!= null then (
if (p' := p c) =!= null
then p' @ q
else if (val1 := p null) =!= null then if (q' := q c) =!= null then (val2 -> (val1,val2)) % q'
)
else if (val1 = p null) =!= null and (val2 := q null) =!= null then (val1,val2)
))
The object andP is a function closure.