SLIDE 1
2
Outline
- Regular languages revisited
- Parser overview
- Context-free grammars (CFG’s)
- Derivations
- Ambiguity
- Syntax errors
Introduction to Parsing Ambiguity and Syntax Errors Outline - - PowerPoint PPT Presentation
Introduction to Parsing Ambiguity and Syntax Errors Outline Regular languages revisited Parser overview Context-free grammars (CFGs) Derivations Ambiguity Syntax errors 2 Languages and Automata Formal
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
1 1 n m
∗
1 1 n m
18
1 1
n n i
∗
19
20
21
22
23
24
25
26
1 n
1 n
27
28
29
30
31
32
33
34
35
36
– At each step, replace the left-most non-terminal
– Shown on the right
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
E E E E E + int + int int E E E E E + int + int int
55
E E E E E + int * int int E E E E E * int + int int
56
57
58
59
60
61
62