v3.99.0.2

svn: r7706

original commit: 39cedb62edf9258b051a22a29a90be9c6841956f
tokens
Matthew Flatt 17 years ago
parent de3e4f1b67
commit d617166dca

@ -1,5 +1,5 @@
(module info (lib "infotab.ss" "setup") (module info setup/infotab
(define doc.txt "doc.txt") (define doc.txt "doc.txt")
(define name "Parser-tools")) (define name "Parser-tools"))

@ -149,7 +149,7 @@
(identifier? (syntax name)) (identifier? (syntax name))
(syntax/loc stx (syntax/loc stx
(define-syntax name (define-syntax name
(make-lex-abbrev (quote-syntax re))))) (make-lex-abbrev (lambda () (quote-syntax re))))))
(_ (_
(raise-syntax-error (raise-syntax-error
#f #f

@ -47,7 +47,7 @@
"undefined abbreviation" "undefined abbreviation"
stx)) stx))
(set-box! disappeared-uses (cons stx (unbox disappeared-uses))) (set-box! disappeared-uses (cons stx (unbox disappeared-uses)))
(parse (lex-abbrev-abbrev expansion)))) (parse ((lex-abbrev-get-abbrev expansion)))))
(_ (_
(or (char? (syntax-e stx)) (string? (syntax-e stx))) (or (char? (syntax-e stx)) (string? (syntax-e stx)))
(syntax-e stx)) (syntax-e stx))

@ -5,7 +5,7 @@
(define max-char-num #x10FFFF) (define max-char-num #x10FFFF)
(define-struct lex-abbrev (abbrev)) (define-struct lex-abbrev (get-abbrev))
(define-struct lex-trans (f)) (define-struct lex-trans (f))
#;(define-syntax test-block #;(define-syntax test-block

@ -343,7 +343,7 @@
(make-object lr0% (make-object lr0%
automaton-term automaton-term
automaton-non-term automaton-non-term
(list->vector (reverse! seen-kernels)) (list->vector (reverse seen-kernels))
epsilons)) epsilons))
((null? old-kernels) ((null? old-kernels)
(loop (deq! new-kernels) seen-kernels)) (loop (deq! new-kernels) seen-kernels))
@ -358,15 +358,15 @@
(make-q null null)) (make-q null null))
(define (enq! q i) (define (enq! q i)
(if (empty-queue? q) (if (empty-queue? q)
(let ((i (list i))) (let ((i (mcons i null)))
(set-q-l! q i) (set-q-l! q i)
(set-q-f! q i)) (set-q-f! q i))
(begin (begin
(set-cdr! (q-l q) (list i)) (set-mcdr! (q-l q) (mcons i null))
(set-q-l! q (cdr (q-l q)))))) (set-q-l! q (mcdr (q-l q))))))
(define (deq! q) (define (deq! q)
(begin0 (begin0
(car (q-f q)) (mcar (q-f q))
(set-q-f! q (cdr (q-f q))))) (set-q-f! q (mcdr (q-f q)))))
) )

Loading…
Cancel
Save