Re: C-like interpreted language WITH pointers

ed_davis2 <ed_davis2@yahoo.com>
Sun, 21 Sep 2008 11:43:17 -0700 (PDT)

          From comp.compilers

Related articles
C-like interpreted language WITH pointers spougsazag@farifluset.mailexpire.com (Legrandin) (2008-09-18)
Re: C-like interpreted language WITH pointers chris@csse.uwa.edu.au (Chris McDonald) (2008-09-18)
Re: C-like interpreted language WITH pointers chengang31@gmail.com (cg) (2008-09-19)
Re: C-like interpreted language WITH pointers dot@dotat.at (Tony Finch) (2008-09-19)
Re: C-like interpreted language WITH pointers cr88192@hotmail.com (cr88192) (2008-09-20)
Re: C-like interpreted language WITH pointers sandmann@daimi.au.dk (Soeren Sandmann) (2008-09-20)
Re: C-like interpreted language WITH pointers ed_davis2@yahoo.com (ed_davis2) (2008-09-21)
Re: C-like interpreted language WITH pointers sammyderoy@sympatico.ca (Sammy) (2008-09-27)
| List of all articles for this month |
From: ed_davis2 <ed_davis2@yahoo.com>
Newsgroups: comp.compilers
Date: Sun, 21 Sep 2008 11:43:17 -0700 (PDT)
Organization: Compilers Central
References: 08-09-097
Keywords: C, interpreter
Posted-Date: 21 Sep 2008 15:27:49 EDT

On Sep 18, 6:07 pm, Legrandin <spougsa...@farifluset.mailexpire.com>
wrote:
> I am looking for a simple, fast, small, intepreted, C-like
> imperative language, with support for pointers and memory
> aliasing.


Lennart Augustsson's obfuscated tiny C byte-code compiler/interpreter
may be just what you are looking for. The unobfuscated version of the
compiler is nicely written and easy to follow. It supports integers,
chars, arrays, pointers, functions with parameters, and most control
statements. As a bonus, it can compile itself. The unobfuscated
compiler is about 600 lines of code.


> * it should be compilable in bytecode and executed by a small VM


The VM bytecode interpreter is about 150 lines of code.




The Unobfuscated version of the compiler/interpreter is available
here:


http://www.cs.chalmers.se/pub/users/augustss/oc.tar.gz


The grammar used and a some usage notes are available here:


http://www1.us.ioccc.org/1996/august.hint


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.