Questions tagged [interpreter]

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

Filter by
Sorted by
Tagged with
4
votes
1answer
89 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
158 views

YABI: Yet Another Brainfuck Interpreter written in C

Syntax is ./bf-interpreter <program.bf>. ...
73
votes
2answers
8k 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 ...
7
votes
1answer
475 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
648 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
57 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
139 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
143 views

Ruby Brainfuck interpreter

I recently wrote a simple Brainfuck interpreter in Ruby: ...
6
votes
1answer
166 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 ...
3
votes
0answers
933 views

Lambda calculus interpreter in Haskell

This code is a representation of lambda calculus using an AST instead of text. ...
4
votes
2answers
125 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
919 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
267 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
562 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 ...
14
votes
2answers
368 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
153 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 ...
43
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
64 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
266 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
369 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. ...
-3
votes
1answer
155 views

JavaScript Brainfuck interpreter [closed]

I wrote a Brainfuck interpreter in JavaScript, however it is quite buggy and I can't figure out what I'm doing wrong. It works for programs I've written, but fails on most programs I find on the ...
9
votes
3answers
297 views

Fuzzy Octo Guacamole interpreter

This is my code that interprets my own golfing and esoteric language, Fuzzy-Octo-Guacamole. It has 2 stacks to store information in, and various operations can be performed on each stack, or both at ...
6
votes
3answers
313 views

Brainfuck Interpreter in JavaScript 3

I have this Brainfuck interpreter: ...
2
votes
1answer
222 views

Arbitrary-dimensional arrays with transpose and slice

This is the primary module for my APL interpreter. The general idea is motivated by my two Stack Overflow questions, but the details I fear are easy to get wrong and I suspect there are a few corners ...
4
votes
2answers
916 views

MS-DOS style OS

This is a very basic text-based operating system I've been working on. I started working with python a few weeks ago and this project only a few days ago, so there are probably better ways I can do ...
8
votes
1answer
77 views

Implementing Multi-File Programs in Vitsy

I'm the proud owner of the Vitsy programming language, which I've been working on for some time (except recently, because high school). It's only been used in PPCG so far, but I hope to expand it to ...
10
votes
1answer
2k views

Read stdin like a dictator

Rags. Introduction All too often I find myself wanting to allow only a certain list of characters to be written to stdin, and only recently did I actually bother ...
22
votes
1answer
207 views

Golf some Code with A-Ray

For some of those in The 2nd Monitor, you know that I was creating a new golfing language. For one or two (@Quill), you have heard from me how tough it is. A-Ray (that's what it's called) is a ...
9
votes
1answer
375 views

Roman numerals with ANTLR

I've written a simple interpreter with ANTLR for evaluating Roman numerals. Here's the contents of the grammar file (Roman.g4): ...
5
votes
1answer
274 views

Constructing a simple shell from scratch

I'm actually doing my whole shell in C from scratch from a Linux computer. The thing is that I think we all do our best from creating the simplest things that can be explained easily. And I'm not sure ...
5
votes
1answer
186 views

Termios/Xterm line editor for APL interpreter

As an interesting sub-part of an interpreter -- just the Read part of the REPL -- I present my raw-mode line-oriented editor that I intend to use for my APL interpreter. (The Eval part has been posted ...
6
votes
1answer
86 views

BF Interpreter, Follow-up: ++;++; is now +=2;

Follow-up to: Brainfuck Interpreter: Slower than a Snail? Many improvements have been added, including: Remembering where the matching [ and ...
14
votes
3answers
501 views

BF#: Round 2 (Fight!)

So I've completely changed how BrainfuckSharp does things, and added some features. This is obviously a follow up to: Interpreting Brainfuck code to C#, then compiling to a .exe It now features an <...
7
votes
1answer
330 views

Brainfuck Interpreter: Slower than a Snail?

Inspired by FizzBuzz by Brainfuck, I decided to write an interpreter for Brainfuck. It: Removes all non-command characters Optimizes commands (removing +- and <...
7
votes
3answers
158 views

Simple interpreter for a golfing language

This is the seconds version of an interpreter yesterday. It's supposed to be used for code golf, but it currently can't do much. ...
2
votes
1answer
850 views

Very simple interpreter

I created a very simple interpreter in Python. It's capable of doing basic math (unfortunately with only two numbers), creating quines and printing text. ...
5
votes
1answer
737 views

Simple REPL command parser in Java

I have this tiny library for implementing simple command line languages. It is not flexible enough for handling actual programming languages, but hopefully it may help implementing simpler REPL's ...
4
votes
1answer
212 views

Dynamic Language Interpreter in C#

This code interprets an abstract syntax tree generated by a recursive descent parser for a dynamic scripting language called Hassium. The syntax of this language looks like this ...
3
votes
1answer
68 views

Binary Bayes network classifier in Java - Part I/II - follow-up

TERMINOLOGY We are given a directed acyclic graph (dag) \$G = (V, A)\$, where \$V\$ is the set of nodes and \$A \subseteq V \times V\$ is the set of directed arcs, and a weight function \$p \colon V \...
7
votes
1answer
281 views

Mini BF interpreter

Many Brainfuck implementations I've come across generally are obtuse, verbose or over-the-top. But I've always seen Brainfuck as "easy to implement", especially for beginners. My original need for ...
11
votes
3answers
527 views

“Nothing” interpreter/compiler

This is an implementation of the Nothing programming language. The language spec is as follows: Design philosophy In the current software industry focus lays on solving complex problems by ...
4
votes
2answers
413 views

Reverse Polish Notation in F#

In my question to learn F#, I've decided to get one step closer to creating a programming language, and implement this simple Reverse Polish Notation "interpreter" of sorts. It does not allow for ...
4
votes
1answer
52 views

Local source control - Part 2

I've refactored the previous version of my local source control, and revised a few things. It's mostly the same, but there are a few minor differences, like the argument separator, one new command, ...
11
votes
1answer
70 views

Local source control

I've written my own local "source control". Rather than using a commit-based system, when you're ready to release a version, you can run a command which will create a ...
6
votes
1answer
106 views

Brainfuck interpreter in Clojure

I'm currently learning Clojure to try to get a good understanding of functionnal programming, so I wrote this brainfuck interpreter that takes a filename on the command line. I tried to make it as ...
12
votes
2answers
2k views

Abstract syntax tree for simple Lisp-like interpreter

A week or so ago, I wrote a binary expression calculator with the hope of better understanding how interpreters and compilers work. In the same vein, I've tried to write a lisp like language ...
18
votes
3answers
268 views

Brainfuck interpreter (with emphasis on robustness)

While writing a review of @MotokoKusanagi's Brainfuck interpreter, I decided to write my own implementation to illustrate a few points. In particular, I'd like it to be robust to malformed programs, ...
28
votes
1answer
985 views

Rust Brainfuck interpreter

I took the code from kostyas benchmarks for the Rust Brainfuck interpreter and tried to optimize it. There is also a discussion on Reddit about the poor performance of Rust in the Benchmark. Before ...