7

Possible Duplicate:
Is there an interpreter for C?

Is there a "C implementation" which acts the same as the "C abstract machine" when executing a C program? That is, a simple interpreter for C as it is described in a C standard such as C99.

There are many implementations of the C programming language that are compilers (Clang, GCC, MSVC). I'm looking for an open source implementation of a C interpreter.

Community
  • 1
  • 1

3 Answers3

3

CINT - http://root.cern.ch/drupal/content/cint But it is not C99 AFAIK.

c-smile
  • 25,702
  • 7
  • 55
  • 82
2

google "cint", "ch".

I like tcc (also there are some links that my prove fruitful in there). tcc is basically a compiler, but you call it with a shebang line

#!/usr/local/bin/tcc -run
#include <stdio.h>
int main(void) { puts("Hello, World!"); return 0; }
pmg
  • 103,426
  • 11
  • 122
  • 196
1

Ch is "an embeddable C/C++ interpreter and scripting language for cross-platform scripting, numerical computing, shell programming, 2D/3D plotting, quick animation, and embedded scripting."

nmichaels
  • 47,648
  • 12
  • 99
  • 131