This is more sensible default if a token is zero-initialized.
#include <stdbool.h>
#include <unitypes.h>
#include "libpspp/str.h"
#include <stdbool.h>
#include <unitypes.h>
#include "libpspp/str.h"
+ TOKEN_TYPE(STOP) /* End of input. */ \
+ \
TOKEN_TYPE(ID) /* Identifier. */ \
TOKEN_TYPE(POS_NUM) /* Positive number. */ \
TOKEN_TYPE(NEG_NUM) /* Negative number. */ \
TOKEN_TYPE(STRING) /* Quoted string. */ \
TOKEN_TYPE(ID) /* Identifier. */ \
TOKEN_TYPE(POS_NUM) /* Positive number. */ \
TOKEN_TYPE(NEG_NUM) /* Negative number. */ \
TOKEN_TYPE(STRING) /* Quoted string. */ \
- TOKEN_TYPE(STOP) /* End of input. */ \
\
TOKEN_TYPE(ENDCMD) /* . */ \
TOKEN_TYPE(PLUS) /* + */ \
\
TOKEN_TYPE(ENDCMD) /* . */ \
TOKEN_TYPE(PLUS) /* + */ \
TOKEN_TYPES
#undef TOKEN_TYPE
};
TOKEN_TYPES
#undef TOKEN_TYPE
};
#define TOKEN_TYPE(TYPE) + 1
enum { TOKEN_N_TYPES = TOKEN_TYPES };
#define TOKEN_TYPE(TYPE) + 1
enum { TOKEN_N_TYPES = TOKEN_TYPES };