added :s to the help text and fixed copy-pasting error
This commit is contained in:
parent
68326a19a1
commit
482152c303
1 changed files with 3 additions and 2 deletions
|
|
@ -21,6 +21,7 @@ repl interpreter = do
|
|||
putStrLn " :h = this text"
|
||||
putStrLn " :q = quit"
|
||||
putStrLn " :d = print the state of the array around the index"
|
||||
putStrLn " :s = print a table of all symbols and their functionality"
|
||||
repl interpreter
|
||||
":q" -> return ()
|
||||
":d" ->
|
||||
|
|
@ -51,11 +52,11 @@ repl interpreter = do
|
|||
>> putStrLn "|--------+-------------------------------------------------------------------------------------------------------|"
|
||||
>> putStrLn "| . | Output the byte at the data pointer. |"
|
||||
>> putStrLn "|--------+-------------------------------------------------------------------------------------------------------|"
|
||||
>> putStrLn "| , | Accept one byte of input, storing its value in the byte at the data pointer.[b] |"
|
||||
>> putStrLn "| , | Accept one byte of input, storing its value in the byte at the data pointer. |"
|
||||
>> putStrLn "|--------+-------------------------------------------------------------------------------------------------------|"
|
||||
>> putStrLn "| [ | If the byte at the data pointer is zero, jump forward to the command after the matching ] command. |"
|
||||
>> putStrLn "|--------+-------------------------------------------------------------------------------------------------------|"
|
||||
>> putStrLn "| ] | If the byte at the data pointer is nonzero, jump back to the command after the matching [ command.[c] |"
|
||||
>> putStrLn "| ] | If the byte at the data pointer is nonzero, jump back to the command after the matching [ command. |"
|
||||
>> putStrLn "|--------+-------------------------------------------------------------------------------------------------------|"
|
||||
>> repl interpreter
|
||||
brainfuck -> interpreter `execStr` brainfuck >>= repl
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue