Attribute Grammars Flashcards

1
Q

consists of semantic rules that can be checked during program compilation

A

Static semantics

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

a descriptive formalism that can describe both the syntax and static semantics of a language; extension to context-free grammars; consists of a grammar, a set of attribute, a set of attribute computation functions, and a set of predicates, which together describe semantic rules

A

Attribute grammar

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

specify how attribute values are computed

A

Attribute computation functions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

state the semantic rules of the language

A

Predicate functions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the two (2) classes of attributes?

A
  1. Synthesized attributes
  2. Inherited attributes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

pass semantic information up a parse tree, meaning from the attributes attached to the children of its nonterminal

A

Synthesized attributes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

pass semantic information down and across a tree, meaning from the attributes attached to the parent (or siblings) of its nonterminal

A

Inherited attributes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly