racket/collects/redex/examples/cont-mark-transform/TL-syntax.rkt
Robby Findler 0c6e0a11cf removed ambiguity from the cont-mark-transform's "a" non-terminal
Redex no longer has extra checks to eliminate redundant matches
(as those checks are prohibitively expensive for the lambdajs model)
so redundancy in the grammar can, when combined with context
decomposition or named patterns, lead to significant slowdowns
2012-01-09 12:57:22 -06:00

36 lines
444 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.

#lang racket
(require redex)
(provide TL)
(define-language TL
(e a
(a ... e)
(letrec ([σ v] ...) e)
(w-c-m a a e)
(c-c-m [a ...])
(match a l ...)
(abort e))
(l [(K x ...) e])
(a (λ (x ...) e)
σ
x
(K a ...))
(w v
x)
(v (λ (x ...) e)
(K v ...)
σ)
(x variable-not-otherwise-mentioned)
(σ (ref variable))
(Σ
(Σ [σ v]))
(K string))