Re: [racket] Help: Scribble does not see readtable extensions when loading a module

2011-06-29 Thread Matthias Felleisen
__current-print-convert-hook__ might be your friend though I think it would have to recognize the pattern (make-mset #()) On Jun 29, 2011, at 6:54 AM, Maurizio Giordano wrote: > Hi Carl, Matthias and Eli, > > first of all I want to thank you for your help. > You are very skilled schem

Re: [racket] Help: Scribble does not see readtable extensions when loading a module

2011-06-29 Thread Maurizio Giordano
Hi Carl, Matthias and Eli, first of all I want to thank you for your help. You are very skilled schemers ... compared to me! I left lisp in 1995 (my thesis work) an now I restarted with racket scheme (it's never too late!). Anyway I followed Carl's 1st solution: 1) put a #reader directive before

Re: [racket] Help: Scribble does not see readtable extensions when loading a module

2011-06-27 Thread Eli Barzilay
About a minute ago, Carl Eastlund wrote: > On Mon, Jun 27, 2011 at 4:43 PM, Eli Barzilay wrote: > > An hour ago, Carl Eastlund wrote: > >> This probably requires a new language implementation similar to > >> #lang s-exp that specifies the reader but allows you to specify any > >> language bindings

Re: [racket] Help: Scribble does not see readtable extensions when loading a module

2011-06-27 Thread Carl Eastlund
On Mon, Jun 27, 2011 at 4:43 PM, Eli Barzilay wrote: > An hour ago, Carl Eastlund wrote: >> This probably requires a new language implementation similar to >> #lang s-exp that specifies the reader but allows you to specify any >> language bindings, in this case scribble/manual. > > IIUC, this part

Re: [racket] Help: Scribble does not see readtable extensions when loading a module

2011-06-27 Thread Eli Barzilay
An hour ago, Carl Eastlund wrote: > This probably requires a new language implementation similar to > #lang s-exp that specifies the reader but allows you to specify any > language bindings, in this case scribble/manual. IIUC, this part is equivalent to just using `#reader' before the `#lang' line

Re: [racket] Help: Scribble does not see readtable extensions when loading a module

2011-06-27 Thread Matthias Felleisen
What Carl means is something like this: @;% @(begin #reader scribble/comment-reader (schemeblock ;; Int -> Int ;; increment the argument by 1 (define (plus1 x) (+ x 1)) )) @;% If I don't set the sribble/comment-reader the ;-line comments disappear. -- Matthias On Jun 27, 2011, at 3:32

Re: [racket] Help: Scribble does not see readtable extensions when loading a module

2011-06-27 Thread Carl Eastlund
Maurizio, Modules, including Scribble documents, are read in their entirety before any compilation or evaluation is performed. The read error you have seen happens long before your mymodule language gets involved. There are a few different ways to fix the example. First, you could put a #reader

[racket] Help: Scribble does not see readtable extensions when loading a module

2011-06-27 Thread maurizio.giorda
Hi everyone, I have developed a racket module that implements a new language. In this module I have readtable re-definition like this: mymodule.rkt- (module mymodule (require racket/base) ... ; new readtable with extensions to support the reading of a new ; data s