0% found this document useful (0 votes)
6 views2 pages

Compiler Design: Lexical & Syntax Analysis

Uploaded by

krishna vekariya
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 views2 pages

Compiler Design: Lexical & Syntax Analysis

Uploaded by

krishna vekariya
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

Chapter 1 – Overview of Compiler

1. Define lexemes, patterns and tokens


2. State the applications of language processors
3. Compare and contrast compilers and interpreters
4. Explain the role of linker, loader and preprocessor in the process of compilation
5. Explain cousins of compiler in detail
6. Enlist types of compiler. Explain any two
7. Assembler (difference vs compiler/interpreter) → Less chance to ask

Chapter 2 – Lexical Analysis

1. Write a regular definition for languages:


o strings with at least one 0 and 1
o strings not ending with 01
o strings with both 0’s and 1’s even
o strings starting with 1 and ending with 0
2. Explain input buffering techniques (repeated multiple years)
3. Construct DFA from regular expression using syntax tree (firstpos, lastpos,
followpos)
4. Construct NFA using Thompson’s construction and convert into DFA
5. Construct DFA directly from regular expression (without NFA)
6. Role of lexical analyzer with example
7. Define lexeme, token and pattern. Identify tokens from given C program
8. Write regular expressions for given sets over {a,b}
9. What is sentinel? Explain with example
10. Elementary scanner / Lex tool concepts → Less chance to ask

Chapter 3 – Syntax Analysis

1. Explain phases of compiler with example


2. Differentiate ambiguous and unambiguous grammar
3. Define left recursive grammar and remove left recursion
4. Explain shift-reduce parsing technique
5. Differentiate top-down and bottom-up parsing
6. Explain LL(1) parsing with example
7. Construct SLR parsing table
8. Compare SLR and LALR
9. Explain recursive descent parsing with example
10. Write FIRST and FOLLOW sets
11. Define LL(1), ambiguous grammar, operator grammar
12. Construct parse tree / syntax tree for given input
13. Differentiate parse tree and syntax tree
14. Left factoring (algorithm + example) → Less chance to ask
15. Operator-precedence parsing → Less chance to ask
Chapter 4 – Error Recovery

1. Explain error recovery strategies in compiler


2. Explain panic mode and phrase-level error recovery techniques
3. Ad-hoc vs systematic error recovery → Less chance to ask

✅ So, if you are short on time → focus first on:

1. Phases of compiler
2. Lexical analysis basics (lexeme, token, DFA/NFA, buffering)
3. Parsing techniques (LL(1), SLR, shift-reduce, recursive descent)
4. Error recovery

You might also like