s
is a generalized parser combinator extremely easy to use. The letter s
symbolizes simplicity.
This project is heavily inspired by Parsec
, but has a completely different goal.
s
focuses more on the essentials so that it helps usability and extensibility.
# not uploaded to the hackage yet
$ git clone https://github.com/thyeem/s.git
$ stack build
# doctest
$ stack test
# generate/open doc
$ stack haddock --open s
See sLISP
, which is a pure-functional LISP
implementation in Haskell
.
s
is used in the parsing part of S-expression in sLISP
.
See src/Text/S/Example/CSV.hs
See src/Text/S/Example/JSON.hs
See src/Text/S/Example/Calc.hs
>>> import Text.S.Example.Calc (calc)
>>> calc
Choose an Expr Calculators [infixl, infixr, prefix, postfix]: