*** empty log message ***

original commit: 0f48582a9dcca459732fee3b7e949bcd5402ed37
tokens
Scott Owens 23 years ago
parent e8c9c4d877
commit f520a564ed

@ -118,7 +118,9 @@
(lambda ()
,(if src-pos
`(err #t (token-name tok) (token-value tok) (cadr ip) (caddr ip))
`(err #t (token-name tok) (token-value tok)))))))))
`(err #t (token-name tok) (token-value tok)))
(raise-read-error (format "parser: got token of unknown type ~a" (token-name tok)))))))))
(lambda (get-token)
(let parsing-loop ((stack (list 0))
(ip (get-token)))
@ -141,7 +143,7 @@
((symbol? ip) (make-token ip #f))
((token? ip) ip)
(else (raise-type-error 'parser "token or symbol" 0 ip)))))
(action (find-action stack tok) ,@(if src-pos `(ip) `())))
(action (find-action stack tok ,@(if src-pos `(ip) `()))))
(cond
((shift? action)
;; (printf "shift:~a~n" (shift-state action))

Loading…
Cancel
Save