Skip to content

Commit

Permalink
Make input chainable
Browse files Browse the repository at this point in the history
  • Loading branch information
Pandicon committed Sep 1, 2022
1 parent d353707 commit c5e9958
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ The magic of Brainfuck-like syntax is that it is easy and extremely difficult at
| ^ | Switch active memory (sets the active as inactive and the inactive as active) | `^` | No | Yes |
| $, | Sets the cell to the value of user input as a number (if they input 69, the cell value will be 69) | `$,` | No | Yes |
| , | Sets the cell to the value of user input as a character (if they input E, the cell value will be 69) | `,` | No | Yes |
| $. | Output the cell as a number (if the cell value is 69, 69 will be printed) | `$.` | No | Yes |
| . | Output the cell as a character (if the cell value is 69, E will be printed) | `.` | No | Yes |
| $. | Output the cell as a number (if the cell value is 69, 69 will be printed) | `$.` | Yes | Yes |
| . | Output the cell as a character (if the cell value is 69, E will be printed) | `.` | Yes | Yes |
| [ | Start a while loop | `[` | No | Yes |
| ] | End a while loop | `]` | No | Yes |
| [@ | Start a do-while loop | `[@` | No | Yes |
Expand Down
4 changes: 2 additions & 2 deletions the-golden/src/interpreter/versions/v0-4-0/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ impl Runner {
Regex::new(r"^@?\]").unwrap(), // (do-)while end
Regex::new(r"^\$,").unwrap(), // input number
Regex::new(r"^,").unwrap(), // input character
Regex::new(r"^\$\.").unwrap(), // output number
Regex::new(r"^\.").unwrap(), // output character
Regex::new(r"^(\|-?[0-9]*\|)*\$\.").unwrap(), // output number
Regex::new(r"^(\|-?[0-9]*\|)*\.").unwrap(), // output character
Regex::new(r"^(\|-?[0-9]*\|)*\?=").unwrap(), // break if active memory address is equal to inactive memory address
Regex::new(r"^(\|-?[0-9]*\|)*\?>").unwrap(), // break if active memory address is greater than inactive memory address
Regex::new(r"^(\|-?[0-9]*\|)*\?<").unwrap(), // break if active memory address is less than inactive memory address
Expand Down

0 comments on commit c5e9958

Please sign in to comment.