Font size
Worksheets321 - Quiz07
Total questions: 10
Worksheet time: 8mins
One of the following valid Regular Expression is equivalent to the Regular Expression a? Which one is it?
a|ε
[a]
a+ε
not a valid RE
RE: (a|b)* is equivalent to b*a*
No
Yes
maybe
I should guess
RE: (a|b)* is equivalent to (a*b*)*
No
yes
Maybe
I should guess
The Cambridge notation for z = x + 2 * y is?
(z (x (2 y*)+)=)
(= z (+ x (* 2 y)))
= z + x * 2 y
Before you can use a grammar to create a LL(1) parser, you must
Remove Left Recursion
Calculate the First set for each Terminal
Make sure each production rule has a single RHS
make sure the current sentential form look like αAβ
LR parsers are table driven; uses a Left-to-right reading of input; create Rightmost derivation (in reverser order)
True
False
Regular Expression: [ch]?at - matches which of the following?
hat
cat
at
chat
hcat
If we have the following production rules?
S
R
T
P
First(R)= { c d f }
First(R)= { c d f b }
First(R)={ a b c d f }
First(R)= { c d f b ε }
Consider S->0S1 | ε T={0 1} N={S} which of the following are true?
It is not a Regular Grammar
0n 1n | n>=0 (same number of 1's as 0's for n>= 0)
An equivalent RE: 0+1+
the empty string is a member of this language
The empty string is NOT a member of the language
