Is there an interpreter for C? [closed]

2018-12-31 14:42发布

I was wondering if there is something like an interpreter for C. That is, in a Linux terminal I can type in "python" and then code in that interpreter. (I'm not sure interpreter the right word). This is really helpful for testing different things out and I'm curious if something similar exists for C. Though I doubt it. The only thing I can think of that would do it would be the C shell...

13条回答
泪湿衣
2楼-- · 2018-12-31 15:34

the ROOT project provides a very functional C and C++ interpreter called Cint. I'm quite fond of it. It takes a little getting used to interpretively, though.

TCC is a very good choice as well, but i'm not able to vouch for its REPL

查看更多
爱死公子算了
3楼-- · 2018-12-31 15:37

picoc - A very small C interpreter

PicoC is a very small C interpreter for scripting. It was originally written as the script language for a UAV's on-board flight system. It's also very suitable for other robotic, embedded and non-embedded applications.

查看更多
其实,你不懂
4楼-- · 2018-12-31 15:38

I know we use CINT in class. It seemed pretty good you might want to give it a try!

查看更多
裙下三千臣
5楼-- · 2018-12-31 15:39

Give a look to the Ch Interpreter.

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

查看更多
刘海飞了
6楼-- · 2018-12-31 15:40

More recently there is Cling (based on LLVM/Clang)

http://root.cern.ch/drupal/content/cling

查看更多
弹指情弦暗扣
7楼-- · 2018-12-31 15:40

It has been done, even though the vast majority of C work is compiled. One example is CH

查看更多
登录 后发表回答