chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] format-modular feature request: defining one's own m


From: Kon Lovett
Subject: Re: [Chicken-users] format-modular feature request: defining one's own multi-part formats
Date: Sat, 8 Mar 2008 08:48:22 -0800


On Mar 7, 2008, at 2:27 PM, Robin Lee Powell wrote:

On Fri, Mar 07, 2008 at 01:39:02PM -0800, Kon Lovett wrote:
You can override the existing semantics by supplying your own
procedures. However access to the state object is very restricted
to the public. So not all functionality that the *formatter-foo*
provide can be reproduced by an external formatter. And the public
cannot extend the state object, which might be necessary to
implement own  "before-and-after escape sequences".

Right; that's exactly what I was asking for as a feature request.

But that doesn't mean you cannot override the existing semantics. You
just cannot do everything.

(define (formatter-open state start params colon atsign)
  ... )

(define (formatter-close state start params colon atsign)
  ... )

OK, so having done that (and the other stuff you snipped) how do I
get access to everything between ~( and ~), and replace all of it in
the formatted output?  As far as I know, I can't do that without
some form of access to the state object.

Yep, to achieve your goal, you cannot.


It seems to me that you could allow limited access to the state
object; something like (start-long-fomatter 'name) which would do
the sort of state-setup stuff that formatter-cond-start does, and
similarily for formatter-cond-next and formatter-cond-end.  But I
certainly do not understand the format-modular code, so I could be
completely wrong.

Yeah, I didn't understand it at first either.

This will take some time. Are you sure you cannot get most of what you want from the existing format?


-Robin

--
Lojban Reason #17: http://en.wikipedia.org/wiki/Buffalo_buffalo
Proud Supporter of the Singularity Institute - http://singinst.org/
http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/


_______________________________________________
Chicken-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/chicken-users

Best Wishes,
Kon






reply via email to

[Prev in Thread] Current Thread [Next in Thread]