1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/security/nss/cmd/crlutil/crlgen_lex.c Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,1783 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +/* A lexical scanner generated by flex */ 1.9 + 1.10 +#define FLEX_SCANNER 1.11 +#define YY_FLEX_MAJOR_VERSION 2 1.12 +#define YY_FLEX_MINOR_VERSION 5 1.13 + 1.14 +#include <stdio.h> 1.15 +#ifdef _WIN32 1.16 +#include <io.h> 1.17 +#else 1.18 +#include <unistd.h> 1.19 +#endif 1.20 + 1.21 +/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ 1.22 +#ifdef c_plusplus 1.23 +#ifndef __cplusplus 1.24 +#define __cplusplus 1.25 +#endif 1.26 +#endif 1.27 + 1.28 +#ifdef __cplusplus 1.29 + 1.30 +#include <stdlib.h> 1.31 + 1.32 +/* Use prototypes in function declarations. */ 1.33 +#define YY_USE_PROTOS 1.34 + 1.35 +/* The "const" storage-class-modifier is valid. */ 1.36 +#define YY_USE_CONST 1.37 + 1.38 +#else /* ! __cplusplus */ 1.39 + 1.40 +#if __STDC__ 1.41 + 1.42 +#define YY_USE_PROTOS 1.43 +#define YY_USE_CONST 1.44 + 1.45 +#endif /* __STDC__ */ 1.46 +#endif /* ! __cplusplus */ 1.47 + 1.48 +#ifdef __TURBOC__ 1.49 + #pragma warn -rch 1.50 + #pragma warn -use 1.51 +#include <io.h> 1.52 +#include <stdlib.h> 1.53 +#define YY_USE_CONST 1.54 +#define YY_USE_PROTOS 1.55 +#endif 1.56 + 1.57 +#ifdef YY_USE_CONST 1.58 +#define yyconst const 1.59 +#else 1.60 +#define yyconst 1.61 +#endif 1.62 + 1.63 + 1.64 +#ifdef YY_USE_PROTOS 1.65 +#define YY_PROTO(proto) proto 1.66 +#else 1.67 +#define YY_PROTO(proto) () 1.68 +#endif 1.69 + 1.70 +/* Returned upon end-of-file. */ 1.71 +#define YY_NULL 0 1.72 + 1.73 +/* Promotes a possibly negative, possibly signed char to an unsigned 1.74 + * integer for use as an array index. If the signed char is negative, 1.75 + * we want to instead treat it as an 8-bit unsigned char, hence the 1.76 + * double cast. 1.77 + */ 1.78 +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) 1.79 + 1.80 +/* Enter a start condition. This macro really ought to take a parameter, 1.81 + * but we do it the disgusting crufty way forced on us by the ()-less 1.82 + * definition of BEGIN. 1.83 + */ 1.84 +#define BEGIN yy_start = 1 + 2 * 1.85 + 1.86 +/* Translate the current start state into a value that can be later handed 1.87 + * to BEGIN to return to the state. The YYSTATE alias is for lex 1.88 + * compatibility. 1.89 + */ 1.90 +#define YY_START ((yy_start - 1) / 2) 1.91 +#define YYSTATE YY_START 1.92 + 1.93 +/* Action number for EOF rule of a given start state. */ 1.94 +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) 1.95 + 1.96 +/* Special action meaning "start processing a new file". */ 1.97 +#define YY_NEW_FILE yyrestart( yyin ) 1.98 + 1.99 +#define YY_END_OF_BUFFER_CHAR 0 1.100 + 1.101 +/* Size of default input buffer. */ 1.102 +#define YY_BUF_SIZE 16384 1.103 + 1.104 +typedef struct yy_buffer_state *YY_BUFFER_STATE; 1.105 + 1.106 +extern int yyleng; 1.107 +extern FILE *yyin, *yyout; 1.108 + 1.109 +#define EOB_ACT_CONTINUE_SCAN 0 1.110 +#define EOB_ACT_END_OF_FILE 1 1.111 +#define EOB_ACT_LAST_MATCH 2 1.112 + 1.113 +/* The funky do-while in the following #define is used to turn the definition 1.114 + * int a single C statement (which needs a semi-colon terminator). This 1.115 + * avoids problems with code like: 1.116 + * 1.117 + * if ( condition_holds ) 1.118 + * yyless( 5 ); 1.119 + * else 1.120 + * do_something_else(); 1.121 + * 1.122 + * Prior to using the do-while the compiler would get upset at the 1.123 + * "else" because it interpreted the "if" statement as being all 1.124 + * done when it reached the ';' after the yyless() call. 1.125 + */ 1.126 + 1.127 +/* Return all but the first 'n' matched characters back to the input stream. */ 1.128 + 1.129 +#define yyless(n) \ 1.130 + do \ 1.131 + { \ 1.132 + /* Undo effects of setting up yytext. */ \ 1.133 + *yy_cp = yy_hold_char; \ 1.134 + YY_RESTORE_YY_MORE_OFFSET \ 1.135 + yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ 1.136 + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ 1.137 + } \ 1.138 + while ( 0 ) 1.139 + 1.140 +#define unput(c) yyunput( c, yytext_ptr ) 1.141 + 1.142 +/* The following is because we cannot portably get our hands on size_t 1.143 + * (without autoconf's help, which isn't available because we want 1.144 + * flex-generated scanners to compile on their own). 1.145 + */ 1.146 +typedef unsigned int yy_size_t; 1.147 + 1.148 + 1.149 +struct yy_buffer_state 1.150 + { 1.151 + FILE *yy_input_file; 1.152 + 1.153 + char *yy_ch_buf; /* input buffer */ 1.154 + char *yy_buf_pos; /* current position in input buffer */ 1.155 + 1.156 + /* Size of input buffer in bytes, not including room for EOB 1.157 + * characters. 1.158 + */ 1.159 + yy_size_t yy_buf_size; 1.160 + 1.161 + /* Number of characters read into yy_ch_buf, not including EOB 1.162 + * characters. 1.163 + */ 1.164 + int yy_n_chars; 1.165 + 1.166 + /* Whether we "own" the buffer - i.e., we know we created it, 1.167 + * and can realloc() it to grow it, and should free() it to 1.168 + * delete it. 1.169 + */ 1.170 + int yy_is_our_buffer; 1.171 + 1.172 + /* Whether this is an "interactive" input source; if so, and 1.173 + * if we're using stdio for input, then we want to use getc() 1.174 + * instead of fread(), to make sure we stop fetching input after 1.175 + * each newline. 1.176 + */ 1.177 + int yy_is_interactive; 1.178 + 1.179 + /* Whether we're considered to be at the beginning of a line. 1.180 + * If so, '^' rules will be active on the next match, otherwise 1.181 + * not. 1.182 + */ 1.183 + int yy_at_bol; 1.184 + 1.185 + /* Whether to try to fill the input buffer when we reach the 1.186 + * end of it. 1.187 + */ 1.188 + int yy_fill_buffer; 1.189 + 1.190 + int yy_buffer_status; 1.191 +#define YY_BUFFER_NEW 0 1.192 +#define YY_BUFFER_NORMAL 1 1.193 + /* When an EOF's been seen but there's still some text to process 1.194 + * then we mark the buffer as YY_EOF_PENDING, to indicate that we 1.195 + * shouldn't try reading from the input source any more. We might 1.196 + * still have a bunch of tokens to match, though, because of 1.197 + * possible backing-up. 1.198 + * 1.199 + * When we actually see the EOF, we change the status to "new" 1.200 + * (via yyrestart()), so that the user can continue scanning by 1.201 + * just pointing yyin at a new input file. 1.202 + */ 1.203 +#define YY_BUFFER_EOF_PENDING 2 1.204 + }; 1.205 + 1.206 +static YY_BUFFER_STATE yy_current_buffer = 0; 1.207 + 1.208 +/* We provide macros for accessing buffer states in case in the 1.209 + * future we want to put the buffer states in a more general 1.210 + * "scanner state". 1.211 + */ 1.212 +#define YY_CURRENT_BUFFER yy_current_buffer 1.213 + 1.214 + 1.215 +/* yy_hold_char holds the character lost when yytext is formed. */ 1.216 +static char yy_hold_char; 1.217 + 1.218 +static int yy_n_chars; /* number of characters read into yy_ch_buf */ 1.219 + 1.220 + 1.221 +int yyleng; 1.222 + 1.223 +/* Points to current character in buffer. */ 1.224 +static char *yy_c_buf_p = (char *) 0; 1.225 +static int yy_init = 1; /* whether we need to initialize */ 1.226 +static int yy_start = 0; /* start state number */ 1.227 + 1.228 +/* Flag which is used to allow yywrap()'s to do buffer switches 1.229 + * instead of setting up a fresh yyin. A bit of a hack ... 1.230 + */ 1.231 +static int yy_did_buffer_switch_on_eof; 1.232 + 1.233 +void yyrestart YY_PROTO(( FILE *input_file )); 1.234 + 1.235 +void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); 1.236 +void yy_load_buffer_state YY_PROTO(( void )); 1.237 +YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); 1.238 +void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); 1.239 +void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); 1.240 +void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); 1.241 +#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) 1.242 + 1.243 +YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); 1.244 +YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); 1.245 +YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); 1.246 + 1.247 +static void *yy_flex_alloc YY_PROTO(( yy_size_t )); 1.248 +static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); 1.249 +static void yy_flex_free YY_PROTO(( void * )); 1.250 + 1.251 +#define yy_new_buffer yy_create_buffer 1.252 + 1.253 +#define yy_set_interactive(is_interactive) \ 1.254 + { \ 1.255 + if ( ! yy_current_buffer ) \ 1.256 + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ 1.257 + yy_current_buffer->yy_is_interactive = is_interactive; \ 1.258 + } 1.259 + 1.260 +#define yy_set_bol(at_bol) \ 1.261 + { \ 1.262 + if ( ! yy_current_buffer ) \ 1.263 + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ 1.264 + yy_current_buffer->yy_at_bol = at_bol; \ 1.265 + } 1.266 + 1.267 +#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) 1.268 + 1.269 +typedef unsigned char YY_CHAR; 1.270 +FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; 1.271 +typedef int yy_state_type; 1.272 +extern char *yytext; 1.273 +#define yytext_ptr yytext 1.274 + 1.275 +static yy_state_type yy_get_previous_state YY_PROTO(( void )); 1.276 +static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); 1.277 +static int yy_get_next_buffer YY_PROTO(( void )); 1.278 +static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); 1.279 + 1.280 +/* Done after the current pattern has been matched and before the 1.281 + * corresponding action - sets up yytext. 1.282 + */ 1.283 +#define YY_DO_BEFORE_ACTION \ 1.284 + yytext_ptr = yy_bp; \ 1.285 + yytext_ptr -= yy_more_len; \ 1.286 + yyleng = (int) (yy_cp - yytext_ptr); \ 1.287 + yy_hold_char = *yy_cp; \ 1.288 + *yy_cp = '\0'; \ 1.289 + yy_c_buf_p = yy_cp; 1.290 + 1.291 +#define YY_NUM_RULES 17 1.292 +#define YY_END_OF_BUFFER 18 1.293 +static yyconst short int yy_accept[67] = 1.294 + { 0, 1.295 + 0, 0, 18, 16, 14, 15, 16, 11, 12, 2, 1.296 + 10, 9, 9, 9, 9, 9, 13, 14, 15, 11, 1.297 + 12, 0, 12, 2, 9, 9, 9, 9, 9, 13, 1.298 + 3, 4, 2, 9, 9, 9, 9, 2, 9, 9, 1.299 + 9, 9, 2, 2, 9, 9, 8, 9, 2, 5, 1.300 + 9, 6, 2, 9, 2, 9, 2, 9, 2, 7, 1.301 + 2, 2, 2, 2, 1, 0 1.302 + } ; 1.303 + 1.304 +static yyconst int yy_ec[256] = 1.305 + { 0, 1.306 + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1.307 + 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1.308 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.309 + 1, 2, 1, 5, 6, 1, 1, 1, 1, 1, 1.310 + 1, 1, 1, 1, 7, 8, 1, 9, 9, 10, 1.311 + 11, 12, 12, 12, 13, 13, 13, 14, 1, 1, 1.312 + 15, 1, 1, 1, 16, 16, 16, 16, 16, 16, 1.313 + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 1.314 + 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 1.315 + 1, 1, 1, 1, 1, 1, 18, 16, 16, 19, 1.316 + 1.317 + 20, 16, 21, 16, 22, 16, 16, 16, 16, 23, 1.318 + 16, 24, 16, 25, 26, 27, 28, 16, 16, 29, 1.319 + 16, 16, 1, 14, 1, 1, 1, 1, 1, 1, 1.320 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.321 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.322 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.323 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.324 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.325 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.326 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.327 + 1.328 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.329 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.330 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.331 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.332 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.333 + 1, 1, 1, 1, 1 1.334 + } ; 1.335 + 1.336 +static yyconst int yy_meta[30] = 1.337 + { 0, 1.338 + 1, 1, 2, 1, 3, 1, 1, 4, 5, 5, 1.339 + 5, 5, 5, 4, 1, 4, 4, 4, 4, 4, 1.340 + 4, 4, 4, 4, 4, 4, 4, 4, 4 1.341 + } ; 1.342 + 1.343 +static yyconst short int yy_base[72] = 1.344 + { 0, 1.345 + 0, 149, 154, 205, 138, 205, 103, 0, 0, 23, 1.346 + 205, 29, 30, 31, 32, 33, 0, 99, 205, 0, 1.347 + 0, 0, 50, 55, 34, 61, 41, 63, 64, 0, 1.348 + 0, 0, 79, 65, 68, 86, 66, 99, 105, 88, 1.349 + 106, 90, 118, 76, 107, 110, 89, 125, 43, 91, 1.350 + 127, 128, 138, 144, 113, 129, 154, 160, 160, 130, 1.351 + 172, 166, 177, 144, 0, 205, 190, 192, 194, 199, 1.352 + 76 1.353 + } ; 1.354 + 1.355 +static yyconst short int yy_def[72] = 1.356 + { 0, 1.357 + 66, 1, 66, 66, 66, 66, 66, 67, 68, 68, 1.358 + 66, 69, 69, 69, 69, 69, 70, 66, 66, 67, 1.359 + 68, 71, 68, 10, 69, 69, 69, 69, 69, 70, 1.360 + 71, 23, 10, 69, 69, 69, 69, 10, 69, 69, 1.361 + 69, 69, 10, 38, 69, 69, 69, 69, 38, 69, 1.362 + 69, 69, 38, 69, 38, 69, 38, 69, 38, 69, 1.363 + 38, 38, 38, 38, 68, 0, 66, 66, 66, 66, 1.364 + 66 1.365 + } ; 1.366 + 1.367 +static yyconst short int yy_nxt[235] = 1.368 + { 0, 1.369 + 4, 5, 6, 7, 8, 4, 4, 9, 10, 10, 1.370 + 10, 10, 10, 9, 11, 12, 12, 12, 12, 12, 1.371 + 12, 13, 14, 12, 15, 12, 12, 16, 12, 22, 1.372 + 23, 24, 24, 24, 24, 24, 21, 21, 21, 21, 1.373 + 21, 21, 21, 21, 21, 21, 21, 21, 21, 28, 1.374 + 27, 53, 53, 53, 21, 26, 29, 32, 32, 32, 1.375 + 32, 32, 32, 33, 33, 33, 33, 33, 21, 35, 1.376 + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 1.377 + 31, 21, 37, 42, 44, 36, 34, 38, 38, 38, 1.378 + 38, 38, 39, 21, 40, 21, 21, 21, 21, 21, 1.379 + 1.380 + 18, 21, 21, 21, 21, 19, 41, 43, 44, 44, 1.381 + 44, 44, 21, 21, 21, 46, 48, 21, 21, 21, 1.382 + 21, 57, 57, 21, 45, 47, 49, 49, 49, 49, 1.383 + 49, 50, 21, 51, 21, 21, 21, 21, 21, 18, 1.384 + 21, 21, 21, 21, 52, 54, 55, 55, 55, 55, 1.385 + 55, 21, 44, 66, 17, 58, 66, 21, 66, 66, 1.386 + 65, 56, 59, 59, 59, 59, 59, 21, 61, 61, 1.387 + 61, 61, 66, 21, 63, 63, 63, 63, 66, 60, 1.388 + 62, 62, 62, 62, 62, 64, 64, 64, 64, 64, 1.389 + 20, 20, 66, 20, 20, 21, 21, 25, 25, 30, 1.390 + 1.391 + 66, 30, 30, 30, 3, 66, 66, 66, 66, 66, 1.392 + 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 1.393 + 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 1.394 + 66, 66, 66, 66 1.395 + } ; 1.396 + 1.397 +static yyconst short int yy_chk[235] = 1.398 + { 0, 1.399 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.400 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.401 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 1.402 + 10, 10, 10, 10, 10, 10, 12, 13, 14, 15, 1.403 + 16, 25, 12, 13, 14, 15, 16, 25, 27, 15, 1.404 + 14, 49, 49, 49, 27, 13, 16, 23, 23, 23, 1.405 + 23, 23, 23, 24, 24, 24, 24, 24, 26, 27, 1.406 + 28, 29, 34, 37, 26, 35, 28, 29, 34, 37, 1.407 + 71, 35, 29, 37, 44, 28, 26, 33, 33, 33, 1.408 + 33, 33, 34, 36, 35, 40, 47, 42, 50, 36, 1.409 + 1.410 + 18, 40, 47, 42, 50, 7, 36, 38, 38, 38, 1.411 + 38, 38, 39, 41, 45, 40, 42, 46, 39, 41, 1.412 + 45, 55, 55, 46, 39, 41, 43, 43, 43, 43, 1.413 + 43, 45, 48, 46, 51, 52, 56, 60, 48, 5, 1.414 + 51, 52, 56, 60, 48, 51, 53, 53, 53, 53, 1.415 + 53, 54, 64, 3, 2, 56, 0, 54, 0, 0, 1.416 + 64, 54, 57, 57, 57, 57, 57, 58, 59, 59, 1.417 + 59, 59, 0, 58, 62, 62, 62, 62, 0, 58, 1.418 + 61, 61, 61, 61, 61, 63, 63, 63, 63, 63, 1.419 + 67, 67, 0, 67, 67, 68, 68, 69, 69, 70, 1.420 + 1.421 + 0, 70, 70, 70, 66, 66, 66, 66, 66, 66, 1.422 + 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 1.423 + 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 1.424 + 66, 66, 66, 66 1.425 + } ; 1.426 + 1.427 +static yy_state_type yy_last_accepting_state; 1.428 +static char *yy_last_accepting_cpos; 1.429 + 1.430 +/* The intent behind this definition is that it'll catch 1.431 + * any uses of REJECT which flex missed. 1.432 + */ 1.433 +#define REJECT reject_used_but_not_detected 1.434 +static int yy_more_flag = 0; 1.435 +static int yy_more_len = 0; 1.436 +#define yymore() (yy_more_flag = 1) 1.437 +#define YY_MORE_ADJ yy_more_len 1.438 +#define YY_RESTORE_YY_MORE_OFFSET 1.439 +char *yytext; 1.440 +#line 1 "crlgen_lex_orig.l" 1.441 +#define INITIAL 0 1.442 +#line 2 "crlgen_lex_orig.l" 1.443 + 1.444 +#include "crlgen.h" 1.445 + 1.446 +static SECStatus parserStatus = SECSuccess; 1.447 +static CRLGENGeneratorData *parserData; 1.448 +static PRFileDesc *src; 1.449 + 1.450 +#define YY_INPUT(buf,result,max_size) \ 1.451 + if ( parserStatus != SECFailure) { \ 1.452 + if (((result = PR_Read(src, buf, max_size)) == 0) && \ 1.453 + ferror( yyin )) \ 1.454 + return SECFailure; \ 1.455 + } else { return SECFailure; } 1.456 + 1.457 + 1.458 + 1.459 +/* Macros after this point can all be overridden by user definitions in 1.460 + * section 1. 1.461 + */ 1.462 + 1.463 +#ifndef YY_SKIP_YYWRAP 1.464 +#ifdef __cplusplus 1.465 +extern "C" int yywrap YY_PROTO(( void )); 1.466 +#else 1.467 +extern int yywrap YY_PROTO(( void )); 1.468 +#endif 1.469 +#endif 1.470 + 1.471 +#ifndef YY_NO_UNPUT 1.472 +static void yyunput YY_PROTO(( int c, char *buf_ptr )); 1.473 +#endif 1.474 + 1.475 +#ifndef yytext_ptr 1.476 +static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); 1.477 +#endif 1.478 + 1.479 +#ifdef YY_NEED_STRLEN 1.480 +static int yy_flex_strlen YY_PROTO(( yyconst char * )); 1.481 +#endif 1.482 + 1.483 +#ifndef YY_NO_INPUT 1.484 +#ifdef __cplusplus 1.485 +static int yyinput YY_PROTO(( void )); 1.486 +#else 1.487 +static int input YY_PROTO(( void )); 1.488 +#endif 1.489 +#endif 1.490 + 1.491 +#if YY_STACK_USED 1.492 +static int yy_start_stack_ptr = 0; 1.493 +static int yy_start_stack_depth = 0; 1.494 +static int *yy_start_stack = 0; 1.495 +#ifndef YY_NO_PUSH_STATE 1.496 +static void yy_push_state YY_PROTO(( int new_state )); 1.497 +#endif 1.498 +#ifndef YY_NO_POP_STATE 1.499 +static void yy_pop_state YY_PROTO(( void )); 1.500 +#endif 1.501 +#ifndef YY_NO_TOP_STATE 1.502 +static int yy_top_state YY_PROTO(( void )); 1.503 +#endif 1.504 + 1.505 +#else 1.506 +#define YY_NO_PUSH_STATE 1 1.507 +#define YY_NO_POP_STATE 1 1.508 +#define YY_NO_TOP_STATE 1 1.509 +#endif 1.510 + 1.511 +#ifdef YY_MALLOC_DECL 1.512 +YY_MALLOC_DECL 1.513 +#else 1.514 +#if __STDC__ 1.515 +#ifndef __cplusplus 1.516 +#include <stdlib.h> 1.517 +#endif 1.518 +#else 1.519 +/* Just try to get by without declaring the routines. This will fail 1.520 + * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) 1.521 + * or sizeof(void*) != sizeof(int). 1.522 + */ 1.523 +#endif 1.524 +#endif 1.525 + 1.526 +/* Amount of stuff to slurp up with each read. */ 1.527 +#ifndef YY_READ_BUF_SIZE 1.528 +#define YY_READ_BUF_SIZE 8192 1.529 +#endif 1.530 + 1.531 +/* Copy whatever the last rule matched to the standard output. */ 1.532 + 1.533 +#ifndef ECHO 1.534 +/* This used to be an fputs(), but since the string might contain NUL's, 1.535 + * we now use fwrite(). 1.536 + */ 1.537 +#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) 1.538 +#endif 1.539 + 1.540 +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, 1.541 + * is returned in "result". 1.542 + */ 1.543 +#ifndef YY_INPUT 1.544 +#define YY_INPUT(buf,result,max_size) \ 1.545 + if ( yy_current_buffer->yy_is_interactive ) \ 1.546 + { \ 1.547 + int c = '*', n; \ 1.548 + for ( n = 0; n < max_size && \ 1.549 + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ 1.550 + buf[n] = (char) c; \ 1.551 + if ( c == '\n' ) \ 1.552 + buf[n++] = (char) c; \ 1.553 + if ( c == EOF && ferror( yyin ) ) \ 1.554 + YY_FATAL_ERROR( "input in flex scanner failed" ); \ 1.555 + result = n; \ 1.556 + } \ 1.557 + else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ 1.558 + && ferror( yyin ) ) \ 1.559 + YY_FATAL_ERROR( "input in flex scanner failed" ); 1.560 +#endif 1.561 + 1.562 +/* No semi-colon after return; correct usage is to write "yyterminate();" - 1.563 + * we don't want an extra ';' after the "return" because that will cause 1.564 + * some compilers to complain about unreachable statements. 1.565 + */ 1.566 +#ifndef yyterminate 1.567 +#define yyterminate() return YY_NULL 1.568 +#endif 1.569 + 1.570 +/* Number of entries by which start-condition stack grows. */ 1.571 +#ifndef YY_START_STACK_INCR 1.572 +#define YY_START_STACK_INCR 25 1.573 +#endif 1.574 + 1.575 +/* Report a fatal error. */ 1.576 +#ifndef YY_FATAL_ERROR 1.577 +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) 1.578 +#endif 1.579 + 1.580 +/* Default declaration of generated scanner - a define so the user can 1.581 + * easily add parameters. 1.582 + */ 1.583 +#ifndef YY_DECL 1.584 +#define YY_DECL int yylex YY_PROTO(( void )) 1.585 +#endif 1.586 + 1.587 +/* Code executed at the beginning of each rule, after yytext and yyleng 1.588 + * have been set up. 1.589 + */ 1.590 +#ifndef YY_USER_ACTION 1.591 +#define YY_USER_ACTION 1.592 +#endif 1.593 + 1.594 +/* Code executed at the end of each rule. */ 1.595 +#ifndef YY_BREAK 1.596 +#define YY_BREAK break; 1.597 +#endif 1.598 + 1.599 +#define YY_RULE_SETUP \ 1.600 + if ( yyleng > 0 ) \ 1.601 + yy_current_buffer->yy_at_bol = \ 1.602 + (yytext[yyleng - 1] == '\n'); \ 1.603 + YY_USER_ACTION 1.604 + 1.605 +YY_DECL 1.606 + { 1.607 + register yy_state_type yy_current_state; 1.608 + register char *yy_cp = NULL, *yy_bp = NULL; 1.609 + register int yy_act; 1.610 + 1.611 +#line 28 "crlgen_lex_orig.l" 1.612 + 1.613 + 1.614 + 1.615 + if ( yy_init ) 1.616 + { 1.617 + yy_init = 0; 1.618 + 1.619 +#ifdef YY_USER_INIT 1.620 + YY_USER_INIT; 1.621 +#endif 1.622 + 1.623 + if ( ! yy_start ) 1.624 + yy_start = 1; /* first start state */ 1.625 + 1.626 + if ( ! yyin ) 1.627 + yyin = stdin; 1.628 + 1.629 + if ( ! yyout ) 1.630 + yyout = stdout; 1.631 + 1.632 + if ( ! yy_current_buffer ) 1.633 + yy_current_buffer = 1.634 + yy_create_buffer( yyin, YY_BUF_SIZE ); 1.635 + 1.636 + yy_load_buffer_state(); 1.637 + } 1.638 + 1.639 + while ( 1 ) /* loops until end-of-file is reached */ 1.640 + { 1.641 + yy_more_len = 0; 1.642 + if ( yy_more_flag ) 1.643 + { 1.644 + yy_more_len = yy_c_buf_p - yytext_ptr; 1.645 + yy_more_flag = 0; 1.646 + } 1.647 + yy_cp = yy_c_buf_p; 1.648 + 1.649 + /* Support of yytext. */ 1.650 + *yy_cp = yy_hold_char; 1.651 + 1.652 + /* yy_bp points to the position in yy_ch_buf of the start of 1.653 + * the current run. 1.654 + */ 1.655 + yy_bp = yy_cp; 1.656 + 1.657 + yy_current_state = yy_start; 1.658 + yy_current_state += YY_AT_BOL(); 1.659 +yy_match: 1.660 + do 1.661 + { 1.662 + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; 1.663 + if ( yy_accept[yy_current_state] ) 1.664 + { 1.665 + yy_last_accepting_state = yy_current_state; 1.666 + yy_last_accepting_cpos = yy_cp; 1.667 + } 1.668 + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 1.669 + { 1.670 + yy_current_state = (int) yy_def[yy_current_state]; 1.671 + if ( yy_current_state >= 67 ) 1.672 + yy_c = yy_meta[(unsigned int) yy_c]; 1.673 + } 1.674 + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 1.675 + ++yy_cp; 1.676 + } 1.677 + while ( yy_base[yy_current_state] != 205 ); 1.678 + 1.679 +yy_find_action: 1.680 + yy_act = yy_accept[yy_current_state]; 1.681 + if ( yy_act == 0 ) 1.682 + { /* have to back up */ 1.683 + yy_cp = yy_last_accepting_cpos; 1.684 + yy_current_state = yy_last_accepting_state; 1.685 + yy_act = yy_accept[yy_current_state]; 1.686 + } 1.687 + 1.688 + YY_DO_BEFORE_ACTION; 1.689 + 1.690 + 1.691 +do_action: /* This label is used only to access EOF actions. */ 1.692 + 1.693 + 1.694 + switch ( yy_act ) 1.695 + { /* beginning of action switch */ 1.696 + case 0: /* must back up */ 1.697 + /* undo the effects of YY_DO_BEFORE_ACTION */ 1.698 + *yy_cp = yy_hold_char; 1.699 + yy_cp = yy_last_accepting_cpos; 1.700 + yy_current_state = yy_last_accepting_state; 1.701 + goto yy_find_action; 1.702 + 1.703 +case 1: 1.704 +YY_RULE_SETUP 1.705 +#line 30 "crlgen_lex_orig.l" 1.706 +{ 1.707 +parserStatus = crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_ZDATE); 1.708 +if (parserStatus != SECSuccess) 1.709 + return parserStatus; 1.710 +} 1.711 + YY_BREAK 1.712 +case 2: 1.713 +YY_RULE_SETUP 1.714 +#line 36 "crlgen_lex_orig.l" 1.715 +{ 1.716 +parserStatus = crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_DIGIT); 1.717 +if (parserStatus != SECSuccess) 1.718 + return parserStatus; 1.719 +} 1.720 + YY_BREAK 1.721 +case 3: 1.722 +YY_RULE_SETUP 1.723 +#line 42 "crlgen_lex_orig.l" 1.724 +{ 1.725 +parserStatus = crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_DIGIT_RANGE); 1.726 +if (parserStatus != SECSuccess) 1.727 + return parserStatus; 1.728 +} 1.729 + YY_BREAK 1.730 +case 4: 1.731 +YY_RULE_SETUP 1.732 +#line 48 "crlgen_lex_orig.l" 1.733 +{ 1.734 +parserStatus = crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_OID); 1.735 +if (parserStatus != SECSuccess) 1.736 + return parserStatus; 1.737 +} 1.738 + YY_BREAK 1.739 +case 5: 1.740 +YY_RULE_SETUP 1.741 +#line 54 "crlgen_lex_orig.l" 1.742 +{ 1.743 +parserStatus = crlgen_createNewLangStruct(parserData, CRLGEN_ISSUER_CONTEXT); 1.744 +if (parserStatus != SECSuccess) 1.745 + return parserStatus; 1.746 +} 1.747 + YY_BREAK 1.748 +case 6: 1.749 +YY_RULE_SETUP 1.750 +#line 60 "crlgen_lex_orig.l" 1.751 +{ 1.752 +parserStatus = crlgen_createNewLangStruct(parserData, CRLGEN_UPDATE_CONTEXT); 1.753 +if (parserStatus != SECSuccess) 1.754 + return parserStatus; 1.755 +} 1.756 + YY_BREAK 1.757 +case 7: 1.758 +YY_RULE_SETUP 1.759 +#line 65 "crlgen_lex_orig.l" 1.760 +{ 1.761 +parserStatus = crlgen_createNewLangStruct(parserData, CRLGEN_NEXT_UPDATE_CONTEXT); 1.762 +if (parserStatus != SECSuccess) 1.763 + return parserStatus; 1.764 +} 1.765 + YY_BREAK 1.766 +case 8: 1.767 +YY_RULE_SETUP 1.768 +#line 71 "crlgen_lex_orig.l" 1.769 +{ 1.770 +parserStatus = crlgen_createNewLangStruct(parserData, CRLGEN_CHANGE_RANGE_CONTEXT); 1.771 +if (parserStatus != SECSuccess) 1.772 + return parserStatus; 1.773 +} 1.774 + YY_BREAK 1.775 +case 9: 1.776 +YY_RULE_SETUP 1.777 +#line 77 "crlgen_lex_orig.l" 1.778 +{ 1.779 +if (strcmp(yytext, "addcert") == 0) { 1.780 + parserStatus = crlgen_createNewLangStruct(parserData, 1.781 + CRLGEN_ADD_CERT_CONTEXT); 1.782 + if (parserStatus != SECSuccess) 1.783 + return parserStatus; 1.784 +} else if (strcmp(yytext, "rmcert") == 0) { 1.785 + parserStatus = crlgen_createNewLangStruct(parserData, 1.786 + CRLGEN_RM_CERT_CONTEXT); 1.787 + if (parserStatus != SECSuccess) 1.788 + return parserStatus; 1.789 +} else if (strcmp(yytext, "addext") == 0) { 1.790 + parserStatus = crlgen_createNewLangStruct(parserData, 1.791 + CRLGEN_ADD_EXTENSION_CONTEXT); 1.792 + if (parserStatus != SECSuccess) 1.793 + return parserStatus; 1.794 +} else { 1.795 + parserStatus = crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_ID); 1.796 + if (parserStatus != SECSuccess) 1.797 + return parserStatus; 1.798 +} 1.799 +} 1.800 + YY_BREAK 1.801 +case 10: 1.802 +YY_RULE_SETUP 1.803 +#line 100 "crlgen_lex_orig.l" 1.804 + 1.805 + YY_BREAK 1.806 +case 11: 1.807 +YY_RULE_SETUP 1.808 +#line 102 "crlgen_lex_orig.l" 1.809 +{ 1.810 +if (yytext[yyleng-1] == '\\') { 1.811 + yymore(); 1.812 +} else { 1.813 + register int c; 1.814 + c = input(); 1.815 + if (c != '\"') { 1.816 + printf( "Error: Line ending \" is missing: %c\n", c); 1.817 + unput(c); 1.818 + } else { 1.819 + parserStatus = crlgen_setNextData(parserData, yytext + 1, 1.820 + CRLGEN_TYPE_STRING); 1.821 + if (parserStatus != SECSuccess) 1.822 + return parserStatus; 1.823 + } 1.824 +} 1.825 +} 1.826 + YY_BREAK 1.827 +case 12: 1.828 +YY_RULE_SETUP 1.829 +#line 120 "crlgen_lex_orig.l" 1.830 +{ 1.831 +parserStatus = crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_STRING); 1.832 +if (parserStatus != SECSuccess) 1.833 + return parserStatus; 1.834 +} 1.835 + YY_BREAK 1.836 +case 13: 1.837 +YY_RULE_SETUP 1.838 +#line 128 "crlgen_lex_orig.l" 1.839 +/* eat up one-line comments */ {} 1.840 + YY_BREAK 1.841 +case 14: 1.842 +YY_RULE_SETUP 1.843 +#line 130 "crlgen_lex_orig.l" 1.844 +{} 1.845 + YY_BREAK 1.846 +case 15: 1.847 +YY_RULE_SETUP 1.848 +#line 132 "crlgen_lex_orig.l" 1.849 +{ 1.850 +parserStatus = crlgen_updateCrl(parserData); 1.851 +if (parserStatus != SECSuccess) 1.852 + return parserStatus; 1.853 +} 1.854 + YY_BREAK 1.855 +case 16: 1.856 +YY_RULE_SETUP 1.857 +#line 138 "crlgen_lex_orig.l" 1.858 +{ 1.859 + fprintf(stderr, "Syntax error at line %d: unknown token %s\n", 1.860 + parserData->parsedLineNum, yytext); 1.861 + return SECFailure; 1.862 +} 1.863 + YY_BREAK 1.864 +case 17: 1.865 +YY_RULE_SETUP 1.866 +#line 144 "crlgen_lex_orig.l" 1.867 +ECHO; 1.868 + YY_BREAK 1.869 +case YY_STATE_EOF(INITIAL): 1.870 + yyterminate(); 1.871 + 1.872 + case YY_END_OF_BUFFER: 1.873 + { 1.874 + /* Amount of text matched not including the EOB char. */ 1.875 + int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; 1.876 + 1.877 + /* Undo the effects of YY_DO_BEFORE_ACTION. */ 1.878 + *yy_cp = yy_hold_char; 1.879 + YY_RESTORE_YY_MORE_OFFSET 1.880 + 1.881 + if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) 1.882 + { 1.883 + /* We're scanning a new file or input source. It's 1.884 + * possible that this happened because the user 1.885 + * just pointed yyin at a new source and called 1.886 + * yylex(). If so, then we have to assure 1.887 + * consistency between yy_current_buffer and our 1.888 + * globals. Here is the right place to do so, because 1.889 + * this is the first action (other than possibly a 1.890 + * back-up) that will match for the new input source. 1.891 + */ 1.892 + yy_n_chars = yy_current_buffer->yy_n_chars; 1.893 + yy_current_buffer->yy_input_file = yyin; 1.894 + yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; 1.895 + } 1.896 + 1.897 + /* Note that here we test for yy_c_buf_p "<=" to the position 1.898 + * of the first EOB in the buffer, since yy_c_buf_p will 1.899 + * already have been incremented past the NUL character 1.900 + * (since all states make transitions on EOB to the 1.901 + * end-of-buffer state). Contrast this with the test 1.902 + * in input(). 1.903 + */ 1.904 + if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) 1.905 + { /* This was really a NUL. */ 1.906 + yy_state_type yy_next_state; 1.907 + 1.908 + yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; 1.909 + 1.910 + yy_current_state = yy_get_previous_state(); 1.911 + 1.912 + /* Okay, we're now positioned to make the NUL 1.913 + * transition. We couldn't have 1.914 + * yy_get_previous_state() go ahead and do it 1.915 + * for us because it doesn't know how to deal 1.916 + * with the possibility of jamming (and we don't 1.917 + * want to build jamming into it because then it 1.918 + * will run more slowly). 1.919 + */ 1.920 + 1.921 + yy_next_state = yy_try_NUL_trans( yy_current_state ); 1.922 + 1.923 + yy_bp = yytext_ptr + YY_MORE_ADJ; 1.924 + 1.925 + if ( yy_next_state ) 1.926 + { 1.927 + /* Consume the NUL. */ 1.928 + yy_cp = ++yy_c_buf_p; 1.929 + yy_current_state = yy_next_state; 1.930 + goto yy_match; 1.931 + } 1.932 + 1.933 + else 1.934 + { 1.935 + yy_cp = yy_c_buf_p; 1.936 + goto yy_find_action; 1.937 + } 1.938 + } 1.939 + 1.940 + else switch ( yy_get_next_buffer() ) 1.941 + { 1.942 + case EOB_ACT_END_OF_FILE: 1.943 + { 1.944 + yy_did_buffer_switch_on_eof = 0; 1.945 + 1.946 + if ( yywrap() ) 1.947 + { 1.948 + /* Note: because we've taken care in 1.949 + * yy_get_next_buffer() to have set up 1.950 + * yytext, we can now set up 1.951 + * yy_c_buf_p so that if some total 1.952 + * hoser (like flex itself) wants to 1.953 + * call the scanner after we return the 1.954 + * YY_NULL, it'll still work - another 1.955 + * YY_NULL will get returned. 1.956 + */ 1.957 + yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; 1.958 + 1.959 + yy_act = YY_STATE_EOF(YY_START); 1.960 + goto do_action; 1.961 + } 1.962 + 1.963 + else 1.964 + { 1.965 + if ( ! yy_did_buffer_switch_on_eof ) 1.966 + YY_NEW_FILE; 1.967 + } 1.968 + break; 1.969 + } 1.970 + 1.971 + case EOB_ACT_CONTINUE_SCAN: 1.972 + yy_c_buf_p = 1.973 + yytext_ptr + yy_amount_of_matched_text; 1.974 + 1.975 + yy_current_state = yy_get_previous_state(); 1.976 + 1.977 + yy_cp = yy_c_buf_p; 1.978 + yy_bp = yytext_ptr + YY_MORE_ADJ; 1.979 + goto yy_match; 1.980 + 1.981 + case EOB_ACT_LAST_MATCH: 1.982 + yy_c_buf_p = 1.983 + &yy_current_buffer->yy_ch_buf[yy_n_chars]; 1.984 + 1.985 + yy_current_state = yy_get_previous_state(); 1.986 + 1.987 + yy_cp = yy_c_buf_p; 1.988 + yy_bp = yytext_ptr + YY_MORE_ADJ; 1.989 + goto yy_find_action; 1.990 + } 1.991 + break; 1.992 + } 1.993 + 1.994 + default: 1.995 + YY_FATAL_ERROR( 1.996 + "fatal flex scanner internal error--no action found" ); 1.997 + } /* end of action switch */ 1.998 + } /* end of scanning one token */ 1.999 + } /* end of yylex */ 1.1000 + 1.1001 + 1.1002 +/* yy_get_next_buffer - try to read in a new buffer 1.1003 + * 1.1004 + * Returns a code representing an action: 1.1005 + * EOB_ACT_LAST_MATCH - 1.1006 + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position 1.1007 + * EOB_ACT_END_OF_FILE - end of file 1.1008 + */ 1.1009 + 1.1010 +static int yy_get_next_buffer() 1.1011 + { 1.1012 + register char *dest = yy_current_buffer->yy_ch_buf; 1.1013 + register char *source = yytext_ptr; 1.1014 + register int number_to_move, i; 1.1015 + int ret_val; 1.1016 + 1.1017 + if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) 1.1018 + YY_FATAL_ERROR( 1.1019 + "fatal flex scanner internal error--end of buffer missed" ); 1.1020 + 1.1021 + if ( yy_current_buffer->yy_fill_buffer == 0 ) 1.1022 + { /* Don't try to fill the buffer, so this is an EOF. */ 1.1023 + if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) 1.1024 + { 1.1025 + /* We matched a single character, the EOB, so 1.1026 + * treat this as a final EOF. 1.1027 + */ 1.1028 + return EOB_ACT_END_OF_FILE; 1.1029 + } 1.1030 + 1.1031 + else 1.1032 + { 1.1033 + /* We matched some text prior to the EOB, first 1.1034 + * process it. 1.1035 + */ 1.1036 + return EOB_ACT_LAST_MATCH; 1.1037 + } 1.1038 + } 1.1039 + 1.1040 + /* Try to read more data. */ 1.1041 + 1.1042 + /* First move last chars to start of buffer. */ 1.1043 + number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; 1.1044 + 1.1045 + for ( i = 0; i < number_to_move; ++i ) 1.1046 + *(dest++) = *(source++); 1.1047 + 1.1048 + if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) 1.1049 + /* don't do the read, it's not guaranteed to return an EOF, 1.1050 + * just force an EOF 1.1051 + */ 1.1052 + yy_current_buffer->yy_n_chars = yy_n_chars = 0; 1.1053 + 1.1054 + else 1.1055 + { 1.1056 + int num_to_read = 1.1057 + yy_current_buffer->yy_buf_size - number_to_move - 1; 1.1058 + 1.1059 + while ( num_to_read <= 0 ) 1.1060 + { /* Not enough room in the buffer - grow it. */ 1.1061 +#ifdef YY_USES_REJECT 1.1062 + YY_FATAL_ERROR( 1.1063 +"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); 1.1064 +#else 1.1065 + 1.1066 + /* just a shorter name for the current buffer */ 1.1067 + YY_BUFFER_STATE b = yy_current_buffer; 1.1068 + 1.1069 + int yy_c_buf_p_offset = 1.1070 + (int) (yy_c_buf_p - b->yy_ch_buf); 1.1071 + 1.1072 + if ( b->yy_is_our_buffer ) 1.1073 + { 1.1074 + int new_size = b->yy_buf_size * 2; 1.1075 + 1.1076 + if ( new_size <= 0 ) 1.1077 + b->yy_buf_size += b->yy_buf_size / 8; 1.1078 + else 1.1079 + b->yy_buf_size *= 2; 1.1080 + 1.1081 + b->yy_ch_buf = (char *) 1.1082 + /* Include room in for 2 EOB chars. */ 1.1083 + yy_flex_realloc( (void *) b->yy_ch_buf, 1.1084 + b->yy_buf_size + 2 ); 1.1085 + } 1.1086 + else 1.1087 + /* Can't grow it, we don't own it. */ 1.1088 + b->yy_ch_buf = 0; 1.1089 + 1.1090 + if ( ! b->yy_ch_buf ) 1.1091 + YY_FATAL_ERROR( 1.1092 + "fatal error - scanner input buffer overflow" ); 1.1093 + 1.1094 + yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; 1.1095 + 1.1096 + num_to_read = yy_current_buffer->yy_buf_size - 1.1097 + number_to_move - 1; 1.1098 +#endif 1.1099 + } 1.1100 + 1.1101 + if ( num_to_read > YY_READ_BUF_SIZE ) 1.1102 + num_to_read = YY_READ_BUF_SIZE; 1.1103 + 1.1104 + /* Read in more data. */ 1.1105 + YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), 1.1106 + yy_n_chars, num_to_read ); 1.1107 + 1.1108 + yy_current_buffer->yy_n_chars = yy_n_chars; 1.1109 + } 1.1110 + 1.1111 + if ( yy_n_chars == 0 ) 1.1112 + { 1.1113 + if ( number_to_move == YY_MORE_ADJ ) 1.1114 + { 1.1115 + ret_val = EOB_ACT_END_OF_FILE; 1.1116 + yyrestart( yyin ); 1.1117 + } 1.1118 + 1.1119 + else 1.1120 + { 1.1121 + ret_val = EOB_ACT_LAST_MATCH; 1.1122 + yy_current_buffer->yy_buffer_status = 1.1123 + YY_BUFFER_EOF_PENDING; 1.1124 + } 1.1125 + } 1.1126 + 1.1127 + else 1.1128 + ret_val = EOB_ACT_CONTINUE_SCAN; 1.1129 + 1.1130 + yy_n_chars += number_to_move; 1.1131 + yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; 1.1132 + yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; 1.1133 + 1.1134 + yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; 1.1135 + 1.1136 + return ret_val; 1.1137 + } 1.1138 + 1.1139 + 1.1140 +/* yy_get_previous_state - get the state just before the EOB char was reached */ 1.1141 + 1.1142 +static yy_state_type yy_get_previous_state() 1.1143 + { 1.1144 + register yy_state_type yy_current_state; 1.1145 + register char *yy_cp; 1.1146 + 1.1147 + yy_current_state = yy_start; 1.1148 + yy_current_state += YY_AT_BOL(); 1.1149 + 1.1150 + for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) 1.1151 + { 1.1152 + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); 1.1153 + if ( yy_accept[yy_current_state] ) 1.1154 + { 1.1155 + yy_last_accepting_state = yy_current_state; 1.1156 + yy_last_accepting_cpos = yy_cp; 1.1157 + } 1.1158 + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 1.1159 + { 1.1160 + yy_current_state = (int) yy_def[yy_current_state]; 1.1161 + if ( yy_current_state >= 67 ) 1.1162 + yy_c = yy_meta[(unsigned int) yy_c]; 1.1163 + } 1.1164 + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 1.1165 + } 1.1166 + 1.1167 + return yy_current_state; 1.1168 + } 1.1169 + 1.1170 + 1.1171 +/* yy_try_NUL_trans - try to make a transition on the NUL character 1.1172 + * 1.1173 + * synopsis 1.1174 + * next_state = yy_try_NUL_trans( current_state ); 1.1175 + */ 1.1176 + 1.1177 +#ifdef YY_USE_PROTOS 1.1178 +static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) 1.1179 +#else 1.1180 +static yy_state_type yy_try_NUL_trans( yy_current_state ) 1.1181 +yy_state_type yy_current_state; 1.1182 +#endif 1.1183 + { 1.1184 + register int yy_is_jam; 1.1185 + register char *yy_cp = yy_c_buf_p; 1.1186 + 1.1187 + register YY_CHAR yy_c = 1; 1.1188 + if ( yy_accept[yy_current_state] ) 1.1189 + { 1.1190 + yy_last_accepting_state = yy_current_state; 1.1191 + yy_last_accepting_cpos = yy_cp; 1.1192 + } 1.1193 + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 1.1194 + { 1.1195 + yy_current_state = (int) yy_def[yy_current_state]; 1.1196 + if ( yy_current_state >= 67 ) 1.1197 + yy_c = yy_meta[(unsigned int) yy_c]; 1.1198 + } 1.1199 + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 1.1200 + yy_is_jam = (yy_current_state == 66); 1.1201 + 1.1202 + return yy_is_jam ? 0 : yy_current_state; 1.1203 + } 1.1204 + 1.1205 + 1.1206 +#ifndef YY_NO_UNPUT 1.1207 +#ifdef YY_USE_PROTOS 1.1208 +static void yyunput( int c, register char *yy_bp ) 1.1209 +#else 1.1210 +static void yyunput( c, yy_bp ) 1.1211 +int c; 1.1212 +register char *yy_bp; 1.1213 +#endif 1.1214 + { 1.1215 + register char *yy_cp = yy_c_buf_p; 1.1216 + 1.1217 + /* undo effects of setting up yytext */ 1.1218 + *yy_cp = yy_hold_char; 1.1219 + 1.1220 + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) 1.1221 + { /* need to shift things up to make room */ 1.1222 + /* +2 for EOB chars. */ 1.1223 + register int number_to_move = yy_n_chars + 2; 1.1224 + register char *dest = &yy_current_buffer->yy_ch_buf[ 1.1225 + yy_current_buffer->yy_buf_size + 2]; 1.1226 + register char *source = 1.1227 + &yy_current_buffer->yy_ch_buf[number_to_move]; 1.1228 + 1.1229 + while ( source > yy_current_buffer->yy_ch_buf ) 1.1230 + *--dest = *--source; 1.1231 + 1.1232 + yy_cp += (int) (dest - source); 1.1233 + yy_bp += (int) (dest - source); 1.1234 + yy_current_buffer->yy_n_chars = 1.1235 + yy_n_chars = yy_current_buffer->yy_buf_size; 1.1236 + 1.1237 + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) 1.1238 + YY_FATAL_ERROR( "flex scanner push-back overflow" ); 1.1239 + } 1.1240 + 1.1241 + *--yy_cp = (char) c; 1.1242 + 1.1243 + 1.1244 + yytext_ptr = yy_bp; 1.1245 + yy_hold_char = *yy_cp; 1.1246 + yy_c_buf_p = yy_cp; 1.1247 + } 1.1248 +#endif /* ifndef YY_NO_UNPUT */ 1.1249 + 1.1250 + 1.1251 +#ifndef YY_NO_INPUT 1.1252 +#ifdef __cplusplus 1.1253 +static int yyinput() 1.1254 +#else 1.1255 +static int input() 1.1256 +#endif 1.1257 + { 1.1258 + int c; 1.1259 + 1.1260 + *yy_c_buf_p = yy_hold_char; 1.1261 + 1.1262 + if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) 1.1263 + { 1.1264 + /* yy_c_buf_p now points to the character we want to return. 1.1265 + * If this occurs *before* the EOB characters, then it's a 1.1266 + * valid NUL; if not, then we've hit the end of the buffer. 1.1267 + */ 1.1268 + if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) 1.1269 + /* This was really a NUL. */ 1.1270 + *yy_c_buf_p = '\0'; 1.1271 + 1.1272 + else 1.1273 + { /* need more input */ 1.1274 + int offset = yy_c_buf_p - yytext_ptr; 1.1275 + ++yy_c_buf_p; 1.1276 + 1.1277 + switch ( yy_get_next_buffer() ) 1.1278 + { 1.1279 + case EOB_ACT_LAST_MATCH: 1.1280 + /* This happens because yy_g_n_b() 1.1281 + * sees that we've accumulated a 1.1282 + * token and flags that we need to 1.1283 + * try matching the token before 1.1284 + * proceeding. But for input(), 1.1285 + * there's no matching to consider. 1.1286 + * So convert the EOB_ACT_LAST_MATCH 1.1287 + * to EOB_ACT_END_OF_FILE. 1.1288 + */ 1.1289 + 1.1290 + /* Reset buffer status. */ 1.1291 + yyrestart( yyin ); 1.1292 + 1.1293 + /* fall through */ 1.1294 + 1.1295 + case EOB_ACT_END_OF_FILE: 1.1296 + { 1.1297 + if ( yywrap() ) 1.1298 + return EOF; 1.1299 + 1.1300 + if ( ! yy_did_buffer_switch_on_eof ) 1.1301 + YY_NEW_FILE; 1.1302 +#ifdef __cplusplus 1.1303 + return yyinput(); 1.1304 +#else 1.1305 + return input(); 1.1306 +#endif 1.1307 + } 1.1308 + 1.1309 + case EOB_ACT_CONTINUE_SCAN: 1.1310 + yy_c_buf_p = yytext_ptr + offset; 1.1311 + break; 1.1312 + } 1.1313 + } 1.1314 + } 1.1315 + 1.1316 + c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ 1.1317 + *yy_c_buf_p = '\0'; /* preserve yytext */ 1.1318 + yy_hold_char = *++yy_c_buf_p; 1.1319 + 1.1320 + yy_current_buffer->yy_at_bol = (c == '\n'); 1.1321 + 1.1322 + return c; 1.1323 + } 1.1324 +#endif /* YY_NO_INPUT */ 1.1325 + 1.1326 +#ifdef YY_USE_PROTOS 1.1327 +void yyrestart( FILE *input_file ) 1.1328 +#else 1.1329 +void yyrestart( input_file ) 1.1330 +FILE *input_file; 1.1331 +#endif 1.1332 + { 1.1333 + if ( ! yy_current_buffer ) 1.1334 + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); 1.1335 + 1.1336 + yy_init_buffer( yy_current_buffer, input_file ); 1.1337 + yy_load_buffer_state(); 1.1338 + } 1.1339 + 1.1340 + 1.1341 +#ifdef YY_USE_PROTOS 1.1342 +void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) 1.1343 +#else 1.1344 +void yy_switch_to_buffer( new_buffer ) 1.1345 +YY_BUFFER_STATE new_buffer; 1.1346 +#endif 1.1347 + { 1.1348 + if ( yy_current_buffer == new_buffer ) 1.1349 + return; 1.1350 + 1.1351 + if ( yy_current_buffer ) 1.1352 + { 1.1353 + /* Flush out information for old buffer. */ 1.1354 + *yy_c_buf_p = yy_hold_char; 1.1355 + yy_current_buffer->yy_buf_pos = yy_c_buf_p; 1.1356 + yy_current_buffer->yy_n_chars = yy_n_chars; 1.1357 + } 1.1358 + 1.1359 + yy_current_buffer = new_buffer; 1.1360 + yy_load_buffer_state(); 1.1361 + 1.1362 + /* We don't actually know whether we did this switch during 1.1363 + * EOF (yywrap()) processing, but the only time this flag 1.1364 + * is looked at is after yywrap() is called, so it's safe 1.1365 + * to go ahead and always set it. 1.1366 + */ 1.1367 + yy_did_buffer_switch_on_eof = 1; 1.1368 + } 1.1369 + 1.1370 + 1.1371 +#ifdef YY_USE_PROTOS 1.1372 +void yy_load_buffer_state( void ) 1.1373 +#else 1.1374 +void yy_load_buffer_state() 1.1375 +#endif 1.1376 + { 1.1377 + yy_n_chars = yy_current_buffer->yy_n_chars; 1.1378 + yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; 1.1379 + yyin = yy_current_buffer->yy_input_file; 1.1380 + yy_hold_char = *yy_c_buf_p; 1.1381 + } 1.1382 + 1.1383 + 1.1384 +#ifdef YY_USE_PROTOS 1.1385 +YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) 1.1386 +#else 1.1387 +YY_BUFFER_STATE yy_create_buffer( file, size ) 1.1388 +FILE *file; 1.1389 +int size; 1.1390 +#endif 1.1391 + { 1.1392 + YY_BUFFER_STATE b; 1.1393 + 1.1394 + b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); 1.1395 + if ( ! b ) 1.1396 + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 1.1397 + 1.1398 + b->yy_buf_size = size; 1.1399 + 1.1400 + /* yy_ch_buf has to be 2 characters longer than the size given because 1.1401 + * we need to put in 2 end-of-buffer characters. 1.1402 + */ 1.1403 + b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); 1.1404 + if ( ! b->yy_ch_buf ) 1.1405 + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 1.1406 + 1.1407 + b->yy_is_our_buffer = 1; 1.1408 + 1.1409 + yy_init_buffer( b, file ); 1.1410 + 1.1411 + return b; 1.1412 + } 1.1413 + 1.1414 + 1.1415 +#ifdef YY_USE_PROTOS 1.1416 +void yy_delete_buffer( YY_BUFFER_STATE b ) 1.1417 +#else 1.1418 +void yy_delete_buffer( b ) 1.1419 +YY_BUFFER_STATE b; 1.1420 +#endif 1.1421 + { 1.1422 + if ( ! b ) 1.1423 + return; 1.1424 + 1.1425 + if ( b == yy_current_buffer ) 1.1426 + yy_current_buffer = (YY_BUFFER_STATE) 0; 1.1427 + 1.1428 + if ( b->yy_is_our_buffer ) 1.1429 + yy_flex_free( (void *) b->yy_ch_buf ); 1.1430 + 1.1431 + yy_flex_free( (void *) b ); 1.1432 + } 1.1433 + 1.1434 + 1.1435 + 1.1436 +#ifdef YY_USE_PROTOS 1.1437 +void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) 1.1438 +#else 1.1439 +void yy_init_buffer( b, file ) 1.1440 +YY_BUFFER_STATE b; 1.1441 +FILE *file; 1.1442 +#endif 1.1443 + 1.1444 + 1.1445 + { 1.1446 + yy_flush_buffer( b ); 1.1447 + 1.1448 + b->yy_input_file = file; 1.1449 + b->yy_fill_buffer = 1; 1.1450 + 1.1451 +#if YY_ALWAYS_INTERACTIVE 1.1452 + b->yy_is_interactive = 1; 1.1453 +#else 1.1454 +#if YY_NEVER_INTERACTIVE 1.1455 + b->yy_is_interactive = 0; 1.1456 +#else 1.1457 + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; 1.1458 +#endif 1.1459 +#endif 1.1460 + } 1.1461 + 1.1462 + 1.1463 +#ifdef YY_USE_PROTOS 1.1464 +void yy_flush_buffer( YY_BUFFER_STATE b ) 1.1465 +#else 1.1466 +void yy_flush_buffer( b ) 1.1467 +YY_BUFFER_STATE b; 1.1468 +#endif 1.1469 + 1.1470 + { 1.1471 + if ( ! b ) 1.1472 + return; 1.1473 + 1.1474 + b->yy_n_chars = 0; 1.1475 + 1.1476 + /* We always need two end-of-buffer characters. The first causes 1.1477 + * a transition to the end-of-buffer state. The second causes 1.1478 + * a jam in that state. 1.1479 + */ 1.1480 + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; 1.1481 + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; 1.1482 + 1.1483 + b->yy_buf_pos = &b->yy_ch_buf[0]; 1.1484 + 1.1485 + b->yy_at_bol = 1; 1.1486 + b->yy_buffer_status = YY_BUFFER_NEW; 1.1487 + 1.1488 + if ( b == yy_current_buffer ) 1.1489 + yy_load_buffer_state(); 1.1490 + } 1.1491 + 1.1492 + 1.1493 +#ifndef YY_NO_SCAN_BUFFER 1.1494 +#ifdef YY_USE_PROTOS 1.1495 +YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) 1.1496 +#else 1.1497 +YY_BUFFER_STATE yy_scan_buffer( base, size ) 1.1498 +char *base; 1.1499 +yy_size_t size; 1.1500 +#endif 1.1501 + { 1.1502 + YY_BUFFER_STATE b; 1.1503 + 1.1504 + if ( size < 2 || 1.1505 + base[size-2] != YY_END_OF_BUFFER_CHAR || 1.1506 + base[size-1] != YY_END_OF_BUFFER_CHAR ) 1.1507 + /* They forgot to leave room for the EOB's. */ 1.1508 + return 0; 1.1509 + 1.1510 + b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); 1.1511 + if ( ! b ) 1.1512 + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); 1.1513 + 1.1514 + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ 1.1515 + b->yy_buf_pos = b->yy_ch_buf = base; 1.1516 + b->yy_is_our_buffer = 0; 1.1517 + b->yy_input_file = 0; 1.1518 + b->yy_n_chars = b->yy_buf_size; 1.1519 + b->yy_is_interactive = 0; 1.1520 + b->yy_at_bol = 1; 1.1521 + b->yy_fill_buffer = 0; 1.1522 + b->yy_buffer_status = YY_BUFFER_NEW; 1.1523 + 1.1524 + yy_switch_to_buffer( b ); 1.1525 + 1.1526 + return b; 1.1527 + } 1.1528 +#endif 1.1529 + 1.1530 + 1.1531 +#ifndef YY_NO_SCAN_STRING 1.1532 +#ifdef YY_USE_PROTOS 1.1533 +YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) 1.1534 +#else 1.1535 +YY_BUFFER_STATE yy_scan_string( yy_str ) 1.1536 +yyconst char *yy_str; 1.1537 +#endif 1.1538 + { 1.1539 + int len; 1.1540 + for ( len = 0; yy_str[len]; ++len ) 1.1541 + ; 1.1542 + 1.1543 + return yy_scan_bytes( yy_str, len ); 1.1544 + } 1.1545 +#endif 1.1546 + 1.1547 + 1.1548 +#ifndef YY_NO_SCAN_BYTES 1.1549 +#ifdef YY_USE_PROTOS 1.1550 +YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) 1.1551 +#else 1.1552 +YY_BUFFER_STATE yy_scan_bytes( bytes, len ) 1.1553 +yyconst char *bytes; 1.1554 +int len; 1.1555 +#endif 1.1556 + { 1.1557 + YY_BUFFER_STATE b; 1.1558 + char *buf; 1.1559 + yy_size_t n; 1.1560 + int i; 1.1561 + 1.1562 + /* Get memory for full buffer, including space for trailing EOB's. */ 1.1563 + n = len + 2; 1.1564 + buf = (char *) yy_flex_alloc( n ); 1.1565 + if ( ! buf ) 1.1566 + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); 1.1567 + 1.1568 + for ( i = 0; i < len; ++i ) 1.1569 + buf[i] = bytes[i]; 1.1570 + 1.1571 + buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; 1.1572 + 1.1573 + b = yy_scan_buffer( buf, n ); 1.1574 + if ( ! b ) 1.1575 + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); 1.1576 + 1.1577 + /* It's okay to grow etc. this buffer, and we should throw it 1.1578 + * away when we're done. 1.1579 + */ 1.1580 + b->yy_is_our_buffer = 1; 1.1581 + 1.1582 + return b; 1.1583 + } 1.1584 +#endif 1.1585 + 1.1586 + 1.1587 +#ifndef YY_NO_PUSH_STATE 1.1588 +#ifdef YY_USE_PROTOS 1.1589 +static void yy_push_state( int new_state ) 1.1590 +#else 1.1591 +static void yy_push_state( new_state ) 1.1592 +int new_state; 1.1593 +#endif 1.1594 + { 1.1595 + if ( yy_start_stack_ptr >= yy_start_stack_depth ) 1.1596 + { 1.1597 + yy_size_t new_size; 1.1598 + 1.1599 + yy_start_stack_depth += YY_START_STACK_INCR; 1.1600 + new_size = yy_start_stack_depth * sizeof( int ); 1.1601 + 1.1602 + if ( ! yy_start_stack ) 1.1603 + yy_start_stack = (int *) yy_flex_alloc( new_size ); 1.1604 + 1.1605 + else 1.1606 + yy_start_stack = (int *) yy_flex_realloc( 1.1607 + (void *) yy_start_stack, new_size ); 1.1608 + 1.1609 + if ( ! yy_start_stack ) 1.1610 + YY_FATAL_ERROR( 1.1611 + "out of memory expanding start-condition stack" ); 1.1612 + } 1.1613 + 1.1614 + yy_start_stack[yy_start_stack_ptr++] = YY_START; 1.1615 + 1.1616 + BEGIN(new_state); 1.1617 + } 1.1618 +#endif 1.1619 + 1.1620 + 1.1621 +#ifndef YY_NO_POP_STATE 1.1622 +static void yy_pop_state() 1.1623 + { 1.1624 + if ( --yy_start_stack_ptr < 0 ) 1.1625 + YY_FATAL_ERROR( "start-condition stack underflow" ); 1.1626 + 1.1627 + BEGIN(yy_start_stack[yy_start_stack_ptr]); 1.1628 + } 1.1629 +#endif 1.1630 + 1.1631 + 1.1632 +#ifndef YY_NO_TOP_STATE 1.1633 +static int yy_top_state() 1.1634 + { 1.1635 + return yy_start_stack[yy_start_stack_ptr - 1]; 1.1636 + } 1.1637 +#endif 1.1638 + 1.1639 +#ifndef YY_EXIT_FAILURE 1.1640 +#define YY_EXIT_FAILURE 2 1.1641 +#endif 1.1642 + 1.1643 +#ifdef YY_USE_PROTOS 1.1644 +static void yy_fatal_error( yyconst char msg[] ) 1.1645 +#else 1.1646 +static void yy_fatal_error( msg ) 1.1647 +char msg[]; 1.1648 +#endif 1.1649 + { 1.1650 + (void) fprintf( stderr, "%s\n", msg ); 1.1651 + exit( YY_EXIT_FAILURE ); 1.1652 + } 1.1653 + 1.1654 + 1.1655 + 1.1656 +/* Redefine yyless() so it works in section 3 code. */ 1.1657 + 1.1658 +#undef yyless 1.1659 +#define yyless(n) \ 1.1660 + do \ 1.1661 + { \ 1.1662 + /* Undo effects of setting up yytext. */ \ 1.1663 + yytext[yyleng] = yy_hold_char; \ 1.1664 + yy_c_buf_p = yytext + n; \ 1.1665 + yy_hold_char = *yy_c_buf_p; \ 1.1666 + *yy_c_buf_p = '\0'; \ 1.1667 + yyleng = n; \ 1.1668 + } \ 1.1669 + while ( 0 ) 1.1670 + 1.1671 + 1.1672 +/* Internal utility routines. */ 1.1673 + 1.1674 +#ifndef yytext_ptr 1.1675 +#ifdef YY_USE_PROTOS 1.1676 +static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) 1.1677 +#else 1.1678 +static void yy_flex_strncpy( s1, s2, n ) 1.1679 +char *s1; 1.1680 +yyconst char *s2; 1.1681 +int n; 1.1682 +#endif 1.1683 + { 1.1684 + register int i; 1.1685 + for ( i = 0; i < n; ++i ) 1.1686 + s1[i] = s2[i]; 1.1687 + } 1.1688 +#endif 1.1689 + 1.1690 +#ifdef YY_NEED_STRLEN 1.1691 +#ifdef YY_USE_PROTOS 1.1692 +static int yy_flex_strlen( yyconst char *s ) 1.1693 +#else 1.1694 +static int yy_flex_strlen( s ) 1.1695 +yyconst char *s; 1.1696 +#endif 1.1697 + { 1.1698 + register int n; 1.1699 + for ( n = 0; s[n]; ++n ) 1.1700 + ; 1.1701 + 1.1702 + return n; 1.1703 + } 1.1704 +#endif 1.1705 + 1.1706 + 1.1707 +#ifdef YY_USE_PROTOS 1.1708 +static void *yy_flex_alloc( yy_size_t size ) 1.1709 +#else 1.1710 +static void *yy_flex_alloc( size ) 1.1711 +yy_size_t size; 1.1712 +#endif 1.1713 + { 1.1714 + return (void *) malloc( size ); 1.1715 + } 1.1716 + 1.1717 +#ifdef YY_USE_PROTOS 1.1718 +static void *yy_flex_realloc( void *ptr, yy_size_t size ) 1.1719 +#else 1.1720 +static void *yy_flex_realloc( ptr, size ) 1.1721 +void *ptr; 1.1722 +yy_size_t size; 1.1723 +#endif 1.1724 + { 1.1725 + /* The cast to (char *) in the following accommodates both 1.1726 + * implementations that use char* generic pointers, and those 1.1727 + * that use void* generic pointers. It works with the latter 1.1728 + * because both ANSI C and C++ allow castless assignment from 1.1729 + * any pointer type to void*, and deal with argument conversions 1.1730 + * as though doing an assignment. 1.1731 + */ 1.1732 + return (void *) realloc( (char *) ptr, size ); 1.1733 + } 1.1734 + 1.1735 +#ifdef YY_USE_PROTOS 1.1736 +static void yy_flex_free( void *ptr ) 1.1737 +#else 1.1738 +static void yy_flex_free( ptr ) 1.1739 +void *ptr; 1.1740 +#endif 1.1741 + { 1.1742 + free( ptr ); 1.1743 + } 1.1744 + 1.1745 +#if YY_MAIN 1.1746 +int main() 1.1747 + { 1.1748 + yylex(); 1.1749 + return 0; 1.1750 + } 1.1751 +#endif 1.1752 +#line 144 "crlgen_lex_orig.l" 1.1753 + 1.1754 +#include "prlock.h" 1.1755 + 1.1756 +static PRLock *parserInvocationLock; 1.1757 + 1.1758 +void CRLGEN_InitCrlGenParserLock() 1.1759 +{ 1.1760 + parserInvocationLock = PR_NewLock(); 1.1761 +} 1.1762 + 1.1763 +void CRLGEN_DestroyCrlGenParserLock() 1.1764 +{ 1.1765 + PR_DestroyLock(parserInvocationLock); 1.1766 +} 1.1767 + 1.1768 + 1.1769 +SECStatus CRLGEN_StartCrlGen(CRLGENGeneratorData *parserCtlData) 1.1770 +{ 1.1771 + SECStatus rv; 1.1772 + 1.1773 + PR_Lock(parserInvocationLock); 1.1774 + 1.1775 + parserStatus = SECSuccess; 1.1776 + parserData = parserCtlData; 1.1777 + src = parserCtlData->src; 1.1778 + 1.1779 + rv = yylex(); 1.1780 + 1.1781 + PR_Unlock(parserInvocationLock); 1.1782 + 1.1783 + return rv; 1.1784 +} 1.1785 + 1.1786 +int yywrap() {return 1;}