Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 2 | mjames | 1 | |
| 2 | #line 2 "acf_lex.c" |
||
| 3 | |||
| 4 | #define YY_INT_ALIGNED short int |
||
| 5 | |||
| 6 | /* A lexical scanner generated by flex */ |
||
| 7 | |||
| 8 | #define FLEX_SCANNER |
||
| 9 | #define YY_FLEX_MAJOR_VERSION 2 |
||
| 10 | #define YY_FLEX_MINOR_VERSION 6 |
||
| 11 | #define YY_FLEX_SUBMINOR_VERSION 4 |
||
| 12 | #if YY_FLEX_SUBMINOR_VERSION > 0 |
||
| 13 | #define FLEX_BETA |
||
| 14 | #endif |
||
| 15 | |||
| 16 | /* First, we deal with platform-specific or compiler-specific issues. */ |
||
| 17 | |||
| 18 | /* begin standard C headers. */ |
||
| 19 | #include <errno.h> |
||
| 20 | #include <stdio.h> |
||
| 21 | #include <stdlib.h> |
||
| 22 | #include <string.h> |
||
| 23 | |||
| 24 | /* end standard C headers. */ |
||
| 25 | |||
| 26 | /* flex integer type definitions */ |
||
| 27 | |||
| 28 | #ifndef FLEXINT_H |
||
| 29 | #define FLEXINT_H |
||
| 30 | |||
| 31 | /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ |
||
| 32 | |||
| 33 | #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L |
||
| 34 | |||
| 35 | /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, |
||
| 36 | * if you want the limit (max/min) macros for int types. |
||
| 37 | */ |
||
| 38 | #ifndef __STDC_LIMIT_MACROS |
||
| 39 | #define __STDC_LIMIT_MACROS 1 |
||
| 40 | #endif |
||
| 41 | |||
| 42 | #include <inttypes.h> |
||
| 43 | typedef int8_t flex_int8_t; |
||
| 44 | typedef uint8_t flex_uint8_t; |
||
| 45 | typedef int16_t flex_int16_t; |
||
| 46 | typedef uint16_t flex_uint16_t; |
||
| 47 | typedef int32_t flex_int32_t; |
||
| 48 | typedef uint32_t flex_uint32_t; |
||
| 49 | #else |
||
| 50 | typedef signed char flex_int8_t; |
||
| 51 | typedef short int flex_int16_t; |
||
| 52 | typedef int flex_int32_t; |
||
| 53 | typedef unsigned char flex_uint8_t; |
||
| 54 | typedef unsigned short int flex_uint16_t; |
||
| 55 | typedef unsigned int flex_uint32_t; |
||
| 56 | |||
| 57 | /* Limits of integral types. */ |
||
| 58 | #ifndef INT8_MIN |
||
| 59 | #define INT8_MIN (-128) |
||
| 60 | #endif |
||
| 61 | #ifndef INT16_MIN |
||
| 62 | #define INT16_MIN (-32767 - 1) |
||
| 63 | #endif |
||
| 64 | #ifndef INT32_MIN |
||
| 65 | #define INT32_MIN (-2147483647 - 1) |
||
| 66 | #endif |
||
| 67 | #ifndef INT8_MAX |
||
| 68 | #define INT8_MAX (127) |
||
| 69 | #endif |
||
| 70 | #ifndef INT16_MAX |
||
| 71 | #define INT16_MAX (32767) |
||
| 72 | #endif |
||
| 73 | #ifndef INT32_MAX |
||
| 74 | #define INT32_MAX (2147483647) |
||
| 75 | #endif |
||
| 76 | #ifndef UINT8_MAX |
||
| 77 | #define UINT8_MAX (255U) |
||
| 78 | #endif |
||
| 79 | #ifndef UINT16_MAX |
||
| 80 | #define UINT16_MAX (65535U) |
||
| 81 | #endif |
||
| 82 | #ifndef UINT32_MAX |
||
| 83 | #define UINT32_MAX (4294967295U) |
||
| 84 | #endif |
||
| 85 | |||
| 86 | #ifndef SIZE_MAX |
||
| 87 | #define SIZE_MAX (~(size_t) 0) |
||
| 88 | #endif |
||
| 89 | |||
| 90 | #endif /* ! C99 */ |
||
| 91 | |||
| 92 | #endif /* ! FLEXINT_H */ |
||
| 93 | |||
| 94 | /* begin standard C++ headers. */ |
||
| 95 | |||
| 96 | /* TODO: this is always defined, so inline it */ |
||
| 97 | #define yyconst const |
||
| 98 | |||
| 99 | #if defined(__GNUC__) && __GNUC__ >= 3 |
||
| 100 | #define yynoreturn __attribute__ ((__noreturn__)) |
||
| 101 | #else |
||
| 102 | #define yynoreturn |
||
| 103 | #endif |
||
| 104 | |||
| 105 | /* Returned upon end-of-file. */ |
||
| 106 | #define YY_NULL 0 |
||
| 107 | |||
| 108 | /* Promotes a possibly negative, possibly signed char to an |
||
| 109 | * integer in range [0..255] for use as an array index. |
||
| 110 | */ |
||
| 111 | #define YY_SC_TO_UI(c) ((YY_CHAR) (c)) |
||
| 112 | |||
| 113 | /* Enter a start condition. This macro really ought to take a parameter, |
||
| 114 | * but we do it the disgusting crufty way forced on us by the ()-less |
||
| 115 | * definition of BEGIN. |
||
| 116 | */ |
||
| 117 | #define BEGIN (yy_start) = 1 + 2 * |
||
| 118 | /* Translate the current start state into a value that can be later handed |
||
| 119 | * to BEGIN to return to the state. The YYSTATE alias is for lex |
||
| 120 | * compatibility. |
||
| 121 | */ |
||
| 122 | #define YY_START (((yy_start) -1) / 2) |
||
| 123 | #define YYSTATE YY_START |
||
| 124 | /* Action number for EOF rule of a given start state. */ |
||
| 125 | #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) |
||
| 126 | /* Special action meaning "start processing a new file". */ |
||
| 127 | #define YY_NEW_FILE yyrestart (yyin) |
||
| 128 | #define YY_END_OF_BUFFER_CHAR 0 |
||
| 129 | |||
| 130 | /* Size of default input buffer. */ |
||
| 131 | #ifndef YY_BUF_SIZE |
||
| 132 | #ifdef __ia64__ |
||
| 133 | /* On IA-64, the buffer size is 16k, not 8k. |
||
| 134 | * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. |
||
| 135 | * Ditto for the __ia64__ case accordingly. |
||
| 136 | */ |
||
| 137 | #define YY_BUF_SIZE 32768 |
||
| 138 | #else |
||
| 139 | #define YY_BUF_SIZE 16384 |
||
| 140 | #endif /* __ia64__ */ |
||
| 141 | #endif |
||
| 142 | |||
| 143 | /* The state buf must be large enough to hold one state per character in the main buffer. |
||
| 144 | */ |
||
| 145 | #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof (yy_state_type)) |
||
| 146 | |||
| 147 | #ifndef YY_TYPEDEF_YY_BUFFER_STATE |
||
| 148 | #define YY_TYPEDEF_YY_BUFFER_STATE |
||
| 149 | typedef struct yy_buffer_state *YY_BUFFER_STATE; |
||
| 150 | #endif |
||
| 151 | |||
| 152 | #ifndef YY_TYPEDEF_YY_SIZE_T |
||
| 153 | #define YY_TYPEDEF_YY_SIZE_T |
||
| 154 | typedef size_t yy_size_t; |
||
| 155 | #endif |
||
| 156 | |||
| 157 | extern int yyleng; |
||
| 158 | |||
| 159 | extern FILE *yyin, *yyout; |
||
| 160 | |||
| 161 | #define EOB_ACT_CONTINUE_SCAN 0 |
||
| 162 | #define EOB_ACT_END_OF_FILE 1 |
||
| 163 | #define EOB_ACT_LAST_MATCH 2 |
||
| 164 | |||
| 165 | #define YY_LESS_LINENO(n) |
||
| 166 | #define YY_LINENO_REWIND_TO(ptr) |
||
| 167 | |||
| 168 | /* Return all but the first "n" matched characters back to the input stream. */ |
||
| 169 | #define yyless(n) \ |
||
| 170 | do \ |
||
| 171 | { \ |
||
| 172 | /* Undo effects of setting up yytext. */ \ |
||
| 173 | int yyless_macro_arg = (n); \ |
||
| 174 | YY_LESS_LINENO (yyless_macro_arg); \ |
||
| 175 | *yy_cp = (yy_hold_char); \ |
||
| 176 | YY_RESTORE_YY_MORE_OFFSET (yy_c_buf_p) = yy_cp = \ |
||
| 177 | yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ |
||
| 178 | YY_DO_BEFORE_ACTION; /* set up yytext again */ \ |
||
| 179 | } while (0) |
||
| 180 | #define unput(c) yyunput (c, (yytext_ptr)) |
||
| 181 | |||
| 182 | #ifndef YY_STRUCT_YY_BUFFER_STATE |
||
| 183 | #define YY_STRUCT_YY_BUFFER_STATE |
||
| 184 | struct yy_buffer_state |
||
| 185 | { |
||
| 186 | FILE *yy_input_file; |
||
| 187 | |||
| 188 | char *yy_ch_buf; /* input buffer */ |
||
| 189 | char *yy_buf_pos; /* current position in input buffer */ |
||
| 190 | |||
| 191 | /* Size of input buffer in bytes, not including room for EOB |
||
| 192 | * characters. |
||
| 193 | */ |
||
| 194 | int yy_buf_size; |
||
| 195 | |||
| 196 | /* Number of characters read into yy_ch_buf, not including EOB |
||
| 197 | * characters. |
||
| 198 | */ |
||
| 199 | int yy_n_chars; |
||
| 200 | |||
| 201 | /* Whether we "own" the buffer - i.e., we know we created it, |
||
| 202 | * and can realloc() it to grow it, and should free() it to |
||
| 203 | * delete it. |
||
| 204 | */ |
||
| 205 | int yy_is_our_buffer; |
||
| 206 | |||
| 207 | /* Whether this is an "interactive" input source; if so, and |
||
| 208 | * if we're using stdio for input, then we want to use getc() |
||
| 209 | * instead of fread(), to make sure we stop fetching input after |
||
| 210 | * each newline. |
||
| 211 | */ |
||
| 212 | int yy_is_interactive; |
||
| 213 | |||
| 214 | /* Whether we're considered to be at the beginning of a line. |
||
| 215 | * If so, '^' rules will be active on the next match, otherwise |
||
| 216 | * not. |
||
| 217 | */ |
||
| 218 | int yy_at_bol; |
||
| 219 | |||
| 220 | int yy_bs_lineno; /**< The line count. */ |
||
| 221 | int yy_bs_column; /**< The column count. */ |
||
| 222 | |||
| 223 | /* Whether to try to fill the input buffer when we reach the |
||
| 224 | * end of it. |
||
| 225 | */ |
||
| 226 | int yy_fill_buffer; |
||
| 227 | |||
| 228 | int yy_buffer_status; |
||
| 229 | |||
| 230 | #define YY_BUFFER_NEW 0 |
||
| 231 | #define YY_BUFFER_NORMAL 1 |
||
| 232 | /* When an EOF's been seen but there's still some text to process |
||
| 233 | * then we mark the buffer as YY_EOF_PENDING, to indicate that we |
||
| 234 | * shouldn't try reading from the input source any more. We might |
||
| 235 | * still have a bunch of tokens to match, though, because of |
||
| 236 | * possible backing-up. |
||
| 237 | * |
||
| 238 | * When we actually see the EOF, we change the status to "new" |
||
| 239 | * (via yyrestart()), so that the user can continue scanning by |
||
| 240 | * just pointing yyin at a new input file. |
||
| 241 | */ |
||
| 242 | #define YY_BUFFER_EOF_PENDING 2 |
||
| 243 | }; |
||
| 244 | #endif /* !YY_STRUCT_YY_BUFFER_STATE */ |
||
| 245 | |||
| 246 | /* Stack of input buffers. */ |
||
| 247 | static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ |
||
| 248 | static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ |
||
| 249 | static YY_BUFFER_STATE *yy_buffer_stack = NULL; /**< Stack as an array. */ |
||
| 250 | |||
| 251 | /* We provide macros for accessing buffer states in case in the |
||
| 252 | * future we want to put the buffer states in a more general |
||
| 253 | * "scanner state". |
||
| 254 | * |
||
| 255 | * Returns the top of the stack, or NULL. |
||
| 256 | */ |
||
| 257 | #define YY_CURRENT_BUFFER ((yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : NULL) |
||
| 258 | /* Same as previous macro, but useful when we know that the buffer stack is not |
||
| 259 | * NULL or when we need an lvalue. For internal use only. |
||
| 260 | */ |
||
| 261 | #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] |
||
| 262 | |||
| 263 | /* yy_hold_char holds the character lost when yytext is formed. */ |
||
| 264 | static char yy_hold_char; |
||
| 265 | static int yy_n_chars; /* number of characters read into yy_ch_buf */ |
||
| 266 | int yyleng; |
||
| 267 | |||
| 268 | /* Points to current character in buffer. */ |
||
| 269 | static char *yy_c_buf_p = NULL; |
||
| 270 | static int yy_init = 0; /* whether we need to initialize */ |
||
| 271 | static int yy_start = 0; /* start state number */ |
||
| 272 | |||
| 273 | /* Flag which is used to allow yywrap()'s to do buffer switches |
||
| 274 | * instead of setting up a fresh yyin. A bit of a hack ... |
||
| 275 | */ |
||
| 276 | static int yy_did_buffer_switch_on_eof; |
||
| 277 | |||
| 278 | void yyrestart (FILE *input_file); |
||
| 279 | void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer); |
||
| 280 | YY_BUFFER_STATE yy_create_buffer (FILE *file, int size); |
||
| 281 | void yy_delete_buffer (YY_BUFFER_STATE b); |
||
| 282 | void yy_flush_buffer (YY_BUFFER_STATE b); |
||
| 283 | void yypush_buffer_state (YY_BUFFER_STATE new_buffer); |
||
| 284 | void yypop_buffer_state (void); |
||
| 285 | |||
| 286 | static void yyensure_buffer_stack (void); |
||
| 287 | static void yy_load_buffer_state (void); |
||
| 288 | static void yy_init_buffer (YY_BUFFER_STATE b, FILE *file); |
||
| 289 | #define YY_FLUSH_BUFFER yy_flush_buffer (YY_CURRENT_BUFFER) |
||
| 290 | |||
| 291 | YY_BUFFER_STATE yy_scan_buffer (char *base, yy_size_t size); |
||
| 292 | YY_BUFFER_STATE yy_scan_string (const char *yy_str); |
||
| 293 | YY_BUFFER_STATE yy_scan_bytes (const char *bytes, int len); |
||
| 294 | |||
| 295 | void *yyalloc (yy_size_t); |
||
| 296 | void *yyrealloc (void *, yy_size_t); |
||
| 297 | void yyfree (void *); |
||
| 298 | |||
| 299 | #define yy_new_buffer yy_create_buffer |
||
| 300 | #define yy_set_interactive(is_interactive) \ |
||
| 301 | { \ |
||
| 302 | if (!YY_CURRENT_BUFFER) \ |
||
| 303 | { \ |
||
| 304 | yyensure_buffer_stack (); \ |
||
| 305 | YY_CURRENT_BUFFER_LVALUE = yy_create_buffer (yyin, YY_BUF_SIZE); \ |
||
| 306 | } \ |
||
| 307 | YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ |
||
| 308 | } |
||
| 309 | #define yy_set_bol(at_bol) \ |
||
| 310 | { \ |
||
| 311 | if (!YY_CURRENT_BUFFER) \ |
||
| 312 | { \ |
||
| 313 | yyensure_buffer_stack (); \ |
||
| 314 | YY_CURRENT_BUFFER_LVALUE = yy_create_buffer (yyin, YY_BUF_SIZE); \ |
||
| 315 | } \ |
||
| 316 | YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ |
||
| 317 | } |
||
| 318 | #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) |
||
| 319 | |||
| 320 | /* Begin user sect3 */ |
||
| 321 | typedef flex_uint8_t YY_CHAR; |
||
| 322 | |||
| 323 | FILE *yyin = NULL, *yyout = NULL; |
||
| 324 | |||
| 325 | typedef int yy_state_type; |
||
| 326 | |||
| 327 | extern int yylineno; |
||
| 328 | int yylineno = 1; |
||
| 329 | |||
| 330 | extern char *yytext; |
||
| 331 | #ifdef yytext_ptr |
||
| 332 | #undef yytext_ptr |
||
| 333 | #endif |
||
| 334 | #define yytext_ptr yytext |
||
| 335 | |||
| 336 | static yy_state_type yy_get_previous_state (void); |
||
| 337 | static yy_state_type yy_try_NUL_trans (yy_state_type current_state); |
||
| 338 | static int yy_get_next_buffer (void); |
||
| 339 | static void yynoreturn yy_fatal_error (const char *msg); |
||
| 340 | |||
| 341 | /* Done after the current pattern has been matched and before the |
||
| 342 | * corresponding action - sets up yytext. |
||
| 343 | */ |
||
| 344 | #define YY_DO_BEFORE_ACTION \ |
||
| 345 | (yytext_ptr) = yy_bp; \ |
||
| 346 | yyleng = (int) (yy_cp - yy_bp); \ |
||
| 347 | (yy_hold_char) = *yy_cp; \ |
||
| 348 | *yy_cp = '\0'; \ |
||
| 349 | (yy_c_buf_p) = yy_cp; |
||
| 350 | #define YY_NUM_RULES 147 |
||
| 351 | #define YY_END_OF_BUFFER 148 |
||
| 352 | /* This struct is not used in this scanner, |
||
| 353 | but its presence is necessary. */ |
||
| 354 | struct yy_trans_info |
||
| 355 | { |
||
| 356 | flex_int32_t yy_verify; |
||
| 357 | flex_int32_t yy_nxt; |
||
| 358 | }; |
||
| 359 | static const flex_int16_t yy_accept[707] = { |
||
| 360 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
||
| 361 | 3, 3, 148, 146, 57, 58, 59, 32, 5, 143, 37, 46, 22, 29, 30, 53, 33, |
||
| 362 | 54, 34, 31, 36, 141, 26, 27, 41, 28, 42, 38, 143, 143, 143, 143, 143, 143, |
||
| 363 | 143, 143, 43, 143, 48, 44, 32, 144, 53, 36, 142, 146, 50, 144, 144, 144, 144, |
||
| 364 | 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 22, 53, |
||
| 365 | 34, 36, 41, 28, 144, 144, 144, 144, 144, 55, 6, 56, 144, 144, 144, 44, |
||
| 366 | |||
| 367 | 13, 36, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, |
||
| 368 | 143, 143, 143, 21, 16, 17, 21, 21, 21, 20, 18, 15, 17, 20, 20, 19, 18, |
||
| 369 | 13, 19, 147, 57, 147, 143, 37, 46, 22, 29, 30, 53, 33, 34, 36, 141, 26, |
||
| 370 | 27, 41, 28, 42, 38, 143, 143, 143, 43, 48, 44, 4, 3, 51, 143, 45, 52, |
||
| 371 | 14, 7, 9, 8, 141, 141, 24, 39, 25, 49, 23, 40, 143, 143, 143, 143, 143, |
||
| 372 | 143, 143, 143, 143, 143, 143, 47, 144, 35, 142, 144, 144, 144, 144, 144, |
||
| 373 | |||
| 374 | 144, 144, 144, 144, 144, 144, 144, 106, 111, 144, 144, 119, 144, 144, 144, 144, 144, |
||
| 375 | 144, 144, 144, 135, 144, 144, 144, 144, 144, 106, 0, 145, 144, 144, 144, 144, 144, |
||
| 376 | 144, 144, 143, 76, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, |
||
| 377 | 143, 111, 143, 143, 143, 143, 143, 143, 143, 143, 143, 135, 143, 143, 143, 143, 0, |
||
| 378 | 143, 141, 142, 143, 143, 135, 143, 4, 3, 143, 143, 143, 143, 143, 143, 143, 143, |
||
| 379 | 143, 143, 143, 144, 71, 144, 144, 144, 144, 144, 144, 144, 144, 93, 144, |
||
| 380 | |||
| 381 | 144, 144, 101, 144, 144, 144, 144, 115, 144, 122, 144, 144, 144, 130, 131, 144, 144, |
||
| 382 | 144, 139, 144, 144, 144, 144, 0, 144, 144, 82, 144, 93, 144, 144, 143, 143, 143, |
||
| 383 | 143, 143, 143, 143, 143, 143, 143, 93, 143, 143, 143, 143, 104, 143, 143, 143, 143, |
||
| 384 | 143, 143, 143, 143, 143, 143, 143, 143, 143, 138, 143, 0, 143, 143, 143, 61, 62, |
||
| 385 | 143, 143, 143, 143, 143, 143, 67, 143, 143, 144, 144, 144, 144, 144, 144, 144, 144, |
||
| 386 | 144, 144, 144, 144, 144, 144, 144, 144, 123, 144, 125, 144, 144, 144, 136, |
||
| 387 | |||
| 388 | 144, 67, 144, 144, 0, 144, 144, 144, 144, 144, 144, 140, 143, 143, 143, 143, 143, |
||
| 389 | 143, 143, 143, 143, 143, 143, 143, 143, 143, 60, 143, 104, 102, 103, 143, 143, 143, |
||
| 390 | 143, 143, 143, 117, 143, 143, 143, 143, 143, 143, 138, 67, 0, 143, 143, 136, 143, |
||
| 391 | 143, 143, 143, 143, 143, 143, 143, 75, 144, 144, 77, 144, 144, 144, 144, 144, 144, |
||
| 392 | 144, 99, 144, 81, 144, 144, 144, 127, 144, 144, 144, 144, 144, 0, 108, 107, 144, |
||
| 393 | 144, 144, 144, 75, 143, 143, 77, 79, 143, 143, 143, 143, 143, 143, 143, |
||
| 394 | |||
| 395 | 143, 143, 143, 107, 143, 143, 143, 143, 118, 143, 143, 127, 143, 143, 143, 143, 0, |
||
| 396 | 143, 99, 143, 143, 143, 143, 143, 143, 143, 143, 144, 144, 144, 84, 144, 144, 92, |
||
| 397 | 96, 144, 144, 144, 144, 144, 132, 133, 144, 144, 144, 0, 121, 144, 144, 116, 143, |
||
| 398 | 143, 143, 143, 143, 143, 143, 91, 92, 143, 96, 143, 143, 143, 143, 143, 112, 143, |
||
| 399 | 121, 143, 143, 129, 143, 143, 143, 0, 92, 143, 70, 143, 143, 143, 68, 143, 1, |
||
| 400 | 144, 144, 80, 144, 144, 144, 70, 110, 113, 124, 68, 144, 1, 0, 144, |
||
| 401 | |||
| 402 | 144, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 110, 143, 143, 143, |
||
| 403 | 143, 11, 143, 143, 143, 0, 143, 143, 143, 66, 143, 144, 144, 144, 87, 144, 144, |
||
| 404 | 2, 144, 144, 74, 143, 143, 143, 143, 143, 143, 94, 143, 143, 143, 109, 114, 143, |
||
| 405 | 143, 10, 143, 137, 143, 12, 143, 143, 143, 143, 144, 73, 86, 144, 144, 134, 95, |
||
| 406 | 73, 78, 143, 143, 143, 143, 143, 143, 105, 143, 126, 143, 89, 12, 64, 143, 143, |
||
| 407 | 69, 144, 98, 69, 83, 85, 88, 143, 97, 143, 120, 143, 63, 65, 144, |
||
| 408 | |||
| 409 | 90, 143, 128, 72, 100, 0}; |
||
| 410 | |||
| 411 | static const YY_CHAR yy_ec[256] = { |
||
| 412 | 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, |
||
| 413 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 5, 6, 1, 7, 8, 9, 10, 11, 12, |
||
| 414 | 13, 14, 15, 16, 17, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 21, 22, 23, 24, |
||
| 415 | 25, 1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, |
||
| 416 | 45, 46, 47, 48, 49, 50, 7, 51, 52, 53, 54, 55, 1, 26, 27, 56, 57, |
||
| 417 | |||
| 418 | 58, 31, 32, 33, 59, 35, 36, 60, 61, 62, 63, 41, 42, 64, 44, 45, 65, 47, 66, 49, 50, |
||
| 419 | 7, 1, 67, 1, 68, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
||
| 420 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
||
| 421 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
||
| 422 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
||
| 423 | |||
| 424 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
||
| 425 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
||
| 426 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; |
||
| 427 | |||
| 428 | static const YY_CHAR yy_meta[69] = {0, 1, 2, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 4, 5, 1, 1, 6, |
||
| 429 | 7, 3, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
||
| 430 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 6, 1, |
||
| 431 | 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 8, 8}; |
||
| 432 | |||
| 433 | static const flex_int16_t yy_base[723] = { |
||
| 434 | 0, 0, 0, 68, 0, 136, 0, 202, 0, 203, 207, 266, 269, 249, 254, |
||
| 435 | 316, 0, 206, 211, 1341, 1342, 1342, 1342, 1342, 1317, 1342, 0, 1342, 1330, 1342, |
||
| 436 | 1342, 1342, 204, 1342, 1342, 1322, 1342, 222, 368, 1314, 1342, 193, 203, 1312, 1342, |
||
| 437 | 1302, 241, 188, 223, 245, 247, 250, 250, 1342, 1272, 1266, 0, 1342, 0, 1319, |
||
| 438 | 1308, 0, 1307, 1305, 250, 358, 236, 248, 250, 252, 357, 350, 358, 1302, 359, |
||
| 439 | 367, 1301, 363, 363, 1282, 380, 375, 375, 1266, 1306, 1342, 272, 1301, 1299, 371, |
||
| 440 | 356, 363, 382, 385, 1342, 1342, 1342, 393, 1258, 399, 0, |
||
| 441 | |||
| 442 | 1342, 1307, 404, 410, 399, 421, 403, 412, 424, 428, 411, 420, 433, 424, 434, |
||
| 443 | 451, 438, 441, 465, 448, 1342, 1342, 1342, 1303, 1305, 455, 1342, 1342, 1342, 1342, |
||
| 444 | 1299, 458, 1342, 1342, 1342, 464, 1342, 1342, 1293, 1297, 1342, 1305, 1342, 1342, 1342, |
||
| 445 | 1300, 1342, 1342, 1342, 482, 1289, 1342, 1289, 1287, 1285, 1342, 484, 276, 488, 1342, |
||
| 446 | 1241, 1289, 0, 1304, 1342, 0, 1342, 1342, 1342, 1342, 1342, 1342, 487, 0, 1342, |
||
| 447 | 1342, 1342, 1342, 1342, 1342, 478, 474, 477, 478, 477, 479, 481, 482, 491, 489, |
||
| 448 | 1249, 1342, 0, 1342, 0, 522, 501, 1259, 1271, 497, |
||
| 449 | |||
| 450 | 1271, 505, 464, 516, 525, 515, 525, 525, 0, 1274, 1259, 0, 538, 1254, 541, |
||
| 451 | 528, 533, 540, 1266, 535, 0, 528, 545, 537, 555, 543, 565, 1235, 576, 561, |
||
| 452 | 568, 1251, 1268, 562, 1237, 559, 577, 0, 1249, 1247, 1259, 569, 1259, 567, 585, |
||
| 453 | 567, 585, 570, 587, 1240, 591, 593, 0, 586, 594, 601, 601, 1243, 577, 605, |
||
| 454 | 1261, 581, 0, 606, 623, 623, 612, 611, 1268, 641, 1267, 637, 646, 1266, 642, |
||
| 455 | 0, 1281, 624, 1241, 1240, 636, 630, 1254, 1238, 631, 635, 641, 1218, 1251, 0, |
||
| 456 | 1243, 633, 639, 640, 1244, 1233, 1229, 639, 0, 652, |
||
| 457 | |||
| 458 | 1217, 1227, 0, 644, 645, 657, 653, 0, 642, 0, 1234, 1224, 1236, 0, 0, |
||
| 459 | 643, 655, 682, 0, 679, 679, 688, 1207, 1210, 676, 677, 1224, 690, 1203, 1198, |
||
| 460 | 690, 1236, 690, 686, 692, 693, 1230, 694, 684, 694, 692, 1205, 696, 698, 706, |
||
| 461 | 1204, 745, 699, 1213, 707, 1216, 1230, 713, 730, 1214, 731, 1222, 737, 1208, 727, |
||
| 462 | 1234, 731, 1206, 754, 751, 752, 0, 0, 733, 733, 744, 737, 740, 741, 0, |
||
| 463 | 750, 1185, 1205, 746, 747, 746, 753, 754, 746, 1203, 1202, 1201, 1201, 757, 749, |
||
| 464 | 1199, 1211, 1216, 0, 1215, 0, 769, 1214, 764, 0, |
||
| 465 | |||
| 466 | 777, 0, 775, 1174, 1178, 1192, 1191, 771, 788, 1172, 1174, 790, 1189, 1200, 786, |
||
| 467 | 782, 779, 793, 790, 795, 1205, 800, 1185, 801, 1184, 1181, 0, 794, 820, 1342, |
||
| 468 | 1342, 1182, 1200, 1193, 800, 1179, 806, 0, 794, 796, 811, 1168, 812, 802, 1204, |
||
| 469 | 1166, 816, 834, 843, 1202, 816, 828, 835, 835, 1193, 826, 1163, 1160, 0, 1171, |
||
| 470 | 1188, 0, 1188, 831, 829, 1187, 831, 1162, 1166, 0, 838, 0, 846, 834, 1178, |
||
| 471 | 0, 843, 1177, 842, 1153, 1150, 1141, 0, 0, 1160, 1160, 1144, 1142, 0, 844, |
||
| 472 | 1172, 0, 1140, 838, 1157, 856, 843, 855, 848, 856, |
||
| 473 | |||
| 474 | 1138, 1161, 859, 1129, 861, 860, 865, 875, 0, 1138, 1120, 0, 870, 885, 1125, |
||
| 475 | 887, 888, 899, 1151, 890, 893, 1110, 1109, 1118, 1127, 885, 1097, 895, 880, 888, |
||
| 476 | 0, 898, 892, 0, 0, 887, 904, 893, 1104, 905, 0, 0, 1121, 899, 1094, |
||
| 477 | 1092, 0, 907, 1083, 0, 907, 906, 1106, 1091, 1086, 1095, 1110, 0, 0, 907, |
||
| 478 | 0, 918, 930, 1094, 931, 921, 0, 927, 1079, 1058, 937, 0, 1067, 940, 932, |
||
| 479 | 1070, 1077, 934, 0, 935, 1051, 945, 0, 947, 0, 951, 1046, 0, 942, 1045, |
||
| 480 | 949, 0, 0, 0, 0, 0, 952, 0, 1031, 1056, |
||
| 481 | |||
| 482 | 1027, 955, 1041, 954, 1042, 1040, 955, 1034, 953, 961, 1052, 959, 964, 0, 961, |
||
| 483 | 1036, 967, 1045, 0, 965, 977, 970, 979, 990, 987, 977, 0, 935, 691, 990, |
||
| 484 | 690, 0, 982, 531, 1342, 985, 469, 0, 997, 989, 995, 997, 990, 999, 0, |
||
| 485 | 998, 481, 999, 0, 0, 1006, 1002, 0, 427, 0, 1004, 409, 355, 346, 1007, |
||
| 486 | 263, 1003, 0, 0, 274, 256, 0, 0, 0, 0, 1011, 1013, 1018, 1019, 253, |
||
| 487 | 1008, 0, 1023, 0, 265, 0, 289, 0, 200, 194, 0, 1020, 0, 0, 0, |
||
| 488 | 0, 0, 1031, 0, 1031, 0, 180, 0, 0, 1042, |
||
| 489 | |||
| 490 | 0, 1035, 0, 0, 0, 1342, 1100, 1108, 1116, 1124, 1130, 1136, 1142, 1148, 1154, |
||
| 491 | 1159, 1165, 1173, 1179, 1183, 1189, 1195}; |
||
| 492 | |||
| 493 | static const flex_int16_t yy_def[723] = { |
||
| 494 | 0, 706, 1, 706, 3, 706, 5, 1, 7, 707, 707, 708, 708, 709, 709, 706, 15, |
||
| 495 | 710, 710, 706, 706, 706, 706, 706, 706, 706, 711, 706, 706, 706, 706, 706, 706, 706, |
||
| 496 | 706, 706, 706, 706, 712, 706, 706, 706, 706, 706, 706, 711, 711, 711, 711, 711, 711, |
||
| 497 | 711, 711, 706, 711, 706, 711, 706, 713, 706, 706, 714, 706, 706, 713, 713, 713, 713, |
||
| 498 | 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 706, 706, |
||
| 499 | 706, 715, 706, 706, 713, 713, 713, 713, 713, 706, 706, 706, 713, 713, 713, 713, |
||
| 500 | |||
| 501 | 706, 706, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, |
||
| 502 | 711, 711, 711, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, |
||
| 503 | 706, 706, 706, 706, 706, 716, 706, 706, 706, 706, 706, 706, 706, 706, 706, 717, 706, |
||
| 504 | 706, 706, 706, 706, 706, 716, 716, 716, 706, 706, 716, 718, 706, 706, 711, 706, 706, |
||
| 505 | 706, 706, 706, 706, 712, 719, 706, 706, 706, 706, 706, 706, 711, 711, 711, 711, 711, |
||
| 506 | 711, 711, 711, 711, 711, 711, 706, 713, 706, 714, 713, 713, 713, 713, 713, |
||
| 507 | |||
| 508 | 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, |
||
| 509 | 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 706, 715, 713, 713, 713, 713, 713, |
||
| 510 | 713, 713, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, |
||
| 511 | 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 706, |
||
| 512 | 716, 717, 720, 716, 716, 716, 716, 718, 706, 711, 711, 711, 711, 711, 711, 711, 711, |
||
| 513 | 711, 711, 711, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, |
||
| 514 | |||
| 515 | 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, |
||
| 516 | 713, 713, 713, 713, 713, 713, 706, 713, 713, 713, 713, 713, 713, 713, 711, 711, 711, |
||
| 517 | 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 721, 711, 711, 711, 711, |
||
| 518 | 711, 711, 711, 711, 711, 711, 711, 711, 711, 722, 711, 706, 716, 716, 716, 711, 711, |
||
| 519 | 711, 711, 711, 711, 711, 711, 711, 711, 711, 713, 713, 713, 713, 713, 713, 713, 713, |
||
| 520 | 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, |
||
| 521 | |||
| 522 | 713, 713, 713, 713, 706, 713, 713, 713, 713, 713, 713, 713, 711, 711, 711, 711, 711, |
||
| 523 | 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 721, 706, 706, 711, 711, 711, |
||
| 524 | 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 722, 711, 706, 716, 716, 716, 711, |
||
| 525 | 711, 711, 711, 711, 711, 711, 711, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, |
||
| 526 | 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 706, 713, 713, 713, |
||
| 527 | 713, 713, 713, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, |
||
| 528 | |||
| 529 | 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 706, |
||
| 530 | 716, 716, 711, 711, 711, 711, 711, 711, 711, 711, 713, 713, 713, 713, 713, 713, 713, |
||
| 531 | 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 706, 713, 713, 713, 713, 711, |
||
| 532 | 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, |
||
| 533 | 711, 711, 711, 711, 711, 711, 711, 706, 716, 711, 711, 711, 711, 711, 711, 711, 711, |
||
| 534 | 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, 706, 713, |
||
| 535 | |||
| 536 | 713, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, |
||
| 537 | 711, 711, 711, 711, 711, 706, 711, 711, 711, 711, 711, 713, 713, 713, 713, 713, 713, |
||
| 538 | 706, 713, 713, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, |
||
| 539 | 711, 711, 711, 711, 711, 706, 711, 711, 711, 711, 713, 713, 713, 713, 713, 713, 713, |
||
| 540 | 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 706, 711, 711, 711, |
||
| 541 | 711, 713, 713, 713, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 713, |
||
| 542 | |||
| 543 | 711, 711, 711, 713, 711, 0, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, |
||
| 544 | 706, 706, 706, 706, 706}; |
||
| 545 | |||
| 546 | static const flex_int16_t yy_nxt[1411] = { |
||
| 547 | 0, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, |
||
| 548 | 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 26, 46, 26, 26, 26, 47, 26, |
||
| 549 | 26, 48, 26, 26, 26, 26, 26, 26, 26, 49, 26, 50, 26, 51, 52, 26, 26, |
||
| 550 | 20, 20, 20, 53, 26, 46, 26, 26, 54, 26, 26, 26, 26, 49, 26, 52, 55, |
||
| 551 | 56, 20, 21, 22, 23, 57, 25, 58, 20, 20, 29, 30, 31, 59, 33, 34, 35, |
||
| 552 | 36, 60, 61, 39, 40, 62, 63, 20, 20, 64, 65, 66, 67, 68, 69, 70, |
||
| 553 | |||
| 554 | 58, 71, 58, 58, 72, 73, 58, 74, 75, 58, 76, 77, 78, 79, 80, 81, 58, |
||
| 555 | 58, 20, 20, 20, 20, 58, 66, 67, 68, 82, 72, 73, 58, 74, 76, 79, 81, |
||
| 556 | 20, 58, 20, 21, 22, 23, 24, 25, 58, 27, 28, 83, 30, 31, 84, 33, 34, |
||
| 557 | 85, 36, 86, 61, 39, 40, 87, 88, 43, 44, 58, 89, 58, 58, 90, 58, 70, |
||
| 558 | 58, 91, 58, 58, 58, 58, 58, 92, 58, 58, 76, 93, 58, 58, 80, 81, 58, |
||
| 559 | 58, 94, 95, 96, 53, 58, 58, 58, 97, 91, 58, 98, 58, 92, 76, |
||
| 560 | |||
| 561 | 58, 99, 55, 100, 101, 122, 123, 164, 137, 122, 123, 20, 164, 137, 176, 177, 168, |
||
| 562 | 184, 124, 102, 125, 169, 124, 703, 125, 178, 179, 103, 104, 105, 106, 107, 108, 109, |
||
| 563 | 171, 110, 111, 699, 112, 172, 113, 114, 115, 698, 116, 184, 117, 118, 119, 126, 134, |
||
| 564 | 135, 94, 126, 96, 134, 135, 105, 106, 107, 120, 112, 185, 113, 114, 116, 118, 128, |
||
| 565 | 129, 130, 128, 129, 130, 182, 186, 202, 187, 205, 131, 188, 183, 131, 189, 190, 171, |
||
| 566 | 185, 196, 203, 204, 172, 682, 206, 197, 166, 198, 136, 697, 694, 202, 689, |
||
| 567 | |||
| 568 | 136, 273, 186, 183, 187, 688, 686, 188, 190, 196, 203, 204, 132, 197, 206, 132, 137, |
||
| 569 | 138, 137, 137, 139, 137, 140, 141, 142, 143, 144, 145, 146, 147, 137, 148, 137, 149, |
||
| 570 | 150, 151, 152, 153, 154, 155, 156, 140, 140, 140, 157, 140, 158, 140, 140, 140, 140, |
||
| 571 | 140, 140, 140, 140, 140, 140, 140, 140, 140, 159, 140, 140, 140, 140, 140, 137, 137, |
||
| 572 | 137, 160, 140, 140, 157, 140, 140, 140, 140, 140, 140, 140, 140, 140, 161, 162, 174, |
||
| 573 | 166, 207, 199, 208, 212, 684, 210, 215, 209, 230, 218, 219, 200, 683, 213, |
||
| 574 | |||
| 575 | 199, 231, 221, 201, 214, 222, 216, 220, 226, 224, 682, 208, 225, 208, 207, 199, 210, |
||
| 576 | 230, 209, 174, 200, 219, 201, 214, 231, 221, 222, 232, 199, 216, 233, 230, 226, 226, |
||
| 577 | 166, 166, 227, 224, 244, 241, 237, 247, 238, 242, 248, 250, 232, 239, 240, 233, 245, |
||
| 578 | 249, 680, 184, 234, 243, 254, 236, 256, 255, 246, 244, 251, 237, 247, 238, 252, 241, |
||
| 579 | 242, 258, 250, 253, 257, 259, 243, 254, 260, 263, 245, 264, 261, 184, 255, 246, 268, |
||
| 580 | 251, 252, 268, 258, 252, 262, 253, 265, 268, 188, 257, 259, 266, 174, 166, |
||
| 581 | |||
| 582 | 263, 166, 264, 174, 166, 166, 278, 279, 261, 267, 282, 298, 268, 262, 280, 268, 281, |
||
| 583 | 283, 284, 286, 265, 268, 188, 272, 285, 676, 668, 274, 291, 298, 275, 287, 279, 174, |
||
| 584 | 278, 282, 294, 280, 174, 281, 283, 284, 296, 297, 299, 285, 272, 286, 271, 271, 274, |
||
| 585 | 275, 287, 166, 166, 289, 291, 303, 290, 294, 300, 302, 301, 304, 305, 296, 297, 309, |
||
| 586 | 311, 306, 312, 313, 299, 318, 319, 666, 314, 317, 303, 320, 289, 290, 315, 321, 302, |
||
| 587 | 322, 304, 305, 706, 299, 299, 312, 318, 706, 313, 309, 311, 336, 317, 314, |
||
| 588 | |||
| 589 | 320, 322, 319, 315, 305, 338, 322, 325, 326, 306, 332, 321, 339, 342, 341, 344, 345, |
||
| 590 | 299, 329, 347, 323, 352, 331, 351, 356, 336, 359, 305, 338, 343, 325, 340, 341, 348, |
||
| 591 | 344, 332, 349, 350, 353, 354, 339, 342, 356, 357, 345, 359, 351, 347, 360, 352, 361, |
||
| 592 | 362, 348, 363, 166, 349, 350, 174, 166, 166, 367, 353, 354, 166, 374, 370, 357, 288, |
||
| 593 | 371, 360, 376, 375, 381, 390, 363, 380, 382, 386, 361, 362, 394, 398, 365, 367, 364, |
||
| 594 | 387, 392, 366, 399, 374, 391, 371, 174, 370, 375, 393, 380, 381, 376, 382, |
||
| 595 | |||
| 596 | 386, 390, 364, 394, 398, 365, 366, 271, 271, 391, 387, 400, 401, 399, 392, 402, 393, |
||
| 597 | 403, 409, 403, 421, 406, 407, 414, 419, 416, 417, 422, 415, 425, 423, 426, 420, 427, |
||
| 598 | 664, 662, 434, 401, 402, 400, 406, 407, 437, 421, 432, 403, 409, 412, 414, 415, 416, |
||
| 599 | 417, 422, 423, 425, 420, 426, 430, 431, 438, 440, 427, 166, 432, 434, 442, 444, 446, |
||
| 600 | 166, 166, 437, 166, 451, 453, 454, 452, 455, 456, 457, 460, 461, 450, 463, 464, 462, |
||
| 601 | 465, 470, 438, 440, 444, 446, 471, 448, 442, 449, 451, 452, 454, 476, 455, |
||
| 602 | |||
| 603 | 456, 453, 478, 480, 460, 461, 457, 462, 465, 450, 463, 464, 471, 479, 470, 448, 485, |
||
| 604 | 486, 480, 491, 492, 493, 494, 495, 496, 478, 476, 498, 500, 507, 503, 480, 706, 706, |
||
| 605 | 509, 485, 479, 166, 511, 510, 512, 514, 493, 492, 491, 486, 480, 515, 495, 517, 494, |
||
| 606 | 166, 496, 503, 520, 498, 500, 507, 510, 511, 166, 521, 509, 522, 523, 525, 515, 532, |
||
| 607 | 512, 514, 534, 537, 519, 531, 517, 538, 539, 520, 518, 541, 554, 543, 551, 556, 558, |
||
| 608 | 557, 521, 559, 525, 566, 532, 522, 523, 534, 531, 560, 537, 539, 563, 565, |
||
| 609 | |||
| 610 | 519, 554, 541, 538, 543, 551, 557, 567, 568, 571, 559, 556, 558, 572, 575, 576, 166, |
||
| 611 | 566, 560, 578, 579, 563, 565, 584, 586, 587, 588, 589, 567, 591, 590, 592, 571, 568, |
||
| 612 | 595, 593, 602, 597, 577, 573, 600, 572, 575, 576, 587, 609, 584, 578, 579, 588, 591, |
||
| 613 | 603, 586, 590, 610, 589, 593, 611, 613, 592, 597, 577, 595, 614, 602, 600, 615, 618, |
||
| 614 | 609, 621, 603, 622, 624, 625, 627, 619, 628, 610, 629, 661, 631, 634, 633, 638, 614, |
||
| 615 | 611, 613, 640, 643, 615, 646, 645, 648, 649, 622, 624, 625, 621, 619, 650, |
||
| 616 | |||
| 617 | 652, 654, 627, 631, 628, 655, 629, 633, 656, 634, 660, 638, 640, 643, 645, 657, 659, |
||
| 618 | 648, 646, 663, 665, 649, 650, 667, 654, 652, 669, 670, 671, 673, 672, 656, 674, 655, |
||
| 619 | 658, 660, 675, 677, 657, 678, 679, 695, 681, 665, 659, 685, 667, 663, 687, 690, 670, |
||
| 620 | 691, 673, 671, 669, 672, 692, 674, 693, 675, 677, 696, 700, 679, 678, 681, 695, 687, |
||
| 621 | 685, 701, 702, 704, 690, 705, 691, 653, 651, 647, 644, 692, 642, 693, 641, 700, 696, |
||
| 622 | 639, 637, 636, 635, 632, 630, 626, 701, 702, 166, 623, 705, 620, 617, 704, |
||
| 623 | |||
| 624 | 121, 121, 121, 121, 121, 121, 121, 121, 127, 127, 127, 127, 127, 127, 127, 127, 133, |
||
| 625 | 133, 133, 133, 133, 133, 133, 133, 163, 163, 163, 163, 163, 163, 163, 163, 166, 616, |
||
| 626 | 612, 608, 166, 166, 173, 607, 606, 173, 173, 173, 193, 605, 604, 601, 599, 193, 195, |
||
| 627 | 598, 596, 594, 585, 195, 229, 229, 583, 229, 229, 269, 582, 581, 580, 269, 269, 270, |
||
| 628 | 166, 574, 270, 270, 270, 276, 570, 276, 276, 276, 276, 276, 276, 174, 569, 564, 174, |
||
| 629 | 271, 562, 561, 555, 271, 271, 429, 429, 429, 553, 429, 429, 445, 552, 550, |
||
| 630 | |||
| 631 | 549, 445, 445, 548, 547, 546, 545, 544, 542, 540, 536, 535, 533, 530, 529, 528, 527, |
||
| 632 | 526, 524, 166, 516, 166, 513, 508, 506, 505, 504, 502, 501, 499, 497, 490, 489, 488, |
||
| 633 | 487, 484, 483, 482, 481, 477, 475, 474, 473, 472, 469, 468, 467, 466, 459, 458, 447, |
||
| 634 | 166, 443, 441, 439, 436, 435, 433, 428, 424, 418, 413, 411, 410, 408, 405, 404, 397, |
||
| 635 | 396, 395, 389, 388, 385, 384, 383, 379, 378, 377, 373, 372, 369, 368, 277, 166, 166, |
||
| 636 | 166, 358, 355, 346, 337, 335, 334, 333, 330, 328, 327, 324, 316, 310, 308, |
||
| 637 | |||
| 638 | 307, 295, 293, 292, 288, 277, 166, 192, 180, 178, 176, 175, 168, 167, 166, 165, 169, |
||
| 639 | 171, 170, 171, 235, 178, 176, 169, 228, 223, 217, 211, 179, 177, 194, 168, 192, 191, |
||
| 640 | 181, 180, 175, 170, 167, 165, 706, 19, 706, 706, 706, 706, 706, 706, 706, 706, 706, |
||
| 641 | 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, |
||
| 642 | 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, |
||
| 643 | 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, |
||
| 644 | |||
| 645 | 706, 706, 706, 706, 706, 706, 706, 706, 706, 706}; |
||
| 646 | |||
| 647 | static const flex_int16_t yy_chk[1411] = { |
||
| 648 | 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
||
| 649 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
||
| 650 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
||
| 651 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
||
| 652 | 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
||
| 653 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
||
| 654 | |||
| 655 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
||
| 656 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
||
| 657 | 3, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, |
||
| 658 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, |
||
| 659 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, |
||
| 660 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, |
||
| 661 | |||
| 662 | 5, 5, 5, 5, 7, 9, 9, 17, 17, 10, 10, 7, 18, 18, 41, 41, 32, |
||
| 663 | 47, 9, 7, 9, 32, 10, 697, 10, 42, 42, 7, 7, 7, 7, 7, 7, 7, |
||
| 664 | 37, 7, 7, 685, 7, 37, 7, 7, 7, 684, 7, 47, 7, 7, 7, 9, 13, |
||
| 665 | 13, 7, 10, 7, 14, 14, 7, 7, 7, 7, 7, 48, 7, 7, 7, 7, 11, |
||
| 666 | 11, 11, 12, 12, 12, 46, 49, 66, 50, 69, 11, 51, 46, 12, 51, 52, 86, |
||
| 667 | 48, 64, 67, 68, 86, 682, 69, 64, 158, 64, 13, 680, 675, 66, 666, |
||
| 668 | |||
| 669 | 14, 158, 49, 46, 50, 665, 661, 51, 52, 64, 67, 68, 11, 64, 69, 12, 15, |
||
| 670 | 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, |
||
| 671 | 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, |
||
| 672 | 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, |
||
| 673 | 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 38, |
||
| 674 | 38, 70, 65, 71, 74, 659, 72, 75, 71, 90, 77, 77, 65, 658, 74, |
||
| 675 | |||
| 676 | 89, 91, 78, 65, 74, 78, 75, 77, 81, 80, 657, 71, 80, 82, 70, 65, 72, |
||
| 677 | 90, 82, 38, 65, 77, 65, 74, 91, 78, 78, 92, 89, 75, 93, 97, 99, 81, |
||
| 678 | 38, 38, 82, 80, 105, 104, 103, 107, 103, 104, 107, 108, 92, 103, 103, 93, 106, |
||
| 679 | 107, 654, 109, 97, 104, 111, 99, 113, 112, 106, 105, 109, 103, 107, 103, 110, 104, |
||
| 680 | 104, 114, 108, 110, 113, 115, 104, 111, 116, 117, 106, 118, 116, 109, 112, 106, 126, |
||
| 681 | 109, 120, 132, 114, 110, 116, 120, 119, 136, 119, 113, 115, 119, 150, 150, |
||
| 682 | |||
| 683 | 117, 157, 118, 173, 173, 159, 181, 182, 116, 120, 185, 203, 126, 116, 183, 132, 184, |
||
| 684 | 186, 187, 189, 119, 136, 119, 157, 188, 647, 637, 159, 197, 203, 159, 190, 182, 150, |
||
| 685 | 181, 185, 200, 183, 173, 184, 186, 187, 202, 202, 204, 188, 157, 189, 150, 150, 159, |
||
| 686 | 159, 190, 173, 173, 196, 197, 206, 196, 200, 204, 205, 204, 207, 208, 202, 202, 213, |
||
| 687 | 215, 208, 216, 217, 204, 222, 223, 634, 218, 220, 206, 224, 196, 196, 218, 225, 205, |
||
| 688 | 226, 207, 208, 229, 230, 234, 216, 222, 229, 217, 213, 215, 242, 220, 218, |
||
| 689 | |||
| 690 | 224, 236, 223, 218, 227, 244, 226, 231, 231, 227, 237, 225, 245, 247, 246, 248, 249, |
||
| 691 | 230, 234, 251, 227, 255, 236, 254, 259, 242, 262, 227, 244, 247, 231, 245, 246, 252, |
||
| 692 | 248, 237, 252, 252, 256, 257, 245, 247, 259, 260, 249, 262, 254, 251, 264, 255, 265, |
||
| 693 | 266, 267, 268, 272, 267, 267, 270, 270, 275, 278, 256, 257, 273, 285, 281, 260, 267, |
||
| 694 | 282, 264, 287, 286, 293, 304, 268, 292, 294, 298, 265, 266, 309, 316, 273, 278, 272, |
||
| 695 | 300, 306, 275, 317, 285, 305, 282, 270, 281, 286, 307, 292, 293, 287, 294, |
||
| 696 | |||
| 697 | 298, 304, 272, 309, 316, 273, 275, 270, 270, 305, 300, 318, 320, 317, 306, 321, 307, |
||
| 698 | 322, 328, 331, 339, 325, 326, 333, 338, 335, 336, 340, 334, 343, 341, 344, 338, 345, |
||
| 699 | 631, 629, 350, 320, 321, 318, 325, 326, 353, 339, 348, 322, 328, 331, 333, 334, 335, |
||
| 700 | 336, 340, 341, 343, 338, 344, 347, 347, 354, 356, 345, 347, 348, 350, 358, 360, 362, |
||
| 701 | 365, 366, 353, 364, 369, 371, 372, 370, 373, 374, 376, 379, 380, 366, 382, 383, 381, |
||
| 702 | 384, 389, 354, 356, 360, 362, 390, 364, 358, 365, 369, 370, 372, 397, 373, |
||
| 703 | |||
| 704 | 374, 371, 399, 403, 379, 380, 376, 381, 384, 366, 382, 383, 390, 401, 389, 364, 408, |
||
| 705 | 409, 412, 415, 416, 417, 418, 419, 420, 399, 397, 422, 424, 435, 428, 403, 429, 429, |
||
| 706 | 437, 408, 401, 429, 440, 439, 441, 443, 417, 416, 415, 409, 412, 444, 419, 447, 418, |
||
| 707 | 448, 420, 428, 451, 422, 424, 435, 439, 440, 449, 452, 437, 453, 454, 456, 444, 465, |
||
| 708 | 441, 443, 467, 471, 449, 464, 447, 473, 474, 451, 448, 477, 494, 479, 490, 496, 498, |
||
| 709 | 497, 452, 499, 456, 506, 465, 453, 454, 467, 464, 500, 471, 474, 503, 505, |
||
| 710 | |||
| 711 | 449, 494, 477, 473, 479, 490, 497, 507, 508, 513, 499, 496, 498, 514, 516, 517, 518, |
||
| 712 | 506, 500, 520, 521, 503, 505, 526, 528, 529, 530, 532, 507, 536, 533, 537, 513, 508, |
||
| 713 | 540, 538, 551, 544, 518, 514, 548, 514, 516, 517, 529, 560, 526, 520, 521, 530, 536, |
||
| 714 | 552, 528, 533, 562, 532, 538, 563, 565, 537, 544, 518, 540, 566, 551, 548, 568, 571, |
||
| 715 | 560, 574, 552, 575, 578, 580, 582, 571, 584, 562, 586, 628, 589, 597, 591, 602, 566, |
||
| 716 | 563, 565, 604, 607, 568, 610, 609, 612, 613, 575, 578, 580, 574, 571, 615, |
||
| 717 | |||
| 718 | 617, 620, 582, 589, 584, 621, 586, 591, 622, 597, 626, 602, 604, 607, 609, 623, 625, |
||
| 719 | 612, 610, 630, 633, 613, 615, 636, 620, 617, 639, 640, 641, 643, 642, 622, 644, 621, |
||
| 720 | 624, 626, 646, 648, 623, 651, 652, 676, 656, 633, 625, 660, 636, 630, 662, 671, 640, |
||
| 721 | 672, 643, 641, 639, 642, 673, 644, 674, 646, 648, 678, 687, 652, 651, 656, 676, 662, |
||
| 722 | 660, 693, 695, 700, 671, 702, 672, 618, 616, 611, 608, 673, 606, 674, 605, 687, 678, |
||
| 723 | 603, 601, 600, 599, 590, 587, 581, 693, 695, 577, 576, 702, 573, 570, 700, |
||
| 724 | |||
| 725 | 707, 707, 707, 707, 707, 707, 707, 707, 708, 708, 708, 708, 708, 708, 708, 708, 709, |
||
| 726 | 709, 709, 709, 709, 709, 709, 709, 710, 710, 710, 710, 710, 710, 710, 710, 711, 569, |
||
| 727 | 564, 557, 711, 711, 712, 556, 555, 712, 712, 712, 713, 554, 553, 549, 546, 713, 714, |
||
| 728 | 545, 543, 539, 527, 714, 715, 715, 525, 715, 715, 716, 524, 523, 522, 716, 716, 717, |
||
| 729 | 519, 515, 717, 717, 717, 718, 511, 718, 718, 718, 718, 718, 718, 719, 510, 504, 719, |
||
| 730 | 720, 502, 501, 495, 720, 720, 721, 721, 721, 493, 721, 721, 722, 491, 488, |
||
| 731 | |||
| 732 | 487, 722, 722, 486, 485, 482, 481, 480, 478, 475, 469, 468, 466, 463, 461, 460, 458, |
||
| 733 | 457, 455, 450, 446, 445, 442, 436, 434, 433, 432, 426, 425, 423, 421, 414, 413, 411, |
||
| 734 | 410, 407, 406, 405, 404, 398, 395, 393, 392, 391, 388, 387, 386, 385, 378, 377, 363, |
||
| 735 | 361, 359, 357, 355, 352, 351, 349, 346, 342, 337, 332, 330, 329, 327, 324, 323, 313, |
||
| 736 | 312, 311, 302, 301, 297, 296, 295, 291, 289, 288, 284, 283, 280, 279, 277, 274, 271, |
||
| 737 | 269, 261, 258, 250, 243, 241, 240, 239, 235, 233, 232, 228, 219, 214, 211, |
||
| 738 | |||
| 739 | 210, 201, 199, 198, 191, 164, 162, 161, 155, 154, 153, 151, 146, 142, 140, 139, 131, |
||
| 740 | 125, 124, 102, 98, 88, 87, 84, 83, 79, 76, 73, 63, 62, 60, 59, 55, 54, |
||
| 741 | 45, 43, 39, 35, 28, 24, 19, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, |
||
| 742 | 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, |
||
| 743 | 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, |
||
| 744 | 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, |
||
| 745 | |||
| 746 | 706, 706, 706, 706, 706, 706, 706, 706, 706, 706}; |
||
| 747 | |||
| 748 | static yy_state_type yy_last_accepting_state; |
||
| 749 | static char *yy_last_accepting_cpos; |
||
| 750 | |||
| 751 | extern int yy_flex_debug; |
||
| 752 | int yy_flex_debug = 0; |
||
| 753 | |||
| 754 | /* The intent behind this definition is that it'll catch |
||
| 755 | * any uses of REJECT which flex missed. |
||
| 756 | */ |
||
| 757 | #define REJECT reject_used_but_not_detected |
||
| 758 | #define yymore() yymore_used_but_not_detected |
||
| 759 | #define YY_MORE_ADJ 0 |
||
| 760 | #define YY_RESTORE_YY_MORE_OFFSET |
||
| 761 | char *yytext; |
||
| 762 | #line 1 "acf_lex.l" |
||
| 763 | #line 2 "acf_lex.l" |
||
| 764 | /* |
||
| 765 | * $Id: acf_lex.l,v 1.2 2004/06/22 21:44:10 mjames Exp $ * |
||
| 766 | * |
||
| 767 | * $Log: acf_lex.l,v $ |
||
| 768 | * Revision 1.2 2004/06/22 21:44:10 mjames |
||
| 769 | * Firrst build most files |
||
| 770 | * |
||
| 771 | * Revision 1.30 2002/10/02 18:46:34 MJAMES |
||
| 772 | * attribute is recognised in acfp syntax as well as vhdl |
||
| 773 | * |
||
| 774 | * Revision 1.29 2002/09/27 22:24:14 MJAMES |
||
| 775 | * Separated out a quote as a token |
||
| 776 | * Added VHDL_CONN token |
||
| 777 | * |
||
| 778 | * Revision 1.28 2002/09/16 11:03:50 mjames |
||
| 779 | * Added some of the generic string types to the input parser. |
||
| 780 | * |
||
| 781 | * Revision 1.27 2002/09/09 10:14:58 mjames |
||
| 782 | * Modified expression parser to match CC as previous one was |
||
| 783 | * broken |
||
| 784 | * |
||
| 785 | * Revision 1.26 2002/08/23 14:21:55 mjames |
||
| 786 | * Added the <VHDL> string keyword. |
||
| 787 | * |
||
| 788 | * Revision 1.25 2002/08/19 14:31:27 mjames |
||
| 789 | * Removed an incompatibility with env_string generics where the output |
||
| 790 | * of Vertical caused an error under some circumstances. |
||
| 791 | * |
||
| 792 | * Revision 1.24 2002/08/14 11:58:43 mjames |
||
| 793 | * Corrected end-of-file behaviour that resulted in an infinite loop |
||
| 794 | * |
||
| 795 | * Revision 1.23 2002/08/06 12:56:21 mjames |
||
| 796 | * Merge in from latest version |
||
| 797 | * |
||
| 798 | * |
||
| 799 | * Revision 1.25 2002/08/06 09:25:23 mjames |
||
| 800 | * Changed file include handler for an improved one. |
||
| 801 | * Improvements created as a part of a microcode assembler |
||
| 802 | * |
||
| 803 | * Revision 1.24 2002/03/22 16:16:28 mjames |
||
| 804 | * Modifications to undo over-zealous checking of |
||
| 805 | * current chip even in incorrect scenarios. |
||
| 806 | * |
||
| 807 | * Revision 1.23 2002/03/21 17:11:32 mjames |
||
| 808 | * Allowed '[' and ']' in acfp file syntax for pin identifiers in Quartus |
||
| 809 | * |
||
| 810 | * Revision 1.22 2002/01/21 09:28:49 mjames |
||
| 811 | * coredump when opening non-existent Verilog include file due to |
||
| 812 | * use of NULL file pointer. Avoided by not using file pointer until certain |
||
| 813 | * that file was opened properly. |
||
| 814 | * |
||
| 815 | * Revision 1.21 2002/01/16 10:04:35 mjames |
||
| 816 | * Added package definitions to VHDL syntax |
||
| 817 | * According to report by John Marquis |
||
| 818 | * |
||
| 819 | * Revision 1.20 2001/12/13 22:12:16 mjames |
||
| 820 | * Vertical now supports nested include database files |
||
| 821 | * This allows wrappers around 'pure' VHDL or Verilog files |
||
| 822 | * |
||
| 823 | * Revision 1.19 2001/12/11 21:29:56 mjames |
||
| 824 | * Verilog syntax now read in by Vertical allows pin templates |
||
| 825 | * defined by Certify to be used. |
||
| 826 | * |
||
| 827 | * Revision 1.18 2001/11/30 22:21:19 mjames |
||
| 828 | * Modifying Verilog reading syntax to accept valid code. |
||
| 829 | * |
||
| 830 | * Revision 1.17 2001/11/19 10:41:54 mjames |
||
| 831 | * Merged back DTC release |
||
| 832 | * |
||
| 833 | * Revision 1.16.2.1 2001/11/16 15:10:59 mjames |
||
| 834 | * Removed an unecessary local variable |
||
| 835 | * |
||
| 836 | * Revision 1.16 2001/10/31 22:19:56 mjames |
||
| 837 | * Tidying up problematical comments caused by CVS |
||
| 838 | * 'intelligent' comment guessing |
||
| 839 | * |
||
| 840 | * Revision 1.15 2001/09/28 14:34:13 mjames |
||
| 841 | * FIxed yydebug variable to exist when YYDEBUG macro |
||
| 842 | * is not defined. Otherwise linker error will be reported. |
||
| 843 | * |
||
| 844 | * Revision 1.14 2001/09/16 20:01:06 mjames |
||
| 845 | * tidying |
||
| 846 | * |
||
| 847 | * Revision 1.13 2001/07/09 09:36:30 mjames |
||
| 848 | * Amending the syntax and end of file behaviour to allow Quartus pin fit files |
||
| 849 | * to be read . |
||
| 850 | * They are harder to read because they are not block structured. The end of file is used as a |
||
| 851 | * marker. Vertical has been persuaded to handle end of file events properly. |
||
| 852 | * |
||
| 853 | * Revision 1.12 2001/07/06 12:50:36 mjames |
||
| 854 | * Added the ability to read in Quartus pinfit files |
||
| 855 | * |
||
| 856 | * Revision 1.11 2001/07/05 15:12:36 MJAMES |
||
| 857 | * Amended to read Quartus pin files. not fully working |
||
| 858 | * |
||
| 859 | * Revision 1.10 2001/06/06 12:10:27 mjames |
||
| 860 | * Move from HPUX |
||
| 861 | * |
||
| 862 | * Revision 1.9 2001/04/30 10:01:08 Administrator |
||
| 863 | * Have finally got the Verilog/VHDL comment pragma parser working. |
||
| 864 | * |
||
| 865 | * Revision 1.8 2001/04/30 07:55:53 mjames |
||
| 866 | * Improving parsing of Verilog, still a few loose ends |
||
| 867 | * |
||
| 868 | * Revision 1.7 2001/04/27 22:30:10 mjames |
||
| 869 | * Starting to get comment and pragma handling OK. |
||
| 870 | * Added correct header file includes to lx_support.c |
||
| 871 | * |
||
| 872 | * Revision 1.6 2001/03/29 08:27:06 mjames |
||
| 873 | * Converted frbread for use with the newer files from the drawing office |
||
| 874 | * |
||
| 875 | * Revision 1.5 2001/02/21 16:37:33 mjames |
||
| 876 | * Provided a new method of defining port maps with VHDL which allows for short |
||
| 877 | * cut definitions. |
||
| 878 | * |
||
| 879 | * Cleaned up TCL/Tk interfacing issues |
||
| 880 | * |
||
| 881 | * Revision 1.4 2001/01/02 07:53:51 mjames |
||
| 882 | * Made changes to allow for interface with TCL/Tk |
||
| 883 | * |
||
| 884 | * Revision 1.3 2000/12/04 12:55:48 mjames |
||
| 885 | * Copied files back from HPUX to create definitive CygWin version |
||
| 886 | * |
||
| 887 | * Then amended the syntax of ACFP files so that a/2 was no longer |
||
| 888 | * seen as "a/2" but instead as "a" divided_by 2. This was a throwback |
||
| 889 | * to some of the earlier efforts at variant syntax for VHDL and ACFP |
||
| 890 | * parsing. |
||
| 891 | * |
||
| 892 | * Revision 1.2 2000/10/19 22:19:49 mjames |
||
| 893 | * removed header lines |
||
| 894 | * |
||
| 895 | * Revision 1.1.1.1 2000/10/19 21:58:34 mjames |
||
| 896 | * Mike put it here |
||
| 897 | * |
||
| 898 | * |
||
| 899 | */ |
||
| 900 | |||
| 901 | #include <ctype.h> |
||
| 902 | #include <stdio.h> |
||
| 903 | #include <stdlib.h> |
||
| 904 | #include <string.h> |
||
| 905 | |||
| 906 | /* see makefile for how this appears */ |
||
| 907 | |||
| 908 | #include "acf_yacc.h" |
||
| 909 | #include "cmdlog.h" |
||
| 910 | #include "cmdparse.h" |
||
| 911 | #include "cmdutil.h" |
||
| 912 | #include "database.h" |
||
| 913 | #include "expression.h" |
||
| 914 | #include "generic.h" |
||
| 915 | #include "lx_support.h" |
||
| 916 | #include "vertcl_main.h" |
||
| 917 | #include "yywrap.h" |
||
| 918 | |||
| 919 | #define YYLMAX MAXIDLEN |
||
| 920 | |||
| 921 | #if !defined YY_START |
||
| 922 | #define YY_START (yybgin - 1 - yysvec) |
||
| 923 | #endif |
||
| 924 | |||
| 925 | /* YY_INPUT redefinition |
||
| 926 | keep the original definition, replace with a function which will |
||
| 927 | check a flag and either use the original file reading version or read from |
||
| 928 | a string */ |
||
| 929 | |||
| 930 | #define MAX_INCLUDE_DEPTH 10 |
||
| 931 | |||
| 932 | #ident \ |
||
| 933 | "@(#)$Header: C:/cvsroot/Vert03/acf_src/acf_lex.l,v 1.2 2004/06/22 21:44:10 mjames Exp $" |
||
| 934 | |||
| 935 | /* state stores for include files */ |
||
| 936 | YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH]; |
||
| 937 | struct str *incl_first = NULL, *incl_last = NULL; |
||
| 938 | char *filename[MAX_INCLUDE_DEPTH]; |
||
| 939 | int old_linenumber[MAX_INCLUDE_DEPTH]; |
||
| 940 | FILE *handles[MAX_INCLUDE_DEPTH]; |
||
| 941 | |||
| 942 | int include_stack_ptr = 0; |
||
| 943 | |||
| 944 | char lex_from_string = 0; |
||
| 945 | |||
| 946 | extern int errorseen; |
||
| 947 | extern int yyval; |
||
| 948 | extern int yydebug; |
||
| 949 | extern int lineno; |
||
| 950 | |||
| 951 | extern int inside_block; /* flag to help 'generic' context dependence */ |
||
| 952 | |||
| 953 | generic_info_t info; |
||
| 954 | |||
| 955 | int prev_begin = -1; |
||
| 956 | int prev_begin_include = -1; |
||
| 957 | int read_state = 1; /* start off by reading */ |
||
| 958 | |||
| 959 | int comment_type = 0; |
||
| 960 | |||
| 961 | void lex_exec_line (void); |
||
| 962 | |||
| 963 | void skip_to_eol (void); |
||
| 964 | void skip_c_comment (void); |
||
| 965 | void exit_lex_block (void); |
||
| 966 | |||
| 967 | int my_yyinput (char *buf, int max_size); |
||
| 968 | |||
| 969 | static char *yyerr_start_names[] = {"INITIAL", |
||
| 970 | "vhdl", |
||
| 971 | "Verilog", |
||
| 972 | "ACFplus", |
||
| 973 | "skipping", |
||
| 974 | "C (Verilog) comment", |
||
| 975 | "VHDL comment", |
||
| 976 | "Command line expression", |
||
| 977 | "Include file area"}; |
||
| 978 | |||
| 979 | /* token forced into LEX by method described in |
||
| 980 | Lex & Yacc , O'Reilly page 206 */ |
||
| 981 | int start_grammar; |
||
| 982 | |||
| 983 | #line 1232 "acf_lex.c" |
||
| 984 | /* removed '.' '-' ':' '/' ',' from here as it is now a unique token */ |
||
| 985 | /* Permit '$' as this could become a variable to be expanded in make_string */ |
||
| 986 | /* do not permit square brackets in ACFP syntax inside strings (to be handled properly) */ |
||
| 987 | /* no / in this set, as its a valid arithmetic operator */ |
||
| 988 | /* lex directive */ |
||
| 989 | /* can have VHDL Verilog and ACFP keywords defined exclusively */ |
||
| 990 | /* s inclusive set */ |
||
| 991 | |||
| 992 | /* expression tokens are used on the command line */ |
||
| 993 | |||
| 994 | /* copied almost verbatim from the examples given */ |
||
| 995 | |||
| 996 | #line 1245 "acf_lex.c" |
||
| 997 | |||
| 998 | #define INITIAL 0 |
||
| 999 | #define vhdl 1 |
||
| 1000 | #define vlog 2 |
||
| 1001 | #define acfp 3 |
||
| 1002 | #define pragma 4 |
||
| 1003 | #define vert_c_comment 5 |
||
| 1004 | #define vert_vhdl_comment 6 |
||
| 1005 | #define expr 7 |
||
| 1006 | #define incl 8 |
||
| 1007 | |||
| 1008 | #ifndef YY_NO_UNISTD_H |
||
| 1009 | /* Special case for "unistd.h", since it is non-ANSI. We include it way |
||
| 1010 | * down here because we want the user's section 1 to have been scanned first. |
||
| 1011 | * The user has a chance to override it with an option. |
||
| 1012 | */ |
||
| 1013 | #include <unistd.h> |
||
| 1014 | #endif |
||
| 1015 | |||
| 1016 | #ifndef YY_EXTRA_TYPE |
||
| 1017 | #define YY_EXTRA_TYPE void * |
||
| 1018 | #endif |
||
| 1019 | |||
| 1020 | static int yy_init_globals (void); |
||
| 1021 | |||
| 1022 | /* Accessor methods to globals. |
||
| 1023 | These are made visible to non-reentrant scanners for convenience. */ |
||
| 1024 | |||
| 1025 | int yylex_destroy (void); |
||
| 1026 | |||
| 1027 | int yyget_debug (void); |
||
| 1028 | |||
| 1029 | void yyset_debug (int debug_flag); |
||
| 1030 | |||
| 1031 | YY_EXTRA_TYPE yyget_extra (void); |
||
| 1032 | |||
| 1033 | void yyset_extra (YY_EXTRA_TYPE user_defined); |
||
| 1034 | |||
| 1035 | FILE *yyget_in (void); |
||
| 1036 | |||
| 1037 | void yyset_in (FILE *_in_str); |
||
| 1038 | |||
| 1039 | FILE *yyget_out (void); |
||
| 1040 | |||
| 1041 | void yyset_out (FILE *_out_str); |
||
| 1042 | |||
| 1043 | int yyget_leng (void); |
||
| 1044 | |||
| 1045 | char *yyget_text (void); |
||
| 1046 | |||
| 1047 | int yyget_lineno (void); |
||
| 1048 | |||
| 1049 | void yyset_lineno (int _line_number); |
||
| 1050 | |||
| 1051 | /* Macros after this point can all be overridden by user definitions in |
||
| 1052 | * section 1. |
||
| 1053 | */ |
||
| 1054 | |||
| 1055 | #ifndef YY_SKIP_YYWRAP |
||
| 1056 | #ifdef __cplusplus |
||
| 1057 | extern "C" int yywrap (void); |
||
| 1058 | #else |
||
| 1059 | extern int yywrap (void); |
||
| 1060 | #endif |
||
| 1061 | #endif |
||
| 1062 | |||
| 1063 | #ifndef YY_NO_UNPUT |
||
| 1064 | |||
| 1065 | static void yyunput (int c, char *buf_ptr); |
||
| 1066 | |||
| 1067 | #endif |
||
| 1068 | |||
| 1069 | #ifndef yytext_ptr |
||
| 1070 | static void yy_flex_strncpy (char *, const char *, int); |
||
| 1071 | #endif |
||
| 1072 | |||
| 1073 | #ifdef YY_NEED_STRLEN |
||
| 1074 | static int yy_flex_strlen (const char *); |
||
| 1075 | #endif |
||
| 1076 | |||
| 1077 | #ifndef YY_NO_INPUT |
||
| 1078 | #ifdef __cplusplus |
||
| 1079 | static int yyinput (void); |
||
| 1080 | #else |
||
| 1081 | static int input (void); |
||
| 1082 | #endif |
||
| 1083 | |||
| 1084 | #endif |
||
| 1085 | |||
| 1086 | /* Amount of stuff to slurp up with each read. */ |
||
| 1087 | #ifndef YY_READ_BUF_SIZE |
||
| 1088 | #ifdef __ia64__ |
||
| 1089 | /* On IA-64, the buffer size is 16k, not 8k */ |
||
| 1090 | #define YY_READ_BUF_SIZE 16384 |
||
| 1091 | #else |
||
| 1092 | #define YY_READ_BUF_SIZE 8192 |
||
| 1093 | #endif /* __ia64__ */ |
||
| 1094 | #endif |
||
| 1095 | |||
| 1096 | /* Copy whatever the last rule matched to the standard output. */ |
||
| 1097 | #ifndef ECHO |
||
| 1098 | /* This used to be an fputs(), but since the string might contain NUL's, |
||
| 1099 | * we now use fwrite(). |
||
| 1100 | */ |
||
| 1101 | #define ECHO \ |
||
| 1102 | do \ |
||
| 1103 | { \ |
||
| 1104 | if (fwrite (yytext, (size_t) yyleng, 1, yyout)) \ |
||
| 1105 | { \ |
||
| 1106 | } \ |
||
| 1107 | } while (0) |
||
| 1108 | #endif |
||
| 1109 | |||
| 1110 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, |
||
| 1111 | * is returned in "result". |
||
| 1112 | */ |
||
| 1113 | #ifndef YY_INPUT |
||
| 1114 | #define YY_INPUT(buf, result, max_size) \ |
||
| 1115 | if (YY_CURRENT_BUFFER_LVALUE->yy_is_interactive) \ |
||
| 1116 | { \ |
||
| 1117 | int c = '*'; \ |
||
| 1118 | int n; \ |
||
| 1119 | for (n = 0; n < max_size && (c = getc (yyin)) != EOF && c != '\n'; ++n) \ |
||
| 1120 | buf[n] = (char) c; \ |
||
| 1121 | if (c == '\n') \ |
||
| 1122 | buf[n++] = (char) c; \ |
||
| 1123 | if (c == EOF && ferror (yyin)) \ |
||
| 1124 | YY_FATAL_ERROR ("input in flex scanner failed"); \ |
||
| 1125 | result = n; \ |
||
| 1126 | } \ |
||
| 1127 | else \ |
||
| 1128 | { \ |
||
| 1129 | errno = 0; \ |
||
| 1130 | while ((result = (int) fread (buf, 1, (yy_size_t) max_size, yyin)) == 0 && \ |
||
| 1131 | ferror (yyin)) \ |
||
| 1132 | { \ |
||
| 1133 | if (errno != EINTR) \ |
||
| 1134 | { \ |
||
| 1135 | YY_FATAL_ERROR ("input in flex scanner failed"); \ |
||
| 1136 | break; \ |
||
| 1137 | } \ |
||
| 1138 | errno = 0; \ |
||
| 1139 | clearerr (yyin); \ |
||
| 1140 | } \ |
||
| 1141 | } |
||
| 1142 | |||
| 1143 | #endif |
||
| 1144 | |||
| 1145 | /* No semi-colon after return; correct usage is to write "yyterminate();" - |
||
| 1146 | * we don't want an extra ';' after the "return" because that will cause |
||
| 1147 | * some compilers to complain about unreachable statements. |
||
| 1148 | */ |
||
| 1149 | #ifndef yyterminate |
||
| 1150 | #define yyterminate() return YY_NULL |
||
| 1151 | #endif |
||
| 1152 | |||
| 1153 | /* Number of entries by which start-condition stack grows. */ |
||
| 1154 | #ifndef YY_START_STACK_INCR |
||
| 1155 | #define YY_START_STACK_INCR 25 |
||
| 1156 | #endif |
||
| 1157 | |||
| 1158 | /* Report a fatal error. */ |
||
| 1159 | #ifndef YY_FATAL_ERROR |
||
| 1160 | #define YY_FATAL_ERROR(msg) yy_fatal_error (msg) |
||
| 1161 | #endif |
||
| 1162 | |||
| 1163 | /* end tables serialization structures and prototypes */ |
||
| 1164 | |||
| 1165 | /* Default declaration of generated scanner - a define so the user can |
||
| 1166 | * easily add parameters. |
||
| 1167 | */ |
||
| 1168 | #ifndef YY_DECL |
||
| 1169 | #define YY_DECL_IS_OURS 1 |
||
| 1170 | |||
| 1171 | extern int yylex (void); |
||
| 1172 | |||
| 1173 | #define YY_DECL int yylex (void) |
||
| 1174 | #endif /* !YY_DECL */ |
||
| 1175 | |||
| 1176 | /* Code executed at the beginning of each rule, after yytext and yyleng |
||
| 1177 | * have been set up. |
||
| 1178 | */ |
||
| 1179 | #ifndef YY_USER_ACTION |
||
| 1180 | #define YY_USER_ACTION |
||
| 1181 | #endif |
||
| 1182 | |||
| 1183 | /* Code executed at the end of each rule. */ |
||
| 1184 | #ifndef YY_BREAK |
||
| 1185 | #define YY_BREAK /*LINTED*/ break; |
||
| 1186 | #endif |
||
| 1187 | |||
| 1188 | #define YY_RULE_SETUP YY_USER_ACTION |
||
| 1189 | |||
| 1190 | /** The main scanner function which does all the work. |
||
| 1191 | */ |
||
| 1192 | YY_DECL |
||
| 1193 | { |
||
| 1194 | yy_state_type yy_current_state; |
||
| 1195 | char *yy_cp, *yy_bp; |
||
| 1196 | int yy_act; |
||
| 1197 | |||
| 1198 | if (!(yy_init)) |
||
| 1199 | { |
||
| 1200 | (yy_init) = 1; |
||
| 1201 | |||
| 1202 | #ifdef YY_USER_INIT |
||
| 1203 | YY_USER_INIT; |
||
| 1204 | #endif |
||
| 1205 | |||
| 1206 | if (!(yy_start)) |
||
| 1207 | (yy_start) = 1; /* first start state */ |
||
| 1208 | |||
| 1209 | if (!yyin) |
||
| 1210 | yyin = stdin; |
||
| 1211 | |||
| 1212 | if (!yyout) |
||
| 1213 | yyout = stdout; |
||
| 1214 | |||
| 1215 | if (!YY_CURRENT_BUFFER) |
||
| 1216 | { |
||
| 1217 | yyensure_buffer_stack (); |
||
| 1218 | YY_CURRENT_BUFFER_LVALUE = yy_create_buffer (yyin, YY_BUF_SIZE); |
||
| 1219 | } |
||
| 1220 | |||
| 1221 | yy_load_buffer_state (); |
||
| 1222 | } |
||
| 1223 | |||
| 1224 | { |
||
| 1225 | #line 292 "acf_lex.l" |
||
| 1226 | |||
| 1227 | #line 296 "acf_lex.l" |
||
| 1228 | /* Page 206, Lex & Yacc , O'Reilly */ |
||
| 1229 | /* solution to multiple lexers */ |
||
| 1230 | |||
| 1231 | if (start_grammar) |
||
| 1232 | { |
||
| 1233 | int tmp = start_grammar; |
||
| 1234 | start_grammar = 0; |
||
| 1235 | return tmp; |
||
| 1236 | } |
||
| 1237 | |||
| 1238 | #line 1487 "acf_lex.c" |
||
| 1239 | |||
| 1240 | while (/*CONSTCOND*/ 1) /* loops until end-of-file is reached */ |
||
| 1241 | { |
||
| 1242 | yy_cp = (yy_c_buf_p); |
||
| 1243 | |||
| 1244 | /* Support of yytext. */ |
||
| 1245 | *yy_cp = (yy_hold_char); |
||
| 1246 | |||
| 1247 | /* yy_bp points to the position in yy_ch_buf of the start of |
||
| 1248 | * the current run. |
||
| 1249 | */ |
||
| 1250 | yy_bp = yy_cp; |
||
| 1251 | |||
| 1252 | yy_current_state = (yy_start); |
||
| 1253 | yy_match: |
||
| 1254 | do |
||
| 1255 | { |
||
| 1256 | YY_CHAR yy_c = yy_ec[YY_SC_TO_UI (*yy_cp)]; |
||
| 1257 | if (yy_accept[yy_current_state]) |
||
| 1258 | { |
||
| 1259 | (yy_last_accepting_state) = yy_current_state; |
||
| 1260 | (yy_last_accepting_cpos) = yy_cp; |
||
| 1261 | } |
||
| 1262 | while (yy_chk[yy_base[yy_current_state] + yy_c] != |
||
| 1263 | yy_current_state) |
||
| 1264 | { |
||
| 1265 | yy_current_state = (int) yy_def[yy_current_state]; |
||
| 1266 | if (yy_current_state >= 707) |
||
| 1267 | yy_c = yy_meta[yy_c]; |
||
| 1268 | } |
||
| 1269 | yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; |
||
| 1270 | ++yy_cp; |
||
| 1271 | } while (yy_base[yy_current_state] != 1342); |
||
| 1272 | |||
| 1273 | yy_find_action: |
||
| 1274 | yy_act = yy_accept[yy_current_state]; |
||
| 1275 | if (yy_act == 0) |
||
| 1276 | { /* have to back up */ |
||
| 1277 | yy_cp = (yy_last_accepting_cpos); |
||
| 1278 | yy_current_state = (yy_last_accepting_state); |
||
| 1279 | yy_act = yy_accept[yy_current_state]; |
||
| 1280 | } |
||
| 1281 | |||
| 1282 | YY_DO_BEFORE_ACTION; |
||
| 1283 | |||
| 1284 | do_action: /* This label is used only to access EOF actions. */ |
||
| 1285 | |||
| 1286 | switch (yy_act) |
||
| 1287 | { /* beginning of action switch */ |
||
| 1288 | case 0: /* must back up */ |
||
| 1289 | /* undo the effects of YY_DO_BEFORE_ACTION */ |
||
| 1290 | *yy_cp = (yy_hold_char); |
||
| 1291 | yy_cp = (yy_last_accepting_cpos); |
||
| 1292 | yy_current_state = (yy_last_accepting_state); |
||
| 1293 | goto yy_find_action; |
||
| 1294 | |||
| 1295 | case 1: |
||
| 1296 | YY_RULE_SETUP |
||
| 1297 | #line 308 "acf_lex.l" |
||
| 1298 | { |
||
| 1299 | prev_begin_include = YY_START; |
||
| 1300 | BEGIN (incl); |
||
| 1301 | } |
||
| 1302 | YY_BREAK |
||
| 1303 | case 2: |
||
| 1304 | YY_RULE_SETUP |
||
| 1305 | #line 310 "acf_lex.l" |
||
| 1306 | { |
||
| 1307 | prev_begin_include = YY_START; |
||
| 1308 | BEGIN (incl); |
||
| 1309 | } |
||
| 1310 | YY_BREAK |
||
| 1311 | case 3: |
||
| 1312 | YY_RULE_SETUP |
||
| 1313 | #line 313 "acf_lex.l" |
||
| 1314 | /* eat the whitespace */ |
||
| 1315 | YY_BREAK |
||
| 1316 | case 4: |
||
| 1317 | YY_RULE_SETUP |
||
| 1318 | #line 314 "acf_lex.l" |
||
| 1319 | { /* got the include file name */ |
||
| 1320 | if (include_stack_ptr >= MAX_INCLUDE_DEPTH) |
||
| 1321 | { |
||
| 1322 | Log ( |
||
| 1323 | LOG_ERROR, |
||
| 1324 | "-- Includes nested too deeply\n"); |
||
| 1325 | exit (1); |
||
| 1326 | } |
||
| 1327 | if (errorseen) |
||
| 1328 | { |
||
| 1329 | Log ( |
||
| 1330 | LOG_ERROR, |
||
| 1331 | "-- skipping include: previous error\n"); |
||
| 1332 | exit (1); |
||
| 1333 | } |
||
| 1334 | |||
| 1335 | /* printf("++ Using |
||
| 1336 | * Begin=%s\n",yyerr_start_names[YY_START]); */ |
||
| 1337 | |||
| 1338 | include_stack[include_stack_ptr] = YY_CURRENT_BUFFER; |
||
| 1339 | /* expand arguments in string */ |
||
| 1340 | |||
| 1341 | old_linenumber[include_stack_ptr] = lineno; |
||
| 1342 | |||
| 1343 | handles[include_stack_ptr] = yyin; |
||
| 1344 | |||
| 1345 | include_stack_ptr++; |
||
| 1346 | |||
| 1347 | filename[include_stack_ptr] = strdup (yytext); |
||
| 1348 | |||
| 1349 | yyin = fopen (filename[include_stack_ptr], "r"); |
||
| 1350 | |||
| 1351 | if (!yyin) |
||
| 1352 | { |
||
| 1353 | Log ( |
||
| 1354 | LOG_ERROR, |
||
| 1355 | "-- cannot open include file '%s'\n", |
||
| 1356 | filename[include_stack_ptr]); |
||
| 1357 | include_stack_ptr -= 1; |
||
| 1358 | lineno = old_linenumber[include_stack_ptr]; |
||
| 1359 | /* yy_switch_to_buffer( |
||
| 1360 | include_stack[include_stack_ptr] |
||
| 1361 | ); |
||
| 1362 | */ |
||
| 1363 | yyin = handles[include_stack_ptr]; |
||
| 1364 | } |
||
| 1365 | else |
||
| 1366 | { |
||
| 1367 | lineno = 1; |
||
| 1368 | |||
| 1369 | yy_switch_to_buffer ( |
||
| 1370 | |||
| 1371 | yy_create_buffer (yyin, YY_BUF_SIZE)); |
||
| 1372 | } |
||
| 1373 | BEGIN (prev_begin_include); |
||
| 1374 | } |
||
| 1375 | YY_BREAK |
||
| 1376 | case YY_STATE_EOF (INITIAL): |
||
| 1377 | case YY_STATE_EOF (vhdl): |
||
| 1378 | case YY_STATE_EOF (vlog): |
||
| 1379 | case YY_STATE_EOF (acfp): |
||
| 1380 | case YY_STATE_EOF (pragma): |
||
| 1381 | case YY_STATE_EOF (vert_c_comment): |
||
| 1382 | case YY_STATE_EOF (vert_vhdl_comment): |
||
| 1383 | case YY_STATE_EOF (expr): |
||
| 1384 | case YY_STATE_EOF (incl): |
||
| 1385 | #line 366 "acf_lex.l" |
||
| 1386 | { |
||
| 1387 | /* rewind(yyin); */ |
||
| 1388 | /* printf("-- +++ At level %d\n",include_stack_ptr); |
||
| 1389 | */ |
||
| 1390 | if (include_stack_ptr == 0) |
||
| 1391 | { |
||
| 1392 | /* printf("lex: termination\n"); */ |
||
| 1393 | /* YY_FLUSH_BUFFER; |
||
| 1394 | yy_delete_buffer( YY_CURRENT_BUFFER ); |
||
| 1395 | */ |
||
| 1396 | exit_lex_block (); |
||
| 1397 | yyterminate (); |
||
| 1398 | } |
||
| 1399 | |||
| 1400 | else |
||
| 1401 | { |
||
| 1402 | /* printf("lex: backup level in file |
||
| 1403 | * buffer\n"); */ |
||
| 1404 | /* YY_FLUSH_BUFFER; */ |
||
| 1405 | include_stack_ptr--; |
||
| 1406 | yy_delete_buffer (YY_CURRENT_BUFFER); |
||
| 1407 | lineno = old_linenumber[include_stack_ptr]; |
||
| 1408 | yyin = handles[include_stack_ptr]; |
||
| 1409 | yy_switch_to_buffer (include_stack[include_stack_ptr]); |
||
| 1410 | } |
||
| 1411 | /* printf("handle ending"); */ |
||
| 1412 | break; |
||
| 1413 | } |
||
| 1414 | YY_BREAK |
||
| 1415 | case 5: |
||
| 1416 | YY_RULE_SETUP |
||
| 1417 | #line 396 "acf_lex.l" |
||
| 1418 | { |
||
| 1419 | char t; |
||
| 1420 | char *p; |
||
| 1421 | char buff[MAXIDLEN]; |
||
| 1422 | |||
| 1423 | int c; /* quoted string using either type of quotes, |
||
| 1424 | * including escaped quotes */ |
||
| 1425 | |||
| 1426 | t = *yytext; /* determine terminator */ |
||
| 1427 | |||
| 1428 | p = buff; /* setup destination */ |
||
| 1429 | |||
| 1430 | for (;;) |
||
| 1431 | { |
||
| 1432 | c = input (); |
||
| 1433 | if (c == t) |
||
| 1434 | break; |
||
| 1435 | |||
| 1436 | if (c == '\n') |
||
| 1437 | { |
||
| 1438 | lineno++; |
||
| 1439 | Log ( |
||
| 1440 | LOG_GENERAL, |
||
| 1441 | "Carriage Return in string (line " |
||
| 1442 | "%d)\n", |
||
| 1443 | lineno); |
||
| 1444 | continue; |
||
| 1445 | } |
||
| 1446 | |||
| 1447 | if (c == '\\') |
||
| 1448 | { |
||
| 1449 | *p++ = c; |
||
| 1450 | c = input (); |
||
| 1451 | } |
||
| 1452 | if (c == EOF) |
||
| 1453 | { |
||
| 1454 | Log ( |
||
| 1455 | LOG_GENERAL, |
||
| 1456 | "End of file in string\n"); |
||
| 1457 | break; |
||
| 1458 | } |
||
| 1459 | if (c < ' ') |
||
| 1460 | { |
||
| 1461 | Log ( |
||
| 1462 | LOG_GENERAL, |
||
| 1463 | "Ctl char 0x%02X in string\n", |
||
| 1464 | c); |
||
| 1465 | break; |
||
| 1466 | } |
||
| 1467 | |||
| 1468 | *p++ = c; |
||
| 1469 | if ((p - buff) >= MAXIDLEN - 100) |
||
| 1470 | { |
||
| 1471 | Log ( |
||
| 1472 | LOG_GENERAL, |
||
| 1473 | "No closing quote after %d chars " |
||
| 1474 | "in string\n", |
||
| 1475 | MAXIDLEN - 100); |
||
| 1476 | break; |
||
| 1477 | } |
||
| 1478 | } |
||
| 1479 | *p = 0; |
||
| 1480 | yylval.string = |
||
| 1481 | make_string (buff, &lx_first, &lx_last); |
||
| 1482 | /* printf("quoted |
||
| 1483 | * (yytext:'%s')\n",yylval.string); */ |
||
| 1484 | if (yydebug) |
||
| 1485 | fprintf ( |
||
| 1486 | stderr, |
||
| 1487 | "String (quo) ='%s'\n", |
||
| 1488 | yylval.string); |
||
| 1489 | return (QUOTED_STRING); |
||
| 1490 | }; |
||
| 1491 | YY_BREAK |
||
| 1492 | case 6: |
||
| 1493 | YY_RULE_SETUP |
||
| 1494 | #line 446 "acf_lex.l" |
||
| 1495 | { |
||
| 1496 | char *p; |
||
| 1497 | char buff[MAXIDLEN]; |
||
| 1498 | |||
| 1499 | int c; |
||
| 1500 | p = buff; /* setup destination */ |
||
| 1501 | while (1) |
||
| 1502 | { |
||
| 1503 | c = input (); |
||
| 1504 | if (!isalnum (c) && c != '[' && |
||
| 1505 | c != ']') /* any non-space char */ |
||
| 1506 | break; |
||
| 1507 | *p++ = c; |
||
| 1508 | } |
||
| 1509 | |||
| 1510 | *p = 0; |
||
| 1511 | yylval.string = |
||
| 1512 | make_string (buff, &lx_first, &lx_last); |
||
| 1513 | if (yydebug) |
||
| 1514 | fprintf ( |
||
| 1515 | stderr, |
||
| 1516 | "String (escaped) ='%s'\n", |
||
| 1517 | yylval.string); |
||
| 1518 | return (QUOTED_STRING); |
||
| 1519 | }; |
||
| 1520 | YY_BREAK |
||
| 1521 | case 7: |
||
| 1522 | YY_RULE_SETUP |
||
| 1523 | #line 469 "acf_lex.l" |
||
| 1524 | { |
||
| 1525 | /* |
||
| 1526 | printf("-- vhdl |
||
| 1527 | comment"); |
||
| 1528 | */ |
||
| 1529 | one_line_comment: |
||
| 1530 | if (YY_START != pragma) |
||
| 1531 | prev_begin = YY_START; |
||
| 1532 | comment_type = vert_vhdl_comment; |
||
| 1533 | BEGIN (vert_vhdl_comment); |
||
| 1534 | break; |
||
| 1535 | }; |
||
| 1536 | YY_BREAK |
||
| 1537 | case 8: |
||
| 1538 | YY_RULE_SETUP |
||
| 1539 | #line 479 "acf_lex.l" |
||
| 1540 | { |
||
| 1541 | /* |
||
| 1542 | printf("-- vhdl |
||
| 1543 | comment"); |
||
| 1544 | */ |
||
| 1545 | goto one_line_comment; |
||
| 1546 | }; |
||
| 1547 | YY_BREAK |
||
| 1548 | case 9: |
||
| 1549 | YY_RULE_SETUP |
||
| 1550 | #line 487 "acf_lex.l" |
||
| 1551 | { |
||
| 1552 | /* |
||
| 1553 | printf("-- C comment"); |
||
| 1554 | */ |
||
| 1555 | if (YY_START != pragma) |
||
| 1556 | prev_begin = YY_START; |
||
| 1557 | comment_type = vert_c_comment; |
||
| 1558 | BEGIN (vert_c_comment); |
||
| 1559 | break; |
||
| 1560 | }; |
||
| 1561 | YY_BREAK |
||
| 1562 | case 10: |
||
| 1563 | YY_RULE_SETUP |
||
| 1564 | #line 499 "acf_lex.l" |
||
| 1565 | { |
||
| 1566 | /* |
||
| 1567 | printf(" Read Off"); |
||
| 1568 | */ |
||
| 1569 | if (comment_type == vert_c_comment) |
||
| 1570 | skip_c_comment (); |
||
| 1571 | if (comment_type == vert_vhdl_comment) |
||
| 1572 | skip_to_eol (); |
||
| 1573 | /* |
||
| 1574 | printf(" Skipped |
||
| 1575 | comment\n"); |
||
| 1576 | */ |
||
| 1577 | read_state = 0; |
||
| 1578 | BEGIN (pragma); |
||
| 1579 | break; |
||
| 1580 | }; |
||
| 1581 | YY_BREAK |
||
| 1582 | case 11: |
||
| 1583 | YY_RULE_SETUP |
||
| 1584 | #line 515 "acf_lex.l" |
||
| 1585 | { |
||
| 1586 | /* |
||
| 1587 | printf(" Read On"); |
||
| 1588 | */ |
||
| 1589 | if (comment_type == vert_c_comment) |
||
| 1590 | skip_c_comment (); |
||
| 1591 | if (comment_type == vert_vhdl_comment) |
||
| 1592 | skip_to_eol (); |
||
| 1593 | /* |
||
| 1594 | printf(" Skipped |
||
| 1595 | comment\n"); |
||
| 1596 | */ |
||
| 1597 | read_state = 1; |
||
| 1598 | if (prev_begin >= 0) |
||
| 1599 | BEGIN (prev_begin); |
||
| 1600 | break; |
||
| 1601 | }; |
||
| 1602 | YY_BREAK |
||
| 1603 | case 12: |
||
| 1604 | YY_RULE_SETUP |
||
| 1605 | #line 533 "acf_lex.l" |
||
| 1606 | { |
||
| 1607 | /* |
||
| 1608 | printf(" Vertical"); |
||
| 1609 | */ |
||
| 1610 | /* the line is acfp syntax */ |
||
| 1611 | BEGIN (acfp); |
||
| 1612 | break; |
||
| 1613 | }; |
||
| 1614 | YY_BREAK |
||
| 1615 | case 13: |
||
| 1616 | /* rule 13 can match eol */ |
||
| 1617 | YY_RULE_SETUP |
||
| 1618 | #line 542 "acf_lex.l" |
||
| 1619 | { |
||
| 1620 | lineno++; |
||
| 1621 | if (comment_type == vert_vhdl_comment) |
||
| 1622 | { |
||
| 1623 | /* |
||
| 1624 | printf(" endline\n"); |
||
| 1625 | */ |
||
| 1626 | comment_type = -1; |
||
| 1627 | lineno++; |
||
| 1628 | if (read_state == 0) /* parser was not reading, |
||
| 1629 | so go back into pragma |
||
| 1630 | context */ |
||
| 1631 | BEGIN (pragma); |
||
| 1632 | else /* parser was reading, so go back into |
||
| 1633 | pre-comment context */ |
||
| 1634 | BEGIN (prev_begin); |
||
| 1635 | break; |
||
| 1636 | } |
||
| 1637 | }; |
||
| 1638 | YY_BREAK |
||
| 1639 | case 14: |
||
| 1640 | YY_RULE_SETUP |
||
| 1641 | #line 559 "acf_lex.l" |
||
| 1642 | { |
||
| 1643 | /* pickup only inside a pragma enclosed in a C comment |
||
| 1644 | */ |
||
| 1645 | /* |
||
| 1646 | printf(" end C comment\n"); |
||
| 1647 | */ |
||
| 1648 | if (comment_type != vert_c_comment) |
||
| 1649 | Log ( |
||
| 1650 | LOG_ERROR, |
||
| 1651 | "-- close comment unexpected\n"); |
||
| 1652 | comment_type = -1; |
||
| 1653 | if (read_state == 0) /* parser was not reading, so go |
||
| 1654 | back into pragma context */ |
||
| 1655 | BEGIN (pragma); |
||
| 1656 | else /* parser was reading, so go back into pre-comment |
||
| 1657 | context */ |
||
| 1658 | BEGIN (prev_begin); |
||
| 1659 | break; |
||
| 1660 | }; |
||
| 1661 | YY_BREAK |
||
| 1662 | case 15: |
||
| 1663 | /* rule 15 can match eol */ |
||
| 1664 | YY_RULE_SETUP |
||
| 1665 | #line 577 "acf_lex.l" |
||
| 1666 | { |
||
| 1667 | lineno++; |
||
| 1668 | break; |
||
| 1669 | }; |
||
| 1670 | YY_BREAK |
||
| 1671 | case 16: |
||
| 1672 | /* rule 16 can match eol */ |
||
| 1673 | YY_RULE_SETUP |
||
| 1674 | #line 579 "acf_lex.l" |
||
| 1675 | { |
||
| 1676 | lineno++; |
||
| 1677 | break; |
||
| 1678 | }; |
||
| 1679 | YY_BREAK |
||
| 1680 | case 17: |
||
| 1681 | YY_RULE_SETUP |
||
| 1682 | #line 580 "acf_lex.l" |
||
| 1683 | { |
||
| 1684 | break; |
||
| 1685 | }; |
||
| 1686 | YY_BREAK |
||
| 1687 | case 18: |
||
| 1688 | YY_RULE_SETUP |
||
| 1689 | #line 582 "acf_lex.l" |
||
| 1690 | { |
||
| 1691 | break; |
||
| 1692 | }; |
||
| 1693 | YY_BREAK |
||
| 1694 | case 19: |
||
| 1695 | YY_RULE_SETUP |
||
| 1696 | #line 584 "acf_lex.l" |
||
| 1697 | { |
||
| 1698 | skip_to_eol (); |
||
| 1699 | goto ignored_comment; |
||
| 1700 | }; |
||
| 1701 | YY_BREAK |
||
| 1702 | case 20: |
||
| 1703 | YY_RULE_SETUP |
||
| 1704 | #line 588 "acf_lex.l" |
||
| 1705 | { |
||
| 1706 | skip_c_comment (); |
||
| 1707 | ignored_comment: |
||
| 1708 | comment_type = -1; |
||
| 1709 | if (read_state == 0) /* parser was not reading, so go |
||
| 1710 | back into pragma context */ |
||
| 1711 | BEGIN (pragma); |
||
| 1712 | else /* parser was reading, so go back into pre-comment |
||
| 1713 | context */ |
||
| 1714 | BEGIN (prev_begin); |
||
| 1715 | break; |
||
| 1716 | }; |
||
| 1717 | YY_BREAK |
||
| 1718 | case 21: |
||
| 1719 | YY_RULE_SETUP |
||
| 1720 | #line 596 "acf_lex.l" |
||
| 1721 | { |
||
| 1722 | break; |
||
| 1723 | }; |
||
| 1724 | YY_BREAK |
||
| 1725 | case 22: |
||
| 1726 | YY_RULE_SETUP |
||
| 1727 | #line 599 "acf_lex.l" |
||
| 1728 | { |
||
| 1729 | return QUOTE; |
||
| 1730 | }; |
||
| 1731 | YY_BREAK |
||
| 1732 | case 23: |
||
| 1733 | YY_RULE_SETUP |
||
| 1734 | #line 600 "acf_lex.l" |
||
| 1735 | { |
||
| 1736 | return CONNECTED; |
||
| 1737 | }; |
||
| 1738 | YY_BREAK |
||
| 1739 | case 24: |
||
| 1740 | YY_RULE_SETUP |
||
| 1741 | #line 601 "acf_lex.l" |
||
| 1742 | { |
||
| 1743 | return ASSIGN; |
||
| 1744 | }; |
||
| 1745 | YY_BREAK |
||
| 1746 | case 25: |
||
| 1747 | YY_RULE_SETUP |
||
| 1748 | #line 602 "acf_lex.l" |
||
| 1749 | { |
||
| 1750 | return SIG_ASSIGN; |
||
| 1751 | }; |
||
| 1752 | YY_BREAK |
||
| 1753 | case 26: |
||
| 1754 | YY_RULE_SETUP |
||
| 1755 | #line 603 "acf_lex.l" |
||
| 1756 | { |
||
| 1757 | return (':'); |
||
| 1758 | }; |
||
| 1759 | YY_BREAK |
||
| 1760 | case 27: |
||
| 1761 | YY_RULE_SETUP |
||
| 1762 | #line 604 "acf_lex.l" |
||
| 1763 | { |
||
| 1764 | return (';'); |
||
| 1765 | }; |
||
| 1766 | YY_BREAK |
||
| 1767 | case 28: |
||
| 1768 | YY_RULE_SETUP |
||
| 1769 | #line 605 "acf_lex.l" |
||
| 1770 | { |
||
| 1771 | return ('='); |
||
| 1772 | }; |
||
| 1773 | YY_BREAK |
||
| 1774 | case 29: |
||
| 1775 | YY_RULE_SETUP |
||
| 1776 | #line 606 "acf_lex.l" |
||
| 1777 | { |
||
| 1778 | return ('('); |
||
| 1779 | }; |
||
| 1780 | YY_BREAK |
||
| 1781 | case 30: |
||
| 1782 | YY_RULE_SETUP |
||
| 1783 | #line 607 "acf_lex.l" |
||
| 1784 | { |
||
| 1785 | return (')'); |
||
| 1786 | }; |
||
| 1787 | YY_BREAK |
||
| 1788 | case 31: |
||
| 1789 | YY_RULE_SETUP |
||
| 1790 | #line 608 "acf_lex.l" |
||
| 1791 | { |
||
| 1792 | return ('.'); |
||
| 1793 | }; |
||
| 1794 | YY_BREAK |
||
| 1795 | case 32: |
||
| 1796 | YY_RULE_SETUP |
||
| 1797 | #line 609 "acf_lex.l" |
||
| 1798 | { |
||
| 1799 | return ('!'); |
||
| 1800 | }; |
||
| 1801 | YY_BREAK |
||
| 1802 | case 33: |
||
| 1803 | YY_RULE_SETUP |
||
| 1804 | #line 610 "acf_lex.l" |
||
| 1805 | { |
||
| 1806 | return ('+'); |
||
| 1807 | }; |
||
| 1808 | YY_BREAK |
||
| 1809 | case 34: |
||
| 1810 | YY_RULE_SETUP |
||
| 1811 | #line 611 "acf_lex.l" |
||
| 1812 | { |
||
| 1813 | return ('-'); |
||
| 1814 | }; |
||
| 1815 | YY_BREAK |
||
| 1816 | case 35: |
||
| 1817 | YY_RULE_SETUP |
||
| 1818 | #line 612 "acf_lex.l" |
||
| 1819 | { |
||
| 1820 | return (N_EQ); |
||
| 1821 | }; |
||
| 1822 | YY_BREAK |
||
| 1823 | case 36: |
||
| 1824 | YY_RULE_SETUP |
||
| 1825 | #line 613 "acf_lex.l" |
||
| 1826 | { |
||
| 1827 | return ('/'); |
||
| 1828 | }; |
||
| 1829 | YY_BREAK |
||
| 1830 | case 37: |
||
| 1831 | YY_RULE_SETUP |
||
| 1832 | #line 614 "acf_lex.l" |
||
| 1833 | { |
||
| 1834 | return ('%'); |
||
| 1835 | }; |
||
| 1836 | YY_BREAK |
||
| 1837 | case 38: |
||
| 1838 | YY_RULE_SETUP |
||
| 1839 | #line 615 "acf_lex.l" |
||
| 1840 | { |
||
| 1841 | return ('?'); |
||
| 1842 | }; |
||
| 1843 | YY_BREAK |
||
| 1844 | case 39: |
||
| 1845 | YY_RULE_SETUP |
||
| 1846 | #line 616 "acf_lex.l" |
||
| 1847 | { |
||
| 1848 | return (SHL); |
||
| 1849 | }; |
||
| 1850 | YY_BREAK |
||
| 1851 | case 40: |
||
| 1852 | YY_RULE_SETUP |
||
| 1853 | #line 617 "acf_lex.l" |
||
| 1854 | { |
||
| 1855 | return (SHR); |
||
| 1856 | }; |
||
| 1857 | YY_BREAK |
||
| 1858 | case 41: |
||
| 1859 | YY_RULE_SETUP |
||
| 1860 | #line 618 "acf_lex.l" |
||
| 1861 | { |
||
| 1862 | return ('<'); |
||
| 1863 | }; |
||
| 1864 | YY_BREAK |
||
| 1865 | case 42: |
||
| 1866 | YY_RULE_SETUP |
||
| 1867 | #line 619 "acf_lex.l" |
||
| 1868 | { |
||
| 1869 | return ('>'); |
||
| 1870 | }; |
||
| 1871 | YY_BREAK |
||
| 1872 | case 43: |
||
| 1873 | YY_RULE_SETUP |
||
| 1874 | #line 620 "acf_lex.l" |
||
| 1875 | { |
||
| 1876 | return ('^'); |
||
| 1877 | }; |
||
| 1878 | YY_BREAK |
||
| 1879 | case 44: |
||
| 1880 | YY_RULE_SETUP |
||
| 1881 | #line 621 "acf_lex.l" |
||
| 1882 | { |
||
| 1883 | return ('~'); |
||
| 1884 | }; |
||
| 1885 | YY_BREAK |
||
| 1886 | case 45: |
||
| 1887 | YY_RULE_SETUP |
||
| 1888 | #line 622 "acf_lex.l" |
||
| 1889 | { |
||
| 1890 | return (LOG_AND); |
||
| 1891 | }; |
||
| 1892 | YY_BREAK |
||
| 1893 | case 46: |
||
| 1894 | YY_RULE_SETUP |
||
| 1895 | #line 623 "acf_lex.l" |
||
| 1896 | { |
||
| 1897 | return ('&'); |
||
| 1898 | }; |
||
| 1899 | YY_BREAK |
||
| 1900 | case 47: |
||
| 1901 | YY_RULE_SETUP |
||
| 1902 | #line 624 "acf_lex.l" |
||
| 1903 | { |
||
| 1904 | return (LOG_OR); |
||
| 1905 | }; |
||
| 1906 | YY_BREAK |
||
| 1907 | case 48: |
||
| 1908 | YY_RULE_SETUP |
||
| 1909 | #line 625 "acf_lex.l" |
||
| 1910 | { |
||
| 1911 | return ('|'); |
||
| 1912 | }; |
||
| 1913 | YY_BREAK |
||
| 1914 | case 49: |
||
| 1915 | YY_RULE_SETUP |
||
| 1916 | #line 628 "acf_lex.l" |
||
| 1917 | { |
||
| 1918 | return (EQ_EQ); |
||
| 1919 | }; |
||
| 1920 | YY_BREAK |
||
| 1921 | case 50: |
||
| 1922 | YY_RULE_SETUP |
||
| 1923 | #line 629 "acf_lex.l" |
||
| 1924 | { |
||
| 1925 | return (EQ_EQ); |
||
| 1926 | }; |
||
| 1927 | YY_BREAK |
||
| 1928 | case 51: |
||
| 1929 | YY_RULE_SETUP |
||
| 1930 | #line 630 "acf_lex.l" |
||
| 1931 | { |
||
| 1932 | return (N_EQ); |
||
| 1933 | }; |
||
| 1934 | YY_BREAK |
||
| 1935 | case 52: |
||
| 1936 | YY_RULE_SETUP |
||
| 1937 | #line 631 "acf_lex.l" |
||
| 1938 | { |
||
| 1939 | return (TO_POW); |
||
| 1940 | }; |
||
| 1941 | YY_BREAK |
||
| 1942 | case 53: |
||
| 1943 | YY_RULE_SETUP |
||
| 1944 | #line 632 "acf_lex.l" |
||
| 1945 | { |
||
| 1946 | return ('*'); |
||
| 1947 | }; |
||
| 1948 | YY_BREAK |
||
| 1949 | case 54: |
||
| 1950 | YY_RULE_SETUP |
||
| 1951 | #line 633 "acf_lex.l" |
||
| 1952 | { |
||
| 1953 | return (','); |
||
| 1954 | }; |
||
| 1955 | YY_BREAK |
||
| 1956 | case 55: |
||
| 1957 | YY_RULE_SETUP |
||
| 1958 | #line 634 "acf_lex.l" |
||
| 1959 | { |
||
| 1960 | return ('['); |
||
| 1961 | }; |
||
| 1962 | YY_BREAK |
||
| 1963 | case 56: |
||
| 1964 | YY_RULE_SETUP |
||
| 1965 | #line 635 "acf_lex.l" |
||
| 1966 | { |
||
| 1967 | return (']'); |
||
| 1968 | }; |
||
| 1969 | YY_BREAK |
||
| 1970 | case 57: |
||
| 1971 | YY_RULE_SETUP |
||
| 1972 | #line 638 "acf_lex.l" |
||
| 1973 | { |
||
| 1974 | break; |
||
| 1975 | }; |
||
| 1976 | YY_BREAK |
||
| 1977 | case 58: |
||
| 1978 | /* rule 58 can match eol */ |
||
| 1979 | YY_RULE_SETUP |
||
| 1980 | #line 640 "acf_lex.l" |
||
| 1981 | { |
||
| 1982 | lineno++; |
||
| 1983 | if (yydebug) |
||
| 1984 | printf ("line %d\n", lineno); |
||
| 1985 | break; |
||
| 1986 | }; |
||
| 1987 | YY_BREAK |
||
| 1988 | case 59: |
||
| 1989 | YY_RULE_SETUP |
||
| 1990 | #line 641 "acf_lex.l" |
||
| 1991 | { |
||
| 1992 | break; |
||
| 1993 | }; |
||
| 1994 | YY_BREAK |
||
| 1995 | case 60: |
||
| 1996 | YY_RULE_SETUP |
||
| 1997 | #line 646 "acf_lex.l" |
||
| 1998 | { |
||
| 1999 | lex_exec_line (); |
||
| 2000 | goto ignored_comment; /* commands to vertical */ |
||
| 2001 | }; |
||
| 2002 | YY_BREAK |
||
| 2003 | case 61: |
||
| 2004 | YY_RULE_SETUP |
||
| 2005 | #line 649 "acf_lex.l" |
||
| 2006 | { |
||
| 2007 | BEGIN (acfp); |
||
| 2008 | prev_begin = acfp; |
||
| 2009 | Log (LOG_GENERAL, "Entering ACFP block\n"); |
||
| 2010 | inside_block = 1; |
||
| 2011 | return (AHDL); |
||
| 2012 | } |
||
| 2013 | YY_BREAK |
||
| 2014 | case 62: |
||
| 2015 | YY_RULE_SETUP |
||
| 2016 | #line 653 "acf_lex.l" |
||
| 2017 | { |
||
| 2018 | BEGIN (acfp); |
||
| 2019 | prev_begin = acfp; |
||
| 2020 | inside_block = 1; |
||
| 2021 | return (CHIP); |
||
| 2022 | } |
||
| 2023 | YY_BREAK |
||
| 2024 | case 63: |
||
| 2025 | YY_RULE_SETUP |
||
| 2026 | #line 656 "acf_lex.l" |
||
| 2027 | { |
||
| 2028 | BEGIN (acfp); |
||
| 2029 | prev_begin = acfp; |
||
| 2030 | inside_block = 1; |
||
| 2031 | return (JOINED_NETS); |
||
| 2032 | }; |
||
| 2033 | YY_BREAK |
||
| 2034 | case 64: |
||
| 2035 | YY_RULE_SETUP |
||
| 2036 | #line 659 "acf_lex.l" |
||
| 2037 | { |
||
| 2038 | BEGIN (acfp); |
||
| 2039 | prev_begin = acfp; |
||
| 2040 | inside_block = 1; |
||
| 2041 | return (COMPONENTS); |
||
| 2042 | }; |
||
| 2043 | YY_BREAK |
||
| 2044 | case 65: |
||
| 2045 | YY_RULE_SETUP |
||
| 2046 | #line 662 "acf_lex.l" |
||
| 2047 | { |
||
| 2048 | BEGIN (acfp); |
||
| 2049 | prev_begin = acfp; |
||
| 2050 | inside_block = 1; |
||
| 2051 | return (RENAME_PINS); |
||
| 2052 | }; |
||
| 2053 | YY_BREAK |
||
| 2054 | case 66: |
||
| 2055 | YY_RULE_SETUP |
||
| 2056 | #line 665 "acf_lex.l" |
||
| 2057 | { |
||
| 2058 | BEGIN (acfp); |
||
| 2059 | prev_begin = acfp; |
||
| 2060 | inside_block = 1; |
||
| 2061 | return (TEMPLATE); |
||
| 2062 | }; |
||
| 2063 | YY_BREAK |
||
| 2064 | case 67: |
||
| 2065 | YY_RULE_SETUP |
||
| 2066 | #line 668 "acf_lex.l" |
||
| 2067 | { |
||
| 2068 | BEGIN (vhdl); |
||
| 2069 | Log (LOG_GENERAL, "Entering VHDL block\n"); |
||
| 2070 | inside_block = 1; |
||
| 2071 | prev_begin = vhdl; |
||
| 2072 | return (VHDL); |
||
| 2073 | }; |
||
| 2074 | YY_BREAK |
||
| 2075 | case 68: |
||
| 2076 | YY_RULE_SETUP |
||
| 2077 | #line 674 "acf_lex.l" |
||
| 2078 | { |
||
| 2079 | BEGIN (vlog); |
||
| 2080 | Log (LOG_GENERAL, "Entering Verilog block\n"); |
||
| 2081 | prev_begin = vlog; |
||
| 2082 | inside_block = 1; |
||
| 2083 | return (VERILOG); |
||
| 2084 | }; |
||
| 2085 | YY_BREAK |
||
| 2086 | case 69: |
||
| 2087 | YY_RULE_SETUP |
||
| 2088 | #line 680 "acf_lex.l" |
||
| 2089 | { |
||
| 2090 | BEGIN (acfp); |
||
| 2091 | prev_begin = acfp; |
||
| 2092 | inside_block = 1; |
||
| 2093 | return (WIRED_NETS); |
||
| 2094 | }; |
||
| 2095 | YY_BREAK |
||
| 2096 | case 70: |
||
| 2097 | YY_RULE_SETUP |
||
| 2098 | #line 683 "acf_lex.l" |
||
| 2099 | { |
||
| 2100 | if (!inside_block) /* special */ |
||
| 2101 | { |
||
| 2102 | inside_block = 1; |
||
| 2103 | BEGIN (vhdl); |
||
| 2104 | prev_begin = vhdl; |
||
| 2105 | }; |
||
| 2106 | return (GENERIC); |
||
| 2107 | }; |
||
| 2108 | YY_BREAK |
||
| 2109 | case 71: |
||
| 2110 | YY_RULE_SETUP |
||
| 2111 | #line 687 "acf_lex.l" |
||
| 2112 | { |
||
| 2113 | return (ALL); |
||
| 2114 | } |
||
| 2115 | YY_BREAK |
||
| 2116 | case 72: |
||
| 2117 | YY_RULE_SETUP |
||
| 2118 | #line 688 "acf_lex.l" |
||
| 2119 | { |
||
| 2120 | return (ARCHITECTURE); |
||
| 2121 | } |
||
| 2122 | YY_BREAK |
||
| 2123 | case 73: |
||
| 2124 | YY_RULE_SETUP |
||
| 2125 | #line 689 "acf_lex.l" |
||
| 2126 | { |
||
| 2127 | return (ATTRIBUTE); |
||
| 2128 | } |
||
| 2129 | YY_BREAK |
||
| 2130 | case 74: |
||
| 2131 | YY_RULE_SETUP |
||
| 2132 | #line 690 "acf_lex.l" |
||
| 2133 | { |
||
| 2134 | return (ASSIGNED); |
||
| 2135 | } |
||
| 2136 | YY_BREAK |
||
| 2137 | case 75: |
||
| 2138 | YY_RULE_SETUP |
||
| 2139 | #line 691 "acf_lex.l" |
||
| 2140 | { |
||
| 2141 | return (ALIAS); |
||
| 2142 | } |
||
| 2143 | YY_BREAK |
||
| 2144 | case 76: |
||
| 2145 | YY_RULE_SETUP |
||
| 2146 | #line 692 "acf_lex.l" |
||
| 2147 | { |
||
| 2148 | return (AN); |
||
| 2149 | } |
||
| 2150 | YY_BREAK |
||
| 2151 | case 77: |
||
| 2152 | YY_RULE_SETUP |
||
| 2153 | #line 693 "acf_lex.l" |
||
| 2154 | { |
||
| 2155 | return (BEGIN_TOK); |
||
| 2156 | } |
||
| 2157 | YY_BREAK |
||
| 2158 | case 78: |
||
| 2159 | YY_RULE_SETUP |
||
| 2160 | #line 694 "acf_lex.l" |
||
| 2161 | { |
||
| 2162 | yylval.integer = BIDIR; |
||
| 2163 | return (PINDIR); |
||
| 2164 | } |
||
| 2165 | YY_BREAK |
||
| 2166 | case 79: |
||
| 2167 | YY_RULE_SETUP |
||
| 2168 | #line 695 "acf_lex.l" |
||
| 2169 | { |
||
| 2170 | yylval.integer = BIDIR; |
||
| 2171 | return (PINDIR); |
||
| 2172 | } |
||
| 2173 | YY_BREAK |
||
| 2174 | case 80: |
||
| 2175 | YY_RULE_SETUP |
||
| 2176 | #line 696 "acf_lex.l" |
||
| 2177 | { |
||
| 2178 | return (BOOLEAN); |
||
| 2179 | } |
||
| 2180 | YY_BREAK |
||
| 2181 | case 81: |
||
| 2182 | YY_RULE_SETUP |
||
| 2183 | #line 697 "acf_lex.l" |
||
| 2184 | { |
||
| 2185 | yylval.integer = BIDIR; |
||
| 2186 | return (PINDIR); |
||
| 2187 | } |
||
| 2188 | YY_BREAK |
||
| 2189 | case 82: |
||
| 2190 | YY_RULE_SETUP |
||
| 2191 | #line 698 "acf_lex.l" |
||
| 2192 | { |
||
| 2193 | yylval.integer = BIDIR; |
||
| 2194 | return (PINDIR); |
||
| 2195 | } |
||
| 2196 | YY_BREAK |
||
| 2197 | case 83: |
||
| 2198 | YY_RULE_SETUP |
||
| 2199 | #line 699 "acf_lex.l" |
||
| 2200 | { |
||
| 2201 | yylval.integer = BUFFER; |
||
| 2202 | return (PINDIR); |
||
| 2203 | } |
||
| 2204 | YY_BREAK |
||
| 2205 | case 84: |
||
| 2206 | YY_RULE_SETUP |
||
| 2207 | #line 700 "acf_lex.l" |
||
| 2208 | { |
||
| 2209 | yylval.integer = BUFFER; |
||
| 2210 | return (PINDIR); |
||
| 2211 | } |
||
| 2212 | YY_BREAK |
||
| 2213 | case 85: |
||
| 2214 | YY_RULE_SETUP |
||
| 2215 | #line 701 "acf_lex.l" |
||
| 2216 | { |
||
| 2217 | yylval.integer = CONFIG; |
||
| 2218 | return (PINDIR); |
||
| 2219 | }; |
||
| 2220 | YY_BREAK |
||
| 2221 | case 86: |
||
| 2222 | YY_RULE_SETUP |
||
| 2223 | #line 702 "acf_lex.l" |
||
| 2224 | { |
||
| 2225 | return (COMPONENT); |
||
| 2226 | }; |
||
| 2227 | YY_BREAK |
||
| 2228 | case 87: |
||
| 2229 | YY_RULE_SETUP |
||
| 2230 | #line 703 "acf_lex.l" |
||
| 2231 | { |
||
| 2232 | return (CONSTANT); |
||
| 2233 | }; |
||
| 2234 | YY_BREAK |
||
| 2235 | case 88: |
||
| 2236 | YY_RULE_SETUP |
||
| 2237 | #line 704 "acf_lex.l" |
||
| 2238 | { |
||
| 2239 | return (CONN); |
||
| 2240 | }; |
||
| 2241 | YY_BREAK |
||
| 2242 | case 89: |
||
| 2243 | YY_RULE_SETUP |
||
| 2244 | #line 705 "acf_lex.l" |
||
| 2245 | { |
||
| 2246 | return (VHDL_CONN); |
||
| 2247 | }; |
||
| 2248 | YY_BREAK |
||
| 2249 | case 90: |
||
| 2250 | YY_RULE_SETUP |
||
| 2251 | #line 706 "acf_lex.l" |
||
| 2252 | { |
||
| 2253 | return (DECLARATION); |
||
| 2254 | }; |
||
| 2255 | YY_BREAK |
||
| 2256 | case 91: |
||
| 2257 | YY_RULE_SETUP |
||
| 2258 | #line 707 "acf_lex.l" |
||
| 2259 | { |
||
| 2260 | return (DEVICE); |
||
| 2261 | }; |
||
| 2262 | YY_BREAK |
||
| 2263 | case 92: |
||
| 2264 | YY_RULE_SETUP |
||
| 2265 | #line 708 "acf_lex.l" |
||
| 2266 | { |
||
| 2267 | return (DOWNTO); |
||
| 2268 | }; |
||
| 2269 | YY_BREAK |
||
| 2270 | case 93: |
||
| 2271 | YY_RULE_SETUP |
||
| 2272 | #line 709 "acf_lex.l" |
||
| 2273 | { |
||
| 2274 | return (END); /* do not free_strings here as it is too |
||
| 2275 | early !! */ |
||
| 2276 | }; |
||
| 2277 | YY_BREAK |
||
| 2278 | case 94: |
||
| 2279 | YY_RULE_SETUP |
||
| 2280 | #line 710 "acf_lex.l" |
||
| 2281 | { |
||
| 2282 | return (END_CONN); |
||
| 2283 | }; |
||
| 2284 | YY_BREAK |
||
| 2285 | case 95: |
||
| 2286 | YY_RULE_SETUP |
||
| 2287 | #line 711 "acf_lex.l" |
||
| 2288 | { |
||
| 2289 | return (ENDMODULE); |
||
| 2290 | }; |
||
| 2291 | YY_BREAK |
||
| 2292 | case 96: |
||
| 2293 | YY_RULE_SETUP |
||
| 2294 | #line 712 "acf_lex.l" |
||
| 2295 | { |
||
| 2296 | return (ENTITY); |
||
| 2297 | }; |
||
| 2298 | YY_BREAK |
||
| 2299 | case 97: |
||
| 2300 | YY_RULE_SETUP |
||
| 2301 | #line 713 "acf_lex.l" |
||
| 2302 | { |
||
| 2303 | return (EQUIVALENT); |
||
| 2304 | }; |
||
| 2305 | YY_BREAK |
||
| 2306 | case 98: |
||
| 2307 | YY_RULE_SETUP |
||
| 2308 | #line 714 "acf_lex.l" |
||
| 2309 | { |
||
| 2310 | return (ENV_STRING); |
||
| 2311 | }; |
||
| 2312 | YY_BREAK |
||
| 2313 | case 99: |
||
| 2314 | YY_RULE_SETUP |
||
| 2315 | #line 715 "acf_lex.l" |
||
| 2316 | { |
||
| 2317 | return (FALSE); |
||
| 2318 | }; |
||
| 2319 | YY_BREAK |
||
| 2320 | case 100: |
||
| 2321 | YY_RULE_SETUP |
||
| 2322 | #line 716 "acf_lex.l" |
||
| 2323 | { |
||
| 2324 | return (FIX_LOCATION); |
||
| 2325 | }; |
||
| 2326 | YY_BREAK |
||
| 2327 | case 101: |
||
| 2328 | YY_RULE_SETUP |
||
| 2329 | #line 717 "acf_lex.l" |
||
| 2330 | { |
||
| 2331 | return (FOR); |
||
| 2332 | }; |
||
| 2333 | YY_BREAK |
||
| 2334 | case 102: |
||
| 2335 | YY_RULE_SETUP |
||
| 2336 | #line 718 "acf_lex.l" |
||
| 2337 | { |
||
| 2338 | return (GND_RES_IO); |
||
| 2339 | }; |
||
| 2340 | YY_BREAK |
||
| 2341 | case 103: |
||
| 2342 | YY_RULE_SETUP |
||
| 2343 | #line 719 "acf_lex.l" |
||
| 2344 | { |
||
| 2345 | return (GND_RES_IN); |
||
| 2346 | }; |
||
| 2347 | YY_BREAK |
||
| 2348 | case 104: |
||
| 2349 | YY_RULE_SETUP |
||
| 2350 | #line 720 "acf_lex.l" |
||
| 2351 | { |
||
| 2352 | yylval.string = |
||
| 2353 | make_string (yytext, &lx_first, &lx_last); |
||
| 2354 | if (yydebug) |
||
| 2355 | fprintf ( |
||
| 2356 | stderr, "String (GND) ='%s'\n", yytext); |
||
| 2357 | return (GND); |
||
| 2358 | }; |
||
| 2359 | YY_BREAK |
||
| 2360 | case 105: |
||
| 2361 | YY_RULE_SETUP |
||
| 2362 | #line 723 "acf_lex.l" |
||
| 2363 | { |
||
| 2364 | yylval.integer = INPUT; |
||
| 2365 | return (PINDIR); |
||
| 2366 | }; |
||
| 2367 | YY_BREAK |
||
| 2368 | case 106: |
||
| 2369 | YY_RULE_SETUP |
||
| 2370 | #line 724 "acf_lex.l" |
||
| 2371 | { |
||
| 2372 | yylval.integer = INPUT; |
||
| 2373 | return (PINDIR); |
||
| 2374 | }; |
||
| 2375 | YY_BREAK |
||
| 2376 | case 107: |
||
| 2377 | YY_RULE_SETUP |
||
| 2378 | #line 725 "acf_lex.l" |
||
| 2379 | { |
||
| 2380 | yylval.integer = INPUT; |
||
| 2381 | return (PINDIR); |
||
| 2382 | }; |
||
| 2383 | YY_BREAK |
||
| 2384 | case 108: |
||
| 2385 | YY_RULE_SETUP |
||
| 2386 | #line 726 "acf_lex.l" |
||
| 2387 | { |
||
| 2388 | yylval.integer = BIDIR; |
||
| 2389 | return (PINDIR); |
||
| 2390 | } |
||
| 2391 | YY_BREAK |
||
| 2392 | case 109: |
||
| 2393 | YY_RULE_SETUP |
||
| 2394 | #line 727 "acf_lex.l" |
||
| 2395 | { |
||
| 2396 | return (INSTANCE); |
||
| 2397 | }; |
||
| 2398 | YY_BREAK |
||
| 2399 | case 110: |
||
| 2400 | YY_RULE_SETUP |
||
| 2401 | #line 728 "acf_lex.l" |
||
| 2402 | { |
||
| 2403 | return (INTEGER); |
||
| 2404 | }; |
||
| 2405 | YY_BREAK |
||
| 2406 | case 111: |
||
| 2407 | YY_RULE_SETUP |
||
| 2408 | #line 729 "acf_lex.l" |
||
| 2409 | { |
||
| 2410 | return (IS); |
||
| 2411 | }; |
||
| 2412 | YY_BREAK |
||
| 2413 | case 112: |
||
| 2414 | YY_RULE_SETUP |
||
| 2415 | #line 730 "acf_lex.l" |
||
| 2416 | { |
||
| 2417 | return (JUMPER); |
||
| 2418 | }; |
||
| 2419 | YY_BREAK |
||
| 2420 | case 113: |
||
| 2421 | YY_RULE_SETUP |
||
| 2422 | #line 731 "acf_lex.l" |
||
| 2423 | { |
||
| 2424 | return (LIBRARY); |
||
| 2425 | }; |
||
| 2426 | YY_BREAK |
||
| 2427 | case 114: |
||
| 2428 | YY_RULE_SETUP |
||
| 2429 | #line 732 "acf_lex.l" |
||
| 2430 | { |
||
| 2431 | return (LOCATION); |
||
| 2432 | }; |
||
| 2433 | YY_BREAK |
||
| 2434 | case 115: |
||
| 2435 | YY_RULE_SETUP |
||
| 2436 | #line 733 "acf_lex.l" |
||
| 2437 | { |
||
| 2438 | return (MAP); |
||
| 2439 | }; |
||
| 2440 | YY_BREAK |
||
| 2441 | case 116: |
||
| 2442 | YY_RULE_SETUP |
||
| 2443 | #line 734 "acf_lex.l" |
||
| 2444 | { |
||
| 2445 | return (MODULE); |
||
| 2446 | }; |
||
| 2447 | YY_BREAK |
||
| 2448 | case 117: |
||
| 2449 | YY_RULE_SETUP |
||
| 2450 | #line 735 "acf_lex.l" |
||
| 2451 | { |
||
| 2452 | yylval.integer = NONE; |
||
| 2453 | return (PINDIR); |
||
| 2454 | }; |
||
| 2455 | YY_BREAK |
||
| 2456 | case 118: |
||
| 2457 | YY_RULE_SETUP |
||
| 2458 | #line 736 "acf_lex.l" |
||
| 2459 | { |
||
| 2460 | return (NAMED); |
||
| 2461 | }; |
||
| 2462 | YY_BREAK |
||
| 2463 | case 119: |
||
| 2464 | YY_RULE_SETUP |
||
| 2465 | #line 737 "acf_lex.l" |
||
| 2466 | { |
||
| 2467 | return (OF); |
||
| 2468 | }; |
||
| 2469 | YY_BREAK |
||
| 2470 | case 120: |
||
| 2471 | YY_RULE_SETUP |
||
| 2472 | #line 738 "acf_lex.l" |
||
| 2473 | { |
||
| 2474 | yylval.integer = OUTPUT; |
||
| 2475 | return (PINDIR); |
||
| 2476 | }; |
||
| 2477 | YY_BREAK |
||
| 2478 | case 121: |
||
| 2479 | YY_RULE_SETUP |
||
| 2480 | #line 739 "acf_lex.l" |
||
| 2481 | { |
||
| 2482 | yylval.integer = OUTPUT; |
||
| 2483 | return (PINDIR); |
||
| 2484 | }; |
||
| 2485 | YY_BREAK |
||
| 2486 | case 122: |
||
| 2487 | YY_RULE_SETUP |
||
| 2488 | #line 740 "acf_lex.l" |
||
| 2489 | { |
||
| 2490 | yylval.integer = OUTPUT; |
||
| 2491 | return (PINDIR); |
||
| 2492 | }; |
||
| 2493 | YY_BREAK |
||
| 2494 | case 123: |
||
| 2495 | YY_RULE_SETUP |
||
| 2496 | #line 741 "acf_lex.l" |
||
| 2497 | { |
||
| 2498 | return (OPEN); |
||
| 2499 | }; |
||
| 2500 | YY_BREAK |
||
| 2501 | case 124: |
||
| 2502 | YY_RULE_SETUP |
||
| 2503 | #line 742 "acf_lex.l" |
||
| 2504 | { |
||
| 2505 | return (PACKAGE); |
||
| 2506 | }; |
||
| 2507 | YY_BREAK |
||
| 2508 | case 125: |
||
| 2509 | YY_RULE_SETUP |
||
| 2510 | #line 743 "acf_lex.l" |
||
| 2511 | { |
||
| 2512 | return (PORT); |
||
| 2513 | }; |
||
| 2514 | YY_BREAK |
||
| 2515 | case 126: |
||
| 2516 | YY_RULE_SETUP |
||
| 2517 | #line 744 "acf_lex.l" |
||
| 2518 | { |
||
| 2519 | yylval.integer = POWER; |
||
| 2520 | return (PINDIR); |
||
| 2521 | }; |
||
| 2522 | YY_BREAK |
||
| 2523 | case 127: |
||
| 2524 | YY_RULE_SETUP |
||
| 2525 | #line 745 "acf_lex.l" |
||
| 2526 | { |
||
| 2527 | return (RANGE); |
||
| 2528 | }; |
||
| 2529 | YY_BREAK |
||
| 2530 | case 128: |
||
| 2531 | YY_RULE_SETUP |
||
| 2532 | #line 746 "acf_lex.l" |
||
| 2533 | { |
||
| 2534 | return (ROUTE_FLAGS); |
||
| 2535 | }; |
||
| 2536 | YY_BREAK |
||
| 2537 | case 129: |
||
| 2538 | YY_RULE_SETUP |
||
| 2539 | #line 747 "acf_lex.l" |
||
| 2540 | { |
||
| 2541 | return (ROUTED); |
||
| 2542 | }; |
||
| 2543 | YY_BREAK |
||
| 2544 | case 130: |
||
| 2545 | YY_RULE_SETUP |
||
| 2546 | #line 748 "acf_lex.l" |
||
| 2547 | { |
||
| 2548 | return (SHL); |
||
| 2549 | }; |
||
| 2550 | YY_BREAK |
||
| 2551 | case 131: |
||
| 2552 | YY_RULE_SETUP |
||
| 2553 | #line 749 "acf_lex.l" |
||
| 2554 | { |
||
| 2555 | return (SHR); |
||
| 2556 | }; |
||
| 2557 | YY_BREAK |
||
| 2558 | case 132: |
||
| 2559 | YY_RULE_SETUP |
||
| 2560 | #line 750 "acf_lex.l" |
||
| 2561 | { |
||
| 2562 | return (SIGNAL); |
||
| 2563 | }; |
||
| 2564 | YY_BREAK |
||
| 2565 | case 133: |
||
| 2566 | YY_RULE_SETUP |
||
| 2567 | #line 751 "acf_lex.l" |
||
| 2568 | { |
||
| 2569 | return (STRING); |
||
| 2570 | }; |
||
| 2571 | YY_BREAK |
||
| 2572 | case 134: |
||
| 2573 | YY_RULE_SETUP |
||
| 2574 | #line 752 "acf_lex.l" |
||
| 2575 | { |
||
| 2576 | return (SUBDESIGN); |
||
| 2577 | }; |
||
| 2578 | YY_BREAK |
||
| 2579 | case 135: |
||
| 2580 | YY_RULE_SETUP |
||
| 2581 | #line 753 "acf_lex.l" |
||
| 2582 | { |
||
| 2583 | return (TO); |
||
| 2584 | }; |
||
| 2585 | YY_BREAK |
||
| 2586 | case 136: |
||
| 2587 | YY_RULE_SETUP |
||
| 2588 | #line 754 "acf_lex.l" |
||
| 2589 | { |
||
| 2590 | return (TRUE); |
||
| 2591 | }; |
||
| 2592 | YY_BREAK |
||
| 2593 | case 137: |
||
| 2594 | YY_RULE_SETUP |
||
| 2595 | #line 755 "acf_lex.l" |
||
| 2596 | { |
||
| 2597 | return (UNROUTED); |
||
| 2598 | }; |
||
| 2599 | YY_BREAK |
||
| 2600 | case 138: |
||
| 2601 | YY_RULE_SETUP |
||
| 2602 | #line 756 "acf_lex.l" |
||
| 2603 | { |
||
| 2604 | yylval.string = |
||
| 2605 | make_string (yytext, &lx_first, &lx_last); |
||
| 2606 | if (yydebug) |
||
| 2607 | fprintf ( |
||
| 2608 | stderr, "String (VCC) ='%s'\n", yytext); |
||
| 2609 | return (VCC); |
||
| 2610 | }; |
||
| 2611 | YY_BREAK |
||
| 2612 | case 139: |
||
| 2613 | YY_RULE_SETUP |
||
| 2614 | #line 759 "acf_lex.l" |
||
| 2615 | { |
||
| 2616 | return (USE); |
||
| 2617 | }; |
||
| 2618 | YY_BREAK |
||
| 2619 | case 140: |
||
| 2620 | YY_RULE_SETUP |
||
| 2621 | #line 760 "acf_lex.l" |
||
| 2622 | { |
||
| 2623 | return (WIRE); |
||
| 2624 | }; |
||
| 2625 | YY_BREAK |
||
| 2626 | case 141: |
||
| 2627 | YY_RULE_SETUP |
||
| 2628 | #line 762 "acf_lex.l" |
||
| 2629 | { |
||
| 2630 | yylval.string = make_string ( |
||
| 2631 | yytext, &lx_first, &lx_last); /* do it anyway */ |
||
| 2632 | if (yydebug) |
||
| 2633 | fprintf ( |
||
| 2634 | stderr, "String (num) ='%s'\n", yytext); |
||
| 2635 | return (NUM_STRING); |
||
| 2636 | }; |
||
| 2637 | YY_BREAK |
||
| 2638 | case 142: |
||
| 2639 | YY_RULE_SETUP |
||
| 2640 | #line 766 "acf_lex.l" |
||
| 2641 | { |
||
| 2642 | yylval.string = make_string ( |
||
| 2643 | yytext, &lx_first, &lx_last); /* do it anyway */ |
||
| 2644 | if (yydebug) |
||
| 2645 | fprintf ( |
||
| 2646 | stderr, "String (num) ='%s'\n", yytext); |
||
| 2647 | return (NUM_STRING); |
||
| 2648 | }; |
||
| 2649 | YY_BREAK |
||
| 2650 | case 143: |
||
| 2651 | YY_RULE_SETUP |
||
| 2652 | #line 770 "acf_lex.l" |
||
| 2653 | { |
||
| 2654 | yylval.string = make_string ( |
||
| 2655 | yytext, &lx_first, &lx_last); /* do it anyway */ |
||
| 2656 | if (yydebug) |
||
| 2657 | fprintf ( |
||
| 2658 | stderr, "String (num) ='%s'\n", yytext); |
||
| 2659 | return (TXT_STRING); |
||
| 2660 | }; |
||
| 2661 | YY_BREAK |
||
| 2662 | case 144: |
||
| 2663 | YY_RULE_SETUP |
||
| 2664 | #line 774 "acf_lex.l" |
||
| 2665 | { |
||
| 2666 | yylval.string = make_string ( |
||
| 2667 | yytext, &lx_first, &lx_last); /* do it anyway */ |
||
| 2668 | if (yydebug) |
||
| 2669 | fprintf ( |
||
| 2670 | stderr, "String (txt) ='%s'\n", yytext); |
||
| 2671 | return ( |
||
| 2672 | isdigit (yylval.string[0]) ? NUM_STRING |
||
| 2673 | : TXT_STRING); |
||
| 2674 | }; |
||
| 2675 | YY_BREAK |
||
| 2676 | case 145: |
||
| 2677 | YY_RULE_SETUP |
||
| 2678 | #line 778 "acf_lex.l" |
||
| 2679 | { |
||
| 2680 | yylval.string = make_string ( |
||
| 2681 | yytext, &lx_first, &lx_last); /* do it anyway */ |
||
| 2682 | if (yydebug) |
||
| 2683 | fprintf ( |
||
| 2684 | stderr, "String (num) ='%s'\n", yytext); |
||
| 2685 | return (TXT_STRING); |
||
| 2686 | }; |
||
| 2687 | YY_BREAK |
||
| 2688 | case 146: |
||
| 2689 | YY_RULE_SETUP |
||
| 2690 | #line 783 "acf_lex.l" |
||
| 2691 | { |
||
| 2692 | printf ( |
||
| 2693 | "-- error in %s syntax: found character code " |
||
| 2694 | "0x%02X (%c) at line %d\n", |
||
| 2695 | yyerr_start_names[YY_START], |
||
| 2696 | yytext[0], |
||
| 2697 | yytext[0] > 32 ? yytext[0] : '.', |
||
| 2698 | lineno); |
||
| 2699 | break; |
||
| 2700 | }; |
||
| 2701 | YY_BREAK |
||
| 2702 | case 147: |
||
| 2703 | YY_RULE_SETUP |
||
| 2704 | #line 786 "acf_lex.l" |
||
| 2705 | ECHO; |
||
| 2706 | YY_BREAK |
||
| 2707 | #line 2569 "acf_lex.c" |
||
| 2708 | |||
| 2709 | case YY_END_OF_BUFFER: |
||
| 2710 | { |
||
| 2711 | /* Amount of text matched not including the EOB char. */ |
||
| 2712 | int yy_amount_of_matched_text = |
||
| 2713 | (int) (yy_cp - (yytext_ptr)) - 1; |
||
| 2714 | |||
| 2715 | /* Undo the effects of YY_DO_BEFORE_ACTION. */ |
||
| 2716 | *yy_cp = (yy_hold_char); |
||
| 2717 | YY_RESTORE_YY_MORE_OFFSET |
||
| 2718 | |||
| 2719 | if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == |
||
| 2720 | YY_BUFFER_NEW) |
||
| 2721 | { |
||
| 2722 | /* We're scanning a new file or input source. It's |
||
| 2723 | * possible that this happened because the user |
||
| 2724 | * just pointed yyin at a new source and called |
||
| 2725 | * yylex(). If so, then we have to assure |
||
| 2726 | * consistency between YY_CURRENT_BUFFER and our |
||
| 2727 | * globals. Here is the right place to do so, because |
||
| 2728 | * this is the first action (other than possibly a |
||
| 2729 | * back-up) that will match for the new input source. |
||
| 2730 | */ |
||
| 2731 | (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
||
| 2732 | YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; |
||
| 2733 | YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = |
||
| 2734 | YY_BUFFER_NORMAL; |
||
| 2735 | } |
||
| 2736 | |||
| 2737 | /* Note that here we test for yy_c_buf_p "<=" to the position |
||
| 2738 | * of the first EOB in the buffer, since yy_c_buf_p will |
||
| 2739 | * already have been incremented past the NUL character |
||
| 2740 | * (since all states make transitions on EOB to the |
||
| 2741 | * end-of-buffer state). Contrast this with the test |
||
| 2742 | * in input(). |
||
| 2743 | */ |
||
| 2744 | if ((yy_c_buf_p) <= |
||
| 2745 | &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]) |
||
| 2746 | { /* This was really a NUL. */ |
||
| 2747 | yy_state_type yy_next_state; |
||
| 2748 | |||
| 2749 | (yy_c_buf_p) = |
||
| 2750 | (yytext_ptr) + yy_amount_of_matched_text; |
||
| 2751 | |||
| 2752 | yy_current_state = yy_get_previous_state (); |
||
| 2753 | |||
| 2754 | /* Okay, we're now positioned to make the NUL |
||
| 2755 | * transition. We couldn't have |
||
| 2756 | * yy_get_previous_state() go ahead and do it |
||
| 2757 | * for us because it doesn't know how to deal |
||
| 2758 | * with the possibility of jamming (and we don't |
||
| 2759 | * want to build jamming into it because then it |
||
| 2760 | * will run more slowly). |
||
| 2761 | */ |
||
| 2762 | |||
| 2763 | yy_next_state = yy_try_NUL_trans (yy_current_state); |
||
| 2764 | |||
| 2765 | yy_bp = (yytext_ptr) + YY_MORE_ADJ; |
||
| 2766 | |||
| 2767 | if (yy_next_state) |
||
| 2768 | { |
||
| 2769 | /* Consume the NUL. */ |
||
| 2770 | yy_cp = ++(yy_c_buf_p); |
||
| 2771 | yy_current_state = yy_next_state; |
||
| 2772 | goto yy_match; |
||
| 2773 | } |
||
| 2774 | |||
| 2775 | else |
||
| 2776 | { |
||
| 2777 | yy_cp = (yy_c_buf_p); |
||
| 2778 | goto yy_find_action; |
||
| 2779 | } |
||
| 2780 | } |
||
| 2781 | |||
| 2782 | else |
||
| 2783 | switch (yy_get_next_buffer ()) |
||
| 2784 | { |
||
| 2785 | case EOB_ACT_END_OF_FILE: |
||
| 2786 | { |
||
| 2787 | (yy_did_buffer_switch_on_eof) = 0; |
||
| 2788 | |||
| 2789 | if (yywrap ()) |
||
| 2790 | { |
||
| 2791 | /* Note: because we've taken care in |
||
| 2792 | * yy_get_next_buffer() to have set up |
||
| 2793 | * yytext, we can now set up |
||
| 2794 | * yy_c_buf_p so that if some total |
||
| 2795 | * hoser (like flex itself) wants to |
||
| 2796 | * call the scanner after we return the |
||
| 2797 | * YY_NULL, it'll still work - another |
||
| 2798 | * YY_NULL will get returned. |
||
| 2799 | */ |
||
| 2800 | (yy_c_buf_p) = |
||
| 2801 | (yytext_ptr) + YY_MORE_ADJ; |
||
| 2802 | |||
| 2803 | yy_act = YY_STATE_EOF (YY_START); |
||
| 2804 | goto do_action; |
||
| 2805 | } |
||
| 2806 | |||
| 2807 | else |
||
| 2808 | { |
||
| 2809 | if (!(yy_did_buffer_switch_on_eof)) |
||
| 2810 | YY_NEW_FILE; |
||
| 2811 | } |
||
| 2812 | break; |
||
| 2813 | } |
||
| 2814 | |||
| 2815 | case EOB_ACT_CONTINUE_SCAN: |
||
| 2816 | (yy_c_buf_p) = |
||
| 2817 | (yytext_ptr) + yy_amount_of_matched_text; |
||
| 2818 | |||
| 2819 | yy_current_state = yy_get_previous_state (); |
||
| 2820 | |||
| 2821 | yy_cp = (yy_c_buf_p); |
||
| 2822 | yy_bp = (yytext_ptr) + YY_MORE_ADJ; |
||
| 2823 | goto yy_match; |
||
| 2824 | |||
| 2825 | case EOB_ACT_LAST_MATCH: |
||
| 2826 | (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE |
||
| 2827 | ->yy_ch_buf[(yy_n_chars)]; |
||
| 2828 | |||
| 2829 | yy_current_state = yy_get_previous_state (); |
||
| 2830 | |||
| 2831 | yy_cp = (yy_c_buf_p); |
||
| 2832 | yy_bp = (yytext_ptr) + YY_MORE_ADJ; |
||
| 2833 | goto yy_find_action; |
||
| 2834 | } |
||
| 2835 | break; |
||
| 2836 | } |
||
| 2837 | |||
| 2838 | default: |
||
| 2839 | YY_FATAL_ERROR ("fatal flex scanner internal error--no action " |
||
| 2840 | "found"); |
||
| 2841 | } /* end of action switch */ |
||
| 2842 | } /* end of scanning one token */ |
||
| 2843 | } /* end of user's declarations */ |
||
| 2844 | } /* end of yylex */ |
||
| 2845 | |||
| 2846 | /* yy_get_next_buffer - try to read in a new buffer |
||
| 2847 | * |
||
| 2848 | * Returns a code representing an action: |
||
| 2849 | * EOB_ACT_LAST_MATCH - |
||
| 2850 | * EOB_ACT_CONTINUE_SCAN - continue scanning from current position |
||
| 2851 | * EOB_ACT_END_OF_FILE - end of file |
||
| 2852 | */ |
||
| 2853 | static int yy_get_next_buffer (void) |
||
| 2854 | { |
||
| 2855 | char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; |
||
| 2856 | char *source = (yytext_ptr); |
||
| 2857 | int number_to_move, i; |
||
| 2858 | int ret_val; |
||
| 2859 | |||
| 2860 | if ((yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1]) |
||
| 2861 | YY_FATAL_ERROR ("fatal flex scanner internal error--end of buffer missed"); |
||
| 2862 | |||
| 2863 | if (YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0) |
||
| 2864 | { /* Don't try to fill the buffer, so this is an EOF. */ |
||
| 2865 | if ((yy_c_buf_p) - (yytext_ptr) -YY_MORE_ADJ == 1) |
||
| 2866 | { |
||
| 2867 | /* We matched a single character, the EOB, so |
||
| 2868 | * treat this as a final EOF. |
||
| 2869 | */ |
||
| 2870 | return EOB_ACT_END_OF_FILE; |
||
| 2871 | } |
||
| 2872 | |||
| 2873 | else |
||
| 2874 | { |
||
| 2875 | /* We matched some text prior to the EOB, first |
||
| 2876 | * process it. |
||
| 2877 | */ |
||
| 2878 | return EOB_ACT_LAST_MATCH; |
||
| 2879 | } |
||
| 2880 | } |
||
| 2881 | |||
| 2882 | /* Try to read more data. */ |
||
| 2883 | |||
| 2884 | /* First move last chars to start of buffer. */ |
||
| 2885 | number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) -1); |
||
| 2886 | |||
| 2887 | for (i = 0; i < number_to_move; ++i) |
||
| 2888 | *(dest++) = *(source++); |
||
| 2889 | |||
| 2890 | if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING) |
||
| 2891 | /* don't do the read, it's not guaranteed to return an EOF, |
||
| 2892 | * just force an EOF |
||
| 2893 | */ |
||
| 2894 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; |
||
| 2895 | |||
| 2896 | else |
||
| 2897 | { |
||
| 2898 | int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; |
||
| 2899 | |||
| 2900 | while (num_to_read <= 0) |
||
| 2901 | { /* Not enough room in the buffer - grow it. */ |
||
| 2902 | |||
| 2903 | /* just a shorter name for the current buffer */ |
||
| 2904 | YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; |
||
| 2905 | |||
| 2906 | int yy_c_buf_p_offset = (int) ((yy_c_buf_p) -b->yy_ch_buf); |
||
| 2907 | |||
| 2908 | if (b->yy_is_our_buffer) |
||
| 2909 | { |
||
| 2910 | int new_size = b->yy_buf_size * 2; |
||
| 2911 | |||
| 2912 | if (new_size <= 0) |
||
| 2913 | b->yy_buf_size += b->yy_buf_size / 8; |
||
| 2914 | else |
||
| 2915 | b->yy_buf_size *= 2; |
||
| 2916 | |||
| 2917 | b->yy_ch_buf = (char *) |
||
| 2918 | /* Include room in for 2 EOB chars. */ |
||
| 2919 | yyrealloc ( |
||
| 2920 | (void *) b->yy_ch_buf, |
||
| 2921 | (yy_size_t) (b->yy_buf_size + 2)); |
||
| 2922 | } |
||
| 2923 | else |
||
| 2924 | /* Can't grow it, we don't own it. */ |
||
| 2925 | b->yy_ch_buf = NULL; |
||
| 2926 | |||
| 2927 | if (!b->yy_ch_buf) |
||
| 2928 | YY_FATAL_ERROR ("fatal error - scanner input buffer overflow"); |
||
| 2929 | |||
| 2930 | (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; |
||
| 2931 | |||
| 2932 | num_to_read = |
||
| 2933 | YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; |
||
| 2934 | } |
||
| 2935 | |||
| 2936 | if (num_to_read > YY_READ_BUF_SIZE) |
||
| 2937 | num_to_read = YY_READ_BUF_SIZE; |
||
| 2938 | |||
| 2939 | /* Read in more data. */ |
||
| 2940 | YY_INPUT ( |
||
| 2941 | (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), |
||
| 2942 | (yy_n_chars), |
||
| 2943 | num_to_read); |
||
| 2944 | |||
| 2945 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); |
||
| 2946 | } |
||
| 2947 | |||
| 2948 | if ((yy_n_chars) == 0) |
||
| 2949 | { |
||
| 2950 | if (number_to_move == YY_MORE_ADJ) |
||
| 2951 | { |
||
| 2952 | ret_val = EOB_ACT_END_OF_FILE; |
||
| 2953 | yyrestart (yyin); |
||
| 2954 | } |
||
| 2955 | |||
| 2956 | else |
||
| 2957 | { |
||
| 2958 | ret_val = EOB_ACT_LAST_MATCH; |
||
| 2959 | YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; |
||
| 2960 | } |
||
| 2961 | } |
||
| 2962 | |||
| 2963 | else |
||
| 2964 | ret_val = EOB_ACT_CONTINUE_SCAN; |
||
| 2965 | |||
| 2966 | if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) |
||
| 2967 | { |
||
| 2968 | /* Extend the array by 50%, plus the number we really need. */ |
||
| 2969 | int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); |
||
| 2970 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc ( |
||
| 2971 | (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size); |
||
| 2972 | if (!YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) |
||
| 2973 | YY_FATAL_ERROR ("out of dynamic memory in yy_get_next_buffer()"); |
||
| 2974 | /* "- 2" to take care of EOB's */ |
||
| 2975 | YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); |
||
| 2976 | } |
||
| 2977 | |||
| 2978 | (yy_n_chars) += number_to_move; |
||
| 2979 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; |
||
| 2980 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; |
||
| 2981 | |||
| 2982 | (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; |
||
| 2983 | |||
| 2984 | return ret_val; |
||
| 2985 | } |
||
| 2986 | |||
| 2987 | /* yy_get_previous_state - get the state just before the EOB char was reached */ |
||
| 2988 | |||
| 2989 | static yy_state_type yy_get_previous_state (void) |
||
| 2990 | { |
||
| 2991 | yy_state_type yy_current_state; |
||
| 2992 | char *yy_cp; |
||
| 2993 | |||
| 2994 | yy_current_state = (yy_start); |
||
| 2995 | |||
| 2996 | for (yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp) |
||
| 2997 | { |
||
| 2998 | YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI (*yy_cp)] : 1); |
||
| 2999 | if (yy_accept[yy_current_state]) |
||
| 3000 | { |
||
| 3001 | (yy_last_accepting_state) = yy_current_state; |
||
| 3002 | (yy_last_accepting_cpos) = yy_cp; |
||
| 3003 | } |
||
| 3004 | while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) |
||
| 3005 | { |
||
| 3006 | yy_current_state = (int) yy_def[yy_current_state]; |
||
| 3007 | if (yy_current_state >= 707) |
||
| 3008 | yy_c = yy_meta[yy_c]; |
||
| 3009 | } |
||
| 3010 | yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; |
||
| 3011 | } |
||
| 3012 | |||
| 3013 | return yy_current_state; |
||
| 3014 | } |
||
| 3015 | |||
| 3016 | /* yy_try_NUL_trans - try to make a transition on the NUL character |
||
| 3017 | * |
||
| 3018 | * synopsis |
||
| 3019 | * next_state = yy_try_NUL_trans( current_state ); |
||
| 3020 | */ |
||
| 3021 | static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state) |
||
| 3022 | { |
||
| 3023 | int yy_is_jam; |
||
| 3024 | char *yy_cp = (yy_c_buf_p); |
||
| 3025 | |||
| 3026 | YY_CHAR yy_c = 1; |
||
| 3027 | if (yy_accept[yy_current_state]) |
||
| 3028 | { |
||
| 3029 | (yy_last_accepting_state) = yy_current_state; |
||
| 3030 | (yy_last_accepting_cpos) = yy_cp; |
||
| 3031 | } |
||
| 3032 | while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) |
||
| 3033 | { |
||
| 3034 | yy_current_state = (int) yy_def[yy_current_state]; |
||
| 3035 | if (yy_current_state >= 707) |
||
| 3036 | yy_c = yy_meta[yy_c]; |
||
| 3037 | } |
||
| 3038 | yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; |
||
| 3039 | yy_is_jam = (yy_current_state == 706); |
||
| 3040 | |||
| 3041 | return yy_is_jam ? 0 : yy_current_state; |
||
| 3042 | } |
||
| 3043 | |||
| 3044 | #ifndef YY_NO_UNPUT |
||
| 3045 | |||
| 3046 | static void yyunput (int c, char *yy_bp) |
||
| 3047 | { |
||
| 3048 | char *yy_cp; |
||
| 3049 | |||
| 3050 | yy_cp = (yy_c_buf_p); |
||
| 3051 | |||
| 3052 | /* undo effects of setting up yytext */ |
||
| 3053 | *yy_cp = (yy_hold_char); |
||
| 3054 | |||
| 3055 | if (yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2) |
||
| 3056 | { /* need to shift things up to make room */ |
||
| 3057 | /* +2 for EOB chars. */ |
||
| 3058 | int number_to_move = (yy_n_chars) + 2; |
||
| 3059 | char *dest = &YY_CURRENT_BUFFER_LVALUE |
||
| 3060 | ->yy_ch_buf[YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; |
||
| 3061 | char *source = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; |
||
| 3062 | |||
| 3063 | while (source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) |
||
| 3064 | *--dest = *--source; |
||
| 3065 | |||
| 3066 | yy_cp += (int) (dest - source); |
||
| 3067 | yy_bp += (int) (dest - source); |
||
| 3068 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = |
||
| 3069 | (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size; |
||
| 3070 | |||
| 3071 | if (yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2) |
||
| 3072 | YY_FATAL_ERROR ("flex scanner push-back overflow"); |
||
| 3073 | } |
||
| 3074 | |||
| 3075 | *--yy_cp = (char) c; |
||
| 3076 | |||
| 3077 | (yytext_ptr) = yy_bp; |
||
| 3078 | (yy_hold_char) = *yy_cp; |
||
| 3079 | (yy_c_buf_p) = yy_cp; |
||
| 3080 | } |
||
| 3081 | |||
| 3082 | #endif |
||
| 3083 | |||
| 3084 | #ifndef YY_NO_INPUT |
||
| 3085 | #ifdef __cplusplus |
||
| 3086 | static int yyinput (void) |
||
| 3087 | #else |
||
| 3088 | static int input (void) |
||
| 3089 | #endif |
||
| 3090 | |||
| 3091 | { |
||
| 3092 | int c; |
||
| 3093 | |||
| 3094 | *(yy_c_buf_p) = (yy_hold_char); |
||
| 3095 | |||
| 3096 | if (*(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR) |
||
| 3097 | { |
||
| 3098 | /* yy_c_buf_p now points to the character we want to return. |
||
| 3099 | * If this occurs *before* the EOB characters, then it's a |
||
| 3100 | * valid NUL; if not, then we've hit the end of the buffer. |
||
| 3101 | */ |
||
| 3102 | if ((yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]) |
||
| 3103 | /* This was really a NUL. */ |
||
| 3104 | *(yy_c_buf_p) = '\0'; |
||
| 3105 | |||
| 3106 | else |
||
| 3107 | { /* need more input */ |
||
| 3108 | int offset = (int) ((yy_c_buf_p) - (yytext_ptr)); |
||
| 3109 | ++(yy_c_buf_p); |
||
| 3110 | |||
| 3111 | switch (yy_get_next_buffer ()) |
||
| 3112 | { |
||
| 3113 | case EOB_ACT_LAST_MATCH: |
||
| 3114 | /* This happens because yy_g_n_b() |
||
| 3115 | * sees that we've accumulated a |
||
| 3116 | * token and flags that we need to |
||
| 3117 | * try matching the token before |
||
| 3118 | * proceeding. But for input(), |
||
| 3119 | * there's no matching to consider. |
||
| 3120 | * So convert the EOB_ACT_LAST_MATCH |
||
| 3121 | * to EOB_ACT_END_OF_FILE. |
||
| 3122 | */ |
||
| 3123 | |||
| 3124 | /* Reset buffer status. */ |
||
| 3125 | yyrestart (yyin); |
||
| 3126 | |||
| 3127 | /*FALLTHROUGH*/ |
||
| 3128 | |||
| 3129 | case EOB_ACT_END_OF_FILE: |
||
| 3130 | { |
||
| 3131 | if (yywrap ()) |
||
| 3132 | return 0; |
||
| 3133 | |||
| 3134 | if (!(yy_did_buffer_switch_on_eof)) |
||
| 3135 | YY_NEW_FILE; |
||
| 3136 | #ifdef __cplusplus |
||
| 3137 | return yyinput (); |
||
| 3138 | #else |
||
| 3139 | return input (); |
||
| 3140 | #endif |
||
| 3141 | } |
||
| 3142 | |||
| 3143 | case EOB_ACT_CONTINUE_SCAN: |
||
| 3144 | (yy_c_buf_p) = (yytext_ptr) + offset; |
||
| 3145 | break; |
||
| 3146 | } |
||
| 3147 | } |
||
| 3148 | } |
||
| 3149 | |||
| 3150 | c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ |
||
| 3151 | *(yy_c_buf_p) = '\0'; /* preserve yytext */ |
||
| 3152 | (yy_hold_char) = *++(yy_c_buf_p); |
||
| 3153 | |||
| 3154 | return c; |
||
| 3155 | } |
||
| 3156 | #endif /* ifndef YY_NO_INPUT */ |
||
| 3157 | |||
| 3158 | /** Immediately switch to a different input stream. |
||
| 3159 | * @param input_file A readable stream. |
||
| 3160 | * |
||
| 3161 | * @note This function does not reset the start condition to @c INITIAL . |
||
| 3162 | */ |
||
| 3163 | void yyrestart (FILE *input_file) |
||
| 3164 | { |
||
| 3165 | if (!YY_CURRENT_BUFFER) |
||
| 3166 | { |
||
| 3167 | yyensure_buffer_stack (); |
||
| 3168 | YY_CURRENT_BUFFER_LVALUE = yy_create_buffer (yyin, YY_BUF_SIZE); |
||
| 3169 | } |
||
| 3170 | |||
| 3171 | yy_init_buffer (YY_CURRENT_BUFFER, input_file); |
||
| 3172 | yy_load_buffer_state (); |
||
| 3173 | } |
||
| 3174 | |||
| 3175 | /** Switch to a different input buffer. |
||
| 3176 | * @param new_buffer The new input buffer. |
||
| 3177 | * |
||
| 3178 | */ |
||
| 3179 | void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer) |
||
| 3180 | { |
||
| 3181 | /* TODO. We should be able to replace this entire function body |
||
| 3182 | * with |
||
| 3183 | * yypop_buffer_state(); |
||
| 3184 | * yypush_buffer_state(new_buffer); |
||
| 3185 | */ |
||
| 3186 | yyensure_buffer_stack (); |
||
| 3187 | if (YY_CURRENT_BUFFER == new_buffer) |
||
| 3188 | return; |
||
| 3189 | |||
| 3190 | if (YY_CURRENT_BUFFER) |
||
| 3191 | { |
||
| 3192 | /* Flush out information for old buffer. */ |
||
| 3193 | *(yy_c_buf_p) = (yy_hold_char); |
||
| 3194 | YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); |
||
| 3195 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); |
||
| 3196 | } |
||
| 3197 | |||
| 3198 | YY_CURRENT_BUFFER_LVALUE = new_buffer; |
||
| 3199 | yy_load_buffer_state (); |
||
| 3200 | |||
| 3201 | /* We don't actually know whether we did this switch during |
||
| 3202 | * EOF (yywrap()) processing, but the only time this flag |
||
| 3203 | * is looked at is after yywrap() is called, so it's safe |
||
| 3204 | * to go ahead and always set it. |
||
| 3205 | */ |
||
| 3206 | (yy_did_buffer_switch_on_eof) = 1; |
||
| 3207 | } |
||
| 3208 | |||
| 3209 | static void yy_load_buffer_state (void) |
||
| 3210 | { |
||
| 3211 | (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
||
| 3212 | (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; |
||
| 3213 | yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; |
||
| 3214 | (yy_hold_char) = *(yy_c_buf_p); |
||
| 3215 | } |
||
| 3216 | |||
| 3217 | /** Allocate and initialize an input buffer state. |
||
| 3218 | * @param file A readable stream. |
||
| 3219 | * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. |
||
| 3220 | * |
||
| 3221 | * @return the allocated buffer state. |
||
| 3222 | */ |
||
| 3223 | YY_BUFFER_STATE yy_create_buffer (FILE *file, int size) |
||
| 3224 | { |
||
| 3225 | YY_BUFFER_STATE b; |
||
| 3226 | |||
| 3227 | b = (YY_BUFFER_STATE) yyalloc (sizeof (struct yy_buffer_state)); |
||
| 3228 | if (!b) |
||
| 3229 | YY_FATAL_ERROR ("out of dynamic memory in yy_create_buffer()"); |
||
| 3230 | |||
| 3231 | b->yy_buf_size = size; |
||
| 3232 | |||
| 3233 | /* yy_ch_buf has to be 2 characters longer than the size given because |
||
| 3234 | * we need to put in 2 end-of-buffer characters. |
||
| 3235 | */ |
||
| 3236 | b->yy_ch_buf = (char *) yyalloc ((yy_size_t) (b->yy_buf_size + 2)); |
||
| 3237 | if (!b->yy_ch_buf) |
||
| 3238 | YY_FATAL_ERROR ("out of dynamic memory in yy_create_buffer()"); |
||
| 3239 | |||
| 3240 | b->yy_is_our_buffer = 1; |
||
| 3241 | |||
| 3242 | yy_init_buffer (b, file); |
||
| 3243 | |||
| 3244 | return b; |
||
| 3245 | } |
||
| 3246 | |||
| 3247 | /** Destroy the buffer. |
||
| 3248 | * @param b a buffer created with yy_create_buffer() |
||
| 3249 | * |
||
| 3250 | */ |
||
| 3251 | void yy_delete_buffer (YY_BUFFER_STATE b) |
||
| 3252 | { |
||
| 3253 | if (!b) |
||
| 3254 | return; |
||
| 3255 | |||
| 3256 | if (b == YY_CURRENT_BUFFER) /* Not sure if we should pop here. */ |
||
| 3257 | YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; |
||
| 3258 | |||
| 3259 | if (b->yy_is_our_buffer) |
||
| 3260 | yyfree ((void *) b->yy_ch_buf); |
||
| 3261 | |||
| 3262 | yyfree ((void *) b); |
||
| 3263 | } |
||
| 3264 | |||
| 3265 | /* Initializes or reinitializes a buffer. |
||
| 3266 | * This function is sometimes called more than once on the same buffer, |
||
| 3267 | * such as during a yyrestart() or at EOF. |
||
| 3268 | */ |
||
| 3269 | static void yy_init_buffer (YY_BUFFER_STATE b, FILE *file) |
||
| 3270 | |||
| 3271 | { |
||
| 3272 | int oerrno = errno; |
||
| 3273 | |||
| 3274 | yy_flush_buffer (b); |
||
| 3275 | |||
| 3276 | b->yy_input_file = file; |
||
| 3277 | b->yy_fill_buffer = 1; |
||
| 3278 | |||
| 3279 | /* If b is the current buffer, then yy_init_buffer was _probably_ |
||
| 3280 | * called from yyrestart() or through yy_get_next_buffer. |
||
| 3281 | * In that case, we don't want to reset the lineno or column. |
||
| 3282 | */ |
||
| 3283 | if (b != YY_CURRENT_BUFFER) |
||
| 3284 | { |
||
| 3285 | b->yy_bs_lineno = 1; |
||
| 3286 | b->yy_bs_column = 0; |
||
| 3287 | } |
||
| 3288 | |||
| 3289 | b->yy_is_interactive = file ? (isatty (fileno (file)) > 0) : 0; |
||
| 3290 | |||
| 3291 | errno = oerrno; |
||
| 3292 | } |
||
| 3293 | |||
| 3294 | /** Discard all buffered characters. On the next scan, YY_INPUT will be called. |
||
| 3295 | * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. |
||
| 3296 | * |
||
| 3297 | */ |
||
| 3298 | void yy_flush_buffer (YY_BUFFER_STATE b) |
||
| 3299 | { |
||
| 3300 | if (!b) |
||
| 3301 | return; |
||
| 3302 | |||
| 3303 | b->yy_n_chars = 0; |
||
| 3304 | |||
| 3305 | /* We always need two end-of-buffer characters. The first causes |
||
| 3306 | * a transition to the end-of-buffer state. The second causes |
||
| 3307 | * a jam in that state. |
||
| 3308 | */ |
||
| 3309 | b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; |
||
| 3310 | b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; |
||
| 3311 | |||
| 3312 | b->yy_buf_pos = &b->yy_ch_buf[0]; |
||
| 3313 | |||
| 3314 | b->yy_at_bol = 1; |
||
| 3315 | b->yy_buffer_status = YY_BUFFER_NEW; |
||
| 3316 | |||
| 3317 | if (b == YY_CURRENT_BUFFER) |
||
| 3318 | yy_load_buffer_state (); |
||
| 3319 | } |
||
| 3320 | |||
| 3321 | /** Pushes the new state onto the stack. The new state becomes |
||
| 3322 | * the current state. This function will allocate the stack |
||
| 3323 | * if necessary. |
||
| 3324 | * @param new_buffer The new state. |
||
| 3325 | * |
||
| 3326 | */ |
||
| 3327 | void yypush_buffer_state (YY_BUFFER_STATE new_buffer) |
||
| 3328 | { |
||
| 3329 | if (new_buffer == NULL) |
||
| 3330 | return; |
||
| 3331 | |||
| 3332 | yyensure_buffer_stack (); |
||
| 3333 | |||
| 3334 | /* This block is copied from yy_switch_to_buffer. */ |
||
| 3335 | if (YY_CURRENT_BUFFER) |
||
| 3336 | { |
||
| 3337 | /* Flush out information for old buffer. */ |
||
| 3338 | *(yy_c_buf_p) = (yy_hold_char); |
||
| 3339 | YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); |
||
| 3340 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); |
||
| 3341 | } |
||
| 3342 | |||
| 3343 | /* Only push if top exists. Otherwise, replace top. */ |
||
| 3344 | if (YY_CURRENT_BUFFER) |
||
| 3345 | (yy_buffer_stack_top)++; |
||
| 3346 | YY_CURRENT_BUFFER_LVALUE = new_buffer; |
||
| 3347 | |||
| 3348 | /* copied from yy_switch_to_buffer. */ |
||
| 3349 | yy_load_buffer_state (); |
||
| 3350 | (yy_did_buffer_switch_on_eof) = 1; |
||
| 3351 | } |
||
| 3352 | |||
| 3353 | /** Removes and deletes the top of the stack, if present. |
||
| 3354 | * The next element becomes the new top. |
||
| 3355 | * |
||
| 3356 | */ |
||
| 3357 | void yypop_buffer_state (void) |
||
| 3358 | { |
||
| 3359 | if (!YY_CURRENT_BUFFER) |
||
| 3360 | return; |
||
| 3361 | |||
| 3362 | yy_delete_buffer (YY_CURRENT_BUFFER); |
||
| 3363 | YY_CURRENT_BUFFER_LVALUE = NULL; |
||
| 3364 | if ((yy_buffer_stack_top) > 0) |
||
| 3365 | --(yy_buffer_stack_top); |
||
| 3366 | |||
| 3367 | if (YY_CURRENT_BUFFER) |
||
| 3368 | { |
||
| 3369 | yy_load_buffer_state (); |
||
| 3370 | (yy_did_buffer_switch_on_eof) = 1; |
||
| 3371 | } |
||
| 3372 | } |
||
| 3373 | |||
| 3374 | /* Allocates the stack if it does not exist. |
||
| 3375 | * Guarantees space for at least one push. |
||
| 3376 | */ |
||
| 3377 | static void yyensure_buffer_stack (void) |
||
| 3378 | { |
||
| 3379 | yy_size_t num_to_alloc; |
||
| 3380 | |||
| 3381 | if (!(yy_buffer_stack)) |
||
| 3382 | { |
||
| 3383 | /* First allocation is just for 2 elements, since we don't know if this |
||
| 3384 | * scanner will even need a stack. We use 2 instead of 1 to avoid an |
||
| 3385 | * immediate realloc on the next call. |
||
| 3386 | */ |
||
| 3387 | num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ |
||
| 3388 | (yy_buffer_stack) = (struct yy_buffer_state **) yyalloc ( |
||
| 3389 | num_to_alloc * sizeof (struct yy_buffer_state *)); |
||
| 3390 | if (!(yy_buffer_stack)) |
||
| 3391 | YY_FATAL_ERROR ("out of dynamic memory in yyensure_buffer_stack()"); |
||
| 3392 | |||
| 3393 | memset ( |
||
| 3394 | (yy_buffer_stack), 0, num_to_alloc * sizeof (struct yy_buffer_state *)); |
||
| 3395 | |||
| 3396 | (yy_buffer_stack_max) = num_to_alloc; |
||
| 3397 | (yy_buffer_stack_top) = 0; |
||
| 3398 | return; |
||
| 3399 | } |
||
| 3400 | |||
| 3401 | if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1) |
||
| 3402 | { |
||
| 3403 | /* Increase the buffer to prepare for a possible push. */ |
||
| 3404 | yy_size_t grow_size = 8 /* arbitrary grow size */; |
||
| 3405 | |||
| 3406 | num_to_alloc = (yy_buffer_stack_max) + grow_size; |
||
| 3407 | (yy_buffer_stack) = (struct yy_buffer_state **) yyrealloc ( |
||
| 3408 | (yy_buffer_stack), num_to_alloc * sizeof (struct yy_buffer_state *)); |
||
| 3409 | if (!(yy_buffer_stack)) |
||
| 3410 | YY_FATAL_ERROR ("out of dynamic memory in yyensure_buffer_stack()"); |
||
| 3411 | |||
| 3412 | /* zero only the new slots.*/ |
||
| 3413 | memset ( |
||
| 3414 | (yy_buffer_stack) + (yy_buffer_stack_max), |
||
| 3415 | 0, |
||
| 3416 | grow_size * sizeof (struct yy_buffer_state *)); |
||
| 3417 | (yy_buffer_stack_max) = num_to_alloc; |
||
| 3418 | } |
||
| 3419 | } |
||
| 3420 | |||
| 3421 | /** Setup the input buffer state to scan directly from a user-specified character buffer. |
||
| 3422 | * @param base the character buffer |
||
| 3423 | * @param size the size in bytes of the character buffer |
||
| 3424 | * |
||
| 3425 | * @return the newly allocated buffer state object. |
||
| 3426 | */ |
||
| 3427 | YY_BUFFER_STATE yy_scan_buffer (char *base, yy_size_t size) |
||
| 3428 | { |
||
| 3429 | YY_BUFFER_STATE b; |
||
| 3430 | |||
| 3431 | if (size < 2 || base[size - 2] != YY_END_OF_BUFFER_CHAR || |
||
| 3432 | base[size - 1] != YY_END_OF_BUFFER_CHAR) |
||
| 3433 | /* They forgot to leave room for the EOB's. */ |
||
| 3434 | return NULL; |
||
| 3435 | |||
| 3436 | b = (YY_BUFFER_STATE) yyalloc (sizeof (struct yy_buffer_state)); |
||
| 3437 | if (!b) |
||
| 3438 | YY_FATAL_ERROR ("out of dynamic memory in yy_scan_buffer()"); |
||
| 3439 | |||
| 3440 | b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ |
||
| 3441 | b->yy_buf_pos = b->yy_ch_buf = base; |
||
| 3442 | b->yy_is_our_buffer = 0; |
||
| 3443 | b->yy_input_file = NULL; |
||
| 3444 | b->yy_n_chars = b->yy_buf_size; |
||
| 3445 | b->yy_is_interactive = 0; |
||
| 3446 | b->yy_at_bol = 1; |
||
| 3447 | b->yy_fill_buffer = 0; |
||
| 3448 | b->yy_buffer_status = YY_BUFFER_NEW; |
||
| 3449 | |||
| 3450 | yy_switch_to_buffer (b); |
||
| 3451 | |||
| 3452 | return b; |
||
| 3453 | } |
||
| 3454 | |||
| 3455 | /** Setup the input buffer state to scan a string. The next call to yylex() will |
||
| 3456 | * scan from a @e copy of @a str. |
||
| 3457 | * @param yystr a NUL-terminated string to scan |
||
| 3458 | * |
||
| 3459 | * @return the newly allocated buffer state object. |
||
| 3460 | * @note If you want to scan bytes that may contain NUL values, then use |
||
| 3461 | * yy_scan_bytes() instead. |
||
| 3462 | */ |
||
| 3463 | YY_BUFFER_STATE yy_scan_string (const char *yystr) |
||
| 3464 | { |
||
| 3465 | return yy_scan_bytes (yystr, (int) strlen (yystr)); |
||
| 3466 | } |
||
| 3467 | |||
| 3468 | /** Setup the input buffer state to scan the given bytes. The next call to yylex() will |
||
| 3469 | * scan from a @e copy of @a bytes. |
||
| 3470 | * @param yybytes the byte buffer to scan |
||
| 3471 | * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. |
||
| 3472 | * |
||
| 3473 | * @return the newly allocated buffer state object. |
||
| 3474 | */ |
||
| 3475 | YY_BUFFER_STATE yy_scan_bytes (const char *yybytes, int _yybytes_len) |
||
| 3476 | { |
||
| 3477 | YY_BUFFER_STATE b; |
||
| 3478 | char *buf; |
||
| 3479 | yy_size_t n; |
||
| 3480 | int i; |
||
| 3481 | |||
| 3482 | /* Get memory for full buffer, including space for trailing EOB's. */ |
||
| 3483 | n = (yy_size_t) (_yybytes_len + 2); |
||
| 3484 | buf = (char *) yyalloc (n); |
||
| 3485 | if (!buf) |
||
| 3486 | YY_FATAL_ERROR ("out of dynamic memory in yy_scan_bytes()"); |
||
| 3487 | |||
| 3488 | for (i = 0; i < _yybytes_len; ++i) |
||
| 3489 | buf[i] = yybytes[i]; |
||
| 3490 | |||
| 3491 | buf[_yybytes_len] = buf[_yybytes_len + 1] = YY_END_OF_BUFFER_CHAR; |
||
| 3492 | |||
| 3493 | b = yy_scan_buffer (buf, n); |
||
| 3494 | if (!b) |
||
| 3495 | YY_FATAL_ERROR ("bad buffer in yy_scan_bytes()"); |
||
| 3496 | |||
| 3497 | /* It's okay to grow etc. this buffer, and we should throw it |
||
| 3498 | * away when we're done. |
||
| 3499 | */ |
||
| 3500 | b->yy_is_our_buffer = 1; |
||
| 3501 | |||
| 3502 | return b; |
||
| 3503 | } |
||
| 3504 | |||
| 3505 | #ifndef YY_EXIT_FAILURE |
||
| 3506 | #define YY_EXIT_FAILURE 2 |
||
| 3507 | #endif |
||
| 3508 | |||
| 3509 | static void yynoreturn yy_fatal_error (const char *msg) |
||
| 3510 | { |
||
| 3511 | fprintf (stderr, "%s\n", msg); |
||
| 3512 | exit (YY_EXIT_FAILURE); |
||
| 3513 | } |
||
| 3514 | |||
| 3515 | /* Redefine yyless() so it works in section 3 code. */ |
||
| 3516 | |||
| 3517 | #undef yyless |
||
| 3518 | #define yyless(n) \ |
||
| 3519 | do \ |
||
| 3520 | { \ |
||
| 3521 | /* Undo effects of setting up yytext. */ \ |
||
| 3522 | int yyless_macro_arg = (n); \ |
||
| 3523 | YY_LESS_LINENO (yyless_macro_arg); \ |
||
| 3524 | yytext[yyleng] = (yy_hold_char); \ |
||
| 3525 | (yy_c_buf_p) = yytext + yyless_macro_arg; \ |
||
| 3526 | (yy_hold_char) = *(yy_c_buf_p); \ |
||
| 3527 | *(yy_c_buf_p) = '\0'; \ |
||
| 3528 | yyleng = yyless_macro_arg; \ |
||
| 3529 | } while (0) |
||
| 3530 | |||
| 3531 | /* Accessor methods (get/set functions) to struct members. */ |
||
| 3532 | |||
| 3533 | /** Get the current line number. |
||
| 3534 | * |
||
| 3535 | */ |
||
| 3536 | int yyget_lineno (void) |
||
| 3537 | { |
||
| 3538 | return yylineno; |
||
| 3539 | } |
||
| 3540 | |||
| 3541 | /** Get the input stream. |
||
| 3542 | * |
||
| 3543 | */ |
||
| 3544 | FILE *yyget_in (void) |
||
| 3545 | { |
||
| 3546 | return yyin; |
||
| 3547 | } |
||
| 3548 | |||
| 3549 | /** Get the output stream. |
||
| 3550 | * |
||
| 3551 | */ |
||
| 3552 | FILE *yyget_out (void) |
||
| 3553 | { |
||
| 3554 | return yyout; |
||
| 3555 | } |
||
| 3556 | |||
| 3557 | /** Get the length of the current token. |
||
| 3558 | * |
||
| 3559 | */ |
||
| 3560 | int yyget_leng (void) |
||
| 3561 | { |
||
| 3562 | return yyleng; |
||
| 3563 | } |
||
| 3564 | |||
| 3565 | /** Get the current token. |
||
| 3566 | * |
||
| 3567 | */ |
||
| 3568 | |||
| 3569 | char *yyget_text (void) |
||
| 3570 | { |
||
| 3571 | return yytext; |
||
| 3572 | } |
||
| 3573 | |||
| 3574 | /** Set the current line number. |
||
| 3575 | * @param _line_number line number |
||
| 3576 | * |
||
| 3577 | */ |
||
| 3578 | void yyset_lineno (int _line_number) |
||
| 3579 | { |
||
| 3580 | yylineno = _line_number; |
||
| 3581 | } |
||
| 3582 | |||
| 3583 | /** Set the input stream. This does not discard the current |
||
| 3584 | * input buffer. |
||
| 3585 | * @param _in_str A readable stream. |
||
| 3586 | * |
||
| 3587 | * @see yy_switch_to_buffer |
||
| 3588 | */ |
||
| 3589 | void yyset_in (FILE *_in_str) |
||
| 3590 | { |
||
| 3591 | yyin = _in_str; |
||
| 3592 | } |
||
| 3593 | |||
| 3594 | void yyset_out (FILE *_out_str) |
||
| 3595 | { |
||
| 3596 | yyout = _out_str; |
||
| 3597 | } |
||
| 3598 | |||
| 3599 | int yyget_debug (void) |
||
| 3600 | { |
||
| 3601 | return yy_flex_debug; |
||
| 3602 | } |
||
| 3603 | |||
| 3604 | void yyset_debug (int _bdebug) |
||
| 3605 | { |
||
| 3606 | yy_flex_debug = _bdebug; |
||
| 3607 | } |
||
| 3608 | |||
| 3609 | static int yy_init_globals (void) |
||
| 3610 | { |
||
| 3611 | /* Initialization is the same as for the non-reentrant scanner. |
||
| 3612 | * This function is called from yylex_destroy(), so don't allocate here. |
||
| 3613 | */ |
||
| 3614 | |||
| 3615 | (yy_buffer_stack) = NULL; |
||
| 3616 | (yy_buffer_stack_top) = 0; |
||
| 3617 | (yy_buffer_stack_max) = 0; |
||
| 3618 | (yy_c_buf_p) = NULL; |
||
| 3619 | (yy_init) = 0; |
||
| 3620 | (yy_start) = 0; |
||
| 3621 | |||
| 3622 | /* Defined in main.c */ |
||
| 3623 | #ifdef YY_STDINIT |
||
| 3624 | yyin = stdin; |
||
| 3625 | yyout = stdout; |
||
| 3626 | #else |
||
| 3627 | yyin = NULL; |
||
| 3628 | yyout = NULL; |
||
| 3629 | #endif |
||
| 3630 | |||
| 3631 | /* For future reference: Set errno on error, since we are called by |
||
| 3632 | * yylex_init() |
||
| 3633 | */ |
||
| 3634 | return 0; |
||
| 3635 | } |
||
| 3636 | |||
| 3637 | /* yylex_destroy is for both reentrant and non-reentrant scanners. */ |
||
| 3638 | int yylex_destroy (void) |
||
| 3639 | { |
||
| 3640 | /* Pop the buffer stack, destroying each element. */ |
||
| 3641 | while (YY_CURRENT_BUFFER) |
||
| 3642 | { |
||
| 3643 | yy_delete_buffer (YY_CURRENT_BUFFER); |
||
| 3644 | YY_CURRENT_BUFFER_LVALUE = NULL; |
||
| 3645 | yypop_buffer_state (); |
||
| 3646 | } |
||
| 3647 | |||
| 3648 | /* Destroy the stack itself. */ |
||
| 3649 | yyfree ((yy_buffer_stack)); |
||
| 3650 | (yy_buffer_stack) = NULL; |
||
| 3651 | |||
| 3652 | /* Reset the globals. This is important in a non-reentrant scanner so the next time |
||
| 3653 | * yylex() is called, initialization will occur. */ |
||
| 3654 | yy_init_globals (); |
||
| 3655 | |||
| 3656 | return 0; |
||
| 3657 | } |
||
| 3658 | |||
| 3659 | /* |
||
| 3660 | * Internal utility routines. |
||
| 3661 | */ |
||
| 3662 | |||
| 3663 | #ifndef yytext_ptr |
||
| 3664 | static void yy_flex_strncpy (char *s1, const char *s2, int n) |
||
| 3665 | { |
||
| 3666 | int i; |
||
| 3667 | for (i = 0; i < n; ++i) |
||
| 3668 | s1[i] = s2[i]; |
||
| 3669 | } |
||
| 3670 | #endif |
||
| 3671 | |||
| 3672 | #ifdef YY_NEED_STRLEN |
||
| 3673 | static int yy_flex_strlen (const char *s) |
||
| 3674 | { |
||
| 3675 | int n; |
||
| 3676 | for (n = 0; s[n]; ++n) |
||
| 3677 | ; |
||
| 3678 | |||
| 3679 | return n; |
||
| 3680 | } |
||
| 3681 | #endif |
||
| 3682 | |||
| 3683 | void *yyalloc (yy_size_t size) |
||
| 3684 | { |
||
| 3685 | return malloc (size); |
||
| 3686 | } |
||
| 3687 | |||
| 3688 | void *yyrealloc (void *ptr, yy_size_t size) |
||
| 3689 | { |
||
| 3690 | /* The cast to (char *) in the following accommodates both |
||
| 3691 | * implementations that use char* generic pointers, and those |
||
| 3692 | * that use void* generic pointers. It works with the latter |
||
| 3693 | * because both ANSI C and C++ allow castless assignment from |
||
| 3694 | * any pointer type to void*, and deal with argument conversions |
||
| 3695 | * as though doing an assignment. |
||
| 3696 | */ |
||
| 3697 | return realloc (ptr, size); |
||
| 3698 | } |
||
| 3699 | |||
| 3700 | void yyfree (void *ptr) |
||
| 3701 | { |
||
| 3702 | free ((char *) ptr); /* see yyrealloc() for (char *) cast */ |
||
| 3703 | } |
||
| 3704 | |||
| 3705 | #define YYTABLES_NAME "yytables" |
||
| 3706 | |||
| 3707 | #line 786 "acf_lex.l" |
||
| 3708 | |||
| 3709 | /* terminate an ACFP and VHDL comment */ |
||
| 3710 | void skip_to_eol (void) |
||
| 3711 | { |
||
| 3712 | int c; |
||
| 3713 | for (;;) |
||
| 3714 | { |
||
| 3715 | c = input (); |
||
| 3716 | if (c == '\n' || c == EOF) |
||
| 3717 | { |
||
| 3718 | lineno++; |
||
| 3719 | return; |
||
| 3720 | } |
||
| 3721 | } /* VHDL comment */ |
||
| 3722 | } |
||
| 3723 | |||
| 3724 | /* execute a command line command */ |
||
| 3725 | char stringbuff[MAXIDLEN]; |
||
| 3726 | void lex_exec_line (void) |
||
| 3727 | { |
||
| 3728 | int c, i; |
||
| 3729 | for (i = 0; i < MAXIDLEN - 2;) |
||
| 3730 | { |
||
| 3731 | c = input (); |
||
| 3732 | stringbuff[i++] = c; |
||
| 3733 | if (c == '\n' || c == EOF) |
||
| 3734 | { |
||
| 3735 | lineno++; |
||
| 3736 | stringbuff[i] = 0; |
||
| 3737 | ExecuteString (stringbuff, yy_nArgs, yy_Args); |
||
| 3738 | return; |
||
| 3739 | } |
||
| 3740 | } |
||
| 3741 | stringbuff[i] = 0; |
||
| 3742 | ExecuteString (stringbuff, yy_nArgs, yy_Args); |
||
| 3743 | } |
||
| 3744 | |||
| 3745 | /* supporting functions need to be in sane file so LEX macros work */ |
||
| 3746 | void skip_c_comment (void) |
||
| 3747 | { |
||
| 3748 | int c; |
||
| 3749 | for (;;) |
||
| 3750 | { |
||
| 3751 | while (((c = input ()) != EOF) && (c != '*')) |
||
| 3752 | { |
||
| 3753 | if (c == '\n') |
||
| 3754 | lineno++; |
||
| 3755 | } |
||
| 3756 | if (c == '*') |
||
| 3757 | { |
||
| 3758 | while ((c = input ()) == '*') |
||
| 3759 | putchar (c); |
||
| 3760 | if (c == '\n') |
||
| 3761 | lineno++; |
||
| 3762 | if (c == '/') |
||
| 3763 | break; |
||
| 3764 | } |
||
| 3765 | if (c == EOF) |
||
| 3766 | { |
||
| 3767 | Log (LOG_GENERAL, "End of file in comment\n"); |
||
| 3768 | break; |
||
| 3769 | } |
||
| 3770 | } |
||
| 3771 | } |
||
| 3772 | |||
| 3773 | void exit_lex_block (void) |
||
| 3774 | { |
||
| 3775 | inside_block = 0; |
||
| 3776 | prev_begin = INITIAL; |
||
| 3777 | BEGIN (INITIAL); |
||
| 3778 | } |
||
| 3779 | |||
| 3780 | void tidy_lex (void) |
||
| 3781 | { |
||
| 3782 | errorseen = 0; |
||
| 3783 | include_stack_ptr = 0; |
||
| 3784 | exit_lex_block (); |
||
| 3785 | start_grammar = FILEMODE; |
||
| 3786 | } |
||
| 3787 | |||
| 3788 | int yyerror (char *x) |
||
| 3789 | { |
||
| 3790 | if (!errorseen) |
||
| 3791 | { |
||
| 3792 | if (include_stack_ptr == 0) |
||
| 3793 | { |
||
| 3794 | Log ( |
||
| 3795 | LOG_ERROR, |
||
| 3796 | "-- Error in %s syntax\n-- -->%s near string (%s) at line %d\n", |
||
| 3797 | yyerr_start_names[YY_START], |
||
| 3798 | x, |
||
| 3799 | yytext, |
||
| 3800 | lineno); |
||
| 3801 | } |
||
| 3802 | else |
||
| 3803 | { |
||
| 3804 | Log ( |
||
| 3805 | LOG_ERROR, |
||
| 3806 | "-- File %s: Error in %s syntax\n-- -->%s near string (%s) at " |
||
| 3807 | "line %d\n", |
||
| 3808 | filename[include_stack_ptr], |
||
| 3809 | yyerr_start_names[YY_START], |
||
| 3810 | x, |
||
| 3811 | yytext, |
||
| 3812 | lineno); |
||
| 3813 | } |
||
| 3814 | } |
||
| 3815 | errorseen = 1; |
||
| 3816 | include_stack_ptr = 0; |
||
| 3817 | exit_lex_block (); |
||
| 3818 | YY_FLUSH_BUFFER; |
||
| 3819 | yyterminate (); |
||
| 3820 | return 1; |
||
| 3821 | } |
||
| 3822 | |||
| 3823 | /********************************************************/ |
||
| 3824 | /* Reading generic expressions from a string */ |
||
| 3825 | /********************************************************/ |
||
| 3826 | |||
| 3827 | static char *myinputptr; |
||
| 3828 | static char *myinputlim; |
||
| 3829 | /* this is exported */ |
||
| 3830 | expression_t *cmd_expression; |
||
| 3831 | |||
| 3832 | int my_yyinput (char *buf, int max_size) |
||
| 3833 | { |
||
| 3834 | int n; |
||
| 3835 | n = (max_size < (myinputlim - myinputptr)) ? max_size : myinputlim - myinputptr; |
||
| 3836 | if (n > 0) |
||
| 3837 | { |
||
| 3838 | memcpy (buf, myinputptr, n); |
||
| 3839 | myinputptr += n; |
||
| 3840 | } |
||
| 3841 | return n; |
||
| 3842 | } |
||
| 3843 | |||
| 3844 | /* this function requires a large number of declarations from |
||
| 3845 | lex. */ |
||
| 3846 | |||
| 3847 | expression_t *compile_expression_from_string (char *s) |
||
| 3848 | { |
||
| 3849 | int prev_expr_begin; |
||
| 3850 | myinputptr = s; |
||
| 3851 | myinputlim = s + strlen (s); |
||
| 3852 | prev_expr_begin = YY_START; |
||
| 3853 | |||
| 3854 | BEGIN (expr); |
||
| 3855 | |||
| 3856 | start_grammar = CMDMODE; |
||
| 3857 | lex_from_string = 1; |
||
| 3858 | |||
| 3859 | yy_scan_buffer (s, strlen (s)); // new code no macro mangle |
||
| 3860 | |||
| 3861 | lex_from_string = 0; |
||
| 3862 | BEGIN (prev_expr_begin); |
||
| 3863 | |||
| 3864 | return cmd_expression; |
||
| 3865 | } |