Skip to content

Purely functional library to parse and modify conveniently any text/string.

License

Notifications You must be signed in to change notification settings

NarekDW/SParser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

String parser Scala library

Inspired by 'Functional Programming in Scala, Paul Chiusano, Rúnar Bjarnason' book.

Purely functional library to parse and modify conveniently any text.

Quick start

val input = "text45other6some"

val parser =
  lower *> digits(1, 2)
println(parser.run(input)) // "45"

val parser2 =
  lower *> digits(1, 2) *> lower ** digit
println(parser2.run(input)) // "other6"

val parser3 =
  lower *> digits(1, 2) *> lower ** digit *> lower
println(parser3.run(input)) // "some"

About

Purely functional library to parse and modify conveniently any text/string.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages