#ifndef TOKEN_H
#define TOKEN_H

struct token
 {
  int type;
  char *s;
  int slen;
 }
;

#include "gen_alloc.h"
GEN_ALLOC_typedef(token_alloc,struct token,t,len,a)

extern int token_parse();
extern int token_addrlist();
extern int token_unquote();
extern int token_unparse();
extern void token_free();
extern void token_reverse();
extern int token_ready();
extern int token_readyplus();
extern int token_append();

#define TOKEN_ATOM 1
#define TOKEN_QUOTE 2
#define TOKEN_LITERAL 3
#define TOKEN_COMMENT 4
#define TOKEN_LEFT 5
#define TOKEN_RIGHT 6
#define TOKEN_AT 7
#define TOKEN_COMMA 8
#define TOKEN_SEMI 9
#define TOKEN_COLON 10
#define TOKEN_DOT 11

#endif
