*** empty log message ***

original commit: a82a3eb0a7ae8c28f8f80538c34f99cc08c39c93
tokens
Scott Owens 23 years ago
parent b05f4915a9
commit 30f960322a

@ -265,23 +265,32 @@
(syntax-case prod-so () (syntax-case prod-so ()
((prod-rhs-sym ...) ((prod-rhs-sym ...)
(andmap identifier? (syntax->list prod-so)) (andmap identifier? (syntax->list prod-so))
(list->vector (begin
(map (lambda (s) (for-each (lambda (t)
(hash-table-get (if (memq (syntax-object->datum t) end-terms)
term-table (raise-syntax-error
(syntax-object->datum s) 'parser-production-rhs
(lambda () (format "~a is an end token and cannot be used in a production"
(hash-table-get (syntax-object->datum t))
non-term-table t)))
(syntax-object->datum s) (syntax->list prod-so))
(lambda () (list->vector
(raise-syntax-error (map (lambda (s)
'parser-production-rhs (hash-table-get
(format term-table
"~a is not declared as a terminal or non-terminal" (syntax-object->datum s)
(syntax-object->datum s)) (lambda ()
s)))))) (hash-table-get
(syntax->list prod-so)))) non-term-table
(syntax-object->datum s)
(lambda ()
(raise-syntax-error
'parser-production-rhs
(format
"~a is not declared as a terminal or non-terminal"
(syntax-object->datum s))
s))))))
(syntax->list prod-so)))))
(_ (_
(raise-syntax-error (raise-syntax-error
'parser-production-rhs 'parser-production-rhs

Loading…
Cancel
Save