# Let's Build A Simple Interpreter. Part 13: Semantic Analysis.

DevFeed: [Let's Build A Simple Interpreter. Part 13: Semantic Analysis.](<https://devfeed.tech/articles/let-s-build-a-simple-interpreter-part-13-semantic-analysis-33316.md>)

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

Author: Ruslan Spivak

Published: 2017-04-27T05:00:00Z

Content type: tutorial

Language: en

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

Topics: [syntax](<https://devfeed.tech/topics/syntax.md>), [Parsing](<https://devfeed.tech/topics/parsing.md>), [Parser](<https://devfeed.tech/topics/parser.md>), [compilers](<https://devfeed.tech/topics/compilers.md>), [context](<https://devfeed.tech/topics/context.md>)

Tags: [blog](<https://devfeed.tech/tags/blog.md>), [compilers](<https://devfeed.tech/tags/compilers.md>), [errors](<https://devfeed.tech/tags/errors.md>), [parsing](<https://devfeed.tech/tags/parsing.md>), [separate](<https://devfeed.tech/tags/separate.md>), [syntax](<https://devfeed.tech/tags/syntax.md>), [types](<https://devfeed.tech/tags/types.md>)

## AI overview

This tutorial explains semantic analysis in interpreters and compilers. It shows why grammatically correct Pascal programs can still contain errors, and how an abstract syntax tree, symbol table, and separate semantic-analysis phase can detect issues such as using undeclared variables.

## Source excerpt

Anything worth doing is worth overdoing. Before doing a deep dive into the topic of scopes, I'd like to make a "quick" detour and talk in more detail about symbols, symbol tables, and semantic analysis. In the spirit of "Anything worth doing is worth overdoing", I hope you'll ...