On Dec 29, 2014, at 3:23 AM, Thien-Thi Nguyen <[email protected]> wrote: > () Matt Wette <[email protected]> > () Sun, 28 Dec 2014 16:23:28 -0800 > > Now in the code I will need to be going through the > productions checking if symbols are terminals (i.e., declared > with "token"). This could end up being inefficient. > > Why could it end up being inefficient? >
(define (non-terminal? term tokl) (and (symbol? term) (not (memq term tokl)))) versus (define (non-terminal? term) (symbol? term))
