more complete list of C keywords

git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@732 59561ff5-6e30-0410-9f3c-9617f08c8826
This commit is contained in:
vlm 2005-03-03 21:29:27 +00:00
parent dca4830189
commit 4bf5551f30
1 changed files with 10 additions and 3 deletions

View File

@ -5,11 +5,18 @@
/*
* Checks that the given string is not a reserved C/C++ keyword.
* ISO/IEC 9899:1999 (C99), A.1.2
*/
static char *res_kwd[] = {
"char", "int", "long",
"float", "double",
"struct", "typedef", "class" };
"const", "auto", "register", "volatile", "restrict", "extern",
"static", "inline",
"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
reserved_keyword(const char *str) {
int i;