1 /* Input parser for Bison
3 Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
5 This file is part of Bison, the GNU Compiler Compiler.
7 Bison 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 2, or (at your option)
12 Bison 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.
17 You should have received a copy of the GNU General Public License
18 along with Bison; see the file COPYING. If not, write to
19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA. */
25 # include "location.h"
28 # include "parse-gram.h"
30 typedef struct merger_list
32 struct merger_list
* next
;
37 /* From the scanner. */
39 extern int gram__flex_debug
;
40 extern boundary scanner_cursor
;
41 extern int max_left_semantic_context
;
42 void scanner_initialize (void);
43 void scanner_free (void);
44 void scanner_last_string_free (void);
46 # define YY_DECL int gram_lex (YYSTYPE *val, location *loc)
50 /* From the parser. */
51 extern int gram_debug
;
52 int gram_parse (void);
53 char const *token_name (int);
57 void grammar_start_symbol_set (symbol
*sym
, location loc
);
58 void prologue_augment (const char *prologue
, location loc
);
59 void grammar_symbol_append (symbol
*sym
, location loc
);
60 void grammar_rule_begin (symbol
*lhs
, location loc
);
61 void grammar_rule_end (location loc
);
62 void grammar_midrule_action (void);
63 void grammar_current_rule_prec_set (symbol
*precsym
, location loc
);
64 void grammar_current_rule_dprec_set (int dprec
, location loc
);
65 void grammar_current_rule_merge_set (uniqstr name
, location loc
);
67 void grammar_current_rule_symbol_append (symbol
*sym
, location loc
);
68 void grammar_current_rule_action_append (const char *action
, location loc
);
69 extern symbol_list
*current_rule
;
71 void free_merger_functions (void);
73 extern merger_list
*merge_functions
;
76 extern bool default_prec
;
78 #endif /* !READER_H_ */