The GATE Grind

GATE 2018 CS – Question 18

Compiler Design · Runtime Environments · 1 mark · Multiple choice

Which one of the following statements is FALSE?

  1. Context-free grammar can be used to specify both lexical and syntax rules.
  2. Type checking is done before parsing.
  3. High-level language programs can be translated to different Intermediate Representations.
  4. 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.