From: Jan Nieuwenhuizen <janneke@gnu.org>
To: Mike Bushroe <mbushroe@gmail.com>
Cc: guile-user@gnu.org
Subject: Re: on bootstrapping: introducing Mes
Date: Tue, 21 Jun 2016 19:07:44 +0200 [thread overview]
Message-ID: <87porasc67.fsf@gnu.org> (raw)
In-Reply-To: <CA+CyYa3-zhuvwQLUAU9i-hKkbKZq3xhD6GJBnA8P95GqRybz=g@mail.gmail.com> (Mike Bushroe's message of "Mon, 20 Jun 2016 10:47:42 -0700")
Mike Bushroe writes:
Hi!
> I have been quietly lurking for quite some time now, but this stirs up
> old memories. Back in college we built a compile for a local language
> called 'y' which was very similar to C, and the compiler was written
> in 'yacc', yet another compiler compiler.
That's great. Starting this project it seems like old times revisited
in a way...bootstrapping was once real important and gains renewed
interest.
> It sounds like you are moving to a two layer approach, a base layer in
> C that would have to be compiler for any new host that would interpret
> a minimal subset of LISP, and then a full LISP interpreter that would
> support most or all of the language.
Ah sorry, not exactly. I intend to write the initial LISP interpreter
in binary/hex...the current implementation in C is only intended to be
an intermediate stage in the development process, i.e., to figure out
what exactly is needed as a minimal interpreter. Experimenting using C
is easier than in assembly and close enough to make change to assembly
later.
> As for the scary part of define-syntax, once you have a tokenizer
> written from the getc, ungetc routines, it is fairly straight forward
> to use the tokens returned (variable names, numbers, language
> commands, math/logic operators, and block/structure symbols) and build
> a state machine that walks through each syntax sequence starting with
> a new code line and sending out assemble code lines to compile or
> executing steps in an interpreter. Using recursion for numeric
> expressions and nested block structures. Yes, scary at first but it is
> surprising how quickly language breaks down into recursive syntax
> structures.
Thank you, that's a most helpful encouragement!
> Regardless of how you proceed from here, good luck and it sounds like
> you are having fun!
Sure thing, and I've already learned quite a bit I thought I already
knew about intepreting lisp. :-)
Greetings,
Jan
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.nl
next prev parent reply other threads:[~2016-06-21 17:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-19 11:08 on bootstrapping: introducing Mes Jan Nieuwenhuizen
2016-06-20 17:47 ` Mike Bushroe
2016-06-21 17:07 ` Jan Nieuwenhuizen [this message]
2016-06-21 18:44 ` Mike Bushroe
2016-06-21 14:32 ` Ludovic Courtès
2016-06-21 16:36 ` Jan Nieuwenhuizen
2016-06-21 20:38 ` Ludovic Courtès
2016-06-26 21:17 ` Amirouche Boubekki
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=87porasc67.fsf@gnu.org \
--to=janneke@gnu.org \
--cc=guile-user@gnu.org \
--cc=mbushroe@gmail.com \
/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).