Context free Grammar and Syntax Analysis

This set of MCQs helps students to learn about context-free grammar and syntax analysis, which is a certain type of formal grammar and a set of production rules that describe all possible strings in a given formal language. CFG is also used to specify the syntax of a language.

Start Quiz

Which phase of the compiler is Syntax Analysis?

First Second Third None of the mentioned

Syntax Analyser takes Groups Tokens of source Program into Grammatical Production.

True False

From where it takes its input from?

Lexical analyser Syntactic Analyser Semantic Analyser None of the mentioned

Parsers are expected to parse the whole code.

True False

Which of these is not true about the Symbol Table?

All the labels of the instructions are symbols Table has entry for symbol name address value Perform the processing of the assembler directives Created during pass 1

Which of these features of assembler are Machine-Dependent?

Instruction formats Addressing modes Program relocation All of the mentioned

A compiler can check?

Logical Error Syntax Error Both Logical and Syntax Error Not Logical and Syntax Error

Select a Machine Independent phase of the compiler.

Syntax Analysis Intermediate Code generation Lexical Analysis All of the mentioned

A system program that combines the separately compiled modules of a program into a form suitable for execution?

Assembler Compiler Linking Loader Interpreter

Which of the following system software resides in the main memory?

Text Editor Assembler Linker Loader

Output file of Lex is __________ the input file is Myfile.

Myfile.e Myfile.yy.c Myfile.lex Myfile.obj

By whom is the symbol table created?

Compiler Interpreter Assembler None of the mentioned

Syntax Analyser is also known as ___________.

Hierarchical Analysis

Hierarchical Parsing

None of the mentioned

Hierarchical Analysis & Parsing

A grammar for a programming language is a formal description of _______________.

Syntax

Semantics

Structure

Library

The fourth Generation computer was made up of ______________.

Transistor

Vacuum tubes

Chips

Microprocessor chips

Quiz/Test Summary
Title: Context free Grammar and Syntax Analysis
Questions: 15
Contributed by:
Steve