0% found this document useful (0 votes)
6 views1 page

Compiler Concepts and Lexical Analysis Guide

The document covers various topics related to compilers, including definitions, distinctions between compilers and interpreters, and the phases of compilation. It discusses lexical analysis, syntax analysis, and the role of symbol tables, as well as concepts like regular expressions and grammar types. Additionally, it addresses parsing techniques, grammar ambiguity, and the conversion of non-deterministic grammars to deterministic ones.

Uploaded by

wefot57202
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views1 page

Compiler Concepts and Lexical Analysis Guide

The document covers various topics related to compilers, including definitions, distinctions between compilers and interpreters, and the phases of compilation. It discusses lexical analysis, syntax analysis, and the role of symbol tables, as well as concepts like regular expressions and grammar types. Additionally, it addresses parsing techniques, grammar ambiguity, and the conversion of non-deterministic grammars to deterministic ones.

Uploaded by

wefot57202
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1. What is a compiler?

2. Distinguish between compiler & interpreter. State the situations in which each of them are more suitable
than the other.
3. Cross compiler runs on a machine to generate target code for another machine. Write a few cases where
cross compiler will be useful.
4. What are the phases of a compiler?
5. Write short notes on - Lexical Analysis, Syntax Analysis, Semantic Analysis,
6. What is the role of symbol table in compilation phase?
7. How does Lexical Analyzer interact with symbol table & parser at the time of tokenization/token
generation?
8. Describe the terms - Lexeme, Pattern, Token.
9. What is regular expression?
10. Describe a case study of lexical analyzer that uses regex. to tokenize a string.
11. Design a NFA and convert it into its equivalent DFA for the pattern, (a/b)*a(aa/ab/ba/ba). [last er ta 'bb na?]
12. Write a short note on the lexical analyzer tool, Lex.
13. Define CFG.
14. Describe left-most & right-most derivation to generate a string using the production rules of the grammar.
15. Define the terms - Sentential form, Sentence (w.r.t. string derivation).
16. Specify the mechanism to recognize a grammar is ambiguous or not.
17. Why parser does not accept ambiguous grammar?
18. How can ambiguous grammar be converted into unambiguous grammar? Explain with an example.
19. Define left recursive & right recursive grammar.
20. How to eliminate left recursive production of a CFG. Explain with an example.
21. Differentiate between top-down parser & bottom-up parser.
22. Define recursive descent parser. Write a code segment to generate parse tree for a given string w.r.t.
production rules of a the given grammar.
23. Define the term first() & follow() used in predictive parsing.
24. Write the procedure to check a grammar is LL(1) or not.
25. Describe operator precedence parse(r). Construct a operator precedence table and function table for a given
operator grammar.
26. Write operator precedence parsing algorithm.
27. Arrange LR, SLR, LALR & CLR w.r.t. parsing efficiency.
28. Explain LR(0) item & canonical collection of LR(0) item.
29. Write the differences between LR(1) & SLR(1).
30. Explain SR conflict and RR conflict.
31. How to check if a grammar is LR(1) or not?
32. Explain non-deterministic CFG. Why is non-deterministic CFG appropriate for parser? How to convert
non-deterministic CFG to deterministic CFG?

You might also like