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_BSH_SRC_SH_PARSE_H_INCLUDED
39 # define YY_BSH_SRC_SH_PARSE_H_INCLUDED
48 # else /* ! defined YYDEBUG */
50 # endif /* ! defined YYDEBUG */
51 #endif /* ! defined BSHDEBUG */
55 /* "%code requires" blocks. */
56 #line 134 "src/sh-parse.y"
60 #if defined (BSHLTYPE) || defined (BSHLTYPE_IS_DECLARED)
61 # error Unexpected that BSHLTYPE is already declared
64 #define BSHLTYPE struct yyltype
66 #define BSHLTYPE_IS_DECLARED 1
67 #define BSHLTYPE_IS_TRIVIAL 0
69 #line 70 "src/sh-parse.h"
77 BSHEOF
= 0, /* "end of file" */
78 BSHerror
= 256, /* error */
79 BSHUNDEF
= 257, /* "invalid token" */
80 NOT_ACCEPTED_CHAR
= 258, /* NOT_ACCEPTED_CHAR */
81 INVALID_ENVIRONMENT_VAR
= 259, /* INVALID_ENVIRONMENT_VAR */
82 UNEXPECTED_EOF
= 260, /* UNEXPECTED_EOF */
83 CHARS_AFTER_EOL
= 261, /* CHARS_AFTER_EOL */
84 END_OF_FILE
= 262, /* END_OF_FILE */
85 END_OF_LINE
= 263, /* END_OF_LINE */
86 BLANK
= 264, /* BLANK */
87 REDIRECT_OE
= 265, /* REDIRECT_OE */
88 REDIRECT_O
= 266, /* REDIRECT_O */
89 REDIRECT_E
= 267, /* REDIRECT_E */
90 INDIRECT
= 268, /* INDIRECT */
91 REDIRECT_APPEND_E
= 269, /* REDIRECT_APPEND_E */
92 REDIRECT_APPEND_O
= 270, /* REDIRECT_APPEND_O */
93 WORD
= 271, /* WORD */
94 ENV_VAR
= 272, /* ENV_VAR */
96 SEQUENTIAL
= 274, /* SEQUENTIAL */
97 PARALLEL
= 275, /* PARALLEL */
98 CONDITIONAL_NZERO
= 276, /* CONDITIONAL_NZERO */
99 CONDITIONAL_ZERO
= 277, /* CONDITIONAL_ZERO */
100 PIPE
= 278 /* PIPE */
102 typedef enum bshtokentype bshtoken_kind_t
;
106 #if ! defined BSHSTYPE && ! defined BSHSTYPE_IS_DECLARED
109 #line 159 "src/sh-parse.y"
114 simple_command_t
*simple_command
;
118 #line 119 "src/sh-parse.h"
121 typedef union BSHSTYPE BSHSTYPE
;
122 # define BSHSTYPE_IS_TRIVIAL 1
123 # define BSHSTYPE_IS_DECLARED 1
127 #if ! defined BSHLTYPE && ! defined BSHLTYPE_IS_DECLARED
128 typedef struct BSHLTYPE BSHLTYPE
;
136 # define BSHLTYPE_IS_DECLARED 1
137 # define BSHLTYPE_IS_TRIVIAL 1
143 #ifndef YYPUSH_MORE_DEFINED
144 # define YYPUSH_MORE_DEFINED
145 enum { YYPUSH_MORE
= 4 };
148 typedef struct bshpstate bshpstate
;
151 int bshpush_parse (bshpstate
*ps
,
152 int pushed_char
, BSHSTYPE
const *pushed_val
, BSHLTYPE
*pushed_loc
, command_t
**command_root
);
154 bshpstate
*bshpstate_new (void);
155 void bshpstate_delete (bshpstate
*ps
);
158 #endif /* !YY_BSH_SRC_SH_PARSE_H_INCLUDED */