Interpreted Language from which one can call C++ methods 
Author Message
 Interpreted Language from which one can call C++ methods

I am searching for an interpreted language from which one can instantiate
C++ objects and use C++ methods.  An example would be the class "Car" with
the method "drive".  I would like to be able to write something like the
following in the interpreter:

(1)> Car citation = New Car("some arguments")
(2)> citation.drive()
(3)> citation.display()
(4)> Car bmw = New Car("some arguments")
(5)> close = bmw.distance(citation)
(6)> if close<tolerance then {bmw.turn(right); citation.stop();}
(7)> ...

I have thought about doing this with flex/bison, but perhaps there is
such a general utility around currently?  Any comments, is this the
wrong approach?  My application actually has nothing to do with cars,
but is dealing with sets of images and graphs and the application and
visualization of operations on them, for which all the code has been
written in C++, and now we would like to perform some of these operations
interactively from an interpreter.

        Mark
--
Mark Burge, Swiss Federal Institute of Technology, Computer Science Institue
Institut fuer Informationssysteme    (IFW - E48.2)  | FINGER daemon runs on:

CH-8092 Zuerich, Schweiz             (Switzerland)  | Tel: +41 (0)1 632 7237



Fri, 11 Oct 1996 20:13:41 GMT  
 Interpreted Language from which one can call C++ methods

Quote:

>I am searching for an interpreted language from which one can instantiate
>C++ objects and use C++ methods.  An example would be the class "Car" with
>the method "drive".  I would like to be able to write something like the
>following in the interpreter:

>(1)> Car citation = New Car("some arguments")
>(2)> citation.drive()
>(3)> citation.display()
>(4)> Car bmw = New Car("some arguments")
>(5)> close = bmw.distance(citation)
>(6)> if close<tolerance then {bmw.turn(right); citation.stop();}
>(7)> ...

>I have thought about doing this with flex/bison, but perhaps there is
>such a general utility around currently?  Any comments, is this the
>wrong approach?  My application actually has nothing to do with cars,
>but is dealing with sets of images and graphs and the application and
>visualization of operations on them, for which all the code has been
>written in C++, and now we would like to perform some of these operations
>interactively from an interpreter.

>    Mark
>--
>Mark Burge, Swiss Federal Institute of Technology, Computer Science Institue
>Institut fuer Informationssysteme    (IFW - E48.2)  | FINGER daemon runs on:

>CH-8092 Zuerich, Schweiz             (Switzerland)  | Tel: +41 (0)1 632 7237

I'm working on a C++ interpreter which can call compiled C++ code.  The
present version only calls compiled C++ code that is part of the
interpreter itself.  But I hope to get a general purpose version ready
for beta test in the next few months, and plan to announce it here.


Fri, 11 Oct 1996 23:16:12 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. warning: split (...) interpreted as method call

2. Sigma, an interpreted functional programming language implemented in C++

3. sigma, an interpreted, functional extension language for C++

4. sigma, an interpreted, functional extension language for C++

5. Calling a (any) superclass method when already have one by that name

6. call one method of all subclasses

7. I have method call, but I get warning: ... interpreted as method call!

8. language interpreters/ interpreted languages weaknesses?

9. Calling member methods from C++

10. Calling ruby methods from C++

11. call C++ method from Tcl/Tk

12. c++ calling fortran and fortran calling C++

 

 
Powered by phpBB® Forum Software