Parser

From Computer History Wiki
Revision as of 21:23, 4 November 2018 by Jnc (talk | contribs) (An OK start)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

A parser is a piece of software which takes a stream of input and turns it into a sequence of 'tokens' which have a higher-level meaning. The output may be a simple list of tokens, or, more usually, a structured tree. The input is usually a simple stream of characters, but may be some other form of data.

The most common forms of parsers are 'recursive descent', in which a series of functions may call each other, and 'table-driven', in which a formal grammar table is used to do the parsing.