1 /* Input parser for bison
2 Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
4 This file is part of Bison, the GNU Compiler Compiler.
6 Bison is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 Bison is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with Bison; see the file COPYING. If not, write to
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
25 # include "parse-gram.h"
27 typedef struct merger_list
29 struct merger_list
* next
;
35 typedef struct gram_control_s
40 /* From the scanner. */
42 extern int gram__flex_debug
;
43 void scanner_initialize (void);
44 void scanner_free (void);
47 int gram_lex (yystype *yylval, location_t *yylloc, \
48 gram_control_t *yycontrol)
52 /* From the parser. */
53 extern int gram_debug
;
54 void gram_error (location_t
*loc
, const char *msg
);
55 int gram_parse (void *control
);
57 /* The sort of braced code we are in. */
58 typedef enum braced_code_e
61 destructor_braced_code
,
64 /* FIXME: This is really a dirty hack which demonstrates that we
65 should probably not try to parse the actions now. */
66 extern braced_code_t current_braced_code
;
70 void grammar_start_symbol_set (symbol_t
*s
, location_t l
);
71 void prologue_augment (const char *prologue
, location_t location
);
72 void epilogue_set (const char *epilogue
, location_t location
);
73 void grammar_symbol_append (symbol_t
*s
, location_t l
);
74 void grammar_rule_begin (symbol_t
*lhs
, location_t l
);
75 void grammar_rule_end (location_t l
);
76 void grammar_midrule_action (void);
77 void grammar_current_rule_prec_set (symbol_t
*precsym
, location_t l
);
78 void grammar_current_rule_dprec_set (int dprec
, location_t l
);
79 void grammar_current_rule_merge_set (const char* name
, location_t l
);
81 void grammar_current_rule_symbol_append (symbol_t
*symbol
, location_t l
);
82 void grammar_current_rule_action_append (const char *action
, location_t l
);
83 extern symbol_list_t
*current_rule
;
85 void free_merger_functions (void);
87 extern merger_list
*merge_functions
;
91 #endif /* !READER_H_ */