- #define OFFS 27
- { case STR:
- case NAME:
- tok_pattern[OFFS] = 's';
- break;
- case REF:
- case FPTR:
- tok_pattern[OFFS] = 'x';
- break;
- case NUM:
- case SS:
- case SSD:
- tok_pattern[OFFS] = 'i';
- break;
- case CLOPEN:
- case CLCLOSE:
- case SOPEN:
- case SCLOSE:
- case EOPEN:
- case ECLOSE:
- case VOPEN:
- case VCLOSE:
- case QOPEN:
- case QCLOSE:
- case RT:
- case HB:
- tok_pattern[OFFS] = 'i';
+ #define TOFFS 9
+ #define LOFFS 27
+ #define $($)#$
+ #define TOK_CASE(T,C) \
+ case T: \
+ tok_string = $(T); \
+ tok_pattern[LOFFS] = C; \
+ break
+ { TOK_CASE(STR,'s');
+ TOK_CASE(NAME,'s');
+ TOK_CASE(REF,'x');
+ TOK_CASE(FPTR,'x');
+ TOK_CASE(NUM,'i');
+ TOK_CASE(SS,'i');
+ TOK_CASE(SSD,'i');
+ TOK_CASE(CLOPEN,'i');
+ TOK_CASE(CLCLOSE,'i');
+ default:
+ tok_string = "UNKNOWN";
+ tok_pattern[LOFFS] = 'i';