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

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

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

Author: Ruslan Spivak

Published: 2015-11-02T12:00:00Z

Content type: tutorial

Language: en

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

Topics: [Parsing](<https://devfeed.tech/topics/parsing.md>), [syntax](<https://devfeed.tech/topics/syntax.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [blog](<https://devfeed.tech/tags/blog.md>), [code](<https://devfeed.tech/tags/code.md>), [expression](<https://devfeed.tech/tags/expression.md>), [lexer](<https://devfeed.tech/tags/lexer.md>), [recursion](<https://devfeed.tech/tags/recursion.md>), [syntax](<https://devfeed.tech/tags/syntax.md>), [tokens](<https://devfeed.tech/tags/tokens.md>)

## AI overview

This tutorial extends an arithmetic-expression grammar to support parenthesized expressions with arbitrarily deep nesting. It updates the lexer and interpreter to evaluate expressions containing integers and arithmetic operators.

## Source excerpt

Today is the day :) "Why?" you might ask. The reason is that today we're wrapping up our discussion of arithmetic expressions (well, almost) by adding parenthesized expressions to our grammar and implementing an interpreter that will be able to evaluate parenthesized expressions with arbitrarily deep nesting, like the expression ...