lalr(1) in cl
Parsing is easy with cl-yacc. With just the
(defun list-lexer (list)
#'(lambda ()
(let ((value (pop list)))
(values value value))))
(define-parser my-parser
(:start-symbol S)
(:terminals (a b))
(S (a S b) ()))
code you’ve already been able to parse like
CL-USER> (parse-with-lexer (list-lexer '(a a b b)) my-parser) (A (A NIL B) B) CL-USER>