]> git.saurik.com Git - bison.git/blame - src/reader.h
Use more-consistent naming conventions for local vars.
[bison.git] / src / reader.h
CommitLineData
ef4479de
PE
1/* Input parser for Bison
2
a737b216 3 Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
a70083a3
AD
4
5 This file is part of Bison, the GNU Compiler Compiler.
6
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)
10 any later version.
11
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.
16
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., 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
21
22#ifndef READER_H_
23# define READER_H_
24
0aa32d51 25# include "location.h"
56c47203 26# include "symlist.h"
5b2dd224 27
e9955c83
AD
28# include "parse-gram.h"
29
676385e2
PH
30typedef struct merger_list
31{
32 struct merger_list* next;
5b2dd224
PE
33 uniqstr name;
34 uniqstr type;
35} merger_list;
676385e2 36
e9955c83
AD
37/* From the scanner. */
38extern FILE *gram_in;
39extern int gram__flex_debug;
0aa32d51 40extern boundary scanner_cursor;
d33cb3ae
PE
41void scanner_initialize (void);
42void scanner_free (void);
7ec2d4cd 43void scanner_last_string_free (void);
e9955c83 44
5b25cd7c 45# define YY_DECL int gram_lex (YYSTYPE *val, location *loc)
e9955c83
AD
46YY_DECL;
47
48
49/* From the parser. */
50extern int gram_debug;
f6d03984 51int gram_parse (void);
ef4479de 52char const *token_name (int);
9280d3ef 53
e9955c83
AD
54
55/* From reader.c. */
a737b216 56void grammar_start_symbol_set (symbol *sym, location loc);
5b2dd224
PE
57void prologue_augment (const char *prologue, location loc);
58void epilogue_augment (const char *epilogue, location loc);
a737b216 59void grammar_symbol_append (symbol *sym, location loc);
5b2dd224
PE
60void grammar_rule_begin (symbol *lhs, location loc);
61void grammar_rule_end (location loc);
d33cb3ae 62void grammar_midrule_action (void);
5b2dd224
PE
63void grammar_current_rule_prec_set (symbol *precsym, location loc);
64void grammar_current_rule_dprec_set (int dprec, location loc);
65void grammar_current_rule_merge_set (uniqstr name, location loc);
d33cb3ae 66
5b2dd224
PE
67void grammar_current_rule_symbol_append (symbol *sym, location loc);
68void grammar_current_rule_action_append (const char *action, location loc);
69extern symbol_list *current_rule;
d33cb3ae
PE
70void reader (void);
71void free_merger_functions (void);
676385e2
PH
72
73extern merger_list *merge_functions;
74
9280d3ef 75extern int typed;
a70083a3
AD
76
77#endif /* !READER_H_ */