Hi all,
I’m looking for some help in compiling a Rum program into Ruby source
code for an assignment.
I currently have a Rum/Brainfuck parser, interpreter, and printer – all
using visitor methodologies.
I’m currently in the planning phase and don’t intend on writing any
compiler code until I understand better what I need to do. From what
I’ve come up with so far is that: Rum procedure => () would translate
into a Ruby function like: def der //some_procedure_code_here end
But when it comes to increments, decrements, and all the rest, I get
confused as to how I’ll represent these functions in Ruby code. I don’t
expect anyone to just give me an answer here, but some guidance would be
great
For example, this prints out ‘Hello, World!’ in Rum:
(++++++++++<[>+>+<<-]>>[<<+>>-])>::::::::::::::<<<<<<<--------.>>>---------.+++++++…>---------.<<<<<<<------.<--------.>>>>>—.>>>.+++.<.--------.<<<<<<<+.