[racket] [scribble] pipe in code

From: Eric Tanter (etanter at dcc.uchile.cl)
Date: Tue Nov 22 15:08:17 EST 2011

I didn't know about scribble/bnf -- that's plain PERFECT for my needs.

Thanks a lot!

-- Éric

PS: and thanks for the unquote-hacky solution, too!

On Nov 22, 2011, at 5:01 PM, Matthew Flatt wrote:

> At Tue, 22 Nov 2011 16:14:55 -0300, Eric Tanter wrote:
>> @racketblock[
>> <list> ::= '()
>>         | (cons <val> <list>)
>> ]
> 
> While `scribble/bnf' is a better approach, you could use
> 
> @(define IS (tt "::="))
> @(define OR (tt " | "))
> @racketblock[
> <list> @#,IS '()
>        @#,OR (cons <val> <list>)
> ]
> 
> 




Posted on the users mailing list.