Posts

Showing posts from January, 2026

CLexer.cpp

  //#include "stdafx.h" #include "CLexer.h" //#include "string_t.h" #include <iostream> struct Token* token_struct_ptr= NULL; int token_struct_len=0; int keyword_check(string_t str, bool* is_keyword) { const char* keyword[32] = { "auto", "break", "case", "char", "const", "continue", "default", "do", "double", "else", "enum", "extern", "float", "for", "goto", "if", "int", "long", "register", "return", "short", "signed", "sizeof", "static", "struct", "switch", "typedef", "union", "unsigned", "void", "volatile", "while" }; for (int i = 0; i < 32; i++) { string_t ke...