[plt-scheme] [redex] language keywords

From: Casey Klein (clklein at eecs.northwestern.edu)
Date: Wed Jun 2 22:15:56 EDT 2010

On Wed, Jun 2, 2010 at 9:02 PM, Eric Tanter <etanter at dcc.uchile.cl> wrote:
>>> 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?
>

I don't follow. The variables in a Redex pattern are always named
after non-terminals, so I don't see how >> could be treated as a
pattern variable.

Do you mean that >> matches one of your six classes of variables?


Posted on the users mailing list.