Skip to main content

Questions tagged [interpreter]

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

Filter by
Sorted by
Tagged with
7 votes
2 answers
318 views

Lexically-scoped Lisp interpreter

Introduction Here's an interpreter, written in Common Lisp, for a simple Lisp dialect that has some semi-“advanced” features, namely lexical scope with closures, ...
texdr.aft's user avatar
  • 258
5 votes
0 answers
228 views

tbf - An Optimizing Brainfuck Interpreter and Transpiler in C

Language: The Brainfuck programming language consists of eight commands: ...
Harith's user avatar
  • 9,442
4 votes
1 answer
262 views

200 line Brainfuck Interpreter

I wrote a simple brainfuck interpreter in C99. Coming from a background of C++ made the task easier, but still there is some stuff I had to get used too. The program accepts a path to a brainfuck file ...
William Redding's user avatar
8 votes
1 answer
121 views

Lisp-like language interpreter in Python

I decided to learn more about how interpreters work and made a simple Scheme interpreter in Python. I'd like to hear some advice on how I could have written this better, or on the mistakes I've made. ...
guy25678's user avatar
4 votes
2 answers
102 views

Extensible typing system for a strongly-typed DSL

I recently finished cleaning up my code in a compiler/interpreter for a strongly-typed domain-specific language, which makes use of three sorts of types: Compile-time enumerated types: Have one of a ...
P...'s user avatar
  • 141
1 vote
0 answers
395 views

Interpreter for a Python-like Language (ANTLR and Python)

Code for grammar ...
Dean Menezes's user avatar
4 votes
0 answers
71 views

Scheme interpreter in QBASIC

I wrote an interpreter for Scheme which includes stop and copy garbage collection. ...
Dean Menezes's user avatar
-1 votes
1 answer
153 views

Brainfuck interpreter in C, looking for improvements on the looping functionality [closed]

I've just started to get into PL design and made a simple Brainfuck interpreter. Although it is functional, I don't feel too confident on the execution, particularly the implementation for loops, I ...
Iñaki Ulibarri's user avatar
3 votes
0 answers
118 views

Mini Scheme interpreter

Right now, I'm working on an interpreter for a subset of the Scheme programming language. It supports lambdas, let/let*/letrec, procedures, combinations, ...
TheSinisterStone's user avatar
1 vote
1 answer
276 views

Interpreter for NLRNIS programming language, written in Python

Code: ...
Fmbalbuena's user avatar
6 votes
4 answers
1k views

Simple scripting language (interpreter) in C

I made simple scripting language (interpreter) in C and now, I want to make my code better. Here is my code: ...
sbh's user avatar
  • 127
2 votes
0 answers
82 views

Small language, compiles to register VM bytecode

I am trying to implement a small programming language, in Nim, as a way of improving my (close to non-existent) programming skills. The programming language is intended to have IF-GOTO, variables, and ...
LearningPython's user avatar
3 votes
1 answer
112 views

Very simple scripting language (interpreter) in C

I made very simple scripting language (interpreter) in C and now, I want to make my code better. Here is my code: ...
sbh's user avatar
  • 127
2 votes
1 answer
64 views

Tiny attempt at a register machine in Nim

I am attempting to learn the Nim language by making a small and simplistic register machine. It is intended to interpret some basic instructions. The entire parsing lexing process consists of ...
LearningPython's user avatar
1 vote
1 answer
74 views

Go Brainf*ck Interpreter

Recently wrote a brainfuck interpreter in Go. Here's the Github Repo Brainfuck Areas that need work The parsing for brackets [] is still buggy and is known to fail ...
Anthony Gedeon's user avatar
4 votes
1 answer
339 views

Simple Brainfuck Interpreter in C

This is a simple interpreter for the esoteric brainfuck programming language, written in C. It is one of my personal projects and I would love to receive expert advice. Behavior All characters except ...
Andy Sukowski-Bang's user avatar
0 votes
2 answers
972 views

Simple interpreter in C

I made simple interpreter in C and now, I want to make my code better. Here is my code: ...
sbh's user avatar
  • 127
0 votes
2 answers
426 views

Very simple interpreter in C

I made very simple interpreter in C and now, I want to make my code better. Here is my code: ...
sbh's user avatar
  • 127
7 votes
1 answer
1k views

Brainfuck interpreter in C++ with namespaces

I wrote this small Brainfuck interpreter in C++ where the different op codes are handled in one big switch-case statement instead of something like a tokenizer as Brainfuck is very simple in that ...
xkevio's user avatar
  • 173
2 votes
2 answers
89 views

Optimization of a custom interpreter

Ok, so I want to find out if my approach towards a custom interpreter is pragmatic and if not how to implement it in a better way. this is purely for fun and practice and to find out more about how to ...
TyperMan1133's user avatar
2 votes
1 answer
212 views

Brainfuck Interpreter in C++17

I built a Brainfuck interpreter. It seems to be working. I ran the game of life and this tic-tac-toe and other programs on it. They worked fine. I'd appreciate any comments on correctness, readability ...
Aykhan Hagverdili's user avatar
5 votes
2 answers
179 views

BrainF**k interpreter in C++

