packages feed

brainfuck-tut 0.5.1.2 → 0.5.1.3

raw patch · 3 files changed

+66/−1 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

+ README.md view
@@ -0,0 +1,47 @@+# Brainfuck: A Toy Implementation++This project exists to show what a+[Brainfuck](http://en.wikipedia.org/wiki/Brainfuck) evaluator might+look like in Haskell.++The implementation is fairly well documented. I endeavored to make it+readable.++## Terms++Below is the abstract syntax tree for the BF language as implemented:++```haskell+data Term+  = IncDP        -- >+  | DecDP        -- <+  | IncByte      -- ++  | DecByte      -- -+  | OutByte      -- .+  | InByte       -- ,+  | JumpForward  -- [+  | JumpBackward -- ]+  deriving (Show, Eq)+```++## Evaluation Semantics++I followed the summary given on the wikipedia page closely. A few+particulars to this implementation:++* "Jump not found" errors abort evaluation and return the state of the tape+* Out of bound errors are not detected+* Evaluation proceeds until the instruction stream runs out++## Executable++An executable is provided:++```+$ cabal build bfh+$ cabal run bfh+usage: bfh <size> <program>+$ cabal run bfh 10 ',.'+a<enter>+a+```
brainfuck-tut.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                brainfuck-tut-version:             0.5.1.2+version:             0.5.1.3 synopsis:            A simple BF interpreter. license:             BSD3 license-file:        LICENSE@@ -14,6 +14,9 @@ category:            Language build-type:          Simple cabal-version:       >=1.18+extra-source-files:+  README.md+  changelog.md  source-repository head     type: git
+ changelog.md view
@@ -0,0 +1,15 @@+0.5.1.3++* Add changelog++0.5.1.2++* Add homepage, issue tracker, project repo++0.5.1.1++* Fix documentation formatting issues++0.5.1.0++* Initial release