Paper record

W2073788202

Automatic generation of efficient evaluators for attribute grammars

Ken Kennedy, Scott K. Warren

Year
1976
Venue
ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL)
References
13
Cited by
175

Details and counts from OpenAlex.

Abstract

The translation process may be divided into a syntactic phase and a semantic phase. Context-free grammars can be used to describe the set of syntactically correct source texts in a formal yet intuitively appealing way, and many techniques are now known for automatically constructing parsers from given CF grammars. Knuth's attribute grammars offer the prospect of similarly automating the implementation of the semantic phase. An attribute grammar is an ordinary CF grammar extended to specify the “meaning” of each string in the language. Each grammar symbol has an associated set of “attributes:”, and each production rule is provided with corresponding semantic rules expressing the relationships between the attributes of symbols in the production. To find the meaning of a string, first we find its parse tree and then we determine the values of all the attributes of symbols in the tree.