Syntax analysis

From Wikipedia, the free encyclopedia

Main article: Parsing

The syntactic analysis of source code, written in a programming language, usually entails the transformation of a linear sequence of tokens into a hierarchical syntax tree (abstract syntax trees are one convenient form of syntax tree).

Syntax analysis, also known as parsing, is one of the first actions performed by a compiler.

There are tools that automatically generates parsers from a specification of a language grammar written in Backus-Naur form, e.g., Yacc (yet another compiler compiler).


In other languages