# The simplest interpreter: Write yourself a compiler, Part I

DevFeed: [The simplest interpreter: Write yourself a compiler, Part I](<https://devfeed.tech/articles/the-simplest-interpreter-write-yourself-a-compiler-part-i-38038.md>)

Original publisher: [Read original article](<https://nurkiewicz.com/2026/07/simplest-interpreter-write-yourself-a-compiler-part-i.html>)

Published: 2026-07-16T22:00:00Z

Content type: tutorial

Language: en

Sources: [Tomasz Nurkiewicz around Java and concurrency](<https://devfeed.tech/sources/tomasz-nurkiewicz-around-java-and-concurrency.md>)

Topics: [Compiler](<https://devfeed.tech/topics/compiler.md>), [Parser](<https://devfeed.tech/topics/parser.md>), [Parsing](<https://devfeed.tech/topics/parsing.md>), [Software Engineering](<https://devfeed.tech/topics/software-engineering.md>), [Go Language](<https://devfeed.tech/topics/go-language.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [go](<https://devfeed.tech/tags/go.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [interpreter](<https://devfeed.tech/tags/interpreter.md>), [lexer](<https://devfeed.tech/tags/lexer.md>), [writing-compiler](<https://devfeed.tech/tags/writing-compiler.md>)

## AI overview

This tutorial begins a series on building a compiler by implementing a simple interpreter in Go. The interpreter lexes and evaluates an input expression containing the addition of two numbers, using a regular expression to validate the structure and extract tokens.

## Source excerpt

I've always felt that writing a compiler is the most romantic software engineering task. You're writing a program that reads textual instructions describing precisely what a computer should do. Do not confuse this with prompting an LLM, where you write vague, verbose instructions that only loosely describe what a computer might do. But I digress.