Commit 3fe2e12b authored by Lev Walkin's avatar Lev Walkin

more complete list of C keywords

parent 87da8266
...@@ -5,11 +5,18 @@ ...@@ -5,11 +5,18 @@
/* /*
* Checks that the given string is not a reserved C/C++ keyword. * Checks that the given string is not a reserved C/C++ keyword.
* ISO/IEC 9899:1999 (C99), A.1.2
*/ */
static char *res_kwd[] = { static char *res_kwd[] = {
"char", "int", "long", "const", "auto", "register", "volatile", "restrict", "extern",
"float", "double", "static", "inline",
"struct", "typedef", "class" }; "signed", "unsigned",
"void", "char", "short", "int", "long", "float", "double",
"enum", "union", "struct", "typedef", "class",
"switch", "case", "default", "break", "continue",
"if", "else", "do", "for", "while", "goto",
"sizeof", "return"
};
static int static int
reserved_keyword(const char *str) { reserved_keyword(const char *str) {
int i; int i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment