gdritter repos s-cargot / ee1800b
Beginning implementation of Rivest flavor; beginnings of Tutorial module Getty Ritter 9 years ago
2 changed file(s) with 65 addition(s) and 0 deletion(s). Collapse all Expand all
1 module Data.SExpression.Rivest where
2
3 import Data.ByteString (ByteString)
4 import qualified Data.ByteString as BS
5 import qualified Data.ByteString.Base64 as B64
6 import Data.Text (Text)
7 import qualified Data.Text as T
8
9 newtype Atom = Atom { fromAtom :: ByteString } deriving (Eq, Show, Read)
10
11 pToken :: Parser ByteString
12 pToken = undefined
13
14 pQuoted :: Maybe Int -> Parser ByteString
15 pQuoted = do
16 char '"'
17 ss <- many1 quoteChar
18 char '"'
19 return ss
20
21 pHex :: Parser ByteString
22 pHex = undefined
23
24 pVerbatim :: Int -> Parser ByteString
25 pVerbatim = do
26 char ':'
27 take n
28
29 pBase64Verbatim :: Parser ByteString
30 pBase64 :: Parser ByteString
1 {-| The @blah@ library attempts to be as general as possible, and to
2 support a wide range of use-cases for s-expressions. It is built
3 around a core of primitives which are then exposed in various
4 ways, and can be easily and flexibly extended. This tutorial
5 describes particular use-cases, and then shows how to adapt this
6 library to that use-case.
7 -}
8
9 module Data.SExpression.Tutorial
10 ( -- * Basic Usage and Organization
11 -- $usage
12 -- * Analyzing Scheme code
13 -- $scheme
14 -- * Building a Custom Config Format
15 -- $config
16 -- * Building a Custom Lisp
17 -- $lisp
18 ) where
19
20 {- $usage
21
22 -}
23
24 {- $scheme
25
26 -}
27
28
29 {- $config
30
31 -}
32
33 {- $lisp
34
35 -}