473,804 Members | 2,277 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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?
Jul 22 '05 #1
5 2079
"ScratchMon key" <Sc************ *********@sewin gwitch.com> wrote in message
news:Xn******** *************** ****@64.164.98. 49...
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
Jul 22 '05 #2
"ScratchMon key" <Sc************ *********@sewin gwitch.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 te************* *@NOSPAMmayo.ed u
Mayo Foundation (507) 538-5495
200 First St. SW FAX (507) 284-9171
Rochester MN, 55901 USA http://www.mayo.edu/sppdg/

Jul 22 '05 #3
Perhaps you are looking for swig?
(http://www.swig.org).
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" <te************ **@mayo.edu> wrote in message
news:c2******** **@tribune.mayo .edu...
"ScratchMon key" <Sc************ *********@sewin gwitch.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 te************* *@NOSPAMmayo.ed u
Mayo Foundation (507) 538-5495
200 First St. SW FAX (507) 284-9171
Rochester MN, 55901 USA http://www.mayo.edu/sppdg/

Jul 22 '05 #4
"ScratchMon key" <Sc************ *********@sewin gwitch.com>
wrote in message news:Xn******** *************** ****@64.164.98. 49...
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/Produ...MSToolkit.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 =---
Jul 22 '05 #5
"Bob Techentin" <te************ **@mayo.edu> wrote:
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/show...lease_id=40848
--
David Gravereaux <da******@pobox .com>
[species: human; planet: earth,milkyway( western spiral arm),alpha sector]
Jul 22 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
2817
by: janeaustine50 | last post by:
Python's InteractiveInterpreter uses the built-in compile function. According to the ref. manual, it doesn't seem to concern about the encoding of the source string. When I hand in an unicode object, it is encoded in utf-8 automatically. It can be a problem when I'm building an interactive environment using "compile", with a different encoding from utf-8. IDLE itself has the same problem. ( '<a string with non-ascii-encoding>' is...
5
3340
by: Carmine Cairo | last post by:
Hi, I'm working on a project and today I've note a little problem during the compile fase. Here a little piece of code: // 1st version welldone = 0; size = p->getSize(); backbone = new rightType;
5
3824
by: Brice Prunier | last post by:
Here under 4 schemas i'm working with ( it may be long: sorry...) The context is the following : Resident.xsd imports Person.xsd and includes Common.xsd ( anonimous schema: no TargetNamespace ) Person.xsd includes Common-Naming.xsd ( anonimous schemas ) Common-Naming.xsd includes common.xsd ( both are anonimous schemas ) Compilation of Resident.xsd raise the following exception: "System.Xml.Schema.XmlSchemaException: The attribute 'oid'...
10
19732
by: Chris LaJoie | last post by:
Our company has been developing a program in C# for some time now, and we haven't had any problems with it, but just last night something cropped up that has me, and everyone else, stumped. I have a struct that contains several different types of data. This struct is used throuout the program. Now, when I compile, I get 6 errors, all of them "Use of possibly unassigned field 'awayTime'" or "Use of possibly unassigned field 'intlTime'"....
6
2863
by: Thomas Connolly | last post by:
I have 2 pages referencing the same codebehind file in my project. Originally the pages referenced separate code behind files. Once I changed the reference to the same file, everything worked fine while the file was in the project directory. When the obsolete file was removed from the project directory, my application will no longer compile. Can someone please help with this issue? Thank in advance, Tom
15
4856
by: steve yee | last post by:
i want to detect if the compile is 32 bits or 64 bits in the source code itself. so different code are compiled respectively. how to do this?
16
5436
by: desktop | last post by:
I have read that using templates makes types know at compile time and using inheritance the types are first decided at runtime. The use of pointers and casts also indicates that the types will first be know at runtime. But is there some strict definitions that defines runtime code and compile time code that can be used in general?
1
3085
by: brianrpsgt1 | last post by:
Newbie here.... I have been able to successful pull info from a MySQL DB, get the results and output them in an HTML format using Cheetah to the screen using IDLE. I am doing this on a Windows Laptop, running WinXP, Python 2.5 and the latest version of Cheetah. I have two questions: 1. How and where do you compile Cheetah templates in Windows? The command in the docs is cheetah compile a, however, I believe that this
3
2313
by: NvrBst | last post by:
Right now I have C99 code in .c extensions. I compile it in VSC++ and it complains about a lot of errors. I change the extensions to .cpp and compile in VSC++ and it succeeds. Is there a way to keep my extensions .c, but tell VSC++ (through an project option) to compile as C++98 code (as if it had .cpp extensions).
6
1960
by: Ed Leafe | last post by:
I've noticed an odd behavior with compile() and code that does not contain a trailing newline: if the last line is a comment inside of any block, a syntax error is thrown, but if the last line is a non- comment Python statement, there is no error. Here's an example (using 2.5.1 on OS X) .... def foo(): .... print 'bar' """ <code object <moduleat 0x79608, file "", line 2>
0
10599
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10346
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10347
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10090
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9173
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6863
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5531
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3832
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.