Hi, in my quest to play parsing, I'm failing when I try to cope with comments. Here's an excerpt from my current file (define my-grammar (lalr-spec (start my-file) (grammar ;; boring grammar details elided ))) (define mach (make-lalr-machine aq-grammar)) (define mtab (lalr-match-table mach)) (define gen-lexer (make-lexer-generator mtab #:comm-reader (make-comm-reader '(("#" . "\n"))))) (define raw-parse (make-lalr-parser mach)) (define (parse) (raw-parse (gen-lexer))) ;; (gen-lexer) (parse) Comments are shell-like, from "#" to end of line. Grammar works fine so-far, but when (parse) sees a hash-comment (even just a one-line input # this is a comment it panics: Backtrace: In ice-9/boot-9.scm: 1736:10 6 (with-exception-handler _ _ #:unwind? _ # _) In unknown file: 5 (apply-smob/0 #) In ice-9/boot-9.scm: 718:2 4 (call-with-prompt ("prompt") # …) In ice-9/eval.scm: 619:8 3 (_ #(#(#))) In ice-9/boot-9.scm: 2806:4 2 (save-module-excursion #) 4351:12 1 (_) In nyacc/parse.scm: 78:4 0 (_ _ #:debug _) nyacc/parse.scm:78:4: Throw to key `nyacc-error' with args `("~A:~A: parse failed at state ~A, on input ~S" "(unknown)" 1 0 " a comment")'. I feel I'm doing something stupid. What can I do to understand what's going on? Thanks & cheers -- tomás