Results 1 to 2 of 2

Thread: C interpreter in C

Threaded View

  1. #1
    jim mcnamara
    Guest

    C interpreter in C

    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.
    Code:
    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.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width