C interpreter??
Would such a program be useful(or possible)? Alternately, does one already exist? I mean, M$ can write interpreters for VB and QBasic, why not do it for C? Or is there some sort of fundamental design flaw in the language which would prevent it?
Martee
Magnum Games
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
I seem to recall an interpreted C.. from a long time ago.. But I can''t remember who made it. I assume it does exist; probably using some sort of P-Code. But I haven''t heard or seen one lately.
// CHRIS
// CHRIS
// CHRIS [win32mfc]
I heard about something like that a while ago.
But i can''t find 1 point why anybody should use an Interpreter instead of a Compiler? (I''d like to hear some points, thx ;-)
cya,
Phil
But i can''t find 1 point why anybody should use an Interpreter instead of a Compiler? (I''d like to hear some points, thx ;-)
cya,
Phil
Visit Rarebyte! and no!, there are NO kangaroos in Austria (I got this question a few times over in the states ;) )
Yes, it is possible to write an interpreter for C. In fact, I own a book, "C - The Complete Reference, 3rd Ed." by Herbert Schildt, that goes through the development of a C interpreter in C! It only covers a subset of the language, but it is still pretty much C. It''s a really good read. Interesting info on developing a language parser/interpreter. Herbert Schildt kicks major booty in all of his C/C++/STL books, IMHO.
ISBN 0-07-882101-0 if you want to check it out yourself.
As far as where to download a working interpreter for C instead of writing your own, I have no idea.
ISBN 0-07-882101-0 if you want to check it out yourself.
As far as where to download a working interpreter for C instead of writing your own, I have no idea.
------------------------------------------------------------Four young warriors arrive, each holding an ORB...byrdjb@email.uah.edu
quote: Original post by phueppl1
I heard about something like that a while ago.
But i can''t find 1 point why anybody should use an Interpreter instead of a Compiler? (I''d like to hear some points, thx ;-)
cya,
Phil
Well, the only reason I can think of at the moment is cross platform compatibility. If you write solely in ANSI C and you distribute the source file instead of an executable, you''d get to run your program on all platforms that have a C interpreter.
But seeing that it''s interpreted, speed would be a problem...
==========================================In a team, you either lead, follow or GET OUT OF THE WAY.
quote: Original post by phueppl1
......
But i can''t find 1 point why anybody should use an Interpreter instead of a Compiler? (I''d like to hear some points, thx ;-)
It can be used for debuging - an interpreter allows quick runtime changes in the code.
btw, MSVC6.0 has ability to recompile changed code from debuger - Edit & continue.
This feature has a lot of limitations, but quite useful anyway.
To respond to the question correctly, yes, there are some interpreters for C. Not sure for windows but in Linux, there is one. I don't remember the name but I've seen it in the package list. Never thought of installing it though as I don't have a need for them. None the less, there probably are some for windows and dos also.
If you plan on creating one, it should be fairly easy to code as you only need to parse the code file.
Anyhow,
this is my opinion...
Cyberdrek
Headhunter Soft
DLC Multimedia
Edited by - Cyberdrek on August 8, 2000 8:59:05 AM
If you plan on creating one, it should be fairly easy to code as you only need to parse the code file.
Anyhow,
this is my opinion...
Cyberdrek
Headhunter Soft
DLC Multimedia
Edited by - Cyberdrek on August 8, 2000 8:59:05 AM
[Cyberdrek | ]
It would reduce ... err ... eliminate comile time allowing for quicker prototyping if speed wasnt an issue.
May have trouble using libraries traditionally linked in. I dunno.
May have trouble using libraries traditionally linked in. I dunno.
Dr_Evil: But if you are programming modularly, the objects for other modules are already created, so you only need to compile the current module and link it with the rest of the objects... Not very much time on the beasts of today
-Chris Bennett ("Insanity" of Dwarfsoft)
Check our site:
http://www.crosswinds.net/~dwarfsoft/
Check out our NPC AI Mailing List :
http://www.egroups.com/group/NPCAI/
made due to popular demand here at GDNet :)
-Chris Bennett ("Insanity" of Dwarfsoft)
Check our site:
http://www.crosswinds.net/~dwarfsoft/
Check out our NPC AI Mailing List :
http://www.egroups.com/group/NPCAI/
made due to popular demand here at GDNet :)
quote: Original post by phueppl1
But i can''t find 1 point why anybody should use an Interpreter instead of a Compiler? (I''d like to hear some points, thx ;-)
1 Point? Debugging speed. Especially on larger projects. No need to spend time compiling, and then running a debugger, when you can just run your code right off the bat. I think that counts as a point
NuffSaid: ''Cross Platform Compatibility''. Yeah, that''s true. I hadn''t even thought about that. Thanks dude - another reason to write an interpreter
Martee
Magnum Games
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement