[racket] syntax-parse and literals

From: Shriram Krishnamurthi (sk at cs.brown.edu)
Date: Fri Sep 2 21:31:43 EDT 2011

I am having some trouble figuring out how to use syntax-parse in
combination with wanting literals (aka, internal keywords) in a macro
definition.  I have

  (syntax-case stx (:)

and am trying to achieve a similar effect.  I tried

  (syntax-parse stx #:literals(:)

but that resulted in

  syntax-parse: literal is unbound in phase 0 (phase 0 relative to the
enclosing module) in: :

I don't see an example of this in the docs.  Since I have only one
literal, I was hoping to avoid the complexity of literal-sets --
basically, attain the equivalent of the (:) in syntax-case.



Posted on the users mailing list.