This section contains carefully selected MCQs and Previous Year Questions with explanations to help students understand concepts and prepare effectively for examinations, interviews, and competitive tests.
Q: 1Which one of the following tools generates parser from BNF notation?
Option B
YACC (Yet Another Compiler Compiler) is a tool used to generate a parser from grammar specifications written in BNF (Backus–Naur Form).
It takes the grammar rules of a programming language as input and produces a Syntax Analyzer (Parser) that checks whether the input program follows those rules.
Q: 2What is the alternative name of Parsing?
Option A
Parsing is the process of analyzing the grammatical structure of a program according to the rules of a programming language. Therefore, parsing is also known as Syntax Analysis.
It is a phase of a compiler that comes after Lexical Analysis. In this phase, the compiler checks whether the sequence of tokens follows the correct syntax or grammar rules.
| Term | Purpose |
|---|---|
| Lexical Analysis | Converts program into tokens. |
| Syntax Analysis (Parsing) | Checks grammatical structure. |
| Semantic Analysis | Checks meaning and validity. |
| Compilation | Complete translation process. |
You have reached the end of this topic. Continue learning with the next topic below.
Thank you so much for taking the time to read my Computer Science MCQs section carefully. Your support and interest mean a lot, and I truly appreciate you being part of this journey. Stay connected for more insights and updates! If you'd like to explore more tutorials and insights, check out my YouTube channel.
Don’t forget to subscribe and stay connected for future updates.