[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What is Guile?
Re: What is Guile?
Mon, 8 Sep 2003 14:39:12 -0700 (PDT)
> I haven't seen much documentation suggesting why guile can
> support other languages better. Has someone written such a
> document? It would go a long way to getting the author of a new
> language to implement his language's interpreter or compiler
> ontop of guile.
The idea comes from Scheme itself - it doesn't really have a syntax. It's
just a raw parse tree with some primitives. Using a combination of
function definitions, macro definitions, etc., you can easily modify
scheme to work like any system you want. Then you just need a parser to
convert the raw code into a parse tree, and have your scheme interpretter
run your parse tree.
Basically, what you would need is the following:
a) a flag in Guile so that you could specify which parser / language
module to use
b) the ability to create both macros and definitions within a closed
environment which can be applied to a list (i.e. parse tree - I believe
this is already there)
c) an interface definition for parsers and language providers.
Basically, the parser would need to be given an environment for a
language, parse the string or input file to a list, and eval that list
within the environment it was passed.
For examples of Scheme used as a syntaxless representation of multiple
languages, see Kamin's "Programming Languages: An INterpretter-Based
Approach" and "Essentials of Programming Languages". Now, Kamin had to
embed the code for the different languages in the interpretter itself, but
this is doable from scheme itself with macros.
Re: What is Guile?, tomas, 2003/09/04
Re: What is Guile?, Ricard Mira, 2003/09/07
Re: What is Guile?, Kevin Ryde, 2003/09/02
- Re: What is Guile?, (continued)
Re: What is Guile?, Jonathan Bartlett, 2003/09/02
Re: What is Guile?, Marius Vollmer, 2003/09/07
- Re: What is Guile?, Ricard Mira, 2003/09/07
- Re: What is Guile?, Jeff Read, 2003/09/07
- Re: What is Guile?, Paul Jarc, 2003/09/08
- Re: What is Guile?, Thamer Al-Harbash, 2003/09/08
- Re: What is Guile?,
Jonathan Bartlett <=
- Re: What is Guile?, Jeff Read, 2003/09/08
- Re: What is Guile?, Jonathan Bartlett, 2003/09/08
- Re: What is Guile?, Lynn Winebarger, 2003/09/08
- Re: What is Guile?, Dale P. Smith, 2003/09/09
- Re: What is Guile?, Andreas Rottmann, 2003/09/09
- Re: What is Guile?, Thamer Al-Harbash, 2003/09/10