%}
struct resword { const char *name; short token; enum rid rid;};
%%
-__alignof, ALIGNOF, NORID
-__alignof__, ALIGNOF, NORID
-__asm, ASM_KEYWORD, NORID
-__asm__, ASM_KEYWORD, NORID
-__attribute, ATTRIBUTE, NORID
-__attribute__, ATTRIBUTE, NORID
+__alignof, ALIGNOF, RID_UNUSED
+__alignof__, ALIGNOF, RID_UNUSED
+__asm, ASM_KEYWORD, RID_UNUSED
+__asm__, ASM_KEYWORD, RID_UNUSED
+__attribute, ATTRIBUTE, RID_UNUSED
+__attribute__, ATTRIBUTE, RID_UNUSED
__complex, TYPESPEC, RID_COMPLEX
__complex__, TYPESPEC, RID_COMPLEX
__const, CV_QUALIFIER, RID_CONST
__const__, CV_QUALIFIER, RID_CONST
-__extension__, EXTENSION, NORID
-__imag, IMAGPART, NORID
-__imag__, IMAGPART, NORID
+__extension__, EXTENSION, RID_UNUSED
+__imag, IMAGPART, RID_UNUSED
+__imag__, IMAGPART, RID_UNUSED
__inline, SCSPEC, RID_INLINE
__inline__, SCSPEC, RID_INLINE
-__label__, LABEL, NORID
+__label__, LABEL, RID_UNUSED
__null, CONSTANT, RID_NULL
-__real, REALPART, NORID
-__real__, REALPART, NORID
+__real, REALPART, RID_UNUSED
+__real__, REALPART, RID_UNUSED
__restrict, CV_QUALIFIER, RID_RESTRICT
__restrict__, CV_QUALIFIER, RID_RESTRICT
__signature__, AGGR, RID_SIGNATURE /* Extension */,
__signed, TYPESPEC, RID_SIGNED
__signed__, TYPESPEC, RID_SIGNED
-__sigof__, SIGOF, NORID /* Extension */,
-__typeof, TYPEOF, NORID
-__typeof__, TYPEOF, NORID
+__sigof__, SIGOF, RID_UNUSED /* Extension */,
+__typeof, TYPEOF, RID_UNUSED
+__typeof__, TYPEOF, RID_UNUSED
__volatile, CV_QUALIFIER, RID_VOLATILE
__volatile__, CV_QUALIFIER, RID_VOLATILE
__wchar_t, TYPESPEC, RID_WCHAR /* Unique to ANSI C++ */,
-asm, ASM_KEYWORD, NORID,
-and, ANDAND, NORID,
-and_eq, ASSIGN, NORID,
+asm, ASM_KEYWORD, RID_UNUSED,
+and, ANDAND, RID_UNUSED,
+and_eq, ASSIGN, RID_UNUSED,
auto, SCSPEC, RID_AUTO,
-bitand, '&', NORID,
-bitor, '|', NORID,
+bitand, '&', RID_UNUSED,
+bitor, '|', RID_UNUSED,
bool, TYPESPEC, RID_BOOL,
-break, BREAK, NORID,
-case, CASE, NORID,
-catch, CATCH, NORID,
+break, BREAK, RID_UNUSED,
+case, CASE, RID_UNUSED,
+catch, CATCH, RID_UNUSED,
char, TYPESPEC, RID_CHAR,
class, AGGR, RID_CLASS,
-compl, '~', NORID,
+compl, '~', RID_UNUSED,
const, CV_QUALIFIER, RID_CONST,
-const_cast, CONST_CAST, NORID,
-continue, CONTINUE, NORID,
-default, DEFAULT, NORID,
-delete, DELETE, NORID,
-do, DO, NORID,
+const_cast, CONST_CAST, RID_UNUSED,
+continue, CONTINUE, RID_UNUSED,
+default, DEFAULT, RID_UNUSED,
+delete, DELETE, RID_UNUSED,
+do, DO, RID_UNUSED,
double, TYPESPEC, RID_DOUBLE,
-dynamic_cast, DYNAMIC_CAST, NORID,
-else, ELSE, NORID,
-enum, ENUM, NORID,
+dynamic_cast, DYNAMIC_CAST, RID_UNUSED,
+else, ELSE, RID_UNUSED,
+enum, ENUM, RID_UNUSED,
explicit, SCSPEC, RID_EXPLICIT,
export, SCSPEC, RID_EXPORT,
extern, SCSPEC, RID_EXTERN,
-false, CXX_FALSE, NORID,
+false, CXX_FALSE, RID_UNUSED,
float, TYPESPEC, RID_FLOAT,
-for, FOR, NORID,
+for, FOR, RID_UNUSED,
friend, SCSPEC, RID_FRIEND,
-goto, GOTO, NORID,
-if, IF, NORID,
+goto, GOTO, RID_UNUSED,
+if, IF, RID_UNUSED,
inline, SCSPEC, RID_INLINE,
int, TYPESPEC, RID_INT,
long, TYPESPEC, RID_LONG,
mutable, SCSPEC, RID_MUTABLE,
-namespace, NAMESPACE, NORID,
-new, NEW, NORID,
-not, '!', NORID,
-not_eq, EQCOMPARE, NORID,
-operator, OPERATOR, NORID,
-or, OROR, NORID,
-or_eq, ASSIGN, NORID,
+namespace, NAMESPACE, RID_UNUSED,
+new, NEW, RID_UNUSED,
+not, '!', RID_UNUSED,
+not_eq, EQCOMPARE, RID_UNUSED,
+operator, OPERATOR, RID_UNUSED,
+or, OROR, RID_UNUSED,
+or_eq, ASSIGN, RID_UNUSED,
private, VISSPEC, RID_PRIVATE,
protected, VISSPEC, RID_PROTECTED,
public, VISSPEC, RID_PUBLIC,
register, SCSPEC, RID_REGISTER,
-reinterpret_cast, REINTERPRET_CAST, NORID,
-return, RETURN_KEYWORD, NORID,
+reinterpret_cast, REINTERPRET_CAST, RID_UNUSED,
+return, RETURN_KEYWORD, RID_UNUSED,
short, TYPESPEC, RID_SHORT,
signature, AGGR, RID_SIGNATURE /* Extension */,
signed, TYPESPEC, RID_SIGNED,
-sigof, SIGOF, NORID /* Extension */,
-sizeof, SIZEOF, NORID,
+sigof, SIGOF, RID_UNUSED /* Extension */,
+sizeof, SIZEOF, RID_UNUSED,
static, SCSPEC, RID_STATIC,
-static_cast, STATIC_CAST, NORID,
+static_cast, STATIC_CAST, RID_UNUSED,
struct, AGGR, RID_RECORD,
-switch, SWITCH, NORID,
+switch, SWITCH, RID_UNUSED,
template, TEMPLATE, RID_TEMPLATE,
-this, THIS, NORID,
-throw, THROW, NORID,
-true, CXX_TRUE, NORID,
-try, TRY, NORID,
+this, THIS, RID_UNUSED,
+throw, THROW, RID_UNUSED,
+true, CXX_TRUE, RID_UNUSED,
+try, TRY, RID_UNUSED,
typedef, SCSPEC, RID_TYPEDEF,
-typename, TYPENAME_KEYWORD, NORID,
-typeid, TYPEID, NORID,
-typeof, TYPEOF, NORID,
+typename, TYPENAME_KEYWORD, RID_UNUSED,
+typeid, TYPEID, RID_UNUSED,
+typeof, TYPEOF, RID_UNUSED,
union, AGGR, RID_UNION,
unsigned, TYPESPEC, RID_UNSIGNED,
-using, USING, NORID,
+using, USING, RID_UNUSED,
virtual, SCSPEC, RID_VIRTUAL,
void, TYPESPEC, RID_VOID,
volatile, CV_QUALIFIER, RID_VOLATILE,
-while, WHILE, NORID,
-xor, '^', NORID,
-xor_eq, ASSIGN, NORID,
+while, WHILE, RID_UNUSED,
+xor, '^', RID_UNUSED,
+xor_eq, ASSIGN, RID_UNUSED,
static struct resword wordlist[] =
{
{"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
- {"else", ELSE, NORID,},
+ {"else", ELSE, RID_UNUSED,},
{"", 0, 0},
- {"delete", DELETE, NORID,},
- {"case", CASE, NORID,},
- {"__real__", REALPART, NORID},
+ {"delete", DELETE, RID_UNUSED,},
+ {"case", CASE, RID_UNUSED,},
+ {"__real__", REALPART, RID_UNUSED},
{"", 0, 0},
- {"true", CXX_TRUE, NORID,},
- {"catch", CATCH, NORID,},
- {"typeid", TYPEID, NORID,},
- {"try", TRY, NORID,},
+ {"true", CXX_TRUE, RID_UNUSED,},
+ {"catch", CATCH, RID_UNUSED,},
+ {"typeid", TYPEID, RID_UNUSED,},
+ {"try", TRY, RID_UNUSED,},
{"", 0, 0}, {"", 0, 0},
{"void", TYPESPEC, RID_VOID,},
{"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
{"protected", VISSPEC, RID_PROTECTED,},
{"extern", SCSPEC, RID_EXTERN,},
{"", 0, 0}, {"", 0, 0},
- {"not", '!', NORID,},
+ {"not", '!', RID_UNUSED,},
{"", 0, 0},
{"__signed", TYPESPEC, RID_SIGNED},
{"int", TYPESPEC, RID_INT,},
{"__signed__", TYPESPEC, RID_SIGNED},
- {"__real", REALPART, NORID},
+ {"__real", REALPART, RID_UNUSED},
{"", 0, 0},
- {"xor_eq", ASSIGN, NORID,},
+ {"xor_eq", ASSIGN, RID_UNUSED,},
{"", 0, 0}, {"", 0, 0}, {"", 0, 0},
- {"__attribute", ATTRIBUTE, NORID},
- {"__asm__", ASM_KEYWORD, NORID},
- {"__attribute__", ATTRIBUTE, NORID},
- {"compl", '~', NORID,},
+ {"__attribute", ATTRIBUTE, RID_UNUSED},
+ {"__asm__", ASM_KEYWORD, RID_UNUSED},
+ {"__attribute__", ATTRIBUTE, RID_UNUSED},
+ {"compl", '~', RID_UNUSED,},
{"public", VISSPEC, RID_PUBLIC,},
- {"not_eq", EQCOMPARE, NORID,},
- {"switch", SWITCH, NORID,},
- {"__extension__", EXTENSION, NORID},
+ {"not_eq", EQCOMPARE, RID_UNUSED,},
+ {"switch", SWITCH, RID_UNUSED,},
+ {"__extension__", EXTENSION, RID_UNUSED},
{"const", CV_QUALIFIER, RID_CONST,},
{"static", SCSPEC, RID_STATIC,},
{"", 0, 0},
{"__inline__", SCSPEC, RID_INLINE},
{"__restrict__", CV_QUALIFIER, RID_RESTRICT},
{"inline", SCSPEC, RID_INLINE,},
- {"const_cast", CONST_CAST, NORID,},
- {"static_cast", STATIC_CAST, NORID,},
+ {"const_cast", CONST_CAST, RID_UNUSED,},
+ {"static_cast", STATIC_CAST, RID_UNUSED,},
{"__restrict", CV_QUALIFIER, RID_RESTRICT},
- {"xor", '^', NORID,},
+ {"xor", '^', RID_UNUSED,},
{"__wchar_t", TYPESPEC, RID_WCHAR /* Unique to ANSI C++ */,},
- {"new", NEW, NORID,},
- {"__alignof__", ALIGNOF, NORID},
+ {"new", NEW, RID_UNUSED,},
+ {"__alignof__", ALIGNOF, RID_UNUSED},
{"signed", TYPESPEC, RID_SIGNED,},
- {"and", ANDAND, NORID,},
+ {"and", ANDAND, RID_UNUSED,},
{"", 0, 0}, {"", 0, 0}, {"", 0, 0},
{"explicit", SCSPEC, RID_EXPLICIT,},
{"", 0, 0},
- {"__imag__", IMAGPART, NORID},
- {"while", WHILE, NORID,},
+ {"__imag__", IMAGPART, RID_UNUSED},
+ {"while", WHILE, RID_UNUSED,},
{"", 0, 0}, {"", 0, 0}, {"", 0, 0},
- {"do", DO, NORID,},
- {"typename", TYPENAME_KEYWORD, NORID,},
+ {"do", DO, RID_UNUSED,},
+ {"typename", TYPENAME_KEYWORD, RID_UNUSED,},
{"friend", SCSPEC, RID_FRIEND,},
- {"continue", CONTINUE, NORID,},
+ {"continue", CONTINUE, RID_UNUSED,},
{"class", AGGR, RID_CLASS,},
- {"default", DEFAULT, NORID,},
- {"this", THIS, NORID,},
- {"dynamic_cast", DYNAMIC_CAST, NORID,},
- {"typeof", TYPEOF, NORID,},
+ {"default", DEFAULT, RID_UNUSED,},
+ {"this", THIS, RID_UNUSED,},
+ {"dynamic_cast", DYNAMIC_CAST, RID_UNUSED,},
+ {"typeof", TYPEOF, RID_UNUSED,},
{"virtual", SCSPEC, RID_VIRTUAL,},
{"export", SCSPEC, RID_EXPORT,},
- {"and_eq", ASSIGN, NORID,},
- {"__typeof__", TYPEOF, NORID},
+ {"and_eq", ASSIGN, RID_UNUSED,},
+ {"__typeof__", TYPEOF, RID_UNUSED},
{"__const__", CV_QUALIFIER, RID_CONST},
{"__volatile", CV_QUALIFIER, RID_VOLATILE},
{"short", TYPESPEC, RID_SHORT,},
{"__volatile__", CV_QUALIFIER, RID_VOLATILE},
{"__const", CV_QUALIFIER, RID_CONST},
- {"namespace", NAMESPACE, NORID,},
+ {"namespace", NAMESPACE, RID_UNUSED,},
{"char", TYPESPEC, RID_CHAR,},
{"unsigned", TYPESPEC, RID_UNSIGNED,},
{"double", TYPESPEC, RID_DOUBLE,},
- {"or_eq", ASSIGN, NORID,},
+ {"or_eq", ASSIGN, RID_UNUSED,},
{"__null", CONSTANT, RID_NULL},
- {"if", IF, NORID,},
+ {"if", IF, RID_UNUSED,},
{"__signature__", AGGR, RID_SIGNATURE /* Extension */,},
- {"__label__", LABEL, NORID},
+ {"__label__", LABEL, RID_UNUSED},
{"long", TYPESPEC, RID_LONG,},
- {"__imag", IMAGPART, NORID},
- {"__asm", ASM_KEYWORD, NORID},
+ {"__imag", IMAGPART, RID_UNUSED},
+ {"__asm", ASM_KEYWORD, RID_UNUSED},
{"", 0, 0},
- {"__sigof__", SIGOF, NORID /* Extension */,},
+ {"__sigof__", SIGOF, RID_UNUSED /* Extension */,},
{"", 0, 0}, {"", 0, 0}, {"", 0, 0},
{"struct", AGGR, RID_RECORD,},
{"", 0, 0},
{"volatile", CV_QUALIFIER, RID_VOLATILE,},
- {"false", CXX_FALSE, NORID,},
- {"sizeof", SIZEOF, NORID,},
+ {"false", CXX_FALSE, RID_UNUSED,},
+ {"sizeof", SIZEOF, RID_UNUSED,},
{"__complex__", TYPESPEC, RID_COMPLEX},
{"", 0, 0}, {"", 0, 0}, {"", 0, 0},
- {"for", FOR, NORID,},
- {"or", OROR, NORID,},
+ {"for", FOR, RID_UNUSED,},
+ {"or", OROR, RID_UNUSED,},
{"register", SCSPEC, RID_REGISTER,},
- {"throw", THROW, NORID,},
+ {"throw", THROW, RID_UNUSED,},
{"", 0, 0},
- {"using", USING, NORID,},
+ {"using", USING, RID_UNUSED,},
{"", 0, 0}, {"", 0, 0},
{"__complex", TYPESPEC, RID_COMPLEX},
{"", 0, 0},
- {"asm", ASM_KEYWORD, NORID,},
+ {"asm", ASM_KEYWORD, RID_UNUSED,},
{"signature", AGGR, RID_SIGNATURE /* Extension */,},
- {"enum", ENUM, NORID,},
- {"reinterpret_cast", REINTERPRET_CAST, NORID,},
+ {"enum", ENUM, RID_UNUSED,},
+ {"reinterpret_cast", REINTERPRET_CAST, RID_UNUSED,},
{"mutable", SCSPEC, RID_MUTABLE,},
- {"__alignof", ALIGNOF, NORID},
- {"return", RETURN_KEYWORD, NORID,},
+ {"__alignof", ALIGNOF, RID_UNUSED},
+ {"return", RETURN_KEYWORD, RID_UNUSED,},
{"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
{"", 0, 0},
{"float", TYPESPEC, RID_FLOAT,},
{"bool", TYPESPEC, RID_BOOL,},
{"", 0, 0},
{"typedef", SCSPEC, RID_TYPEDEF,},
- {"__typeof", TYPEOF, NORID},
- {"bitand", '&', NORID,},
- {"break", BREAK, NORID,},
+ {"__typeof", TYPEOF, RID_UNUSED},
+ {"bitand", '&', RID_UNUSED,},
+ {"break", BREAK, RID_UNUSED,},
{"", 0, 0}, {"", 0, 0}, {"", 0, 0},
{"union", AGGR, RID_UNION,},
{"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
{"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
{"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
- {"goto", GOTO, NORID,},
- {"sigof", SIGOF, NORID /* Extension */,},
+ {"goto", GOTO, RID_UNUSED,},
+ {"sigof", SIGOF, RID_UNUSED /* Extension */,},
{"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
{"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
{"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
- {"bitor", '|', NORID,},
+ {"bitor", '|', RID_UNUSED,},
{"auto", SCSPEC, RID_AUTO,},
{"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
{"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
{"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
{"", 0, 0}, {"", 0, 0},
- {"operator", OPERATOR, NORID,}
+ {"operator", OPERATOR, RID_UNUSED,}
};
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)