jim mcnamara
Oct 11th, 2001, 09:05 AM
This is snotc (its-not-c). It is an interpreter of C written in C.
Like smallC, and some others. It might be fun to look at.
It has a lot of limitations -
You feed it source code as a file; it's not interactive,
pass the filename as a command line parm.
All{ if, while, do else } code has to be a code block (curly brackets), you can't do one liners.
if(a==0){ b=0; }
string & int types only are supported.
Anyway, you can extend it as much as you like. This code works correctly under Turbo C, compiles and runs under VC++, but has NOT been tested. Note the getche gotcha.
And if plenderj is around: jamie, note the use of stacks.
Like smallC, and some others. It might be fun to look at.
It has a lot of limitations -
You feed it source code as a file; it's not interactive,
pass the filename as a command line parm.
All{ if, while, do else } code has to be a code block (curly brackets), you can't do one liners.
if(a==0){ b=0; }
string & int types only are supported.
Anyway, you can extend it as much as you like. This code works correctly under Turbo C, compiles and runs under VC++, but has NOT been tested. Note the getche gotcha.
And if plenderj is around: jamie, note the use of stacks.