 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
ScratchMonkey Guest
|
Posted: Thu Mar 04, 2004 1:22 am Post subject: Compile C++ to TCL |
|
|
I'm working on a system which exposes TCL scripting but looks to be
difficult to extend with a native binary. I need to build a "front end" for
it that has lots of complicated data structures and can benefit from strong
typing, so C++ is a more natural choice for implementation. Does there
exist a C++ compiler that generates TCL as its output?
|
|
| Back to top |
|
 |
Mike Wahler Guest
|
Posted: Thu Mar 04, 2004 1:39 am Post subject: Re: Compile C++ to TCL |
|
|
"ScratchMonkey" <ScratchMonkey.blacklist (AT) sewingwitch (DOT) com> wrote
| Quote: | I'm working on a system which exposes TCL scripting but looks to be
difficult to extend with a native binary. I need to build a "front end"
for
it that has lots of complicated data structures and can benefit from
strong
typing, so C++ is a more natural choice for implementation. Does there
exist a C++ compiler that generates TCL as its output?
|
I don't know of any offhand, but afaik, Comeau
Computing ( www.comeaucomputing.com )
does custom compilers. You might want to write to Greg:
http://www.comeaucomputing.com/faqs/contacts.html
-Mike
|
|
| Back to top |
|
 |
Bob Techentin Guest
|
Posted: Thu Mar 04, 2004 2:47 pm Post subject: Re: Compile C++ to TCL |
|
|
"ScratchMonkey" <ScratchMonkey.blacklist (AT) sewingwitch (DOT) com> wrote
| Quote: | I'm working on a system which exposes TCL scripting but looks to be
difficult to extend with a native binary. I need to build a "front
end" for
it that has lots of complicated data structures and can benefit from
strong
typing, so C++ is a more natural choice for implementation. Does
there
exist a C++ compiler that generates TCL as its output?
|
I have never heard of a C++ compiler that emits any scripting
language.
If you want some of the data structures of C++, look at the Incr Tcl
extension. It provides classes and objects with a distinctly C++
flavor. Other OO systems, such as Xotcl or Snit might be better
suited if you can't link the Itcl shared library to your existing
binary.
Bob
--
Bob Techentin [email]techentin.robert (AT) NOSPAMmayo (DOT) edu[/email]
Mayo Foundation (507) 538-5495
200 First St. SW FAX (507) 284-9171
Rochester MN, 55901 USA http://www.mayo.edu/sppdg/
|
|
| Back to top |
|
 |
Georgios Petasis Guest
|
Posted: Fri Mar 05, 2004 12:36 am Post subject: Re: Compile C++ to TCL |
|
|
Perhaps you are looking for swig?
([url]http://www.swig.org)[/url].
Swig can parse most of your C/C++ headers
and create automatically wrappers for scripting
languages that expose your C/C++ code in that language.
It does not "compile" your C/C++ into another language,
it just wraps your code and exposes it into the scripting
language...
George
"Bob Techentin" <techentin.robert (AT) mayo (DOT) edu> wrote
| Quote: | "ScratchMonkey" <ScratchMonkey.blacklist (AT) sewingwitch (DOT) com> wrote
I'm working on a system which exposes TCL scripting but looks to be
difficult to extend with a native binary. I need to build a "front
end" for
it that has lots of complicated data structures and can benefit from
strong
typing, so C++ is a more natural choice for implementation. Does
there
exist a C++ compiler that generates TCL as its output?
I have never heard of a C++ compiler that emits any scripting
language.
If you want some of the data structures of C++, look at the Incr Tcl
extension. It provides classes and objects with a distinctly C++
flavor. Other OO systems, such as Xotcl or Snit might be better
suited if you can't link the Itcl shared library to your existing
binary.
Bob
--
Bob Techentin [email]techentin.robert (AT) NOSPAMmayo (DOT) edu[/email]
Mayo Foundation (507) 538-5495
200 First St. SW FAX (507) 284-9171
Rochester MN, 55901 USA http://www.mayo.edu/sppdg/
|
|
|
| Back to top |
|
 |
Ira Baxter Guest
|
Posted: Sat Mar 06, 2004 3:48 pm Post subject: Re: Compile C++ to TCL |
|
|
"ScratchMonkey" <ScratchMonkey.blacklist (AT) sewingwitch (DOT) com>
wrote in message news:Xns94A1B0CD2E973scratchmonkey (AT) 64 (DOT) 164.98.49...
| Quote: | I'm working on a system which exposes TCL scripting but looks to be
difficult to extend with a native binary. I need to build a "front end"
for
it that has lots of complicated data structures and can benefit from
strong
typing, so C++ is a more natural choice for implementation. Does there
exist a C++ compiler that generates TCL as its output?
|
Not that I know of. C++ is very complex, it is difficult to
belive that TCL would be a friendly target for all that complexity,
and I can't see the economic value of compiling into TCL.
I suspect some would argue you should compile the other way.
What you could consider doing is to define you own "dialect" of
TCL which requires strong typing, checks the types, and
then translates that to vanilla TCL.
If you wanted to do that, you might consider using the DMS
Software Reengineering Toolkit, generalized compiler technology
that handles many langauges. It doesn't presently
have a TCL front end, but given its track record of
"absorbing" other languages (like C++), that isn't
an issue. Using a TCL front end, you could define
the type checker and run it on user input.
See http://www.semanticdesigns.com/Products/DMS/DMSToolkit.html.
--
Ira D. Baxter, Ph.D., CTO 512-250-1018
Semantic Designs, Inc. www.semdesigns.com
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
|
|
| Back to top |
|
 |
David Gravereaux Guest
|
Posted: Sat Mar 06, 2004 7:14 pm Post subject: Re: Compile C++ to TCL |
|
|
"Bob Techentin" <techentin.robert (AT) mayo (DOT) edu> wrote:
| Quote: | If you want some of the data structures of C++, look at the Incr Tcl
extension. It provides classes and objects with a distinctly C++
flavor. Other OO systems, such as Xotcl or Snit might be better
suited if you can't link the Itcl shared library to your existing
binary.
|
Grab Itcl's sample extension. It shows how to mate C++ to Itcl/Tcl:
https://sourceforge.net/project/showfiles.php?group_id=13244&package_id=17107&release_id=40848
--
David Gravereaux <davygrvy (AT) pobox (DOT) com>
[species: human; planet: earth,milkyway(western spiral arm),alpha sector]
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|