/* */
1 /*
2 * Copyright (c) 1998, 1999, 2000, 2001, 2003, 2010
3 * Tama Communications Corporation
4 *
5 * This file is part of GNU GLOBAL.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #ifndef _INTERNAL_H_
22 #define _INTERNAL_H_
23
24 #include "parser.h"
25 #include "strbuf.h"
26 #include "token.h"
27
28 #define PUT(type, tag, lno, line) do { \
29 DBG_PRINT(level, line); \
30 param->put(type, tag, lno, curfile, line, param->arg); \
31 } while (0)
32
33 #ifdef DEBUG
34 #define DBG_PRINT(level, a) do { \
35 if (param->flags & PARSER_DEBUG) \
36 dbg_print(level, a); \
37 } while (0)
38 #else
39 #define DBG_PRINT(level, a) do {} while (0)
40 #endif
41
42 /* parser procedures */
43 void C(const struct parser_param *);
44 void yacc(const struct parser_param *);
45 void Cpp(const struct parser_param *);
46 void java(const struct parser_param *);
47 void php(const struct parser_param *);
48 void assembly(const struct parser_param *);
49
50 void dbg_print(int, const char *);
51
52 extern STRBUF *asm_symtable;
53 void asm_initscan(void);
54 int asm_lex(const struct parser_param *);
55
56 #endif
/* */