2078 1

CSC376 · 2078 · 10 marks

List out the tasks performed by Lexical Analyser. Define DFA. Convert the Regular Expression (a+b)∗a(a+b)(a+b)^*a(a+b)(a+b)∗a(a+b) to DFA directly.

List out the tasks performed by Lexical Analyser. Define DFA. Convert the Regular Expression (a+b)∗a(a+b)(a+b)^*a(a+b)(a+b)∗a(a+b) to DFA directly.[10]

Compiler Design and ConstructionChapter 2: Lexical, Syntax and Semantic AnalysisFinite Automata relevant to compiler construction syntactic Numerical: regular expression to DFA
  • RE to convert (canonical/deduplicated form): $r = (a+b)^,a,(a+b)$ - Alphabet: $\Sigma = {a, b}$ - Marks: 10 Note: The question string repeats the pattern; the intended standard example is $(a+b)^a(a+b)$. --- 1. Scanning the source program character by character. 2. Tokenization - grouping c...