Hi, I'm trying to compile code which uses Dominique Boucher's lalr parser generator in chicken-5. This does not work the way it did in chicken-4.
I compile like this $ chicken place-common.scm -output-file place-common.c -setup-mode -include-path . -verbose -extend ../mechanism/notation/Lalr/lalr-gen.scm i.e., I use -extend to inject the parser generator into the macro expander. (The file[1] lalr-gen.scm is just Dominique's parser generator code, not the runtime/driver part.) AND I do have a module[2], which is supposed to provide the same service at runtime. "place-common" imports the module: Error: during expansion of (lalr-parser9165 ...) - unbound variable: bitwise-ior Call history: <eval> [initialize-F] (vector-ref shift-table stateno) <eval> [initialize-F] ((##core#letrec* ((loop2 (##core#loop-lambda (j edges) (if (pair? j) (let ((symbol (vector-ref acces... <eval> [initialize-F] (shift-shifts sp) <eval> [shift-shifts] (vector-ref s 2) <eval> [initialize-F] (pair? j) <eval> [initialize-F] (vector-ref acces-symbol (car j)) <eval> [initialize-F] (car j) <eval> [initialize-F] (< symbol nvars) <eval> [initialize-F] (set-bit rowf (- symbol nvars)) <eval> [initialize-F] (- symbol nvars) <eval> [set-bit] (quotient b (BITS-PER-WORD)) <eval> [set-bit] (inexact->exact (expt 2 (remainder b (BITS-PER-WORD)))) <eval> [set-bit] (expt 2 (remainder b (BITS-PER-WORD))) <eval> [set-bit] (remainder b (BITS-PER-WORD)) <eval> [set-bit] (vector-set! v x (logical-or (vector-ref v x) y)) <eval> [set-bit] (bitwise-ior597 (vector-ref v x) y) <-- Looks to me as if the define-syntax in [1] gets some renaming it should not: (define-syntax logical-or (syntax-rules () ((logical-or x ...) (bitwise-ior x ...)))) Am I doing something wrong, which should not have been working in chicken4 either? How should I fix this? Thanks a lot /Jörg [1] https://gitlab.com/ball-zero/ball/blob/chicken_argvector/ball/mechanism/notation/Lalr/lalr-gen.scm [2] https://gitlab.com/ball-zero/ball/blob/chicken_argvector/ball/chicken/lalrgen.scm _______________________________________________ Chicken-hackers mailing list Chicken-hackers@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-hackers