unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Jonathan Bartlett <johnnyb@eskimo.com>
Cc: guile-devel@gnu.org
Subject: Re: What is Guile?
Date: Mon, 8 Sep 2003 14:39:12 -0700 (PDT)	[thread overview]
Message-ID: <Pine.GSU.4.44.0309081432540.2598-100000@eskimo.com> (raw)
In-Reply-To: <Pine.BSF.4.51.0309081427500.67089@helena.whitefang.com>

> 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.

Jon



_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


  reply	other threads:[~2003-09-08 21:39 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3EF2F7DF008213D5@pop3.es.tisadm.net>
2003-09-02 16:47 ` What is Guile? Tom Lord
2003-09-03 20:43   ` Han-Wen Nienhuys
2003-09-03 22:52     ` Tom Lord
2003-09-03 23:12       ` Han-Wen Nienhuys
2003-09-04  9:43   ` tomas
2003-10-07 17:11     ` Marius Vollmer
     [not found]   ` <3EF2E935008FB586@pop2.es.tisadm.net>
2003-09-07 22:22     ` Marius Vollmer
2003-09-02 18:08 ` What is Guile?y Thamer Al-Harbash
2003-09-03 16:34   ` Han-Wen Nienhuys
2003-09-02 21:03 ` What is Guile? Jonathan Bartlett
2003-09-02 21:59 ` Kevin Ryde
     [not found]   ` <3EF2F7DF008E4D8D@pop3.es.tisadm.net>
2003-09-07 12:38     ` Jeff Read
2003-09-08 17:14     ` Paul Jarc
2003-09-08 18:32       ` Thamer Al-Harbash
2003-09-08 21:39         ` Jonathan Bartlett [this message]
2003-09-09  0:33           ` Jeff Read
2003-09-09  2:43             ` Jonathan Bartlett
2003-09-09  3:25             ` Lynn Winebarger
2003-09-09 13:20             ` Dale P. Smith
2003-09-09 18:46             ` Andreas Rottmann
2003-09-10 11:55               ` Thamer Al-Harbash
2003-09-07 22:00 ` Marius Vollmer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.GSU.4.44.0309081432540.2598-100000@eskimo.com \
    --to=johnnyb@eskimo.com \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).