make firm compilable with a c++ compiler
[libfirm] / ir / libcore / lc_parser_t.h
1 /*
2   libcore: library for basic data structures and algorithms.
3   Copyright (C) 2005  IPD Goos, Universit"at Karlsruhe, Germany
4
5   This library is free software; you can redistribute it and/or
6   modify it under the terms of the GNU Lesser General Public
7   License as published by the Free Software Foundation; either
8   version 2.1 of the License, or (at your option) any later version.
9
10   This library 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 GNU
13   Lesser General Public License for more details.
14
15   You should have received a copy of the GNU Lesser General Public
16   License along with this library; if not, write to the Free Software
17   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18 */
19
20
21
22 #ifndef _PARSER_T_H
23 #define _PARSER_T_H
24
25 #include "lc_opts_t.h"
26
27 typedef struct {
28         const char *str;
29         int len;
30 } text_t;
31
32 void lc_opt_init_parser(const char *filename, lc_opt_error_handler_t *handler);
33
34 void _lc_opt_add_to_data_char(char c);
35
36 #define PPREFIX _lc_opt_
37 #define PMANGLE(name) _lc_opt_ ## name
38
39 extern FILE *PMANGLE(in);
40 extern int PMANGLE(linenr);
41
42 int PMANGLE(parse)(void);
43 int PMANGLE(lex)(void);
44
45 #endif