]> git.saurik.com Git - bison.git/blame - src/scan-code.h
For push mode, convert yyparse from a macro to a function, invoke yylex
[bison.git] / src / scan-code.h
CommitLineData
b0f4c4ea 1/* Bison Action Scanner
e9071366
AD
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"
b0f4c4ea 27# include "symlist.h"
e9071366 28
b0f4c4ea
JD
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. */
e9071366
AD
32extern int max_left_semantic_context;
33
b0f4c4ea 34void code_scanner_free (void);
76290368 35
b0f4c4ea
JD
36/* The action of the rule R contains $$, $1 etc. referring to the values
37 of the rule R. */
38char const *translate_rule_action (symbol_list *r);
76290368 39
b0f4c4ea
JD
40/* The action A refers to $$ and @$ only, referring to a symbol. */
41char const *translate_symbol_action (char const *a, location l);
76290368 42
b0f4c4ea
JD
43/* The action contains no special escapes, just protect M4 special
44 symbols. */
45char const *translate_code (char const *a, location l);
e9071366
AD
46
47#endif /* !SCAN_CODE_H_ */