[plt-scheme] [redex] language keywords

From: Eric Tanter (etanter at dcc.uchile.cl)
Date: Wed Jun 2 22:02:40 EDT 2010

>> Is there something as simple/direct as the list of keywords in syntax-rules/syntax-case?
>> If not, any alternative suggestion?
>> 
>> Thanks!
>> 
>> -- Éric
> 
> Take a look at variable-prefix.  In my latest Redex work, variables
> all start with x, y, or z, and I just have to avoid any keywords that
> start with those.

Thanks Carl,

I'm using these as well, actually. 
A problem I have is that, for readability, I have a non-terminal which is define as (x >> x) where '>>' is a keyword. I know I could just use (x x) for exactly the same, but it does enhance readability. 
The problem is that >> is considered as a pattern variable...

with macros I could just say:
(syntax-rules (>>)
  ((x >> x) ...))

Any idea?

-- Éric

Posted on the users mailing list.