Recursive Descent: Example 1/4
E
E’
T
T’
F
i
+
(
1
4
8
*
)
$
1
4
7
2
6
5
3
6
3
6
Procedure GetNextToken;
begin
{ this procedure get the next token to global variable “token”}
end
function E: boolean;
begin
  E := false;
  if token in ['i', '('] then
     { simulation of rule 1: E ® TE’ }
E := T and E1;
end;
function T: boolean;
begin
  T := false;
  if token in ['i', '('] then
     { simulation of rule 4: T ® FT’ }
     T := F and T1;
end;
• For E Î N: Rule 1: E ® TE’
• For T Î N: Rule 4: T  ® FT’
E
E’
T
T’
F
i
+
(
1
4
8
*
)
$
1
4
7
2
6
5
3
6
3
6
42/57
1
4