Is there a C interpreter?

8

Everyone knows that C is a compiled language. Some know that in theory any language can be interpreted, unless it has some specification to prevent. Are there C interpreters? Do they serve for anything?

And C ++?

    
asked by anonymous 25.01.2017 / 11:52

2 answers

7

Yes, there is. Its usefulness is a little questionable since C is not a script language, not even close at hand. It has to be kind of crazy to use C for this. But a lot of people use it, perhaps because it is the language that is most comfortable.

But it may be helpful to use a REPL to help create a code during learning, rapid testing, or prototyping.

The best known are Ch (owner) and CINT ( open source in>). Both work with C ++ as well, but they have limitations. The second is limited even with C, but it does accept things that C does not accept, that is, it is not quite standard, but is more suitable for script .

The Cling is an evolution of CINT .

Some people use TCC as an interpreter.

Make sure you check out picoc , cinterpeter , ccons , and especially the iGCC .

    
25.01.2017 / 11:52
0

Among the practical applications there is the Tcs.

TCS (TC shell) is an interpreter shell for C-based commands. You can use it to execute C commands directly from the command line.

It's also worth taking a look at the Lua (www.lua.org/), which is an interpreted language based and can be used to extend C commands.

    
27.01.2017 / 15:54