GATE 2018 CS – Question 18
Compiler Design · Runtime Environments · 1 mark · Multiple choice
Which one of the following statements is FALSE?
- Context-free grammar can be used to specify both lexical and syntax rules.
- Type checking is done before parsing.
- High-level language programs can be translated to different Intermediate Representations.
- Arguments to a function can be passed using the program stack.
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (B) Type checking is done before parsing.
Explanation
Type checking is a semantic analysis done after parsing (it needs the parse tree), so B is false.