Consider the following context-free grammar where the set of terminals is {a, b, c, d, f}.
S → d a T | R f
T → a S | b a T | ϵ
R → c a T R | ϵ
The following is a partially-filled LL(1) parsing table.
Which one of the following choices represents the correct combination for the numbered cells in the parsing table ("blank" denotes that the corresponding cell is empty)?
Consider the following grammar (that admits a series of declarations, followed by expressions) and the associated syntax directed translation (SDT) actions, given as pseudo-code:
P → D* E*
D → int ID {record that ID.lexeme is of type int}
D → bool ID { record that ID.lexeme is of type bool}
E → E1 + E2 {check that E1.type = E2.type = int; set E.type := int}
E → !E1 {check that E1.type = bool; set E.type := bool}
E → ID {set E.type := int}
With respect to the above grammar; which one of the following choices is correct?
Consider the following C code segment:
a = b + c;
e = a + 1;
d = b + c;
f = d + 1;
g = e + f;
In a compiler, this code segment is represented internally as a directed acyclic graph (DAG). The number of nodes of nodes in the DAG is ______
Assume that a 12-bit Hamming codeword consisting of 8-bit data and 4 check bits is d8d7d6d5c8d4d3d2c4d1c2c1, where the data bits and the check bits are given in the following tables:
Data bits |
|||||||
d8 |
d7 |
d6 |
d5 |
d4 |
d3 |
d2 |
d1 |
1 |
1 |
0 |
x |
0 |
1 |
0 |
1 |
c8 |
c4 |
c2 |
c1 |
Y |
0 |
1 |
0 |
Which one of the following choices gives the correct values of x and y?