katana.units.esoteric.malbolge
— Malbolge¶
Unit to run code in the Malbolge esoteric language.
This code is shamelessly stolen from https://github.com/kmyk/malbolge-interpreter. We do not claim to know everything that it does… it is Malbolge, after all.
-
class
katana.units.esoteric.malbolge.
Unit
(manager: katana.manager.Manager, target: katana.target.Target) Bases:
katana.unit.NotEnglishUnit
-
GROUPS
= ['esoteric', 'malbolge'] These are “tags” for a unit. Considering it is a Esoteric unit, “esoteric” is included, as well as the unit name “malbolge”.
-
PRIORITY
= 10 Priority works with 0 being the highest priority, and 100 being the lowest priority. 50 is the default priorty. This unit has a high priority.
-
evaluate
(case: Any) Evaluate the target. Run the target as Malbolge code and return the standard output to Katana.
Parameters: case – A case returned by enumerate
. For this unit, theenumerate
function is not used.Returns: None. This function should not return any data.
-
-
katana.units.esoteric.malbolge.
crypt1
(i, m) This function is used as part of Malbolge’s operations.
-
katana.units.esoteric.malbolge.
crypt2
(m) This function is used as part of Malbolge’s operations.
-
katana.units.esoteric.malbolge.
crz
(xs, ys) This function is used as part of Malbolge’s operations.
-
katana.units.esoteric.malbolge.
decrypt1
(i, c) This function is used as part of Malbolge’s operations.
-
katana.units.esoteric.malbolge.
execute
(code, inf=<_io.BufferedReader name='<stdin>'>, allow_not_isprint=False, debug=False) This function is execute Malbolge code.
-
katana.units.esoteric.malbolge.
execute_step
(a, c, d, mem, inf=<_io.BufferedReader name='<stdin>'>, outf=<_io.BufferedWriter name='<stdout>'>) This function is used as part of Malbolge’s operations.
-
katana.units.esoteric.malbolge.
initial_memory
(code, allow_not_isprint=False) This function is used as part of Malbolge’s operations.
-
katana.units.esoteric.malbolge.
isword
(x) This function is used as part of Malbolge’s operations.
-
katana.units.esoteric.malbolge.
rotr
(x) This function is used as part of Malbolge’s operations.
-
katana.units.esoteric.malbolge.
tri
(x) This function is used as part of Malbolge’s operations.
-
katana.units.esoteric.malbolge.
unword
(x) This function is used as part of Malbolge’s operations.
-
katana.units.esoteric.malbolge.
word
(ys) This function is used as part of Malbolge’s operations.