【文件属性】:
文件名称:sparse:scalaz-stream 的广义增量解析器组合器
文件大小:26KB
文件格式:ZIP
更新时间:2021-07-03 16:22:05
Scala
疏
这个库提供了完全通用的组合器(任何 CFG!),在之上的完全增量解析。 一个例子:
import scalaz . std . anyVal . _
import scalaz . stream . _
import scalaz . stream . parsers . _
import Parser . _
// returns the depth of parentheses nesting
lazy val parens : Parser [ Char , Int ] = (
'(' ~ > parens < ~ ')' ^^ ( 1 + )
| completed( 0 )
)
Process ( " ((()))()(()) " : _ * ) pipe parse(parens) stripW // => Process(3, 1, 2, 0)
解析算法独立
【文件预览】:
sparse-master
----.travis.yml(69B)
----src()
--------test()
--------main()
----build.sbt(1KB)
----.gitignore(8B)
----project()
--------plugins.sbt(931B)
--------build.properties(19B)
----README.md(15KB)
----LICENSE.txt(11KB)