SLIDE 1
2
Outline
- Informal sketch of lexical analysis
– Identifies tokens in input string
- Issues in lexical analysis
– Lookahead – Ambiguities
- Specifying lexical analyzers (lexers)
Introduction to Lexical Analysis Outline Informal sketch of - - PowerPoint PPT Presentation
Introduction to Lexical Analysis Outline Informal sketch of lexical analysis Identifies tokens in input string Issues in lexical analysis Lookahead Ambiguities Specifying lexical analyzers (lexers) Regular
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
two variables i and f?
two equal signs = =?
20
21
22
23
24
25
26
*
27
*
i i
≥
28
29
*
30
*
* *
31
32
33
+
34
36
37
38
39
40
∈ L(R)
∈ L(Rj )
41
42
∈ L(R)
∈ L(R)
43
∈ L(Rj )
∈ L(Rk )
44
45
68
69
70
71