Consider the following two syntax-directed definitions SDD1 and SDD2 for type declarations.
SDD1
Grammar (G1): \(D \rightarrow T\,V\); Semantic Rules: \(D.type = T.type;\ V.type = T.type\)
Grammar (G1): \(T \rightarrow int\); Semantic Rules: \(T.type = int\)
Grammar (G1): \(T \rightarrow float\); Semantic Rules: \(T.type = float\)
Grammar (G1): \(V \rightarrow V_1\,id\); Semantic Rules: \(V_1.type = V.type;\ put(id.entry, V.type)\)
Grammar (G1): \(V \rightarrow id\); Semantic Rules: \(put(id.entry, V.type)\)
SDD2
Grammar (G2): \(D \rightarrow D_1\,id\); Semantic Rules: \(D.type = D_1.type;\ put(id.entry, D_1.type)\)
Grammar (G2): \(D \rightarrow T\,id\); Semantic Rules: \(D.type = T.type;\ put(id.entry, T.type)\)
Grammar (G2): \(T \rightarrow int\); Semantic Rules: \(T.type = int\)
Grammar (G2): \(T \rightarrow float\); Semantic Rules: \(T.type = float\)
\(D\) is the start symbol, and \(int\), \(float\) and \(id\) are the three terminals. The non-terminal \(V_1\) is the same as \(V\) and the non-terminal \(D_1\) is the same as \(D\). Here, the subscript is used to differentiate the grammar symbols on the two sides of a production. The function \(put\) updates the symbol table with the type information for an identifier.
Let P and Q be the languages specified by grammars G1 and G2, respectively.
Which of the following statements is/are true?