TOK_CEOF,
/* Storage specifiers */
- TOK_AUTO,
+ TOK_FIRST_STORAGE_CLASS,
+ TOK_AUTO = TOK_FIRST_STORAGE_CLASS,
TOK_EXTERN,
TOK_REGISTER,
TOK_STATIC,
TOK_TYPEDEF,
+ TOK_LAST_STORAGE_CLASS = TOK_TYPEDEF,
/* Tokens denoting type qualifiers */
TOK_FIRST_TYPEQUAL,
/* Function specifiers */
TOK_INLINE,
+ TOK_FASTCALL,
/* Tokens denoting types */
TOK_FIRST_TYPE,
TOK_ATTRIBUTE,
TOK_FAR,
TOK_NEAR,
- TOK_FASTCALL,
TOK_A,
TOK_X,
TOK_Y,
+#if defined(HAVE_INLINE)
+INLINE int TokIsStorageClass (const Token* T)
+/* Return true if the token is a storage class specifier */
+{
+ return (T->Tok >= TOK_FIRST_STORAGE_CLASS && T->Tok <= TOK_LAST_STORAGE_CLASS);
+}
+#else
+# define TokIsStorageClass(T) \
+ ((T)->Tok >= TOK_FIRST_STORAGE_CLASS && (T)->Tok <= TOK_LAST_STORAGE_CLASS)
+#endif
+
#if defined(HAVE_INLINE)
INLINE int TokIsType (const Token* T)
/* Return true if the token is a type */
# define TokIsTypeQual(T) ((T)->Tok >= TOK_FIRST_TYPEQUAL && (T)->Tok <= TOK_LAST_TYPEQUAL)
#endif
+int TokIsFuncSpec (const Token* T);
+/* Return true if the token is a function specifier */
+
void SymName (char* S);
/* Read a symbol from the input stream. The first character must have been
* checked before calling this function. The buffer is expected to be at