1 /* Input parser for Bison
3 Copyright (C) 2000-2003, 2005-2007, 2009-2010 Free Software
6 This file is part of Bison, the GNU Compiler Compiler.
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.
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.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
24 # include "location.h"
27 # include "parse-gram.h"
29 typedef struct merger_list
31 struct merger_list
* next
;
34 location type_declaration_location
;
37 /* From the parser. */
38 extern int gram_debug
;
39 int gram_parse (void);
40 char const *token_name (int type
);
44 void grammar_start_symbol_set (symbol
*sym
, location loc
);
45 void grammar_current_rule_begin (symbol
*lhs
, location loc
);
46 void grammar_current_rule_end (location loc
);
47 void grammar_midrule_action (void);
48 void grammar_current_rule_prec_set (symbol
*precsym
, location loc
);
49 void grammar_current_rule_dprec_set (int dprec
, location loc
);
50 void grammar_current_rule_merge_set (uniqstr name
, location loc
);
51 void grammar_current_rule_symbol_append (symbol
*sym
, location loc
);
52 void grammar_current_rule_action_append (const char *action
, location loc
);
54 void free_merger_functions (void);
56 extern merger_list
*merge_functions
;
58 /* Was %union seen? */
59 extern bool union_seen
;
64 /* Should rules have a default precedence? */
65 extern bool default_prec
;
67 #endif /* !READER_H_ */