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 name "Parser-tools"))

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

@ -47,7 +47,7 @@
"undefined abbreviation"
stx))
(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)))
(syntax-e stx))

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

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

Loading…
Cancel
Save