The GATE Grind

GATE 2010 CS (CS1) – Question 23

Compiler Design · Lexical Analysis · 1 mark · Multiple choice

Which compiler structure manages information about variables and their attributes?

  1. Abstract syntax tree
  2. Symbol table
  3. Semantic stack
  4. Parse table

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (B) Symbol table

Explanation

A symbol table associates identifiers with attributes such as type, scope, storage location and parameter information. Syntax trees encode grammatical structure and parse tables guide parsing, so the requested structure is the symbol table, B.

More Lexical Analysis questions

All Lexical Analysis questions →