This patch enables character literals as terminals in a LALR grammar. It is safe to apply on Chicken because eq? can be used to compare characters. (Otherwise, memq needs to be changed to memv, etc. in lalr-driver.scm.) Patch not applied at this time. -- zbigniew Index: lalr-driver.scm =================================================================== --- lalr-driver.scm (revision 21903) +++ lalr-driver.scm (working copy) @@ -124,7 +124,8 @@ (attr (___value ___input)) (act (___action i (vector-ref ___atable state)))) - (cond ((not (symbol? i)) + (cond ((and (not (symbol? i)) + (not (char? i))) (___errorp "Syntax error: invalid token: " ___input) #f) Index: lalr.scm =================================================================== --- lalr.scm (revision 21903) +++ lalr.scm (working copy) @@ -1311,7 +1311,9 @@ (symbol? x)) (define (valid-terminal? x) - (symbol? x)) ; DB + (or (symbol? x) + (char? x)) + ) ; DB ;; ---------------------------------------------------------------------- ;; Miscellaneous