| Copyright | (c) Sebastian Galkin, 2014 |
|---|---|
| License | MIT |
| Maintainer | paraseba@gmail.com |
| Stability | experimental |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
| Extensions | TupleSections |
HaskBF.Parser
Description
- type Program = [Op]
- data Op
- parseProgram :: ByteString -> Either ParseError Program
- module Text.Parsec.Error
Documentation
Brainfuck operations
Constructors
| IncP | Increment the byte pointer: |
| DecP | Decrement the byte pointer: |
| Inc | Increment the byte pointed by the pointer: |
| Dec | Decrement the byte pointed by the pointer: |
| PutByte | Write the byte pointed by the pointer (side-effect): |
| GetByte | Read a byte, write at the current location
(side-effect): |
| Loop [Op] | Loop over |
parseProgram :: ByteString -> Either ParseError Program Source
Parse program stream. Returns an error or the parsed Program
module Text.Parsec.Error