top-down parsing

top-down parsing A strategy for parsing sentences of context-free grammars that attempts to construct a parse tree from the top down. The term includes techniques that may or may not involve backtracking.

Beginning with a parse tree consisting of just the start symbol of the grammar, a top-down parser attempts to expand those leaf nodes labeled by nonterminals from left to right using the productions of the grammar. As leaves labeled by terminals are created they are matched against the input string. Should the match fail, new alternatives for the interior nodes are tried in a systematic way until the entire input string has been matched or no more alternatives are possible. A top-down parser without backtracking uses the information contained in the portion of the input string not yet matched to decide once and for all which alternatives to choose. The LL parsing technique is the most powerful example of the top-down strategy.

Top-down parsing is often implemented as a set of recursive procedures, one for each nonterminal in the grammar, and is then called recursive descent parsing.

Cite this article
Pick a style below, and copy the text for your bibliography.

  • MLA
  • Chicago
  • APA

JOHN DAINTITH. "top-down parsing." A Dictionary of Computing. 2004. Encyclopedia.com. 27 May. 2012 <http://www.encyclopedia.com>.

JOHN DAINTITH. "top-down parsing." A Dictionary of Computing. 2004. Encyclopedia.com. (May 27, 2012). http://www.encyclopedia.com/doc/1O11-topdownparsing.html

JOHN DAINTITH. "top-down parsing." A Dictionary of Computing. 2004. Retrieved May 27, 2012 from Encyclopedia.com: http://www.encyclopedia.com/doc/1O11-topdownparsing.html

Learn more about citation styles

Find thousands of answers for hundreds of subjects at Answers Encyclopedia .

All answers verified by trusted sources at Encyclopedia.com

Try Answers Encyclopedia now!

For students and teachers!

Encyclopedia.com provides students and teachers facts, information, and biographies from verified, citable sources, including:

Encyclopedia.com provides students and teachers facts, information, and biographies from verified, citable sources, including: