The return value is either 1 or -1, depending on the indicated sign.
i1 : (optionalSignParser @ constParser "abc" : charAnalyzer) "abc" o1 = (1, abc) o1 : Sequence |
i2 : (optionalSignParser @ constParser "abc" : charAnalyzer) "+abc" o2 = (1, abc) o2 : Sequence |
i3 : (optionalSignParser @ constParser "abc" : charAnalyzer) "-abc" o3 = (-1, abc) o3 : Sequence |
-- ../../../../Macaulay2/packages/Parsing.m2:152 optionalSignParser = Parser(c -> if c === null then 1 else if c === "-" then terminalParser(-1) else if c === "+" then terminalParser 1)