SISC emit-annotations

Andrew Wilcox <schematics-dev-1nkB91yrSd/a/[email protected]> Thu, 5 May 2005 05:47:06 -0700 (PDT)
Newsgroups gmane.lisp.scheme.plt.schematics
Message-ID <[email protected]>
I wrote:
> SISC does not have source code location information, so text-ui
> prints "unknown" for failed test cases.

Tony Garnock-Jones wrote:
> It should do - look in the manual for the configuration parameter
> "emit-annotations", which if set to #t should propagate location
> information correctly.

EMIT-ANNOTATIONS causes the SISC Scheme *reader* to include source
file location information.  However the location information is *not*
propagated by the macro system.  Thus after macro expansion, only
source that didn't go through macro expansion still has location
information.

Which, I would guess, is why PLT has the various macro source location
extensions such as SYNTAX/LOC and so on.  Macros combine code from two
different places (the macro body and the source being expanded), so
you need some way to say which source code location to give to the
result.

But still... might it be possible for SchemeUnit to capture location
information in SISC?  Could be.  The original syntax object passed to
a macro transformer has location information; the information is not
present in pattern variables after pattern matching by SYNTAX-RULES or
SYNTAX-CASE.  So you might be able to capture location information, if
you get to it early enough.

Or... port PLT's macro expansion system to SISC!

   :-)

Andrew Wilcox


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20