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

Re: [plt-scheme] Adding a language

I think that you could do a very nice job of this and even support
languages other than Scheme -- (eg Algol 60).

Here's what I would do:

  - add a "Compile to Forth" button/menu to DrScheme via the
    tools interface.

  - have this button get the current drscheme:language:language<%> 
    (this tells you how to compile the program in the definitions
     window into Scheme) and use the front-end method to
    get Scheme code out. 

  - invoke the Scheme -> Forth compiler on that code and somehow
    hook that up to the LEGO Mindstorm.

Let me know how it goes!


At Fri, 31 May 2002 08:48:23 -0500 (EST), Matt Jadud wrote:
> Hello,
> 	I have, with a colleague, completed a Scheme->Forth compiler for a
> subset of Scheme (lambda, letrec, let, begin, if, and a handfull of primitives,
> off the top of my head). This is mostly useless, except a small Forth
> implementation exists for the LEGO Mindstorm, and it saves me implementing
> a Scheme runtime for the RCX at this moment.
> 	What would be the "right" way to tie this into DrScheme?
>  * Is it an extention of one of the languages built in to DrScheme? If so, I
> need to expand the syntactic forms in those languages to my core language
> before compilation, and add some primitives to the language for things like
> turning on motors, etc.
>  * Is it a new language? If so, what should I use as my model for
> implementation? The Algol60 implementation? Given that my language is,
> by-and-large, Scheme, this seems like the wrong model. The teaching languages
> seem closer, but again I'd want to leverage the "provide-and-document" work
> that has already be done, and I would need to replace the "back-end" of these
> languages.
>  * Is it a teachpack?
>  * Is it a tool?
> 	I can also envision several solutions for getting the code to the RCX,
> but will deal with that after the front-end has been implemented.
> 	Thanks,
> 	Matt
> ________________________________________________________________________
> Matt Jadud                            http://www.cs.indiana.edu/~mjadud/
> Current Temperature Outside Lindley Hall                 70.0 F / 21.1 C
> Canterbury Weather: High 60 F / 16 C, Low 46 F / 8 C, Sunny (Day)