In the following gate 2021 question from compiler design,
suppose option C is modified as :
The actions can be used to type-check syntactically correct boolean variable declarations BUT NOT boolean expressions.
According to me, for boolean variable declarations and NOT boolean expressions, the value of ID is directly fetched as lexeme using the lexical analyzer instead of having any separate semantic rule using the production D → bool ID.
Then, will option C be correct in addition to option B ?