Is there a C interpreter?

Asked

Viewed 1,159 times

8

Everyone knows that C is a compiled language. Some know that in theory any language can be interpreted, unless it has some specification that prevents it. Are there C interpreters? They’re good for something?

And C++?

2 answers

7


Yes, there is. Its usefulness is somewhat questionable since C is not a language of script, not even close. You have to be a little crazy to use C for that, but a lot of people do, maybe because it’s the language that’s most comfortable.

It may be useful to use a REPL to help create code during learning, rapid testing, or prototyping.

The best known are the Ch (owner) and the CINT (open source). Both work with C++ as well, but have limitations. The second is limited up to C, but accepts 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 the TCC as interpreter.

Take a look at the picoc, girdle, ccons, and especially the iGCC.

0

Practical applications include Tcs.

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

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.