equal
deleted
inserted
replaced
93 // memory at the current location to 0. In the compute3 and run3 functions |
93 // memory at the current location to 0. In the compute3 and run3 functions |
94 // below you implement this command by writing the number 0 to mem(mp), |
94 // below you implement this command by writing the number 0 to mem(mp), |
95 // that is write(mem, mp, 0). |
95 // that is write(mem, mp, 0). |
96 // |
96 // |
97 // The easiest way to modify a string in this way is to use the regular |
97 // The easiest way to modify a string in this way is to use the regular |
98 // expression """[^<>+-.,\[\]]""", which recognises everything that is |
98 // expression """[^<>+-,\[\]@#*]""", which recognises everything that is |
99 // not a bf-command and replace it by the empty string. Similarly the |
99 // not a bf-command and replace it by the empty string. Similarly the |
100 // regular expression """\[-\]""" finds all occurrences of [-] and |
100 // regular expression """\[-\]""" finds all occurrences of [-] and |
101 // by using the Scala method .replaceAll you can replace it with the |
101 // by using the Scala method .replaceAll you can replace it with the |
102 // string "0" standing for the new bf-command. |
102 // string "0" standing for the new bf-command. |
103 |
103 |