commit 9c2d4090b3dd795e6bc755a439113a3149d4538d Author: lolo859 Date: Mon Feb 2 17:04:04 2026 +0100 first commit diff --git a/ccc.cpp b/ccc.cpp new file mode 100644 index 0000000..dbfc340 --- /dev/null +++ b/ccc.cpp @@ -0,0 +1,194 @@ +#include +#include +#include +#include +using namespace std; +const vector tokens={ + "alignas", + "alignof", + "auto", + "bool", + "break", + "case", + "char", + "const", + "constexpr", + "continue", + "default", + "do", + "double", + "else", + "enum", + "extern", + "false", + "float", + "for", + "goto", + "if", + "inline", + "int", + "long", + "nullptr", + "register", + "restrict", + "return", + "short", + "signed", + "sizeof", + "static", + "static_assert", + "struct", + "switch", + "thread_local", + "true", + "typedef", + "typeof", + "typeof_unqual", + "union", + "unsigned", + "void", + "volatile", + "while", + "#include <", + "#include \"", + "ifdef", + "elifdef", + "elifndef", + "define", + "undef", + "pragma", + "endif", + "+=", + "-=", + "*=", + "/=", + "%=", + "&=", + "|=", + "^=", + "<<=", + ">>=", + "++", + "--", + "<<", + ">>", + "==", + "!=", + "<=", + ">=", + "->", + ";\n", + ", ", + ") {\n", + "unsigned int", + "unsigned long", + "unsigned char", + "unsigned short", + "long long", + "unsigned long long", + "signed char", + "long double", + "static int", + "static unsigned", + "static const", + "static char*", + "const char*", + "const int", + "extern int", + "volatile int", + "char*", + "char *", + "void*", + "void *", + "int *", + "int*", + "char**", + "char **", + "struct ", + "typedef struct", + "typedef enum", + "enum ", + "uint8", + "uint16", + "uint32", + "uint64", + "int8", + "int16", + "int32", + "int64", + "size_t", + "NULL", + ".h>", + ".h\"", + "int i=0;", + "int i = 0;", + "()", + "(", + ")", + "[]", + "[", + "]", + "{}", + "{", + "}", + "<", + ">", + "=", + "!", + "+", + "+", + "*", + "/", + "%", + "&", + "|", + "^", + "~", + ".", + ":", + ";", + "?", + " ", + "\n", + "\t", + "\n ", + "\n\t", + " ", + "uint8_t", + "uint16_t", + "uint32_t", + "uint64_t", + "int8_t", + "int16_t", + "int32_t", + "int64_t", + "int main(", + "#ifdef", + "#elifdef", + "#elifndef", + "#define", + "#undef", + "#pragma", + "#endif", + "printf(", + "malloc(", + "free(", + ");", + ");\n", + ");\n\t", + ");\n ", + "if (", + "while (", + "} else if (", + "} else {", + "for (", + "switch (", + "&&", + "||", + " && ", + " || ", +}; +int main() { + cout<