<br><div class="gmail_quote">On Mon, Mar 22, 2010 at 6:11 PM, Ben Weaver <span dir="ltr"><<a href="mailto:ben@orangesoda.net">ben@orangesoda.net</a>></span> wrote:</div><div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="gmail_quote"><div>What I've been thinking of is basically a parser for a nearly-JS syntax that generated s-expressions targeting some lightweight macro layer.  Where JS and Scheme semantics or runtime environments diverged, it'd be fine to use Scheme's.  Instead of implementing a JS interpreter, it'd be a JS-like syntax for the Scheme interpreter.</div>
</div></blockquote><div><br></div><div>Yep, that's exactly what I was thinking.  It might require a little more than a lightweight macro layer, though.  I would like to translate "return" statements into calls to continuations, and make sure the code flow is as expressive as javascript's.  You are right in that there is little difficulty in mapping Javascript-like syntax to Scheme.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote"><div><div>If you've got something different in mind, I'd be up for helping anyway.  I think a JS syntax for Scheme is a great way to introduce people to Scheme that wouldn't be interested otherwise.</div>
</div></div></blockquote><div><br></div><div>Great!  We should talk more about it soon.  What do you think about lexers like SILex?  Or maybe we can pull a Javascript parser from an existing library.  It's tempting to try to write something from scratch though.  I'll probably start doing some research over the next couple of weeks.  (btw, I'll probably see you soon Ben in your office!)</div>
<div><br></div><div>- James</div></div>