Add new examples, update Readme

This commit is contained in:
Aaron
2020-01-06 13:53:28 +01:00
parent 42414e5f25
commit 2c6955bf77
3 changed files with 8 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
# bfckr [![Build Status](https://travis-ci.org/id101010/bfckr.svg?branch=master)](https://travis-ci.org/id101010/bfckr)
A little brainfuck interpreter written in C.
A simple to use brainfuck interpreter with built in debugger written in C.
# How to run
* Type "make"
@@ -13,11 +13,9 @@ Usage: ./bfckr [OPTION]
-h Show this help.
-d Enable debugger.
-f Execute brainfuck code given as file.
-e Execute brainfuck code given as argument.
-e Execute brainfuck expression given as argument.
~~~~
## examples:
**./bfckr -f examples/pi.bf**

1
examples/bintodec.bf Normal file
View File

@@ -0,0 +1 @@
++++++[>++++++++<-]>[>+++[>++++[>+++++<-]<-],.[>+>-<<-]>>+[[-]<[<+>-]>]<[-]<]<[<]->[-]>[>]>>+>+<<<<[<]>[[>]->>[>]+[[>+<-]<]>>[[[>]>[>]>+<<[<]<[<]>-]<+>>[>]>[>]+>-[<+[<]<[<]<+>>[>]>[>]<-]<[<]<[<]>]>[[<+>-]>]+<+[<]<[[>>[>]<+[<]<-]>>[>]<-[>+<-]<[<]<<[[>+<-]<]>>[>]<]>>[>]>[[<+>-]>]<<[-[-[-[>+<-]<+>>-<]>+<]>+<<]>>-[+<]+<<+[<+]>->>->[>]>[-[<<[<]<+>>[>]>-]<+[<]+>->[>]>]<<[-<]<-<[<]<<[<]++++++[>--------<-]>[[>]>+<<[<]>-]>[>]>[<+>-]<[>>[>]>>+<<<[>>[>]>[<<[<]<--[+>+[>]>>-<<<[<]]>+[<+>-]>[>]>->+<]>[<+>-]<<<[<]<[>+<-]<]>>-[+[>]<[[>+<-]<]>]+[[<+>-]>]<<[<]<-]<[<]>]>>[>]++[<]>--[>--]++<++<[+<[<]>[+>]]<+[<+]>>->[>]>[-[<<[<]<+>>[>]>-]<+[<]+>->[>]>]<<[-<]<-<--<[<]>>[<<+>>-]+<<[-[>>+<<-]]>[>]>++++++[<++++++++>-]<-[<[+<]>[>]<-]<[<]>>[.>]

5
examples/tree.bf Normal file
View File

@@ -0,0 +1,5 @@
>++++[<++++++++>-]>++++++[<++++++++>-]<->>++++++++
[<++++++++++++>-]<---->++++++++++>++++++++++[>+>+<
<-]>>[<<+>>-]<[[>+>+<<-]>>[<<+>>-]<[<<<<<<.>>>>>>-
]<[>+>+<<-]>>[<<+>>-]<<<[>>>+>+<<<<-]>>>>[<<<<+>>>
>-]<<[>-<-]>+[<<<<<<.>.>>>>>-]<<<.>-]