# Improving Error Reporting in a Simple Interpreter

DevFeed: [Improving Error Reporting in a Simple Interpreter](<https://devfeed.tech/articles/let-s-build-a-simple-interpreter-part-15-33318.md>)

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

Author: Ruslan Spivak

Published: 2019-06-21T09:45:00Z

Content type: tutorial

Language: en

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

Topics: [error reporting](<https://devfeed.tech/topics/error-reporting.md>), [Python](<https://devfeed.tech/topics/python.md>), [Exception](<https://devfeed.tech/topics/exception.md>), [Parsing](<https://devfeed.tech/topics/parsing.md>)

Tags: [blog](<https://devfeed.tech/tags/blog.md>), [custom-exceptions](<https://devfeed.tech/tags/custom-exceptions.md>), [error-reporting](<https://devfeed.tech/tags/error-reporting.md>), [parsing](<https://devfeed.tech/tags/parsing.md>), [python](<https://devfeed.tech/tags/python.md>)

## AI overview

This tutorial improves error reporting in a simple interpreter's lexer, parser, and semantic analyzer. It adds error codes, custom exceptions, token position tracking, a scope command-line option, and Python 3.7+ support.

## Source excerpt

"I am a slow walker, but I never walk back." -- Abraham Lincoln And we're back to our regularly scheduled programming! :) Before moving on to topics of recognizing and interpreting procedure calls, let's make some changes to improve our error reporting a bit. Up until now, if there was ...