#include "tokens.h" #include "tokenlookup.h" /* $Id: tokenlookup.c,v 1.3 2005/09/03 20:58:15 joshr Exp $ */ // returns a string name char *lookup_token( int token ) { struct tokenname *tok = get_token_names(); /* from tokens.h */ while(tok && tok->t != -1) { if (tok->t == token) { return tok->n; } tok++; } return "UNKNOWN_TOKEN"; }