开发者

Parser combinators info

开发者 https://www.devze.com 2022-12-27 06:21 出处:网络
I am using parsing combinators in scala If I have recursive parser: val uninterestingthing开发者_高级运维s = \".\".r

I am using parsing combinators in scala If I have recursive parser:

val uninterestingthing开发者_高级运维s = ".".r

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

How can I check how many characters of input my parser consumed?


There is a positioned combinator that (to quote its documentation) "decorates a parser's result with the start position of the input it consumed."

0

精彩评论

暂无评论...
验证码 换一张
取 消