1 /* A Bison parser, made by GNU Bison 3.8.2. */
3 /* Bison interface for Yacc-like parsers in C
5 Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <https://www.gnu.org/licenses/>. */
21 /* As a special exception, you may create a larger work that contains
22 part or all of the Bison parser skeleton and distribute that work
23 under terms of your choice, so long as that work isn't itself a
24 parser generator using the skeleton or a modified version thereof
25 as a parser skeleton. Alternatively, if you modify or redistribute
26 the parser skeleton itself, you may (at your option) remove this
27 special exception, which will cause the skeleton and the resulting
28 Bison output files to be licensed under the GNU General Public
29 License without this special exception.
31 This special exception was added by the Free Software Foundation in
32 version 2.2 of Bison. */
34 /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
35 especially those whose name start with YY_ or yy_. They are
36 private implementation details that can be changed or removed. */
38 #ifndef YY_YY_SRC_PARSE_H_INCLUDED
39 # define YY_YY_SRC_PARSE_H_INCLUDED
47 /* "%code requires" blocks. */
48 #line 55 "src/parse.y"
54 /* Left-value type. */
55 #if defined (YYSTYPE) || defined (YYSTYPE_IS_DECLARED)
56 # error Unexpected that YYSTYPE is already declared
62 struct apply_rule apply_rule
;
69 struct uniqstr_array strings
;
70 struct apply_rule_array apply_rules
;
73 #define YYSTYPE_IS_DECLARED 1
74 #define YYSTYPE_IS_TRIVIAL 1
76 #if defined (YYLTYPE) || defined (YYLTYPE_IS_DECLARED)
77 # error Unexpected that YYLTYPE is already declared
80 #define YYLTYPE struct yyltype
82 #define YYLTYPE_IS_DECLARED 1
83 #define YYLTYPE_IS_TRIVIAL 0
85 #line 86 "src/parse.h"
93 YYTOKEN_END
= 0, /* "end of input" */
94 YYTOKEN_YYerror
= 256, /* error */
95 YYTOKEN_YYUNDEF
= 257, /* "invalid token" */
96 YYTOKEN_STRING
= 258, /* "string" */
97 YYTOKEN_NAME
= 259, /* "name" */
98 YYTOKEN_VALUE
= 260, /* "value" */
99 YYTOKEN_COMMAND
= 261, /* "command" */
100 YYTOKEN_ARROW
= 262, /* "->" */
101 YYTOKEN_CATENATE
= 263, /* "+=" */
102 YYTOKEN_DESCRIPTION
= 264, /* "'description' keyword" */
103 YYTOKEN_VARIABLE
= 265, /* "'variable' keyword" */
104 YYTOKEN_RULE
= 266, /* "'rule' keyword" */
105 YYTOKEN_TARGET
= 267, /* "'target' keyword" */
106 YYTOKEN_FILE
= 268, /* "'file' keyword" */
107 YYTOKEN_DEFAULT
= 269, /* "'default' keyword" */
108 YYTOKEN_DIRECTORY
= 270, /* "'directory' keyword" */
109 YYTOKEN_MAP
= 271 /* "'map' keyword" */
111 typedef enum yytokentype yytoken_kind_t
;
115 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
116 typedef YYSTYPE YYSTYPE
;
117 # define YYSTYPE_IS_TRIVIAL 1
118 # define YYSTYPE_IS_DECLARED 1
122 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
123 typedef struct YYLTYPE YYLTYPE
;
131 # define YYLTYPE_IS_DECLARED 1
132 # define YYLTYPE_IS_TRIVIAL 1
138 int yyparse (yyscan_t yyscanner
, struct build_context
*context
);
140 /* "%code provides" blocks. */
141 #line 93 "src/parse.y"
143 /* YYINITDEPTH -- initial size of the parser's stacks. */
144 #define YYINITDEPTH 256
146 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
147 if the built-in stack extension method is used).
149 Do not make this value too large; the results are undefined if
150 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
151 evaluated with infinite-precision integer arithmetic. */
152 #define YYMAXDEPTH 8192
157 struct quoting_slots
*qs
;
158 const Hash
*variables
;
161 #define YY_EXTRA_TYPE YYETYPE *
163 #if 0 // TODO #ifndef FLEX_SCANNER
164 extern NODISCARD
int yylex_init (yyscan_t
*yyscanner
) NONNULL (1);
165 extern int yylex_destroy (yyscan_t yyscanner
) NONNULL (1);
166 extern void yyset_extra (YY_EXTRA_TYPE user_defined
, yyscan_t yyscanner
) NONNULL (1, 2);
167 extern NODISCARD YY_EXTRA_TYPE
yyget_extra (yyscan_t yyscanner
) RETURNS_NONNULL
;
168 extern NODISCARD
FILE *yyget_in (yyscan_t yyscanner
) NONNULL (1) RETURNS_NONNULL
;
169 extern void yyset_in (FILE *fp
, yyscan_t yyscanner
) NONNULL (1, 2);
170 extern void yyset_out (FILE *fp
, yyscan_t yyscanner
) NONNULL (1, 2);
173 #line 174 "src/parse.h"
175 #endif /* !YY_YY_SRC_PARSE_H_INCLUDED */