Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [interpreter]

An interpreter is a computer program which directly executes instructions written in a programming language.

7
votes
1answer
98 views

Peter Norvigs' lis.py in c++17

I wanted to try convert Peter Norvigs' Python Scheme interpreter to C++. I had tried this a few years before and failed abysmally but I saw that the latest C++ standard includes several features ...
4
votes
1answer
49 views

Main loop in assembly for a Brainfuck interpreter

I have written 2 Brainfuck interpreters, one in C++, then another in C++ with Assembly inner loop. My interpreter code can be found here (C++/ASM, requires MSVC and MASM) and here (C++). Both are ...
3
votes
1answer
59 views

Simple interpreter written in Rust

I'd like to improve how ownership is handled within a simple interpreter written in Rust. The interpreter takes simple calculator like expressions and returns either a string of the AST or a number ...
5
votes
0answers
145 views

A simple brainf*** interpreter in Haskell

I am very new to Haskell and come from languages like C++, although I do have some experience with Scheme. Here, I wrote a simple brainf*** interpreter, which so far is my largest project. I followed ...
5
votes
1answer
53 views

Interactive complete Brainfuck Interpreter

This is another Brainfuck interpreter in Python. I personaly think this is better than most of the other once you find online, because it keeps a bracket_map, which ...
6
votes
1answer
66 views

TinCan (Esolang) Interpreter in Haskell

Haskell newbie here. Wanted to improve my skills by re-implementing an esolang I designed back in 2011 called TinCan. If there are things that are perhaps badly coded or unclear things due to my ...
8
votes
2answers
131 views

Starting point for a collaboratively developed golfing language interpreted in Python

Over on Code Golf, we've decided, for once, to write some readable code! However, we're obviously not very good at that, so we need your help to make it even better. I've proposed this challenge on ...
3
votes
1answer
78 views

AST-based Brainfuck interpreter in Haskell

Since implementing my Interactive Brainfuck interpreter in Haskell I figured that it would be a good idea to build upon an Abstract Syntax Tree. I have also decided to drop replacing the ...
15
votes
2answers
136 views

Interactive Brainfuck interpreter in Haskell

Last week I started learning Haskell, and since I have some experience with Brainfuck already, I decided it would be a great idea to implement an interactive Brainfuck interpreter in Haskell. I'll ...
3
votes
1answer
136 views

Virtual Machine in C to run C

Basically ANOTHER follow up to this review here but I've set about in completing the software project. Changes from the previous review is that I've added a complete script format with embedding API, ...
1
vote
0answers
62 views

Brain-flak interpreter

I'm learning Go, so I decided to make a Brain-flak interpreter for practice. ...
5
votes
1answer
130 views

Brainfuck interpreter in F# (by a C# developer)

I'm a C# developer learning F#. I have a lot of questions about practices and principles within the code. I would like to know what a "native" F# developer would've done differently. ...
7
votes
1answer
258 views

Befunge-93 interpreter in Python

I was doing some CodeFights and had alot of fun with this Befunge challange Problem statement While exploring the ruins of a golden lost city, you discovered an ancient manuscript containing ...
5
votes
1answer
161 views

Axiomatic Lisp interpreter in C

This is not obfuscated. Or at least, that's not the intent. Let me try to address that concern straightaway. The goal here is brevity in the vein of Strunk&White. Nor is this codegolf, although ...
1
vote
1answer
60 views

Performs calculation with operators given in an unknown order

