| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #line 2 "scripts/genksyms/lex.c" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 3 | #line 4 "scripts/genksyms/lex.c" | 
|  | 4 |  | 
|  | 5 | #define  YY_INT_ALIGNED short int | 
|  | 6 |  | 
|  | 7 | /* A lexical scanner generated by flex */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 8 |  | 
| Adrian Bunk | 11ddad3 | 2008-07-17 02:08:12 +0300 | [diff] [blame] | 9 | /* %not-for-header */ | 
|  | 10 |  | 
|  | 11 | /* %if-c-only */ | 
|  | 12 | /* %if-not-reentrant */ | 
|  | 13 |  | 
|  | 14 | /* %endif */ | 
|  | 15 | /* %endif */ | 
|  | 16 | /* %ok-for-header */ | 
|  | 17 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | #define FLEX_SCANNER | 
|  | 19 | #define YY_FLEX_MAJOR_VERSION 2 | 
|  | 20 | #define YY_FLEX_MINOR_VERSION 5 | 
| Adrian Bunk | 11ddad3 | 2008-07-17 02:08:12 +0300 | [diff] [blame] | 21 | #define YY_FLEX_SUBMINOR_VERSION 35 | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 22 | #if YY_FLEX_SUBMINOR_VERSION > 0 | 
|  | 23 | #define FLEX_BETA | 
|  | 24 | #endif | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 25 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 26 | /* %if-c++-only */ | 
|  | 27 | /* %endif */ | 
|  | 28 |  | 
|  | 29 | /* %if-c-only */ | 
|  | 30 |  | 
|  | 31 | /* %endif */ | 
|  | 32 |  | 
|  | 33 | /* %if-c-only */ | 
|  | 34 |  | 
|  | 35 | /* %endif */ | 
|  | 36 |  | 
|  | 37 | /* First, we deal with  platform-specific or compiler-specific issues. */ | 
|  | 38 |  | 
|  | 39 | /* begin standard C headers. */ | 
|  | 40 | /* %if-c-only */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 41 | #include <stdio.h> | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 42 | #include <string.h> | 
|  | 43 | #include <errno.h> | 
|  | 44 | #include <stdlib.h> | 
|  | 45 | /* %endif */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 46 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 47 | /* %if-tables-serialization */ | 
|  | 48 | /* %endif */ | 
|  | 49 | /* end standard C headers. */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 50 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 51 | /* %if-c-or-c++ */ | 
|  | 52 | /* flex integer type definitions */ | 
|  | 53 |  | 
|  | 54 | #ifndef FLEXINT_H | 
|  | 55 | #define FLEXINT_H | 
|  | 56 |  | 
|  | 57 | /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ | 
|  | 58 |  | 
| Adrian Bunk | 11ddad3 | 2008-07-17 02:08:12 +0300 | [diff] [blame] | 59 | #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 60 |  | 
|  | 61 | /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, | 
|  | 62 | * if you want the limit (max/min) macros for int types. | 
|  | 63 | */ | 
|  | 64 | #ifndef __STDC_LIMIT_MACROS | 
|  | 65 | #define __STDC_LIMIT_MACROS 1 | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 66 | #endif | 
|  | 67 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 68 | #include <inttypes.h> | 
|  | 69 | typedef int8_t flex_int8_t; | 
|  | 70 | typedef uint8_t flex_uint8_t; | 
|  | 71 | typedef int16_t flex_int16_t; | 
|  | 72 | typedef uint16_t flex_uint16_t; | 
|  | 73 | typedef int32_t flex_int32_t; | 
|  | 74 | typedef uint32_t flex_uint32_t; | 
|  | 75 | #else | 
|  | 76 | typedef signed char flex_int8_t; | 
|  | 77 | typedef short int flex_int16_t; | 
|  | 78 | typedef int flex_int32_t; | 
|  | 79 | typedef unsigned char flex_uint8_t; | 
|  | 80 | typedef unsigned short int flex_uint16_t; | 
|  | 81 | typedef unsigned int flex_uint32_t; | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 82 |  | 
|  | 83 | /* Limits of integral types. */ | 
|  | 84 | #ifndef INT8_MIN | 
|  | 85 | #define INT8_MIN               (-128) | 
|  | 86 | #endif | 
|  | 87 | #ifndef INT16_MIN | 
|  | 88 | #define INT16_MIN              (-32767-1) | 
|  | 89 | #endif | 
|  | 90 | #ifndef INT32_MIN | 
|  | 91 | #define INT32_MIN              (-2147483647-1) | 
|  | 92 | #endif | 
|  | 93 | #ifndef INT8_MAX | 
|  | 94 | #define INT8_MAX               (127) | 
|  | 95 | #endif | 
|  | 96 | #ifndef INT16_MAX | 
|  | 97 | #define INT16_MAX              (32767) | 
|  | 98 | #endif | 
|  | 99 | #ifndef INT32_MAX | 
|  | 100 | #define INT32_MAX              (2147483647) | 
|  | 101 | #endif | 
|  | 102 | #ifndef UINT8_MAX | 
|  | 103 | #define UINT8_MAX              (255U) | 
|  | 104 | #endif | 
|  | 105 | #ifndef UINT16_MAX | 
|  | 106 | #define UINT16_MAX             (65535U) | 
|  | 107 | #endif | 
|  | 108 | #ifndef UINT32_MAX | 
|  | 109 | #define UINT32_MAX             (4294967295U) | 
|  | 110 | #endif | 
|  | 111 |  | 
| Adrian Bunk | 11ddad3 | 2008-07-17 02:08:12 +0300 | [diff] [blame] | 112 | #endif /* ! C99 */ | 
|  | 113 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 114 | #endif /* ! FLEXINT_H */ | 
|  | 115 |  | 
|  | 116 | /* %endif */ | 
|  | 117 |  | 
|  | 118 | /* %if-c++-only */ | 
|  | 119 | /* %endif */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 120 |  | 
|  | 121 | #ifdef __cplusplus | 
|  | 122 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 123 | /* The "const" storage-class-modifier is valid. */ | 
|  | 124 | #define YY_USE_CONST | 
|  | 125 |  | 
|  | 126 | #else	/* ! __cplusplus */ | 
|  | 127 |  | 
| Adrian Bunk | 11ddad3 | 2008-07-17 02:08:12 +0300 | [diff] [blame] | 128 | /* C99 requires __STDC__ to be defined as 1. */ | 
|  | 129 | #if defined (__STDC__) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 130 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 131 | #define YY_USE_CONST | 
|  | 132 |  | 
| Adrian Bunk | 11ddad3 | 2008-07-17 02:08:12 +0300 | [diff] [blame] | 133 | #endif	/* defined (__STDC__) */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 134 | #endif	/* ! __cplusplus */ | 
|  | 135 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 136 | #ifdef YY_USE_CONST | 
|  | 137 | #define yyconst const | 
|  | 138 | #else | 
|  | 139 | #define yyconst | 
|  | 140 | #endif | 
|  | 141 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 142 | /* %not-for-header */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 143 |  | 
|  | 144 | /* Returned upon end-of-file. */ | 
|  | 145 | #define YY_NULL 0 | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 146 | /* %ok-for-header */ | 
|  | 147 |  | 
|  | 148 | /* %not-for-header */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 149 |  | 
|  | 150 | /* Promotes a possibly negative, possibly signed char to an unsigned | 
|  | 151 | * integer for use as an array index.  If the signed char is negative, | 
|  | 152 | * we want to instead treat it as an 8-bit unsigned char, hence the | 
|  | 153 | * double cast. | 
|  | 154 | */ | 
|  | 155 | #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 156 | /* %ok-for-header */ | 
|  | 157 |  | 
|  | 158 | /* %if-reentrant */ | 
|  | 159 | /* %endif */ | 
|  | 160 |  | 
|  | 161 | /* %if-not-reentrant */ | 
|  | 162 |  | 
|  | 163 | /* %endif */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 164 |  | 
|  | 165 | /* Enter a start condition.  This macro really ought to take a parameter, | 
|  | 166 | * but we do it the disgusting crufty way forced on us by the ()-less | 
|  | 167 | * definition of BEGIN. | 
|  | 168 | */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 169 | #define BEGIN (yy_start) = 1 + 2 * | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 170 |  | 
|  | 171 | /* Translate the current start state into a value that can be later handed | 
|  | 172 | * to BEGIN to return to the state.  The YYSTATE alias is for lex | 
|  | 173 | * compatibility. | 
|  | 174 | */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 175 | #define YY_START (((yy_start) - 1) / 2) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 176 | #define YYSTATE YY_START | 
|  | 177 |  | 
|  | 178 | /* Action number for EOF rule of a given start state. */ | 
|  | 179 | #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) | 
|  | 180 |  | 
|  | 181 | /* Special action meaning "start processing a new file". */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 182 | #define YY_NEW_FILE yyrestart(yyin  ) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 183 |  | 
|  | 184 | #define YY_END_OF_BUFFER_CHAR 0 | 
|  | 185 |  | 
|  | 186 | /* Size of default input buffer. */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 187 | #ifndef YY_BUF_SIZE | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 188 | #define YY_BUF_SIZE 16384 | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 189 | #endif | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 190 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 191 | /* The state buf must be large enough to hold one state per character in the main buffer. | 
|  | 192 | */ | 
|  | 193 | #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) | 
|  | 194 |  | 
|  | 195 | #ifndef YY_TYPEDEF_YY_BUFFER_STATE | 
|  | 196 | #define YY_TYPEDEF_YY_BUFFER_STATE | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 197 | typedef struct yy_buffer_state *YY_BUFFER_STATE; | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 198 | #endif | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 199 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 200 | /* %if-not-reentrant */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 201 | extern int yyleng; | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 202 | /* %endif */ | 
|  | 203 |  | 
|  | 204 | /* %if-c-only */ | 
|  | 205 | /* %if-not-reentrant */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 206 | extern FILE *yyin, *yyout; | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 207 | /* %endif */ | 
|  | 208 | /* %endif */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 209 |  | 
|  | 210 | #define EOB_ACT_CONTINUE_SCAN 0 | 
|  | 211 | #define EOB_ACT_END_OF_FILE 1 | 
|  | 212 | #define EOB_ACT_LAST_MATCH 2 | 
|  | 213 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 214 | #define YY_LESS_LINENO(n) | 
|  | 215 |  | 
|  | 216 | /* Return all but the first "n" matched characters back to the input stream. */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 217 | #define yyless(n) \ | 
|  | 218 | do \ | 
|  | 219 | { \ | 
|  | 220 | /* Undo effects of setting up yytext. */ \ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 221 | int yyless_macro_arg = (n); \ | 
|  | 222 | YY_LESS_LINENO(yyless_macro_arg);\ | 
|  | 223 | *yy_cp = (yy_hold_char); \ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 224 | YY_RESTORE_YY_MORE_OFFSET \ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 225 | (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 226 | YY_DO_BEFORE_ACTION; /* set up yytext again */ \ | 
|  | 227 | } \ | 
|  | 228 | while ( 0 ) | 
|  | 229 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 230 | #define unput(c) yyunput( c, (yytext_ptr)  ) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 231 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 232 | #ifndef YY_TYPEDEF_YY_SIZE_T | 
|  | 233 | #define YY_TYPEDEF_YY_SIZE_T | 
| Adrian Bunk | 11ddad3 | 2008-07-17 02:08:12 +0300 | [diff] [blame] | 234 | typedef size_t yy_size_t; | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 235 | #endif | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 236 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 237 | #ifndef YY_STRUCT_YY_BUFFER_STATE | 
|  | 238 | #define YY_STRUCT_YY_BUFFER_STATE | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 239 | struct yy_buffer_state | 
|  | 240 | { | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 241 | /* %if-c-only */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 242 | FILE *yy_input_file; | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 243 | /* %endif */ | 
|  | 244 |  | 
|  | 245 | /* %if-c++-only */ | 
|  | 246 | /* %endif */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 247 |  | 
|  | 248 | char *yy_ch_buf;		/* input buffer */ | 
|  | 249 | char *yy_buf_pos;		/* current position in input buffer */ | 
|  | 250 |  | 
|  | 251 | /* Size of input buffer in bytes, not including room for EOB | 
|  | 252 | * characters. | 
|  | 253 | */ | 
|  | 254 | yy_size_t yy_buf_size; | 
|  | 255 |  | 
|  | 256 | /* Number of characters read into yy_ch_buf, not including EOB | 
|  | 257 | * characters. | 
|  | 258 | */ | 
|  | 259 | int yy_n_chars; | 
|  | 260 |  | 
|  | 261 | /* Whether we "own" the buffer - i.e., we know we created it, | 
|  | 262 | * and can realloc() it to grow it, and should free() it to | 
|  | 263 | * delete it. | 
|  | 264 | */ | 
|  | 265 | int yy_is_our_buffer; | 
|  | 266 |  | 
|  | 267 | /* Whether this is an "interactive" input source; if so, and | 
|  | 268 | * if we're using stdio for input, then we want to use getc() | 
|  | 269 | * instead of fread(), to make sure we stop fetching input after | 
|  | 270 | * each newline. | 
|  | 271 | */ | 
|  | 272 | int yy_is_interactive; | 
|  | 273 |  | 
|  | 274 | /* Whether we're considered to be at the beginning of a line. | 
|  | 275 | * If so, '^' rules will be active on the next match, otherwise | 
|  | 276 | * not. | 
|  | 277 | */ | 
|  | 278 | int yy_at_bol; | 
|  | 279 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 280 | int yy_bs_lineno; /**< The line count. */ | 
|  | 281 | int yy_bs_column; /**< The column count. */ | 
|  | 282 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 283 | /* Whether to try to fill the input buffer when we reach the | 
|  | 284 | * end of it. | 
|  | 285 | */ | 
|  | 286 | int yy_fill_buffer; | 
|  | 287 |  | 
|  | 288 | int yy_buffer_status; | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 289 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 290 | #define YY_BUFFER_NEW 0 | 
|  | 291 | #define YY_BUFFER_NORMAL 1 | 
|  | 292 | /* When an EOF's been seen but there's still some text to process | 
|  | 293 | * then we mark the buffer as YY_EOF_PENDING, to indicate that we | 
|  | 294 | * shouldn't try reading from the input source any more.  We might | 
|  | 295 | * still have a bunch of tokens to match, though, because of | 
|  | 296 | * possible backing-up. | 
|  | 297 | * | 
|  | 298 | * When we actually see the EOF, we change the status to "new" | 
|  | 299 | * (via yyrestart()), so that the user can continue scanning by | 
|  | 300 | * just pointing yyin at a new input file. | 
|  | 301 | */ | 
|  | 302 | #define YY_BUFFER_EOF_PENDING 2 | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 303 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 304 | }; | 
|  | 305 | #endif /* !YY_STRUCT_YY_BUFFER_STATE */ | 
|  | 306 |  | 
|  | 307 | /* %if-c-only Standard (non-C++) definition */ | 
|  | 308 | /* %not-for-header */ | 
|  | 309 |  | 
|  | 310 | /* %if-not-reentrant */ | 
|  | 311 |  | 
|  | 312 | /* Stack of input buffers. */ | 
|  | 313 | static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ | 
|  | 314 | static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ | 
|  | 315 | static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ | 
|  | 316 | /* %endif */ | 
|  | 317 | /* %ok-for-header */ | 
|  | 318 |  | 
|  | 319 | /* %endif */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 320 |  | 
|  | 321 | /* We provide macros for accessing buffer states in case in the | 
|  | 322 | * future we want to put the buffer states in a more general | 
|  | 323 | * "scanner state". | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 324 | * | 
|  | 325 | * Returns the top of the stack, or NULL. | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 326 | */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 327 | #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ | 
|  | 328 | ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ | 
|  | 329 | : NULL) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 330 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 331 | /* Same as previous macro, but useful when we know that the buffer stack is not | 
|  | 332 | * NULL or when we need an lvalue. For internal use only. | 
|  | 333 | */ | 
|  | 334 | #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] | 
|  | 335 |  | 
|  | 336 | /* %if-c-only Standard (non-C++) definition */ | 
|  | 337 |  | 
|  | 338 | /* %if-not-reentrant */ | 
|  | 339 | /* %not-for-header */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 340 |  | 
|  | 341 | /* yy_hold_char holds the character lost when yytext is formed. */ | 
|  | 342 | static char yy_hold_char; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 343 | static int yy_n_chars;		/* number of characters read into yy_ch_buf */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 344 | int yyleng; | 
|  | 345 |  | 
|  | 346 | /* Points to current character in buffer. */ | 
|  | 347 | static char *yy_c_buf_p = (char *) 0; | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 348 | static int yy_init = 0;		/* whether we need to initialize */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 349 | static int yy_start = 0;	/* start state number */ | 
|  | 350 |  | 
|  | 351 | /* Flag which is used to allow yywrap()'s to do buffer switches | 
|  | 352 | * instead of setting up a fresh yyin.  A bit of a hack ... | 
|  | 353 | */ | 
|  | 354 | static int yy_did_buffer_switch_on_eof; | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 355 | /* %ok-for-header */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 356 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 357 | /* %endif */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 358 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 359 | void yyrestart (FILE *input_file  ); | 
|  | 360 | void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  ); | 
|  | 361 | YY_BUFFER_STATE yy_create_buffer (FILE *file,int size  ); | 
|  | 362 | void yy_delete_buffer (YY_BUFFER_STATE b  ); | 
|  | 363 | void yy_flush_buffer (YY_BUFFER_STATE b  ); | 
|  | 364 | void yypush_buffer_state (YY_BUFFER_STATE new_buffer  ); | 
|  | 365 | void yypop_buffer_state (void ); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 366 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 367 | static void yyensure_buffer_stack (void ); | 
|  | 368 | static void yy_load_buffer_state (void ); | 
|  | 369 | static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file  ); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 370 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 371 | #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) | 
|  | 372 |  | 
|  | 373 | YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size  ); | 
|  | 374 | YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str  ); | 
|  | 375 | YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len  ); | 
|  | 376 |  | 
|  | 377 | /* %endif */ | 
|  | 378 |  | 
|  | 379 | void *yyalloc (yy_size_t  ); | 
|  | 380 | void *yyrealloc (void *,yy_size_t  ); | 
|  | 381 | void yyfree (void *  ); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 382 |  | 
|  | 383 | #define yy_new_buffer yy_create_buffer | 
|  | 384 |  | 
|  | 385 | #define yy_set_interactive(is_interactive) \ | 
|  | 386 | { \ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 387 | if ( ! YY_CURRENT_BUFFER ){ \ | 
|  | 388 | yyensure_buffer_stack (); \ | 
|  | 389 | YY_CURRENT_BUFFER_LVALUE =    \ | 
|  | 390 | yy_create_buffer(yyin,YY_BUF_SIZE ); \ | 
|  | 391 | } \ | 
|  | 392 | YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 393 | } | 
|  | 394 |  | 
|  | 395 | #define yy_set_bol(at_bol) \ | 
|  | 396 | { \ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 397 | if ( ! YY_CURRENT_BUFFER ){\ | 
|  | 398 | yyensure_buffer_stack (); \ | 
|  | 399 | YY_CURRENT_BUFFER_LVALUE =    \ | 
|  | 400 | yy_create_buffer(yyin,YY_BUF_SIZE ); \ | 
|  | 401 | } \ | 
|  | 402 | YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 403 | } | 
|  | 404 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 405 | #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 406 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 407 | /* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */ | 
|  | 408 | /* Begin user sect3 */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 409 |  | 
| Adrian Bunk | 11ddad3 | 2008-07-17 02:08:12 +0300 | [diff] [blame] | 410 | #define yywrap(n) 1 | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 411 | #define YY_SKIP_YYWRAP | 
|  | 412 |  | 
|  | 413 | #define FLEX_DEBUG | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 414 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 415 | typedef unsigned char YY_CHAR; | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 416 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 417 | FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 418 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 419 | typedef int yy_state_type; | 
|  | 420 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 421 | extern int yylineno; | 
|  | 422 |  | 
|  | 423 | int yylineno = 1; | 
|  | 424 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 425 | extern char *yytext; | 
|  | 426 | #define yytext_ptr yytext | 
|  | 427 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 428 | /* %if-c-only Standard (non-C++) definition */ | 
|  | 429 |  | 
|  | 430 | static yy_state_type yy_get_previous_state (void ); | 
|  | 431 | static yy_state_type yy_try_NUL_trans (yy_state_type current_state  ); | 
|  | 432 | static int yy_get_next_buffer (void ); | 
|  | 433 | static void yy_fatal_error (yyconst char msg[]  ); | 
|  | 434 |  | 
|  | 435 | /* %endif */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 436 |  | 
|  | 437 | /* Done after the current pattern has been matched and before the | 
|  | 438 | * corresponding action - sets up yytext. | 
|  | 439 | */ | 
|  | 440 | #define YY_DO_BEFORE_ACTION \ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 441 | (yytext_ptr) = yy_bp; \ | 
|  | 442 | /* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\ | 
|  | 443 | yyleng = (size_t) (yy_cp - yy_bp); \ | 
|  | 444 | (yy_hold_char) = *yy_cp; \ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 445 | *yy_cp = '\0'; \ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 446 | /* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\ | 
|  | 447 | (yy_c_buf_p) = yy_cp; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 448 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 449 | /* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 450 | #define YY_NUM_RULES 13 | 
|  | 451 | #define YY_END_OF_BUFFER 14 | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 452 | /* This struct is not used in this scanner, | 
|  | 453 | but its presence is necessary. */ | 
|  | 454 | struct yy_trans_info | 
|  | 455 | { | 
|  | 456 | flex_int32_t yy_verify; | 
|  | 457 | flex_int32_t yy_nxt; | 
|  | 458 | }; | 
|  | 459 | static yyconst flex_int16_t yy_accept[76] = | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 460 | {   0, | 
|  | 461 | 0,    0,    0,    0,   14,   12,    4,    3,   12,    7, | 
|  | 462 | 12,   12,    7,   12,   12,   12,   12,   12,    9,    9, | 
|  | 463 | 12,   12,   12,    4,    0,    5,    0,    7,    0,    6, | 
|  | 464 | 0,    0,    0,    0,    0,    0,    2,    8,   10,   10, | 
|  | 465 | 9,    0,    0,    9,    9,    0,    9,    0,    0,   11, | 
|  | 466 | 0,    0,    0,   10,    0,   10,    9,    9,    0,    0, | 
|  | 467 | 0,    0,    0,    0,    0,   10,   10,    0,    0,    0, | 
|  | 468 | 0,    0,    0,    1,    0 | 
|  | 469 | } ; | 
|  | 470 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 471 | static yyconst flex_int32_t yy_ec[256] = | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 472 | {   0, | 
|  | 473 | 1,    1,    1,    1,    1,    1,    1,    1,    2,    3, | 
|  | 474 | 4,    4,    4,    1,    1,    1,    1,    1,    1,    1, | 
|  | 475 | 1,    1,    1,    1,    1,    1,    1,    1,    1,    1, | 
|  | 476 | 1,    2,    1,    5,    6,    7,    8,    9,   10,    1, | 
|  | 477 | 1,    8,   11,    1,   12,   13,    8,   14,   15,   15, | 
|  | 478 | 15,   15,   15,   15,   15,   16,   16,    1,    1,   17, | 
|  | 479 | 18,   19,    1,    1,   20,   20,   20,   20,   21,   22, | 
|  | 480 | 7,    7,    7,    7,    7,   23,    7,    7,    7,    7, | 
|  | 481 | 7,    7,    7,    7,   24,    7,    7,   25,    7,    7, | 
|  | 482 | 1,   26,    1,    8,    7,    1,   20,   20,   20,   20, | 
|  | 483 |  | 
|  | 484 | 21,   22,    7,    7,    7,    7,    7,   27,    7,    7, | 
|  | 485 | 7,    7,    7,    7,    7,    7,   24,    7,    7,   25, | 
|  | 486 | 7,    7,    1,   28,    1,    8,    1,    1,    1,    1, | 
|  | 487 | 1,    1,    1,    1,    1,    1,    1,    1,    1,    1, | 
|  | 488 | 1,    1,    1,    1,    1,    1,    1,    1,    1,    1, | 
|  | 489 | 1,    1,    1,    1,    1,    1,    1,    1,    1,    1, | 
|  | 490 | 1,    1,    1,    1,    1,    1,    1,    1,    1,    1, | 
|  | 491 | 1,    1,    1,    1,    1,    1,    1,    1,    1,    1, | 
|  | 492 | 1,    1,    1,    1,    1,    1,    1,    1,    1,    1, | 
|  | 493 | 1,    1,    1,    1,    1,    1,    1,    1,    1,    1, | 
|  | 494 |  | 
|  | 495 | 1,    1,    1,    1,    1,    1,    1,    1,    1,    1, | 
|  | 496 | 1,    1,    1,    1,    1,    1,    1,    1,    1,    1, | 
|  | 497 | 1,    1,    1,    1,    1,    1,    1,    1,    1,    1, | 
|  | 498 | 1,    1,    1,    1,    1,    1,    1,    1,    1,    1, | 
|  | 499 | 1,    1,    1,    1,    1,    1,    1,    1,    1,    1, | 
|  | 500 | 1,    1,    1,    1,    1 | 
|  | 501 | } ; | 
|  | 502 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 503 | static yyconst flex_int32_t yy_meta[29] = | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 504 | {   0, | 
|  | 505 | 1,    1,    2,    1,    1,    1,    3,    1,    1,    1, | 
|  | 506 | 4,    4,    5,    6,    6,    6,    1,    1,    1,    7, | 
|  | 507 | 8,    7,    3,    3,    3,    1,    3,    1 | 
|  | 508 | } ; | 
|  | 509 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 510 | static yyconst flex_int16_t yy_base[88] = | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 511 | {   0, | 
|  | 512 | 0,  147,   21,  140,  145,  284,   39,  284,   26,    0, | 
|  | 513 | 32,  126,   40,   44,  115,   35,   36,   46,   50,   53, | 
|  | 514 | 39,   61,   54,   79,   65,  284,    0,    0,   66,  284, | 
|  | 515 | 0,  119,   79,   75,  123,  104,  284,  284,  107,    0, | 
|  | 516 | 79,   73,   76,   76,   66,    0,    0,   85,   86,  284, | 
|  | 517 | 133,   83,   91,  284,   99,  147,  284,  114,  122,   70, | 
|  | 518 | 107,  141,  172,  151,  135,  181,  284,  137,  114,  157, | 
|  | 519 | 149,   48,   45,  284,  284,  208,  214,  222,  230,  238, | 
|  | 520 | 246,  250,  255,  256,  261,  267,  275 | 
|  | 521 | } ; | 
|  | 522 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 523 | static yyconst flex_int16_t yy_def[88] = | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 524 | {   0, | 
|  | 525 | 75,    1,    1,    3,   75,   75,   75,   75,   76,   77, | 
|  | 526 | 78,   75,   77,   79,   75,   75,   75,   75,   75,   19, | 
|  | 527 | 75,   75,   75,   75,   76,   75,   80,   77,   78,   75, | 
|  | 528 | 81,   75,   76,   78,   79,   79,   75,   75,   75,   39, | 
|  | 529 | 19,   82,   83,   75,   75,   84,   20,   76,   78,   75, | 
|  | 530 | 79,   51,   85,   75,   75,   75,   75,   84,   79,   51, | 
|  | 531 | 79,   79,   79,   51,   75,   75,   75,   86,   79,   63, | 
|  | 532 | 86,   87,   87,   75,    0,   75,   75,   75,   75,   75, | 
|  | 533 | 75,   75,   75,   75,   75,   75,   75 | 
|  | 534 | } ; | 
|  | 535 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 536 | static yyconst flex_int16_t yy_nxt[313] = | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 537 | {   0, | 
|  | 538 | 6,    7,    8,    7,    9,    6,   10,    6,    6,   11, | 
|  | 539 | 6,    6,   12,    6,    6,    6,    6,    6,    6,   10, | 
|  | 540 | 10,   10,   13,   10,   10,    6,   10,    6,   15,   16, | 
|  | 541 | 26,   15,   17,   18,   19,   20,   20,   21,   15,   22, | 
|  | 542 | 24,   30,   24,   38,   33,   36,   37,   74,   23,   34, | 
|  | 543 | 74,   27,   38,   38,   38,   38,   38,   31,   32,   39, | 
|  | 544 | 39,   39,   40,   41,   41,   42,   47,   47,   47,   26, | 
|  | 545 | 43,   38,   44,   45,   46,   30,   44,   75,   38,   38, | 
|  | 546 | 24,   38,   24,   26,   30,   40,   55,   55,   57,   26, | 
|  | 547 | 27,   31,   57,   43,   35,   30,   64,   64,   64,   57, | 
|  | 548 |  | 
|  | 549 | 31,   65,   65,   75,   27,   36,   37,   35,   59,   37, | 
|  | 550 | 27,   31,   56,   56,   56,   59,   37,   51,   52,   52, | 
|  | 551 | 39,   39,   39,   59,   37,   37,   68,   53,   54,   54, | 
|  | 552 | 69,   50,   38,   54,   59,   37,   44,   45,   32,   37, | 
|  | 553 | 44,   35,   59,   37,   75,   14,   60,   60,   66,   66, | 
|  | 554 | 66,   37,   14,   72,   75,   61,   62,   63,   59,   61, | 
|  | 555 | 56,   56,   56,   69,   64,   64,   64,   69,   67,   67, | 
|  | 556 | 75,   75,   75,   67,   37,   35,   75,   75,   75,   61, | 
|  | 557 | 62,   75,   75,   61,   75,   70,   70,   70,   75,   75, | 
|  | 558 | 75,   70,   70,   70,   66,   66,   66,   75,   75,   75, | 
|  | 559 |  | 
|  | 560 | 75,   75,   54,   54,   75,   75,   75,   54,   25,   25, | 
|  | 561 | 25,   25,   25,   25,   25,   25,   28,   75,   75,   28, | 
|  | 562 | 28,   28,   29,   29,   29,   29,   29,   29,   29,   29, | 
|  | 563 | 35,   35,   35,   35,   35,   35,   35,   35,   48,   75, | 
|  | 564 | 48,   48,   48,   48,   48,   48,   49,   75,   49,   49, | 
|  | 565 | 49,   49,   49,   49,   42,   42,   75,   42,   56,   75, | 
|  | 566 | 56,   58,   58,   58,   66,   75,   66,   71,   71,   71, | 
|  | 567 | 71,   71,   71,   71,   71,   73,   73,   73,   73,   73, | 
|  | 568 | 73,   73,   73,    5,   75,   75,   75,   75,   75,   75, | 
|  | 569 | 75,   75,   75,   75,   75,   75,   75,   75,   75,   75, | 
|  | 570 |  | 
|  | 571 | 75,   75,   75,   75,   75,   75,   75,   75,   75,   75, | 
|  | 572 | 75,   75 | 
|  | 573 | } ; | 
|  | 574 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 575 | static yyconst flex_int16_t yy_chk[313] = | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 576 | {   0, | 
|  | 577 | 1,    1,    1,    1,    1,    1,    1,    1,    1,    1, | 
|  | 578 | 1,    1,    1,    1,    1,    1,    1,    1,    1,    1, | 
|  | 579 | 1,    1,    1,    1,    1,    1,    1,    1,    3,    3, | 
|  | 580 | 9,    3,    3,    3,    3,    3,    3,    3,    3,    3, | 
|  | 581 | 7,   11,    7,   16,   13,   14,   14,   73,    3,   13, | 
|  | 582 | 72,    9,   16,   17,   17,   21,   21,   11,   18,   18, | 
|  | 583 | 18,   18,   19,   19,   19,   19,   20,   20,   20,   25, | 
|  | 584 | 19,   23,   19,   19,   19,   29,   19,   20,   22,   22, | 
|  | 585 | 24,   23,   24,   33,   34,   42,   43,   43,   45,   48, | 
|  | 586 | 25,   29,   45,   42,   60,   49,   52,   52,   52,   44, | 
|  | 587 |  | 
|  | 588 | 34,   53,   53,   41,   33,   36,   36,   52,   61,   61, | 
|  | 589 | 48,   49,   55,   55,   55,   69,   69,   36,   36,   36, | 
|  | 590 | 39,   39,   39,   59,   59,   35,   59,   39,   39,   39, | 
|  | 591 | 61,   32,   15,   39,   51,   51,   58,   58,   12,   68, | 
|  | 592 | 58,   68,   62,   62,    5,    4,   51,   51,   65,   65, | 
|  | 593 | 65,   71,    2,   71,    0,   51,   51,   51,   70,   51, | 
|  | 594 | 56,   56,   56,   62,   64,   64,   64,   62,   56,   56, | 
|  | 595 | 0,    0,    0,   56,   63,   64,    0,    0,    0,   70, | 
|  | 596 | 70,    0,    0,   70,    0,   63,   63,   63,    0,    0, | 
|  | 597 | 0,   63,   63,   63,   66,   66,   66,    0,    0,    0, | 
|  | 598 |  | 
|  | 599 | 0,    0,   66,   66,    0,    0,    0,   66,   76,   76, | 
|  | 600 | 76,   76,   76,   76,   76,   76,   77,    0,    0,   77, | 
|  | 601 | 77,   77,   78,   78,   78,   78,   78,   78,   78,   78, | 
|  | 602 | 79,   79,   79,   79,   79,   79,   79,   79,   80,    0, | 
|  | 603 | 80,   80,   80,   80,   80,   80,   81,    0,   81,   81, | 
|  | 604 | 81,   81,   81,   81,   82,   82,    0,   82,   83,    0, | 
|  | 605 | 83,   84,   84,   84,   85,    0,   85,   86,   86,   86, | 
|  | 606 | 86,   86,   86,   86,   86,   87,   87,   87,   87,   87, | 
|  | 607 | 87,   87,   87,   75,   75,   75,   75,   75,   75,   75, | 
|  | 608 | 75,   75,   75,   75,   75,   75,   75,   75,   75,   75, | 
|  | 609 |  | 
|  | 610 | 75,   75,   75,   75,   75,   75,   75,   75,   75,   75, | 
|  | 611 | 75,   75 | 
|  | 612 | } ; | 
|  | 613 |  | 
|  | 614 | static yy_state_type yy_last_accepting_state; | 
|  | 615 | static char *yy_last_accepting_cpos; | 
|  | 616 |  | 
|  | 617 | extern int yy_flex_debug; | 
|  | 618 | int yy_flex_debug = 1; | 
|  | 619 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 620 | static yyconst flex_int16_t yy_rule_linenum[13] = | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 621 | {   0, | 
| Adrian Bunk | 11ddad3 | 2008-07-17 02:08:12 +0300 | [diff] [blame] | 622 | 71,   72,   73,   76,   79,   80,   81,   87,   88,   89, | 
|  | 623 | 91,   94 | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 624 | } ; | 
|  | 625 |  | 
|  | 626 | /* The intent behind this definition is that it'll catch | 
|  | 627 | * any uses of REJECT which flex missed. | 
|  | 628 | */ | 
|  | 629 | #define REJECT reject_used_but_not_detected | 
|  | 630 | #define yymore() yymore_used_but_not_detected | 
|  | 631 | #define YY_MORE_ADJ 0 | 
|  | 632 | #define YY_RESTORE_YY_MORE_OFFSET | 
|  | 633 | char *yytext; | 
|  | 634 | #line 1 "scripts/genksyms/lex.l" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 635 | /* Lexical analysis for genksyms. | 
|  | 636 | Copyright 1996, 1997 Linux International. | 
|  | 637 |  | 
|  | 638 | New implementation contributed by Richard Henderson <rth@tamu.edu> | 
|  | 639 | Based on original work by Bjorn Ekwall <bj0rn@blox.se> | 
|  | 640 |  | 
|  | 641 | Taken from Linux modutils 2.4.22. | 
|  | 642 |  | 
|  | 643 | This program is free software; you can redistribute it and/or modify it | 
|  | 644 | under the terms of the GNU General Public License as published by the | 
|  | 645 | Free Software Foundation; either version 2 of the License, or (at your | 
|  | 646 | option) any later version. | 
|  | 647 |  | 
|  | 648 | This program is distributed in the hope that it will be useful, but | 
|  | 649 | WITHOUT ANY WARRANTY; without even the implied warranty of | 
|  | 650 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU | 
|  | 651 | General Public License for more details. | 
|  | 652 |  | 
|  | 653 | You should have received a copy of the GNU General Public License | 
|  | 654 | along with this program; if not, write to the Free Software Foundation, | 
|  | 655 | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */ | 
|  | 656 | #line 25 "scripts/genksyms/lex.l" | 
|  | 657 |  | 
|  | 658 | #include <limits.h> | 
|  | 659 | #include <stdlib.h> | 
|  | 660 | #include <string.h> | 
|  | 661 | #include <ctype.h> | 
|  | 662 |  | 
|  | 663 | #include "genksyms.h" | 
|  | 664 | #include "parse.h" | 
|  | 665 |  | 
|  | 666 | /* We've got a two-level lexer here.  We let flex do basic tokenization | 
|  | 667 | and then we categorize those basic tokens in the second stage.  */ | 
|  | 668 | #define YY_DECL		static int yylex1(void) | 
|  | 669 |  | 
|  | 670 | /* Version 2 checksumming does proper tokenization; version 1 wasn't | 
|  | 671 | quite so pedantic.  */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 672 |  | 
|  | 673 | /* We don't do multiple input files.  */ | 
| Adrian Bunk | 11ddad3 | 2008-07-17 02:08:12 +0300 | [diff] [blame] | 674 | #define YY_NO_INPUT 1 | 
|  | 675 | #line 676 "scripts/genksyms/lex.c" | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 676 |  | 
|  | 677 | #define INITIAL 0 | 
|  | 678 | #define V2_TOKENS 1 | 
|  | 679 |  | 
|  | 680 | #ifndef YY_NO_UNISTD_H | 
|  | 681 | /* Special case for "unistd.h", since it is non-ANSI. We include it way | 
|  | 682 | * down here because we want the user's section 1 to have been scanned first. | 
|  | 683 | * The user has a chance to override it with an option. | 
|  | 684 | */ | 
|  | 685 | /* %if-c-only */ | 
|  | 686 | #include <unistd.h> | 
|  | 687 | /* %endif */ | 
|  | 688 | /* %if-c++-only */ | 
|  | 689 | /* %endif */ | 
|  | 690 | #endif | 
|  | 691 |  | 
|  | 692 | #ifndef YY_EXTRA_TYPE | 
|  | 693 | #define YY_EXTRA_TYPE void * | 
|  | 694 | #endif | 
|  | 695 |  | 
|  | 696 | /* %if-c-only Reentrant structure and macros (non-C++). */ | 
|  | 697 | /* %if-reentrant */ | 
|  | 698 | /* %if-c-only */ | 
|  | 699 |  | 
|  | 700 | static int yy_init_globals (void ); | 
|  | 701 |  | 
|  | 702 | /* %endif */ | 
|  | 703 | /* %if-reentrant */ | 
|  | 704 | /* %endif */ | 
| Adrian Bunk | 11ddad3 | 2008-07-17 02:08:12 +0300 | [diff] [blame] | 705 | /* %endif End reentrant structures and macros. */ | 
|  | 706 |  | 
|  | 707 | /* Accessor methods to globals. | 
|  | 708 | These are made visible to non-reentrant scanners for convenience. */ | 
|  | 709 |  | 
|  | 710 | int yylex_destroy (void ); | 
|  | 711 |  | 
|  | 712 | int yyget_debug (void ); | 
|  | 713 |  | 
|  | 714 | void yyset_debug (int debug_flag  ); | 
|  | 715 |  | 
|  | 716 | YY_EXTRA_TYPE yyget_extra (void ); | 
|  | 717 |  | 
|  | 718 | void yyset_extra (YY_EXTRA_TYPE user_defined  ); | 
|  | 719 |  | 
|  | 720 | FILE *yyget_in (void ); | 
|  | 721 |  | 
|  | 722 | void yyset_in  (FILE * in_str  ); | 
|  | 723 |  | 
|  | 724 | FILE *yyget_out (void ); | 
|  | 725 |  | 
|  | 726 | void yyset_out  (FILE * out_str  ); | 
|  | 727 |  | 
|  | 728 | int yyget_leng (void ); | 
|  | 729 |  | 
|  | 730 | char *yyget_text (void ); | 
|  | 731 |  | 
|  | 732 | int yyget_lineno (void ); | 
|  | 733 |  | 
|  | 734 | void yyset_lineno (int line_number  ); | 
|  | 735 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 736 | /* %if-bison-bridge */ | 
|  | 737 | /* %endif */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 738 |  | 
|  | 739 | /* Macros after this point can all be overridden by user definitions in | 
|  | 740 | * section 1. | 
|  | 741 | */ | 
|  | 742 |  | 
|  | 743 | #ifndef YY_SKIP_YYWRAP | 
|  | 744 | #ifdef __cplusplus | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 745 | extern "C" int yywrap (void ); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 746 | #else | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 747 | extern int yywrap (void ); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 748 | #endif | 
|  | 749 | #endif | 
|  | 750 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 751 | /* %not-for-header */ | 
|  | 752 |  | 
|  | 753 | static void yyunput (int c,char *buf_ptr  ); | 
|  | 754 |  | 
|  | 755 | /* %ok-for-header */ | 
|  | 756 |  | 
|  | 757 | /* %endif */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 758 |  | 
|  | 759 | #ifndef yytext_ptr | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 760 | static void yy_flex_strncpy (char *,yyconst char *,int ); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 761 | #endif | 
|  | 762 |  | 
|  | 763 | #ifdef YY_NEED_STRLEN | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 764 | static int yy_flex_strlen (yyconst char * ); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 765 | #endif | 
|  | 766 |  | 
|  | 767 | #ifndef YY_NO_INPUT | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 768 | /* %if-c-only Standard (non-C++) definition */ | 
|  | 769 | /* %not-for-header */ | 
|  | 770 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 771 | #ifdef __cplusplus | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 772 | static int yyinput (void ); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 773 | #else | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 774 | static int input (void ); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 775 | #endif | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 776 | /* %ok-for-header */ | 
|  | 777 |  | 
|  | 778 | /* %endif */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 779 | #endif | 
|  | 780 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 781 | /* %if-c-only */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 782 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 783 | /* %endif */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 784 |  | 
|  | 785 | /* Amount of stuff to slurp up with each read. */ | 
|  | 786 | #ifndef YY_READ_BUF_SIZE | 
|  | 787 | #define YY_READ_BUF_SIZE 8192 | 
|  | 788 | #endif | 
|  | 789 |  | 
|  | 790 | /* Copy whatever the last rule matched to the standard output. */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 791 | #ifndef ECHO | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 792 | /* %if-c-only Standard (non-C++) definition */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 793 | /* This used to be an fputs(), but since the string might contain NUL's, | 
|  | 794 | * we now use fwrite(). | 
|  | 795 | */ | 
| Adrian Bunk | 11ddad3 | 2008-07-17 02:08:12 +0300 | [diff] [blame] | 796 | #define ECHO fwrite( yytext, yyleng, 1, yyout ) | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 797 | /* %endif */ | 
|  | 798 | /* %if-c++-only C++ definition */ | 
|  | 799 | /* %endif */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 800 | #endif | 
|  | 801 |  | 
|  | 802 | /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL, | 
|  | 803 | * is returned in "result". | 
|  | 804 | */ | 
|  | 805 | #ifndef YY_INPUT | 
|  | 806 | #define YY_INPUT(buf,result,max_size) \ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 807 | /* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\ | 
|  | 808 | if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 809 | { \ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 810 | int c = '*'; \ | 
|  | 811 | size_t n; \ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 812 | for ( n = 0; n < max_size && \ | 
|  | 813 | (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ | 
|  | 814 | buf[n] = (char) c; \ | 
|  | 815 | if ( c == '\n' ) \ | 
|  | 816 | buf[n++] = (char) c; \ | 
|  | 817 | if ( c == EOF && ferror( yyin ) ) \ | 
|  | 818 | YY_FATAL_ERROR( "input in flex scanner failed" ); \ | 
|  | 819 | result = n; \ | 
|  | 820 | } \ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 821 | else \ | 
|  | 822 | { \ | 
|  | 823 | errno=0; \ | 
|  | 824 | while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ | 
|  | 825 | { \ | 
|  | 826 | if( errno != EINTR) \ | 
|  | 827 | { \ | 
|  | 828 | YY_FATAL_ERROR( "input in flex scanner failed" ); \ | 
|  | 829 | break; \ | 
|  | 830 | } \ | 
|  | 831 | errno=0; \ | 
|  | 832 | clearerr(yyin); \ | 
|  | 833 | } \ | 
|  | 834 | }\ | 
|  | 835 | \ | 
|  | 836 | /* %if-c++-only C++ definition \ */\ | 
|  | 837 | /* %endif */ | 
|  | 838 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 839 | #endif | 
|  | 840 |  | 
|  | 841 | /* No semi-colon after return; correct usage is to write "yyterminate();" - | 
|  | 842 | * we don't want an extra ';' after the "return" because that will cause | 
|  | 843 | * some compilers to complain about unreachable statements. | 
|  | 844 | */ | 
|  | 845 | #ifndef yyterminate | 
|  | 846 | #define yyterminate() return YY_NULL | 
|  | 847 | #endif | 
|  | 848 |  | 
|  | 849 | /* Number of entries by which start-condition stack grows. */ | 
|  | 850 | #ifndef YY_START_STACK_INCR | 
|  | 851 | #define YY_START_STACK_INCR 25 | 
|  | 852 | #endif | 
|  | 853 |  | 
|  | 854 | /* Report a fatal error. */ | 
|  | 855 | #ifndef YY_FATAL_ERROR | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 856 | /* %if-c-only */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 857 | #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 858 | /* %endif */ | 
|  | 859 | /* %if-c++-only */ | 
|  | 860 | /* %endif */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 861 | #endif | 
|  | 862 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 863 | /* %if-tables-serialization structures and prototypes */ | 
|  | 864 | /* %not-for-header */ | 
|  | 865 |  | 
|  | 866 | /* %ok-for-header */ | 
|  | 867 |  | 
|  | 868 | /* %not-for-header */ | 
|  | 869 |  | 
|  | 870 | /* %tables-yydmap generated elements */ | 
|  | 871 | /* %endif */ | 
|  | 872 | /* end tables serialization structures and prototypes */ | 
|  | 873 |  | 
|  | 874 | /* %ok-for-header */ | 
|  | 875 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 876 | /* Default declaration of generated scanner - a define so the user can | 
|  | 877 | * easily add parameters. | 
|  | 878 | */ | 
|  | 879 | #ifndef YY_DECL | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 880 | #define YY_DECL_IS_OURS 1 | 
|  | 881 | /* %if-c-only Standard (non-C++) definition */ | 
|  | 882 |  | 
|  | 883 | extern int yylex (void); | 
|  | 884 |  | 
|  | 885 | #define YY_DECL int yylex (void) | 
|  | 886 | /* %endif */ | 
|  | 887 | /* %if-c++-only C++ definition */ | 
|  | 888 | /* %endif */ | 
|  | 889 | #endif /* !YY_DECL */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 890 |  | 
|  | 891 | /* Code executed at the beginning of each rule, after yytext and yyleng | 
|  | 892 | * have been set up. | 
|  | 893 | */ | 
|  | 894 | #ifndef YY_USER_ACTION | 
|  | 895 | #define YY_USER_ACTION | 
|  | 896 | #endif | 
|  | 897 |  | 
|  | 898 | /* Code executed at the end of each rule. */ | 
|  | 899 | #ifndef YY_BREAK | 
|  | 900 | #define YY_BREAK break; | 
|  | 901 | #endif | 
|  | 902 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 903 | /* %% [6.0] YY_RULE_SETUP definition goes here */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 904 | #define YY_RULE_SETUP \ | 
|  | 905 | if ( yyleng > 0 ) \ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 906 | YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 907 | (yytext[yyleng - 1] == '\n'); \ | 
|  | 908 | YY_USER_ACTION | 
|  | 909 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 910 | /* %not-for-header */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 911 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 912 | /** The main scanner function which does all the work. | 
|  | 913 | */ | 
|  | 914 | YY_DECL | 
|  | 915 | { | 
|  | 916 | register yy_state_type yy_current_state; | 
|  | 917 | register char *yy_cp, *yy_bp; | 
|  | 918 | register int yy_act; | 
|  | 919 |  | 
|  | 920 | /* %% [7.0] user's declarations go here */ | 
| Adrian Bunk | 11ddad3 | 2008-07-17 02:08:12 +0300 | [diff] [blame] | 921 | #line 67 "scripts/genksyms/lex.l" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 922 |  | 
|  | 923 |  | 
|  | 924 |  | 
|  | 925 | /* Keep track of our location in the original source files.  */ | 
| Adrian Bunk | 11ddad3 | 2008-07-17 02:08:12 +0300 | [diff] [blame] | 926 | #line 927 "scripts/genksyms/lex.c" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 927 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 928 | if ( !(yy_init) ) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 929 | { | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 930 | (yy_init) = 1; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 931 |  | 
|  | 932 | #ifdef YY_USER_INIT | 
|  | 933 | YY_USER_INIT; | 
|  | 934 | #endif | 
|  | 935 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 936 | if ( ! (yy_start) ) | 
|  | 937 | (yy_start) = 1;	/* first start state */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 938 |  | 
|  | 939 | if ( ! yyin ) | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 940 | /* %if-c-only */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 941 | yyin = stdin; | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 942 | /* %endif */ | 
|  | 943 | /* %if-c++-only */ | 
|  | 944 | /* %endif */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 945 |  | 
|  | 946 | if ( ! yyout ) | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 947 | /* %if-c-only */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 948 | yyout = stdout; | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 949 | /* %endif */ | 
|  | 950 | /* %if-c++-only */ | 
|  | 951 | /* %endif */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 952 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 953 | if ( ! YY_CURRENT_BUFFER ) { | 
|  | 954 | yyensure_buffer_stack (); | 
|  | 955 | YY_CURRENT_BUFFER_LVALUE = | 
|  | 956 | yy_create_buffer(yyin,YY_BUF_SIZE ); | 
|  | 957 | } | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 958 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 959 | yy_load_buffer_state( ); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 960 | } | 
|  | 961 |  | 
|  | 962 | while ( 1 )		/* loops until end-of-file is reached */ | 
|  | 963 | { | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 964 | /* %% [8.0] yymore()-related code goes here */ | 
|  | 965 | yy_cp = (yy_c_buf_p); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 966 |  | 
|  | 967 | /* Support of yytext. */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 968 | *yy_cp = (yy_hold_char); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 969 |  | 
|  | 970 | /* yy_bp points to the position in yy_ch_buf of the start of | 
|  | 971 | * the current run. | 
|  | 972 | */ | 
|  | 973 | yy_bp = yy_cp; | 
|  | 974 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 975 | /* %% [9.0] code to set up and find next match goes here */ | 
|  | 976 | yy_current_state = (yy_start); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 977 | yy_current_state += YY_AT_BOL(); | 
|  | 978 | yy_match: | 
|  | 979 | do | 
|  | 980 | { | 
|  | 981 | register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; | 
|  | 982 | if ( yy_accept[yy_current_state] ) | 
|  | 983 | { | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 984 | (yy_last_accepting_state) = yy_current_state; | 
|  | 985 | (yy_last_accepting_cpos) = yy_cp; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 986 | } | 
|  | 987 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) | 
|  | 988 | { | 
|  | 989 | yy_current_state = (int) yy_def[yy_current_state]; | 
|  | 990 | if ( yy_current_state >= 76 ) | 
|  | 991 | yy_c = yy_meta[(unsigned int) yy_c]; | 
|  | 992 | } | 
|  | 993 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; | 
|  | 994 | ++yy_cp; | 
|  | 995 | } | 
|  | 996 | while ( yy_base[yy_current_state] != 284 ); | 
|  | 997 |  | 
|  | 998 | yy_find_action: | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 999 | /* %% [10.0] code to find the action number goes here */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1000 | yy_act = yy_accept[yy_current_state]; | 
|  | 1001 | if ( yy_act == 0 ) | 
|  | 1002 | { /* have to back up */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1003 | yy_cp = (yy_last_accepting_cpos); | 
|  | 1004 | yy_current_state = (yy_last_accepting_state); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1005 | yy_act = yy_accept[yy_current_state]; | 
|  | 1006 | } | 
|  | 1007 |  | 
|  | 1008 | YY_DO_BEFORE_ACTION; | 
|  | 1009 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1010 | /* %% [11.0] code for yylineno update goes here */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1011 |  | 
|  | 1012 | do_action:	/* This label is used only to access EOF actions. */ | 
|  | 1013 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1014 | /* %% [12.0] debug code goes here */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1015 | if ( yy_flex_debug ) | 
|  | 1016 | { | 
|  | 1017 | if ( yy_act == 0 ) | 
|  | 1018 | fprintf( stderr, "--scanner backing up\n" ); | 
|  | 1019 | else if ( yy_act < 13 ) | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1020 | fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n", | 
|  | 1021 | (long)yy_rule_linenum[yy_act], yytext ); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1022 | else if ( yy_act == 13 ) | 
|  | 1023 | fprintf( stderr, "--accepting default rule (\"%s\")\n", | 
|  | 1024 | yytext ); | 
|  | 1025 | else if ( yy_act == 14 ) | 
|  | 1026 | fprintf( stderr, "--(end of buffer or a NUL)\n" ); | 
|  | 1027 | else | 
|  | 1028 | fprintf( stderr, "--EOF (start condition %d)\n", YY_START ); | 
|  | 1029 | } | 
|  | 1030 |  | 
|  | 1031 | switch ( yy_act ) | 
|  | 1032 | { /* beginning of action switch */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1033 | /* %% [13.0] actions go here */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1034 | case 0: /* must back up */ | 
|  | 1035 | /* undo the effects of YY_DO_BEFORE_ACTION */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1036 | *yy_cp = (yy_hold_char); | 
|  | 1037 | yy_cp = (yy_last_accepting_cpos); | 
|  | 1038 | yy_current_state = (yy_last_accepting_state); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1039 | goto yy_find_action; | 
|  | 1040 |  | 
|  | 1041 | case 1: | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1042 | /* rule 1 can match eol */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1043 | YY_RULE_SETUP | 
| Adrian Bunk | 11ddad3 | 2008-07-17 02:08:12 +0300 | [diff] [blame] | 1044 | #line 71 "scripts/genksyms/lex.l" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1045 | return FILENAME; | 
|  | 1046 | YY_BREAK | 
|  | 1047 | case 2: | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1048 | /* rule 2 can match eol */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1049 | YY_RULE_SETUP | 
| Adrian Bunk | 11ddad3 | 2008-07-17 02:08:12 +0300 | [diff] [blame] | 1050 | #line 72 "scripts/genksyms/lex.l" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1051 | cur_line++; | 
|  | 1052 | YY_BREAK | 
|  | 1053 | case 3: | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1054 | /* rule 3 can match eol */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1055 | YY_RULE_SETUP | 
| Adrian Bunk | 11ddad3 | 2008-07-17 02:08:12 +0300 | [diff] [blame] | 1056 | #line 73 "scripts/genksyms/lex.l" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1057 | cur_line++; | 
|  | 1058 | YY_BREAK | 
|  | 1059 | /* Ignore all other whitespace.  */ | 
|  | 1060 | case 4: | 
|  | 1061 | YY_RULE_SETUP | 
| Adrian Bunk | 11ddad3 | 2008-07-17 02:08:12 +0300 | [diff] [blame] | 1062 | #line 76 "scripts/genksyms/lex.l" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1063 | ; | 
|  | 1064 | YY_BREAK | 
|  | 1065 | case 5: | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1066 | /* rule 5 can match eol */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1067 | YY_RULE_SETUP | 
| Adrian Bunk | 11ddad3 | 2008-07-17 02:08:12 +0300 | [diff] [blame] | 1068 | #line 79 "scripts/genksyms/lex.l" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1069 | return STRING; | 
|  | 1070 | YY_BREAK | 
|  | 1071 | case 6: | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1072 | /* rule 6 can match eol */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1073 | YY_RULE_SETUP | 
| Adrian Bunk | 11ddad3 | 2008-07-17 02:08:12 +0300 | [diff] [blame] | 1074 | #line 80 "scripts/genksyms/lex.l" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1075 | return CHAR; | 
|  | 1076 | YY_BREAK | 
|  | 1077 | case 7: | 
|  | 1078 | YY_RULE_SETUP | 
| Adrian Bunk | 11ddad3 | 2008-07-17 02:08:12 +0300 | [diff] [blame] | 1079 | #line 81 "scripts/genksyms/lex.l" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1080 | return IDENT; | 
|  | 1081 | YY_BREAK | 
|  | 1082 | /* The Pedant requires that the other C multi-character tokens be | 
|  | 1083 | recognized as tokens.  We don't actually use them since we don't | 
|  | 1084 | parse expressions, but we do want whitespace to be arranged | 
|  | 1085 | around them properly.  */ | 
|  | 1086 | case 8: | 
|  | 1087 | YY_RULE_SETUP | 
| Adrian Bunk | 11ddad3 | 2008-07-17 02:08:12 +0300 | [diff] [blame] | 1088 | #line 87 "scripts/genksyms/lex.l" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1089 | return OTHER; | 
|  | 1090 | YY_BREAK | 
|  | 1091 | case 9: | 
|  | 1092 | YY_RULE_SETUP | 
| Adrian Bunk | 11ddad3 | 2008-07-17 02:08:12 +0300 | [diff] [blame] | 1093 | #line 88 "scripts/genksyms/lex.l" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1094 | return INT; | 
|  | 1095 | YY_BREAK | 
|  | 1096 | case 10: | 
|  | 1097 | YY_RULE_SETUP | 
| Adrian Bunk | 11ddad3 | 2008-07-17 02:08:12 +0300 | [diff] [blame] | 1098 | #line 89 "scripts/genksyms/lex.l" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1099 | return REAL; | 
|  | 1100 | YY_BREAK | 
|  | 1101 | case 11: | 
|  | 1102 | YY_RULE_SETUP | 
| Adrian Bunk | 11ddad3 | 2008-07-17 02:08:12 +0300 | [diff] [blame] | 1103 | #line 91 "scripts/genksyms/lex.l" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1104 | return DOTS; | 
|  | 1105 | YY_BREAK | 
|  | 1106 | /* All other tokens are single characters.  */ | 
|  | 1107 | case 12: | 
|  | 1108 | YY_RULE_SETUP | 
| Adrian Bunk | 11ddad3 | 2008-07-17 02:08:12 +0300 | [diff] [blame] | 1109 | #line 94 "scripts/genksyms/lex.l" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1110 | return yytext[0]; | 
|  | 1111 | YY_BREAK | 
|  | 1112 | case 13: | 
|  | 1113 | YY_RULE_SETUP | 
| Adrian Bunk | 11ddad3 | 2008-07-17 02:08:12 +0300 | [diff] [blame] | 1114 | #line 97 "scripts/genksyms/lex.l" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1115 | ECHO; | 
|  | 1116 | YY_BREAK | 
| Adrian Bunk | 11ddad3 | 2008-07-17 02:08:12 +0300 | [diff] [blame] | 1117 | #line 1118 "scripts/genksyms/lex.c" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1118 | case YY_STATE_EOF(INITIAL): | 
|  | 1119 | case YY_STATE_EOF(V2_TOKENS): | 
|  | 1120 | yyterminate(); | 
|  | 1121 |  | 
|  | 1122 | case YY_END_OF_BUFFER: | 
|  | 1123 | { | 
|  | 1124 | /* Amount of text matched not including the EOB char. */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1125 | int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1126 |  | 
|  | 1127 | /* Undo the effects of YY_DO_BEFORE_ACTION. */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1128 | *yy_cp = (yy_hold_char); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1129 | YY_RESTORE_YY_MORE_OFFSET | 
|  | 1130 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1131 | if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1132 | { | 
|  | 1133 | /* We're scanning a new file or input source.  It's | 
|  | 1134 | * possible that this happened because the user | 
|  | 1135 | * just pointed yyin at a new source and called | 
|  | 1136 | * yylex().  If so, then we have to assure | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1137 | * consistency between YY_CURRENT_BUFFER and our | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1138 | * globals.  Here is the right place to do so, because | 
|  | 1139 | * this is the first action (other than possibly a | 
|  | 1140 | * back-up) that will match for the new input source. | 
|  | 1141 | */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1142 | (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; | 
|  | 1143 | YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; | 
|  | 1144 | YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1145 | } | 
|  | 1146 |  | 
|  | 1147 | /* Note that here we test for yy_c_buf_p "<=" to the position | 
|  | 1148 | * of the first EOB in the buffer, since yy_c_buf_p will | 
|  | 1149 | * already have been incremented past the NUL character | 
|  | 1150 | * (since all states make transitions on EOB to the | 
|  | 1151 | * end-of-buffer state).  Contrast this with the test | 
|  | 1152 | * in input(). | 
|  | 1153 | */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1154 | if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1155 | { /* This was really a NUL. */ | 
|  | 1156 | yy_state_type yy_next_state; | 
|  | 1157 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1158 | (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1159 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1160 | yy_current_state = yy_get_previous_state(  ); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1161 |  | 
|  | 1162 | /* Okay, we're now positioned to make the NUL | 
|  | 1163 | * transition.  We couldn't have | 
|  | 1164 | * yy_get_previous_state() go ahead and do it | 
|  | 1165 | * for us because it doesn't know how to deal | 
|  | 1166 | * with the possibility of jamming (and we don't | 
|  | 1167 | * want to build jamming into it because then it | 
|  | 1168 | * will run more slowly). | 
|  | 1169 | */ | 
|  | 1170 |  | 
|  | 1171 | yy_next_state = yy_try_NUL_trans( yy_current_state ); | 
|  | 1172 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1173 | yy_bp = (yytext_ptr) + YY_MORE_ADJ; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1174 |  | 
|  | 1175 | if ( yy_next_state ) | 
|  | 1176 | { | 
|  | 1177 | /* Consume the NUL. */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1178 | yy_cp = ++(yy_c_buf_p); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1179 | yy_current_state = yy_next_state; | 
|  | 1180 | goto yy_match; | 
|  | 1181 | } | 
|  | 1182 |  | 
|  | 1183 | else | 
|  | 1184 | { | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1185 | /* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */ | 
|  | 1186 | yy_cp = (yy_c_buf_p); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1187 | goto yy_find_action; | 
|  | 1188 | } | 
|  | 1189 | } | 
|  | 1190 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1191 | else switch ( yy_get_next_buffer(  ) ) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1192 | { | 
|  | 1193 | case EOB_ACT_END_OF_FILE: | 
|  | 1194 | { | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1195 | (yy_did_buffer_switch_on_eof) = 0; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1196 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1197 | if ( yywrap( ) ) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1198 | { | 
|  | 1199 | /* Note: because we've taken care in | 
|  | 1200 | * yy_get_next_buffer() to have set up | 
|  | 1201 | * yytext, we can now set up | 
|  | 1202 | * yy_c_buf_p so that if some total | 
|  | 1203 | * hoser (like flex itself) wants to | 
|  | 1204 | * call the scanner after we return the | 
|  | 1205 | * YY_NULL, it'll still work - another | 
|  | 1206 | * YY_NULL will get returned. | 
|  | 1207 | */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1208 | (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1209 |  | 
|  | 1210 | yy_act = YY_STATE_EOF(YY_START); | 
|  | 1211 | goto do_action; | 
|  | 1212 | } | 
|  | 1213 |  | 
|  | 1214 | else | 
|  | 1215 | { | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1216 | if ( ! (yy_did_buffer_switch_on_eof) ) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1217 | YY_NEW_FILE; | 
|  | 1218 | } | 
|  | 1219 | break; | 
|  | 1220 | } | 
|  | 1221 |  | 
|  | 1222 | case EOB_ACT_CONTINUE_SCAN: | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1223 | (yy_c_buf_p) = | 
|  | 1224 | (yytext_ptr) + yy_amount_of_matched_text; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1225 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1226 | yy_current_state = yy_get_previous_state(  ); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1227 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1228 | yy_cp = (yy_c_buf_p); | 
|  | 1229 | yy_bp = (yytext_ptr) + YY_MORE_ADJ; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1230 | goto yy_match; | 
|  | 1231 |  | 
|  | 1232 | case EOB_ACT_LAST_MATCH: | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1233 | (yy_c_buf_p) = | 
|  | 1234 | &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1235 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1236 | yy_current_state = yy_get_previous_state(  ); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1237 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1238 | yy_cp = (yy_c_buf_p); | 
|  | 1239 | yy_bp = (yytext_ptr) + YY_MORE_ADJ; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1240 | goto yy_find_action; | 
|  | 1241 | } | 
|  | 1242 | break; | 
|  | 1243 | } | 
|  | 1244 |  | 
|  | 1245 | default: | 
|  | 1246 | YY_FATAL_ERROR( | 
|  | 1247 | "fatal flex scanner internal error--no action found" ); | 
|  | 1248 | } /* end of action switch */ | 
|  | 1249 | } /* end of scanning one token */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1250 | } /* end of yylex */ | 
|  | 1251 | /* %ok-for-header */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1252 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1253 | /* %if-c++-only */ | 
|  | 1254 | /* %not-for-header */ | 
|  | 1255 |  | 
|  | 1256 | /* %ok-for-header */ | 
|  | 1257 |  | 
|  | 1258 | /* %endif */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1259 |  | 
|  | 1260 | /* yy_get_next_buffer - try to read in a new buffer | 
|  | 1261 | * | 
|  | 1262 | * Returns a code representing an action: | 
|  | 1263 | *	EOB_ACT_LAST_MATCH - | 
|  | 1264 | *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position | 
|  | 1265 | *	EOB_ACT_END_OF_FILE - end of file | 
|  | 1266 | */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1267 | /* %if-c-only */ | 
|  | 1268 | static int yy_get_next_buffer (void) | 
|  | 1269 | /* %endif */ | 
|  | 1270 | /* %if-c++-only */ | 
|  | 1271 | /* %endif */ | 
|  | 1272 | { | 
|  | 1273 | register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; | 
|  | 1274 | register char *source = (yytext_ptr); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1275 | register int number_to_move, i; | 
|  | 1276 | int ret_val; | 
|  | 1277 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1278 | if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1279 | YY_FATAL_ERROR( | 
|  | 1280 | "fatal flex scanner internal error--end of buffer missed" ); | 
|  | 1281 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1282 | if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1283 | { /* Don't try to fill the buffer, so this is an EOF. */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1284 | if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1285 | { | 
|  | 1286 | /* We matched a single character, the EOB, so | 
|  | 1287 | * treat this as a final EOF. | 
|  | 1288 | */ | 
|  | 1289 | return EOB_ACT_END_OF_FILE; | 
|  | 1290 | } | 
|  | 1291 |  | 
|  | 1292 | else | 
|  | 1293 | { | 
|  | 1294 | /* We matched some text prior to the EOB, first | 
|  | 1295 | * process it. | 
|  | 1296 | */ | 
|  | 1297 | return EOB_ACT_LAST_MATCH; | 
|  | 1298 | } | 
|  | 1299 | } | 
|  | 1300 |  | 
|  | 1301 | /* Try to read more data. */ | 
|  | 1302 |  | 
|  | 1303 | /* First move last chars to start of buffer. */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1304 | number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1305 |  | 
|  | 1306 | for ( i = 0; i < number_to_move; ++i ) | 
|  | 1307 | *(dest++) = *(source++); | 
|  | 1308 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1309 | if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1310 | /* don't do the read, it's not guaranteed to return an EOF, | 
|  | 1311 | * just force an EOF | 
|  | 1312 | */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1313 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1314 |  | 
|  | 1315 | else | 
|  | 1316 | { | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1317 | int num_to_read = | 
|  | 1318 | YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1319 |  | 
|  | 1320 | while ( num_to_read <= 0 ) | 
|  | 1321 | { /* Not enough room in the buffer - grow it. */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1322 |  | 
|  | 1323 | /* just a shorter name for the current buffer */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1324 | YY_BUFFER_STATE b = YY_CURRENT_BUFFER; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1325 |  | 
|  | 1326 | int yy_c_buf_p_offset = | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1327 | (int) ((yy_c_buf_p) - b->yy_ch_buf); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1328 |  | 
|  | 1329 | if ( b->yy_is_our_buffer ) | 
|  | 1330 | { | 
|  | 1331 | int new_size = b->yy_buf_size * 2; | 
|  | 1332 |  | 
|  | 1333 | if ( new_size <= 0 ) | 
|  | 1334 | b->yy_buf_size += b->yy_buf_size / 8; | 
|  | 1335 | else | 
|  | 1336 | b->yy_buf_size *= 2; | 
|  | 1337 |  | 
|  | 1338 | b->yy_ch_buf = (char *) | 
|  | 1339 | /* Include room in for 2 EOB chars. */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1340 | yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  ); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1341 | } | 
|  | 1342 | else | 
|  | 1343 | /* Can't grow it, we don't own it. */ | 
|  | 1344 | b->yy_ch_buf = 0; | 
|  | 1345 |  | 
|  | 1346 | if ( ! b->yy_ch_buf ) | 
|  | 1347 | YY_FATAL_ERROR( | 
|  | 1348 | "fatal error - scanner input buffer overflow" ); | 
|  | 1349 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1350 | (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1351 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1352 | num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1353 | number_to_move - 1; | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1354 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1355 | } | 
|  | 1356 |  | 
|  | 1357 | if ( num_to_read > YY_READ_BUF_SIZE ) | 
|  | 1358 | num_to_read = YY_READ_BUF_SIZE; | 
|  | 1359 |  | 
|  | 1360 | /* Read in more data. */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1361 | YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), | 
|  | 1362 | (yy_n_chars), (size_t) num_to_read ); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1363 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1364 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1365 | } | 
|  | 1366 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1367 | if ( (yy_n_chars) == 0 ) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1368 | { | 
|  | 1369 | if ( number_to_move == YY_MORE_ADJ ) | 
|  | 1370 | { | 
|  | 1371 | ret_val = EOB_ACT_END_OF_FILE; | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1372 | yyrestart(yyin  ); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1373 | } | 
|  | 1374 |  | 
|  | 1375 | else | 
|  | 1376 | { | 
|  | 1377 | ret_val = EOB_ACT_LAST_MATCH; | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1378 | YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1379 | YY_BUFFER_EOF_PENDING; | 
|  | 1380 | } | 
|  | 1381 | } | 
|  | 1382 |  | 
|  | 1383 | else | 
|  | 1384 | ret_val = EOB_ACT_CONTINUE_SCAN; | 
|  | 1385 |  | 
| Adrian Bunk | 11ddad3 | 2008-07-17 02:08:12 +0300 | [diff] [blame] | 1386 | if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { | 
|  | 1387 | /* Extend the array by 50%, plus the number we really need. */ | 
|  | 1388 | yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); | 
|  | 1389 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  ); | 
|  | 1390 | if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) | 
|  | 1391 | YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); | 
|  | 1392 | } | 
|  | 1393 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1394 | (yy_n_chars) += number_to_move; | 
|  | 1395 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; | 
|  | 1396 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1397 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1398 | (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1399 |  | 
|  | 1400 | return ret_val; | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1401 | } | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1402 |  | 
|  | 1403 | /* yy_get_previous_state - get the state just before the EOB char was reached */ | 
|  | 1404 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1405 | /* %if-c-only */ | 
|  | 1406 | /* %not-for-header */ | 
|  | 1407 |  | 
|  | 1408 | static yy_state_type yy_get_previous_state (void) | 
|  | 1409 | /* %endif */ | 
|  | 1410 | /* %if-c++-only */ | 
|  | 1411 | /* %endif */ | 
|  | 1412 | { | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1413 | register yy_state_type yy_current_state; | 
|  | 1414 | register char *yy_cp; | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1415 |  | 
|  | 1416 | /* %% [15.0] code to get the start state into yy_current_state goes here */ | 
|  | 1417 | yy_current_state = (yy_start); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1418 | yy_current_state += YY_AT_BOL(); | 
|  | 1419 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1420 | for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1421 | { | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1422 | /* %% [16.0] code to find the next state goes here */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1423 | register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); | 
|  | 1424 | if ( yy_accept[yy_current_state] ) | 
|  | 1425 | { | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1426 | (yy_last_accepting_state) = yy_current_state; | 
|  | 1427 | (yy_last_accepting_cpos) = yy_cp; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1428 | } | 
|  | 1429 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) | 
|  | 1430 | { | 
|  | 1431 | yy_current_state = (int) yy_def[yy_current_state]; | 
|  | 1432 | if ( yy_current_state >= 76 ) | 
|  | 1433 | yy_c = yy_meta[(unsigned int) yy_c]; | 
|  | 1434 | } | 
|  | 1435 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; | 
|  | 1436 | } | 
|  | 1437 |  | 
|  | 1438 | return yy_current_state; | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1439 | } | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1440 |  | 
|  | 1441 | /* yy_try_NUL_trans - try to make a transition on the NUL character | 
|  | 1442 | * | 
|  | 1443 | * synopsis | 
|  | 1444 | *	next_state = yy_try_NUL_trans( current_state ); | 
|  | 1445 | */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1446 | /* %if-c-only */ | 
|  | 1447 | static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state ) | 
|  | 1448 | /* %endif */ | 
|  | 1449 | /* %if-c++-only */ | 
|  | 1450 | /* %endif */ | 
|  | 1451 | { | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1452 | register int yy_is_jam; | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1453 | /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */ | 
|  | 1454 | register char *yy_cp = (yy_c_buf_p); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1455 |  | 
|  | 1456 | register YY_CHAR yy_c = 1; | 
|  | 1457 | if ( yy_accept[yy_current_state] ) | 
|  | 1458 | { | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1459 | (yy_last_accepting_state) = yy_current_state; | 
|  | 1460 | (yy_last_accepting_cpos) = yy_cp; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1461 | } | 
|  | 1462 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) | 
|  | 1463 | { | 
|  | 1464 | yy_current_state = (int) yy_def[yy_current_state]; | 
|  | 1465 | if ( yy_current_state >= 76 ) | 
|  | 1466 | yy_c = yy_meta[(unsigned int) yy_c]; | 
|  | 1467 | } | 
|  | 1468 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; | 
|  | 1469 | yy_is_jam = (yy_current_state == 75); | 
|  | 1470 |  | 
|  | 1471 | return yy_is_jam ? 0 : yy_current_state; | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1472 | } | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1473 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1474 | /* %if-c-only */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1475 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1476 | static void yyunput (int c, register char * yy_bp ) | 
|  | 1477 | /* %endif */ | 
|  | 1478 | /* %if-c++-only */ | 
|  | 1479 | /* %endif */ | 
|  | 1480 | { | 
|  | 1481 | register char *yy_cp; | 
|  | 1482 |  | 
|  | 1483 | yy_cp = (yy_c_buf_p); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1484 |  | 
|  | 1485 | /* undo effects of setting up yytext */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1486 | *yy_cp = (yy_hold_char); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1487 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1488 | if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1489 | { /* need to shift things up to make room */ | 
|  | 1490 | /* +2 for EOB chars. */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1491 | register int number_to_move = (yy_n_chars) + 2; | 
|  | 1492 | register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ | 
|  | 1493 | YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1494 | register char *source = | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1495 | &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1496 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1497 | while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1498 | *--dest = *--source; | 
|  | 1499 |  | 
|  | 1500 | yy_cp += (int) (dest - source); | 
|  | 1501 | yy_bp += (int) (dest - source); | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1502 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = | 
|  | 1503 | (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1504 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1505 | if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1506 | YY_FATAL_ERROR( "flex scanner push-back overflow" ); | 
|  | 1507 | } | 
|  | 1508 |  | 
|  | 1509 | *--yy_cp = (char) c; | 
|  | 1510 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1511 | /* %% [18.0] update yylineno here */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1512 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1513 | (yytext_ptr) = yy_bp; | 
|  | 1514 | (yy_hold_char) = *yy_cp; | 
|  | 1515 | (yy_c_buf_p) = yy_cp; | 
|  | 1516 | } | 
|  | 1517 | /* %if-c-only */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1518 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1519 | /* %endif */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1520 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1521 | /* %if-c-only */ | 
|  | 1522 | #ifndef YY_NO_INPUT | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1523 | #ifdef __cplusplus | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1524 | static int yyinput (void) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1525 | #else | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1526 | static int input  (void) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1527 | #endif | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1528 |  | 
|  | 1529 | /* %endif */ | 
|  | 1530 | /* %if-c++-only */ | 
|  | 1531 | /* %endif */ | 
|  | 1532 | { | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1533 | int c; | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1534 |  | 
|  | 1535 | *(yy_c_buf_p) = (yy_hold_char); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1536 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1537 | if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1538 | { | 
|  | 1539 | /* yy_c_buf_p now points to the character we want to return. | 
|  | 1540 | * If this occurs *before* the EOB characters, then it's a | 
|  | 1541 | * valid NUL; if not, then we've hit the end of the buffer. | 
|  | 1542 | */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1543 | if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1544 | /* This was really a NUL. */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1545 | *(yy_c_buf_p) = '\0'; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1546 |  | 
|  | 1547 | else | 
|  | 1548 | { /* need more input */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1549 | int offset = (yy_c_buf_p) - (yytext_ptr); | 
|  | 1550 | ++(yy_c_buf_p); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1551 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1552 | switch ( yy_get_next_buffer(  ) ) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1553 | { | 
|  | 1554 | case EOB_ACT_LAST_MATCH: | 
|  | 1555 | /* This happens because yy_g_n_b() | 
|  | 1556 | * sees that we've accumulated a | 
|  | 1557 | * token and flags that we need to | 
|  | 1558 | * try matching the token before | 
|  | 1559 | * proceeding.  But for input(), | 
|  | 1560 | * there's no matching to consider. | 
|  | 1561 | * So convert the EOB_ACT_LAST_MATCH | 
|  | 1562 | * to EOB_ACT_END_OF_FILE. | 
|  | 1563 | */ | 
|  | 1564 |  | 
|  | 1565 | /* Reset buffer status. */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1566 | yyrestart(yyin ); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1567 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1568 | /*FALLTHROUGH*/ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1569 |  | 
|  | 1570 | case EOB_ACT_END_OF_FILE: | 
|  | 1571 | { | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1572 | if ( yywrap( ) ) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1573 | return EOF; | 
|  | 1574 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1575 | if ( ! (yy_did_buffer_switch_on_eof) ) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1576 | YY_NEW_FILE; | 
|  | 1577 | #ifdef __cplusplus | 
|  | 1578 | return yyinput(); | 
|  | 1579 | #else | 
|  | 1580 | return input(); | 
|  | 1581 | #endif | 
|  | 1582 | } | 
|  | 1583 |  | 
|  | 1584 | case EOB_ACT_CONTINUE_SCAN: | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1585 | (yy_c_buf_p) = (yytext_ptr) + offset; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1586 | break; | 
|  | 1587 | } | 
|  | 1588 | } | 
|  | 1589 | } | 
|  | 1590 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1591 | c = *(unsigned char *) (yy_c_buf_p);	/* cast for 8-bit char's */ | 
|  | 1592 | *(yy_c_buf_p) = '\0';	/* preserve yytext */ | 
|  | 1593 | (yy_hold_char) = *++(yy_c_buf_p); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1594 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1595 | /* %% [19.0] update BOL and yylineno */ | 
|  | 1596 | YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1597 |  | 
|  | 1598 | return c; | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1599 | } | 
|  | 1600 | /* %if-c-only */ | 
|  | 1601 | #endif	/* ifndef YY_NO_INPUT */ | 
|  | 1602 | /* %endif */ | 
|  | 1603 |  | 
|  | 1604 | /** Immediately switch to a different input stream. | 
|  | 1605 | * @param input_file A readable stream. | 
|  | 1606 | * | 
|  | 1607 | * @note This function does not reset the start condition to @c INITIAL . | 
|  | 1608 | */ | 
|  | 1609 | /* %if-c-only */ | 
|  | 1610 | void yyrestart  (FILE * input_file ) | 
|  | 1611 | /* %endif */ | 
|  | 1612 | /* %if-c++-only */ | 
|  | 1613 | /* %endif */ | 
|  | 1614 | { | 
|  | 1615 |  | 
|  | 1616 | if ( ! YY_CURRENT_BUFFER ){ | 
|  | 1617 | yyensure_buffer_stack (); | 
|  | 1618 | YY_CURRENT_BUFFER_LVALUE = | 
|  | 1619 | yy_create_buffer(yyin,YY_BUF_SIZE ); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1620 | } | 
|  | 1621 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1622 | yy_init_buffer(YY_CURRENT_BUFFER,input_file ); | 
|  | 1623 | yy_load_buffer_state( ); | 
|  | 1624 | } | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1625 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1626 | /** Switch to a different input buffer. | 
|  | 1627 | * @param new_buffer The new input buffer. | 
|  | 1628 | * | 
|  | 1629 | */ | 
|  | 1630 | /* %if-c-only */ | 
|  | 1631 | void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer ) | 
|  | 1632 | /* %endif */ | 
|  | 1633 | /* %if-c++-only */ | 
|  | 1634 | /* %endif */ | 
|  | 1635 | { | 
|  | 1636 |  | 
|  | 1637 | /* TODO. We should be able to replace this entire function body | 
|  | 1638 | * with | 
|  | 1639 | *		yypop_buffer_state(); | 
|  | 1640 | *		yypush_buffer_state(new_buffer); | 
|  | 1641 | */ | 
|  | 1642 | yyensure_buffer_stack (); | 
|  | 1643 | if ( YY_CURRENT_BUFFER == new_buffer ) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1644 | return; | 
|  | 1645 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1646 | if ( YY_CURRENT_BUFFER ) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1647 | { | 
|  | 1648 | /* Flush out information for old buffer. */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1649 | *(yy_c_buf_p) = (yy_hold_char); | 
|  | 1650 | YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); | 
|  | 1651 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1652 | } | 
|  | 1653 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1654 | YY_CURRENT_BUFFER_LVALUE = new_buffer; | 
|  | 1655 | yy_load_buffer_state( ); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1656 |  | 
|  | 1657 | /* We don't actually know whether we did this switch during | 
|  | 1658 | * EOF (yywrap()) processing, but the only time this flag | 
|  | 1659 | * is looked at is after yywrap() is called, so it's safe | 
|  | 1660 | * to go ahead and always set it. | 
|  | 1661 | */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1662 | (yy_did_buffer_switch_on_eof) = 1; | 
|  | 1663 | } | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1664 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1665 | /* %if-c-only */ | 
|  | 1666 | static void yy_load_buffer_state  (void) | 
|  | 1667 | /* %endif */ | 
|  | 1668 | /* %if-c++-only */ | 
|  | 1669 | /* %endif */ | 
|  | 1670 | { | 
|  | 1671 | (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; | 
|  | 1672 | (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; | 
|  | 1673 | yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; | 
|  | 1674 | (yy_hold_char) = *(yy_c_buf_p); | 
|  | 1675 | } | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1676 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1677 | /** Allocate and initialize an input buffer state. | 
|  | 1678 | * @param file A readable stream. | 
|  | 1679 | * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. | 
|  | 1680 | * | 
|  | 1681 | * @return the allocated buffer state. | 
|  | 1682 | */ | 
|  | 1683 | /* %if-c-only */ | 
|  | 1684 | YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size ) | 
|  | 1685 | /* %endif */ | 
|  | 1686 | /* %if-c++-only */ | 
|  | 1687 | /* %endif */ | 
|  | 1688 | { | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1689 | YY_BUFFER_STATE b; | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1690 |  | 
|  | 1691 | b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  ); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1692 | if ( ! b ) | 
|  | 1693 | YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); | 
|  | 1694 |  | 
|  | 1695 | b->yy_buf_size = size; | 
|  | 1696 |  | 
|  | 1697 | /* yy_ch_buf has to be 2 characters longer than the size given because | 
|  | 1698 | * we need to put in 2 end-of-buffer characters. | 
|  | 1699 | */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1700 | b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2  ); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1701 | if ( ! b->yy_ch_buf ) | 
|  | 1702 | YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); | 
|  | 1703 |  | 
|  | 1704 | b->yy_is_our_buffer = 1; | 
|  | 1705 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1706 | yy_init_buffer(b,file ); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1707 |  | 
|  | 1708 | return b; | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1709 | } | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1710 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1711 | /** Destroy the buffer. | 
|  | 1712 | * @param b a buffer created with yy_create_buffer() | 
|  | 1713 | * | 
|  | 1714 | */ | 
|  | 1715 | /* %if-c-only */ | 
|  | 1716 | void yy_delete_buffer (YY_BUFFER_STATE  b ) | 
|  | 1717 | /* %endif */ | 
|  | 1718 | /* %if-c++-only */ | 
|  | 1719 | /* %endif */ | 
|  | 1720 | { | 
|  | 1721 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1722 | if ( ! b ) | 
|  | 1723 | return; | 
|  | 1724 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1725 | if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ | 
|  | 1726 | YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1727 |  | 
|  | 1728 | if ( b->yy_is_our_buffer ) | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1729 | yyfree((void *) b->yy_ch_buf  ); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1730 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1731 | yyfree((void *) b  ); | 
|  | 1732 | } | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1733 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1734 | /* %if-c-only */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1735 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1736 | #ifndef __cplusplus | 
|  | 1737 | extern int isatty (int ); | 
|  | 1738 | #endif /* __cplusplus */ | 
|  | 1739 |  | 
|  | 1740 | /* %endif */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1741 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1742 | /* %if-c++-only */ | 
|  | 1743 | /* %endif */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1744 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1745 | /* Initializes or reinitializes a buffer. | 
|  | 1746 | * This function is sometimes called more than once on the same buffer, | 
|  | 1747 | * such as during a yyrestart() or at EOF. | 
|  | 1748 | */ | 
|  | 1749 | /* %if-c-only */ | 
|  | 1750 | static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file ) | 
|  | 1751 | /* %endif */ | 
|  | 1752 | /* %if-c++-only */ | 
|  | 1753 | /* %endif */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1754 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1755 | { | 
|  | 1756 | int oerrno = errno; | 
|  | 1757 |  | 
|  | 1758 | yy_flush_buffer(b ); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1759 |  | 
|  | 1760 | b->yy_input_file = file; | 
|  | 1761 | b->yy_fill_buffer = 1; | 
|  | 1762 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1763 | /* If b is the current buffer, then yy_init_buffer was _probably_ | 
|  | 1764 | * called from yyrestart() or through yy_get_next_buffer. | 
|  | 1765 | * In that case, we don't want to reset the lineno or column. | 
|  | 1766 | */ | 
|  | 1767 | if (b != YY_CURRENT_BUFFER){ | 
|  | 1768 | b->yy_bs_lineno = 1; | 
|  | 1769 | b->yy_bs_column = 0; | 
|  | 1770 | } | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1771 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1772 | /* %if-c-only */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1773 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1774 | b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; | 
|  | 1775 |  | 
|  | 1776 | /* %endif */ | 
|  | 1777 | /* %if-c++-only */ | 
|  | 1778 | /* %endif */ | 
|  | 1779 | errno = oerrno; | 
|  | 1780 | } | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1781 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1782 | /** Discard all buffered characters. On the next scan, YY_INPUT will be called. | 
|  | 1783 | * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. | 
|  | 1784 | * | 
|  | 1785 | */ | 
|  | 1786 | /* %if-c-only */ | 
|  | 1787 | void yy_flush_buffer (YY_BUFFER_STATE  b ) | 
|  | 1788 | /* %endif */ | 
|  | 1789 | /* %if-c++-only */ | 
|  | 1790 | /* %endif */ | 
|  | 1791 | { | 
|  | 1792 | if ( ! b ) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1793 | return; | 
|  | 1794 |  | 
|  | 1795 | b->yy_n_chars = 0; | 
|  | 1796 |  | 
|  | 1797 | /* We always need two end-of-buffer characters.  The first causes | 
|  | 1798 | * a transition to the end-of-buffer state.  The second causes | 
|  | 1799 | * a jam in that state. | 
|  | 1800 | */ | 
|  | 1801 | b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; | 
|  | 1802 | b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; | 
|  | 1803 |  | 
|  | 1804 | b->yy_buf_pos = &b->yy_ch_buf[0]; | 
|  | 1805 |  | 
|  | 1806 | b->yy_at_bol = 1; | 
|  | 1807 | b->yy_buffer_status = YY_BUFFER_NEW; | 
|  | 1808 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1809 | if ( b == YY_CURRENT_BUFFER ) | 
|  | 1810 | yy_load_buffer_state( ); | 
|  | 1811 | } | 
|  | 1812 |  | 
|  | 1813 | /* %if-c-or-c++ */ | 
|  | 1814 | /** Pushes the new state onto the stack. The new state becomes | 
|  | 1815 | *  the current state. This function will allocate the stack | 
|  | 1816 | *  if necessary. | 
|  | 1817 | *  @param new_buffer The new state. | 
|  | 1818 | * | 
|  | 1819 | */ | 
|  | 1820 | /* %if-c-only */ | 
|  | 1821 | void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) | 
|  | 1822 | /* %endif */ | 
|  | 1823 | /* %if-c++-only */ | 
|  | 1824 | /* %endif */ | 
|  | 1825 | { | 
|  | 1826 | if (new_buffer == NULL) | 
|  | 1827 | return; | 
|  | 1828 |  | 
|  | 1829 | yyensure_buffer_stack(); | 
|  | 1830 |  | 
|  | 1831 | /* This block is copied from yy_switch_to_buffer. */ | 
|  | 1832 | if ( YY_CURRENT_BUFFER ) | 
|  | 1833 | { | 
|  | 1834 | /* Flush out information for old buffer. */ | 
|  | 1835 | *(yy_c_buf_p) = (yy_hold_char); | 
|  | 1836 | YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); | 
|  | 1837 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); | 
|  | 1838 | } | 
|  | 1839 |  | 
|  | 1840 | /* Only push if top exists. Otherwise, replace top. */ | 
|  | 1841 | if (YY_CURRENT_BUFFER) | 
|  | 1842 | (yy_buffer_stack_top)++; | 
|  | 1843 | YY_CURRENT_BUFFER_LVALUE = new_buffer; | 
|  | 1844 |  | 
|  | 1845 | /* copied from yy_switch_to_buffer. */ | 
|  | 1846 | yy_load_buffer_state( ); | 
|  | 1847 | (yy_did_buffer_switch_on_eof) = 1; | 
|  | 1848 | } | 
|  | 1849 | /* %endif */ | 
|  | 1850 |  | 
|  | 1851 | /* %if-c-or-c++ */ | 
|  | 1852 | /** Removes and deletes the top of the stack, if present. | 
|  | 1853 | *  The next element becomes the new top. | 
|  | 1854 | * | 
|  | 1855 | */ | 
|  | 1856 | /* %if-c-only */ | 
|  | 1857 | void yypop_buffer_state (void) | 
|  | 1858 | /* %endif */ | 
|  | 1859 | /* %if-c++-only */ | 
|  | 1860 | /* %endif */ | 
|  | 1861 | { | 
|  | 1862 | if (!YY_CURRENT_BUFFER) | 
|  | 1863 | return; | 
|  | 1864 |  | 
|  | 1865 | yy_delete_buffer(YY_CURRENT_BUFFER ); | 
|  | 1866 | YY_CURRENT_BUFFER_LVALUE = NULL; | 
|  | 1867 | if ((yy_buffer_stack_top) > 0) | 
|  | 1868 | --(yy_buffer_stack_top); | 
|  | 1869 |  | 
|  | 1870 | if (YY_CURRENT_BUFFER) { | 
|  | 1871 | yy_load_buffer_state( ); | 
|  | 1872 | (yy_did_buffer_switch_on_eof) = 1; | 
|  | 1873 | } | 
|  | 1874 | } | 
|  | 1875 | /* %endif */ | 
|  | 1876 |  | 
|  | 1877 | /* %if-c-or-c++ */ | 
|  | 1878 | /* Allocates the stack if it does not exist. | 
|  | 1879 | *  Guarantees space for at least one push. | 
|  | 1880 | */ | 
|  | 1881 | /* %if-c-only */ | 
|  | 1882 | static void yyensure_buffer_stack (void) | 
|  | 1883 | /* %endif */ | 
|  | 1884 | /* %if-c++-only */ | 
|  | 1885 | /* %endif */ | 
|  | 1886 | { | 
|  | 1887 | int num_to_alloc; | 
|  | 1888 |  | 
|  | 1889 | if (!(yy_buffer_stack)) { | 
|  | 1890 |  | 
|  | 1891 | /* First allocation is just for 2 elements, since we don't know if this | 
|  | 1892 | * scanner will even need a stack. We use 2 instead of 1 to avoid an | 
|  | 1893 | * immediate realloc on the next call. | 
|  | 1894 | */ | 
|  | 1895 | num_to_alloc = 1; | 
|  | 1896 | (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc | 
|  | 1897 | (num_to_alloc * sizeof(struct yy_buffer_state*) | 
|  | 1898 | ); | 
| Adrian Bunk | 11ddad3 | 2008-07-17 02:08:12 +0300 | [diff] [blame] | 1899 | if ( ! (yy_buffer_stack) ) | 
|  | 1900 | YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); | 
|  | 1901 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1902 | memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); | 
|  | 1903 |  | 
|  | 1904 | (yy_buffer_stack_max) = num_to_alloc; | 
|  | 1905 | (yy_buffer_stack_top) = 0; | 
|  | 1906 | return; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1907 | } | 
|  | 1908 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1909 | if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1910 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1911 | /* Increase the buffer to prepare for a possible push. */ | 
|  | 1912 | int grow_size = 8 /* arbitrary grow size */; | 
|  | 1913 |  | 
|  | 1914 | num_to_alloc = (yy_buffer_stack_max) + grow_size; | 
|  | 1915 | (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc | 
|  | 1916 | ((yy_buffer_stack), | 
|  | 1917 | num_to_alloc * sizeof(struct yy_buffer_state*) | 
|  | 1918 | ); | 
| Adrian Bunk | 11ddad3 | 2008-07-17 02:08:12 +0300 | [diff] [blame] | 1919 | if ( ! (yy_buffer_stack) ) | 
|  | 1920 | YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1921 |  | 
|  | 1922 | /* zero only the new slots.*/ | 
|  | 1923 | memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); | 
|  | 1924 | (yy_buffer_stack_max) = num_to_alloc; | 
|  | 1925 | } | 
|  | 1926 | } | 
|  | 1927 | /* %endif */ | 
|  | 1928 |  | 
|  | 1929 | /* %if-c-only */ | 
|  | 1930 | /** Setup the input buffer state to scan directly from a user-specified character buffer. | 
|  | 1931 | * @param base the character buffer | 
|  | 1932 | * @param size the size in bytes of the character buffer | 
|  | 1933 | * | 
|  | 1934 | * @return the newly allocated buffer state object. | 
|  | 1935 | */ | 
|  | 1936 | YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size ) | 
|  | 1937 | { | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1938 | YY_BUFFER_STATE b; | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1939 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1940 | if ( size < 2 || | 
|  | 1941 | base[size-2] != YY_END_OF_BUFFER_CHAR || | 
|  | 1942 | base[size-1] != YY_END_OF_BUFFER_CHAR ) | 
|  | 1943 | /* They forgot to leave room for the EOB's. */ | 
|  | 1944 | return 0; | 
|  | 1945 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1946 | b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  ); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1947 | if ( ! b ) | 
|  | 1948 | YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); | 
|  | 1949 |  | 
|  | 1950 | b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */ | 
|  | 1951 | b->yy_buf_pos = b->yy_ch_buf = base; | 
|  | 1952 | b->yy_is_our_buffer = 0; | 
|  | 1953 | b->yy_input_file = 0; | 
|  | 1954 | b->yy_n_chars = b->yy_buf_size; | 
|  | 1955 | b->yy_is_interactive = 0; | 
|  | 1956 | b->yy_at_bol = 1; | 
|  | 1957 | b->yy_fill_buffer = 0; | 
|  | 1958 | b->yy_buffer_status = YY_BUFFER_NEW; | 
|  | 1959 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1960 | yy_switch_to_buffer(b  ); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1961 |  | 
|  | 1962 | return b; | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1963 | } | 
|  | 1964 | /* %endif */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1965 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1966 | /* %if-c-only */ | 
|  | 1967 | /** Setup the input buffer state to scan a string. The next call to yylex() will | 
|  | 1968 | * scan from a @e copy of @a str. | 
|  | 1969 | * @param yystr a NUL-terminated string to scan | 
|  | 1970 | * | 
|  | 1971 | * @return the newly allocated buffer state object. | 
|  | 1972 | * @note If you want to scan bytes that may contain NUL values, then use | 
|  | 1973 | *       yy_scan_bytes() instead. | 
|  | 1974 | */ | 
|  | 1975 | YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) | 
|  | 1976 | { | 
|  | 1977 |  | 
|  | 1978 | return yy_scan_bytes(yystr,strlen(yystr) ); | 
|  | 1979 | } | 
|  | 1980 | /* %endif */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1981 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1982 | /* %if-c-only */ | 
|  | 1983 | /** Setup the input buffer state to scan the given bytes. The next call to yylex() will | 
|  | 1984 | * scan from a @e copy of @a bytes. | 
|  | 1985 | * @param bytes the byte buffer to scan | 
|  | 1986 | * @param len the number of bytes in the buffer pointed to by @a bytes. | 
|  | 1987 | * | 
|  | 1988 | * @return the newly allocated buffer state object. | 
|  | 1989 | */ | 
|  | 1990 | YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len ) | 
|  | 1991 | { | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1992 | YY_BUFFER_STATE b; | 
|  | 1993 | char *buf; | 
|  | 1994 | yy_size_t n; | 
|  | 1995 | int i; | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1996 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1997 | /* Get memory for full buffer, including space for trailing EOB's. */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 1998 | n = _yybytes_len + 2; | 
|  | 1999 | buf = (char *) yyalloc(n  ); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2000 | if ( ! buf ) | 
|  | 2001 | YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); | 
|  | 2002 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2003 | for ( i = 0; i < _yybytes_len; ++i ) | 
|  | 2004 | buf[i] = yybytes[i]; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2005 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2006 | buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2007 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2008 | b = yy_scan_buffer(buf,n ); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2009 | if ( ! b ) | 
|  | 2010 | YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); | 
|  | 2011 |  | 
|  | 2012 | /* It's okay to grow etc. this buffer, and we should throw it | 
|  | 2013 | * away when we're done. | 
|  | 2014 | */ | 
|  | 2015 | b->yy_is_our_buffer = 1; | 
|  | 2016 |  | 
|  | 2017 | return b; | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2018 | } | 
|  | 2019 | /* %endif */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2020 |  | 
|  | 2021 | #ifndef YY_EXIT_FAILURE | 
|  | 2022 | #define YY_EXIT_FAILURE 2 | 
|  | 2023 | #endif | 
|  | 2024 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2025 | /* %if-c-only */ | 
|  | 2026 | static void yy_fatal_error (yyconst char* msg ) | 
|  | 2027 | { | 
|  | 2028 | (void) fprintf( stderr, "%s\n", msg ); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2029 | exit( YY_EXIT_FAILURE ); | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2030 | } | 
|  | 2031 | /* %endif */ | 
|  | 2032 | /* %if-c++-only */ | 
|  | 2033 | /* %endif */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2034 |  | 
|  | 2035 | /* Redefine yyless() so it works in section 3 code. */ | 
|  | 2036 |  | 
|  | 2037 | #undef yyless | 
|  | 2038 | #define yyless(n) \ | 
|  | 2039 | do \ | 
|  | 2040 | { \ | 
|  | 2041 | /* Undo effects of setting up yytext. */ \ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2042 | int yyless_macro_arg = (n); \ | 
|  | 2043 | YY_LESS_LINENO(yyless_macro_arg);\ | 
|  | 2044 | yytext[yyleng] = (yy_hold_char); \ | 
|  | 2045 | (yy_c_buf_p) = yytext + yyless_macro_arg; \ | 
|  | 2046 | (yy_hold_char) = *(yy_c_buf_p); \ | 
|  | 2047 | *(yy_c_buf_p) = '\0'; \ | 
|  | 2048 | yyleng = yyless_macro_arg; \ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2049 | } \ | 
|  | 2050 | while ( 0 ) | 
|  | 2051 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2052 | /* Accessor  methods (get/set functions) to struct members. */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2053 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2054 | /* %if-c-only */ | 
|  | 2055 | /* %if-reentrant */ | 
|  | 2056 | /* %endif */ | 
|  | 2057 |  | 
|  | 2058 | /** Get the current line number. | 
|  | 2059 | * | 
|  | 2060 | */ | 
|  | 2061 | int yyget_lineno  (void) | 
|  | 2062 | { | 
|  | 2063 |  | 
|  | 2064 | return yylineno; | 
|  | 2065 | } | 
|  | 2066 |  | 
|  | 2067 | /** Get the input stream. | 
|  | 2068 | * | 
|  | 2069 | */ | 
|  | 2070 | FILE *yyget_in  (void) | 
|  | 2071 | { | 
|  | 2072 | return yyin; | 
|  | 2073 | } | 
|  | 2074 |  | 
|  | 2075 | /** Get the output stream. | 
|  | 2076 | * | 
|  | 2077 | */ | 
|  | 2078 | FILE *yyget_out  (void) | 
|  | 2079 | { | 
|  | 2080 | return yyout; | 
|  | 2081 | } | 
|  | 2082 |  | 
|  | 2083 | /** Get the length of the current token. | 
|  | 2084 | * | 
|  | 2085 | */ | 
|  | 2086 | int yyget_leng  (void) | 
|  | 2087 | { | 
|  | 2088 | return yyleng; | 
|  | 2089 | } | 
|  | 2090 |  | 
|  | 2091 | /** Get the current token. | 
|  | 2092 | * | 
|  | 2093 | */ | 
|  | 2094 |  | 
|  | 2095 | char *yyget_text  (void) | 
|  | 2096 | { | 
|  | 2097 | return yytext; | 
|  | 2098 | } | 
|  | 2099 |  | 
|  | 2100 | /* %if-reentrant */ | 
|  | 2101 | /* %endif */ | 
|  | 2102 |  | 
|  | 2103 | /** Set the current line number. | 
|  | 2104 | * @param line_number | 
|  | 2105 | * | 
|  | 2106 | */ | 
|  | 2107 | void yyset_lineno (int  line_number ) | 
|  | 2108 | { | 
|  | 2109 |  | 
|  | 2110 | yylineno = line_number; | 
|  | 2111 | } | 
|  | 2112 |  | 
|  | 2113 | /** Set the input stream. This does not discard the current | 
|  | 2114 | * input buffer. | 
|  | 2115 | * @param in_str A readable stream. | 
|  | 2116 | * | 
|  | 2117 | * @see yy_switch_to_buffer | 
|  | 2118 | */ | 
|  | 2119 | void yyset_in (FILE *  in_str ) | 
|  | 2120 | { | 
|  | 2121 | yyin = in_str ; | 
|  | 2122 | } | 
|  | 2123 |  | 
|  | 2124 | void yyset_out (FILE *  out_str ) | 
|  | 2125 | { | 
|  | 2126 | yyout = out_str ; | 
|  | 2127 | } | 
|  | 2128 |  | 
|  | 2129 | int yyget_debug  (void) | 
|  | 2130 | { | 
|  | 2131 | return yy_flex_debug; | 
|  | 2132 | } | 
|  | 2133 |  | 
|  | 2134 | void yyset_debug (int  bdebug ) | 
|  | 2135 | { | 
|  | 2136 | yy_flex_debug = bdebug ; | 
|  | 2137 | } | 
|  | 2138 |  | 
|  | 2139 | /* %endif */ | 
|  | 2140 |  | 
|  | 2141 | /* %if-reentrant */ | 
|  | 2142 | /* %if-bison-bridge */ | 
|  | 2143 | /* %endif */ | 
| Adrian Bunk | 11ddad3 | 2008-07-17 02:08:12 +0300 | [diff] [blame] | 2144 | /* %endif if-c-only */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2145 |  | 
|  | 2146 | /* %if-c-only */ | 
|  | 2147 | static int yy_init_globals (void) | 
|  | 2148 | { | 
|  | 2149 | /* Initialization is the same as for the non-reentrant scanner. | 
|  | 2150 | * This function is called from yylex_destroy(), so don't allocate here. | 
|  | 2151 | */ | 
|  | 2152 |  | 
|  | 2153 | (yy_buffer_stack) = 0; | 
|  | 2154 | (yy_buffer_stack_top) = 0; | 
|  | 2155 | (yy_buffer_stack_max) = 0; | 
|  | 2156 | (yy_c_buf_p) = (char *) 0; | 
|  | 2157 | (yy_init) = 0; | 
|  | 2158 | (yy_start) = 0; | 
|  | 2159 |  | 
|  | 2160 | /* Defined in main.c */ | 
|  | 2161 | #ifdef YY_STDINIT | 
|  | 2162 | yyin = stdin; | 
|  | 2163 | yyout = stdout; | 
|  | 2164 | #else | 
|  | 2165 | yyin = (FILE *) 0; | 
|  | 2166 | yyout = (FILE *) 0; | 
|  | 2167 | #endif | 
|  | 2168 |  | 
|  | 2169 | /* For future reference: Set errno on error, since we are called by | 
|  | 2170 | * yylex_init() | 
|  | 2171 | */ | 
|  | 2172 | return 0; | 
|  | 2173 | } | 
|  | 2174 | /* %endif */ | 
|  | 2175 |  | 
| Adrian Bunk | 11ddad3 | 2008-07-17 02:08:12 +0300 | [diff] [blame] | 2176 | /* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */ | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2177 | /* yylex_destroy is for both reentrant and non-reentrant scanners. */ | 
|  | 2178 | int yylex_destroy  (void) | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2179 | { | 
|  | 2180 |  | 
|  | 2181 | /* Pop the buffer stack, destroying each element. */ | 
|  | 2182 | while(YY_CURRENT_BUFFER){ | 
|  | 2183 | yy_delete_buffer(YY_CURRENT_BUFFER  ); | 
|  | 2184 | YY_CURRENT_BUFFER_LVALUE = NULL; | 
|  | 2185 | yypop_buffer_state(); | 
|  | 2186 | } | 
|  | 2187 |  | 
|  | 2188 | /* Destroy the stack itself. */ | 
|  | 2189 | yyfree((yy_buffer_stack) ); | 
|  | 2190 | (yy_buffer_stack) = NULL; | 
|  | 2191 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2192 | /* Reset the globals. This is important in a non-reentrant scanner so the next time | 
|  | 2193 | * yylex() is called, initialization will occur. */ | 
|  | 2194 | yy_init_globals( ); | 
|  | 2195 |  | 
|  | 2196 | /* %if-reentrant */ | 
|  | 2197 | /* %endif */ | 
|  | 2198 | return 0; | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2199 | } | 
|  | 2200 | /* %endif */ | 
|  | 2201 |  | 
|  | 2202 | /* | 
|  | 2203 | * Internal utility routines. | 
|  | 2204 | */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2205 |  | 
|  | 2206 | #ifndef yytext_ptr | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2207 | static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) | 
|  | 2208 | { | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2209 | register int i; | 
|  | 2210 | for ( i = 0; i < n; ++i ) | 
|  | 2211 | s1[i] = s2[i]; | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2212 | } | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2213 | #endif | 
|  | 2214 |  | 
|  | 2215 | #ifdef YY_NEED_STRLEN | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2216 | static int yy_flex_strlen (yyconst char * s ) | 
|  | 2217 | { | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2218 | register int n; | 
|  | 2219 | for ( n = 0; s[n]; ++n ) | 
|  | 2220 | ; | 
|  | 2221 |  | 
|  | 2222 | return n; | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2223 | } | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2224 | #endif | 
|  | 2225 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2226 | void *yyalloc (yy_size_t  size ) | 
|  | 2227 | { | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2228 | return (void *) malloc( size ); | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2229 | } | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2230 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2231 | void *yyrealloc  (void * ptr, yy_size_t  size ) | 
|  | 2232 | { | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2233 | /* The cast to (char *) in the following accommodates both | 
|  | 2234 | * implementations that use char* generic pointers, and those | 
|  | 2235 | * that use void* generic pointers.  It works with the latter | 
|  | 2236 | * because both ANSI C and C++ allow castless assignment from | 
|  | 2237 | * any pointer type to void*, and deal with argument conversions | 
|  | 2238 | * as though doing an assignment. | 
|  | 2239 | */ | 
|  | 2240 | return (void *) realloc( (char *) ptr, size ); | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2241 | } | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2242 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2243 | void yyfree (void * ptr ) | 
|  | 2244 | { | 
|  | 2245 | free( (char *) ptr );	/* see yyrealloc() for (char *) cast */ | 
|  | 2246 | } | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2247 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2248 | /* %if-tables-serialization definitions */ | 
|  | 2249 | /* %define-yytables   The name for this specific scanner's tables. */ | 
|  | 2250 | #define YYTABLES_NAME "yytables" | 
|  | 2251 | /* %endif */ | 
|  | 2252 |  | 
|  | 2253 | /* %ok-for-header */ | 
|  | 2254 |  | 
| Adrian Bunk | 11ddad3 | 2008-07-17 02:08:12 +0300 | [diff] [blame] | 2255 | #line 97 "scripts/genksyms/lex.l" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2256 |  | 
|  | 2257 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2258 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2259 | /* Bring in the keyword recognizer.  */ | 
|  | 2260 |  | 
|  | 2261 | #include "keywords.c" | 
|  | 2262 |  | 
|  | 2263 |  | 
|  | 2264 | /* Macros to append to our phrase collection list.  */ | 
|  | 2265 |  | 
|  | 2266 | #define _APP(T,L)	do {						   \ | 
|  | 2267 | cur_node = next_node;				   \ | 
|  | 2268 | next_node = xmalloc(sizeof(*next_node));	   \ | 
|  | 2269 | next_node->next = cur_node;			   \ | 
|  | 2270 | cur_node->string = memcpy(xmalloc(L+1), T, L+1); \ | 
|  | 2271 | cur_node->tag = SYM_NORMAL;			   \ | 
|  | 2272 | } while (0) | 
|  | 2273 |  | 
|  | 2274 | #define APP		_APP(yytext, yyleng) | 
|  | 2275 |  | 
|  | 2276 |  | 
|  | 2277 | /* The second stage lexer.  Here we incorporate knowledge of the state | 
|  | 2278 | of the parser to tailor the tokens that are returned.  */ | 
|  | 2279 |  | 
|  | 2280 | int | 
|  | 2281 | yylex(void) | 
|  | 2282 | { | 
|  | 2283 | static enum { | 
|  | 2284 | ST_NOTSTARTED, ST_NORMAL, ST_ATTRIBUTE, ST_ASM, ST_BRACKET, ST_BRACE, | 
|  | 2285 | ST_EXPRESSION, ST_TABLE_1, ST_TABLE_2, ST_TABLE_3, ST_TABLE_4, | 
|  | 2286 | ST_TABLE_5, ST_TABLE_6 | 
|  | 2287 | } lexstate = ST_NOTSTARTED; | 
|  | 2288 |  | 
|  | 2289 | static int suppress_type_lookup, dont_want_brace_phrase; | 
|  | 2290 | static struct string_list *next_node; | 
|  | 2291 |  | 
|  | 2292 | int token, count = 0; | 
|  | 2293 | struct string_list *cur_node; | 
|  | 2294 |  | 
|  | 2295 | if (lexstate == ST_NOTSTARTED) | 
|  | 2296 | { | 
|  | 2297 | BEGIN(V2_TOKENS); | 
|  | 2298 | next_node = xmalloc(sizeof(*next_node)); | 
|  | 2299 | next_node->next = NULL; | 
|  | 2300 | lexstate = ST_NORMAL; | 
|  | 2301 | } | 
|  | 2302 |  | 
|  | 2303 | repeat: | 
|  | 2304 | token = yylex1(); | 
|  | 2305 |  | 
|  | 2306 | if (token == 0) | 
|  | 2307 | return 0; | 
|  | 2308 | else if (token == FILENAME) | 
|  | 2309 | { | 
|  | 2310 | char *file, *e; | 
|  | 2311 |  | 
|  | 2312 | /* Save the filename and line number for later error messages.  */ | 
|  | 2313 |  | 
|  | 2314 | if (cur_filename) | 
|  | 2315 | free(cur_filename); | 
|  | 2316 |  | 
|  | 2317 | file = strchr(yytext, '\"')+1; | 
|  | 2318 | e = strchr(file, '\"'); | 
|  | 2319 | *e = '\0'; | 
|  | 2320 | cur_filename = memcpy(xmalloc(e-file+1), file, e-file+1); | 
|  | 2321 | cur_line = atoi(yytext+2); | 
|  | 2322 |  | 
|  | 2323 | goto repeat; | 
|  | 2324 | } | 
|  | 2325 |  | 
|  | 2326 | switch (lexstate) | 
|  | 2327 | { | 
|  | 2328 | case ST_NORMAL: | 
|  | 2329 | switch (token) | 
|  | 2330 | { | 
|  | 2331 | case IDENT: | 
|  | 2332 | APP; | 
|  | 2333 | { | 
|  | 2334 | const struct resword *r = is_reserved_word(yytext, yyleng); | 
|  | 2335 | if (r) | 
|  | 2336 | { | 
|  | 2337 | switch (token = r->token) | 
|  | 2338 | { | 
|  | 2339 | case ATTRIBUTE_KEYW: | 
|  | 2340 | lexstate = ST_ATTRIBUTE; | 
|  | 2341 | count = 0; | 
|  | 2342 | goto repeat; | 
|  | 2343 | case ASM_KEYW: | 
|  | 2344 | lexstate = ST_ASM; | 
|  | 2345 | count = 0; | 
|  | 2346 | goto repeat; | 
|  | 2347 |  | 
|  | 2348 | case STRUCT_KEYW: | 
|  | 2349 | case UNION_KEYW: | 
|  | 2350 | dont_want_brace_phrase = 3; | 
|  | 2351 | case ENUM_KEYW: | 
|  | 2352 | suppress_type_lookup = 2; | 
|  | 2353 | goto fini; | 
|  | 2354 |  | 
|  | 2355 | case EXPORT_SYMBOL_KEYW: | 
|  | 2356 | goto fini; | 
|  | 2357 | } | 
|  | 2358 | } | 
|  | 2359 | if (!suppress_type_lookup) | 
|  | 2360 | { | 
|  | 2361 | struct symbol *sym = find_symbol(yytext, SYM_TYPEDEF); | 
|  | 2362 | if (sym && sym->type == SYM_TYPEDEF) | 
|  | 2363 | token = TYPE; | 
|  | 2364 | } | 
|  | 2365 | } | 
|  | 2366 | break; | 
|  | 2367 |  | 
|  | 2368 | case '[': | 
|  | 2369 | APP; | 
|  | 2370 | lexstate = ST_BRACKET; | 
|  | 2371 | count = 1; | 
|  | 2372 | goto repeat; | 
|  | 2373 |  | 
|  | 2374 | case '{': | 
|  | 2375 | APP; | 
|  | 2376 | if (dont_want_brace_phrase) | 
|  | 2377 | break; | 
|  | 2378 | lexstate = ST_BRACE; | 
|  | 2379 | count = 1; | 
|  | 2380 | goto repeat; | 
|  | 2381 |  | 
|  | 2382 | case '=': case ':': | 
|  | 2383 | APP; | 
|  | 2384 | lexstate = ST_EXPRESSION; | 
|  | 2385 | break; | 
|  | 2386 |  | 
|  | 2387 | case DOTS: | 
|  | 2388 | default: | 
|  | 2389 | APP; | 
|  | 2390 | break; | 
|  | 2391 | } | 
|  | 2392 | break; | 
|  | 2393 |  | 
|  | 2394 | case ST_ATTRIBUTE: | 
|  | 2395 | APP; | 
|  | 2396 | switch (token) | 
|  | 2397 | { | 
|  | 2398 | case '(': | 
|  | 2399 | ++count; | 
|  | 2400 | goto repeat; | 
|  | 2401 | case ')': | 
|  | 2402 | if (--count == 0) | 
|  | 2403 | { | 
|  | 2404 | lexstate = ST_NORMAL; | 
|  | 2405 | token = ATTRIBUTE_PHRASE; | 
|  | 2406 | break; | 
|  | 2407 | } | 
|  | 2408 | goto repeat; | 
|  | 2409 | default: | 
|  | 2410 | goto repeat; | 
|  | 2411 | } | 
|  | 2412 | break; | 
|  | 2413 |  | 
|  | 2414 | case ST_ASM: | 
|  | 2415 | APP; | 
|  | 2416 | switch (token) | 
|  | 2417 | { | 
|  | 2418 | case '(': | 
|  | 2419 | ++count; | 
|  | 2420 | goto repeat; | 
|  | 2421 | case ')': | 
|  | 2422 | if (--count == 0) | 
|  | 2423 | { | 
|  | 2424 | lexstate = ST_NORMAL; | 
|  | 2425 | token = ASM_PHRASE; | 
|  | 2426 | break; | 
|  | 2427 | } | 
|  | 2428 | goto repeat; | 
|  | 2429 | default: | 
|  | 2430 | goto repeat; | 
|  | 2431 | } | 
|  | 2432 | break; | 
|  | 2433 |  | 
|  | 2434 | case ST_BRACKET: | 
|  | 2435 | APP; | 
|  | 2436 | switch (token) | 
|  | 2437 | { | 
|  | 2438 | case '[': | 
|  | 2439 | ++count; | 
|  | 2440 | goto repeat; | 
|  | 2441 | case ']': | 
|  | 2442 | if (--count == 0) | 
|  | 2443 | { | 
|  | 2444 | lexstate = ST_NORMAL; | 
|  | 2445 | token = BRACKET_PHRASE; | 
|  | 2446 | break; | 
|  | 2447 | } | 
|  | 2448 | goto repeat; | 
|  | 2449 | default: | 
|  | 2450 | goto repeat; | 
|  | 2451 | } | 
|  | 2452 | break; | 
|  | 2453 |  | 
|  | 2454 | case ST_BRACE: | 
|  | 2455 | APP; | 
|  | 2456 | switch (token) | 
|  | 2457 | { | 
|  | 2458 | case '{': | 
|  | 2459 | ++count; | 
|  | 2460 | goto repeat; | 
|  | 2461 | case '}': | 
|  | 2462 | if (--count == 0) | 
|  | 2463 | { | 
|  | 2464 | lexstate = ST_NORMAL; | 
|  | 2465 | token = BRACE_PHRASE; | 
|  | 2466 | break; | 
|  | 2467 | } | 
|  | 2468 | goto repeat; | 
|  | 2469 | default: | 
|  | 2470 | goto repeat; | 
|  | 2471 | } | 
|  | 2472 | break; | 
|  | 2473 |  | 
|  | 2474 | case ST_EXPRESSION: | 
|  | 2475 | switch (token) | 
|  | 2476 | { | 
|  | 2477 | case '(': case '[': case '{': | 
|  | 2478 | ++count; | 
|  | 2479 | APP; | 
|  | 2480 | goto repeat; | 
|  | 2481 | case ')': case ']': case '}': | 
|  | 2482 | --count; | 
|  | 2483 | APP; | 
|  | 2484 | goto repeat; | 
|  | 2485 | case ',': case ';': | 
|  | 2486 | if (count == 0) | 
|  | 2487 | { | 
|  | 2488 | /* Put back the token we just read so's we can find it again | 
|  | 2489 | after registering the expression.  */ | 
|  | 2490 | unput(token); | 
|  | 2491 |  | 
|  | 2492 | lexstate = ST_NORMAL; | 
|  | 2493 | token = EXPRESSION_PHRASE; | 
|  | 2494 | break; | 
|  | 2495 | } | 
|  | 2496 | APP; | 
|  | 2497 | goto repeat; | 
|  | 2498 | default: | 
|  | 2499 | APP; | 
|  | 2500 | goto repeat; | 
|  | 2501 | } | 
|  | 2502 | break; | 
|  | 2503 |  | 
|  | 2504 | case ST_TABLE_1: | 
|  | 2505 | goto repeat; | 
|  | 2506 |  | 
|  | 2507 | case ST_TABLE_2: | 
|  | 2508 | if (token == IDENT && yyleng == 1 && yytext[0] == 'X') | 
|  | 2509 | { | 
|  | 2510 | token = EXPORT_SYMBOL_KEYW; | 
|  | 2511 | lexstate = ST_TABLE_5; | 
|  | 2512 | APP; | 
|  | 2513 | break; | 
|  | 2514 | } | 
|  | 2515 | lexstate = ST_TABLE_6; | 
|  | 2516 | /* FALLTHRU */ | 
|  | 2517 |  | 
|  | 2518 | case ST_TABLE_6: | 
|  | 2519 | switch (token) | 
|  | 2520 | { | 
|  | 2521 | case '{': case '[': case '(': | 
|  | 2522 | ++count; | 
|  | 2523 | break; | 
|  | 2524 | case '}': case ']': case ')': | 
|  | 2525 | --count; | 
|  | 2526 | break; | 
|  | 2527 | case ',': | 
|  | 2528 | if (count == 0) | 
|  | 2529 | lexstate = ST_TABLE_2; | 
|  | 2530 | break; | 
|  | 2531 | }; | 
|  | 2532 | goto repeat; | 
|  | 2533 |  | 
|  | 2534 | case ST_TABLE_3: | 
|  | 2535 | goto repeat; | 
|  | 2536 |  | 
|  | 2537 | case ST_TABLE_4: | 
|  | 2538 | if (token == ';') | 
|  | 2539 | lexstate = ST_NORMAL; | 
|  | 2540 | goto repeat; | 
|  | 2541 |  | 
|  | 2542 | case ST_TABLE_5: | 
|  | 2543 | switch (token) | 
|  | 2544 | { | 
|  | 2545 | case ',': | 
|  | 2546 | token = ';'; | 
|  | 2547 | lexstate = ST_TABLE_2; | 
|  | 2548 | APP; | 
|  | 2549 | break; | 
|  | 2550 | default: | 
|  | 2551 | APP; | 
|  | 2552 | break; | 
|  | 2553 | } | 
|  | 2554 | break; | 
|  | 2555 |  | 
|  | 2556 | default: | 
| Sam Ravnborg | 6803dc0 | 2006-06-24 23:46:54 +0200 | [diff] [blame] | 2557 | exit(1); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2558 | } | 
|  | 2559 | fini: | 
|  | 2560 |  | 
|  | 2561 | if (suppress_type_lookup > 0) | 
|  | 2562 | --suppress_type_lookup; | 
|  | 2563 | if (dont_want_brace_phrase > 0) | 
|  | 2564 | --dont_want_brace_phrase; | 
|  | 2565 |  | 
|  | 2566 | yylval = &next_node->next; | 
|  | 2567 |  | 
|  | 2568 | return token; | 
|  | 2569 | } | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2570 | /* A Bison parser, made by GNU Bison 2.3.  */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2571 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2572 | /* Skeleton interface for Bison's Yacc-like parsers in C | 
|  | 2573 |  | 
|  | 2574 | Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 | 
|  | 2575 | Free Software Foundation, Inc. | 
| Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2576 |  | 
|  | 2577 | This program is free software; you can redistribute it and/or modify | 
|  | 2578 | it under the terms of the GNU General Public License as published by | 
|  | 2579 | the Free Software Foundation; either version 2, or (at your option) | 
|  | 2580 | any later version. | 
|  | 2581 |  | 
|  | 2582 | This program is distributed in the hope that it will be useful, | 
|  | 2583 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 
|  | 2584 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
|  | 2585 | GNU General Public License for more details. | 
|  | 2586 |  | 
|  | 2587 | You should have received a copy of the GNU General Public License | 
|  | 2588 | along with this program; if not, write to the Free Software | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2589 | Foundation, Inc., 51 Franklin Street, Fifth Floor, | 
|  | 2590 | Boston, MA 02110-1301, USA.  */ | 
| Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2591 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2592 | /* As a special exception, you may create a larger work that contains | 
|  | 2593 | part or all of the Bison parser skeleton and distribute that work | 
|  | 2594 | under terms of your choice, so long as that work isn't itself a | 
|  | 2595 | parser generator using the skeleton or a modified version thereof | 
|  | 2596 | as a parser skeleton.  Alternatively, if you modify or redistribute | 
|  | 2597 | the parser skeleton itself, you may (at your option) remove this | 
|  | 2598 | special exception, which will cause the skeleton and the resulting | 
|  | 2599 | Bison output files to be licensed under the GNU General Public | 
|  | 2600 | License without this special exception. | 
|  | 2601 |  | 
|  | 2602 | This special exception was added by the Free Software Foundation in | 
|  | 2603 | version 2.2 of Bison.  */ | 
| Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2604 |  | 
|  | 2605 | /* Tokens.  */ | 
|  | 2606 | #ifndef YYTOKENTYPE | 
|  | 2607 | # define YYTOKENTYPE | 
|  | 2608 | /* Put the tokens into the symbol table, so that GDB and other debuggers | 
|  | 2609 | know about them.  */ | 
|  | 2610 | enum yytokentype { | 
|  | 2611 | ASM_KEYW = 258, | 
|  | 2612 | ATTRIBUTE_KEYW = 259, | 
|  | 2613 | AUTO_KEYW = 260, | 
|  | 2614 | BOOL_KEYW = 261, | 
|  | 2615 | CHAR_KEYW = 262, | 
|  | 2616 | CONST_KEYW = 263, | 
|  | 2617 | DOUBLE_KEYW = 264, | 
|  | 2618 | ENUM_KEYW = 265, | 
|  | 2619 | EXTERN_KEYW = 266, | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2620 | EXTENSION_KEYW = 267, | 
|  | 2621 | FLOAT_KEYW = 268, | 
|  | 2622 | INLINE_KEYW = 269, | 
|  | 2623 | INT_KEYW = 270, | 
|  | 2624 | LONG_KEYW = 271, | 
|  | 2625 | REGISTER_KEYW = 272, | 
|  | 2626 | RESTRICT_KEYW = 273, | 
|  | 2627 | SHORT_KEYW = 274, | 
|  | 2628 | SIGNED_KEYW = 275, | 
|  | 2629 | STATIC_KEYW = 276, | 
|  | 2630 | STRUCT_KEYW = 277, | 
|  | 2631 | TYPEDEF_KEYW = 278, | 
|  | 2632 | UNION_KEYW = 279, | 
|  | 2633 | UNSIGNED_KEYW = 280, | 
|  | 2634 | VOID_KEYW = 281, | 
|  | 2635 | VOLATILE_KEYW = 282, | 
|  | 2636 | TYPEOF_KEYW = 283, | 
|  | 2637 | EXPORT_SYMBOL_KEYW = 284, | 
|  | 2638 | ASM_PHRASE = 285, | 
|  | 2639 | ATTRIBUTE_PHRASE = 286, | 
|  | 2640 | BRACE_PHRASE = 287, | 
|  | 2641 | BRACKET_PHRASE = 288, | 
|  | 2642 | EXPRESSION_PHRASE = 289, | 
|  | 2643 | CHAR = 290, | 
|  | 2644 | DOTS = 291, | 
|  | 2645 | IDENT = 292, | 
|  | 2646 | INT = 293, | 
|  | 2647 | REAL = 294, | 
|  | 2648 | STRING = 295, | 
|  | 2649 | TYPE = 296, | 
|  | 2650 | OTHER = 297, | 
|  | 2651 | FILENAME = 298 | 
| Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2652 | }; | 
|  | 2653 | #endif | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2654 | /* Tokens.  */ | 
| Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2655 | #define ASM_KEYW 258 | 
|  | 2656 | #define ATTRIBUTE_KEYW 259 | 
|  | 2657 | #define AUTO_KEYW 260 | 
|  | 2658 | #define BOOL_KEYW 261 | 
|  | 2659 | #define CHAR_KEYW 262 | 
|  | 2660 | #define CONST_KEYW 263 | 
|  | 2661 | #define DOUBLE_KEYW 264 | 
|  | 2662 | #define ENUM_KEYW 265 | 
|  | 2663 | #define EXTERN_KEYW 266 | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2664 | #define EXTENSION_KEYW 267 | 
|  | 2665 | #define FLOAT_KEYW 268 | 
|  | 2666 | #define INLINE_KEYW 269 | 
|  | 2667 | #define INT_KEYW 270 | 
|  | 2668 | #define LONG_KEYW 271 | 
|  | 2669 | #define REGISTER_KEYW 272 | 
|  | 2670 | #define RESTRICT_KEYW 273 | 
|  | 2671 | #define SHORT_KEYW 274 | 
|  | 2672 | #define SIGNED_KEYW 275 | 
|  | 2673 | #define STATIC_KEYW 276 | 
|  | 2674 | #define STRUCT_KEYW 277 | 
|  | 2675 | #define TYPEDEF_KEYW 278 | 
|  | 2676 | #define UNION_KEYW 279 | 
|  | 2677 | #define UNSIGNED_KEYW 280 | 
|  | 2678 | #define VOID_KEYW 281 | 
|  | 2679 | #define VOLATILE_KEYW 282 | 
|  | 2680 | #define TYPEOF_KEYW 283 | 
|  | 2681 | #define EXPORT_SYMBOL_KEYW 284 | 
|  | 2682 | #define ASM_PHRASE 285 | 
|  | 2683 | #define ATTRIBUTE_PHRASE 286 | 
|  | 2684 | #define BRACE_PHRASE 287 | 
|  | 2685 | #define BRACKET_PHRASE 288 | 
|  | 2686 | #define EXPRESSION_PHRASE 289 | 
|  | 2687 | #define CHAR 290 | 
|  | 2688 | #define DOTS 291 | 
|  | 2689 | #define IDENT 292 | 
|  | 2690 | #define INT 293 | 
|  | 2691 | #define REAL 294 | 
|  | 2692 | #define STRING 295 | 
|  | 2693 | #define TYPE 296 | 
|  | 2694 | #define OTHER 297 | 
|  | 2695 | #define FILENAME 298 | 
| Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2696 |  | 
|  | 2697 |  | 
|  | 2698 |  | 
|  | 2699 |  | 
| Sam Ravnborg | 70f7524 | 2007-09-01 10:26:32 +0200 | [diff] [blame] | 2700 | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED | 
| Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2701 | typedef int YYSTYPE; | 
|  | 2702 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ | 
|  | 2703 | # define YYSTYPE_IS_DECLARED 1 | 
|  | 2704 | # define YYSTYPE_IS_TRIVIAL 1 | 
|  | 2705 | #endif | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2706 |  | 
|  | 2707 | extern YYSTYPE yylval; | 
| Sam Ravnborg | c40f564 | 2005-12-26 22:53:25 +0100 | [diff] [blame] | 2708 |  | 
|  | 2709 |  |