]> git.saurik.com Git - bison.git/blame - src/scan-code.h
Support %define "KEY" {VALUE}.
[bison.git] / src / scan-code.h
CommitLineData
e9071366
AD
1/* Bison Action Scanner
2
3 Copyright (C) 2006 Free Software Foundation, Inc.
4
5 This file is part of Bison, the GNU Compiler Compiler.
6
7 This program 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 of the License, or
10 (at your option) any later version.
11
12 This program 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 this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20 02110-1301 USA
21*/
22
23#ifndef SCAN_CODE_H_
24# define SCAN_CODE_H_
25
26# include "location.h"
27# include "symlist.h"
28
29/* Keeps track of the maximum number of semantic values to the left of
30 a handle (those referenced by $0, $-1, etc.) are required by the
31 semantic actions of this grammar. */
32extern int max_left_semantic_context;
33
34void code_scanner_free (void);
35
e256e17f 36/* The action of the rule R contains $$, $1 etc. referring to the values
e9071366 37 of the rule R. */
2ce4ed68 38char *translate_rule_action (symbol_list *r);
e9071366
AD
39
40/* The action A refers to $$ and @$ only, referring to a symbol. */
2ce4ed68 41char *translate_symbol_action (const char *a, location l);
e9071366
AD
42
43/* The action contains no special escapes, just protect M4 special
44 symbols. */
2ce4ed68 45char *translate_code (const char *a, location l);
e9071366
AD
46
47#endif /* !SCAN_CODE_H_ */