lookahead
- here are the procedures that determine which branch of a rule to follow
- how far ahead does each rule look?
-
(define (end?)
(null? input))
(define (assign?)
(and (not (null? (cdr input)))
(eq? (cadr input) ':=)))
(define (compound?)
(and (not (null? (cdr input)))
(or (eq? (cadr input) '+)(eq? (cadr input) '*))))