*** empty log message ***

original commit: 14581fe43cf99d039f9ed61066b96ef16d83c4be
tokens
Scott Owens 23 years ago
parent c8cf7b083f
commit c370b8f4cf

@ -82,6 +82,9 @@
(enter-empty-term $1) (enter-empty-term $1)
(cons $1 $2))))))) (cons $1 $2)))))))
(define (symbol<? a b)
(string<? (symbol->string a) (symbol->string b)))
(define (trans filename) (define (trans filename)
(let* ((i (open-input-file filename)) (let* ((i (open-input-file filename))
(terms (make-hash-table)) (terms (make-hash-table))
@ -107,8 +110,8 @@
(let ((t (get-token-grammar i))) (let ((t (get-token-grammar i)))
t))))) t)))))
`(begin `(begin
(define-tokens t ,(quicksort (hash-table-map terms (lambda (k v) k)) string<?)) (define-tokens t ,(quicksort (hash-table-map terms (lambda (k v) k)) symbol<?))
(define-empty-tokens et ,(quicksort (hash-table-map eterms (lambda (k v) k)) string<?)) (define-empty-tokens et ,(quicksort (hash-table-map eterms (lambda (k v) k)) symbol<?))
(parser (parser
(start ___) (start ___)
(end ___) (end ___)

Loading…
Cancel
Save