#include #include #include #include #include #include "runtime.h" using namespace std; int g_argc; char **g_argv; bool input_is_stdin=false; string readfile(ifstream stream){ stream.seekg(0,ios::end); size_t len=stream.tellg(); stream.seekg(0,ios::beg); string contents; contents.resize(len); stream.read(&*contents.begin(),len); return contents; } int main(int argc,char **argv){ if(argc<2){ cerr<<"Call this interpreter with the Postrun source file"< tokens; if(strcmp(argv[1],"-")==0){ tokens=tokenise(cin); input_is_stdin=true; } else { srcf.open(argv[1]); if(!srcf){ cerr<<"Could not open file '"<