Jump to content

Syntax analysis

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by SmackBot (talk | contribs) at 23:23, 7 February 2007 (Date/fix maintenance tags). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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).