4 * Copyright (c) Tuomo Valkonen 1999-2002.
6 * You may distribute and modify this library under the terms of either
7 * the Clarified Artistic License or the GNU LGPL, version 2.1 or later.
13 #include "tokenizer.h"
16 int main(int argc
, char *argv
[])
23 if(!(tokz
=tokz_open_file(stdin
, "stdin")))
26 while(tokz_get_token(tokz
, &tok
)){
29 printf("long - %ld\n", TOK_LONG_VAL(&tok
));
32 printf("double - %g\n", TOK_DOUBLE_VAL(&tok
));
35 printf("char - '%c'\n", TOK_CHAR_VAL(&tok
));
38 printf("string - \"%s\"\n", TOK_STRING_VAL(&tok
));
41 printf("ident - %s\n", TOK_IDENT_VAL(&tok
));
44 printf("comment - %s\n", TOK_COMMENT_VAL(&tok
));
47 printf("operator - %03x\n", TOK_OP_VAL(&tok
));