Lectures from 5 to 10

Is this your test? Login to manage it. If not, you can create a quiz just like it.

This is a non-interactive preview of the quiz content.

1.
5 points
Which are examples of dynamic rules?

*select all that apply.
2.
1 point
if b is an attribute associated with A, its called a synthesized attribute.
3.
1 point
Let L and M be two languages:
L={a, b, c}, M = {ee} – Formal definition of regular expression
L*(L+) = {_______}
4.
1 point
NFA uses finete state machines to recognize a string.
5.
1 point
What are the general parsing approaches?
6.
1 point
what grammar does the following recognize?

start → id ‘(‘ exp more_exp ‘)’
more_exp: ‘,’ exp more_exp | ε

*if more than one, select all that apply
7.
1 point
_______-_______ derivation is when the nonterminal on the far left in a sentential form is replaced in each derivation step


Type answer is two words. use only lower case letters and separate them with a coma.

example:
word1,word2
8.
1 point
What is an attribute grammar?
9.
1 point
What does a parser do?

*select all that apply.
10.
1 point
A Grammar is called S-attributed if all attributes are synthesized
11.
1 point
_______-_______ derivation is when the nonterminal on the far right in a sentential form is replaced in each derivation step.

Type answer is two words. use only lower case letters and separate them with a coma.

example:
word1,word2
12.
6 points
Consider the following LL(1) grammar with terminals (, ), +, id, num, and
starting symbol S.

1. S → F
2. S → ( S T )
3. T → ε
4. T → + F T
5. F → id
6. F → num

What is first(T)={___________}
13.
1 point
Regular expressions cannot use recursive definitions
14.
1 point
A grammar is called L-attributed if the parse tree traversal to update attribute values is always left-to-right and depth-first
15.
3 points
What language is being represented by the following image?



***Don't use upper case letters, and don't use any blank spaces.
16.
1 point
Is it wrong for a vegetarian to eat animal crackers?
17.
6 points
Consider the following LL(1) grammar with terminals (, ), +, id, num, and
starting symbol S.

1. S → F
2. S → ( S T )
3. T → ε
4. T → + F T
5. F → id
6. F → num

What is first(F)={___________}
18.
3 points
What language is being represented by the following image?



***Don't use upper case letters, and don't use any blank spaces.
19.
1 point
When was the first video game invented?
20.
1 point
ambiguous grammar is when there exist only one parse tree(branch) for the same grammar and input.
21.
1 point
How does the guy who drives the snowplow get to work in the mornings?
22.
5 points
which are examples of static semantic rules

*select all that apply.
23.
6 points
Consider the following LL(1) grammar with terminals (, ), +, id, num, and
starting symbol S.

1. S → F
2. S → ( S T )
3. T → ε
4. T → + F T
5. F → id
6. F → num

What is follow(F)={___________}
24.
1 point
Sneezing with your eyes open is impossible.
25.
6 points
Consider the following LL(1) grammar with terminals (, ), +, id, num, and
starting symbol S.

1. S → F
2. S → ( S T )
3. T → ε
4. T → + F T
5. F → id
6. F → num

What is first(S)={___________}
26.
1 point
Let L and M be two languages:
L={a, b, c}, M = {ee} – Formal definition of regular expression
LM = {_______}
27.
1 point
a parse tree Depicts the end result of a derivation.
28.
6 points
Consider the following LL(1) grammar with terminals (, ), +, id, num, and
starting symbol S.

1. S → F
2. S → ( S T )
3. T → ε
4. T → + F T
5. F → id
6. F → num

What is follow(T)={___________}
29.
1 point
What is a token?
30.
6 points
What are the components of grammar?

*select all that apply.
31.
6 points
Consider the following LL(1) grammar with terminals (, ), +, id, num, and
starting symbol S.

1. S → F
2. S → ( S T )
3. T → ε
4. T → + F T
5. F → id
6. F → num

What is follow(S)={___________}
32.
1 point
if b is an attribute associated with a grammar symbol on the right side of the production, b is called an inherited attribute
33.
1 point
Let L and M be two languages:
L={a, b, c}, M = {ee} – Formal definition of regular expression
LUM = {_______}
34.
1 point
NFA stands for "Non-deterministic Finite Automata"