2 * This file is part of cparser.
3 * Copyright (C) 2007-2008 Matthias Braun <matze@braunis.de>
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
24 #include "string_rep.h"
26 #include "symbol_table.h"
33 #define T(mode,x,str,val) T_##x val,
34 #define TS(x,str,val) T_##x val,
45 #define T(mode,x,str,val) TP_##x val,
46 #define TS(x,str,val) TP_##x val,
47 #include "tokens_preprocessor.inc"
51 } preprocessor_token_type_t;
53 typedef struct source_position_t source_position_t;
54 struct source_position_t {
55 const char *input_name;
59 /* position used for "builtin" declarations/types */
60 extern const source_position_t builtin_source_position;
67 long double floatvalue;
69 wide_string_t wide_string;
72 source_position_t source_position;
75 void init_tokens(void);
76 void exit_tokens(void);
77 void print_token_type(FILE *out, token_type_t token_type);
78 void print_token(FILE *out, const token_t *token);
80 void print_pp_token_type(FILE *out, preprocessor_token_type_t type);
81 void print_pp_token(FILE *out, const token_t *token);