[plt-dev] new language dialog, iii

From: Eli Barzilay (eli at barzilay.org)
Date: Sat Jan 30 22:41:52 EST 2010

On Jan 30, Matthew Flatt wrote:
> At Sat, 30 Jan 2010 18:28:48 -0500, Eli Barzilay wrote:
> > In any case, perhaps it's best to have some "skip whitespace and
> > comments" function from mzscheme to deal with this situation.
> > Matthew: is this difficult to get?
> 
> It's awkward. How about having `read-language' (or a variant?)
> somehow report where the specification after `#lang' or `#!'
> started?  Currently, `read-language' implicitly reports the end of
> the specification by leaving the port position there; if it seems
> useful, we could make that more explicit at the same time.

That sounds fine too.  But see also the other thread -- how about some
parameter that has a function that gets invoked after (or around) the
language is parsed?  This function can receive arguments specifying
the get-info module, as well as the current position and the start
position.  (If it's some around hook, it can even record these
locations itself.)  Would that be better in producing the extra
information as well as being able to extract it in one single run?

I'm thinking of some kind of a language guard like parameter, which
can prohibit some languages, and/or restrict what the language parser
can do, and as a by-product react to the "event" of parsing the
language.


> At Sat, 30 Jan 2010 19:15:31 -0500, Eli Barzilay wrote:
> > (Now that I went through that whole story, I think that I've
> > convinced myself that using the complete set of sexpr comments is
> > the right thing.  Even "#;"...)
> 
> That's where I always end up, too. A somewhat more restrictive
> syntax would work, but it wouldn't be especially simple. It's
> easiest to just use the syntax that we already have, even if it's a
> bit Scheme-centric.

(FWIW, I think that until this thread I just assumed that pre-#lang
comments will get prohibited at some point...)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!


Posted on the dev mailing list.