enum tokenkind { TNONE, TEOF, TNEWLINE, TIDENT, TNUMBER, TCHARCONST, TSTRINGLIT, /* keyword */ TAUTO, TBREAK, TCASE, TCHAR, TCONST, TCONTINUE, TDEFAULT, TDO, TDOUBLE, TELSE, TENUM, TEXTERN, TFLOAT, TFOR, TGOTO, TIF, TINLINE, TINT, TLONG, TREGISTER, TRESTRICT, TRETURN, TSHORT, TSIGNED, TSIZEOF, TSTATIC, TSTRUCT, TSWITCH, TTYPEDEF, TUNION, TUNSIGNED, TVOID, TVOLATILE, TWHILE, T_ALIGNAS, T_ALIGNOF, T_ATOMIC, T_BOOL, T_COMPLEX, T_GENERIC, T_IMAGINARY, T_NORETURN, T_STATIC_ASSERT, T_THREAD_LOCAL, T__TYPEOF__, /* punctuator */ TLBRACK, TRBRACK, TLPAREN, TRPAREN, TLBRACE, TRBRACE, TPERIOD, TARROW, TINC, TDEC, TBAND, TMUL, TADD, TSUB, TBNOT, TLNOT, TDIV, TMOD, TSHL, TSHR, TLESS, TGREATER, TLEQ, TGEQ, TEQL, TNEQ, TXOR, TBOR, TLAND, TLOR, TQUESTION, TCOLON, TSEMICOLON, TELLIPSIS, TASSIGN, TMULASSIGN, TDIVASSIGN, TMODASSIGN, TADDASSIGN, TSUBASSIGN, TSHLASSIGN, TSHRASSIGN, TBANDASSIGN, TXORASSIGN, TBORASSIGN, TCOMMA, THASH, THASHHASH, }; struct location { const char *file; size_t line, col; }; struct token { enum tokenkind kind; struct location loc; char *lit; }; extern struct token tok; void tokprint(const struct token *); _Noreturn void error(const struct location *, const char *, ...);