Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Syntax: */
- /* ^; == code flow up, v; == code flow down, o == 0 code flow down else up. Use C just as normal but only
- * can goto, labels and if be used for control flow. Can not define o or c variable. */
- #include "main.h"
- #include "limitedCompilerO.h"
- const char *CDataTypes[CDataTypesSize] = {
- "char", "int",
- "float", "double",
- "long", "short",
- "signed", "unsigned",
- "const", "static", "auto" // Scope
- };
- int main(int argc, char *argv[])
- {
- if (argc == 2)
- {
- try
- {
- OCompiler Compiler(&(argv[1]));
- Compiler.RunOCompiler();
- }
- catch (int n)
- {
- switch (n)
- {
- case 0:
- cout << "ERROR0:Could not open input file!" << endl;
- break;
- case 1:
- cout << "ERROR1:Can not create a new file" << endl;
- break;
- //case 2:
- //break;
- default:
- cout << "Unknown error code:" << n << endl;
- break;
- }
- }
- catch (exception& e)
- {
- cout << "Standard exception:" << e.what() << endl;
- }
- catch (...)
- {
- cout << "Some unknown exception happened." << endl;
- }
- }
- else
- {
- cout << "This O programing languges compiler needs one file that it needs to compile!\n";
- cout << "Syntax:\n^; == code flow up, v; == code flow down, o == 0 code flow down else up. Use C just as normal but only\ncan goto, labels and if be used for control flow. Can not define o or c variable.";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment