C interpreter in Lisp/scheme/python

fortunatus daniel.eliason at excite.com
Mon Jun 14 09:25:54 EDT 2010


On Jun 13, 7:07 pm, bolega <gnuist... at gmail.com> wrote:
> I am trying to compare LISP/Scheme/Python for their expressiveness.
>
> For this, I propose a vanilla C interpreter. I have seen a book which
> writes C interpreter in C.
>
> The criteria would be the small size and high readability of the code.
>
> Are there already answers anywhere ?
>
> How would a gury approach such a project ?
>
> Bolega

Holy cow has this gone off topic!  To OP - start writing a C context
free grammar of a subset of C (arithmetic expressions IMHO are the
historical root of C and a good place to start in any case), start
writing a parser of a subset of your subset grammar (in a lisp of your
chioce - Scheme and CL for instance are going to be pretty much
equivalent in this task), and really the rest will be obvious...

I'd go that far before posting on the topic again...



More information about the Python-list mailing list