[Top][All Lists]

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

Re: on bootstrapping: introducing Mes

From: Jan Nieuwenhuizen
Subject: Re: on bootstrapping: introducing Mes
Date: Tue, 21 Jun 2016 19:07:44 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Mike Bushroe writes:


> 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

> 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

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


Jan Nieuwenhuizen <address@hidden> | GNU LilyPond
Freelance IT | Avatar®  

reply via email to

[Prev in Thread] Current Thread [Next in Thread]