Theory-of-Computation
March 6, 2024Theory-of-Computation
March 6, 2024GATE 1994
|
Question 18
|
Which of the following features cannot be captured by context-free grammars?
|
Syntax of if-then-else statements
|
|
|
Syntax of recursive procedures
|
|
|
Whether a variable has been declared before its use
|
|
|
Variable names of arbitrary length
|
Question 18 Explanation:
Context free grammars are used to represent syntactic rules while designing a compiler.
Syntactic rules not checking the meaningful things such as if a variable is declared before it use (or) not.
Like this, things are handled by semantic analysis phase.
Syntactic rules not checking the meaningful things such as if a variable is declared before it use (or) not.
Like this, things are handled by semantic analysis phase.
Correct Answer: C
Question 18 Explanation:
Context free grammars are used to represent syntactic rules while designing a compiler.
Syntactic rules not checking the meaningful things such as if a variable is declared before it use (or) not.
Like this, things are handled by semantic analysis phase.
Syntactic rules not checking the meaningful things such as if a variable is declared before it use (or) not.
Like this, things are handled by semantic analysis phase.
