|Interpreting C++ D.J.Tallis@cen.exeter.ac.uk (1993-03-23)|
|Re: Interpreting C++ firstname.lastname@example.org (1993-03-25)|
|Re: Interpreting C++ email@example.com (1993-03-29)|
|From:||D.J.Tallis@cen.exeter.ac.uk (Dan Tallis)|
|Keywords:||interpreter, C++, comment|
|Organization:||University of Exeter, UK.|
|Date:||Tue, 23 Mar 1993 10:27:05 GMT|
Has anyone out there got any experience of -interpreting- C++ (as opposed
I am involved in a research project (to do with visual programming
environments) where it would (perhaps) be useful to be able to interpret
C++ code (we're still undecided - hence your thoughts and experiences
would be appreciated...).
I realise this is a major undertaking from scratch, and since this is not
really part of the _research_, we wouldn't want to get bogged down in it,
- What if we ASSUME the program is CORRECT, both syntactically and
semantically - ie. assume a compiler could happily generate an
My feeling is that this cuts down much of the work - no need for error
rules in the grammar (we'll use Jim Roskind's C++ grammar), and we can
forget checking all the semantic constraints, etc. This leaves us with
maintaining a symbol table and data values, and interpreting the control
structures. Hmmm... could get tricky interfacing with library routines I
Well, what do you think? The question is really:
Q) How much work is involved in writing a C++ interpreter GIVEN THE
ASSUMPTIONS ABOVE and any others you think would simplify the task?
All comments, thoughts, experiences, anything that could help our
decision, greatly appreciated.
Email preferred. Thanks.
[Yacc automatically does full syntactic error checking, although its default
recovery scheme is to give up at the first error. You'll probably find that
any sort of useful C++ interpreter is still an enormous amount of work. -John]
Return to the
Search the comp.compilers archives again.