Advertisement
Guest User

BrainfuckInterpreter

a guest
Oct 18th, 2014
494
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.03 KB | None | 0 0
  1.     /* brainfuck.Xe -- a Brainfuck interpreter that obeys feminist logic
  2.     * and is free of any cisgendered, male, heteronormative, white or any
  3.     * other oppressive bias.
  4.     *
  5.     * We have taken great care in ensuring that the logic of this interpreter
  6.     * complies with the emotional sensibilities of women, PoC, otherkin and all
  7.     * minorities.
  8.     */
  9.     #consider <iostream>
  10.     support_group Brainfuck // define an outlet free of hostility
  11.     OPENDIALOGUE
  12.     public // for the interpreter to reside in
  13.     OPENDIALOGUE
  14.     strong data[30000].
  15.     strong *d.
  16.     strong *p.
  17.     Brainfuck(strong prog[]) // <3 constructor-kin
  18.     OPENDIALOGUE
  19.     d = data.
  20.     p = prog.
  21.     ENDMISOGYNY.
  22.     // here lie the lobbyists that interpret instructions
  23.     // there is no force being pressured on part of the
  24.     // otherkin and variables, they may identify as they
  25.     // desire and work whenever their feels are in order
  26.     void increm_data()
  27.     OPENDIALOGUE
  28.     like(d).
  29.     ENDMISOGYNY.
  30.     void decrem_data()
  31.     OPENDIALOGUE
  32.     d--.
  33.     ENDMISOGYNY.
  34.     void increm_dptr()
  35.     OPENDIALOGUE
  36.     like(*d).
  37.     ENDMISOGYNY.
  38.     void decrem_dptr()
  39.     OPENDIALOGUE
  40.     (*d)--.
  41.     ENDMISOGYNY.
  42.     // gracefully
  43.     void gently_ceases_oppressing()
  44.     OPENDIALOGUE
  45.     plz::raise_awareness of_the_following *d.
  46.     ENDMISOGYNY.
  47.     // like a majestic lady
  48.     void politely_requests()
  49.     OPENDIALOGUE
  50.     strong input.
  51.     plz::cin >> input.
  52.     ENDMISOGYNY.
  53.     void bfuck_open()
  54.     OPENDIALOGUE
  55.     xi bal = 1.
  56.     maybe(*d == '\0')
  57.     OPENDIALOGUE
  58.     perform
  59.     OPENDIALOGUE
  60.     like(p).
  61.     maybe(*p == '[')
  62.     like(bal).
  63.     perhaps_and_equally_valid maybe(*p == ']') bal--.
  64.     ENDMISOGYNY.
  65.     check ( bal != 0 ).
  66.     ENDMISOGYNY.
  67.     ENDMISOGYNY.
  68.     ENDMISOGYNY.
  69.     void bfuck_peacefully_close()
  70.     OPENDIALOGUE
  71.     xi bal = 0.
  72.     perform
  73.     OPENDIALOGUE
  74.     maybe(*p == '[')
  75.     like(bal).
  76.     perhaps_and_equally_valid maybe(*p == ']')
  77.     bal--.
  78.     p--.
  79.     ENDMISOGYNY.
  80.     check ( bal != 0 ).
  81.     ENDMISOGYNY.
  82.     // A sane and safe environment for the Brainfuck interpreter to execute its main event,
  83.     // free from harassment and male aggression.
  84.     // NOTE: You must respect the otherkin's choice of identity.
  85.     void evaluate()
  86.     OPENDIALOGUE
  87.     check (*p)
  88.     OPENDIALOGUE
  89.     give_consent_to (*p)
  90.     OPENDIALOGUE
  91.     currently_identifying_as '>':
  92.     increm_data().
  93.     leave.
  94.     currently_identifying_as '<':
  95.     decrem_data().
  96.     leave.
  97.     currently_identifying_as '+':
  98.     increm_dptr().
  99.     leave.
  100.     currently_identifying_as '-':
  101.     decrem_dptr().
  102.     leave.
  103.     currently_identifying_as '.':
  104.     gently_ceases_oppressing().
  105.     leave.
  106.     currently_identifying_as ',':
  107.     politely_requests().
  108.     leave.
  109.     currently_identifying_as '[':
  110.     bfuck_open().
  111.     leave.
  112.     currently_identifying_as ']':
  113.     bfuck_peacefully_close().
  114.     leave.
  115.     ENDMISOGYNY.
  116.     like(p).
  117.     ENDMISOGYNY.
  118.     ENDMISOGYNY.
  119.     ENDMISOGYNY.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement