# Let's Build A Simple Interpreter. Part 2.

DevFeed: [Let's Build A Simple Interpreter. Part 2.](<https://devfeed.tech/articles/let-s-build-a-simple-interpreter-part-2-33323.md>)

Original publisher: [Read original article](<https://ruslanspivak.com/lsbasi-part2/>)

Author: Ruslan Spivak

Published: 2015-07-03T11:00:00Z

Content type: tutorial

Language: en

Sources: [Ruslan Spivak](<https://devfeed.tech/sources/ruslan-spivak.md>)

Topics: [Programming](<https://devfeed.tech/topics/programming.md>), [Code](<https://devfeed.tech/topics/code.md>), [Software Engineering](<https://devfeed.tech/topics/software-engineering.md>), [Software](<https://devfeed.tech/topics/software.md>)

Tags: [blog](<https://devfeed.tech/tags/blog.md>), [code](<https://devfeed.tech/tags/code.md>), [compilers](<https://devfeed.tech/tags/compilers.md>), [development](<https://devfeed.tech/tags/development.md>), [source](<https://devfeed.tech/tags/source.md>), [string](<https://devfeed.tech/tags/string.md>)

## AI overview

This tutorial continues a series on building an interpreter by extending a calculator to handle whitespace, multi-digit integers, subtraction, and addition. It explains the code changes, including token handling and position advancement, and provides source code and a sample session.

## Source excerpt

In their amazing book "The 5 Elements of Effective Thinking" the authors Burger and Starbird share a story about how they observed Tony Plog, an internationally acclaimed trumpet virtuoso, conduct a master class for accomplished trumpet players. The students first played complex music phrases, which they played perfectly well. But ...