Crafting Interpreters

Started by TomToad, September 20, 2017, 10:10:13

Previous topic - Next topic

TomToad

Came across this site http://www.craftinginterpreters.com/.  It is a web page teaching how to make an interpreter.  First part uses Java, and second part uses C++ C.  I haven't read far into it yet, but looks pretty decent.

Edit:  Oops, should've said C, not C++, and the book isn't completed.  Still a lot to learn there, and porting from Java to BlitzMax, Monkey, etc... should be simple enough.
------------------------------------------------
8 rabbits equals 1 rabbyte.

Steve Elliott

Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb

Xaron

#2
Yeah that's a lovely book. Very well written! Second part uses C by the way and is not written yet. ;)

col

#3
Looks like a good introduction.

One of the great things about writing an interpreter and then compiling it is that you can use the interpreter for 'live' static compilation/analysis, similar to what Visual Studio does for example. A pretty cool feature to have in any editor/dev toolkit.
https://github.com/davecamp

"When you observe the world through social media, you lose your faith in it."

Rooster

I've been wanting to learn more about how stuff worked under the hood, thanks! ;D

sphinx

Kind regards,
Maher F. Farag
www.ancientsoft.com
www.osakit.com

MikeHart

I have attached a few documents that I studied during my language phase. :-)


My favorite tool is Coco/R. And there the Pascal version. They say that Coco/R weakness was that you couldn't handle includes/imports in source code you parse. Well I managed it. :-)

sphinx

Quote from: MikeHart on September 20, 2017, 19:43:27
I have attached a few documents that I studied during my language phase. :-)


My favorite tool is Coco/R. And there the Pascal version. They say that Coco/R weakness was that you couldn't handle includes/imports in source code you parse. Well I managed it. :-)
WOW...that's great!
Thanks Mike and please keep it coming, pleeeeaaaassssseeeeeee :)
Kind regards,
Maher F. Farag
www.ancientsoft.com
www.osakit.com

Steve Elliott

#8
I always liked Pascal - and indeed C at college :)

I'll take a look at your docs, sounds interesting - thanks...Ah Crenshaw, I've read that - good stuff.
Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb