SLIDE 1
2
Outline
- Informal sketch of lexical analysis
– Identifies tokens in input string
- Issues in lexical analysis
– Lookahead – Ambiguities
- Specifying lexical analyzers (lexers)
Outline Informal sketch of lexical - - PowerPoint PPT Presentation
Outline Informal sketch of lexical analysis Identifies tokens in input string Issues in lexical analysis Lookahead Ambiguities Specifying lexical analyzers
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
1 1 1 1
60
61
62
63
64
65
66
67
68
69
70
71