This question is the adaptation of this question in C++. (I'm the author of that code as well). The code: ...
Sriv's user avatar
  • 2,750
11 votes
2 answers
399 views

BrainF**k interpreter in python

Here's what I've come up with: ...
Sriv's user avatar
  • 2,750
40 votes
4 answers
11k views

Brainfuck interpreter written in C

I am a beginner with regards to C; I'm used to using high-level languages (Java, Python, JS, etc) and this is my first project in a lower-level language. I wrote a simple Brainfuck interpreter, given ...
Ghost's user avatar
  • 501
4 votes
2 answers
87 views

User defined function call on a stack based interpreter for concatenative language

I would like to receive some advice on how to improve a small concatenative stack-based interpreter, executing a joy-like programming language. It is really minimal, and is in fact a subset of a ...
Foxy's user avatar
  • 143
11 votes
1 answer
294 views

Portable BrainFuck Interpreter in ANSI C89

I wrote this BrainFuck interpreter in ANSI C89: ...
S.S. Anne's user avatar
  • 1,725
4 votes
1 answer
142 views

Meta-circular interpreter for lambda calculus in Python

For learning purpose, I've written a simple lambda calculus interpreter (plus 'Add'). I would like it to be the cleanest and most idiomatic possible. Can we make it as neat as the Haskell version? <...
YvesgereY's user avatar
  • 428
2 votes
1 answer
340 views

Meta-circular interpreter for lambda calculus in Haskell

For learning purpose, I've written a simple lambda calculus interpreter (plus 'Add'). I would like it to be the cleanest and most idiomatic possible. Bonus question: how would you use ...
YvesgereY's user avatar
  • 428
7 votes
1 answer
334 views

Brainfuck interpreter utilizing idiomatic Rust

I'm learning Rust at the moment, I've read the book and been just playing around with the language. I wrote this simple Brainfuck interpreter, because I think that it's always a fun exercise. The ...
ruohola's user avatar
  • 289
2 votes
0 answers
2k views

Program to draw ASCII art based on commands

I want to know how to improve the design of Canvas drawing implementation. Canvas Drawing This solution is to implement a console-based canvas drawing application. Problem Statement Description ...
Ramanathan Ganesan's user avatar
7 votes
2 answers
3k views

115 line brainfuck interpreter written in C++

This is a simple brainfuck interpreter I've written in C++. It takes a path to a brainfuck source file as a command line argument. The program uses a tape size of 30000 and cell size of one byte. ...
ruohola's user avatar
  • 289
3 votes
1 answer
119 views

Verbose Brainfuck Interpreter in C

I decided to try and write a Brainfuck interpreter in C as an exercise. This could have been written in one file, but I decided to split it up into a State "class" and an some interpreter methods. An ...
Carcigenicate's user avatar
2 votes
1 answer
68 views

Convert Tail-Call Recursive Code to Loop [closed]

So, I'm in the midst of writing a programming language interpreter in Python, and one of the problems I'm concerned about is that since I've been using a lot of recursions to implement the interpreter,...
Alexis Purslane's user avatar
13 votes
1 answer
423 views

(Lisp in (Rust))

I loved Norvig's Lispy, and made the first version of it in Rust, to learn Rust. I would love your thoughts :) A few specific questions: Is there a way to write ...
Stepan Parunashvili's user avatar
2 votes
2 answers
72 views

Brainfuck interpreter improvement

I created a brainfuck interpreter in javascript. It works good to me as I have seen no bugs in my compiler. I like to get a suggestion and review from you to what should this compiler improve. Here'...
MMJM's user avatar
  • 173
8 votes
2 answers
222 views

Brainfuck interpreter in C 3

I created my brainfuck interpreter and I would like to know what can be done better and is the code clear and readable. I will be very thankful for opinions and suggestions. Here is the code: ...
DeBos's user avatar
  • 525
3 votes
1 answer
213 views

Simple Brainfuck Interpreter in Rust

Not a long time ago, I got into Rust and I made a simple Brainfuck Interpreter. Now I want to get back to Rust and I would like some comments on my code: Just in case it's hard to read code from post:...
DimChtz's user avatar
  • 173
2 votes
1 answer
99 views

Second take at a stack based langauge

I recently asked for a review of a stack based language I made in Rust. I made a lot of changes since then and a lot has changed. Hopefully I haven't gone backwards in progress. Most notably: I ...
Dair's user avatar
  • 5,906
6 votes
1 answer
138 views

JIT-based programming language

I'm working on JIT-based programming language using DynASM (before I was generating instructions directly). Review of the code would be really appreciated - It's my first time fiddling with DynASM. ...
Kamila Szewczyk's user avatar
4 votes
1 answer
168 views

RPN calculator in Chicken Scheme

My first attempt at Scheme (Chicken Scheme) - a simple RPN calculator. Please comment on exception handling as well as the general coding style. Here is the code: ...
Anonimista's user avatar
2 votes
1 answer
196 views

Small stack based language in Rust

I made a small stack-oriented language in Rust. It tries to run anything it is given. To elaborate: Division by zero gives zero. If there is nothing on the stack and a request is made that involves ...
Dair's user avatar
  • 5,906
8 votes
1 answer
295 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 ...
Jaldhar's user avatar
  • 409
4 votes
1 answer
390 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 ...
Ethan's user avatar
  • 141
5 votes
1 answer
223 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 ...
wyer33's user avatar
  • 151
7 votes
1 answer
271 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 ...
mrFoobles's user avatar
5 votes
1 answer
124 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 ...
MegaIng's user avatar
  • 413
6 votes
1 answer
112 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 ...
Dehodson's user avatar
  • 163
8 votes
2 answers
163 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 ...
caird coinheringaahing's user avatar
3 votes
1 answer
245 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 ...
skiwi's user avatar
  • 10.6k
15 votes
2 answers
337 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 ...
skiwi's user avatar
  • 10.6k