(Translated by https://www.hiragana.jp/)
S-attributed grammar - Wikipedia Jump to content

S-attributed grammar

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by BEDEWIN (talk | contribs) at 20:29, 10 August 2004. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

S-attributed grammars are a class of attribute grammars, comparable with L-attribute grammars but characterized by having no inherited attributes at all. Inherited attributes, which must be passed down from parent nodes to children nodes of the abstract syntax tree during the semantic analysis of the parsing process, are a problem for bottom-up parsing because in bottom-up parsing, the parent nodes of the abstract syntax tree are created after creation of all of their children. Attribute evaluation in S-attributed grammars can be incorporated conveniently in both top-down parsing and bottom-up parsing.