MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPILER DESIGN

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
The parsing table is generally a ____ dimensional array.
A
one
B
two
C
three
D
four
Explanation: 

Detailed explanation-1: -LR Parsing Tables are a two-dimensional array in which each entry represents an Action or goto entry. A programming language grammar having a large number of productions has a large number of states or items, i.e., I0, I1 … … In.

Detailed explanation-2: -A compiler maintains two types of symbol tables: a global symbol table which can be accessed by all the procedures and scope symbol tables that are created for each scope in the program. To determine the scope of a name, symbol tables are arranged in hierarchical structure as shown in the example below: . . .

Detailed explanation-3: -Symbol table: A data structure used by a compiler to keep track of semantics of names.

Detailed explanation-4: -3. What is the use of a symbol table in compiler design? Explanation: Both the analysis and synthesis components of a compiler use the symbol table. i) To keep all of the names of all entities in one place in a systematic format.

There is 1 question to complete.