Re: Need starting tips for a new interpreter / parser

anton@mips.complang.tuwien.ac.at (Anton Ertl)
3 Jan 1999 18:00:02 -0500

          From comp.compilers

Related articles
Need starting tips for a new interpreter / parser lio-daa@online.no (Harald Fjerdingstad) (1999-01-02)
Re: Need starting tips for a new interpreter / parser mslamm@mscc.huji.ac.il (Ehud Lamm) (1999-01-03)
Re: Need starting tips for a new interpreter / parser anton@mips.complang.tuwien.ac.at (1999-01-03)
Re: Need starting tips for a new interpreter / parser lio-daa@online.no (Harald Fjerdingstad) (1999-01-04)
Re: Need starting tips for a new interpreter / parser lio-daa@online.no (Harald Fjerdingstad) (1999-01-06)
Re: Need starting tips for a new interpreter / parser escargo@mirage.skypoint.com (1999-01-06)
Re: Need starting tips for a new interpreter / parser mslamm@mscc.huji.ac.il (Ehud Lamm) (1999-01-11)
Re: Need starting tips for a new interpreter / parser Immanuel.Litzroth@pandora.be (Immanuel Litzroth) (1999-01-11)
Re: Need starting tips for a new interpreter / parser mikee@cetasoft.cog (1999-01-15)
[4 later articles]
| List of all articles for this month |

From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.compilers
Date: 3 Jan 1999 18:00:02 -0500
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
References: 99-01-012
Keywords: interpreter, design

  "Harald Fjerdingstad" <lio-daa@online.no> writes:
> I am at the project planning level of making a new parser /
> interpreter for a reporting tool.
>
> It will be completely driven by a well defined (pascal like grammar)
> language source file.
>
> It will support assignment statements, loops, conditions and all the
> other usuall stuff a language should have.
...
> I just want to have some tips from you experts on how to plan the
> interpreting phase.


When I did such a project eight years ago, I wrote a compiler with lex
and yacc that produced a stack-based virtual machine code; I also
wrote an saver and loader (based on XDR) and an interpreter for the
VM. If I had to do it again, I would also use Ox (an attributed
grammar system that works with lex and yacc), or some other toolbox.


> Should I build a parse tree?


I didn't.


> Check byte for byte?


What do you mean?


> Build a "reserved words" table?


I let lex do the reserved words recognition.


> Could someone outline the basic steps for me.


Maybe you would be better off following the advice of our esteemed
moderator.


- anton
--
M. Anton Ertl Some things have to be seen to be believed
anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen


Post a followup to this message

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