Consider the following two syntax-directed definitions SDD1 and SDD2 for type declarations.
| SDD1 |
|---|
| Grammar (G1) | Semantic Rules |
|---|
| D→T V | D.type=T.type V.type=T.type |
| T→int | T.type=int |
| T→float | T.type=float |
| V→V1 id | V1.type=V.type put(id.entry, V.type) |
| V→id | put(id.entry, V.type) |
| SDD2 |
|---|
| Grammar (G2) | Semantic Rules |
|---|
| D→D1 id | D.type=D1.type put(id.entry, D_1.type) |
| D→T id | D.type=T.type put(id.entry, T.type) |
| T→int | T.type=int |
| T→float | T.type=float |
D is the start symbol, and int, float and id are the three terminals. The non-terminal V1 is the same as V and the non-terminal D1 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?