]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/binutils/binutils/windmc.h
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / binutils / binutils / windmc.h
1 /* windmc.h -- header file for windmc program.
2    Copyright 2007
3    Free Software Foundation, Inc.
4    Written by Kai Tietz, Onevision.
5
6    This file is part of GNU Binutils.
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 2 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, MA
21    02110-1301, USA.  */
22
23 #include "ansidecl.h"
24
25 /* This is the header file for the windmc program.  It defines
26    structures and declares functions used within the program.  */
27
28 #include "winduni.h"
29
30 #ifndef WINDMC_HXX
31 #define WINDMC_HXX
32
33 /* Global flag variables (set by windmc.c file.  */
34 extern int mcset_custom_bit;
35 extern int mcset_out_values_are_decimal;
36 extern rc_uint_type mcset_max_message_length;
37 extern unichar *mcset_msg_id_typedef;
38
39 /* Lexer keyword definition and internal memory structures.  */
40
41 typedef struct mc_keyword
42 {
43   struct mc_keyword *next;
44   const char *group_name;
45   size_t len;
46   unichar *usz;
47   int rid;
48   rc_uint_type nval;
49   unichar *sval;
50   wind_language_t lang_info;
51 } mc_keyword;
52
53 typedef struct mc_node_lang
54 {
55   struct mc_node_lang *next;
56   rc_uint_type vid;
57   const mc_keyword *lang;
58   unichar *message;
59 } mc_node_lang;
60
61 typedef struct mc_node
62 {
63   struct mc_node *next;
64   unichar *user_text;
65   const mc_keyword *facility;
66   const mc_keyword *severity;
67   unichar *symbol;
68   rc_uint_type id;
69   rc_uint_type vid;
70   mc_node_lang *sub;
71 } mc_node;
72
73 extern mc_node *mc_nodes;
74
75 void mc_add_keyword (unichar *, int, const char *, rc_uint_type, unichar *);
76 const mc_keyword *enum_facility (int);
77 const mc_keyword *enum_severity (int);
78
79 mc_node_lang *mc_add_node_lang (mc_node *, const mc_keyword *, rc_uint_type);
80 mc_node *mc_add_node (void);
81
82 /* Standard yacc/flex stuff.  */
83 int yyerror (const char *, ...);
84 int yylex (void);
85 int yyparse (void);
86
87 /* mclex.c  */
88 void mc_set_inputfile (const char *);
89 void mc_set_content (const unichar *);
90
91 /* Lexer control variables. Used by mcparser.y file.  */
92 extern bfd_boolean mclex_want_nl;
93 extern bfd_boolean mclex_want_line;
94 extern bfd_boolean mclex_want_filename;
95
96 void mc_fatal (const char *, ...);
97 void mc_warn (const char *, ...);
98
99 #endif