|
|
@ -136,10 +136,15 @@
|
|
|
|
(cond
|
|
|
|
(cond
|
|
|
|
((null? rest) current-guess)
|
|
|
|
((null? rest) current-guess)
|
|
|
|
((shift? (car rest)) (car rest))
|
|
|
|
((shift? (car rest)) (car rest))
|
|
|
|
((< (reduce-prod-num (car rest))
|
|
|
|
((and (reduce? (car rest))
|
|
|
|
(reduce-prod-num current-guess))
|
|
|
|
(< (reduce-prod-num (car rest))
|
|
|
|
|
|
|
|
(reduce-prod-num current-guess)))
|
|
|
|
(loop (car rest) (cdr rest)))
|
|
|
|
(loop (car rest) (cdr rest)))
|
|
|
|
(else (loop current-guess (cdr rest))))))
|
|
|
|
((accept? (car rest))
|
|
|
|
|
|
|
|
(fprintf (current-error-port)
|
|
|
|
|
|
|
|
"accept/reduce or accept/shift conflicts. Check the grammar for useless cycles of productions~n"))
|
|
|
|
|
|
|
|
(loop current-guess (cdr rest))
|
|
|
|
|
|
|
|
(else (loop current-guess (cdr rest))))))
|
|
|
|
(else entry)))))
|
|
|
|
(else entry)))))
|
|
|
|
(send a for-each-state
|
|
|
|
(send a for-each-state
|
|
|
|
(lambda (state)
|
|
|
|
(lambda (state)
|
|
|
|