You mean a C interpreter?
Well, there's bc (www.gnu.org/software/bc/), which has a C-esque syntax and arbitrary precision arithmetic.
I don't know if it can do text operations, though.
You need to explain what you want more specifically. From what I see, your wanting an interpreted language made in C/C++ (which seems to be irrelevant to what to what you want) which can perform can perform tasks similar to that of C++ and C.
Python, Perl, and Mathematica come to mind. Unfortunately, this is a C/++ forum concerning C++ only and as a result, I will not provide examples of this code.
NOTE: Mathematica is a bit...*different* but it's made in a C and technically does what you want....
NOTE 2: I'm actually not sure what Python is made out of... I can't seem to find any decent information about it.
Well, that's easy. Google Yacc or Bison. Bison has some features Yacc lacks, like generating a reentrant (aka pure) parser, and a few other things, but Yacc is public domain, if that's of interest to you.
PS: By the way, normally when it takes someone four posts to correctly convey something as simple as this, it's because there's something very wrong with the way it was being expressed. This is one such case.
The problem is not that it's not possible to "open a file, parse, and run commands". The problem is that you want that file to use your own syntax. If the file was, say, a Perl script, you could solve the problem by just embedding Perl and using the interpreter to run the script. But you want the script to be in your syntax, so you have few alternatives:
1. Use a Yacc/Bison-generated parser.
2. Use Boost Spirit.
3. Write your own parser.
I would strongly suggest the first option. You'll know for sure that there are no bugs in the parser and will be able to concentrate on different aspects of the interpreter. If you follow the tutorial in the Bison manual, you'll be able to write a short expression parser program after about an hour. It's an investment you won't regret.
Bison can generate C++ parsers (that is, written in C++), and their C parsers will compile on C++ without problems other than one or two harmless warnings.
Boost::spirit is simpler, but it has a steep learning curve and requires knowledge of advanced programming techniques that the average programmer will not know.
But there are plenty of examples online of simpler parsers (such as a caclulator) written in Boost::spirit.
This is essentially how Yacc and Bison handle language construction, but it works in time with your code instead of writing a compiler...
There are other options like embedding a Tcl interpreter ( http://wiki.tcl.tk/ ) or a Scheme interpreter ( http://plt-scheme.org/ -- see the MzScheme interpreter). Both are easy to use and pretty small.
Extending it to support some fixed functions like the trig functions should be straight forward. User defined functions is straight forward too, but a different matter.