Lectures from 5 to 10

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

1.
1 point
NFA stands for "Non-deterministic Finite Automata"
2.
1 point
Let L and M be two languages:
L={a, b, c}, M = {ee} – Formal definition of regular expression
LUM = {_______}
3.
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
4.
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)={___________}
5.
6 points
What are the components of grammar?

*select all that apply.
6.
1 point
What is a token?
7.
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)={___________}
8.
1 point
a parse tree Depicts the end result of a derivation.
9.
1 point
Let L and M be two languages:
L={a, b, c}, M = {ee} – Formal definition of regular expression
LM = {_______}
10.
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)={___________}
11.
1 point
Sneezing with your eyes open is impossible.
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 follow(F)={___________}
13.
5 points
which are examples of static semantic rules

*select all that apply.
14.
1 point
How does the guy who drives the snowplow get to work in the mornings?
15.
1 point
ambiguous grammar is when there exist only one parse tree(branch) for the same grammar and input.
16.
1 point
When was the first video game invented?
17.
3 points
What language is being represented by the following image?



***Don't use upper case letters, and don't use any blank spaces.
18.
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)={___________}
19.
1 point
Is it wrong for a vegetarian to eat animal crackers?
20.
3 points
What language is being represented by the following image?



***Don't use upper case letters, and don't use any blank spaces.
21.
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
22.
1 point
Regular expressions cannot use recursive definitions
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 first(T)={___________}
24.
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
25.
1 point
A Grammar is called S-attributed if all attributes are synthesized
26.
1 point
What does a parser do?

*select all that apply.
27.
1 point
What is an attribute grammar?
28.
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
29.
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
30.
1 point
What are the general parsing approaches?
31.
1 point
NFA uses finete state machines to recognize a string.
32.
1 point
Let L and M be two languages:
L={a, b, c}, M = {ee} – Formal definition of regular expression
L*(L+) = {_______}
33.
1 point
if b is an attribute associated with A, its called a synthesized attribute.
34.
5 points
Which are examples of dynamic rules?

*select all that apply.