Related articles |
---|
Want to get started - would like to write a simple interpreter ravenpub@southwind.net (1996-11-01) |
Re: Want to get started - would like to write a simple interpreter adrian@dcs.rhbnc.ac.uk (1996-11-03) |
Re: Want to get started - would like to write a simple interpreter norman@kbss.bt.co.uk (Norman Hilton) (1996-11-05) |
Re: Want to get started - would like to write a simple interpreter ravenpub@southwind.net (1996-11-06) |
Re: Want to get started - would like to write a simple interpreter fburton@nyx10.cs.du.edu (1996-11-10) |
Re: Want to get started - would like to write a simple interpreter john@dwaf-hri.pwv.gov.za (John Carter) (1996-11-19) |
Re: Want to get started - would like to write a simple interpreter kimf@avs.uniras.dk (Kim G. Frei) (1996-11-24) |
Re: Want to get started - would like to write a simple interpreter jlilley@empathy.com (1996-12-01) |
Re: Want to get started - would like to write a simple interpreter ikellenb@iiic.ethz.ch (Ivan Kellenberger) (1996-12-07) |
From: | "Kim G. Frei" <kimf@avs.uniras.dk> |
Newsgroups: | comp.compilers |
Date: | 24 Nov 1996 16:19:18 -0500 |
Organization: | AVS/UNIRAS A/S |
References: | 96-11-049 96-11-117 |
Keywords: | interpreter |
On Fri, 1 Nov 1996, Carl D. Cravens wrote:
> I want to write an interpreter for a very simple language. (A personal
> project that you might find silly if I actually told you what it was
> for.) If I wanted to write just a compiler, I'd buy the dragon book ...
John Carter wrote:
>The main trick is to compile to some sort of byte code. This frees you
>from the stark screaming horrors of dealing with real
>assembler. (Fine, I can hack assembler if I have to, but if you just
>writing an interpretor without any loud yelling speed constraints for
>pity sake keep away from real assembler.)
Come to think of it, "The Unix Programming Environment" by Pike and
Kernighan has a nice example on an interpreter built along these
lines. There is a nice introduction on yacc/lex and a complete walk
through as the language evolves (starting out with basic expression
parsing then adding variables and at last functions).
-kim
--
----------------------------------------------------------------
Kim Frei Tel: +45 45 99 95 99 AVS/UNIRAS A/S
kimf@avs.uniras.dk Fax: +45 45 99 95 00 Blokken 15
DK-3460 Birkerod
Denmark
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.