?? y.tab.c
字號:
/* A Bison parser, made by GNU Bison 2.3. *//* Skeleton implementation for Bison's Yacc-like parsers in C Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *//* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. *//* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. *//* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. *//* Identify Bison output. */#define YYBISON 1/* Bison version. */#define YYBISON_VERSION "2.3"/* Skeleton name. */#define YYSKELETON_NAME "yacc.c"/* Pure parsers. */#define YYPURE 0/* Using locations. */#define YYLSP_NEEDED 0/* Tokens. */#ifndef YYTOKENTYPE# define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { IF = 258, THEN = 259, ELSE = 260, ELIF = 261, FI = 262, CASE = 263, ESAC = 264, FOR = 265, SELECT = 266, WHILE = 267, UNTIL = 268, DO = 269, DONE = 270, FUNCTION = 271, COPROC = 272, COND_START = 273, COND_END = 274, COND_ERROR = 275, IN = 276, BANG = 277, TIME = 278, TIMEOPT = 279, TIMEIGN = 280, WORD = 281, ASSIGNMENT_WORD = 282, REDIR_WORD = 283, NUMBER = 284, ARITH_CMD = 285, ARITH_FOR_EXPRS = 286, COND_CMD = 287, AND_AND = 288, OR_OR = 289, GREATER_GREATER = 290, LESS_LESS = 291, LESS_AND = 292, LESS_LESS_LESS = 293, GREATER_AND = 294, SEMI_SEMI = 295, SEMI_AND = 296, SEMI_SEMI_AND = 297, LESS_LESS_MINUS = 298, AND_GREATER = 299, AND_GREATER_GREATER = 300, LESS_GREATER = 301, GREATER_BAR = 302, BAR_AND = 303, yacc_EOF = 304 };#endif/* Tokens. */#define IF 258#define THEN 259#define ELSE 260#define ELIF 261#define FI 262#define CASE 263#define ESAC 264#define FOR 265#define SELECT 266#define WHILE 267#define UNTIL 268#define DO 269#define DONE 270#define FUNCTION 271#define COPROC 272#define COND_START 273#define COND_END 274#define COND_ERROR 275#define IN 276#define BANG 277#define TIME 278#define TIMEOPT 279#define TIMEIGN 280#define WORD 281#define ASSIGNMENT_WORD 282#define REDIR_WORD 283#define NUMBER 284#define ARITH_CMD 285#define ARITH_FOR_EXPRS 286#define COND_CMD 287#define AND_AND 288#define OR_OR 289#define GREATER_GREATER 290#define LESS_LESS 291#define LESS_AND 292#define LESS_LESS_LESS 293#define GREATER_AND 294#define SEMI_SEMI 295#define SEMI_AND 296#define SEMI_SEMI_AND 297#define LESS_LESS_MINUS 298#define AND_GREATER 299#define AND_GREATER_GREATER 300#define LESS_GREATER 301#define GREATER_BAR 302#define BAR_AND 303#define yacc_EOF 304/* Copy the first part of user declarations. */#line 21 "/Users/chet/src/bash/src/parse.y"#include "config.h"#include "bashtypes.h"#include "bashansi.h"#include "filecntl.h"#if defined (HAVE_UNISTD_H)# include <unistd.h>#endif#if defined (HAVE_LOCALE_H)# include <locale.h>#endif#include <stdio.h>#include "chartypes.h"#include <signal.h>#include "memalloc.h"#include "bashintl.h"#define NEED_STRFTIME_DECL /* used in externs.h */#include "shell.h"#include "trap.h"#include "flags.h"#include "parser.h"#include "mailcheck.h"#include "test.h"#include "builtins.h"#include "builtins/common.h"#include "builtins/builtext.h"#include "shmbutil.h"#if defined (READLINE)# include "bashline.h"# include <readline/readline.h>#endif /* READLINE */#if defined (HISTORY)# include "bashhist.h"# include <readline/history.h>#endif /* HISTORY */#if defined (JOB_CONTROL)# include "jobs.h"#endif /* JOB_CONTROL */#if defined (ALIAS)# include "alias.h"#elsetypedef void *alias_t;#endif /* ALIAS */#if defined (PROMPT_STRING_DECODE)# ifndef _MINIX# include <sys/param.h># endif# include <time.h># if defined (TM_IN_SYS_TIME)# include <sys/types.h># include <sys/time.h># endif /* TM_IN_SYS_TIME */# include "maxpath.h"#endif /* PROMPT_STRING_DECODE */#define RE_READ_TOKEN -99#define NO_EXPANSION -100#ifdef DEBUG# define YYDEBUG 1#else# define YYDEBUG 0#endif#if defined (HANDLE_MULTIBYTE)# define last_shell_getc_is_singlebyte \ ((shell_input_line_index > 1) \ ? shell_input_line_property[shell_input_line_index - 1] \ : 1)# define MBTEST(x) ((x) && last_shell_getc_is_singlebyte)#else# define last_shell_getc_is_singlebyte 1# define MBTEST(x) ((x))#endif#if defined (EXTENDED_GLOB)extern int extended_glob;#endifextern int eof_encountered;extern int no_line_editing, running_under_emacs;extern int current_command_number;extern int sourcelevel, parse_and_execute_level;extern int posixly_correct;extern int last_command_exit_value;extern pid_t last_command_subst_pid;extern char *shell_name, *current_host_name;extern char *dist_version;extern int patch_level;extern int dump_translatable_strings, dump_po_strings;extern sh_builtin_func_t *last_shell_builtin, *this_shell_builtin;#if defined (BUFFERED_INPUT)extern int bash_input_fd_changed;#endifextern int errno;/* **************************************************************** *//* *//* "Forward" declarations *//* *//* **************************************************************** */#ifdef DEBUGstatic void debug_parser __P((int));#endifstatic int yy_getc __P((void));static int yy_ungetc __P((int));#if defined (READLINE)static int yy_readline_get __P((void));static int yy_readline_unget __P((int));#endifstatic int yy_string_get __P((void));static int yy_string_unget __P((int));static void rewind_input_string __P((void));static int yy_stream_get __P((void));static int yy_stream_unget __P((int));static int shell_getc __P((int));static void shell_ungetc __P((int));static void discard_until __P((int));#if defined (ALIAS) || defined (DPAREN_ARITHMETIC)static void push_string __P((char *, int, alias_t *));static void pop_string __P((void));static void free_string_list __P((void));#endifstatic char *read_a_line __P((int));static int reserved_word_acceptable __P((int));static int yylex __P((void));static int alias_expand_token __P((char *));static int time_command_acceptable __P((void));static int special_case_tokens __P((char *));static int read_token __P((int));static char *parse_matched_pair __P((int, int, int, int *, int));static char *parse_comsub __P((int, int, int, int *, int));#if defined (ARRAY_VARS)static char *parse_compound_assignment __P((int *));#endif#if defined (DPAREN_ARITHMETIC) || defined (ARITH_FOR_COMMAND)static int parse_dparen __P((int));static int parse_arith_cmd __P((char **, int));#endif#if defined (COND_COMMAND)static void cond_error __P((void));static COND_COM *cond_expr __P((void));static COND_COM *cond_or __P((void));static COND_COM *cond_and __P((void));static COND_COM *cond_term __P((void));static int cond_skip_newlines __P((void));static COMMAND *parse_cond_command __P((void));#endif#if defined (ARRAY_VARS)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -