Program, preterminal symbol ID, and one other nonterminal symbol, and is consistent with the simplified attribute grammar given below.
program → expr '+' : expr1 → expr2 expr3 '-' : expr1 → expr2 expr3 '*' : expr1 → expr2 expr3 '/' : expr1 → expr2 expr3 id : expr → ε
// fragment 1 // fragment 2
foo a; foo a, c, d;
bar b; bar b;
foo c = a; c = a;
foo d = b; d = b;
A value is a first class value iff it can be passed as a parameter, returned from a subroutine, and assigned into a variable. A closure consists of a reference to the code for a subroutine, and a reference to an environment.
((p 5) 2) given the following definition of p?
(define (p a)
(lambda (x) (+ x a)))