Changeset 6753dda in freewrt
- Timestamp:
- Jul 27, 2006, 3:11:13 PM (19 years ago)
- Branches:
- freewrt_1_0, freewrt_2_0
- Children:
- 5dcd6404
- Parents:
- 4e0f7fd
- Location:
- package/config
- Files:
-
- 3 edited
-
lex.zconf.c_shipped (modified) (80 diffs)
-
zconf.tab.c_shipped (modified) (102 diffs)
-
zconf.tab.h_shipped (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
package/config/lex.zconf.c_shipped
r4e0f7fd r6753dda 1 2 #line 3 "lex.zconf.c" 3 4 #define YY_INT_ALIGNED short int 5 1 #define yy_create_buffer zconf_create_buffer 2 #define yy_delete_buffer zconf_delete_buffer 3 #define yy_scan_buffer zconf_scan_buffer 4 #define yy_scan_string zconf_scan_string 5 #define yy_scan_bytes zconf_scan_bytes 6 #define yy_flex_debug zconf_flex_debug 7 #define yy_init_buffer zconf_init_buffer 8 #define yy_flush_buffer zconf_flush_buffer 9 #define yy_load_buffer_state zconf_load_buffer_state 10 #define yy_switch_to_buffer zconf_switch_to_buffer 11 #define yyin zconfin 12 #define yyleng zconfleng 13 #define yylex zconflex 14 #define yyout zconfout 15 #define yyrestart zconfrestart 16 #define yytext zconftext 17 18 #line 19 "lex.zconf.c" 6 19 /* A lexical scanner generated by flex */ 20 21 /* Scanner skeleton version: 22 * $MirOS: src/usr.bin/lex/flex.skl,v 1.2 2005/10/21 10:39:48 tg Exp $ 23 * $Header: /cvs/src/usr.bin/lex/flex.skl,v 1.8 2004/02/09 11:38:31 espie Exp $ 24 */ 7 25 8 26 #define FLEX_SCANNER 9 27 #define YY_FLEX_MAJOR_VERSION 2 10 28 #define YY_FLEX_MINOR_VERSION 5 11 #define YY_FLEX_SUBMINOR_VERSION 31 12 #if YY_FLEX_SUBMINOR_VERSION > 0 13 #define FLEX_BETA 14 #endif 15 16 /* First, we deal with platform-specific or compiler-specific issues. */ 17 18 /* begin standard C headers. */ 29 19 30 #include <stdio.h> 20 #include <string.h>21 31 #include <errno.h> 32 33 34 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ 35 #ifdef c_plusplus 36 #ifndef __cplusplus 37 #define __cplusplus 38 #endif 39 #endif 40 41 42 #ifdef __cplusplus 43 22 44 #include <stdlib.h> 23 #include <glob.h> 24 25 /* end standard C headers. */ 26 27 /* flex integer type definitions */ 28 29 #ifndef FLEXINT_H 30 #define FLEXINT_H 31 32 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ 33 34 #if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L 35 #include <inttypes.h> 36 typedef int8_t flex_int8_t; 37 typedef uint8_t flex_uint8_t; 38 typedef int16_t flex_int16_t; 39 typedef uint16_t flex_uint16_t; 40 typedef int32_t flex_int32_t; 41 typedef uint32_t flex_uint32_t; 42 #else 43 typedef signed char flex_int8_t; 44 typedef short int flex_int16_t; 45 typedef int flex_int32_t; 46 typedef unsigned char flex_uint8_t; 47 typedef unsigned short int flex_uint16_t; 48 typedef unsigned int flex_uint32_t; 49 #endif /* ! C99 */ 50 51 /* Limits of integral types. */ 52 #ifndef INT8_MIN 53 #define INT8_MIN (-128) 54 #endif 55 #ifndef INT16_MIN 56 #define INT16_MIN (-32767-1) 57 #endif 58 #ifndef INT32_MIN 59 #define INT32_MIN (-2147483647-1) 60 #endif 61 #ifndef INT8_MAX 62 #define INT8_MAX (127) 63 #endif 64 #ifndef INT16_MAX 65 #define INT16_MAX (32767) 66 #endif 67 #ifndef INT32_MAX 68 #define INT32_MAX (2147483647) 69 #endif 70 #ifndef UINT8_MAX 71 #define UINT8_MAX (255U) 72 #endif 73 #ifndef UINT16_MAX 74 #define UINT16_MAX (65535U) 75 #endif 76 #ifndef UINT32_MAX 77 #define UINT32_MAX (4294967295U) 78 #endif 79 80 #endif /* ! FLEXINT_H */ 81 82 #ifdef __cplusplus 45 #include <unistd.h> 46 47 /* Use prototypes in function declarations. */ 48 #define YY_USE_PROTOS 83 49 84 50 /* The "const" storage-class-modifier is valid. */ … … 87 53 #else /* ! __cplusplus */ 88 54 89 #if __STDC__ 90 55 #ifdef __STDC__ 56 57 #define YY_USE_PROTOS 91 58 #define YY_USE_CONST 92 59 93 60 #endif /* __STDC__ */ 94 61 #endif /* ! __cplusplus */ 62 63 #ifdef __TURBOC__ 64 #pragma warn -rch 65 #pragma warn -use 66 #include <io.h> 67 #include <stdlib.h> 68 #define YY_USE_CONST 69 #define YY_USE_PROTOS 70 #endif 95 71 96 72 #ifdef YY_USE_CONST … … 98 74 #else 99 75 #define yyconst 76 #endif 77 78 79 #ifdef YY_USE_PROTOS 80 #define YY_PROTO(proto) proto 81 #else 82 #define YY_PROTO(proto) () 100 83 #endif 101 84 … … 114 97 * definition of BEGIN. 115 98 */ 116 #define BEGIN (yy_start)= 1 + 2 *99 #define BEGIN yy_start = 1 + 2 * 117 100 118 101 /* Translate the current start state into a value that can be later handed … … 120 103 * compatibility. 121 104 */ 122 #define YY_START (( (yy_start)- 1) / 2)105 #define YY_START ((yy_start - 1) / 2) 123 106 #define YYSTATE YY_START 124 107 … … 127 110 128 111 /* Special action meaning "start processing a new file". */ 129 #define YY_NEW_FILE zconfrestart(zconfin)112 #define YY_NEW_FILE yyrestart( yyin ) 130 113 131 114 #define YY_END_OF_BUFFER_CHAR 0 132 115 133 116 /* Size of default input buffer. */ 134 #ifndef YY_BUF_SIZE135 117 #define YY_BUF_SIZE 16384 136 #endif 137 138 #ifndef YY_TYPEDEF_YY_BUFFER_STATE 139 #define YY_TYPEDEF_YY_BUFFER_STATE 118 140 119 typedef struct yy_buffer_state *YY_BUFFER_STATE; 141 #endif 142 143 extern int zconfleng; 144 145 extern FILE *zconfin, *zconfout; 120 121 extern int yyleng; 122 extern FILE *yyin, *yyout; 146 123 147 124 #define EOB_ACT_CONTINUE_SCAN 0 … … 149 126 #define EOB_ACT_LAST_MATCH 2 150 127 151 #define YY_LESS_LINENO(n) 152 153 /* Return all but the first "n" matched characters back to the input stream. */ 128 /* The funky do-while in the following #define is used to turn the definition 129 * int a single C statement (which needs a semi-colon terminator). This 130 * avoids problems with code like: 131 * 132 * if ( condition_holds ) 133 * yyless( 5 ); 134 * else 135 * do_something_else(); 136 * 137 * Prior to using the do-while the compiler would get upset at the 138 * "else" because it interpreted the "if" statement as being all 139 * done when it reached the ';' after the yyless() call. 140 */ 141 142 /* Return all but the first 'n' matched characters back to the input stream. */ 143 154 144 #define yyless(n) \ 155 145 do \ 156 146 { \ 157 /* Undo effects of setting up zconftext. */ \ 158 int yyless_macro_arg = (n); \ 159 YY_LESS_LINENO(yyless_macro_arg);\ 160 *yy_cp = (yy_hold_char); \ 147 /* Undo effects of setting up yytext. */ \ 148 *yy_cp = yy_hold_char; \ 161 149 YY_RESTORE_YY_MORE_OFFSET \ 162 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg- YY_MORE_ADJ; \163 YY_DO_BEFORE_ACTION; /* set up zconftext again */ \150 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ 151 YY_DO_BEFORE_ACTION; /* set up yytext again */ \ 164 152 } \ 165 153 while ( 0 ) 166 154 167 #define unput(c) yyunput( c, (yytext_ptr))155 #define unput(c) yyunput( c, yytext_ptr ) 168 156 169 157 /* The following is because we cannot portably get our hands on size_t … … 171 159 * flex-generated scanners to compile on their own). 172 160 */ 173 174 #ifndef YY_TYPEDEF_YY_SIZE_T175 #define YY_TYPEDEF_YY_SIZE_T176 161 typedef unsigned int yy_size_t; 177 #endif 178 179 #ifndef YY_STRUCT_YY_BUFFER_STATE 180 #define YY_STRUCT_YY_BUFFER_STATE 162 163 181 164 struct yy_buffer_state 182 165 { … … 215 198 int yy_at_bol; 216 199 217 int yy_bs_lineno; /**< The line count. */218 int yy_bs_column; /**< The column count. */219 220 200 /* Whether to try to fill the input buffer when we reach the 221 201 * end of it. … … 224 204 225 205 int yy_buffer_status; 226 227 206 #define YY_BUFFER_NEW 0 228 207 #define YY_BUFFER_NORMAL 1 … … 234 213 * 235 214 * When we actually see the EOF, we change the status to "new" 236 * (via zconfrestart()), so that the user can continue scanning by237 * just pointing zconfin at a new input file.215 * (via yyrestart()), so that the user can continue scanning by 216 * just pointing yyin at a new input file. 238 217 */ 239 218 #define YY_BUFFER_EOF_PENDING 2 240 241 219 }; 242 #endif /* !YY_STRUCT_YY_BUFFER_STATE */ 243 244 /* Stack of input buffers. */ 245 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ 246 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ 247 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ 220 221 static YY_BUFFER_STATE yy_current_buffer = 0; 248 222 249 223 /* We provide macros for accessing buffer states in case in the 250 224 * future we want to put the buffer states in a more general 251 225 * "scanner state". 252 *253 * Returns the top of the stack, or NULL.254 226 */ 255 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ 256 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ 257 : NULL) 258 259 /* Same as previous macro, but useful when we know that the buffer stack is not 260 * NULL or when we need an lvalue. For internal use only. 261 */ 262 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] 263 264 /* yy_hold_char holds the character lost when zconftext is formed. */ 227 #define YY_CURRENT_BUFFER yy_current_buffer 228 229 230 /* yy_hold_char holds the character lost when yytext is formed. */ 265 231 static char yy_hold_char; 232 266 233 static int yy_n_chars; /* number of characters read into yy_ch_buf */ 267 int zconfleng; 234 235 236 int yyleng; 268 237 269 238 /* Points to current character in buffer. */ … … 272 241 static int yy_start = 0; /* start state number */ 273 242 274 /* Flag which is used to allow zconfwrap()'s to do buffer switches275 * instead of setting up a fresh zconfin. A bit of a hack ...243 /* Flag which is used to allow yywrap()'s to do buffer switches 244 * instead of setting up a fresh yyin. A bit of a hack ... 276 245 */ 277 246 static int yy_did_buffer_switch_on_eof; 278 247 279 void zconfrestart (FILE *input_file ); 280 void zconf_switch_to_buffer (YY_BUFFER_STATE new_buffer ); 281 YY_BUFFER_STATE zconf_create_buffer (FILE *file,int size ); 282 void zconf_delete_buffer (YY_BUFFER_STATE b ); 283 void zconf_flush_buffer (YY_BUFFER_STATE b ); 284 void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer ); 285 void zconfpop_buffer_state (void ); 286 287 static void zconfensure_buffer_stack (void ); 288 static void zconf_load_buffer_state (void ); 289 static void zconf_init_buffer (YY_BUFFER_STATE b,FILE *file ); 290 291 #define YY_FLUSH_BUFFER zconf_flush_buffer(YY_CURRENT_BUFFER ) 292 293 YY_BUFFER_STATE zconf_scan_buffer (char *base,yy_size_t size ); 294 YY_BUFFER_STATE zconf_scan_string (yyconst char *yy_str ); 295 YY_BUFFER_STATE zconf_scan_bytes (yyconst char *bytes,int len ); 296 297 void *zconfalloc (yy_size_t ); 298 void *zconfrealloc (void *,yy_size_t ); 299 void zconffree (void * ); 300 301 #define yy_new_buffer zconf_create_buffer 248 void yyrestart YY_PROTO(( FILE *input_file )); 249 250 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); 251 void yy_load_buffer_state YY_PROTO(( void )); 252 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); 253 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); 254 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); 255 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); 256 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) 257 258 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); 259 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); 260 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); 261 262 static void *yy_flex_alloc YY_PROTO(( yy_size_t )); 263 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); 264 static void yy_flex_free YY_PROTO(( void * )); 265 266 #define yy_new_buffer yy_create_buffer 302 267 303 268 #define yy_set_interactive(is_interactive) \ 304 269 { \ 305 if ( ! YY_CURRENT_BUFFER ){ \ 306 zconfensure_buffer_stack (); \ 307 YY_CURRENT_BUFFER_LVALUE = \ 308 zconf_create_buffer(zconfin,YY_BUF_SIZE ); \ 309 } \ 310 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ 270 if ( ! yy_current_buffer ) \ 271 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ 272 yy_current_buffer->yy_is_interactive = is_interactive; \ 311 273 } 312 274 313 275 #define yy_set_bol(at_bol) \ 314 276 { \ 315 if ( ! YY_CURRENT_BUFFER ){\ 316 zconfensure_buffer_stack (); \ 317 YY_CURRENT_BUFFER_LVALUE = \ 318 zconf_create_buffer(zconfin,YY_BUF_SIZE ); \ 319 } \ 320 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ 321 } 322 323 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) 324 325 /* Begin user sect3 */ 326 327 #define zconfwrap(n) 1 277 if ( ! yy_current_buffer ) \ 278 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ 279 yy_current_buffer->yy_at_bol = at_bol; \ 280 } 281 282 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) 283 284 285 #define yywrap() 1 328 286 #define YY_SKIP_YYWRAP 329 330 287 typedef unsigned char YY_CHAR; 331 332 FILE *zconfin = (FILE *) 0, *zconfout = (FILE *) 0; 333 288 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; 334 289 typedef int yy_state_type; 335 336 extern int zconflineno; 337 338 int zconflineno = 1; 339 340 extern char *zconftext; 341 #define yytext_ptr zconftext 342 static yyconst flex_int16_t yy_nxt[][38] = 290 extern char *yytext; 291 #define yytext_ptr yytext 292 static yyconst short yy_nxt[][38] = 343 293 { 344 294 { … … 1905 1855 } ; 1906 1856 1907 static yy_state_type yy_get_previous_state (void ); 1908 static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); 1909 static int yy_get_next_buffer (void ); 1910 static void yy_fatal_error (yyconst char msg[] ); 1857 1858 static yy_state_type yy_get_previous_state YY_PROTO(( void )); 1859 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); 1860 static int yy_get_next_buffer YY_PROTO(( void )); 1861 static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); 1911 1862 1912 1863 /* Done after the current pattern has been matched and before the 1913 * corresponding action - sets up zconftext.1864 * corresponding action - sets up yytext. 1914 1865 */ 1915 1866 #define YY_DO_BEFORE_ACTION \ 1916 (yytext_ptr)= yy_bp; \1917 zconfleng = (size_t) (yy_cp - yy_bp); \1918 (yy_hold_char)= *yy_cp; \1867 yytext_ptr = yy_bp; \ 1868 yyleng = (int) (yy_cp - yy_bp); \ 1869 yy_hold_char = *yy_cp; \ 1919 1870 *yy_cp = '\0'; \ 1920 (yy_c_buf_p)= yy_cp;1871 yy_c_buf_p = yy_cp; 1921 1872 1922 1873 #define YY_NUM_RULES 64 1923 1874 #define YY_END_OF_BUFFER 65 1924 /* This struct is not used in this scanner, 1925 but its presence is necessary. */ 1926 struct yy_trans_info 1927 { 1928 flex_int32_t yy_verify; 1929 flex_int32_t yy_nxt; 1930 }; 1931 static yyconst flex_int16_t yy_accept[211] = 1875 static yyconst short int yy_accept[211] = 1932 1876 { 0, 1933 1877 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, … … 1956 1900 } ; 1957 1901 1958 static yyconst flex_int32_t yy_ec[256] =1902 static yyconst int yy_ec[256] = 1959 1903 { 0, 1960 1904 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, … … 1988 1932 } ; 1989 1933 1990 extern int zconf_flex_debug;1991 int zconf_flex_debug = 0;1992 1993 1934 /* The intent behind this definition is that it'll catch 1994 1935 * any uses of REJECT which flex missed. … … 1998 1939 #define YY_MORE_ADJ 0 1999 1940 #define YY_RESTORE_YY_MORE_OFFSET 2000 char *zconftext; 2001 1941 char *yytext; 1942 #line 1 "zconf.l" 1943 #define INITIAL 0 1944 #define YY_NEVER_INTERACTIVE 1 1945 #define COMMAND 1 1946 #define HELP 2 1947 #define STRING 3 1948 #define PARAM 4 1949 1950 #line 5 "zconf.l" 2002 1951 /* 2003 1952 * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> … … 2010 1959 #include <string.h> 2011 1960 #include <unistd.h> 1961 #include <glob.h> 2012 1962 2013 1963 #define LKC_DIRECT_LINK … … 2061 2011 text[size] = 0; 2062 2012 } 2063 2064 #define INITIAL 0 2065 #define COMMAND 1 2066 #define HELP 2 2067 #define STRING 3 2068 #define PARAM 4 2069 2070 /* Special case for "unistd.h", since it is non-ANSI. We include it way 2071 * down here because we want the user's section 1 to have been scanned first. 2072 * The user has a chance to override it with an option. 2073 */ 2074 #include <unistd.h> 2075 2076 #ifndef YY_EXTRA_TYPE 2077 #define YY_EXTRA_TYPE void * 2078 #endif 2013 #line 2014 "lex.zconf.c" 2079 2014 2080 2015 /* Macros after this point can all be overridden by user definitions in … … 2084 2019 #ifndef YY_SKIP_YYWRAP 2085 2020 #ifdef __cplusplus 2086 extern "C" int zconfwrap (void);2021 extern "C" int yywrap YY_PROTO(( void )); 2087 2022 #else 2088 extern int zconfwrap (void ); 2089 #endif 2090 #endif 2091 2092 static void yyunput (int c,char *buf_ptr ); 2023 extern int yywrap YY_PROTO(( void )); 2024 #endif 2025 #endif 2026 2027 #ifndef YY_NO_UNPUT 2028 static void yyunput YY_PROTO(( int c, char *buf_ptr )); 2029 #endif 2093 2030 2094 2031 #ifndef yytext_ptr 2095 static void yy_flex_strncpy (char *,yyconst char *,int);2032 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); 2096 2033 #endif 2097 2034 2098 2035 #ifdef YY_NEED_STRLEN 2099 static int yy_flex_strlen (yyconst char *);2036 static int yy_flex_strlen YY_PROTO(( yyconst char * )); 2100 2037 #endif 2101 2038 2102 2039 #ifndef YY_NO_INPUT 2103 2104 2040 #ifdef __cplusplus 2105 static int yyinput (void);2041 static int yyinput YY_PROTO(( void )); 2106 2042 #else 2107 static int input (void ); 2108 #endif 2109 2043 static int input YY_PROTO(( void )); 2044 #endif 2045 #endif 2046 2047 #if YY_STACK_USED 2048 static int yy_start_stack_ptr = 0; 2049 static int yy_start_stack_depth = 0; 2050 static int *yy_start_stack = 0; 2051 #ifndef YY_NO_PUSH_STATE 2052 static void yy_push_state YY_PROTO(( int new_state )); 2053 #endif 2054 #ifndef YY_NO_POP_STATE 2055 static void yy_pop_state YY_PROTO(( void )); 2056 #endif 2057 #ifndef YY_NO_TOP_STATE 2058 static int yy_top_state YY_PROTO(( void )); 2059 #endif 2060 2061 #else 2062 #define YY_NO_PUSH_STATE 1 2063 #define YY_NO_POP_STATE 1 2064 #define YY_NO_TOP_STATE 1 2065 #endif 2066 2067 #ifdef YY_MALLOC_DECL 2068 YY_MALLOC_DECL 2069 #else 2070 #ifdef __STDC__ 2071 #ifndef __cplusplus 2072 #include <stdlib.h> 2073 #endif 2074 #else 2075 /* Just try to get by without declaring the routines. This will fail 2076 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) 2077 * or sizeof(void*) != sizeof(int). 2078 */ 2079 #endif 2110 2080 #endif 2111 2081 … … 2116 2086 2117 2087 /* Copy whatever the last rule matched to the standard output. */ 2088 2118 2089 #ifndef ECHO 2119 2090 /* This used to be an fputs(), but since the string might contain NUL's, 2120 2091 * we now use fwrite(). 2121 2092 */ 2122 #define ECHO (void) fwrite( zconftext, zconfleng, 1, zconfout )2093 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) 2123 2094 #endif 2124 2095 … … 2128 2099 #ifndef YY_INPUT 2129 2100 #define YY_INPUT(buf,result,max_size) \ 2130 errno=0; \ 2131 while ( (result = read( fileno(zconfin), (char *) buf, max_size )) < 0 ) \ 2132 { \ 2133 if( errno != EINTR) \ 2134 { \ 2135 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 2136 break; \ 2137 } \ 2138 errno=0; \ 2139 clearerr(zconfin); \ 2140 }\ 2141 \ 2142 2101 if ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \ 2102 YY_FATAL_ERROR( "input in flex scanner failed" ); 2143 2103 #endif 2144 2104 … … 2161 2121 #endif 2162 2122 2163 /* end tables serialization structures and prototypes */2164 2165 2123 /* Default declaration of generated scanner - a define so the user can 2166 2124 * easily add parameters. 2167 2125 */ 2168 2126 #ifndef YY_DECL 2169 #define YY_DECL_IS_OURS 1 2170 2171 extern int zconflex (void); 2172 2173 #define YY_DECL int zconflex (void) 2174 #endif /* !YY_DECL */ 2175 2176 /* Code executed at the beginning of each rule, after zconftext and zconfleng 2127 #define YY_DECL int yylex YY_PROTO(( void )) 2128 #endif 2129 2130 /* Code executed at the beginning of each rule, after yytext and yyleng 2177 2131 * have been set up. 2178 2132 */ … … 2189 2143 YY_USER_ACTION 2190 2144 2191 /** The main scanner function which does all the work.2192 */2193 2145 YY_DECL 2194 {2146 { 2195 2147 register yy_state_type yy_current_state; 2196 2148 register char *yy_cp, *yy_bp; 2197 2149 register int yy_act; 2198 2150 2151 #line 72 "zconf.l" 2152 2199 2153 int str = 0; 2200 2154 int ts, i; 2201 2155 2202 if ( (yy_init) ) 2156 #line 2157 "lex.zconf.c" 2157 2158 if ( yy_init ) 2203 2159 { 2204 (yy_init)= 0;2160 yy_init = 0; 2205 2161 2206 2162 #ifdef YY_USER_INIT … … 2208 2164 #endif 2209 2165 2210 if ( ! (yy_start) ) 2211 (yy_start) = 1; /* first start state */ 2212 2213 if ( ! zconfin ) 2214 zconfin = stdin; 2215 2216 if ( ! zconfout ) 2217 zconfout = stdout; 2218 2219 if ( ! YY_CURRENT_BUFFER ) { 2220 zconfensure_buffer_stack (); 2221 YY_CURRENT_BUFFER_LVALUE = 2222 zconf_create_buffer(zconfin,YY_BUF_SIZE ); 2223 } 2224 2225 zconf_load_buffer_state( ); 2166 if ( ! yy_start ) 2167 yy_start = 1; /* first start state */ 2168 2169 if ( ! yyin ) 2170 yyin = stdin; 2171 2172 if ( ! yyout ) 2173 yyout = stdout; 2174 2175 if ( ! yy_current_buffer ) 2176 yy_current_buffer = 2177 yy_create_buffer( yyin, YY_BUF_SIZE ); 2178 2179 yy_load_buffer_state(); 2226 2180 } 2227 2181 2228 2182 while ( 1 ) /* loops until end-of-file is reached */ 2229 2183 { 2230 yy_cp = (yy_c_buf_p);2231 2232 /* Support of zconftext. */2233 *yy_cp = (yy_hold_char);2184 yy_cp = yy_c_buf_p; 2185 2186 /* Support of yytext. */ 2187 *yy_cp = yy_hold_char; 2234 2188 2235 2189 /* yy_bp points to the position in yy_ch_buf of the start of … … 2238 2192 yy_bp = yy_cp; 2239 2193 2240 yy_current_state = (yy_start);2194 yy_current_state = yy_start; 2241 2195 yy_match: 2242 while ( (yy_current_state = yy_nxt[yy_current_state][ yy_ec[YY_SC_TO_UI(*yy_cp)]]) > 0 )2196 while ( (yy_current_state = yy_nxt[yy_current_state][yy_ec[YY_SC_TO_UI(*yy_cp)]]) > 0 ) 2243 2197 ++yy_cp; 2244 2198 … … 2250 2204 YY_DO_BEFORE_ACTION; 2251 2205 2206 2252 2207 do_action: /* This label is used only to access EOF actions. */ 2208 2253 2209 2254 2210 switch ( yy_act ) 2255 2211 { /* beginning of action switch */ 2256 2212 case 1: 2257 /* rule 1 can match eol */ 2258 YY_RULE_SETUP 2213 YY_RULE_SETUP 2214 #line 76 "zconf.l" 2259 2215 current_file->lineno++; 2260 2216 YY_BREAK 2261 2217 case 2: 2262 2218 YY_RULE_SETUP 2219 #line 77 "zconf.l" 2263 2220 2264 2221 YY_BREAK 2265 2222 case 3: 2266 /* rule 3 can match eol */ 2267 YY_RULE_SETUP 2223 YY_RULE_SETUP 2224 #line 79 "zconf.l" 2268 2225 current_file->lineno++; return T_EOL; 2269 2226 YY_BREAK 2270 2227 case 4: 2271 2228 YY_RULE_SETUP 2229 #line 81 "zconf.l" 2272 2230 { 2273 2231 BEGIN(COMMAND); … … 2276 2234 case 5: 2277 2235 YY_RULE_SETUP 2236 #line 85 "zconf.l" 2278 2237 { 2279 unput( zconftext[0]);2238 unput(yytext[0]); 2280 2239 BEGIN(COMMAND); 2281 2240 } … … 2284 2243 case 6: 2285 2244 YY_RULE_SETUP 2245 #line 92 "zconf.l" 2286 2246 BEGIN(PARAM); return T_MAINMENU; 2287 2247 YY_BREAK 2288 2248 case 7: 2289 2249 YY_RULE_SETUP 2250 #line 93 "zconf.l" 2290 2251 BEGIN(PARAM); return T_MENU; 2291 2252 YY_BREAK 2292 2253 case 8: 2293 2254 YY_RULE_SETUP 2255 #line 94 "zconf.l" 2294 2256 BEGIN(PARAM); return T_ENDMENU; 2295 2257 YY_BREAK 2296 2258 case 9: 2297 2259 YY_RULE_SETUP 2260 #line 95 "zconf.l" 2298 2261 BEGIN(PARAM); return T_SOURCE; 2299 2262 YY_BREAK 2300 2263 case 10: 2301 2264 YY_RULE_SETUP 2265 #line 96 "zconf.l" 2302 2266 BEGIN(PARAM); return T_CHOICE; 2303 2267 YY_BREAK 2304 2268 case 11: 2305 2269 YY_RULE_SETUP 2270 #line 97 "zconf.l" 2306 2271 BEGIN(PARAM); return T_ENDCHOICE; 2307 2272 YY_BREAK 2308 2273 case 12: 2309 2274 YY_RULE_SETUP 2275 #line 98 "zconf.l" 2310 2276 BEGIN(PARAM); return T_COMMENT; 2311 2277 YY_BREAK 2312 2278 case 13: 2313 2279 YY_RULE_SETUP 2280 #line 99 "zconf.l" 2314 2281 BEGIN(PARAM); return T_CONFIG; 2315 2282 YY_BREAK 2316 2283 case 14: 2317 2284 YY_RULE_SETUP 2285 #line 100 "zconf.l" 2318 2286 BEGIN(PARAM); return T_MENUCONFIG; 2319 2287 YY_BREAK 2320 2288 case 15: 2321 2289 YY_RULE_SETUP 2290 #line 101 "zconf.l" 2322 2291 BEGIN(PARAM); return T_HELP; 2323 2292 YY_BREAK 2324 2293 case 16: 2325 2294 YY_RULE_SETUP 2295 #line 102 "zconf.l" 2326 2296 BEGIN(PARAM); return T_IF; 2327 2297 YY_BREAK 2328 2298 case 17: 2329 2299 YY_RULE_SETUP 2300 #line 103 "zconf.l" 2330 2301 BEGIN(PARAM); return T_ENDIF; 2331 2302 YY_BREAK 2332 2303 case 18: 2333 2304 YY_RULE_SETUP 2305 #line 104 "zconf.l" 2334 2306 BEGIN(PARAM); return T_DEPENDS; 2335 2307 YY_BREAK 2336 2308 case 19: 2337 2309 YY_RULE_SETUP 2310 #line 105 "zconf.l" 2338 2311 BEGIN(PARAM); return T_REQUIRES; 2339 2312 YY_BREAK 2340 2313 case 20: 2341 2314 YY_RULE_SETUP 2315 #line 106 "zconf.l" 2342 2316 BEGIN(PARAM); return T_OPTIONAL; 2343 2317 YY_BREAK 2344 2318 case 21: 2345 2319 YY_RULE_SETUP 2320 #line 107 "zconf.l" 2346 2321 BEGIN(PARAM); return T_DEFAULT; 2347 2322 YY_BREAK 2348 2323 case 22: 2349 2324 YY_RULE_SETUP 2325 #line 108 "zconf.l" 2350 2326 BEGIN(PARAM); return T_PROMPT; 2351 2327 YY_BREAK 2352 2328 case 23: 2353 2329 YY_RULE_SETUP 2330 #line 109 "zconf.l" 2354 2331 BEGIN(PARAM); return T_TRISTATE; 2355 2332 YY_BREAK 2356 2333 case 24: 2357 2334 YY_RULE_SETUP 2335 #line 110 "zconf.l" 2358 2336 BEGIN(PARAM); return T_DEF_TRISTATE; 2359 2337 YY_BREAK 2360 2338 case 25: 2361 2339 YY_RULE_SETUP 2340 #line 111 "zconf.l" 2362 2341 BEGIN(PARAM); return T_BOOLEAN; 2363 2342 YY_BREAK 2364 2343 case 26: 2365 2344 YY_RULE_SETUP 2345 #line 112 "zconf.l" 2366 2346 BEGIN(PARAM); return T_BOOLEAN; 2367 2347 YY_BREAK 2368 2348 case 27: 2369 2349 YY_RULE_SETUP 2350 #line 113 "zconf.l" 2370 2351 BEGIN(PARAM); return T_DEF_BOOLEAN; 2371 2352 YY_BREAK 2372 2353 case 28: 2373 2354 YY_RULE_SETUP 2355 #line 114 "zconf.l" 2374 2356 BEGIN(PARAM); return T_DEF_BOOLEAN; 2375 2357 YY_BREAK 2376 2358 case 29: 2377 2359 YY_RULE_SETUP 2360 #line 115 "zconf.l" 2378 2361 BEGIN(PARAM); return T_INT; 2379 2362 YY_BREAK 2380 2363 case 30: 2381 2364 YY_RULE_SETUP 2365 #line 116 "zconf.l" 2382 2366 BEGIN(PARAM); return T_HEX; 2383 2367 YY_BREAK 2384 2368 case 31: 2385 2369 YY_RULE_SETUP 2370 #line 117 "zconf.l" 2386 2371 BEGIN(PARAM); return T_STRING; 2387 2372 YY_BREAK 2388 2373 case 32: 2389 2374 YY_RULE_SETUP 2375 #line 118 "zconf.l" 2390 2376 BEGIN(PARAM); return T_SELECT; 2391 2377 YY_BREAK 2392 2378 case 33: 2393 2379 YY_RULE_SETUP 2380 #line 119 "zconf.l" 2394 2381 BEGIN(PARAM); return T_SELECT; 2395 2382 YY_BREAK 2396 2383 case 34: 2397 2384 YY_RULE_SETUP 2385 #line 120 "zconf.l" 2398 2386 BEGIN(PARAM); return T_RANGE; 2399 2387 YY_BREAK 2400 2388 case 35: 2401 2389 YY_RULE_SETUP 2390 #line 121 "zconf.l" 2402 2391 { 2403 alloc_string( zconftext, zconfleng);2392 alloc_string(yytext, yyleng); 2404 2393 zconflval.string = text; 2405 2394 return T_WORD; … … 2408 2397 case 36: 2409 2398 YY_RULE_SETUP 2399 #line 126 "zconf.l" 2410 2400 2411 2401 YY_BREAK 2412 2402 case 37: 2413 /* rule 37 can match eol */ 2414 YY_RULE_SETUP 2403 YY_RULE_SETUP 2404 #line 127 "zconf.l" 2415 2405 current_file->lineno++; BEGIN(INITIAL); 2416 2406 YY_BREAK 2417 2407 2408 2418 2409 case 38: 2419 2410 YY_RULE_SETUP 2411 #line 131 "zconf.l" 2420 2412 return T_AND; 2421 2413 YY_BREAK 2422 2414 case 39: 2423 2415 YY_RULE_SETUP 2416 #line 132 "zconf.l" 2424 2417 return T_OR; 2425 2418 YY_BREAK 2426 2419 case 40: 2427 2420 YY_RULE_SETUP 2421 #line 133 "zconf.l" 2428 2422 return T_OPEN_PAREN; 2429 2423 YY_BREAK 2430 2424 case 41: 2431 2425 YY_RULE_SETUP 2426 #line 134 "zconf.l" 2432 2427 return T_CLOSE_PAREN; 2433 2428 YY_BREAK 2434 2429 case 42: 2435 2430 YY_RULE_SETUP 2431 #line 135 "zconf.l" 2436 2432 return T_NOT; 2437 2433 YY_BREAK 2438 2434 case 43: 2439 2435 YY_RULE_SETUP 2436 #line 136 "zconf.l" 2440 2437 return T_EQUAL; 2441 2438 YY_BREAK 2442 2439 case 44: 2443 2440 YY_RULE_SETUP 2441 #line 137 "zconf.l" 2444 2442 return T_UNEQUAL; 2445 2443 YY_BREAK 2446 2444 case 45: 2447 2445 YY_RULE_SETUP 2446 #line 138 "zconf.l" 2448 2447 return T_IF; 2449 2448 YY_BREAK 2450 2449 case 46: 2451 2450 YY_RULE_SETUP 2451 #line 139 "zconf.l" 2452 2452 return T_ON; 2453 2453 YY_BREAK 2454 2454 case 47: 2455 2455 YY_RULE_SETUP 2456 #line 140 "zconf.l" 2456 2457 { 2457 str = zconftext[0];2458 str = yytext[0]; 2458 2459 new_string(); 2459 2460 BEGIN(STRING); … … 2461 2462 YY_BREAK 2462 2463 case 48: 2463 /* rule 48 can match eol */ 2464 YY_RULE_SETUP 2464 YY_RULE_SETUP 2465 #line 145 "zconf.l" 2465 2466 BEGIN(INITIAL); current_file->lineno++; return T_EOL; 2466 2467 YY_BREAK 2467 2468 case 49: 2468 2469 YY_RULE_SETUP 2470 #line 146 "zconf.l" 2469 2471 /* ignore */ 2470 2472 YY_BREAK 2471 2473 case 50: 2472 2474 YY_RULE_SETUP 2475 #line 147 "zconf.l" 2473 2476 { 2474 alloc_string( zconftext, zconfleng);2477 alloc_string(yytext, yyleng); 2475 2478 zconflval.string = text; 2476 2479 return T_WORD; … … 2479 2482 case 51: 2480 2483 YY_RULE_SETUP 2484 #line 152 "zconf.l" 2481 2485 /* comment */ 2482 2486 YY_BREAK 2483 2487 case 52: 2484 /* rule 52 can match eol */ 2485 YY_RULE_SETUP 2488 YY_RULE_SETUP 2489 #line 153 "zconf.l" 2486 2490 current_file->lineno++; 2487 2491 YY_BREAK 2488 2492 case 53: 2489 2493 YY_RULE_SETUP 2494 #line 154 "zconf.l" 2490 2495 2491 2496 YY_BREAK 2492 2497 case YY_STATE_EOF(PARAM): 2498 #line 155 "zconf.l" 2493 2499 { 2494 2500 BEGIN(INITIAL); … … 2496 2502 YY_BREAK 2497 2503 2504 2498 2505 case 54: 2499 /* rule 54 can match eol*/2500 *yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */ 2501 (yy_c_buf_p) = yy_cp -= 1; 2502 YY_ DO_BEFORE_ACTION; /* set up zconftext again */2503 YY_RULE_SETUP 2506 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ 2507 yy_c_buf_p = yy_cp -= 1; 2508 YY_DO_BEFORE_ACTION; /* set up yytext again */ 2509 YY_RULE_SETUP 2510 #line 161 "zconf.l" 2504 2511 { 2505 append_string( zconftext, zconfleng);2512 append_string(yytext, yyleng); 2506 2513 zconflval.string = text; 2507 2514 return T_WORD_QUOTE; … … 2510 2517 case 55: 2511 2518 YY_RULE_SETUP 2519 #line 166 "zconf.l" 2512 2520 { 2513 append_string( zconftext, zconfleng);2521 append_string(yytext, yyleng); 2514 2522 } 2515 2523 YY_BREAK 2516 2524 case 56: 2517 /* rule 56 can match eol*/2518 *yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */ 2519 (yy_c_buf_p) = yy_cp -= 1; 2520 YY_ DO_BEFORE_ACTION; /* set up zconftext again */2521 YY_RULE_SETUP 2525 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ 2526 yy_c_buf_p = yy_cp -= 1; 2527 YY_DO_BEFORE_ACTION; /* set up yytext again */ 2528 YY_RULE_SETUP 2529 #line 169 "zconf.l" 2522 2530 { 2523 append_string( zconftext + 1, zconfleng - 1);2531 append_string(yytext + 1, yyleng - 1); 2524 2532 zconflval.string = text; 2525 2533 return T_WORD_QUOTE; … … 2528 2536 case 57: 2529 2537 YY_RULE_SETUP 2538 #line 174 "zconf.l" 2530 2539 { 2531 append_string( zconftext + 1, zconfleng - 1);2540 append_string(yytext + 1, yyleng - 1); 2532 2541 } 2533 2542 YY_BREAK 2534 2543 case 58: 2535 2544 YY_RULE_SETUP 2545 #line 177 "zconf.l" 2536 2546 { 2537 if (str == zconftext[0]) {2547 if (str == yytext[0]) { 2538 2548 BEGIN(PARAM); 2539 2549 zconflval.string = text; 2540 2550 return T_WORD_QUOTE; 2541 2551 } else 2542 append_string( zconftext, 1);2552 append_string(yytext, 1); 2543 2553 } 2544 2554 YY_BREAK 2545 2555 case 59: 2546 /* rule 59 can match eol */ 2547 YY_RULE_SETUP 2556 YY_RULE_SETUP 2557 #line 185 "zconf.l" 2548 2558 { 2549 2559 printf("%s:%d:warning: multi-line strings not supported\n", zconf_curname(), zconf_lineno()); … … 2554 2564 YY_BREAK 2555 2565 case YY_STATE_EOF(STRING): 2566 #line 191 "zconf.l" 2556 2567 { 2557 2568 BEGIN(INITIAL); … … 2559 2570 YY_BREAK 2560 2571 2572 2561 2573 case 60: 2562 2574 YY_RULE_SETUP 2575 #line 197 "zconf.l" 2563 2576 { 2564 2577 ts = 0; 2565 for (i = 0; i < zconfleng; i++) {2566 if ( zconftext[i] == '\t')2578 for (i = 0; i < yyleng; i++) { 2579 if (yytext[i] == '\t') 2567 2580 ts = (ts & ~7) + 8; 2568 2581 else … … 2585 2598 YY_BREAK 2586 2599 case 61: 2587 /* rule 61 can match eol*/2588 *yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */ 2589 (yy_c_buf_p) = yy_cp -= 1; 2590 YY_ DO_BEFORE_ACTION; /* set up zconftext again */2591 YY_RULE_SETUP 2600 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ 2601 yy_c_buf_p = yy_cp -= 1; 2602 YY_DO_BEFORE_ACTION; /* set up yytext again */ 2603 YY_RULE_SETUP 2604 #line 219 "zconf.l" 2592 2605 { 2593 2606 current_file->lineno++; … … 2597 2610 YY_BREAK 2598 2611 case 62: 2599 /* rule 62 can match eol */ 2600 YY_RULE_SETUP 2612 YY_RULE_SETUP 2613 #line 224 "zconf.l" 2601 2614 { 2602 2615 current_file->lineno++; … … 2606 2619 case 63: 2607 2620 YY_RULE_SETUP 2621 #line 228 "zconf.l" 2608 2622 { 2609 append_string( zconftext, zconfleng);2623 append_string(yytext, yyleng); 2610 2624 if (!first_ts) 2611 2625 first_ts = last_ts; … … 2613 2627 YY_BREAK 2614 2628 case YY_STATE_EOF(HELP): 2629 #line 233 "zconf.l" 2615 2630 { 2616 2631 zconf_endhelp(); … … 2621 2636 case YY_STATE_EOF(INITIAL): 2622 2637 case YY_STATE_EOF(COMMAND): 2638 #line 239 "zconf.l" 2623 2639 { 2624 2640 if (current_buf) { … … 2626 2642 return T_EOF; 2627 2643 } 2628 fclose( zconfin);2644 fclose(yyin); 2629 2645 yyterminate(); 2630 2646 } … … 2632 2648 case 64: 2633 2649 YY_RULE_SETUP 2650 #line 248 "zconf.l" 2634 2651 YY_FATAL_ERROR( "flex scanner jammed" ); 2635 2652 YY_BREAK 2653 #line 2654 "lex.zconf.c" 2636 2654 2637 2655 case YY_END_OF_BUFFER: 2638 2656 { 2639 2657 /* Amount of text matched not including the EOB char. */ 2640 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;2658 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; 2641 2659 2642 2660 /* Undo the effects of YY_DO_BEFORE_ACTION. */ 2643 *yy_cp = (yy_hold_char);2661 *yy_cp = yy_hold_char; 2644 2662 YY_RESTORE_YY_MORE_OFFSET 2645 2663 2646 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )2664 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) 2647 2665 { 2648 2666 /* We're scanning a new file or input source. It's 2649 2667 * possible that this happened because the user 2650 * just pointed zconfin at a new source and called2651 * zconflex(). If so, then we have to assure2652 * consistency between YY_CURRENT_BUFFERand our2668 * just pointed yyin at a new source and called 2669 * yylex(). If so, then we have to assure 2670 * consistency between yy_current_buffer and our 2653 2671 * globals. Here is the right place to do so, because 2654 2672 * this is the first action (other than possibly a 2655 2673 * back-up) that will match for the new input source. 2656 2674 */ 2657 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;2658 YY_CURRENT_BUFFER_LVALUE->yy_input_file = zconfin;2659 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;2675 yy_n_chars = yy_current_buffer->yy_n_chars; 2676 yy_current_buffer->yy_input_file = yyin; 2677 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; 2660 2678 } 2661 2679 … … 2667 2685 * in input(). 2668 2686 */ 2669 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )2687 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) 2670 2688 { /* This was really a NUL. */ 2671 2689 yy_state_type yy_next_state; 2672 2690 2673 (yy_c_buf_p) = (yytext_ptr)+ yy_amount_of_matched_text;2674 2675 yy_current_state = yy_get_previous_state( );2691 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; 2692 2693 yy_current_state = yy_get_previous_state(); 2676 2694 2677 2695 /* Okay, we're now positioned to make the NUL … … 2686 2704 yy_next_state = yy_try_NUL_trans( yy_current_state ); 2687 2705 2688 yy_bp = (yytext_ptr)+ YY_MORE_ADJ;2706 yy_bp = yytext_ptr + YY_MORE_ADJ; 2689 2707 2690 2708 if ( yy_next_state ) 2691 2709 { 2692 2710 /* Consume the NUL. */ 2693 yy_cp = ++ (yy_c_buf_p);2711 yy_cp = ++yy_c_buf_p; 2694 2712 yy_current_state = yy_next_state; 2695 2713 goto yy_match; … … 2698 2716 else 2699 2717 { 2700 yy_cp = (yy_c_buf_p);2718 yy_cp = yy_c_buf_p; 2701 2719 goto yy_find_action; 2702 2720 } 2703 2721 } 2704 2722 2705 else switch ( yy_get_next_buffer( ) )2723 else switch ( yy_get_next_buffer() ) 2706 2724 { 2707 2725 case EOB_ACT_END_OF_FILE: 2708 2726 { 2709 (yy_did_buffer_switch_on_eof)= 0;2710 2711 if ( zconfwrap() )2727 yy_did_buffer_switch_on_eof = 0; 2728 2729 if ( yywrap() ) 2712 2730 { 2713 2731 /* Note: because we've taken care in 2714 2732 * yy_get_next_buffer() to have set up 2715 * zconftext, we can now set up2733 * yytext, we can now set up 2716 2734 * yy_c_buf_p so that if some total 2717 2735 * hoser (like flex itself) wants to … … 2720 2738 * YY_NULL will get returned. 2721 2739 */ 2722 (yy_c_buf_p) = (yytext_ptr)+ YY_MORE_ADJ;2740 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; 2723 2741 2724 2742 yy_act = YY_STATE_EOF(YY_START); … … 2728 2746 else 2729 2747 { 2730 if ( ! (yy_did_buffer_switch_on_eof))2748 if ( ! yy_did_buffer_switch_on_eof ) 2731 2749 YY_NEW_FILE; 2732 2750 } … … 2735 2753 2736 2754 case EOB_ACT_CONTINUE_SCAN: 2737 (yy_c_buf_p)=2738 (yytext_ptr)+ yy_amount_of_matched_text;2739 2740 yy_current_state = yy_get_previous_state( );2741 2742 yy_cp = (yy_c_buf_p);2743 yy_bp = (yytext_ptr)+ YY_MORE_ADJ;2755 yy_c_buf_p = 2756 yytext_ptr + yy_amount_of_matched_text; 2757 2758 yy_current_state = yy_get_previous_state(); 2759 2760 yy_cp = yy_c_buf_p; 2761 yy_bp = yytext_ptr + YY_MORE_ADJ; 2744 2762 goto yy_match; 2745 2763 2746 2764 case EOB_ACT_LAST_MATCH: 2747 (yy_c_buf_p)=2748 & YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];2749 2750 yy_current_state = yy_get_previous_state( );2751 2752 yy_cp = (yy_c_buf_p);2753 yy_bp = (yytext_ptr)+ YY_MORE_ADJ;2765 yy_c_buf_p = 2766 &yy_current_buffer->yy_ch_buf[yy_n_chars]; 2767 2768 yy_current_state = yy_get_previous_state(); 2769 2770 yy_cp = yy_c_buf_p; 2771 yy_bp = yytext_ptr + YY_MORE_ADJ; 2754 2772 goto yy_find_action; 2755 2773 } … … 2762 2780 } /* end of action switch */ 2763 2781 } /* end of scanning one token */ 2764 } /* end of zconflex */ 2782 } /* end of yylex */ 2783 2765 2784 2766 2785 /* yy_get_next_buffer - try to read in a new buffer … … 2771 2790 * EOB_ACT_END_OF_FILE - end of file 2772 2791 */ 2773 static int yy_get_next_buffer (void) 2774 { 2775 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; 2776 register char *source = (yytext_ptr); 2792 2793 static int yy_get_next_buffer() 2794 { 2795 register char *dest = yy_current_buffer->yy_ch_buf; 2796 register char *source = yytext_ptr; 2777 2797 register int number_to_move, i; 2778 2798 int ret_val; 2779 2799 2780 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)+ 1] )2800 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) 2781 2801 YY_FATAL_ERROR( 2782 2802 "fatal flex scanner internal error--end of buffer missed" ); 2783 2803 2784 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )2804 if ( yy_current_buffer->yy_fill_buffer == 0 ) 2785 2805 { /* Don't try to fill the buffer, so this is an EOF. */ 2786 if ( (yy_c_buf_p) - (yytext_ptr)- YY_MORE_ADJ == 1 )2806 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) 2787 2807 { 2788 2808 /* We matched a single character, the EOB, so … … 2804 2824 2805 2825 /* First move last chars to start of buffer. */ 2806 number_to_move = (int) ( (yy_c_buf_p) - (yytext_ptr)) - 1;2826 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; 2807 2827 2808 2828 for ( i = 0; i < number_to_move; ++i ) 2809 2829 *(dest++) = *(source++); 2810 2830 2811 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )2831 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) 2812 2832 /* don't do the read, it's not guaranteed to return an EOF, 2813 2833 * just force an EOF 2814 2834 */ 2815 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars)= 0;2835 yy_current_buffer->yy_n_chars = yy_n_chars = 0; 2816 2836 2817 2837 else 2818 2838 { 2819 size_t num_to_read =2820 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;2839 int num_to_read = 2840 yy_current_buffer->yy_buf_size - number_to_move - 1; 2821 2841 2822 2842 while ( num_to_read <= 0 ) 2823 2843 { /* Not enough room in the buffer - grow it. */ 2844 #ifdef YY_USES_REJECT 2845 YY_FATAL_ERROR( 2846 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); 2847 #else 2824 2848 2825 2849 /* just a shorter name for the current buffer */ 2826 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;2850 YY_BUFFER_STATE b = yy_current_buffer; 2827 2851 2828 2852 int yy_c_buf_p_offset = 2829 (int) ( (yy_c_buf_p)- b->yy_ch_buf);2853 (int) (yy_c_buf_p - b->yy_ch_buf); 2830 2854 2831 2855 if ( b->yy_is_our_buffer ) … … 2840 2864 b->yy_ch_buf = (char *) 2841 2865 /* Include room in for 2 EOB chars. */ 2842 zconfrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); 2866 yy_flex_realloc( (void *) b->yy_ch_buf, 2867 b->yy_buf_size + 2 ); 2843 2868 } 2844 2869 else … … 2850 2875 "fatal error - scanner input buffer overflow" ); 2851 2876 2852 (yy_c_buf_p)= &b->yy_ch_buf[yy_c_buf_p_offset];2853 2854 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -2877 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; 2878 2879 num_to_read = yy_current_buffer->yy_buf_size - 2855 2880 number_to_move - 1; 2856 2881 #endif 2857 2882 } 2858 2883 … … 2861 2886 2862 2887 /* Read in more data. */ 2863 YY_INPUT( (& YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),2864 (yy_n_chars), num_to_read );2865 2866 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);2888 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), 2889 yy_n_chars, num_to_read ); 2890 2891 yy_current_buffer->yy_n_chars = yy_n_chars; 2867 2892 } 2868 2893 2869 if ( (yy_n_chars)== 0 )2894 if ( yy_n_chars == 0 ) 2870 2895 { 2871 2896 if ( number_to_move == YY_MORE_ADJ ) 2872 2897 { 2873 2898 ret_val = EOB_ACT_END_OF_FILE; 2874 zconfrestart(zconfin);2899 yyrestart( yyin ); 2875 2900 } 2876 2901 … … 2878 2903 { 2879 2904 ret_val = EOB_ACT_LAST_MATCH; 2880 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =2905 yy_current_buffer->yy_buffer_status = 2881 2906 YY_BUFFER_EOF_PENDING; 2882 2907 } … … 2886 2911 ret_val = EOB_ACT_CONTINUE_SCAN; 2887 2912 2888 (yy_n_chars)+= number_to_move;2889 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;2890 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)+ 1] = YY_END_OF_BUFFER_CHAR;2891 2892 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];2913 yy_n_chars += number_to_move; 2914 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; 2915 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; 2916 2917 yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; 2893 2918 2894 2919 return ret_val; 2895 } 2920 } 2921 2896 2922 2897 2923 /* yy_get_previous_state - get the state just before the EOB char was reached */ 2898 2924 2899 static yy_state_type yy_get_previous_state (void)2900 {2925 static yy_state_type yy_get_previous_state() 2926 { 2901 2927 register yy_state_type yy_current_state; 2902 2928 register char *yy_cp; 2903 2929 2904 yy_current_state = (yy_start);2905 2906 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )2930 yy_current_state = yy_start; 2931 2932 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) 2907 2933 { 2908 2934 yy_current_state = yy_nxt[yy_current_state][(*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1)]; … … 2910 2936 2911 2937 return yy_current_state; 2912 } 2938 } 2939 2913 2940 2914 2941 /* yy_try_NUL_trans - try to make a transition on the NUL character … … 2917 2944 * next_state = yy_try_NUL_trans( current_state ); 2918 2945 */ 2919 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) 2920 { 2946 2947 #ifdef YY_USE_PROTOS 2948 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) 2949 #else 2950 static yy_state_type yy_try_NUL_trans( yy_current_state ) 2951 yy_state_type yy_current_state; 2952 #endif 2953 { 2921 2954 register int yy_is_jam; 2922 2955 … … 2925 2958 2926 2959 return yy_is_jam ? 0 : yy_current_state; 2927 } 2928 2929 static void yyunput (int c, register char * yy_bp ) 2930 { 2931 register char *yy_cp; 2932 2933 yy_cp = (yy_c_buf_p); 2934 2935 /* undo effects of setting up zconftext */ 2936 *yy_cp = (yy_hold_char); 2937 2938 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) 2960 } 2961 2962 2963 #ifndef YY_NO_UNPUT 2964 #ifdef YY_USE_PROTOS 2965 static void yyunput( int c, register char *yy_bp ) 2966 #else 2967 static void yyunput( c, yy_bp ) 2968 int c; 2969 register char *yy_bp; 2970 #endif 2971 { 2972 register char *yy_cp = yy_c_buf_p; 2973 2974 /* undo effects of setting up yytext */ 2975 *yy_cp = yy_hold_char; 2976 2977 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) 2939 2978 { /* need to shift things up to make room */ 2940 2979 /* +2 for EOB chars. */ 2941 register int number_to_move = (yy_n_chars)+ 2;2942 register char *dest = & YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[2943 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];2980 register int number_to_move = yy_n_chars + 2; 2981 register char *dest = &yy_current_buffer->yy_ch_buf[ 2982 yy_current_buffer->yy_buf_size + 2]; 2944 2983 register char *source = 2945 & YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];2946 2947 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )2984 &yy_current_buffer->yy_ch_buf[number_to_move]; 2985 2986 while ( source > yy_current_buffer->yy_ch_buf ) 2948 2987 *--dest = *--source; 2949 2988 2950 2989 yy_cp += (int) (dest - source); 2951 2990 yy_bp += (int) (dest - source); 2952 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =2953 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;2954 2955 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )2991 yy_current_buffer->yy_n_chars = 2992 yy_n_chars = yy_current_buffer->yy_buf_size; 2993 2994 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) 2956 2995 YY_FATAL_ERROR( "flex scanner push-back overflow" ); 2957 2996 } … … 2959 2998 *--yy_cp = (char) c; 2960 2999 2961 (yytext_ptr) = yy_bp; 2962 (yy_hold_char) = *yy_cp; 2963 (yy_c_buf_p) = yy_cp; 2964 } 2965 2966 #ifndef YY_NO_INPUT 3000 3001 yytext_ptr = yy_bp; 3002 yy_hold_char = *yy_cp; 3003 yy_c_buf_p = yy_cp; 3004 } 3005 #endif /* ifndef YY_NO_UNPUT */ 3006 3007 2967 3008 #ifdef __cplusplus 2968 static int yyinput (void)3009 static int yyinput() 2969 3010 #else 2970 static int input (void) 2971 #endif 2972 2973 { 3011 static int input() 3012 #endif 3013 { 2974 3014 int c; 2975 3015 2976 * (yy_c_buf_p) = (yy_hold_char);2977 2978 if ( * (yy_c_buf_p)== YY_END_OF_BUFFER_CHAR )3016 *yy_c_buf_p = yy_hold_char; 3017 3018 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) 2979 3019 { 2980 3020 /* yy_c_buf_p now points to the character we want to return. … … 2982 3022 * valid NUL; if not, then we've hit the end of the buffer. 2983 3023 */ 2984 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )3024 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) 2985 3025 /* This was really a NUL. */ 2986 * (yy_c_buf_p)= '\0';3026 *yy_c_buf_p = '\0'; 2987 3027 2988 3028 else 2989 3029 { /* need more input */ 2990 int offset = (yy_c_buf_p) - (yytext_ptr);2991 ++ (yy_c_buf_p);2992 2993 switch ( yy_get_next_buffer( ) )3030 int offset = yy_c_buf_p - yytext_ptr; 3031 ++yy_c_buf_p; 3032 3033 switch ( yy_get_next_buffer() ) 2994 3034 { 2995 3035 case EOB_ACT_LAST_MATCH: … … 3005 3045 3006 3046 /* Reset buffer status. */ 3007 zconfrestart(zconfin );3008 3009 /* FALLTHROUGH*/3047 yyrestart( yyin ); 3048 3049 /* fall through */ 3010 3050 3011 3051 case EOB_ACT_END_OF_FILE: 3012 3052 { 3013 if ( zconfwrap() )3053 if ( yywrap() ) 3014 3054 return EOF; 3015 3055 3016 if ( ! (yy_did_buffer_switch_on_eof))3056 if ( ! yy_did_buffer_switch_on_eof ) 3017 3057 YY_NEW_FILE; 3018 3058 #ifdef __cplusplus … … 3024 3064 3025 3065 case EOB_ACT_CONTINUE_SCAN: 3026 (yy_c_buf_p) = (yytext_ptr)+ offset;3066 yy_c_buf_p = yytext_ptr + offset; 3027 3067 break; 3028 3068 } … … 3030 3070 } 3031 3071 3032 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ 3033 *(yy_c_buf_p) = '\0'; /* preserve zconftext */ 3034 (yy_hold_char) = *++(yy_c_buf_p); 3072 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ 3073 *yy_c_buf_p = '\0'; /* preserve yytext */ 3074 yy_hold_char = *++yy_c_buf_p; 3075 3035 3076 3036 3077 return c; 3037 } 3038 #endif /* ifndef YY_NO_INPUT */ 3039 3040 /** Immediately switch to a different input stream. 3041 * @param input_file A readable stream. 3042 * 3043 * @note This function does not reset the start condition to @c INITIAL . 3044 */ 3045 void zconfrestart (FILE * input_file ) 3046 { 3047 3048 if ( ! YY_CURRENT_BUFFER ){ 3049 zconfensure_buffer_stack (); 3050 YY_CURRENT_BUFFER_LVALUE = 3051 zconf_create_buffer(zconfin,YY_BUF_SIZE ); 3052 } 3053 3054 zconf_init_buffer(YY_CURRENT_BUFFER,input_file ); 3055 zconf_load_buffer_state( ); 3056 } 3057 3058 /** Switch to a different input buffer. 3059 * @param new_buffer The new input buffer. 3060 * 3061 */ 3062 void zconf_switch_to_buffer (YY_BUFFER_STATE new_buffer ) 3063 { 3064 3065 /* TODO. We should be able to replace this entire function body 3066 * with 3067 * zconfpop_buffer_state(); 3068 * zconfpush_buffer_state(new_buffer); 3069 */ 3070 zconfensure_buffer_stack (); 3071 if ( YY_CURRENT_BUFFER == new_buffer ) 3078 } 3079 3080 3081 #ifdef YY_USE_PROTOS 3082 void yyrestart( FILE *input_file ) 3083 #else 3084 void yyrestart( input_file ) 3085 FILE *input_file; 3086 #endif 3087 { 3088 if ( ! yy_current_buffer ) 3089 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); 3090 3091 yy_init_buffer( yy_current_buffer, input_file ); 3092 yy_load_buffer_state(); 3093 } 3094 3095 3096 #ifdef YY_USE_PROTOS 3097 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) 3098 #else 3099 void yy_switch_to_buffer( new_buffer ) 3100 YY_BUFFER_STATE new_buffer; 3101 #endif 3102 { 3103 if ( yy_current_buffer == new_buffer ) 3072 3104 return; 3073 3105 3074 if ( YY_CURRENT_BUFFER)3106 if ( yy_current_buffer ) 3075 3107 { 3076 3108 /* Flush out information for old buffer. */ 3077 * (yy_c_buf_p) = (yy_hold_char);3078 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);3079 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);3109 *yy_c_buf_p = yy_hold_char; 3110 yy_current_buffer->yy_buf_pos = yy_c_buf_p; 3111 yy_current_buffer->yy_n_chars = yy_n_chars; 3080 3112 } 3081 3113 3082 YY_CURRENT_BUFFER_LVALUE= new_buffer;3083 zconf_load_buffer_state();3114 yy_current_buffer = new_buffer; 3115 yy_load_buffer_state(); 3084 3116 3085 3117 /* We don't actually know whether we did this switch during 3086 * EOF ( zconfwrap()) processing, but the only time this flag3087 * is looked at is after zconfwrap() is called, so it's safe3118 * EOF (yywrap()) processing, but the only time this flag 3119 * is looked at is after yywrap() is called, so it's safe 3088 3120 * to go ahead and always set it. 3089 3121 */ 3090 (yy_did_buffer_switch_on_eof) = 1; 3091 } 3092 3093 static void zconf_load_buffer_state (void) 3094 { 3095 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 3096 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; 3097 zconfin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; 3098 (yy_hold_char) = *(yy_c_buf_p); 3099 } 3100 3101 /** Allocate and initialize an input buffer state. 3102 * @param file A readable stream. 3103 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. 3104 * 3105 * @return the allocated buffer state. 3106 */ 3107 YY_BUFFER_STATE zconf_create_buffer (FILE * file, int size ) 3108 { 3122 yy_did_buffer_switch_on_eof = 1; 3123 } 3124 3125 3126 #ifdef YY_USE_PROTOS 3127 void yy_load_buffer_state( void ) 3128 #else 3129 void yy_load_buffer_state() 3130 #endif 3131 { 3132 yy_n_chars = yy_current_buffer->yy_n_chars; 3133 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; 3134 yyin = yy_current_buffer->yy_input_file; 3135 yy_hold_char = *yy_c_buf_p; 3136 } 3137 3138 3139 #ifdef YY_USE_PROTOS 3140 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) 3141 #else 3142 YY_BUFFER_STATE yy_create_buffer( file, size ) 3143 FILE *file; 3144 int size; 3145 #endif 3146 { 3109 3147 YY_BUFFER_STATE b; 3110 3148 3111 b = (YY_BUFFER_STATE) zconfalloc(sizeof( struct yy_buffer_state ));3149 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); 3112 3150 if ( ! b ) 3113 YY_FATAL_ERROR( "out of dynamic memory in zconf_create_buffer()" );3151 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 3114 3152 3115 3153 b->yy_buf_size = size; … … 3118 3156 * we need to put in 2 end-of-buffer characters. 3119 3157 */ 3120 b->yy_ch_buf = (char *) zconfalloc(b->yy_buf_size + 2);3158 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); 3121 3159 if ( ! b->yy_ch_buf ) 3122 YY_FATAL_ERROR( "out of dynamic memory in zconf_create_buffer()" );3160 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 3123 3161 3124 3162 b->yy_is_our_buffer = 1; 3125 3163 3126 zconf_init_buffer(b,file );3164 yy_init_buffer( b, file ); 3127 3165 3128 3166 return b; 3129 } 3130 3131 /** Destroy the buffer. 3132 * @param b a buffer created with zconf_create_buffer() 3133 * 3134 */ 3135 void zconf_delete_buffer (YY_BUFFER_STATE b ) 3136 { 3137 3167 } 3168 3169 3170 #ifdef YY_USE_PROTOS 3171 void yy_delete_buffer( YY_BUFFER_STATE b ) 3172 #else 3173 void yy_delete_buffer( b ) 3174 YY_BUFFER_STATE b; 3175 #endif 3176 { 3138 3177 if ( ! b ) 3139 3178 return; 3140 3179 3141 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */3142 YY_CURRENT_BUFFER_LVALUE= (YY_BUFFER_STATE) 0;3180 if ( b == yy_current_buffer ) 3181 yy_current_buffer = (YY_BUFFER_STATE) 0; 3143 3182 3144 3183 if ( b->yy_is_our_buffer ) 3145 zconffree((void *) b->yy_ch_buf ); 3146 3147 zconffree((void *) b ); 3148 } 3149 3150 /* Initializes or reinitializes a buffer. 3151 * This function is sometimes called more than once on the same buffer, 3152 * such as during a zconfrestart() or at EOF. 3153 */ 3154 static void zconf_init_buffer (YY_BUFFER_STATE b, FILE * file ) 3155 3156 { 3184 yy_flex_free( (void *) b->yy_ch_buf ); 3185 3186 yy_flex_free( (void *) b ); 3187 } 3188 3189 3190 #ifndef YY_ALWAYS_INTERACTIVE 3191 #ifndef YY_NEVER_INTERACTIVE 3192 #include <unistd.h> 3193 #endif 3194 #endif 3195 3196 #ifdef YY_USE_PROTOS 3197 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) 3198 #else 3199 void yy_init_buffer( b, file ) 3200 YY_BUFFER_STATE b; 3201 FILE *file; 3202 #endif 3203 3204 3205 { 3157 3206 int oerrno = errno; 3158 3207 3159 zconf_flush_buffer(b );3208 yy_flush_buffer( b ); 3160 3209 3161 3210 b->yy_input_file = file; 3162 3211 b->yy_fill_buffer = 1; 3163 3212 3164 /* If b is the current buffer, then zconf_init_buffer was _probably_ 3165 * called from zconfrestart() or through yy_get_next_buffer. 3166 * In that case, we don't want to reset the lineno or column. 3167 */ 3168 if (b != YY_CURRENT_BUFFER){ 3169 b->yy_bs_lineno = 1; 3170 b->yy_bs_column = 0; 3171 } 3172 3173 b->yy_is_interactive = 0; 3174 3213 #if YY_ALWAYS_INTERACTIVE 3214 b->yy_is_interactive = 1; 3215 #else 3216 #if YY_NEVER_INTERACTIVE 3217 b->yy_is_interactive = 0; 3218 #else 3219 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; 3220 #endif 3221 #endif 3175 3222 errno = oerrno; 3176 } 3177 3178 /** Discard all buffered characters. On the next scan, YY_INPUT will be called. 3179 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. 3180 * 3181 */ 3182 void zconf_flush_buffer (YY_BUFFER_STATE b ) 3183 { 3184 if ( ! b ) 3223 } 3224 3225 3226 #ifdef YY_USE_PROTOS 3227 void yy_flush_buffer( YY_BUFFER_STATE b ) 3228 #else 3229 void yy_flush_buffer( b ) 3230 YY_BUFFER_STATE b; 3231 #endif 3232 3233 { 3234 if ( ! b ) 3185 3235 return; 3186 3236 … … 3199 3249 b->yy_buffer_status = YY_BUFFER_NEW; 3200 3250 3201 if ( b == YY_CURRENT_BUFFER ) 3202 zconf_load_buffer_state( ); 3203 } 3204 3205 /** Pushes the new state onto the stack. The new state becomes 3206 * the current state. This function will allocate the stack 3207 * if necessary. 3208 * @param new_buffer The new state. 3209 * 3210 */ 3211 void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer ) 3212 { 3213 if (new_buffer == NULL) 3214 return; 3215 3216 zconfensure_buffer_stack(); 3217 3218 /* This block is copied from zconf_switch_to_buffer. */ 3219 if ( YY_CURRENT_BUFFER ) 3220 { 3221 /* Flush out information for old buffer. */ 3222 *(yy_c_buf_p) = (yy_hold_char); 3223 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); 3224 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 3225 } 3226 3227 /* Only push if top exists. Otherwise, replace top. */ 3228 if (YY_CURRENT_BUFFER) 3229 (yy_buffer_stack_top)++; 3230 YY_CURRENT_BUFFER_LVALUE = new_buffer; 3231 3232 /* copied from zconf_switch_to_buffer. */ 3233 zconf_load_buffer_state( ); 3234 (yy_did_buffer_switch_on_eof) = 1; 3235 } 3236 3237 /** Removes and deletes the top of the stack, if present. 3238 * The next element becomes the new top. 3239 * 3240 */ 3241 void zconfpop_buffer_state (void) 3242 { 3243 if (!YY_CURRENT_BUFFER) 3244 return; 3245 3246 zconf_delete_buffer(YY_CURRENT_BUFFER ); 3247 YY_CURRENT_BUFFER_LVALUE = NULL; 3248 if ((yy_buffer_stack_top) > 0) 3249 --(yy_buffer_stack_top); 3250 3251 if (YY_CURRENT_BUFFER) { 3252 zconf_load_buffer_state( ); 3253 (yy_did_buffer_switch_on_eof) = 1; 3254 } 3255 } 3256 3257 /* Allocates the stack if it does not exist. 3258 * Guarantees space for at least one push. 3259 */ 3260 static void zconfensure_buffer_stack (void) 3261 { 3262 int num_to_alloc; 3263 3264 if (!(yy_buffer_stack)) { 3265 3266 /* First allocation is just for 2 elements, since we don't know if this 3267 * scanner will even need a stack. We use 2 instead of 1 to avoid an 3268 * immediate realloc on the next call. 3269 */ 3270 num_to_alloc = 1; 3271 (yy_buffer_stack) = (struct yy_buffer_state**)zconfalloc 3272 (num_to_alloc * sizeof(struct yy_buffer_state*) 3273 ); 3274 3275 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); 3276 3277 (yy_buffer_stack_max) = num_to_alloc; 3278 (yy_buffer_stack_top) = 0; 3279 return; 3280 } 3281 3282 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ 3283 3284 /* Increase the buffer to prepare for a possible push. */ 3285 int grow_size = 8 /* arbitrary grow size */; 3286 3287 num_to_alloc = (yy_buffer_stack_max) + grow_size; 3288 (yy_buffer_stack) = (struct yy_buffer_state**)zconfrealloc 3289 ((yy_buffer_stack), 3290 num_to_alloc * sizeof(struct yy_buffer_state*) 3291 ); 3292 3293 /* zero only the new slots.*/ 3294 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); 3295 (yy_buffer_stack_max) = num_to_alloc; 3296 } 3297 } 3298 3299 /** Setup the input buffer state to scan directly from a user-specified character buffer. 3300 * @param base the character buffer 3301 * @param size the size in bytes of the character buffer 3302 * 3303 * @return the newly allocated buffer state object. 3304 */ 3305 YY_BUFFER_STATE zconf_scan_buffer (char * base, yy_size_t size ) 3306 { 3251 if ( b == yy_current_buffer ) 3252 yy_load_buffer_state(); 3253 } 3254 3255 3256 #ifndef YY_NO_SCAN_BUFFER 3257 #ifdef YY_USE_PROTOS 3258 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) 3259 #else 3260 YY_BUFFER_STATE yy_scan_buffer( base, size ) 3261 char *base; 3262 yy_size_t size; 3263 #endif 3264 { 3307 3265 YY_BUFFER_STATE b; 3308 3266 … … 3313 3271 return 0; 3314 3272 3315 b = (YY_BUFFER_STATE) zconfalloc(sizeof( struct yy_buffer_state ));3273 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); 3316 3274 if ( ! b ) 3317 YY_FATAL_ERROR( "out of dynamic memory in zconf_scan_buffer()" );3275 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); 3318 3276 3319 3277 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ … … 3327 3285 b->yy_buffer_status = YY_BUFFER_NEW; 3328 3286 3329 zconf_switch_to_buffer(b);3287 yy_switch_to_buffer( b ); 3330 3288 3331 3289 return b; 3332 } 3333 3334 /** Setup the input buffer state to scan a string. The next call to zconflex() will 3335 * scan from a @e copy of @a str. 3336 * @param str a NUL-terminated string to scan 3337 * 3338 * @return the newly allocated buffer state object. 3339 * @note If you want to scan bytes that may contain NUL values, then use 3340 * zconf_scan_bytes() instead. 3341 */ 3342 YY_BUFFER_STATE zconf_scan_string (yyconst char * str ) 3343 { 3344 3345 return zconf_scan_bytes(str,strlen(str) ); 3346 } 3347 3348 /** Setup the input buffer state to scan the given bytes. The next call to zconflex() will 3349 * scan from a @e copy of @a bytes. 3350 * @param bytes the byte buffer to scan 3351 * @param len the number of bytes in the buffer pointed to by @a bytes. 3352 * 3353 * @return the newly allocated buffer state object. 3354 */ 3355 YY_BUFFER_STATE zconf_scan_bytes (yyconst char * bytes, int len ) 3356 { 3290 } 3291 #endif 3292 3293 3294 #ifndef YY_NO_SCAN_STRING 3295 #ifdef YY_USE_PROTOS 3296 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) 3297 #else 3298 YY_BUFFER_STATE yy_scan_string( yy_str ) 3299 yyconst char *yy_str; 3300 #endif 3301 { 3302 int len; 3303 for ( len = 0; yy_str[len]; ++len ) 3304 ; 3305 3306 return yy_scan_bytes( yy_str, len ); 3307 } 3308 #endif 3309 3310 3311 #ifndef YY_NO_SCAN_BYTES 3312 #ifdef YY_USE_PROTOS 3313 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) 3314 #else 3315 YY_BUFFER_STATE yy_scan_bytes( bytes, len ) 3316 yyconst char *bytes; 3317 int len; 3318 #endif 3319 { 3357 3320 YY_BUFFER_STATE b; 3358 3321 char *buf; … … 3362 3325 /* Get memory for full buffer, including space for trailing EOB's. */ 3363 3326 n = len + 2; 3364 buf = (char *) zconfalloc(n);3327 buf = (char *) yy_flex_alloc( n ); 3365 3328 if ( ! buf ) 3366 YY_FATAL_ERROR( "out of dynamic memory in zconf_scan_bytes()" );3329 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); 3367 3330 3368 3331 for ( i = 0; i < len; ++i ) … … 3371 3334 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; 3372 3335 3373 b = zconf_scan_buffer(buf,n );3336 b = yy_scan_buffer( buf, n ); 3374 3337 if ( ! b ) 3375 YY_FATAL_ERROR( "bad buffer in zconf_scan_bytes()" );3338 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); 3376 3339 3377 3340 /* It's okay to grow etc. this buffer, and we should throw it … … 3381 3344 3382 3345 return b; 3383 } 3346 } 3347 #endif 3348 3349 3350 #ifndef YY_NO_PUSH_STATE 3351 #ifdef YY_USE_PROTOS 3352 static void yy_push_state( int new_state ) 3353 #else 3354 static void yy_push_state( new_state ) 3355 int new_state; 3356 #endif 3357 { 3358 if ( yy_start_stack_ptr >= yy_start_stack_depth ) 3359 { 3360 yy_size_t new_size; 3361 3362 yy_start_stack_depth += YY_START_STACK_INCR; 3363 new_size = yy_start_stack_depth * sizeof( int ); 3364 3365 if ( ! yy_start_stack ) 3366 yy_start_stack = (int *) yy_flex_alloc( new_size ); 3367 3368 else 3369 yy_start_stack = (int *) yy_flex_realloc( 3370 (void *) yy_start_stack, new_size ); 3371 3372 if ( ! yy_start_stack ) 3373 YY_FATAL_ERROR( 3374 "out of memory expanding start-condition stack" ); 3375 } 3376 3377 yy_start_stack[yy_start_stack_ptr++] = YY_START; 3378 3379 BEGIN(new_state); 3380 } 3381 #endif 3382 3383 3384 #ifndef YY_NO_POP_STATE 3385 static void yy_pop_state() 3386 { 3387 if ( --yy_start_stack_ptr < 0 ) 3388 YY_FATAL_ERROR( "start-condition stack underflow" ); 3389 3390 BEGIN(yy_start_stack[yy_start_stack_ptr]); 3391 } 3392 #endif 3393 3394 3395 #ifndef YY_NO_TOP_STATE 3396 static int yy_top_state() 3397 { 3398 return yy_start_stack[yy_start_stack_ptr - 1]; 3399 } 3400 #endif 3384 3401 3385 3402 #ifndef YY_EXIT_FAILURE … … 3387 3404 #endif 3388 3405 3389 static void yy_fatal_error (yyconst char* msg ) 3390 { 3391 (void) fprintf( stderr, "%s\n", msg ); 3406 #ifdef YY_USE_PROTOS 3407 static void yy_fatal_error( yyconst char msg[] ) 3408 #else 3409 static void yy_fatal_error( msg ) 3410 char msg[]; 3411 #endif 3412 { 3413 (void) fprintf( stderr, "%s\n", msg ); 3392 3414 exit( YY_EXIT_FAILURE ); 3393 } 3415 } 3416 3417 3394 3418 3395 3419 /* Redefine yyless() so it works in section 3 code. */ … … 3399 3423 do \ 3400 3424 { \ 3401 /* Undo effects of setting up zconftext. */ \ 3402 int yyless_macro_arg = (n); \ 3403 YY_LESS_LINENO(yyless_macro_arg);\ 3404 zconftext[zconfleng] = (yy_hold_char); \ 3405 (yy_c_buf_p) = zconftext + yyless_macro_arg; \ 3406 (yy_hold_char) = *(yy_c_buf_p); \ 3407 *(yy_c_buf_p) = '\0'; \ 3408 zconfleng = yyless_macro_arg; \ 3425 /* Undo effects of setting up yytext. */ \ 3426 yytext[yyleng] = yy_hold_char; \ 3427 yy_c_buf_p = yytext + n; \ 3428 yy_hold_char = *yy_c_buf_p; \ 3429 *yy_c_buf_p = '\0'; \ 3430 yyleng = n; \ 3409 3431 } \ 3410 3432 while ( 0 ) 3411 3433 3412 /* Accessor methods (get/set functions) to struct members. */ 3413 3414 /** Get the current line number. 3415 * 3416 */ 3417 int zconfget_lineno (void) 3418 { 3419 3420 return zconflineno; 3421 } 3422 3423 /** Get the input stream. 3424 * 3425 */ 3426 FILE *zconfget_in (void) 3427 { 3428 return zconfin; 3429 } 3430 3431 /** Get the output stream. 3432 * 3433 */ 3434 FILE *zconfget_out (void) 3435 { 3436 return zconfout; 3437 } 3438 3439 /** Get the length of the current token. 3440 * 3441 */ 3442 int zconfget_leng (void) 3443 { 3444 return zconfleng; 3445 } 3446 3447 /** Get the current token. 3448 * 3449 */ 3450 3451 char *zconfget_text (void) 3452 { 3453 return zconftext; 3454 } 3455 3456 /** Set the current line number. 3457 * @param line_number 3458 * 3459 */ 3460 void zconfset_lineno (int line_number ) 3461 { 3462 3463 zconflineno = line_number; 3464 } 3465 3466 /** Set the input stream. This does not discard the current 3467 * input buffer. 3468 * @param in_str A readable stream. 3469 * 3470 * @see zconf_switch_to_buffer 3471 */ 3472 void zconfset_in (FILE * in_str ) 3473 { 3474 zconfin = in_str ; 3475 } 3476 3477 void zconfset_out (FILE * out_str ) 3478 { 3479 zconfout = out_str ; 3480 } 3481 3482 int zconfget_debug (void) 3483 { 3484 return zconf_flex_debug; 3485 } 3486 3487 void zconfset_debug (int bdebug ) 3488 { 3489 zconf_flex_debug = bdebug ; 3490 } 3491 3492 /* zconflex_destroy is for both reentrant and non-reentrant scanners. */ 3493 int zconflex_destroy (void) 3494 { 3495 3496 /* Pop the buffer stack, destroying each element. */ 3497 while(YY_CURRENT_BUFFER){ 3498 zconf_delete_buffer(YY_CURRENT_BUFFER ); 3499 YY_CURRENT_BUFFER_LVALUE = NULL; 3500 zconfpop_buffer_state(); 3501 } 3502 3503 /* Destroy the stack itself. */ 3504 zconffree((yy_buffer_stack) ); 3505 (yy_buffer_stack) = NULL; 3506 3507 return 0; 3508 } 3509 3510 /* 3511 * Internal utility routines. 3512 */ 3434 3435 /* Internal utility routines. */ 3513 3436 3514 3437 #ifndef yytext_ptr 3515 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) 3516 { 3438 #ifdef YY_USE_PROTOS 3439 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) 3440 #else 3441 static void yy_flex_strncpy( s1, s2, n ) 3442 char *s1; 3443 yyconst char *s2; 3444 int n; 3445 #endif 3446 { 3517 3447 register int i; 3518 for ( i = 0; i < n; ++i )3448 for ( i = 0; i < n; ++i ) 3519 3449 s1[i] = s2[i]; 3520 }3450 } 3521 3451 #endif 3522 3452 3523 3453 #ifdef YY_NEED_STRLEN 3524 static int yy_flex_strlen (yyconst char * s ) 3525 { 3454 #ifdef YY_USE_PROTOS 3455 static int yy_flex_strlen( yyconst char *s ) 3456 #else 3457 static int yy_flex_strlen( s ) 3458 yyconst char *s; 3459 #endif 3460 { 3526 3461 register int n; 3527 for ( n = 0; s[n]; ++n )3462 for ( n = 0; s[n]; ++n ) 3528 3463 ; 3529 3464 3530 3465 return n; 3531 } 3532 #endif 3533 3534 void *zconfalloc (yy_size_t size ) 3535 { 3466 } 3467 #endif 3468 3469 3470 #ifdef YY_USE_PROTOS 3471 static void *yy_flex_alloc( yy_size_t size ) 3472 #else 3473 static void *yy_flex_alloc( size ) 3474 yy_size_t size; 3475 #endif 3476 { 3536 3477 return (void *) malloc( size ); 3537 } 3538 3539 void *zconfrealloc (void * ptr, yy_size_t size ) 3540 { 3478 } 3479 3480 #ifdef YY_USE_PROTOS 3481 static void *yy_flex_realloc( void *ptr, yy_size_t size ) 3482 #else 3483 static void *yy_flex_realloc( ptr, size ) 3484 void *ptr; 3485 yy_size_t size; 3486 #endif 3487 { 3541 3488 /* The cast to (char *) in the following accommodates both 3542 3489 * implementations that use char* generic pointers, and those … … 3547 3494 */ 3548 3495 return (void *) realloc( (char *) ptr, size ); 3549 } 3550 3551 void zconffree (void * ptr ) 3552 { 3553 free( (char *) ptr ); /* see zconfrealloc() for (char *) cast */ 3554 } 3555 3556 #define YYTABLES_NAME "yytables" 3557 3558 #undef YY_NEW_FILE 3559 #undef YY_FLUSH_BUFFER 3560 #undef yy_set_bol 3561 #undef yy_new_buffer 3562 #undef yy_set_interactive 3563 #undef yytext_ptr 3564 #undef YY_DO_BEFORE_ACTION 3565 3566 #ifdef YY_DECL_IS_OURS 3567 #undef YY_DECL_IS_OURS 3568 #undef YY_DECL 3569 #endif 3496 } 3497 3498 #ifdef YY_USE_PROTOS 3499 static void yy_flex_free( void *ptr ) 3500 #else 3501 static void yy_flex_free( ptr ) 3502 void *ptr; 3503 #endif 3504 { 3505 free( ptr ); 3506 } 3507 3508 #if YY_MAIN 3509 int main() 3510 { 3511 yylex(); 3512 return 0; 3513 } 3514 #endif 3515 #line 248 "zconf.l" 3570 3516 3571 3517 void zconf_starthelp(void) … … 3581 3527 BEGIN(INITIAL); 3582 3528 } 3529 3583 3530 3584 3531 /* … … 3608 3555 void zconf_initscan(const char *name) 3609 3556 { 3610 zconfin = zconf_fopen(name);3611 if (! zconfin) {3557 yyin = zconf_fopen(name); 3558 if (!yyin) { 3612 3559 printf("can't find file %s\n", name); 3613 3560 exit(1); … … 3644 3591 3645 3592 file = file_lookup(filename); 3646 buf = malloc(sizeof(*buf));3593 buf = malloc(sizeof(*buf)); 3647 3594 memset(buf, 0, sizeof(*buf)); 3648 3595 current_buf->state = YY_CURRENT_BUFFER; … … 3682 3629 parent = current_buf->parent; 3683 3630 if (parent) { 3684 fclose( zconfin);3685 zconf_delete_buffer(YY_CURRENT_BUFFER);3686 zconf_switch_to_buffer(parent->state);3631 fclose(yyin); 3632 yy_delete_buffer(YY_CURRENT_BUFFER); 3633 yy_switch_to_buffer(parent->state); 3687 3634 } 3688 3635 free(current_buf); … … 3707 3654 return "<none>"; 3708 3655 } 3709 -
package/config/zconf.tab.c_shipped
r4e0f7fd r6753dda 1 /* A Bison parser, made by GNU Bison 1.875a. */ 2 3 /* Skeleton parser for Yacc-like parsing with Bison, 4 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. 1 /* A Bison parser, made by GNU Bison 2.3. */ 2 3 /* Skeleton implementation for Bison's Yacc-like parsers in C 4 5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 6 Free Software Foundation, Inc. 5 7 6 8 This program is free software; you can redistribute it and/or modify … … 16 18 You should have received a copy of the GNU General Public License 17 19 along with this program; if not, write to the Free Software 18 Foundation, Inc., 59 Temple Place - Suite 330, 19 Boston, MA 02111-1307, USA. */ 20 21 /* As a special exception, when this file is copied by Bison into a 22 Bison output file, you may use that output file without restriction. 23 This special exception was added by the Free Software Foundation 24 in version 1.24 of Bison. */ 25 26 /* Written by Richard Stallman by simplifying the original so called 27 ``semantic'' parser. */ 20 Foundation, Inc., 51 Franklin Street, Fifth Floor, 21 Boston, MA 02110-1301, USA. */ 22 23 /* As a special exception, you may create a larger work that contains 24 part or all of the Bison parser skeleton and distribute that work 25 under terms of your choice, so long as that work isn't itself a 26 parser generator using the skeleton or a modified version thereof 27 as a parser skeleton. Alternatively, if you modify or redistribute 28 the parser skeleton itself, you may (at your option) remove this 29 special exception, which will cause the skeleton and the resulting 30 Bison output files to be licensed under the GNU General Public 31 License without this special exception. 32 33 This special exception was added by the Free Software Foundation in 34 version 2.2 of Bison. */ 35 36 /* C LALR(1) parser skeleton written by Richard Stallman, by 37 simplifying the original so-called "semantic" parser. */ 28 38 29 39 /* All symbols defined below should begin with yy or YY, to avoid … … 37 47 #define YYBISON 1 38 48 49 /* Bison version. */ 50 #define YYBISON_VERSION "2.3" 51 39 52 /* Skeleton name. */ 40 53 #define YYSKELETON_NAME "yacc.c" … … 46 59 #define YYLSP_NEEDED 0 47 60 48 /* If NAME_PREFIX is specified substitute the variables and functions 49 names. */ 61 /* Substitute the variable and function names. */ 50 62 #define yyparse zconfparse 51 63 #define yylex zconflex … … 104 116 }; 105 117 #endif 118 /* Tokens. */ 106 119 #define T_MAINMENU 258 107 120 #define T_MENU 259 … … 148 161 149 162 /* Copy the first part of user declarations. */ 150 163 #line 1 "zconf.y" 151 164 152 165 /* … … 181 194 /* Enabling traces. */ 182 195 #ifndef YYDEBUG 183 # define YYDEBUG 0196 # define YYDEBUG 1 184 197 #endif 185 198 … … 192 205 #endif 193 206 194 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) 195 196 typedef union YYSTYPE { 207 /* Enabling the token table. */ 208 #ifndef YYTOKEN_TABLE 209 # define YYTOKEN_TABLE 0 210 #endif 211 212 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 213 typedef union YYSTYPE 214 #line 33 "zconf.y" 215 { 197 216 int token; 198 217 char *string; … … 200 219 struct expr *expr; 201 220 struct menu *menu; 202 } YYSTYPE; 203 /* Line 191 of yacc.c. */ 204 221 } 222 /* Line 193 of yacc.c. */ 223 #line 224 "zconf.tab.c" 224 YYSTYPE; 205 225 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 206 226 # define YYSTYPE_IS_DECLARED 1 … … 211 231 212 232 /* Copy the second part of user declarations. */ 213 233 #line 89 "zconf.y" 214 234 215 235 #define LKC_DIRECT_LINK … … 217 237 218 238 219 /* Line 214 of yacc.c. */ 220 221 222 #if ! defined (yyoverflow) || YYERROR_VERBOSE 239 /* Line 216 of yacc.c. */ 240 #line 241 "zconf.tab.c" 241 242 #ifdef short 243 # undef short 244 #endif 245 246 #ifdef YYTYPE_UINT8 247 typedef YYTYPE_UINT8 yytype_uint8; 248 #else 249 typedef unsigned char yytype_uint8; 250 #endif 251 252 #ifdef YYTYPE_INT8 253 typedef YYTYPE_INT8 yytype_int8; 254 #elif (defined __STDC__ || defined __C99__FUNC__ \ 255 || defined __cplusplus || defined _MSC_VER) 256 typedef signed char yytype_int8; 257 #else 258 typedef short int yytype_int8; 259 #endif 260 261 #ifdef YYTYPE_UINT16 262 typedef YYTYPE_UINT16 yytype_uint16; 263 #else 264 typedef unsigned short int yytype_uint16; 265 #endif 266 267 #ifdef YYTYPE_INT16 268 typedef YYTYPE_INT16 yytype_int16; 269 #else 270 typedef short int yytype_int16; 271 #endif 272 273 #ifndef YYSIZE_T 274 # ifdef __SIZE_TYPE__ 275 # define YYSIZE_T __SIZE_TYPE__ 276 # elif defined size_t 277 # define YYSIZE_T size_t 278 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ 279 || defined __cplusplus || defined _MSC_VER) 280 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 281 # define YYSIZE_T size_t 282 # else 283 # define YYSIZE_T unsigned int 284 # endif 285 #endif 286 287 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 288 289 #ifndef YY_ 290 # if YYENABLE_NLS 291 # if ENABLE_NLS 292 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 293 # define YY_(msgid) dgettext ("bison-runtime", msgid) 294 # endif 295 # endif 296 # ifndef YY_ 297 # define YY_(msgid) msgid 298 # endif 299 #endif 300 301 /* Suppress unused-variable warnings by "using" E. */ 302 #if ! defined lint || defined __GNUC__ 303 # define YYUSE(e) ((void) (e)) 304 #else 305 # define YYUSE(e) /* empty */ 306 #endif 307 308 /* Identity function, used to suppress warnings about constant conditions. */ 309 #ifndef lint 310 # define YYID(n) (n) 311 #else 312 #if (defined __STDC__ || defined __C99__FUNC__ \ 313 || defined __cplusplus || defined _MSC_VER) 314 static int 315 YYID (int i) 316 #else 317 static int 318 YYID (i) 319 int i; 320 #endif 321 { 322 return i; 323 } 324 #endif 325 326 #if ! defined yyoverflow || YYERROR_VERBOSE 223 327 224 328 /* The parser invokes alloca or malloc; define the necessary symbols. */ 225 329 226 # if YYSTACK_USE_ALLOCA 227 # define YYSTACK_ALLOC alloca 228 # else 229 # ifndef YYSTACK_USE_ALLOCA 230 # if defined (alloca) || defined (_ALLOCA_H) 330 # ifdef YYSTACK_USE_ALLOCA 331 # if YYSTACK_USE_ALLOCA 332 # ifdef __GNUC__ 333 # define YYSTACK_ALLOC __builtin_alloca 334 # elif defined __BUILTIN_VA_ARG_INCR 335 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 336 # elif defined _AIX 337 # define YYSTACK_ALLOC __alloca 338 # elif defined _MSC_VER 339 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ 340 # define alloca _alloca 341 # else 231 342 # define YYSTACK_ALLOC alloca 232 # else 233 # ifdef __GNUC__ 234 # define YYSTACK_ALLOC __builtin_alloca 343 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 344 || defined __cplusplus || defined _MSC_VER) 345 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 346 # ifndef _STDLIB_H 347 # define _STDLIB_H 1 348 # endif 235 349 # endif 236 350 # endif … … 239 353 240 354 # ifdef YYSTACK_ALLOC 241 /* Pacify GCC's `empty if-body' warning. */ 242 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) 355 /* Pacify GCC's `empty if-body' warning. */ 356 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) 357 # ifndef YYSTACK_ALLOC_MAXIMUM 358 /* The OS might guarantee only one guard page at the bottom of the stack, 359 and a page size can be as small as 4096 bytes. So we cannot safely 360 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 361 to allow for a few compiler-allocated temporary stack slots. */ 362 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 363 # endif 243 364 # else 244 # if defined (__STDC__) || defined (__cplusplus) 365 # define YYSTACK_ALLOC YYMALLOC 366 # define YYSTACK_FREE YYFREE 367 # ifndef YYSTACK_ALLOC_MAXIMUM 368 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 369 # endif 370 # if (defined __cplusplus && ! defined _STDLIB_H \ 371 && ! ((defined YYMALLOC || defined malloc) \ 372 && (defined YYFREE || defined free))) 245 373 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 246 # define YYSIZE_T size_t 374 # ifndef _STDLIB_H 375 # define _STDLIB_H 1 376 # endif 247 377 # endif 248 # define YYSTACK_ALLOC malloc 249 # define YYSTACK_FREE free 378 # ifndef YYMALLOC 379 # define YYMALLOC malloc 380 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 381 || defined __cplusplus || defined _MSC_VER) 382 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 383 # endif 384 # endif 385 # ifndef YYFREE 386 # define YYFREE free 387 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 388 || defined __cplusplus || defined _MSC_VER) 389 void free (void *); /* INFRINGES ON USER NAME SPACE */ 390 # endif 391 # endif 250 392 # endif 251 #endif /* ! defined (yyoverflow)|| YYERROR_VERBOSE */252 253 254 #if (! defined (yyoverflow)\255 && (! defined (__cplusplus)\256 || ( YYSTYPE_IS_TRIVIAL)))393 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ 394 395 396 #if (! defined yyoverflow \ 397 && (! defined __cplusplus \ 398 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 257 399 258 400 /* A type that is properly aligned for any stack member. */ 259 401 union yyalloc 260 402 { 261 shortyyss;403 yytype_int16 yyss; 262 404 YYSTYPE yyvs; 263 405 }; … … 269 411 N elements. */ 270 412 # define YYSTACK_BYTES(N) \ 271 ((N) * (sizeof ( short) + sizeof (YYSTYPE))\413 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 272 414 + YYSTACK_GAP_MAXIMUM) 273 415 … … 275 417 not overlap. */ 276 418 # ifndef YYCOPY 277 # if 1 < __GNUC__419 # if defined __GNUC__ && 1 < __GNUC__ 278 420 # define YYCOPY(To, From, Count) \ 279 421 __builtin_memcpy (To, From, (Count) * sizeof (*(From))) … … 282 424 do \ 283 425 { \ 284 register YYSIZE_T yyi;\426 YYSIZE_T yyi; \ 285 427 for (yyi = 0; yyi < (Count); yyi++) \ 286 428 (To)[yyi] = (From)[yyi]; \ 287 429 } \ 288 while ( 0)430 while (YYID (0)) 289 431 # endif 290 432 # endif … … 304 446 yyptr += yynewbytes / sizeof (*yyptr); \ 305 447 } \ 306 while (0) 307 308 #endif 309 310 #if defined (__STDC__) || defined (__cplusplus) 311 typedef signed char yysigned_char; 312 #else 313 typedef short yysigned_char; 314 #endif 315 316 /* YYFINAL -- State number of the termination state. */ 448 while (YYID (0)) 449 450 #endif 451 452 /* YYFINAL -- State number of the termination state. */ 317 453 #define YYFINAL 2 318 454 /* YYLAST -- Last index in YYTABLE. */ 319 455 #define YYLAST 201 320 456 321 /* YYNTOKENS -- Number of terminals. */457 /* YYNTOKENS -- Number of terminals. */ 322 458 #define YYNTOKENS 42 323 /* YYNNTS -- Number of nonterminals. */459 /* YYNNTS -- Number of nonterminals. */ 324 460 #define YYNNTS 41 325 /* YYNRULES -- Number of rules. */461 /* YYNRULES -- Number of rules. */ 326 462 #define YYNRULES 104 327 /* YYNRULES -- Number of states. */463 /* YYNRULES -- Number of states. */ 328 464 #define YYNSTATES 182 329 465 … … 332 468 #define YYMAXUTOK 296 333 469 334 #define YYTRANSLATE(YYX) \470 #define YYTRANSLATE(YYX) \ 335 471 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 336 472 337 473 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 338 static const unsigned charyytranslate[] =474 static const yytype_uint8 yytranslate[] = 339 475 { 340 476 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, … … 373 509 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in 374 510 YYRHS. */ 375 static const unsigned shortyyprhs[] =511 static const yytype_uint16 yyprhs[] = 376 512 { 377 513 0, 0, 3, 4, 7, 9, 11, 13, 17, 19, … … 388 524 }; 389 525 390 /* YYRHS -- A `-1'-separated list of the rules' RHS. */391 static const yy signed_charyyrhs[] =526 /* YYRHS -- A `-1'-separated list of the rules' RHS. */ 527 static const yytype_int8 yyrhs[] = 392 528 { 393 529 43, 0, -1, -1, 43, 44, -1, 45, -1, 55, … … 426 562 427 563 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 428 static const unsigned shortyyrline[] =564 static const yytype_uint16 yyrline[] = 429 565 { 430 566 0, 94, 94, 95, 98, 99, 100, 101, 102, 103, … … 442 578 #endif 443 579 444 #if YYDEBUG || YYERROR_VERBOSE 445 /* YYTN ME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.446 First, the terminals, then, starting at YYNTOKENS, nonterminals. */580 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE 581 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 582 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 447 583 static const char *const yytname[] = 448 584 { … … 454 590 "T_HEX", "T_WORD", "T_WORD_QUOTE", "T_UNEQUAL", "T_EOF", "T_EOL", 455 591 "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_ON", "T_SELECT", "T_RANGE", "T_OR", 456 "T_AND", "T_EQUAL", "T_NOT", "$accept", "input", "block", 457 "co mmon_block", "config_entry_start", "config_stmt",458 "menuconfig_ entry_start", "menuconfig_stmt", "config_option_list",459 "c onfig_option", "choice", "choice_entry", "choice_end", "choice_stmt",460 "choice_option _list", "choice_option", "choice_block", "if", "if_end",461 " if_stmt", "if_block", "menu", "menu_entry", "menu_end", "menu_stmt",462 " menu_block", "source", "source_stmt", "comment", "comment_stmt",463 " help_start", "help", "depends_list", "depends", "prompt_stmt_opt",464 " prompt", "end", "nl_or_eof", "if_expr", "expr", "symbol", 0592 "T_AND", "T_EQUAL", "T_NOT", "$accept", "input", "block", "common_block", 593 "config_entry_start", "config_stmt", "menuconfig_entry_start", 594 "menuconfig_stmt", "config_option_list", "config_option", "choice", 595 "choice_entry", "choice_end", "choice_stmt", "choice_option_list", 596 "choice_option", "choice_block", "if", "if_end", "if_stmt", "if_block", 597 "menu", "menu_entry", "menu_end", "menu_stmt", "menu_block", "source", 598 "source_stmt", "comment", "comment_stmt", "help_start", "help", 599 "depends_list", "depends", "prompt_stmt_opt", "prompt", "end", 600 "nl_or_eof", "if_expr", "expr", "symbol", 0 465 601 }; 466 602 #endif … … 469 605 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to 470 606 token YYLEX-NUM. */ 471 static const unsigned shortyytoknum[] =607 static const yytype_uint16 yytoknum[] = 472 608 { 473 609 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, … … 480 616 481 617 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 482 static const unsigned charyyr1[] =618 static const yytype_uint8 yyr1[] = 483 619 { 484 620 0, 42, 43, 43, 44, 44, 44, 44, 44, 44, … … 496 632 497 633 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 498 static const unsigned charyyr2[] =634 static const yytype_uint8 yyr2[] = 499 635 { 500 636 0, 2, 0, 2, 1, 1, 1, 3, 1, 1, … … 514 650 STATE-NUM when YYTABLE doesn't specify something else to do. Zero 515 651 means the default is an error. */ 516 static const unsigned charyydefact[] =652 static const yytype_uint8 yydefact[] = 517 653 { 518 654 2, 0, 1, 0, 0, 0, 8, 0, 0, 10, … … 537 673 }; 538 674 539 /* YYDEFGOTO[NTERM-NUM]. */540 static const shortyydefgoto[] =675 /* YYDEFGOTO[NTERM-NUM]. */ 676 static const yytype_int16 yydefgoto[] = 541 677 { 542 678 -1, 1, 17, 18, 19, 20, 21, 22, 52, 88, … … 550 686 STATE-NUM. */ 551 687 #define YYPACT_NINF -99 552 static const shortyypact[] =688 static const yytype_int16 yypact[] = 553 689 { 554 690 -99, 48, -99, 38, 46, 46, -99, 46, -29, -99, … … 574 710 575 711 /* YYPGOTO[NTERM-NUM]. */ 576 static const shortyypgoto[] =712 static const yytype_int16 yypgoto[] = 577 713 { 578 714 -99, -99, -99, 111, -99, -99, -99, -99, 178, -99, … … 588 724 If YYTABLE_NINF, syntax error. */ 589 725 #define YYTABLE_NINF -68 590 static const shortyytable[] =726 static const yytype_int16 yytable[] = 591 727 { 592 728 66, 67, 36, 42, 39, 40, 71, 41, 123, 124, … … 613 749 }; 614 750 615 static const unsigned charyycheck[] =751 static const yytype_uint8 yycheck[] = 616 752 { 617 753 48, 49, 3, 32, 4, 5, 30, 7, 71, 72, … … 640 776 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 641 777 symbol of state STATE-NUM. */ 642 static const unsigned charyystos[] =778 static const yytype_uint8 yystos[] = 643 779 { 644 780 0, 43, 0, 1, 3, 4, 5, 6, 7, 8, … … 663 799 }; 664 800 665 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)666 # define YYSIZE_T __SIZE_TYPE__667 #endif668 #if ! defined (YYSIZE_T) && defined (size_t)669 # define YYSIZE_T size_t670 #endif671 #if ! defined (YYSIZE_T)672 # if defined (__STDC__) || defined (__cplusplus)673 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */674 # define YYSIZE_T size_t675 # endif676 #endif677 #if ! defined (YYSIZE_T)678 # define YYSIZE_T unsigned int679 #endif680 681 801 #define yyerrok (yyerrstatus = 0) 682 802 #define yyclearin (yychar = YYEMPTY) … … 686 806 #define YYACCEPT goto yyacceptlab 687 807 #define YYABORT goto yyabortlab 688 #define YYERROR goto yyerr lab1808 #define YYERROR goto yyerrorlab 689 809 690 810 … … 704 824 yylval = (Value); \ 705 825 yytoken = YYTRANSLATE (yychar); \ 706 YYPOPSTACK ; \826 YYPOPSTACK (1); \ 707 827 goto yybackup; \ 708 828 } \ 709 829 else \ 710 { \711 yyerror ( "syntax error: cannot back up");\830 { \ 831 yyerror (YY_("syntax error: cannot back up")); \ 712 832 YYERROR; \ 713 833 } \ 714 while (0) 834 while (YYID (0)) 835 715 836 716 837 #define YYTERROR 1 717 838 #define YYERRCODE 256 718 839 719 /* YYLLOC_DEFAULT -- Compute the default location (before the actions 720 are run). */ 721 840 841 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. 842 If N is 0, then set CURRENT to the empty location which ends 843 the previous symbol: RHS[0] (always defined). */ 844 845 #define YYRHSLOC(Rhs, K) ((Rhs)[K]) 722 846 #ifndef YYLLOC_DEFAULT 723 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 724 Current.first_line = Rhs[1].first_line; \ 725 Current.first_column = Rhs[1].first_column; \ 726 Current.last_line = Rhs[N].last_line; \ 727 Current.last_column = Rhs[N].last_column; 728 #endif 847 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 848 do \ 849 if (YYID (N)) \ 850 { \ 851 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ 852 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ 853 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ 854 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ 855 } \ 856 else \ 857 { \ 858 (Current).first_line = (Current).last_line = \ 859 YYRHSLOC (Rhs, 0).last_line; \ 860 (Current).first_column = (Current).last_column = \ 861 YYRHSLOC (Rhs, 0).last_column; \ 862 } \ 863 while (YYID (0)) 864 #endif 865 866 867 /* YY_LOCATION_PRINT -- Print the location on the stream. 868 This macro was not mandated originally: define only if we know 869 we won't break user code: when these are the locations we know. */ 870 871 #ifndef YY_LOCATION_PRINT 872 # if YYLTYPE_IS_TRIVIAL 873 # define YY_LOCATION_PRINT(File, Loc) \ 874 fprintf (File, "%d.%d-%d.%d", \ 875 (Loc).first_line, (Loc).first_column, \ 876 (Loc).last_line, (Loc).last_column) 877 # else 878 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 879 # endif 880 #endif 881 729 882 730 883 /* YYLEX -- calling `yylex' with the right arguments. */ … … 748 901 if (yydebug) \ 749 902 YYFPRINTF Args; \ 750 } while (0) 751 752 # define YYDSYMPRINT(Args) \ 753 do { \ 754 if (yydebug) \ 755 yysymprint Args; \ 756 } while (0) 757 758 # define YYDSYMPRINTF(Title, Token, Value, Location) \ 759 do { \ 760 if (yydebug) \ 761 { \ 762 YYFPRINTF (stderr, "%s ", Title); \ 763 yysymprint (stderr, \ 764 Token, Value); \ 765 YYFPRINTF (stderr, "\n"); \ 766 } \ 767 } while (0) 903 } while (YYID (0)) 904 905 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 906 do { \ 907 if (yydebug) \ 908 { \ 909 YYFPRINTF (stderr, "%s ", Title); \ 910 yy_symbol_print (stderr, \ 911 Type, Value); \ 912 YYFPRINTF (stderr, "\n"); \ 913 } \ 914 } while (YYID (0)) 915 916 917 /*--------------------------------. 918 | Print this symbol on YYOUTPUT. | 919 `--------------------------------*/ 920 921 /*ARGSUSED*/ 922 #if (defined __STDC__ || defined __C99__FUNC__ \ 923 || defined __cplusplus || defined _MSC_VER) 924 static void 925 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 926 #else 927 static void 928 yy_symbol_value_print (yyoutput, yytype, yyvaluep) 929 FILE *yyoutput; 930 int yytype; 931 YYSTYPE const * const yyvaluep; 932 #endif 933 { 934 if (!yyvaluep) 935 return; 936 # ifdef YYPRINT 937 if (yytype < YYNTOKENS) 938 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 939 # else 940 YYUSE (yyoutput); 941 # endif 942 switch (yytype) 943 { 944 default: 945 break; 946 } 947 } 948 949 950 /*--------------------------------. 951 | Print this symbol on YYOUTPUT. | 952 `--------------------------------*/ 953 954 #if (defined __STDC__ || defined __C99__FUNC__ \ 955 || defined __cplusplus || defined _MSC_VER) 956 static void 957 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 958 #else 959 static void 960 yy_symbol_print (yyoutput, yytype, yyvaluep) 961 FILE *yyoutput; 962 int yytype; 963 YYSTYPE const * const yyvaluep; 964 #endif 965 { 966 if (yytype < YYNTOKENS) 967 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 968 else 969 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); 970 971 yy_symbol_value_print (yyoutput, yytype, yyvaluep); 972 YYFPRINTF (yyoutput, ")"); 973 } 768 974 769 975 /*------------------------------------------------------------------. 770 976 | yy_stack_print -- Print the state stack from its BOTTOM up to its | 771 | TOP ( cinluded). |977 | TOP (included). | 772 978 `------------------------------------------------------------------*/ 773 979 774 #if defined (__STDC__) || defined (__cplusplus) 980 #if (defined __STDC__ || defined __C99__FUNC__ \ 981 || defined __cplusplus || defined _MSC_VER) 775 982 static void 776 yy_stack_print ( short *bottom, short*top)983 yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) 777 984 #else 778 985 static void 779 986 yy_stack_print (bottom, top) 780 short*bottom;781 short*top;987 yytype_int16 *bottom; 988 yytype_int16 *top; 782 989 #endif 783 990 { 784 991 YYFPRINTF (stderr, "Stack now"); 785 for ( /* Nothing. */; bottom <= top; ++bottom)992 for (; bottom <= top; ++bottom) 786 993 YYFPRINTF (stderr, " %d", *bottom); 787 994 YYFPRINTF (stderr, "\n"); … … 792 999 if (yydebug) \ 793 1000 yy_stack_print ((Bottom), (Top)); \ 794 } while ( 0)1001 } while (YYID (0)) 795 1002 796 1003 … … 799 1006 `------------------------------------------------*/ 800 1007 801 #if defined (__STDC__) || defined (__cplusplus) 1008 #if (defined __STDC__ || defined __C99__FUNC__ \ 1009 || defined __cplusplus || defined _MSC_VER) 802 1010 static void 803 yy_reduce_print ( int yyrule)1011 yy_reduce_print (YYSTYPE *yyvsp, int yyrule) 804 1012 #else 805 1013 static void 806 yy_reduce_print (yyrule) 1014 yy_reduce_print (yyvsp, yyrule) 1015 YYSTYPE *yyvsp; 807 1016 int yyrule; 808 1017 #endif 809 1018 { 1019 int yynrhs = yyr2[yyrule]; 810 1020 int yyi; 811 unsigned int yylineno = yyrline[yyrule]; 812 YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", 813 yyrule - 1, yylineno); 814 /* Print the symbols being reduced, and their result. */ 815 for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) 816 YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); 817 YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); 1021 unsigned long int yylno = yyrline[yyrule]; 1022 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", 1023 yyrule - 1, yylno); 1024 /* The symbols being reduced. */ 1025 for (yyi = 0; yyi < yynrhs; yyi++) 1026 { 1027 fprintf (stderr, " $%d = ", yyi + 1); 1028 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 1029 &(yyvsp[(yyi + 1) - (yynrhs)]) 1030 ); 1031 fprintf (stderr, "\n"); 1032 } 818 1033 } 819 1034 … … 821 1036 do { \ 822 1037 if (yydebug) \ 823 yy_reduce_print ( Rule);\824 } while ( 0)1038 yy_reduce_print (yyvsp, Rule); \ 1039 } while (YYID (0)) 825 1040 826 1041 /* Nonzero means print parse trace. It is left uninitialized so that … … 829 1044 #else /* !YYDEBUG */ 830 1045 # define YYDPRINTF(Args) 831 # define YYDSYMPRINT(Args) 832 # define YYDSYMPRINTF(Title, Token, Value, Location) 1046 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) 833 1047 # define YY_STACK_PRINT(Bottom, Top) 834 1048 # define YY_REDUCE_PRINT(Rule) … … 845 1059 846 1060 Do not make this value too large; the results are undefined if 847 SIZE_MAX< YYSTACK_BYTES (YYMAXDEPTH)1061 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 848 1062 evaluated with infinite-precision integer arithmetic. */ 849 850 #if YYMAXDEPTH == 0851 # undef YYMAXDEPTH852 #endif853 1063 854 1064 #ifndef YYMAXDEPTH … … 862 1072 863 1073 # ifndef yystrlen 864 # if defined (__GLIBC__) && defined (_STRING_H)1074 # if defined __GLIBC__ && defined _STRING_H 865 1075 # define yystrlen strlen 866 1076 # else 867 1077 /* Return the length of YYSTR. */ 1078 #if (defined __STDC__ || defined __C99__FUNC__ \ 1079 || defined __cplusplus || defined _MSC_VER) 868 1080 static YYSIZE_T 869 # if defined (__STDC__) || defined (__cplusplus)870 1081 yystrlen (const char *yystr) 871 # else 1082 #else 1083 static YYSIZE_T 872 1084 yystrlen (yystr) 873 const char *yystr; 874 # endif 875 { 876 register const char *yys = yystr; 877 878 while (*yys++ != '\0') 1085 const char *yystr; 1086 #endif 1087 { 1088 YYSIZE_T yylen; 1089 for (yylen = 0; yystr[yylen]; yylen++) 879 1090 continue; 880 881 return yys - yystr - 1; 1091 return yylen; 882 1092 } 883 1093 # endif … … 885 1095 886 1096 # ifndef yystpcpy 887 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)1097 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 888 1098 # define yystpcpy stpcpy 889 1099 # else 890 1100 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 891 1101 YYDEST. */ 1102 #if (defined __STDC__ || defined __C99__FUNC__ \ 1103 || defined __cplusplus || defined _MSC_VER) 892 1104 static char * 893 # if defined (__STDC__) || defined (__cplusplus)894 1105 yystpcpy (char *yydest, const char *yysrc) 895 # else 1106 #else 1107 static char * 896 1108 yystpcpy (yydest, yysrc) 897 char *yydest;898 const char *yysrc;899 # endif900 { 901 registerchar *yyd = yydest;902 registerconst char *yys = yysrc;1109 char *yydest; 1110 const char *yysrc; 1111 #endif 1112 { 1113 char *yyd = yydest; 1114 const char *yys = yysrc; 903 1115 904 1116 while ((*yyd++ = *yys++) != '\0') … … 910 1122 # endif 911 1123 912 #endif /* !YYERROR_VERBOSE */ 913 914 915 916 917 #if YYDEBUG 918 /*--------------------------------. 919 | Print this symbol on YYOUTPUT. | 920 `--------------------------------*/ 921 922 #if defined (__STDC__) || defined (__cplusplus) 923 static void 924 yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) 925 #else 926 static void 927 yysymprint (yyoutput, yytype, yyvaluep) 928 FILE *yyoutput; 929 int yytype; 930 YYSTYPE *yyvaluep; 931 #endif 932 { 933 /* Pacify ``unused variable'' warnings. */ 934 (void) yyvaluep; 935 936 if (yytype < YYNTOKENS) 937 { 938 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 939 # ifdef YYPRINT 940 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 1124 # ifndef yytnamerr 1125 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary 1126 quotes and backslashes, so that it's suitable for yyerror. The 1127 heuristic is that double-quoting is unnecessary unless the string 1128 contains an apostrophe, a comma, or backslash (other than 1129 backslash-backslash). YYSTR is taken from yytname. If YYRES is 1130 null, do not copy; instead, return the length of what the result 1131 would have been. */ 1132 static YYSIZE_T 1133 yytnamerr (char *yyres, const char *yystr) 1134 { 1135 if (*yystr == '"') 1136 { 1137 YYSIZE_T yyn = 0; 1138 char const *yyp = yystr; 1139 1140 for (;;) 1141 switch (*++yyp) 1142 { 1143 case '\'': 1144 case ',': 1145 goto do_not_strip_quotes; 1146 1147 case '\\': 1148 if (*++yyp != '\\') 1149 goto do_not_strip_quotes; 1150 /* Fall through. */ 1151 default: 1152 if (yyres) 1153 yyres[yyn] = *yyp; 1154 yyn++; 1155 break; 1156 1157 case '"': 1158 if (yyres) 1159 yyres[yyn] = '\0'; 1160 return yyn; 1161 } 1162 do_not_strip_quotes: ; 1163 } 1164 1165 if (! yyres) 1166 return yystrlen (yystr); 1167 1168 return yystpcpy (yyres, yystr) - yyres; 1169 } 941 1170 # endif 1171 1172 /* Copy into YYRESULT an error message about the unexpected token 1173 YYCHAR while in state YYSTATE. Return the number of bytes copied, 1174 including the terminating null byte. If YYRESULT is null, do not 1175 copy anything; just return the number of bytes that would be 1176 copied. As a special case, return 0 if an ordinary "syntax error" 1177 message will do. Return YYSIZE_MAXIMUM if overflow occurs during 1178 size calculation. */ 1179 static YYSIZE_T 1180 yysyntax_error (char *yyresult, int yystate, int yychar) 1181 { 1182 int yyn = yypact[yystate]; 1183 1184 if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) 1185 return 0; 1186 else 1187 { 1188 int yytype = YYTRANSLATE (yychar); 1189 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); 1190 YYSIZE_T yysize = yysize0; 1191 YYSIZE_T yysize1; 1192 int yysize_overflow = 0; 1193 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 1194 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 1195 int yyx; 1196 1197 # if 0 1198 /* This is so xgettext sees the translatable formats that are 1199 constructed on the fly. */ 1200 YY_("syntax error, unexpected %s"); 1201 YY_("syntax error, unexpected %s, expecting %s"); 1202 YY_("syntax error, unexpected %s, expecting %s or %s"); 1203 YY_("syntax error, unexpected %s, expecting %s or %s or %s"); 1204 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); 1205 # endif 1206 char *yyfmt; 1207 char const *yyf; 1208 static char const yyunexpected[] = "syntax error, unexpected %s"; 1209 static char const yyexpecting[] = ", expecting %s"; 1210 static char const yyor[] = " or %s"; 1211 char yyformat[sizeof yyunexpected 1212 + sizeof yyexpecting - 1 1213 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) 1214 * (sizeof yyor - 1))]; 1215 char const *yyprefix = yyexpecting; 1216 1217 /* Start YYX at -YYN if negative to avoid negative indexes in 1218 YYCHECK. */ 1219 int yyxbegin = yyn < 0 ? -yyn : 0; 1220 1221 /* Stay within bounds of both yycheck and yytname. */ 1222 int yychecklim = YYLAST - yyn + 1; 1223 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 1224 int yycount = 1; 1225 1226 yyarg[0] = yytname[yytype]; 1227 yyfmt = yystpcpy (yyformat, yyunexpected); 1228 1229 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 1230 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 1231 { 1232 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 1233 { 1234 yycount = 1; 1235 yysize = yysize0; 1236 yyformat[sizeof yyunexpected - 1] = '\0'; 1237 break; 1238 } 1239 yyarg[yycount++] = yytname[yyx]; 1240 yysize1 = yysize + yytnamerr (0, yytname[yyx]); 1241 yysize_overflow |= (yysize1 < yysize); 1242 yysize = yysize1; 1243 yyfmt = yystpcpy (yyfmt, yyprefix); 1244 yyprefix = yyor; 1245 } 1246 1247 yyf = YY_(yyformat); 1248 yysize1 = yysize + yystrlen (yyf); 1249 yysize_overflow |= (yysize1 < yysize); 1250 yysize = yysize1; 1251 1252 if (yysize_overflow) 1253 return YYSIZE_MAXIMUM; 1254 1255 if (yyresult) 1256 { 1257 /* Avoid sprintf, as that infringes on the user's name space. 1258 Don't have undefined behavior even if the translation 1259 produced a string with the wrong number of "%s"s. */ 1260 char *yyp = yyresult; 1261 int yyi = 0; 1262 while ((*yyp = *yyf) != '\0') 1263 { 1264 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) 1265 { 1266 yyp += yytnamerr (yyp, yyarg[yyi++]); 1267 yyf += 2; 1268 } 1269 else 1270 { 1271 yyp++; 1272 yyf++; 1273 } 1274 } 1275 } 1276 return yysize; 942 1277 } 943 else944 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);945 946 switch (yytype)947 {948 default:949 break;950 }951 YYFPRINTF (yyoutput, ")");952 1278 } 953 954 #endif /* ! YYDEBUG */ 1279 #endif /* YYERROR_VERBOSE */ 1280 1281 1282 955 1283 /*-----------------------------------------------. 956 1284 | Release the memory associated to this symbol. | 957 1285 `-----------------------------------------------*/ 958 1286 959 #if defined (__STDC__) || defined (__cplusplus) 1287 /*ARGSUSED*/ 1288 #if (defined __STDC__ || defined __C99__FUNC__ \ 1289 || defined __cplusplus || defined _MSC_VER) 960 1290 static void 961 yydestruct ( int yytype, YYSTYPE *yyvaluep)1291 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) 962 1292 #else 963 1293 static void 964 yydestruct (yytype, yyvaluep) 1294 yydestruct (yymsg, yytype, yyvaluep) 1295 const char *yymsg; 965 1296 int yytype; 966 1297 YYSTYPE *yyvaluep; 967 1298 #endif 968 1299 { 969 /* Pacify ``unused variable'' warnings. */ 970 (void) yyvaluep; 1300 YYUSE (yyvaluep); 1301 1302 if (!yymsg) 1303 yymsg = "Deleting"; 1304 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 971 1305 972 1306 switch (yytype) … … 974 1308 975 1309 default: 976 break;1310 break; 977 1311 } 978 1312 } … … 983 1317 984 1318 #ifdef YYPARSE_PARAM 985 # if defined (__STDC__) || defined (__cplusplus)1319 #if defined __STDC__ || defined __cplusplus 986 1320 int yyparse (void *YYPARSE_PARAM); 987 # else1321 #else 988 1322 int yyparse (); 989 # endif1323 #endif 990 1324 #else /* ! YYPARSE_PARAM */ 991 #if defined (__STDC__) || defined (__cplusplus)1325 #if defined __STDC__ || defined __cplusplus 992 1326 int yyparse (void); 993 1327 #else … … 998 1332 999 1333 1000 /* The look ahead symbol. */1334 /* The look-ahead symbol. */ 1001 1335 int yychar; 1002 1336 1003 /* The semantic value of the look ahead symbol. */1337 /* The semantic value of the look-ahead symbol. */ 1004 1338 YYSTYPE yylval; 1005 1339 … … 1014 1348 1015 1349 #ifdef YYPARSE_PARAM 1016 # if defined (__STDC__) || defined (__cplusplus) 1017 int yyparse (void *YYPARSE_PARAM) 1018 # else 1019 int yyparse (YYPARSE_PARAM) 1020 void *YYPARSE_PARAM; 1021 # endif 1350 #if (defined __STDC__ || defined __C99__FUNC__ \ 1351 || defined __cplusplus || defined _MSC_VER) 1352 int 1353 yyparse (void *YYPARSE_PARAM) 1354 #else 1355 int 1356 yyparse (YYPARSE_PARAM) 1357 void *YYPARSE_PARAM; 1358 #endif 1022 1359 #else /* ! YYPARSE_PARAM */ 1023 #if defined (__STDC__) || defined (__cplusplus) 1360 #if (defined __STDC__ || defined __C99__FUNC__ \ 1361 || defined __cplusplus || defined _MSC_VER) 1024 1362 int 1025 1363 yyparse (void) … … 1031 1369 #endif 1032 1370 { 1033 1034 registerint yystate;1035 registerint yyn;1371 1372 int yystate; 1373 int yyn; 1036 1374 int yyresult; 1037 1375 /* Number of tokens to shift before error messages enabled. */ 1038 1376 int yyerrstatus; 1039 /* Look ahead token as an internal (translated) token number. */1377 /* Look-ahead token as an internal (translated) token number. */ 1040 1378 int yytoken = 0; 1379 #if YYERROR_VERBOSE 1380 /* Buffer for error messages, and its allocated size. */ 1381 char yymsgbuf[128]; 1382 char *yymsg = yymsgbuf; 1383 YYSIZE_T yymsg_alloc = sizeof yymsgbuf; 1384 #endif 1041 1385 1042 1386 /* Three stacks and their tools: … … 1049 1393 1050 1394 /* The state stack. */ 1051 shortyyssa[YYINITDEPTH];1052 short*yyss = yyssa;1053 register short*yyssp;1395 yytype_int16 yyssa[YYINITDEPTH]; 1396 yytype_int16 *yyss = yyssa; 1397 yytype_int16 *yyssp; 1054 1398 1055 1399 /* The semantic value stack. */ 1056 1400 YYSTYPE yyvsa[YYINITDEPTH]; 1057 1401 YYSTYPE *yyvs = yyvsa; 1058 registerYYSTYPE *yyvsp;1059 1060 1061 1062 #define YYPOPSTACK (yyvsp--, yyssp--)1402 YYSTYPE *yyvsp; 1403 1404 1405 1406 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 1063 1407 1064 1408 YYSIZE_T yystacksize = YYINITDEPTH; … … 1069 1413 1070 1414 1071 /* When reducing, the number of symbols on the RHS of the reduced1072 rule. */1073 int yylen ;1415 /* The number of symbols on the RHS of the reduced rule. 1416 Keep to zero when no symbol should be popped. */ 1417 int yylen = 0; 1074 1418 1075 1419 YYDPRINTF ((stderr, "Starting parse\n")); … … 1095 1439 yynewstate: 1096 1440 /* In all cases, when you get here, the value and location stacks 1097 have just been pushed. so pushing a state here evens the stacks. 1098 */ 1441 have just been pushed. So pushing a state here evens the stacks. */ 1099 1442 yyssp++; 1100 1443 … … 1109 1452 #ifdef yyoverflow 1110 1453 { 1111 /* Give user a chance to reallocate the stack. Use copies of1454 /* Give user a chance to reallocate the stack. Use copies of 1112 1455 these so that the &'s don't force the real ones into 1113 1456 memory. */ 1114 1457 YYSTYPE *yyvs1 = yyvs; 1115 short*yyss1 = yyss;1458 yytype_int16 *yyss1 = yyss; 1116 1459 1117 1460 … … 1120 1463 conditional around just the two extra args, but that might 1121 1464 be undefined if yyoverflow is a macro. */ 1122 yyoverflow ( "parser stack overflow",1465 yyoverflow (YY_("memory exhausted"), 1123 1466 &yyss1, yysize * sizeof (*yyssp), 1124 1467 &yyvs1, yysize * sizeof (*yyvsp), … … 1131 1474 #else /* no yyoverflow */ 1132 1475 # ifndef YYSTACK_RELOCATE 1133 goto yy overflowlab;1476 goto yyexhaustedlab; 1134 1477 # else 1135 1478 /* Extend the stack our own way. */ 1136 1479 if (YYMAXDEPTH <= yystacksize) 1137 goto yy overflowlab;1480 goto yyexhaustedlab; 1138 1481 yystacksize *= 2; 1139 1482 if (YYMAXDEPTH < yystacksize) … … 1141 1484 1142 1485 { 1143 short*yyss1 = yyss;1486 yytype_int16 *yyss1 = yyss; 1144 1487 union yyalloc *yyptr = 1145 1488 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 1146 1489 if (! yyptr) 1147 goto yy overflowlab;1490 goto yyexhaustedlab; 1148 1491 YYSTACK_RELOCATE (yyss); 1149 1492 YYSTACK_RELOCATE (yyvs); … … 1176 1519 yybackup: 1177 1520 1178 /* Do appropriate processing given the current state. */ 1179 /* Read a lookahead token if we need one and don't already have one. */ 1180 /* yyresume: */ 1181 1182 /* First try to decide what to do without reference to lookahead token. */ 1183 1521 /* Do appropriate processing given the current state. Read a 1522 look-ahead token if we need one and don't already have one. */ 1523 1524 /* First try to decide what to do without reference to look-ahead token. */ 1184 1525 yyn = yypact[yystate]; 1185 1526 if (yyn == YYPACT_NINF) 1186 1527 goto yydefault; 1187 1528 1188 /* Not known => get a look ahead token if don't already have one. */1189 1190 /* YYCHAR is either YYEMPTY or YYEOF or a valid look ahead symbol. */1529 /* Not known => get a look-ahead token if don't already have one. */ 1530 1531 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ 1191 1532 if (yychar == YYEMPTY) 1192 1533 { … … 1203 1544 { 1204 1545 yytoken = YYTRANSLATE (yychar); 1205 YY DSYMPRINTF("Next token is", yytoken, &yylval, &yylloc);1546 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); 1206 1547 } 1207 1548 … … 1223 1564 YYACCEPT; 1224 1565 1225 /* Shift the lookahead token. */1226 YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));1227 1228 /* Discard the token being shifted unless it is eof. */1229 if (yychar != YYEOF)1230 yychar = YYEMPTY;1231 1232 *++yyvsp = yylval;1233 1234 1235 1566 /* Count tokens shifted since error; after three, turn off error 1236 1567 status. */ … … 1238 1569 yyerrstatus--; 1239 1570 1571 /* Shift the look-ahead token. */ 1572 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 1573 1574 /* Discard the shifted token unless it is eof. */ 1575 if (yychar != YYEOF) 1576 yychar = YYEMPTY; 1577 1240 1578 yystate = yyn; 1579 *++yyvsp = yylval; 1580 1241 1581 goto yynewstate; 1242 1582 … … 1274 1614 { 1275 1615 case 8: 1276 1616 #line 102 "zconf.y" 1277 1617 { zconfprint("unexpected 'endmenu' statement"); ;} 1278 1618 break; 1279 1619 1280 1620 case 9: 1281 1621 #line 103 "zconf.y" 1282 1622 { zconfprint("unexpected 'endif' statement"); ;} 1283 1623 break; 1284 1624 1285 1625 case 10: 1286 1626 #line 104 "zconf.y" 1287 1627 { zconfprint("unexpected 'endchoice' statement"); ;} 1288 1628 break; 1289 1629 1290 1630 case 11: 1291 1631 #line 105 "zconf.y" 1292 1632 { zconfprint("syntax error"); yyerrok; ;} 1293 1633 break; 1294 1634 1295 1635 case 18: 1296 1297 { 1298 struct symbol *sym = sym_lookup( yyvsp[-1].string, 0);1636 #line 121 "zconf.y" 1637 { 1638 struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), 0); 1299 1639 sym->flags |= SYMBOL_OPTIONAL; 1300 1640 menu_add_entry(sym); 1301 printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), yyvsp[-1].string);1641 printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), (yyvsp[(2) - (3)].string)); 1302 1642 ;} 1303 1643 break; 1304 1644 1305 1645 case 19: 1306 1646 #line 129 "zconf.y" 1307 1647 { 1308 1648 menu_end_entry(); … … 1312 1652 1313 1653 case 20: 1314 1315 { 1316 struct symbol *sym = sym_lookup( yyvsp[-1].string, 0);1654 #line 135 "zconf.y" 1655 { 1656 struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), 0); 1317 1657 sym->flags |= SYMBOL_OPTIONAL; 1318 1658 menu_add_entry(sym); 1319 printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", zconf_curname(), zconf_lineno(), yyvsp[-1].string);1659 printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", zconf_curname(), zconf_lineno(), (yyvsp[(2) - (3)].string)); 1320 1660 ;} 1321 1661 break; 1322 1662 1323 1663 case 21: 1324 1664 #line 143 "zconf.y" 1325 1665 { 1326 1666 if (current_entry->prompt) … … 1334 1674 1335 1675 case 27: 1336 1676 #line 161 "zconf.y" 1337 1677 { 1338 1678 menu_set_type(S_TRISTATE); … … 1342 1682 1343 1683 case 28: 1344 1345 { 1346 menu_add_expr(P_DEFAULT, yyvsp[-2].expr, yyvsp[-1].expr);1684 #line 167 "zconf.y" 1685 { 1686 menu_add_expr(P_DEFAULT, (yyvsp[(2) - (4)].expr), (yyvsp[(3) - (4)].expr)); 1347 1687 menu_set_type(S_TRISTATE); 1348 1688 printd(DEBUG_PARSE, "%s:%d:def_boolean\n", zconf_curname(), zconf_lineno()); … … 1351 1691 1352 1692 case 29: 1353 1693 #line 174 "zconf.y" 1354 1694 { 1355 1695 menu_set_type(S_BOOLEAN); … … 1359 1699 1360 1700 case 30: 1361 1362 { 1363 menu_add_expr(P_DEFAULT, yyvsp[-2].expr, yyvsp[-1].expr);1701 #line 180 "zconf.y" 1702 { 1703 menu_add_expr(P_DEFAULT, (yyvsp[(2) - (4)].expr), (yyvsp[(3) - (4)].expr)); 1364 1704 menu_set_type(S_BOOLEAN); 1365 1705 printd(DEBUG_PARSE, "%s:%d:def_boolean\n", zconf_curname(), zconf_lineno()); … … 1368 1708 1369 1709 case 31: 1370 1710 #line 187 "zconf.y" 1371 1711 { 1372 1712 menu_set_type(S_INT); … … 1376 1716 1377 1717 case 32: 1378 1718 #line 193 "zconf.y" 1379 1719 { 1380 1720 menu_set_type(S_HEX); … … 1384 1724 1385 1725 case 33: 1386 1726 #line 199 "zconf.y" 1387 1727 { 1388 1728 menu_set_type(S_STRING); … … 1392 1732 1393 1733 case 34: 1394 1395 { 1396 menu_add_prompt(P_PROMPT, yyvsp[-2].string, yyvsp[-1].expr);1734 #line 205 "zconf.y" 1735 { 1736 menu_add_prompt(P_PROMPT, (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].expr)); 1397 1737 printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); 1398 1738 ;} … … 1400 1740 1401 1741 case 35: 1402 1403 { 1404 menu_add_expr(P_DEFAULT, yyvsp[-2].expr, yyvsp[-1].expr);1742 #line 211 "zconf.y" 1743 { 1744 menu_add_expr(P_DEFAULT, (yyvsp[(2) - (4)].expr), (yyvsp[(3) - (4)].expr)); 1405 1745 printd(DEBUG_PARSE, "%s:%d:default\n", zconf_curname(), zconf_lineno()); 1406 1746 ;} … … 1408 1748 1409 1749 case 36: 1410 1411 { 1412 menu_add_symbol(P_SELECT, sym_lookup( yyvsp[-2].string, 0), yyvsp[-1].expr);1750 #line 217 "zconf.y" 1751 { 1752 menu_add_symbol(P_SELECT, sym_lookup((yyvsp[(2) - (4)].string), 0), (yyvsp[(3) - (4)].expr)); 1413 1753 printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno()); 1414 1754 ;} … … 1416 1756 1417 1757 case 37: 1418 1419 { 1420 menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE, yyvsp[-3].symbol, yyvsp[-2].symbol), yyvsp[-1].expr);1758 #line 223 "zconf.y" 1759 { 1760 menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,(yyvsp[(2) - (5)].symbol), (yyvsp[(3) - (5)].symbol)), (yyvsp[(4) - (5)].expr)); 1421 1761 printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno()); 1422 1762 ;} … … 1424 1764 1425 1765 case 38: 1426 1766 #line 231 "zconf.y" 1427 1767 { 1428 1768 struct symbol *sym = sym_lookup(NULL, 0); … … 1435 1775 1436 1776 case 39: 1437 1777 #line 240 "zconf.y" 1438 1778 { 1439 1779 menu_end_entry(); … … 1443 1783 1444 1784 case 40: 1445 1446 { 1447 if (zconf_endtoken( yyvsp[0].token, T_CHOICE, T_ENDCHOICE)) {1785 #line 246 "zconf.y" 1786 { 1787 if (zconf_endtoken((yyvsp[(1) - (1)].token), T_CHOICE, T_ENDCHOICE)) { 1448 1788 menu_end_menu(); 1449 1789 printd(DEBUG_PARSE, "%s:%d:endchoice\n", zconf_curname(), zconf_lineno()); … … 1453 1793 1454 1794 case 42: 1455 1795 #line 256 "zconf.y" 1456 1796 { 1457 1797 printf("%s:%d: missing 'endchoice' for this 'choice' statement\n", current_menu->file->name, current_menu->lineno); … … 1461 1801 1462 1802 case 48: 1463 1464 { 1465 menu_add_prompt(P_PROMPT, yyvsp[-2].string, yyvsp[-1].expr);1803 #line 270 "zconf.y" 1804 { 1805 menu_add_prompt(P_PROMPT, (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].expr)); 1466 1806 printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); 1467 1807 ;} … … 1469 1809 1470 1810 case 49: 1471 1811 #line 276 "zconf.y" 1472 1812 { 1473 1813 menu_set_type(S_TRISTATE); … … 1477 1817 1478 1818 case 50: 1479 1819 #line 282 "zconf.y" 1480 1820 { 1481 1821 menu_set_type(S_BOOLEAN); … … 1485 1825 1486 1826 case 51: 1487 1827 #line 288 "zconf.y" 1488 1828 { 1489 1829 current_entry->sym->flags |= SYMBOL_OPTIONAL; … … 1493 1833 1494 1834 case 52: 1495 1496 { 1497 menu_add_symbol(P_DEFAULT, sym_lookup( yyvsp[-2].string, 0), yyvsp[-1].expr);1835 #line 294 "zconf.y" 1836 { 1837 menu_add_symbol(P_DEFAULT, sym_lookup((yyvsp[(2) - (4)].string), 0), (yyvsp[(3) - (4)].expr)); 1498 1838 printd(DEBUG_PARSE, "%s:%d:default\n", zconf_curname(), zconf_lineno()); 1499 1839 ;} … … 1501 1841 1502 1842 case 55: 1503 1843 #line 307 "zconf.y" 1504 1844 { 1505 1845 printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno()); 1506 1846 menu_add_entry(NULL); 1507 menu_add_dep( yyvsp[-1].expr);1847 menu_add_dep((yyvsp[(2) - (3)].expr)); 1508 1848 menu_end_entry(); 1509 1849 menu_add_menu(); … … 1512 1852 1513 1853 case 56: 1514 1515 { 1516 if (zconf_endtoken( yyvsp[0].token, T_IF, T_ENDIF)) {1854 #line 316 "zconf.y" 1855 { 1856 if (zconf_endtoken((yyvsp[(1) - (1)].token), T_IF, T_ENDIF)) { 1517 1857 menu_end_menu(); 1518 1858 printd(DEBUG_PARSE, "%s:%d:endif\n", zconf_curname(), zconf_lineno()); … … 1522 1862 1523 1863 case 58: 1524 1864 #line 326 "zconf.y" 1525 1865 { 1526 1866 printf("%s:%d: missing 'endif' for this 'if' statement\n", current_menu->file->name, current_menu->lineno); … … 1530 1870 1531 1871 case 63: 1532 1872 #line 341 "zconf.y" 1533 1873 { 1534 1874 menu_add_entry(NULL); 1535 menu_add_prop(P_MENU, yyvsp[-1].string, NULL, NULL);1875 menu_add_prop(P_MENU, (yyvsp[(2) - (3)].string), NULL, NULL); 1536 1876 printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno()); 1537 1877 ;} … … 1539 1879 1540 1880 case 64: 1541 1881 #line 348 "zconf.y" 1542 1882 { 1543 1883 menu_end_entry(); … … 1547 1887 1548 1888 case 65: 1549 1550 { 1551 if (zconf_endtoken( yyvsp[0].token, T_MENU, T_ENDMENU)) {1889 #line 354 "zconf.y" 1890 { 1891 if (zconf_endtoken((yyvsp[(1) - (1)].token), T_MENU, T_ENDMENU)) { 1552 1892 menu_end_menu(); 1553 1893 printd(DEBUG_PARSE, "%s:%d:endmenu\n", zconf_curname(), zconf_lineno()); … … 1557 1897 1558 1898 case 67: 1559 1899 #line 364 "zconf.y" 1560 1900 { 1561 1901 printf("%s:%d: missing 'endmenu' for this 'menu' statement\n", current_menu->file->name, current_menu->lineno); … … 1565 1905 1566 1906 case 72: 1567 1907 #line 374 "zconf.y" 1568 1908 { zconfprint("invalid menu option"); yyerrok; ;} 1569 1909 break; 1570 1910 1571 1911 case 73: 1572 1573 { 1574 yyval.string = yyvsp[-1].string;1575 printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), yyvsp[-1].string);1912 #line 378 "zconf.y" 1913 { 1914 (yyval.string) = (yyvsp[(2) - (3)].string); 1915 printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), (yyvsp[(2) - (3)].string)); 1576 1916 ;} 1577 1917 break; 1578 1918 1579 1919 case 74: 1580 1581 { 1582 zconf_nextfile( yyvsp[0].string);1920 #line 384 "zconf.y" 1921 { 1922 zconf_nextfile((yyvsp[(1) - (1)].string)); 1583 1923 ;} 1584 1924 break; 1585 1925 1586 1926 case 75: 1587 1927 #line 391 "zconf.y" 1588 1928 { 1589 1929 menu_add_entry(NULL); 1590 menu_add_prop(P_COMMENT, yyvsp[-1].string, NULL, NULL);1930 menu_add_prop(P_COMMENT, (yyvsp[(2) - (3)].string), NULL, NULL); 1591 1931 printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno()); 1592 1932 ;} … … 1594 1934 1595 1935 case 76: 1596 1936 #line 398 "zconf.y" 1597 1937 { 1598 1938 menu_end_entry(); … … 1601 1941 1602 1942 case 77: 1603 1943 #line 405 "zconf.y" 1604 1944 { 1605 1945 printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno()); … … 1609 1949 1610 1950 case 78: 1611 1612 { 1613 current_entry->sym->help = yyvsp[0].string;1951 #line 411 "zconf.y" 1952 { 1953 current_entry->sym->help = (yyvsp[(2) - (2)].string); 1614 1954 ;} 1615 1955 break; 1616 1956 1617 1957 case 82: 1618 1619 { 1620 menu_add_dep( yyvsp[-1].expr);1958 #line 423 "zconf.y" 1959 { 1960 menu_add_dep((yyvsp[(3) - (4)].expr)); 1621 1961 printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno()); 1622 1962 ;} … … 1624 1964 1625 1965 case 83: 1626 1627 { 1628 menu_add_dep( yyvsp[-1].expr);1966 #line 428 "zconf.y" 1967 { 1968 menu_add_dep((yyvsp[(2) - (3)].expr)); 1629 1969 printd(DEBUG_PARSE, "%s:%d:depends\n", zconf_curname(), zconf_lineno()); 1630 1970 ;} … … 1632 1972 1633 1973 case 84: 1634 1635 { 1636 menu_add_dep( yyvsp[-1].expr);1974 #line 433 "zconf.y" 1975 { 1976 menu_add_dep((yyvsp[(2) - (3)].expr)); 1637 1977 printd(DEBUG_PARSE, "%s:%d:requires\n", zconf_curname(), zconf_lineno()); 1638 1978 ;} … … 1640 1980 1641 1981 case 86: 1642 1643 { 1644 menu_add_prop(P_PROMPT, yyvsp[-1].string, NULL, yyvsp[0].expr);1982 #line 443 "zconf.y" 1983 { 1984 menu_add_prop(P_PROMPT, (yyvsp[(1) - (2)].string), NULL, (yyvsp[(2) - (2)].expr)); 1645 1985 ;} 1646 1986 break; 1647 1987 1648 1988 case 89: 1649 1650 { yyval.token= T_ENDMENU; ;}1989 #line 451 "zconf.y" 1990 { (yyval.token) = T_ENDMENU; ;} 1651 1991 break; 1652 1992 1653 1993 case 90: 1654 1655 { yyval.token= T_ENDCHOICE; ;}1994 #line 452 "zconf.y" 1995 { (yyval.token) = T_ENDCHOICE; ;} 1656 1996 break; 1657 1997 1658 1998 case 91: 1659 1660 { yyval.token= T_ENDIF; ;}1999 #line 453 "zconf.y" 2000 { (yyval.token) = T_ENDIF; ;} 1661 2001 break; 1662 2002 1663 2003 case 94: 1664 1665 { yyval.expr= NULL; ;}2004 #line 459 "zconf.y" 2005 { (yyval.expr) = NULL; ;} 1666 2006 break; 1667 2007 1668 2008 case 95: 1669 1670 { yyval.expr = yyvsp[0].expr; ;}2009 #line 460 "zconf.y" 2010 { (yyval.expr) = (yyvsp[(2) - (2)].expr); ;} 1671 2011 break; 1672 2012 1673 2013 case 96: 1674 1675 { yyval.expr = expr_alloc_symbol(yyvsp[0].symbol); ;}2014 #line 463 "zconf.y" 2015 { (yyval.expr) = expr_alloc_symbol((yyvsp[(1) - (1)].symbol)); ;} 1676 2016 break; 1677 2017 1678 2018 case 97: 1679 1680 { yyval.expr = expr_alloc_comp(E_EQUAL, yyvsp[-2].symbol, yyvsp[0].symbol); ;}2019 #line 464 "zconf.y" 2020 { (yyval.expr) = expr_alloc_comp(E_EQUAL, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); ;} 1681 2021 break; 1682 2022 1683 2023 case 98: 1684 1685 { yyval.expr = expr_alloc_comp(E_UNEQUAL, yyvsp[-2].symbol, yyvsp[0].symbol); ;}2024 #line 465 "zconf.y" 2025 { (yyval.expr) = expr_alloc_comp(E_UNEQUAL, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); ;} 1686 2026 break; 1687 2027 1688 2028 case 99: 1689 1690 { yyval.expr = yyvsp[-1].expr; ;}2029 #line 466 "zconf.y" 2030 { (yyval.expr) = (yyvsp[(2) - (3)].expr); ;} 1691 2031 break; 1692 2032 1693 2033 case 100: 1694 1695 { yyval.expr = expr_alloc_one(E_NOT, yyvsp[0].expr); ;}2034 #line 467 "zconf.y" 2035 { (yyval.expr) = expr_alloc_one(E_NOT, (yyvsp[(2) - (2)].expr)); ;} 1696 2036 break; 1697 2037 1698 2038 case 101: 1699 1700 { yyval.expr = expr_alloc_two(E_OR, yyvsp[-2].expr, yyvsp[0].expr); ;}2039 #line 468 "zconf.y" 2040 { (yyval.expr) = expr_alloc_two(E_OR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} 1701 2041 break; 1702 2042 1703 2043 case 102: 1704 1705 { yyval.expr = expr_alloc_two(E_AND, yyvsp[-2].expr, yyvsp[0].expr); ;}2044 #line 469 "zconf.y" 2045 { (yyval.expr) = expr_alloc_two(E_AND, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} 1706 2046 break; 1707 2047 1708 2048 case 103: 1709 1710 { yyval.symbol = sym_lookup(yyvsp[0].string, 0); free(yyvsp[0].string); ;}2049 #line 472 "zconf.y" 2050 { (yyval.symbol) = sym_lookup((yyvsp[(1) - (1)].string), 0); free((yyvsp[(1) - (1)].string)); ;} 1711 2051 break; 1712 2052 1713 2053 case 104: 1714 1715 { yyval.symbol = sym_lookup(yyvsp[0].string, 1); free(yyvsp[0].string); ;} 1716 break; 1717 1718 2054 #line 473 "zconf.y" 2055 { (yyval.symbol) = sym_lookup((yyvsp[(1) - (1)].string), 1); free((yyvsp[(1) - (1)].string)); ;} 2056 break; 2057 2058 2059 /* Line 1267 of yacc.c. */ 2060 #line 2058 "zconf.tab.c" 2061 default: break; 1719 2062 } 1720 1721 /* Line 999 of yacc.c. */ 1722 1723 1724 1725 yyvsp -= yylen; 1726 yyssp -= yylen; 1727 1728 2063 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 2064 2065 YYPOPSTACK (yylen); 2066 yylen = 0; 1729 2067 YY_STACK_PRINT (yyss, yyssp); 1730 2068 … … 1755 2093 { 1756 2094 ++yynerrs; 1757 #if YYERROR_VERBOSE 1758 yyn = yypact[yystate]; 1759 1760 if (YYPACT_NINF < yyn && yyn < YYLAST) 2095 #if ! YYERROR_VERBOSE 2096 yyerror (YY_("syntax error")); 2097 #else 2098 { 2099 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); 2100 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) 2101 { 2102 YYSIZE_T yyalloc = 2 * yysize; 2103 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) 2104 yyalloc = YYSTACK_ALLOC_MAXIMUM; 2105 if (yymsg != yymsgbuf) 2106 YYSTACK_FREE (yymsg); 2107 yymsg = (char *) YYSTACK_ALLOC (yyalloc); 2108 if (yymsg) 2109 yymsg_alloc = yyalloc; 2110 else 2111 { 2112 yymsg = yymsgbuf; 2113 yymsg_alloc = sizeof yymsgbuf; 2114 } 2115 } 2116 2117 if (0 < yysize && yysize <= yymsg_alloc) 2118 { 2119 (void) yysyntax_error (yymsg, yystate, yychar); 2120 yyerror (yymsg); 2121 } 2122 else 2123 { 2124 yyerror (YY_("syntax error")); 2125 if (yysize != 0) 2126 goto yyexhaustedlab; 2127 } 2128 } 2129 #endif 2130 } 2131 2132 2133 2134 if (yyerrstatus == 3) 2135 { 2136 /* If just tried and failed to reuse look-ahead token after an 2137 error, discard it. */ 2138 2139 if (yychar <= YYEOF) 1761 2140 { 1762 YYSIZE_T yysize = 0; 1763 int yytype = YYTRANSLATE (yychar); 1764 char *yymsg; 1765 int yyx, yycount; 1766 1767 yycount = 0; 1768 /* Start YYX at -YYN if negative to avoid negative indexes in 1769 YYCHECK. */ 1770 for (yyx = yyn < 0 ? -yyn : 0; 1771 yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) 1772 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 1773 yysize += yystrlen (yytname[yyx]) + 15, yycount++; 1774 yysize += yystrlen ("syntax error, unexpected ") + 1; 1775 yysize += yystrlen (yytname[yytype]); 1776 yymsg = (char *) YYSTACK_ALLOC (yysize); 1777 if (yymsg != 0) 1778 { 1779 char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); 1780 yyp = yystpcpy (yyp, yytname[yytype]); 1781 1782 if (yycount < 5) 1783 { 1784 yycount = 0; 1785 for (yyx = yyn < 0 ? -yyn : 0; 1786 yyx < (int) (sizeof (yytname) / sizeof (char *)); 1787 yyx++) 1788 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 1789 { 1790 const char *yyq = ! yycount ? ", expecting " : " or "; 1791 yyp = yystpcpy (yyp, yyq); 1792 yyp = yystpcpy (yyp, yytname[yyx]); 1793 yycount++; 1794 } 1795 } 1796 yyerror (yymsg); 1797 YYSTACK_FREE (yymsg); 1798 } 1799 else 1800 yyerror ("syntax error; also virtual memory exhausted"); 2141 /* Return failure if at end of input. */ 2142 if (yychar == YYEOF) 2143 YYABORT; 1801 2144 } 1802 2145 else 1803 #endif /* YYERROR_VERBOSE */ 1804 yyerror ("syntax error"); 2146 { 2147 yydestruct ("Error: discarding", 2148 yytoken, &yylval); 2149 yychar = YYEMPTY; 2150 } 1805 2151 } 1806 2152 1807 1808 1809 if (yyerrstatus == 3) 1810 { 1811 /* If just tried and failed to reuse lookahead token after an 1812 error, discard it. */ 1813 1814 /* Return failure if at end of input. */ 1815 if (yychar == YYEOF) 1816 { 1817 /* Pop the error token. */ 1818 YYPOPSTACK; 1819 /* Pop the rest of the stack. */ 1820 while (yyss < yyssp) 1821 { 1822 YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); 1823 yydestruct (yystos[*yyssp], yyvsp); 1824 YYPOPSTACK; 1825 } 1826 YYABORT; 1827 } 1828 1829 YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); 1830 yydestruct (yytoken, &yylval); 1831 yychar = YYEMPTY; 1832 1833 } 1834 1835 /* Else will try to reuse lookahead token after shifting the error 2153 /* Else will try to reuse look-ahead token after shifting the error 1836 2154 token. */ 1837 2155 goto yyerrlab1; 1838 2156 1839 2157 1840 /*----------------------------------------------------. 1841 | yyerrlab1 -- error raised explicitly by an action. | 1842 `----------------------------------------------------*/ 2158 /*---------------------------------------------------. 2159 | yyerrorlab -- error raised explicitly by YYERROR. | 2160 `---------------------------------------------------*/ 2161 yyerrorlab: 2162 2163 /* Pacify compilers like GCC when the user code never invokes 2164 YYERROR and the label yyerrorlab therefore never appears in user 2165 code. */ 2166 if (/*CONSTCOND*/ 0) 2167 goto yyerrorlab; 2168 2169 /* Do not reclaim the symbols of the rule which action triggered 2170 this YYERROR. */ 2171 YYPOPSTACK (yylen); 2172 yylen = 0; 2173 YY_STACK_PRINT (yyss, yyssp); 2174 yystate = *yyssp; 2175 goto yyerrlab1; 2176 2177 2178 /*-------------------------------------------------------------. 2179 | yyerrlab1 -- common code for both syntax error and YYERROR. | 2180 `-------------------------------------------------------------*/ 1843 2181 yyerrlab1: 1844 2182 yyerrstatus = 3; /* Each real token shifted decrements this. */ … … 1862 2200 YYABORT; 1863 2201 1864 YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); 1865 yydestruct ( yystos[yystate], yyvsp);1866 yyvsp--;1867 yystate = *--yyssp;1868 2202 2203 yydestruct ("Error: popping", 2204 yystos[yystate], yyvsp); 2205 YYPOPSTACK (1); 2206 yystate = *yyssp; 1869 2207 YY_STACK_PRINT (yyss, yyssp); 1870 2208 } … … 1873 2211 YYACCEPT; 1874 2212 1875 YYDPRINTF ((stderr, "Shifting error token, "));1876 1877 2213 *++yyvsp = yylval; 1878 2214 2215 2216 /* Shift the error token. */ 2217 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 1879 2218 1880 2219 yystate = yyn; … … 1897 2236 1898 2237 #ifndef yyoverflow 1899 /*---------------------------------------------- .1900 | yy overflowlab -- parser overflowcomes here. |1901 `---------------------------------------------- */1902 yy overflowlab:1903 yyerror ( "parser stack overflow");2238 /*-------------------------------------------------. 2239 | yyexhaustedlab -- memory exhaustion comes here. | 2240 `-------------------------------------------------*/ 2241 yyexhaustedlab: 2242 yyerror (YY_("memory exhausted")); 1904 2243 yyresult = 2; 1905 2244 /* Fall through. */ … … 1907 2246 1908 2247 yyreturn: 2248 if (yychar != YYEOF && yychar != YYEMPTY) 2249 yydestruct ("Cleanup: discarding lookahead", 2250 yytoken, &yylval); 2251 /* Do not reclaim the symbols of the rule which action triggered 2252 this YYABORT or YYACCEPT. */ 2253 YYPOPSTACK (yylen); 2254 YY_STACK_PRINT (yyss, yyssp); 2255 while (yyssp != yyss) 2256 { 2257 yydestruct ("Cleanup: popping", 2258 yystos[*yyssp], yyvsp); 2259 YYPOPSTACK (1); 2260 } 1909 2261 #ifndef yyoverflow 1910 2262 if (yyss != yyssa) 1911 2263 YYSTACK_FREE (yyss); 1912 2264 #endif 1913 return yyresult; 2265 #if YYERROR_VERBOSE 2266 if (yymsg != yymsgbuf) 2267 YYSTACK_FREE (yymsg); 2268 #endif 2269 /* Make sure YYID is used. */ 2270 return YYID (yyresult); 1914 2271 } 1915 2272 1916 2273 1917 2274 #line 476 "zconf.y" 1918 2275 1919 2276 … … 2129 2486 #include "menu.c" 2130 2487 2131 -
package/config/zconf.tab.h_shipped
r4e0f7fd r6753dda 1 /* A Bison parser, made from zconf.y, by GNU bison 1.75. */1 /* A Bison parser, made by GNU Bison 2.3. */ 2 2 3 /* Skeleton parser for Yacc-like parsing with Bison, 4 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc. 3 /* Skeleton interface for Bison's Yacc-like parsers in C 4 5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 6 Free Software Foundation, Inc. 5 7 6 8 This program is free software; you can redistribute it and/or modify … … 16 18 You should have received a copy of the GNU General Public License 17 19 along with this program; if not, write to the Free Software 18 Foundation, Inc., 5 9 Temple Place - Suite 330,19 Boston, MA 0211 1-1307, USA. */20 Foundation, Inc., 51 Franklin Street, Fifth Floor, 21 Boston, MA 02110-1301, USA. */ 20 22 21 /* As a special exception, when this file is copied by Bison into a 22 Bison output file, you may use that output file without restriction. 23 This special exception was added by the Free Software Foundation 24 in version 1.24 of Bison. */ 23 /* As a special exception, you may create a larger work that contains 24 part or all of the Bison parser skeleton and distribute that work 25 under terms of your choice, so long as that work isn't itself a 26 parser generator using the skeleton or a modified version thereof 27 as a parser skeleton. Alternatively, if you modify or redistribute 28 the parser skeleton itself, you may (at your option) remove this 29 special exception, which will cause the skeleton and the resulting 30 Bison output files to be licensed under the GNU General Public 31 License without this special exception. 25 32 26 #ifndef BISON_ZCONF_TAB_H 27 # define BISON_ZCONF_TAB_H 33 This special exception was added by the Free Software Foundation in 34 version 2.2 of Bison. */ 28 35 29 36 /* Tokens. */ … … 41 48 T_COMMENT = 264, 42 49 T_CONFIG = 265, 43 T_ HELP= 266,44 T_HELP TEXT= 267,45 T_ IF= 268,46 T_ ENDIF = 269,47 T_ DEPENDS= 270,48 T_ REQUIRES = 271,49 T_ OPTIONAL= 272,50 T_ PROMPT= 273,51 T_ DEFAULT = 274,52 T_ TRISTATE= 275,53 T_ BOOLEAN= 276,54 T_ INT= 277,55 T_ HEX= 278,56 T_ WORD= 279,50 T_MENUCONFIG = 266, 51 T_HELP = 267, 52 T_HELPTEXT = 268, 53 T_IF = 269, 54 T_ENDIF = 270, 55 T_DEPENDS = 271, 56 T_REQUIRES = 272, 57 T_OPTIONAL = 273, 58 T_PROMPT = 274, 59 T_DEFAULT = 275, 60 T_TRISTATE = 276, 61 T_DEF_TRISTATE = 277, 62 T_BOOLEAN = 278, 63 T_DEF_BOOLEAN = 279, 57 64 T_STRING = 280, 58 T_UNEQUAL = 281, 59 T_EOF = 282, 60 T_EOL = 283, 61 T_CLOSE_PAREN = 284, 62 T_OPEN_PAREN = 285, 63 T_ON = 286, 64 T_OR = 287, 65 T_AND = 288, 66 T_EQUAL = 289, 67 T_NOT = 290 65 T_INT = 281, 66 T_HEX = 282, 67 T_WORD = 283, 68 T_WORD_QUOTE = 284, 69 T_UNEQUAL = 285, 70 T_EOF = 286, 71 T_EOL = 287, 72 T_CLOSE_PAREN = 288, 73 T_OPEN_PAREN = 289, 74 T_ON = 290, 75 T_SELECT = 291, 76 T_RANGE = 292, 77 T_OR = 293, 78 T_AND = 294, 79 T_EQUAL = 295, 80 T_NOT = 296 68 81 }; 69 82 #endif 83 /* Tokens. */ 70 84 #define T_MAINMENU 258 71 85 #define T_MENU 259 … … 76 90 #define T_COMMENT 264 77 91 #define T_CONFIG 265 78 #define T_ HELP26679 #define T_HELP TEXT26780 #define T_ IF26881 #define T_ ENDIF 26982 #define T_ DEPENDS27083 #define T_ REQUIRES 27184 #define T_ OPTIONAL27285 #define T_ PROMPT27386 #define T_ DEFAULT 27487 #define T_ TRISTATE27588 #define T_ BOOLEAN27689 #define T_ INT27790 #define T_ HEX27891 #define T_ WORD27992 #define T_MENUCONFIG 266 93 #define T_HELP 267 94 #define T_HELPTEXT 268 95 #define T_IF 269 96 #define T_ENDIF 270 97 #define T_DEPENDS 271 98 #define T_REQUIRES 272 99 #define T_OPTIONAL 273 100 #define T_PROMPT 274 101 #define T_DEFAULT 275 102 #define T_TRISTATE 276 103 #define T_DEF_TRISTATE 277 104 #define T_BOOLEAN 278 105 #define T_DEF_BOOLEAN 279 92 106 #define T_STRING 280 93 #define T_UNEQUAL 281 94 #define T_EOF 282 95 #define T_EOL 283 96 #define T_CLOSE_PAREN 284 97 #define T_OPEN_PAREN 285 98 #define T_ON 286 99 #define T_OR 287 100 #define T_AND 288 101 #define T_EQUAL 289 102 #define T_NOT 290 107 #define T_INT 281 108 #define T_HEX 282 109 #define T_WORD 283 110 #define T_WORD_QUOTE 284 111 #define T_UNEQUAL 285 112 #define T_EOF 286 113 #define T_EOL 287 114 #define T_CLOSE_PAREN 288 115 #define T_OPEN_PAREN 289 116 #define T_ON 290 117 #define T_SELECT 291 118 #define T_RANGE 292 119 #define T_OR 293 120 #define T_AND 294 121 #define T_EQUAL 295 122 #define T_NOT 296 103 123 104 124 105 125 106 126 107 #ifndef YYSTYPE 127 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 128 typedef union YYSTYPE 108 129 #line 33 "zconf.y" 109 typedef union{130 { 110 131 int token; 111 132 char *string; … … 113 134 struct expr *expr; 114 135 struct menu *menu; 115 } yystype; 116 /* Line 1281 of /usr/share/bison/yacc.c. */ 117 #line 118 "zconf.tab.h" 118 # define YYSTYPE yystype 136 } 137 /* Line 1529 of yacc.c. */ 138 #line 139 "zconf.tab.h" 139 YYSTYPE; 140 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 141 # define YYSTYPE_IS_DECLARED 1 142 # define YYSTYPE_IS_TRIVIAL 1 119 143 #endif 120 144 121 145 extern YYSTYPE zconflval; 122 146 123 124 #endif /* not BISON_ZCONF_TAB_H */125
Note:
See TracChangeset
for help on using the changeset viewer.
