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[
>> ::= '()
>> |
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 )
]
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! :)
__
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 )
>
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).
5 matches
Mail list logo