Add licensing text to every source file.
[external/binutils.git] / gold / script-c.h
1 /* script-c.h -- C interface for linker scripts in gold.  */
2
3 /* Copyright 2006, 2007 Free Software Foundation, Inc.
4    Written by Ian Lance Taylor <iant@google.com>.
5
6    This file is part of gold.
7
8    This program is free software; you can redistribute it and/or modify
9    it under the terms of the GNU General Public License as published by
10    the Free Software Foundation; either version 3 of the License, or
11    (at your option) any later version.
12
13    This program is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16    GNU General Public License for more details.
17
18    You should have received a copy of the GNU General Public License
19    along with this program; if not, write to the Free Software
20    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
21    MA 02110-1301, USA.  */
22
23 /* This file exists so that both the bison parser and script.cc can
24    include it, so that they can communicate back and forth.  */
25
26 #ifndef GOLD_SCRIPT_C_H
27 #define GOLD_SCRIPT_C_H
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33 #include "yyscript.h"
34
35 /* The bison parser function.  */
36
37 extern int
38 yyparse(void* closure);
39
40 /* Called by the bison parser skeleton to return the next token.  */
41
42 extern int
43 yylex(YYSTYPE*, void* closure);
44
45 /* Called by the bison parser skeleton to report an error.  */
46
47 extern void
48 yyerror(void* closure, const char*);
49
50 /* Called by the bison parser to add a file to the link.  */
51
52 extern void
53 script_add_file(void* closure, const char*);
54
55 /* Called by the bison parser to start and stop a group.  */
56
57 extern void
58 script_start_group(void* closure);
59 extern void
60 script_end_group(void* closure);
61
62 /* Called by the bison parser to start and end an AS_NEEDED list.  */
63
64 extern void
65 script_start_as_needed(void* closure);
66 extern void
67 script_end_as_needed(void* closure);
68
69 #ifdef __cplusplus
70 }
71 #endif
72
73 #endif /* !defined(GOLD_SCRIPT_C_H) */