| Chet Ramey | 8868eda | 2020-12-06 15:51:17 -0500 | [diff] [blame] | 1 | /* A Bison parser, made by GNU Bison 3.6.4. */ |
| Jari Aalto | 3185942 | 2009-01-12 13:36:28 +0000 | [diff] [blame] | 2 | |
| Chet Ramey | a0c0a00 | 2016-09-15 16:59:08 -0400 | [diff] [blame] | 3 | /* Bison interface for Yacc-like parsers in C |
| Jari Aalto | 3185942 | 2009-01-12 13:36:28 +0000 | [diff] [blame] | 4 | |
| Chet Ramey | 8868eda | 2020-12-06 15:51:17 -0500 | [diff] [blame] | 5 | Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, |
| 6 | Inc. |
| Jari Aalto | 3185942 | 2009-01-12 13:36:28 +0000 | [diff] [blame] | 7 | |
| Chet Ramey | a0c0a00 | 2016-09-15 16:59:08 -0400 | [diff] [blame] | 8 | This program is free software: you can redistribute it and/or modify |
| Jari Aalto | 3185942 | 2009-01-12 13:36:28 +0000 | [diff] [blame] | 9 | it under the terms of the GNU General Public License as published by |
| Chet Ramey | a0c0a00 | 2016-09-15 16:59:08 -0400 | [diff] [blame] | 10 | the Free Software Foundation, either version 3 of the License, or |
| 11 | (at your option) any later version. |
| Jari Aalto | 3185942 | 2009-01-12 13:36:28 +0000 | [diff] [blame] | 12 | |
| 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. |
| 17 | |
| 18 | You should have received a copy of the GNU General Public License |
| Chet Ramey | a0c0a00 | 2016-09-15 16:59:08 -0400 | [diff] [blame] | 19 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
| Jari Aalto | 3185942 | 2009-01-12 13:36:28 +0000 | [diff] [blame] | 20 | |
| 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. |
| 30 | |
| 31 | This special exception was added by the Free Software Foundation in |
| 32 | version 2.2 of Bison. */ |
| 33 | |
| Chet Ramey | 8868eda | 2020-12-06 15:51:17 -0500 | [diff] [blame] | 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. */ |
| 37 | |
| Chet Ramey | a0c0a00 | 2016-09-15 16:59:08 -0400 | [diff] [blame] | 38 | #ifndef YY_YY_Y_TAB_H_INCLUDED |
| 39 | # define YY_YY_Y_TAB_H_INCLUDED |
| 40 | /* Debug traces. */ |
| 41 | #ifndef YYDEBUG |
| 42 | # define YYDEBUG 0 |
| 43 | #endif |
| 44 | #if YYDEBUG |
| 45 | extern int yydebug; |
| 46 | #endif |
| 47 | |
| Chet Ramey | 8868eda | 2020-12-06 15:51:17 -0500 | [diff] [blame] | 48 | /* Token kinds. */ |
| Jari Aalto | 3185942 | 2009-01-12 13:36:28 +0000 | [diff] [blame] | 49 | #ifndef YYTOKENTYPE |
| 50 | # define YYTOKENTYPE |
| Chet Ramey | a0c0a00 | 2016-09-15 16:59:08 -0400 | [diff] [blame] | 51 | enum yytokentype |
| 52 | { |
| Chet Ramey | 8868eda | 2020-12-06 15:51:17 -0500 | [diff] [blame] | 53 | YYEMPTY = -2, |
| 54 | YYEOF = 0, /* "end of file" */ |
| 55 | YYerror = 256, /* error */ |
| 56 | YYUNDEF = 257, /* "invalid token" */ |
| 57 | IF = 258, /* IF */ |
| 58 | THEN = 259, /* THEN */ |
| 59 | ELSE = 260, /* ELSE */ |
| 60 | ELIF = 261, /* ELIF */ |
| 61 | FI = 262, /* FI */ |
| 62 | CASE = 263, /* CASE */ |
| 63 | ESAC = 264, /* ESAC */ |
| 64 | FOR = 265, /* FOR */ |
| 65 | SELECT = 266, /* SELECT */ |
| 66 | WHILE = 267, /* WHILE */ |
| 67 | UNTIL = 268, /* UNTIL */ |
| 68 | DO = 269, /* DO */ |
| 69 | DONE = 270, /* DONE */ |
| 70 | FUNCTION = 271, /* FUNCTION */ |
| 71 | COPROC = 272, /* COPROC */ |
| 72 | COND_START = 273, /* COND_START */ |
| 73 | COND_END = 274, /* COND_END */ |
| 74 | COND_ERROR = 275, /* COND_ERROR */ |
| 75 | IN = 276, /* IN */ |
| 76 | BANG = 277, /* BANG */ |
| 77 | TIME = 278, /* TIME */ |
| 78 | TIMEOPT = 279, /* TIMEOPT */ |
| 79 | TIMEIGN = 280, /* TIMEIGN */ |
| 80 | WORD = 281, /* WORD */ |
| 81 | ASSIGNMENT_WORD = 282, /* ASSIGNMENT_WORD */ |
| 82 | REDIR_WORD = 283, /* REDIR_WORD */ |
| 83 | NUMBER = 284, /* NUMBER */ |
| 84 | ARITH_CMD = 285, /* ARITH_CMD */ |
| 85 | ARITH_FOR_EXPRS = 286, /* ARITH_FOR_EXPRS */ |
| 86 | COND_CMD = 287, /* COND_CMD */ |
| 87 | AND_AND = 288, /* AND_AND */ |
| 88 | OR_OR = 289, /* OR_OR */ |
| 89 | GREATER_GREATER = 290, /* GREATER_GREATER */ |
| 90 | LESS_LESS = 291, /* LESS_LESS */ |
| 91 | LESS_AND = 292, /* LESS_AND */ |
| 92 | LESS_LESS_LESS = 293, /* LESS_LESS_LESS */ |
| 93 | GREATER_AND = 294, /* GREATER_AND */ |
| 94 | SEMI_SEMI = 295, /* SEMI_SEMI */ |
| 95 | SEMI_AND = 296, /* SEMI_AND */ |
| 96 | SEMI_SEMI_AND = 297, /* SEMI_SEMI_AND */ |
| 97 | LESS_LESS_MINUS = 298, /* LESS_LESS_MINUS */ |
| 98 | AND_GREATER = 299, /* AND_GREATER */ |
| 99 | AND_GREATER_GREATER = 300, /* AND_GREATER_GREATER */ |
| 100 | LESS_GREATER = 301, /* LESS_GREATER */ |
| 101 | GREATER_BAR = 302, /* GREATER_BAR */ |
| 102 | BAR_AND = 303, /* BAR_AND */ |
| 103 | yacc_EOF = 304 /* yacc_EOF */ |
| Chet Ramey | a0c0a00 | 2016-09-15 16:59:08 -0400 | [diff] [blame] | 104 | }; |
| Chet Ramey | 8868eda | 2020-12-06 15:51:17 -0500 | [diff] [blame] | 105 | typedef enum yytokentype yytoken_kind_t; |
| Jari Aalto | 3185942 | 2009-01-12 13:36:28 +0000 | [diff] [blame] | 106 | #endif |
| Chet Ramey | 8868eda | 2020-12-06 15:51:17 -0500 | [diff] [blame] | 107 | /* Token kinds. */ |
| 108 | #define YYEOF 0 |
| 109 | #define YYerror 256 |
| 110 | #define YYUNDEF 257 |
| Jari Aalto | 3185942 | 2009-01-12 13:36:28 +0000 | [diff] [blame] | 111 | #define IF 258 |
| 112 | #define THEN 259 |
| 113 | #define ELSE 260 |
| 114 | #define ELIF 261 |
| 115 | #define FI 262 |
| 116 | #define CASE 263 |
| 117 | #define ESAC 264 |
| 118 | #define FOR 265 |
| 119 | #define SELECT 266 |
| 120 | #define WHILE 267 |
| 121 | #define UNTIL 268 |
| 122 | #define DO 269 |
| 123 | #define DONE 270 |
| 124 | #define FUNCTION 271 |
| 125 | #define COPROC 272 |
| 126 | #define COND_START 273 |
| 127 | #define COND_END 274 |
| 128 | #define COND_ERROR 275 |
| 129 | #define IN 276 |
| 130 | #define BANG 277 |
| 131 | #define TIME 278 |
| 132 | #define TIMEOPT 279 |
| Chet Ramey | 495aee4 | 2011-11-22 19:11:26 -0500 | [diff] [blame] | 133 | #define TIMEIGN 280 |
| 134 | #define WORD 281 |
| 135 | #define ASSIGNMENT_WORD 282 |
| 136 | #define REDIR_WORD 283 |
| 137 | #define NUMBER 284 |
| 138 | #define ARITH_CMD 285 |
| 139 | #define ARITH_FOR_EXPRS 286 |
| 140 | #define COND_CMD 287 |
| 141 | #define AND_AND 288 |
| 142 | #define OR_OR 289 |
| 143 | #define GREATER_GREATER 290 |
| 144 | #define LESS_LESS 291 |
| 145 | #define LESS_AND 292 |
| 146 | #define LESS_LESS_LESS 293 |
| 147 | #define GREATER_AND 294 |
| 148 | #define SEMI_SEMI 295 |
| 149 | #define SEMI_AND 296 |
| 150 | #define SEMI_SEMI_AND 297 |
| 151 | #define LESS_LESS_MINUS 298 |
| 152 | #define AND_GREATER 299 |
| 153 | #define AND_GREATER_GREATER 300 |
| 154 | #define LESS_GREATER 301 |
| 155 | #define GREATER_BAR 302 |
| 156 | #define BAR_AND 303 |
| 157 | #define yacc_EOF 304 |
| Jari Aalto | 3185942 | 2009-01-12 13:36:28 +0000 | [diff] [blame] | 158 | |
| Chet Ramey | a0c0a00 | 2016-09-15 16:59:08 -0400 | [diff] [blame] | 159 | /* Value type. */ |
| Jari Aalto | 3185942 | 2009-01-12 13:36:28 +0000 | [diff] [blame] | 160 | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
| Chet Ramey | a0c0a00 | 2016-09-15 16:59:08 -0400 | [diff] [blame] | 161 | union YYSTYPE |
| Jari Aalto | 3185942 | 2009-01-12 13:36:28 +0000 | [diff] [blame] | 162 | { |
| Chet Ramey | 8868eda | 2020-12-06 15:51:17 -0500 | [diff] [blame] | 163 | #line 328 "/Users/chet/src/bash/src/parse.y" |
| Chet Ramey | a0c0a00 | 2016-09-15 16:59:08 -0400 | [diff] [blame] | 164 | |
| Jari Aalto | 3185942 | 2009-01-12 13:36:28 +0000 | [diff] [blame] | 165 | WORD_DESC *word; /* the word that we read. */ |
| 166 | int number; /* the number that we read. */ |
| 167 | WORD_LIST *word_list; |
| 168 | COMMAND *command; |
| 169 | REDIRECT *redirect; |
| 170 | ELEMENT element; |
| 171 | PATTERN_LIST *pattern; |
| Chet Ramey | a0c0a00 | 2016-09-15 16:59:08 -0400 | [diff] [blame] | 172 | |
| Chet Ramey | 8868eda | 2020-12-06 15:51:17 -0500 | [diff] [blame] | 173 | #line 174 "y.tab.h" |
| Chet Ramey | a0c0a00 | 2016-09-15 16:59:08 -0400 | [diff] [blame] | 174 | |
| Chet Ramey | 8868eda | 2020-12-06 15:51:17 -0500 | [diff] [blame] | 175 | }; |
| Chet Ramey | a0c0a00 | 2016-09-15 16:59:08 -0400 | [diff] [blame] | 176 | typedef union YYSTYPE YYSTYPE; |
| Jari Aalto | 3185942 | 2009-01-12 13:36:28 +0000 | [diff] [blame] | 177 | # define YYSTYPE_IS_TRIVIAL 1 |
| Chet Ramey | a0c0a00 | 2016-09-15 16:59:08 -0400 | [diff] [blame] | 178 | # define YYSTYPE_IS_DECLARED 1 |
| Jari Aalto | 3185942 | 2009-01-12 13:36:28 +0000 | [diff] [blame] | 179 | #endif |
| 180 | |
| Chet Ramey | a0c0a00 | 2016-09-15 16:59:08 -0400 | [diff] [blame] | 181 | |
| Jari Aalto | 3185942 | 2009-01-12 13:36:28 +0000 | [diff] [blame] | 182 | extern YYSTYPE yylval; |
| 183 | |
| Chet Ramey | a0c0a00 | 2016-09-15 16:59:08 -0400 | [diff] [blame] | 184 | int yyparse (void); |
| 185 | |
| 186 | #endif /* !YY_YY_Y_TAB_H_INCLUDED */ |