digitalmars.D - Looking for resources on interpreter design
- solidstate1991 (9/9) Jun 06 2019 I decided to make my college thesis on creating a BASIC
- Max Haughton (6/16) Jun 06 2019 If you want a book on D programming, Ali and Andrei's books are
- Max Haughton (2/9) Jun 06 2019 *parsing and building an AST
- =?UTF-8?B?UsOpbXkgTW91w6t6YQ==?= (39/49) Jun 08 2019 I have collected a few links I liked about interpreters.
- Basile-z (5/15) Jun 09 2019 Found in an AWESOME list : https://www.amazon.com/dp/1852339691
- Yatheendra (2/2) Jun 16 2019 Is there any write-up or talk about the Javascript interpreter
- Basile B. (5/8) Jun 16 2019 There was this in 2013 :
- Yatheendra (2/7) Jun 16 2019 Thanks for the information.
I decided to make my college thesis on creating a BASIC interpreter in D for scripting, command line, and other purposes. However, I have an issue with finding resources, meaning that I couldn't work on it yet since I cannot cite anything. Can anyone help me? It doesn't need to be for D since I understand many other programming languages (and I bet there's a massive lack of literature about D), but I do have budget restrictions, so I cannot buy expensive books. Also I would like to have something also on BASIC.
Jun 06 2019
On Thursday, 6 June 2019 at 19:38:25 UTC, solidstate1991 wrote:I decided to make my college thesis on creating a BASIC interpreter in D for scripting, command line, and other purposes. However, I have an issue with finding resources, meaning that I couldn't work on it yet since I cannot cite anything. Can anyone help me? It doesn't need to be for D since I understand many other programming languages (and I bet there's a massive lack of literature about D), but I do have budget restrictions, so I cannot buy expensive books. Also I would like to have something also on BASIC.If you want a book on D programming, Ali and Andrei's books are the goto resources. I would not interpret BASIC, but that's up to you. https://craftinginterpreters.com/ is good, and also any compiler textbook will be fine for building an AST.
Jun 06 2019
On Thursday, 6 June 2019 at 22:27:14 UTC, Max Haughton wrote:On Thursday, 6 June 2019 at 19:38:25 UTC, solidstate1991 wrote:*parsing and building an AST[...]If you want a book on D programming, Ali and Andrei's books are the goto resources. I would not interpret BASIC, but that's up to you. https://craftinginterpreters.com/ is good, and also any compiler textbook will be fine for building an AST.
Jun 06 2019
On Thursday, 6 June 2019 at 19:38:25 UTC, solidstate1991 wrote:I decided to make my college thesis on creating a BASIC interpreter in D for scripting, command line, and other purposes. However, I have an issue with finding resources, meaning that I couldn't work on it yet since I cannot cite anything. Can anyone help me? It doesn't need to be for D since I understand many other programming languages (and I bet there's a massive lack of literature about D), but I do have budget restrictions, so I cannot buy expensive books. Also I would like to have something also on BASIC.I have collected a few links I liked about interpreters. This tutorial explains how to build a lisp in Javascript. The author first uses a simple approach and then revisit in several passes to optimize or make some construct possible (like continuations and exceptions): http://lisperator.net/pltut/ This paper explains how to build an interpreter using closures. This is a trade-off between the simplicity of an AST based interpreter and performance close to "threaded" code (the program are made of successif call to native library functions): http://www.iro.umontreal.ca/~feeley/papers/FeeleyLapalmeCL87.pdf This article is a simple explanation of the fundamental principles of a bytecode interpreter / virtual machine: https://bernsteinbear.com/blog/bytecode-interpreters/ From the same author of https://craftinginterpreters.com/: - An article about inventing a precise garbage collector: http://journal.stuffwithstuff.com/2013/12/08/babys-first-garbage-collector/ - The Wren language. Its source code is highly readable, of a reasonable size and with good explanations on what's going on: https://github.com/wren-lang/wren This articles describe a CESK machine, in a mathematical way. There is a link to some working Racket code at the end. The bottom of the page contains links to subject related to programming language implementation methods: http://matt.might.net/articles/cesk-machines/ Half of those links are using a variant lisp, as its simplicity can help describe concepts in a concise form. The principles can then be applied in another programming language.
Jun 08 2019
On Thursday, 6 June 2019 at 19:38:25 UTC, solidstate1991 wrote:I decided to make my college thesis on creating a BASIC interpreter in D for scripting, command line, and other purposes. However, I have an issue with finding resources, meaning that I couldn't work on it yet since I cannot cite anything. Can anyone help me? It doesn't need to be for D since I understand many other programming languages (and I bet there's a massive lack of literature about D), but I do have budget restrictions, so I cannot buy expensive books. Also I would like to have something also on BASIC.Found in an AWESOME list : https://www.amazon.com/dp/1852339691 (https://github.com/aalhour/awesome-compilers#books), there are more in the book section, I see a few ones dedicated specifically to VMs
Jun 09 2019
Is there any write-up or talk about the Javascript interpreter Walter Bright wrote? Was it written in nogc D by any chance?
Jun 16 2019
On Sunday, 16 June 2019 at 20:28:49 UTC, Yatheendra wrote:Is there any write-up or talk about the Javascript interpreter Walter Bright wrote?There was this in 2013 : https://dconf.org/2013/talks/chevalier_boisvert.html, not Digital Mars ECMA but Higgs, a JS VM.Was it written in nogc D by any chance?nogc attribute didn't exist at that time.
Jun 16 2019
On Sunday, 16 June 2019 at 20:37:21 UTC, Basile B. wrote:There was this in 2013 : https://dconf.org/2013/talks/chevalier_boisvert.html, not Digital Mars ECMA but Higgs, a JS VM.Thanks for the information.Was it written in nogc D by any chance?nogc attribute didn't exist at that time.
Jun 16 2019