IT lexicon › Programming › Syntax Analysis

Syntax Analysis

Programming På svenska → Updated: 2026-11-12

The second compiler phase that checks token streams against grammar rules and builds an abstract syntax tree.

After lexical analysis, the parser receives a stream of tokens and must verify they follow the language's grammar. A grammar is a set of rules—often expressed in BNF—that define which sequences are valid. If the rules are satisfied, the parser builds an abstract syntax tree (AST) that later phases can analyze and transform.

← Back to the lexicon