×

Multiple-Choice Questions

Web Technologies MCQs

Computer Science Subjects MCQs

Databases MCQs

Programming MCQs

Testing Software MCQs

Digital Marketing Subjects MCQs

Cloud Computing Softwares MCQs

AI/ML Subjects MCQs

Engineering Subjects MCQs

Office Related Programs MCQs

Management MCQs

More

Which of the following correctly defines the role of a parser?

21. Which of the following correctly defines the role of a parser?

  1. A Parser reports any syntax error
  2. A Parser recovers from a common error to continue processing of the rest of the program
  3. A Parser creates a parse tree
  4. All of the above

Answer

The correct answer is: D) All of the above

Explanation

A Parser is a software component which takes text as input and gives structural representation of input after checking it against the grammar of the language. Main roles of a parser are following:

  • To report any syntax error.
  • To recover from commonly occurring errors to continue parsing of the rest of the program.
  • To create a parse tree
  • To create a symbol tree
  • To produce intermediate representations.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.