Compiler 101

Jon Masterson <news@scruffyduck.co.uk>
22 Jan 2005 18:25:59 -0500

          From comp.compilers

Related articles
Compiler 101 news@scruffyduck.co.uk (Jon Masterson) (2005-01-22)
Re: Compiler 101 anton@mips.complang.tuwien.ac.at (2005-01-24)
Re: Compiler 101 lfinsto1@gwdg.de (Laurence Finston) (2005-01-24)
Re: Compiler 101 news@scruffyduck.co.uk (Jon Masterson) (2005-01-24)
Re: Compiler 101 news@scruffyduck.co.uk (Jon Masterson) (2005-01-30)
Re: Compiler 101 user_77@hotmail.com (Nobodyzhome) (2005-01-30)
Re: Compiler 101 henry@spsystems.net (2005-02-18)
[1 later articles]
| List of all articles for this month |

From: Jon Masterson <news@scruffyduck.co.uk>
Newsgroups: comp.compilers
Date: 22 Jan 2005 18:25:59 -0500
Organization: Customer of PlusNet plc (http://www.plus.net)
Keywords: interpreter
Posted-Date: 22 Jan 2005 18:25:59 EST

Hi All


I am looking for pointers to starter information on building what is
really an interpeter.


I have written a specialist 'language' for use in controlling PC
flight simulators. It is very simple with only about 15 keywords. It
does however have conditional statements (If.....then....else and
case) and a form of looping. I am working on a two stage interpeter -
similar to Java - first stage which is with the code editor does
syntax checking and analyes the code turning it into a series of
tokens and associated data. The second stage runs on the users
computer and executes the tokens.


About 15 years ago I wrote something similar but no longer have the
books I used to help me deveop it - also my recollections of how I did
it have become very blurred, I think I am going about it rather
ham-fistedly and would appreciate and pointers to where I can read up
on basic compiler/interpreter principles. At the moment, for example,
I cannot allow nesting as I have no clue as to how to handle that now.
I'm not particularly worried about converting the intermediate code
into machine code due to the nature of the target which is very
specific. I am very interested in the approaches to parsing, syntax
checking and analysing the source. I have recollections of using
postfix notation and a stack last time but, as mentioned, it is all
rather blurred....8-)


thanks in advance


Jon
[Our usual advice is first to look at existing scripting languages
such as python, Ruby, Lua, and TCL. There's rarely a compelling
reason that you need to invent yet another scripting language, and
it's a whole lot easier to hook your application to one that already
works. -John]



Post a followup to this message

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