racket/collects/redex/tests/syn-err-tests/relation-definition.rktd
2011-11-20 21:34:22 -06:00

27 lines
663 B
Racket
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(#rx"expected the name of the relation"
([bad-def (define-relation syn-err-lang R)])
bad-def)
(#rx"expected a sequence of patterns separated by"
([subset ])
(define-relation syn-err-lang R subset))
(#rx"expected clause definitions"
([bad-def (define-relation syn-err-lang foo c)])
bad-def)
(#rx"expected a pattern"
([cross ×])
(define-relation syn-err-lang foo c cross))
(#rx"found a 'where' clause not at the end"
([first-where (where any_c any_a)]
[first-post-where (R () ())])
(define-relation syn-err-lang
[(R () ())]
[(R (any_a) (any_b))
(R anc_c any_d)
first-where
(where any_d any_b)
first-post-where]))