473,387 Members | 3,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 2054
"ScratchMonkey" <Sc*********************@sewingwitch.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
"ScratchMonkey" <Sc*********************@sewingwitch.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.edu
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...
"ScratchMonkey" <Sc*********************@sewingwitch.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.edu
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
"ScratchMonkey" <Sc*********************@sewingwitch.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
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...
5
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...
5
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 )...
10
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...
6
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...
15
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
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...
1
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...
3
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...
6
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.