Source code for the book "Writing an Interpreter for Object Pascal: Part 2

This is the second part of a series that will show you how to write an interactive interpreter in Object Pascal. Part 2 describes the building of the first version of a virtual machine together with a simple assembler. The book combines the virtual machine with the syntax checker for the Rhodus language. Intermediate code is generated directly as the source code is parsed. At the end of Part II, the reader will be a very serviceable interpreter that supports user-defined functions, built-in functions, string, and list support together with a range of looping constructs. A simple console application is provided to allow users to exercise the interpreter.

The book provides fully working open-source code (also deposited at Github) and explains in plain English how the code works and why certain decisions were made. The book makes liberal use of code throughout the book chapters. Everything is done without the

Features

  • Interpreter
  • Object Pascal

Project Activity

See All Activity >

Categories

Education

License

MIT License

Follow BookPart2

BookPart2 Web Site

Other Useful Business Software
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

Build gen AI apps with an all-in-one modern database: MongoDB Atlas

MongoDB Atlas provides built-in vector search and a flexible document model so developers can build, scale, and run gen AI apps without stitching together multiple databases. From LLM integration to semantic search, Atlas simplifies your AI architecture—and it’s free to get started.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of BookPart2!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Intended Audience

Developers

User Interface

Console/Terminal

Registered

2020-07-12