About Parser Combinators

I am using parsing compilers in scala If I have a recursive parser:

val uninterestingthings = ".".r

val parser = "(?ui)(regexvalue)".r | (uninterestingthings~>parser)

      

How can I check how many consumed character multipliers of my parser are?

+2


a source to share


1 answer


There is a combinator positioned

that (to cite its documentation) "decorates the result of a parser with the original position of the input it consumes."



+1


a source







All Articles