unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* (sxml match)
@ 2010-05-25 21:42 Ludovic Courtès
  2010-05-26 12:39 ` Andy Wingo
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2010-05-25 21:42 UTC (permalink / raw)
  To: guile-devel

[-- Attachment #1: Type: text/plain, Size: 966 bytes --]

Hello!

There’s now a new (sxml match) module, containing Jim Bender’s excellent
SXML pattern matcher (released under the X11/MIT license):

  http://planet.plt-scheme.org/package-source/jim/sxml-match.plt/1/1/

I integrated the doc in the manual.  Unfortunately it can’t be made to
appear close to the automatically generated doc of (sxml simple), so it
actually appears before.  I’m open to suggestions to improve that.

The test suite reveals an interesting psyntax “problem”: renaming the
‘xyzpq’ variable in sxml-match-tests.ss to ‘x’ leads to:

--8<---------------cut here---------------start------------->8---
ERROR: In procedure macroexpand:
ERROR: identifier out of context in subform `x' of `(quote (d (a 1 2 3) (a 4 5) (a 6 7 8) (a 9 10)))'
--8<---------------cut here---------------end--------------->8---

Ideas?

(Would be good if psyntax error reporting contained source location
info.)

Thanks,
Ludo’.

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: (sxml match)
  2010-05-25 21:42 (sxml match) Ludovic Courtès
@ 2010-05-26 12:39 ` Andy Wingo
  2010-05-26 14:12   ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Wingo @ 2010-05-26 12:39 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guile-devel

Hi,

On Tue 25 May 2010 23:42, ludo@gnu.org (Ludovic Courtès) writes:

> There’s now a new (sxml match) module, containing Jim Bender’s excellent
> SXML pattern matcher (released under the X11/MIT license):

Cool :)

> I integrated the doc in the manual.  Unfortunately it can’t be made to
> appear close to the automatically generated doc of (sxml simple), so it
> actually appears before.  I’m open to suggestions to improve that.

You could put the documentation in the module commentary of (sxml
match), as texinfo. Or you could extend module-commentary somehow to
look for commentaries in other sources. Probably easiest just to paste
the texinfo you already wrote into the commentary, no?

> The test suite reveals an interesting psyntax “problem”: renaming the
> ‘xyzpq’ variable in sxml-match-tests.ss to ‘x’ leads to:
>
> ERROR: In procedure macroexpand:
> ERROR: identifier out of context in subform `x' of `(quote (d (a 1 2 3) (a 4 5) (a 6 7 8) (a 9 10)))'
>
> Ideas?
>
> (Would be good if psyntax error reporting contained source location
> info.)

It would certainly be possible to maintain a stack of source locations
in the expander, and modify syntax-violation to look in that stack.

There is also the possibility of simply inspecting the syntax objects
given to syntax-violation for source info, but it might not be there --
best to have a stack to at least give approximate info.

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: (sxml match)
  2010-05-26 12:39 ` Andy Wingo
@ 2010-05-26 14:12   ` Ludovic Courtès
  2010-05-26 15:47     ` Andy Wingo
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2010-05-26 14:12 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guile-devel

Hi Andy!

Andy Wingo <wingo@pobox.com> writes:

> On Tue 25 May 2010 23:42, ludo@gnu.org (Ludovic Courtès) writes:

>> I integrated the doc in the manual.  Unfortunately it can’t be made to
>> appear close to the automatically generated doc of (sxml simple), so it
>> actually appears before.  I’m open to suggestions to improve that.
>
> You could put the documentation in the module commentary of (sxml
> match), as texinfo. Or you could extend module-commentary somehow to
> look for commentaries in other sources. Probably easiest just to paste
> the texinfo you already wrote into the commentary, no?

Actually I don’t want that much Texinfo in a Scheme file, and I don’t
want the automatically-generated “Usage” subsection.

Besides, I initially started by just putting ‘@include sxml-match.texi’
in the module’s commentary but that didn’t work (I forgot the details.)

>> The test suite reveals an interesting psyntax “problem”: renaming the
>> ‘xyzpq’ variable in sxml-match-tests.ss to ‘x’ leads to:
>>
>> ERROR: In procedure macroexpand:
>> ERROR: identifier out of context in subform `x' of `(quote (d (a 1 2 3) (a 4 5) (a 6 7 8) (a 9 10)))'
>>
>> Ideas?
>>
>> (Would be good if psyntax error reporting contained source location
>> info.)
>
> It would certainly be possible to maintain a stack of source locations
> in the expander, and modify syntax-violation to look in that stack.
>
> There is also the possibility of simply inspecting the syntax objects
> given to syntax-violation for source info, but it might not be there --
> best to have a stack to at least give approximate info.

Thanks for the hints, I’ll try to look into it.

I note that you subtly omitted to comment on the issue above.  :-)

Thanks,
Ludo’.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: (sxml match)
  2010-05-26 14:12   ` Ludovic Courtès
@ 2010-05-26 15:47     ` Andy Wingo
  0 siblings, 0 replies; 4+ messages in thread
From: Andy Wingo @ 2010-05-26 15:47 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guile-devel

Hi,

On Wed 26 May 2010 16:12, ludo@gnu.org (Ludovic Courtès) writes:

> Andy Wingo <wingo@pobox.com> writes:
>
>> On Tue 25 May 2010 23:42, ludo@gnu.org (Ludovic Courtès) writes:
>
>>> I integrated the doc in the manual.  Unfortunately it can’t be made to
>>> appear close to the automatically generated doc of (sxml simple), so it
>>> actually appears before.  I’m open to suggestions to improve that.
>>
>> You could put the documentation in the module commentary of (sxml
>> match), as texinfo.
>
> Actually I don’t want that much Texinfo in a Scheme file, and I don’t
> want the automatically-generated “Usage” subsection.

Well, we can tweak these doc tools to produce what you want then :)

> I note that you subtly omitted to comment on the issue above.  :-)

I have a lot on my plate right now; if you think there is a real bug,
please file a report so someone can get to it later :)

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-05-26 15:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-25 21:42 (sxml match) Ludovic Courtès
2010-05-26 12:39 ` Andy Wingo
2010-05-26 14:12   ` Ludovic Courtès
2010-05-26 15:47     ` Andy Wingo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).