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. */
24 # include "location.h"
26 typedef struct symbol_list
28 struct symbol_list
*next
;
32 /* The action is attached to the LHS of a rule. */
39 # include "parse-gram.h"
41 typedef struct gram_control_s
46 /* From the scanner. */
48 extern int gram__flex_debug
;
49 void scanner_last_string_free
PARAMS ((void));
50 void scanner_initialize
PARAMS ((void));
51 void scanner_free
PARAMS ((void));
54 int gram_lex (yystype *yylval, location_t *yylloc, \
55 gram_control_t *yycontrol)
59 /* From the parser. */
60 extern int gram_debug
;
61 void gram_error (gram_control_t
*control
,
62 location_t
*loc
, const char *msg
);
63 int gram_parse (void *control
);
65 char *get_type_name
PARAMS ((int n
, symbol_list
*rule
));
69 void grammar_start_symbol_set
PARAMS ((symbol_t
*s
));
70 void prologue_augment
PARAMS ((const char *prologue
, location_t location
));
71 void epilogue_set
PARAMS ((const char *epilogue
, location_t location
));
72 void grammar_symbol_append
PARAMS ((symbol_t
*s
));
73 void grammar_rule_begin
PARAMS ((symbol_t
*lhs
));
74 void grammar_rule_end
PARAMS ((void));
75 void grammar_midrule_action
PARAMS ((void));
76 void grammar_current_rule_prec_set
PARAMS ((symbol_t
*precsym
));
77 void grammar_current_rule_symbol_append
PARAMS ((symbol_t
*symbol
));
78 void grammar_current_rule_action_append
PARAMS ((const char *action
,
80 extern symbol_list
*current_rule
;
81 void reader
PARAMS ((void));
83 #endif /* !READER_H_ */