Re: [racket] [scribble] pipe in code

2011-11-22 Thread Eric Tanter
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[ >> ::= '() >> |

Re: [racket] [scribble] pipe in code

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

Re: [racket] [scribble] pipe in code

2011-11-22 Thread Grant Rettke
On Tue, Nov 22, 2011 at 1:40 PM, Matthias Felleisen wrote: > Have you tried the BNF grammars in scribble section: > >  http://doc.racket-lang.org/scribble/bnf.html?q=grammar Awesome. You guys make people wish they had a problem to solve using Racket! :) __

Re: [racket] [scribble] pipe in code

2011-11-22 Thread Matthias Felleisen
Have you tried the BNF grammars in scribble section: http://doc.racket-lang.org/scribble/bnf.html?q=grammar On Nov 22, 2011, at 2:14 PM, Eric Tanter wrote: > Hi, > > I want to typeset a BNF with Scheme-like syntax highlighting. > > eg: > > @racketblock[ > ::= '() > | (cons ) >

[racket] [scribble] pipe in code

2011-11-22 Thread Eric Tanter
Hi, I want to typeset a BNF with Scheme-like syntax highlighting. eg: @racketblock[ ::= '() | (cons ) ] except that the pipe `|' causes problem. I figured out that I can do the above with @verbatim|{...}| but then I lose the syntax highlighting ('() as a value, brown parentheses).