Free Online Directory Role of Lexical and Syntax Analysis Tools MCQs - MCQs Answers

Role of Lexical and Syntax Analysis Tools MCQs

30 min Score: 0 Attempted: 0/30 Subscribe
1. What is the primary function of a lexical analyzer?





2. Which tool is commonly used for lexical analysis?





3. What is a token in lexical analysis?





4. Which phase removes comments and white spaces from the source code?





5. What does a lexical analyzer use to recognize tokens?





6. What is the main output of lexical analysis?





7. What is the purpose of a syntax analyzer (parser)?





8. Which tool is commonly used for syntax analysis?





9. What is an Abstract Syntax Tree (AST)?





10. Which grammar type is typically used for parsing in compilers?





11. What is a symbol table?





12. Which of the following is an input to a syntax analyzer?





13. What type of errors are detected by lexical analysis?





14. What type of errors are detected by syntax analysis?





15. What does a finite state machine do in lexical analysis?





16. Which parsing method reads input from left to right and constructs a leftmost derivation?





17. Which parsing method is bottom-up and constructs a rightmost derivation in reverse?





18. What is the role of operator-precedence parsing?





19. What is a lookahead in parsing?





20. Which parser is easy to implement using recursive procedures?





21. What is left recursion in grammar?





22. What is left factoring in syntax analysis?





23. What is the main goal of syntax-directed translation?





24. Which phase of compiler design handles the declaration of variables and their types?





25. What is an example of a tool that combines lexical and syntax analysis?





26. What is the output of syntax analysis?





27. What is the difference between Lex and Yacc?





28. What is an attribute grammar used for?





29. What is predictive parsing?





30. Why is error recovery important in lexical and syntax analysis?





Leave a Comment

All copyrights Reserved by MCQsAnswers.com - Powered By T4Tutorials