Semantic Analysis Flashcards
What is the difference between syntax and semantics?

What is the difference between static semantics and dynamic semantics

Semantic analysis is done via
Annotations on a parse tree called ATTRIBUTE GRAMMARS
What is more precise? A syntax tree or a parse tree?
A parse tree

Does dynamic checking increase or decrease speed?
Decrease
What is static analysis?

What is attribute grammar

Examine the following attrivute grammar:

Examine the following annotation of a parse tree:

What is a synthesized attribute?

What is an S-attributed grammar?
all attributes are synthesized
What are inherited attributes?

Examine the following example for inherited attribute grammar:

Examine the following terms:

A static scheme is
Based on the structure of the grammar. O(n)
The simplest static scheme is
S-attributed grammar
What is an L-attributed grammar?

_-attribued implies _-attributed, but not vice versa
S-attributed implies L-attributed (but not vice versa)
S-attribued and L-attributed are paired well with…

What is a one-pass compiler?

What is a Multi-pass compiler?

Examine the following syntax tree construction for S-attributed grammar

Examine the L-attributed syntax tree construction:

The automatic tools for the following:
CFG
Attribute grammar
are…

In LL and LR parsing, can action routines (attributes) be embedded in arbitrary places in the RHS?
LL: yes
LR: no