Problem Statement Write a simple interpreter which understands "+", "-", and "*" operations. Apply the operations with the correct order of operations (i.e. ...
2
votes
1answer
94 views

Haskell Brainf*ck interpreter: runtime error handling

I have designed a Brainf*ck interpreter in Haskell. I would appreciate the code review, especially any tips related to error handling (e.g. parsing errors, runtime errors, etc.). ...
5
votes
2answers
696 views

Writing an interpreter for a toy language in Java

I am working on a project that involves me writing an interpreter for a small toy language in Java, and while I intend to build it into a fully featured programming language at some point, it is ...
2
votes
1answer
232 views

Lisp Interpreter written in JavaScript

I had a task to reduce my Lisp Interpreter from 400 lines to 120 lines. I was able to bring it down to 255 lines without including newline after every function. I'm not able to figure out where I can ...
7
votes
3answers
318 views

Reverse Polish Notation shell interpreter with one variable in C

I wrote an RPN shell stack-based interpreter. It supports following operators: +, -, *, <...
12
votes
2answers
943 views

Repetitive unit tests for a programming language

I've got a recreational regex-based programming language called Retina. Before the next big refactoring of the interpreter, I want to rework how I test the code. The interpreter class works such that ...
6
votes
1answer
99 views

Brain Flak implementation in Haskell

I'm a beginner to Haskell and functional programming as a whole and as a first project I've written a Brain-Flak implementation in Haskell. I wanted to get some feedback on this implementation ...
6
votes
1answer
98 views

Yet another BrainF*** Interpretter in Haskell

I wrote a BrainF*** interpretter in Haskell. A general review would be helpful and especially, a suggestion with a better way to deal with the IO (IO Memory, IO ()) ...
3
votes
1answer
82 views

Python Brainf*ck interpreter

What do you think of my Brainf*ck interpreter? What else can be done to increase speed? ...
3
votes
1answer
115 views

Bytecode Interpreter for a custom programming language

Over the past week, I've been working on a project that works as an interpreter of sorts for bytecodes in a custom language that would run in a "live" environment. It works, in a sense (I don't have a ...
5
votes
0answers
77 views

Clojure BrainF*** Interpreter

Since I want to try writing my own language at some point, I wanted to have some experience writing an interpreter. BrainFuck is the simplest language I (kind of) know, so I decided to try writing an ...
3
votes
1answer
79 views

What's so bad about HODOR?

I am writing a recreational language based off the speech pattern of Hodor from Game of Thrones. Basically the only commands are Hodor. You can find the complete ...
5
votes
0answers
82 views

brainF*** interperter in lua

For a personal project I may need to load and execute something that will basically be a very simple programming language. Though I am not at all close to this part of the project yet and I can most ...
3
votes
1answer
127 views

Brainfuck interpreter using interpreter and composite patterns

I wrote this brainfuck interpreter in C++ using interpreter and composite patterns. I would like to make this code more scalable. Indeed, if we need to add a extra command, we'll have to add a new ...
4
votes
1answer
79 views

Brainf**k interpreter in Ruby

I wrote this interpreter for a code challenge. Can this be written any cleaner/smaller? Could I reduce the amount of nested conditional/loops? ...
3
votes
1answer
106 views

YABI: Yet Another Brainfuck Interpreter written in C

Syntax is ./bf-interpreter <program.bf>. ...
67
votes
2answers
7k views

Brainfuck Interpreter written in x86 Assembly

Story time: A week ago I found a question about optimizing Assembly code, then I remembered how awesome Brainfuck was, and the match was made very quickly. I decided to write a Brainfuck Interpreter ...
6
votes
1answer
375 views

Object-oriented Brainfuck interpreter

Inspired by this question, I decided to give it a try and implemented a brainfuck interpreter myself. It includes various improvements: It's object-oriented and modular Unlimited tape size It ...
4
votes
2answers
503 views

BF interpreter written in C#

I have recently written a Brainfuck interpreter in C#. I tested it with the examples given on EsoLang website. It does not handle errors right now. Questions: Even that it can run only one program ...
3
votes
0answers
51 views

Interpreter in Java for S.I.L.O.S., a custom language

I designed and implemented a custom language. After @LeakyNun refactored it to improve speed, it looks like this. I personally like it right now, but is there any more hyperoptimizations for both ...
6
votes
1answer
117 views

Self-modifying esoteric language interpreter in Ruby

I recently created Copy, an esoteric language, and wrote an implementation in Ruby. The language has only 7 instructions: copy <a> <b> <c> Copy ...
7
votes
1answer
125 views

Ruby Brainfuck interpreter

I recently wrote a simple Brainfuck interpreter in Ruby: ...
6
votes
1answer
141 views

Encoding data into integer handles for language interpreter

As an integral part (pun intended) of my APL interpreter (previous questions: 1 2 3 4), this suite of functions converts any data into integer handles. APL operates on arrays of data cells, so with ...
2
votes
0answers
671 views

Lambda calculus interpreter in Haskell

This code is a representation of lambda calculus using an AST instead of text. ...
4
votes
2answers
107 views

Java Brainfuck Interpreter Method

Due to the fact that nobody's ever posted this before (sarcasm) I've made a brainfuck interpreter in java. The interpreter fits in a single method, and is designed to be readable, fast, and concise, ...
6
votes
2answers
574 views

Creating a simple Interpreter for the Quartz language

I've been trying to improve my C++ skills, and deiced to try my hand at making a interpreter for a toy language. The language is called Quartz, and so far the only thing you can do is output strings. ...
8
votes
3answers
233 views

Brainfuck interpreter in C - follow-up

A little over a week ago I posted my basic Brainfuck interpreter here. I have since improved the interpreter on all suggested points except two minor details. (reporting the position of parsing error, ...
8
votes
2answers
401 views

A brainfuck interpreter in python 3

I've been writing a brainfuck interpreter in python 3. It's nothing serious, but I'm trying to make it as good as possible (considering program structure, user experience and etc) for my own learning ...
5
votes
2answers
2k views

Basic Brainfuck Interpreter in C

I have written a small Brainfuck interpreter in C. More recent version hosted here. I have found it very hard to test my interpreter because writing a program in Brainfuck is somewhat hard (or at ...
1
vote
1answer
1k views

Math expression parser in JavaScript

I've written the second iteration of my math expression parser, utilising what I learned from the first attempt to make a more reliable, maintainable piece of code. If anybody wants to see the first ...
13
votes
2answers
318 views

Year 0: Instruction Follower

Having played Human Resource Machine for over a day, and wanting to improve my interpreting / tokenizer skills, I made a Human Resource Machine interpreter. For those that do not know, so if you do ...
5
votes
1answer
125 views

Simple code-golf programming language written in Python

I've written a "simple" interpreter for a programming language in Python, called Tellurium (named after the element of the same name). So far, it's working pretty well, but there are some things I'd ...
41
votes
1answer
3k views

Charmander Brainfuck interpreter in Haskell

I just started learning Haskell and this is my first big project (ie not factorials, fibonacci or graphers). This is kind of a gift for somebody so the language is a bit different. The program works, ...
2
votes
0answers
59 views

Stack based esoteric language interpreter in Ruby

For a while now, I've wanted to write a stack-based "Turing-tarpit". This is the perfect excuse to learn Ruby, which I have never used before, so I wrote Brain-flak. The language only uses these ...
5
votes
1answer
231 views

My Brainfuck interpreter in F#

I'm very new to functional world. I've written a simple brainfuck interpreter as my first F# program. What I would like to know: Am I using the right data structure for each situation? Is my code ...
5
votes
2answers
262 views

BF interpreter in Python that uses recursion to handle loops

I wrote a Brainfuck interpreter in Python and I'm wondering how to simplify it. I handle separately loop commands and the others. A recursive function deals with loops. ...