OLD | NEW |
1 /* This Source Code Form is subject to the terms of the Mozilla Public | 1 /* This Source Code Form is subject to the terms of the Mozilla Public |
2 * License, v. 2.0. If a copy of the MPL was not distributed with this | 2 * License, v. 2.0. If a copy of the MPL was not distributed with this |
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
4 | 4 |
5 /* A lexical scanner generated by flex */ | 5 /* A lexical scanner generated by flex */ |
6 | 6 |
7 #define FLEX_SCANNER | 7 #define FLEX_SCANNER |
8 #define YY_FLEX_MAJOR_VERSION 2 | 8 #define YY_FLEX_MAJOR_VERSION 2 |
9 #define YY_FLEX_MINOR_VERSION 5 | 9 #define YY_FLEX_MINOR_VERSION 5 |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 #ifdef __cplusplus | 25 #ifdef __cplusplus |
26 | 26 |
27 #include <stdlib.h> | 27 #include <stdlib.h> |
28 | 28 |
29 /* Use prototypes in function declarations. */ | 29 /* Use prototypes in function declarations. */ |
30 #define YY_USE_PROTOS | 30 #define YY_USE_PROTOS |
31 | 31 |
32 /* The "const" storage-class-modifier is valid. */ | 32 /* The "const" storage-class-modifier is valid. */ |
33 #define YY_USE_CONST | 33 #define YY_USE_CONST |
34 | 34 |
35 #else» /* ! __cplusplus */ | 35 #else /* ! __cplusplus */ |
36 | 36 |
37 #if __STDC__ | 37 #if __STDC__ |
38 | 38 |
39 #define YY_USE_PROTOS | 39 #define YY_USE_PROTOS |
40 #define YY_USE_CONST | 40 #define YY_USE_CONST |
41 | 41 |
42 #endif» /* __STDC__ */ | 42 #endif /* __STDC__ */ |
43 #endif» /* ! __cplusplus */ | 43 #endif /* ! __cplusplus */ |
44 | 44 |
45 #ifdef __TURBOC__ | 45 #ifdef __TURBOC__ |
46 #pragma warn -rch | 46 #pragma warn - rch |
47 #pragma warn -use | 47 #pragma warn - use |
48 #include <io.h> | 48 #include <io.h> |
49 #include <stdlib.h> | 49 #include <stdlib.h> |
50 #define YY_USE_CONST | 50 #define YY_USE_CONST |
51 #define YY_USE_PROTOS | 51 #define YY_USE_PROTOS |
52 #endif | 52 #endif |
53 | 53 |
54 #ifdef YY_USE_CONST | 54 #ifdef YY_USE_CONST |
55 #define yyconst const | 55 #define yyconst const |
56 #else | 56 #else |
57 #define yyconst | 57 #define yyconst |
58 #endif | 58 #endif |
59 | 59 |
60 | |
61 #ifdef YY_USE_PROTOS | 60 #ifdef YY_USE_PROTOS |
62 #define YY_PROTO(proto) proto | 61 #define YY_PROTO(proto) proto |
63 #else | 62 #else |
64 #define YY_PROTO(proto) () | 63 #define YY_PROTO(proto) () |
65 #endif | 64 #endif |
66 | 65 |
67 /* Returned upon end-of-file. */ | 66 /* Returned upon end-of-file. */ |
68 #define YY_NULL 0 | 67 #define YY_NULL 0 |
69 | 68 |
70 /* Promotes a possibly negative, possibly signed char to an unsigned | 69 /* Promotes a possibly negative, possibly signed char to an unsigned |
71 * integer for use as an array index. If the signed char is negative, | 70 * integer for use as an array index. If the signed char is negative, |
72 * we want to instead treat it as an 8-bit unsigned char, hence the | 71 * we want to instead treat it as an 8-bit unsigned char, hence the |
73 * double cast. | 72 * double cast. |
74 */ | 73 */ |
75 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) | 74 #define YY_SC_TO_UI(c) ((unsigned int)(unsigned char)c) |
76 | 75 |
77 /* Enter a start condition. This macro really ought to take a parameter, | 76 /* Enter a start condition. This macro really ought to take a parameter, |
78 * but we do it the disgusting crufty way forced on us by the ()-less | 77 * but we do it the disgusting crufty way forced on us by the ()-less |
79 * definition of BEGIN. | 78 * definition of BEGIN. |
80 */ | 79 */ |
81 #define BEGIN yy_start = 1 + 2 * | 80 #define BEGIN yy_start = 1 + 2 * |
82 | 81 |
83 /* Translate the current start state into a value that can be later handed | 82 /* Translate the current start state into a value that can be later handed |
84 * to BEGIN to return to the state. The YYSTATE alias is for lex | 83 * to BEGIN to return to the state. The YYSTATE alias is for lex |
85 * compatibility. | 84 * compatibility. |
86 */ | 85 */ |
87 #define YY_START ((yy_start - 1) / 2) | 86 #define YY_START ((yy_start - 1) / 2) |
88 #define YYSTATE YY_START | 87 #define YYSTATE YY_START |
89 | 88 |
90 /* Action number for EOF rule of a given start state. */ | 89 /* Action number for EOF rule of a given start state. */ |
91 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) | 90 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) |
92 | 91 |
93 /* Special action meaning "start processing a new file". */ | 92 /* Special action meaning "start processing a new file". */ |
94 #define YY_NEW_FILE yyrestart( yyin ) | 93 #define YY_NEW_FILE yyrestart(yyin) |
95 | 94 |
96 #define YY_END_OF_BUFFER_CHAR 0 | 95 #define YY_END_OF_BUFFER_CHAR 0 |
97 | 96 |
98 /* Size of default input buffer. */ | 97 /* Size of default input buffer. */ |
99 #define YY_BUF_SIZE 16384 | 98 #define YY_BUF_SIZE 16384 |
100 | 99 |
101 typedef struct yy_buffer_state *YY_BUFFER_STATE; | 100 typedef struct yy_buffer_state *YY_BUFFER_STATE; |
102 | 101 |
103 extern int yyleng; | 102 extern int yyleng; |
104 extern FILE *yyin, *yyout; | 103 extern FILE *yyin, *yyout; |
(...skipping 11 matching lines...) Expand all Loading... |
116 * else | 115 * else |
117 * do_something_else(); | 116 * do_something_else(); |
118 * | 117 * |
119 * Prior to using the do-while the compiler would get upset at the | 118 * Prior to using the do-while the compiler would get upset at the |
120 * "else" because it interpreted the "if" statement as being all | 119 * "else" because it interpreted the "if" statement as being all |
121 * done when it reached the ';' after the yyless() call. | 120 * done when it reached the ';' after the yyless() call. |
122 */ | 121 */ |
123 | 122 |
124 /* Return all but the first 'n' matched characters back to the input stream. */ | 123 /* Return all but the first 'n' matched characters back to the input stream. */ |
125 | 124 |
126 #define yyless(n) \ | 125 #define yyless(n) \ |
127 » do \ | 126 do { \ |
128 » » { \ | 127 /* Undo effects of setting up yytext. */ \ |
129 » » /* Undo effects of setting up yytext. */ \ | 128 *yy_cp = yy_hold_char; \ |
130 » » *yy_cp = yy_hold_char; \ | 129 YY_RESTORE_YY_MORE_OFFSET yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ |
131 » » YY_RESTORE_YY_MORE_OFFSET \ | 130 YY_DO_BEFORE_ACTION; /* set up yytext again */ \ |
132 » » yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ | 131 } while (0) |
133 » » YY_DO_BEFORE_ACTION; /* set up yytext again */ \ | 132 |
134 » » } \ | 133 #define unput(c) yyunput(c, yytext_ptr) |
135 » while ( 0 ) | |
136 | |
137 #define unput(c) yyunput( c, yytext_ptr ) | |
138 | 134 |
139 /* The following is because we cannot portably get our hands on size_t | 135 /* The following is because we cannot portably get our hands on size_t |
140 * (without autoconf's help, which isn't available because we want | 136 * (without autoconf's help, which isn't available because we want |
141 * flex-generated scanners to compile on their own). | 137 * flex-generated scanners to compile on their own). |
142 */ | 138 */ |
143 typedef unsigned int yy_size_t; | 139 typedef unsigned int yy_size_t; |
144 | 140 |
145 | 141 struct yy_buffer_state { |
146 struct yy_buffer_state | 142 FILE *yy_input_file; |
147 » { | 143 |
148 » FILE *yy_input_file; | 144 char *yy_ch_buf; /* input buffer */ |
149 | 145 char *yy_buf_pos; /* current position in input buffer */ |
150 » char *yy_ch_buf;» » /* input buffer */ | 146 |
151 » char *yy_buf_pos;» » /* current position in input buffer */ | 147 /* Size of input buffer in bytes, not including room for EOB |
152 | 148 * characters. |
153 » /* Size of input buffer in bytes, not including room for EOB | 149 */ |
154 » * characters. | 150 yy_size_t yy_buf_size; |
155 » */ | 151 |
156 » yy_size_t yy_buf_size; | 152 /* Number of characters read into yy_ch_buf, not including EOB |
157 | 153 * characters. |
158 » /* Number of characters read into yy_ch_buf, not including EOB | 154 */ |
159 » * characters. | 155 int yy_n_chars; |
160 » */ | 156 |
161 » int yy_n_chars; | 157 /* Whether we "own" the buffer - i.e., we know we created it, |
162 | 158 * and can realloc() it to grow it, and should free() it to |
163 » /* Whether we "own" the buffer - i.e., we know we created it, | 159 * delete it. |
164 » * and can realloc() it to grow it, and should free() it to | 160 */ |
165 » * delete it. | 161 int yy_is_our_buffer; |
166 » */ | 162 |
167 » int yy_is_our_buffer; | 163 /* Whether this is an "interactive" input source; if so, and |
168 | 164 * if we're using stdio for input, then we want to use getc() |
169 » /* Whether this is an "interactive" input source; if so, and | 165 * instead of fread(), to make sure we stop fetching input after |
170 » * if we're using stdio for input, then we want to use getc() | 166 * each newline. |
171 » * instead of fread(), to make sure we stop fetching input after | 167 */ |
172 » * each newline. | 168 int yy_is_interactive; |
173 » */ | 169 |
174 » int yy_is_interactive; | 170 /* Whether we're considered to be at the beginning of a line. |
175 | 171 * If so, '^' rules will be active on the next match, otherwise |
176 » /* Whether we're considered to be at the beginning of a line. | 172 * not. |
177 » * If so, '^' rules will be active on the next match, otherwise | 173 */ |
178 » * not. | 174 int yy_at_bol; |
179 » */ | 175 |
180 » int yy_at_bol; | 176 /* Whether to try to fill the input buffer when we reach the |
181 | 177 * end of it. |
182 » /* Whether to try to fill the input buffer when we reach the | 178 */ |
183 » * end of it. | 179 int yy_fill_buffer; |
184 » */ | 180 |
185 » int yy_fill_buffer; | 181 int yy_buffer_status; |
186 | |
187 » int yy_buffer_status; | |
188 #define YY_BUFFER_NEW 0 | 182 #define YY_BUFFER_NEW 0 |
189 #define YY_BUFFER_NORMAL 1 | 183 #define YY_BUFFER_NORMAL 1 |
190 » /* When an EOF's been seen but there's still some text to process | 184 /* When an EOF's been seen but there's still some text to process |
191 » * then we mark the buffer as YY_EOF_PENDING, to indicate that we | 185 * then we mark the buffer as YY_EOF_PENDING, to indicate that we |
192 » * shouldn't try reading from the input source any more. We might | 186 * shouldn't try reading from the input source any more. We might |
193 » * still have a bunch of tokens to match, though, because of | 187 * still have a bunch of tokens to match, though, because of |
194 » * possible backing-up. | 188 * possible backing-up. |
195 » * | 189 * |
196 » * When we actually see the EOF, we change the status to "new" | 190 * When we actually see the EOF, we change the status to "new" |
197 » * (via yyrestart()), so that the user can continue scanning by | 191 * (via yyrestart()), so that the user can continue scanning by |
198 » * just pointing yyin at a new input file. | 192 * just pointing yyin at a new input file. |
199 » */ | 193 */ |
200 #define YY_BUFFER_EOF_PENDING 2 | 194 #define YY_BUFFER_EOF_PENDING 2 |
201 » }; | 195 }; |
202 | 196 |
203 static YY_BUFFER_STATE yy_current_buffer = 0; | 197 static YY_BUFFER_STATE yy_current_buffer = 0; |
204 | 198 |
205 /* We provide macros for accessing buffer states in case in the | 199 /* We provide macros for accessing buffer states in case in the |
206 * future we want to put the buffer states in a more general | 200 * future we want to put the buffer states in a more general |
207 * "scanner state". | 201 * "scanner state". |
208 */ | 202 */ |
209 #define YY_CURRENT_BUFFER yy_current_buffer | 203 #define YY_CURRENT_BUFFER yy_current_buffer |
210 | 204 |
211 | |
212 /* yy_hold_char holds the character lost when yytext is formed. */ | 205 /* yy_hold_char holds the character lost when yytext is formed. */ |
213 static char yy_hold_char; | 206 static char yy_hold_char; |
214 | 207 |
215 static int yy_n_chars;» » /* number of characters read into yy_ch_buf */ | 208 static int yy_n_chars; /* number of characters read into yy_ch_buf */ |
216 | |
217 | 209 |
218 int yyleng; | 210 int yyleng; |
219 | 211 |
220 /* Points to current character in buffer. */ | 212 /* Points to current character in buffer. */ |
221 static char *yy_c_buf_p = (char *) 0; | 213 static char *yy_c_buf_p = (char *)0; |
222 static int yy_init = 1;»» /* whether we need to initialize */ | 214 static int yy_init = 1; /* whether we need to initialize */ |
223 static int yy_start = 0;» /* start state number */ | 215 static int yy_start = 0; /* start state number */ |
224 | 216 |
225 /* Flag which is used to allow yywrap()'s to do buffer switches | 217 /* Flag which is used to allow yywrap()'s to do buffer switches |
226 * instead of setting up a fresh yyin. A bit of a hack ... | 218 * instead of setting up a fresh yyin. A bit of a hack ... |
227 */ | 219 */ |
228 static int yy_did_buffer_switch_on_eof; | 220 static int yy_did_buffer_switch_on_eof; |
229 | 221 |
230 void yyrestart YY_PROTO(( FILE *input_file )); | 222 void yyrestart YY_PROTO((FILE *input_file)); |
231 | 223 |
232 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); | 224 void yy_switch_to_buffer YY_PROTO((YY_BUFFER_STATE new_buffer)); |
233 void yy_load_buffer_state YY_PROTO(( void )); | 225 void yy_load_buffer_state YY_PROTO((void)); |
234 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); | 226 YY_BUFFER_STATE yy_create_buffer YY_PROTO((FILE *file, int size)); |
235 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); | 227 void yy_delete_buffer YY_PROTO((YY_BUFFER_STATE b)); |
236 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); | 228 void yy_init_buffer YY_PROTO((YY_BUFFER_STATE b, FILE *file)); |
237 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); | 229 void yy_flush_buffer YY_PROTO((YY_BUFFER_STATE b)); |
238 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) | 230 #define YY_FLUSH_BUFFER yy_flush_buffer(yy_current_buffer) |
239 | 231 |
240 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); | 232 YY_BUFFER_STATE yy_scan_buffer YY_PROTO((char *base, yy_size_t size)); |
241 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); | 233 YY_BUFFER_STATE yy_scan_string YY_PROTO((yyconst char *yy_str)); |
242 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); | 234 YY_BUFFER_STATE yy_scan_bytes YY_PROTO((yyconst char *bytes, int len)); |
243 | 235 |
244 static void *yy_flex_alloc YY_PROTO(( yy_size_t )); | 236 static void *yy_flex_alloc YY_PROTO((yy_size_t)); |
245 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); | 237 static void *yy_flex_realloc YY_PROTO((void *, yy_size_t)); |
246 static void yy_flex_free YY_PROTO(( void * )); | 238 static void yy_flex_free YY_PROTO((void *)); |
247 | 239 |
248 #define yy_new_buffer yy_create_buffer | 240 #define yy_new_buffer yy_create_buffer |
249 | 241 |
250 #define yy_set_interactive(is_interactive) \ | 242 #define yy_set_interactive(is_interactive) \ |
251 » { \ | 243 { \ |
252 » if ( ! yy_current_buffer ) \ | 244 if (!yy_current_buffer) \ |
253 » » yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ | 245 yy_current_buffer = yy_create_buffer(yyin, YY_BUF_SIZE); \ |
254 » yy_current_buffer->yy_is_interactive = is_interactive; \ | 246 yy_current_buffer->yy_is_interactive = is_interactive; \ |
255 » } | 247 } |
256 | 248 |
257 #define yy_set_bol(at_bol) \ | 249 #define yy_set_bol(at_bol) \ |
258 » { \ | 250 { \ |
259 » if ( ! yy_current_buffer ) \ | 251 if (!yy_current_buffer) \ |
260 » » yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ | 252 yy_current_buffer = yy_create_buffer(yyin, YY_BUF_SIZE); \ |
261 » yy_current_buffer->yy_at_bol = at_bol; \ | 253 yy_current_buffer->yy_at_bol = at_bol; \ |
262 » } | 254 } |
263 | 255 |
264 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) | 256 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) |
265 | 257 |
266 typedef unsigned char YY_CHAR; | 258 typedef unsigned char YY_CHAR; |
267 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; | 259 FILE *yyin = (FILE *)0, *yyout = (FILE *)0; |
268 typedef int yy_state_type; | 260 typedef int yy_state_type; |
269 extern char *yytext; | 261 extern char *yytext; |
270 #define yytext_ptr yytext | 262 #define yytext_ptr yytext |
271 | 263 |
272 static yy_state_type yy_get_previous_state YY_PROTO(( void )); | 264 static yy_state_type yy_get_previous_state YY_PROTO((void)); |
273 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); | 265 static yy_state_type yy_try_NUL_trans YY_PROTO((yy_state_type current_state)); |
274 static int yy_get_next_buffer YY_PROTO(( void )); | 266 static int yy_get_next_buffer YY_PROTO((void)); |
275 static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); | 267 static void yy_fatal_error YY_PROTO((yyconst char msg[])); |
276 | 268 |
277 /* Done after the current pattern has been matched and before the | 269 /* Done after the current pattern has been matched and before the |
278 * corresponding action - sets up yytext. | 270 * corresponding action - sets up yytext. |
279 */ | 271 */ |
280 #define YY_DO_BEFORE_ACTION \ | 272 #define YY_DO_BEFORE_ACTION \ |
281 » yytext_ptr = yy_bp; \ | 273 yytext_ptr = yy_bp; \ |
282 » yytext_ptr -= yy_more_len; \ | 274 yytext_ptr -= yy_more_len; \ |
283 » yyleng = (int) (yy_cp - yytext_ptr); \ | 275 yyleng = (int)(yy_cp - yytext_ptr); \ |
284 » yy_hold_char = *yy_cp; \ | 276 yy_hold_char = *yy_cp; \ |
285 » *yy_cp = '\0'; \ | 277 *yy_cp = '\0'; \ |
286 » yy_c_buf_p = yy_cp; | 278 yy_c_buf_p = yy_cp; |
287 | 279 |
288 #define YY_NUM_RULES 17 | 280 #define YY_NUM_RULES 17 |
289 #define YY_END_OF_BUFFER 18 | 281 #define YY_END_OF_BUFFER 18 |
290 static yyconst short int yy_accept[67] = | 282 static yyconst short int yy_accept[67] = { |
291 { 0, | 283 0, 0, 0, 18, 16, 14, 15, 16, 11, 12, 2, 10, 9, 9, 9, 9, 9, |
292 0, 0, 18, 16, 14, 15, 16, 11, 12, 2, | 284 13, 14, 15, 11, 12, 0, 12, 2, 9, 9, 9, 9, 9, 13, 3, 4, 2, |
293 10, 9, 9, 9, 9, 9, 13, 14, 15, 11, | 285 9, 9, 9, 9, 2, 9, 9, 9, 9, 2, 2, 9, 9, 8, 9, 2, 5, |
294 12, 0, 12, 2, 9, 9, 9, 9, 9, 13, | 286 9, 6, 2, 9, 2, 9, 2, 9, 2, 7, 2, 2, 2, 2, 1, 0}; |
295 3, 4, 2, 9, 9, 9, 9, 2, 9, 9, | 287 |
296 9, 9, 2, 2, 9, 9, 8, 9, 2, 5, | 288 static yyconst int yy_ec[256] = { |
297 9, 6, 2, 9, 2, 9, 2, 9, 2, 7, | 289 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 4, 1, 1, 1, 1, 1, |
298 2, 2, 2, 2, 1, 0 | 290 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 5, 6, 1, 1, |
299 } ; | 291 1, 1, 1, 1, 1, 1, 1, 7, 8, 1, 9, 9, 10, 11, 12, 12, 12, 13, 13, |
300 | 292 13, 14, 1, 1, 15, 1, 1, 1, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, |
301 static yyconst int yy_ec[256] = | 293 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 1, 1, 1, 1, |
302 { 0, | 294 1, 1, 18, 16, 16, 19, 20, 16, 21, 16, 22, 16, 16, 16, 16, 23, 16, 24, 16, |
303 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, | 295 25, 26, 27, 28, 16, 16, 29, 16, 16, 1, 14, 1, 1, 1, 1, 1, 1, 1, 1, |
304 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, | 296 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
305 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | 297 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
306 1, 2, 1, 5, 6, 1, 1, 1, 1, 1, | 298 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
307 1, 1, 1, 1, 7, 8, 1, 9, 9, 10, | 299 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
308 11, 12, 12, 12, 13, 13, 13, 14, 1, 1, | 300 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
309 15, 1, 1, 1, 16, 16, 16, 16, 16, 16, | 301 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
310 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, | 302 1, 1, 1, 1, 1, 1, 1, 1, 1}; |
311 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, | 303 |
312 1, 1, 1, 1, 1, 1, 18, 16, 16, 19, | 304 static yyconst int yy_meta[30] = {0, 1, 1, 2, 1, 3, 1, 1, 4, 5, 5, 5, 5, 5, 4, |
313 | 305 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}; |
314 20, 16, 21, 16, 22, 16, 16, 16, 16, 23, | 306 |
315 16, 24, 16, 25, 26, 27, 28, 16, 16, 29, | 307 static yyconst short int yy_base[72] = { |
316 16, 16, 1, 14, 1, 1, 1, 1, 1, 1, | 308 0, 0, 149, 154, 205, 138, 205, 103, 0, 0, 23, 205, 29, 30, 31, |
317 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | 309 32, 33, 0, 99, 205, 0, 0, 0, 50, 55, 34, 61, 41, 63, 64, |
318 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | 310 0, 0, 0, 79, 65, 68, 86, 66, 99, 105, 88, 106, 90, 118, 76, |
319 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | 311 107, 110, 89, 125, 43, 91, 127, 128, 138, 144, 113, 129, 154, 160, 160, |
320 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | 312 130, 172, 166, 177, 144, 0, 205, 190, 192, 194, 199, 76}; |
321 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | 313 |
322 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | 314 static yyconst short int yy_def[72] = { |
323 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | 315 0, 66, 1, 66, 66, 66, 66, 66, 67, 68, 68, 66, 69, 69, 69, 69, 69, 70, |
324 | 316 66, 66, 67, 68, 71, 68, 10, 69, 69, 69, 69, 69, 70, 71, 23, 10, 69, 69, |
325 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | 317 69, 69, 10, 69, 69, 69, 69, 10, 38, 69, 69, 69, 69, 38, 69, 69, 69, 38, |
326 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | 318 69, 38, 69, 38, 69, 38, 69, 38, 38, 38, 38, 68, 0, 66, 66, 66, 66, 66}; |
327 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | 319 |
328 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | 320 static yyconst short int yy_nxt[235] = { |
329 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | 321 0, 4, 5, 6, 7, 8, 4, 4, 9, 10, 10, 10, 10, 10, 9, 11, 12, 12, 12, |
330 1, 1, 1, 1, 1 | 322 12, 12, 12, 13, 14, 12, 15, 12, 12, 16, 12, 22, 23, 24, 24, 24, 24, 24, 21, |
331 } ; | 323 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 28, 27, 53, 53, 53, 21, 26, |
332 | 324 29, 32, 32, 32, 32, 32, 32, 33, 33, 33, 33, 33, 21, 35, 21, 21, 21, 21, 21, |
333 static yyconst int yy_meta[30] = | 325 21, 21, 21, 21, 21, 31, 21, 37, 42, 44, 36, 34, 38, 38, 38, 38, 38, 39, 21, |
334 { 0, | 326 40, 21, 21, 21, 21, 21, 18, 21, 21, 21, 21, 19, 41, 43, 44, 44, 44, 44, 21, |
335 1, 1, 2, 1, 3, 1, 1, 4, 5, 5, | 327 21, 21, 46, 48, 21, 21, 21, 21, 57, 57, 21, 45, 47, 49, 49, 49, 49, 49, 50, |
336 5, 5, 5, 4, 1, 4, 4, 4, 4, 4, | 328 21, 51, 21, 21, 21, 21, 21, 18, 21, 21, 21, 21, 52, 54, 55, 55, 55, 55, 55, |
337 4, 4, 4, 4, 4, 4, 4, 4, 4 | 329 21, 44, 66, 17, 58, 66, 21, 66, 66, 65, 56, 59, 59, 59, 59, 59, 21, 61, 61, |
338 } ; | 330 61, 61, 66, 21, 63, 63, 63, 63, 66, 60, 62, 62, 62, 62, 62, 64, 64, 64, 64, |
339 | 331 64, 20, 20, 66, 20, 20, 21, 21, 25, 25, 30, 66, 30, 30, 30, 3, 66, 66, 66, |
340 static yyconst short int yy_base[72] = | 332 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, |
341 { 0, | 333 66, 66, 66, 66, 66, 66, 66}; |
342 0, 149, 154, 205, 138, 205, 103, 0, 0, 23, | 334 |
343 205, 29, 30, 31, 32, 33, 0, 99, 205, 0, | 335 static yyconst short int yy_chk[235] = { |
344 0, 0, 50, 55, 34, 61, 41, 63, 64, 0, | 336 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
345 0, 0, 79, 65, 68, 86, 66, 99, 105, 88, | 337 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 10, 10, 10, 10, 10, 10, 12, |
346 106, 90, 118, 76, 107, 110, 89, 125, 43, 91, | 338 13, 14, 15, 16, 25, 12, 13, 14, 15, 16, 25, 27, 15, 14, 49, 49, 49, 27, 13, |
347 127, 128, 138, 144, 113, 129, 154, 160, 160, 130, | 339 16, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 26, 27, 28, 29, 34, 37, 26, |
348 172, 166, 177, 144, 0, 205, 190, 192, 194, 199, | 340 35, 28, 29, 34, 37, 71, 35, 29, 37, 44, 28, 26, 33, 33, 33, 33, 33, 34, 36, |
349 76 | 341 35, 40, 47, 42, 50, 36, 18, 40, 47, 42, 50, 7, 36, 38, 38, 38, 38, 38, 39, |
350 } ; | 342 41, 45, 40, 42, 46, 39, 41, 45, 55, 55, 46, 39, 41, 43, 43, 43, 43, 43, 45, |
351 | 343 48, 46, 51, 52, 56, 60, 48, 5, 51, 52, 56, 60, 48, 51, 53, 53, 53, 53, 53, |
352 static yyconst short int yy_def[72] = | 344 54, 64, 3, 2, 56, 0, 54, 0, 0, 64, 54, 57, 57, 57, 57, 57, 58, 59, 59, |
353 { 0, | 345 59, 59, 0, 58, 62, 62, 62, 62, 0, 58, 61, 61, 61, 61, 61, 63, 63, 63, 63, |
354 66, 1, 66, 66, 66, 66, 66, 67, 68, 68, | 346 63, 67, 67, 0, 67, 67, 68, 68, 69, 69, 70, 0, 70, 70, 70, 66, 66, 66, 66, |
355 66, 69, 69, 69, 69, 69, 70, 66, 66, 67, | 347 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, |
356 68, 71, 68, 10, 69, 69, 69, 69, 69, 70, | 348 66, 66, 66, 66, 66, 66, 66}; |
357 71, 23, 10, 69, 69, 69, 69, 10, 69, 69, | |
358 69, 69, 10, 38, 69, 69, 69, 69, 38, 69, | |
359 69, 69, 38, 69, 38, 69, 38, 69, 38, 69, | |
360 38, 38, 38, 38, 68, 0, 66, 66, 66, 66, | |
361 66 | |
362 } ; | |
363 | |
364 static yyconst short int yy_nxt[235] = | |
365 { 0, | |
366 4, 5, 6, 7, 8, 4, 4, 9, 10, 10, | |
367 10, 10, 10, 9, 11, 12, 12, 12, 12, 12, | |
368 12, 13, 14, 12, 15, 12, 12, 16, 12, 22, | |
369 23, 24, 24, 24, 24, 24, 21, 21, 21, 21, | |
370 21, 21, 21, 21, 21, 21, 21, 21, 21, 28, | |
371 27, 53, 53, 53, 21, 26, 29, 32, 32, 32, | |
372 32, 32, 32, 33, 33, 33, 33, 33, 21, 35, | |
373 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, | |
374 31, 21, 37, 42, 44, 36, 34, 38, 38, 38, | |
375 38, 38, 39, 21, 40, 21, 21, 21, 21, 21, | |
376 | |
377 18, 21, 21, 21, 21, 19, 41, 43, 44, 44, | |
378 44, 44, 21, 21, 21, 46, 48, 21, 21, 21, | |
379 21, 57, 57, 21, 45, 47, 49, 49, 49, 49, | |
380 49, 50, 21, 51, 21, 21, 21, 21, 21, 18, | |
381 21, 21, 21, 21, 52, 54, 55, 55, 55, 55, | |
382 55, 21, 44, 66, 17, 58, 66, 21, 66, 66, | |
383 65, 56, 59, 59, 59, 59, 59, 21, 61, 61, | |
384 61, 61, 66, 21, 63, 63, 63, 63, 66, 60, | |
385 62, 62, 62, 62, 62, 64, 64, 64, 64, 64, | |
386 20, 20, 66, 20, 20, 21, 21, 25, 25, 30, | |
387 | |
388 66, 30, 30, 30, 3, 66, 66, 66, 66, 66, | |
389 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, | |
390 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, | |
391 66, 66, 66, 66 | |
392 } ; | |
393 | |
394 static yyconst short int yy_chk[235] = | |
395 { 0, | |
396 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
397 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
398 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, | |
399 10, 10, 10, 10, 10, 10, 12, 13, 14, 15, | |
400 16, 25, 12, 13, 14, 15, 16, 25, 27, 15, | |
401 14, 49, 49, 49, 27, 13, 16, 23, 23, 23, | |
402 23, 23, 23, 24, 24, 24, 24, 24, 26, 27, | |
403 28, 29, 34, 37, 26, 35, 28, 29, 34, 37, | |
404 71, 35, 29, 37, 44, 28, 26, 33, 33, 33, | |
405 33, 33, 34, 36, 35, 40, 47, 42, 50, 36, | |
406 | |
407 18, 40, 47, 42, 50, 7, 36, 38, 38, 38, | |
408 38, 38, 39, 41, 45, 40, 42, 46, 39, 41, | |
409 45, 55, 55, 46, 39, 41, 43, 43, 43, 43, | |
410 43, 45, 48, 46, 51, 52, 56, 60, 48, 5, | |
411 51, 52, 56, 60, 48, 51, 53, 53, 53, 53, | |
412 53, 54, 64, 3, 2, 56, 0, 54, 0, 0, | |
413 64, 54, 57, 57, 57, 57, 57, 58, 59, 59, | |
414 59, 59, 0, 58, 62, 62, 62, 62, 0, 58, | |
415 61, 61, 61, 61, 61, 63, 63, 63, 63, 63, | |
416 67, 67, 0, 67, 67, 68, 68, 69, 69, 70, | |
417 | |
418 0, 70, 70, 70, 66, 66, 66, 66, 66, 66, | |
419 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, | |
420 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, | |
421 66, 66, 66, 66 | |
422 } ; | |
423 | 349 |
424 static yy_state_type yy_last_accepting_state; | 350 static yy_state_type yy_last_accepting_state; |
425 static char *yy_last_accepting_cpos; | 351 static char *yy_last_accepting_cpos; |
426 | 352 |
427 /* The intent behind this definition is that it'll catch | 353 /* The intent behind this definition is that it'll catch |
428 * any uses of REJECT which flex missed. | 354 * any uses of REJECT which flex missed. |
429 */ | 355 */ |
430 #define REJECT reject_used_but_not_detected | 356 #define REJECT reject_used_but_not_detected |
431 static int yy_more_flag = 0; | 357 static int yy_more_flag = 0; |
432 static int yy_more_len = 0; | 358 static int yy_more_len = 0; |
433 #define yymore() (yy_more_flag = 1) | 359 #define yymore() (yy_more_flag = 1) |
434 #define YY_MORE_ADJ yy_more_len | 360 #define YY_MORE_ADJ yy_more_len |
435 #define YY_RESTORE_YY_MORE_OFFSET | 361 #define YY_RESTORE_YY_MORE_OFFSET |
436 char *yytext; | 362 char *yytext; |
437 #line 1 "crlgen_lex_orig.l" | 363 #line 1 "crlgen_lex_orig.l" |
438 #define INITIAL 0 | 364 #define INITIAL 0 |
439 #line 2 "crlgen_lex_orig.l" | 365 #line 2 "crlgen_lex_orig.l" |
440 | 366 |
441 #include "crlgen.h" | 367 #include "crlgen.h" |
442 | 368 |
443 static SECStatus parserStatus = SECSuccess; | 369 static SECStatus parserStatus = SECSuccess; |
444 static CRLGENGeneratorData *parserData; | 370 static CRLGENGeneratorData *parserData; |
445 static PRFileDesc *src; | 371 static PRFileDesc *src; |
446 | 372 |
447 #define YY_INPUT(buf,result,max_size) \ | 373 #define YY_INPUT(buf, result, max_size) \ |
448 if ( parserStatus != SECFailure) { \ | 374 if (parserStatus != SECFailure) { \ |
449 » if (((result = PR_Read(src, buf, max_size)) == 0) && \ | 375 if (((result = PR_Read(src, buf, max_size)) == 0) && ferror(yyin)) \ |
450 » ferror( yyin )) \ | 376 return SECFailure; \ |
451 » return SECFailure; \ | 377 } else { \ |
452 } else { return SECFailure; } | 378 return SECFailure; \ |
453 ·············· | 379 } |
454 | |
455 | 380 |
456 /* Macros after this point can all be overridden by user definitions in | 381 /* Macros after this point can all be overridden by user definitions in |
457 * section 1. | 382 * section 1. |
458 */ | 383 */ |
459 | 384 |
460 #ifndef YY_SKIP_YYWRAP | 385 #ifndef YY_SKIP_YYWRAP |
461 #ifdef __cplusplus | 386 #ifdef __cplusplus |
462 extern "C" int yywrap YY_PROTO(( void )); | 387 extern "C" int yywrap YY_PROTO((void)); |
463 #else | 388 #else |
464 extern int yywrap YY_PROTO(( void )); | 389 extern int yywrap YY_PROTO((void)); |
465 #endif | 390 #endif |
466 #endif | 391 #endif |
467 | 392 |
468 #ifndef YY_NO_UNPUT | 393 #ifndef YY_NO_UNPUT |
469 static void yyunput YY_PROTO(( int c, char *buf_ptr )); | 394 static void yyunput YY_PROTO((int c, char *buf_ptr)); |
470 #endif | 395 #endif |
471 | 396 |
472 #ifndef yytext_ptr | 397 #ifndef yytext_ptr |
473 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); | 398 static void yy_flex_strncpy YY_PROTO((char *, yyconst char *, int)); |
474 #endif | 399 #endif |
475 | 400 |
476 #ifdef YY_NEED_STRLEN | 401 #ifdef YY_NEED_STRLEN |
477 static int yy_flex_strlen YY_PROTO(( yyconst char * )); | 402 static int yy_flex_strlen YY_PROTO((yyconst char *)); |
478 #endif | 403 #endif |
479 | 404 |
480 #ifndef YY_NO_INPUT | 405 #ifndef YY_NO_INPUT |
481 #ifdef __cplusplus | 406 #ifdef __cplusplus |
482 static int yyinput YY_PROTO(( void )); | 407 static int yyinput YY_PROTO((void)); |
483 #else | 408 #else |
484 static int input YY_PROTO(( void )); | 409 static int input YY_PROTO((void)); |
485 #endif | 410 #endif |
486 #endif | 411 #endif |
487 | 412 |
488 #if YY_STACK_USED | 413 #if YY_STACK_USED |
489 static int yy_start_stack_ptr = 0; | 414 static int yy_start_stack_ptr = 0; |
490 static int yy_start_stack_depth = 0; | 415 static int yy_start_stack_depth = 0; |
491 static int *yy_start_stack = 0; | 416 static int *yy_start_stack = 0; |
492 #ifndef YY_NO_PUSH_STATE | 417 #ifndef YY_NO_PUSH_STATE |
493 static void yy_push_state YY_PROTO(( int new_state )); | 418 static void yy_push_state YY_PROTO((int new_state)); |
494 #endif | 419 #endif |
495 #ifndef YY_NO_POP_STATE | 420 #ifndef YY_NO_POP_STATE |
496 static void yy_pop_state YY_PROTO(( void )); | 421 static void yy_pop_state YY_PROTO((void)); |
497 #endif | 422 #endif |
498 #ifndef YY_NO_TOP_STATE | 423 #ifndef YY_NO_TOP_STATE |
499 static int yy_top_state YY_PROTO(( void )); | 424 static int yy_top_state YY_PROTO((void)); |
500 #endif | 425 #endif |
501 | 426 |
502 #else | 427 #else |
503 #define YY_NO_PUSH_STATE 1 | 428 #define YY_NO_PUSH_STATE 1 |
504 #define YY_NO_POP_STATE 1 | 429 #define YY_NO_POP_STATE 1 |
505 #define YY_NO_TOP_STATE 1 | 430 #define YY_NO_TOP_STATE 1 |
506 #endif | 431 #endif |
507 | 432 |
508 #ifdef YY_MALLOC_DECL | 433 #ifdef YY_MALLOC_DECL |
509 YY_MALLOC_DECL | 434 YY_MALLOC_DECL |
(...skipping 14 matching lines...) Expand all Loading... |
524 #ifndef YY_READ_BUF_SIZE | 449 #ifndef YY_READ_BUF_SIZE |
525 #define YY_READ_BUF_SIZE 8192 | 450 #define YY_READ_BUF_SIZE 8192 |
526 #endif | 451 #endif |
527 | 452 |
528 /* Copy whatever the last rule matched to the standard output. */ | 453 /* Copy whatever the last rule matched to the standard output. */ |
529 | 454 |
530 #ifndef ECHO | 455 #ifndef ECHO |
531 /* This used to be an fputs(), but since the string might contain NUL's, | 456 /* This used to be an fputs(), but since the string might contain NUL's, |
532 * we now use fwrite(). | 457 * we now use fwrite(). |
533 */ | 458 */ |
534 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) | 459 #define ECHO (void) fwrite(yytext, yyleng, 1, yyout) |
535 #endif | 460 #endif |
536 | 461 |
537 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, | 462 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, |
538 * is returned in "result". | 463 * is returned in "result". |
539 */ | 464 */ |
540 #ifndef YY_INPUT | 465 #ifndef YY_INPUT |
541 #define YY_INPUT(buf,result,max_size) \ | 466 #define YY_INPUT(buf, result, max_size) \ |
542 » if ( yy_current_buffer->yy_is_interactive ) \ | 467 if (yy_current_buffer->yy_is_interactive) { \ |
543 » » { \ | 468 int c = '*', n; \ |
544 » » int c = '*', n; \ | 469 for (n = 0; n < max_size && (c = getc(yyin)) != EOF && c != '\n'; ++n) \ |
545 » » for ( n = 0; n < max_size && \ | 470 buf[n] = (char)c; \ |
546 » » » (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ | 471 if (c == '\n') buf[n++] = (char)c; \ |
547 » » » buf[n] = (char) c; \ | 472 if (c == EOF && ferror(yyin)) \ |
548 » » if ( c == '\n' ) \ | 473 YY_FATAL_ERROR("input in flex scanner failed"); \ |
549 » » » buf[n++] = (char) c; \ | 474 result = n; \ |
550 » » if ( c == EOF && ferror( yyin ) ) \ | 475 } else if (((result = fread(buf, 1, max_size, yyin)) == 0) && ferror(yyin)) \ |
551 » » » YY_FATAL_ERROR( "input in flex scanner failed" ); \ | 476 YY_FATAL_ERROR("input in flex scanner failed"); |
552 » » result = n; \ | |
553 » » } \ | |
554 » else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ | |
555 » » && ferror( yyin ) ) \ | |
556 » » YY_FATAL_ERROR( "input in flex scanner failed" ); | |
557 #endif | 477 #endif |
558 | 478 |
559 /* No semi-colon after return; correct usage is to write "yyterminate();" - | 479 /* No semi-colon after return; correct usage is to write "yyterminate();" - |
560 * we don't want an extra ';' after the "return" because that will cause | 480 * we don't want an extra ';' after the "return" because that will cause |
561 * some compilers to complain about unreachable statements. | 481 * some compilers to complain about unreachable statements. |
562 */ | 482 */ |
563 #ifndef yyterminate | 483 #ifndef yyterminate |
564 #define yyterminate() return YY_NULL | 484 #define yyterminate() return YY_NULL |
565 #endif | 485 #endif |
566 | 486 |
567 /* Number of entries by which start-condition stack grows. */ | 487 /* Number of entries by which start-condition stack grows. */ |
568 #ifndef YY_START_STACK_INCR | 488 #ifndef YY_START_STACK_INCR |
569 #define YY_START_STACK_INCR 25 | 489 #define YY_START_STACK_INCR 25 |
570 #endif | 490 #endif |
571 | 491 |
572 /* Report a fatal error. */ | 492 /* Report a fatal error. */ |
573 #ifndef YY_FATAL_ERROR | 493 #ifndef YY_FATAL_ERROR |
574 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) | 494 #define YY_FATAL_ERROR(msg) yy_fatal_error(msg) |
575 #endif | 495 #endif |
576 | 496 |
577 /* Default declaration of generated scanner - a define so the user can | 497 /* Default declaration of generated scanner - a define so the user can |
578 * easily add parameters. | 498 * easily add parameters. |
579 */ | 499 */ |
580 #ifndef YY_DECL | 500 #ifndef YY_DECL |
581 #define YY_DECL int yylex YY_PROTO(( void )) | 501 #define YY_DECL int yylex YY_PROTO((void)) |
582 #endif | 502 #endif |
583 | 503 |
584 /* Code executed at the beginning of each rule, after yytext and yyleng | 504 /* Code executed at the beginning of each rule, after yytext and yyleng |
585 * have been set up. | 505 * have been set up. |
586 */ | 506 */ |
587 #ifndef YY_USER_ACTION | 507 #ifndef YY_USER_ACTION |
588 #define YY_USER_ACTION | 508 #define YY_USER_ACTION |
589 #endif | 509 #endif |
590 | 510 |
591 /* Code executed at the end of each rule. */ | 511 /* Code executed at the end of each rule. */ |
592 #ifndef YY_BREAK | 512 #ifndef YY_BREAK |
593 #define YY_BREAK break; | 513 #define YY_BREAK break; |
594 #endif | 514 #endif |
595 | 515 |
596 #define YY_RULE_SETUP \ | 516 #define YY_RULE_SETUP \ |
597 » if ( yyleng > 0 ) \ | 517 if (yyleng > 0) yy_current_buffer->yy_at_bol = (yytext[yyleng - 1] == '\n'); \ |
598 » » yy_current_buffer->yy_at_bol = \ | 518 YY_USER_ACTION |
599 » » » » (yytext[yyleng - 1] == '\n'); \ | |
600 » YY_USER_ACTION | |
601 | 519 |
602 YY_DECL | 520 YY_DECL |
603 » { | 521 { |
604 » register yy_state_type yy_current_state; | 522 register yy_state_type yy_current_state; |
605 » register char *yy_cp = NULL, *yy_bp = NULL; | 523 register char *yy_cp = NULL, *yy_bp = NULL; |
606 » register int yy_act; | 524 register int yy_act; |
607 | 525 |
608 #line 28 "crlgen_lex_orig.l" | 526 #line 28 "crlgen_lex_orig.l" |
609 | 527 |
610 | 528 if (yy_init) { |
611 | 529 yy_init = 0; |
612 » if ( yy_init ) | |
613 » » { | |
614 » » yy_init = 0; | |
615 | 530 |
616 #ifdef YY_USER_INIT | 531 #ifdef YY_USER_INIT |
617 » » YY_USER_INIT; | 532 YY_USER_INIT; |
618 #endif | 533 #endif |
619 | 534 |
620 » » if ( ! yy_start ) | 535 if (!yy_start) yy_start = 1; /* first start state */ |
621 » » » yy_start = 1;» /* first start state */ | 536 |
622 | 537 if (!yyin) yyin = stdin; |
623 » » if ( ! yyin ) | 538 |
624 » » » yyin = stdin; | 539 if (!yyout) yyout = stdout; |
625 | 540 |
626 » » if ( ! yyout ) | 541 if (!yy_current_buffer) |
627 » » » yyout = stdout; | 542 yy_current_buffer = yy_create_buffer(yyin, YY_BUF_SIZE); |
628 | 543 |
629 » » if ( ! yy_current_buffer ) | 544 yy_load_buffer_state(); |
630 » » » yy_current_buffer = | 545 } |
631 » » » » yy_create_buffer( yyin, YY_BUF_SIZE ); | 546 |
632 | 547 while (1) /* loops until end-of-file is reached */ |
633 » » yy_load_buffer_state(); | 548 { |
634 » » } | 549 yy_more_len = 0; |
635 | 550 if (yy_more_flag) { |
636 » while ( 1 )» » /* loops until end-of-file is reached */ | 551 yy_more_len = yy_c_buf_p - yytext_ptr; |
637 » » { | 552 yy_more_flag = 0; |
638 » » yy_more_len = 0; | 553 } |
639 » » if ( yy_more_flag ) | 554 yy_cp = yy_c_buf_p; |
640 » » » { | 555 |
641 » » » yy_more_len = yy_c_buf_p - yytext_ptr; | 556 /* Support of yytext. */ |
642 » » » yy_more_flag = 0; | 557 *yy_cp = yy_hold_char; |
643 » » » } | 558 |
644 » » yy_cp = yy_c_buf_p; | 559 /* yy_bp points to the position in yy_ch_buf of the start of |
645 | 560 * the current run. |
646 » » /* Support of yytext. */ | 561 */ |
647 » » *yy_cp = yy_hold_char; | 562 yy_bp = yy_cp; |
648 | 563 |
649 » » /* yy_bp points to the position in yy_ch_buf of the start of | 564 yy_current_state = yy_start; |
650 » » * the current run. | 565 yy_current_state += YY_AT_BOL(); |
651 » » */ | 566 yy_match: |
652 » » yy_bp = yy_cp; | 567 do { |
653 | 568 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; |
654 » » yy_current_state = yy_start; | 569 if (yy_accept[yy_current_state]) { |
655 » » yy_current_state += YY_AT_BOL(); | 570 yy_last_accepting_state = yy_current_state; |
656 yy_match: | 571 yy_last_accepting_cpos = yy_cp; |
657 » » do | 572 } |
658 » » » { | 573 while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { |
659 » » » register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; | 574 yy_current_state = (int)yy_def[yy_current_state]; |
660 » » » if ( yy_accept[yy_current_state] ) | 575 if (yy_current_state >= 67) yy_c = yy_meta[(unsigned int)yy_c]; |
661 » » » » { | 576 } |
662 » » » » yy_last_accepting_state = yy_current_state; | 577 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int)yy_c]; |
663 » » » » yy_last_accepting_cpos = yy_cp; | 578 ++yy_cp; |
664 » » » » } | 579 } while (yy_base[yy_current_state] != 205); |
665 » » » while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_c
urrent_state ) | 580 |
666 » » » » { | 581 yy_find_action: |
667 » » » » yy_current_state = (int) yy_def[yy_current_state
]; | 582 yy_act = yy_accept[yy_current_state]; |
668 » » » » if ( yy_current_state >= 67 ) | 583 if (yy_act == 0) {/* have to back up */ |
669 » » » » » yy_c = yy_meta[(unsigned int) yy_c]; | 584 yy_cp = yy_last_accepting_cpos; |
670 » » » » } | 585 yy_current_state = yy_last_accepting_state; |
671 » » » yy_current_state = yy_nxt[yy_base[yy_current_state] + (u
nsigned int) yy_c]; | 586 yy_act = yy_accept[yy_current_state]; |
672 » » » ++yy_cp; | 587 } |
673 » » » } | 588 |
674 » » while ( yy_base[yy_current_state] != 205 ); | 589 YY_DO_BEFORE_ACTION; |
675 | 590 |
676 yy_find_action: | 591 do_action: /* This label is used only to access EOF actions. */ |
677 » » yy_act = yy_accept[yy_current_state]; | 592 |
678 » » if ( yy_act == 0 ) | 593 switch (yy_act) {/* beginning of action switch */ |
679 » » » { /* have to back up */ | 594 case 0: /* must back up */ |
680 » » » yy_cp = yy_last_accepting_cpos; | 595 /* undo the effects of YY_DO_BEFORE_ACTION */ |
681 » » » yy_current_state = yy_last_accepting_state; | 596 *yy_cp = yy_hold_char; |
682 » » » yy_act = yy_accept[yy_current_state]; | 597 yy_cp = yy_last_accepting_cpos; |
683 » » » } | 598 yy_current_state = yy_last_accepting_state; |
684 | 599 goto yy_find_action; |
685 » » YY_DO_BEFORE_ACTION; | 600 |
686 | 601 case 1: |
687 | 602 YY_RULE_SETUP |
688 do_action:» /* This label is used only to access EOF actions. */ | |
689 | |
690 | |
691 » » switch ( yy_act ) | |
692 » { /* beginning of action switch */ | |
693 » » » case 0: /* must back up */ | |
694 » » » /* undo the effects of YY_DO_BEFORE_ACTION */ | |
695 » » » *yy_cp = yy_hold_char; | |
696 » » » yy_cp = yy_last_accepting_cpos; | |
697 » » » yy_current_state = yy_last_accepting_state; | |
698 » » » goto yy_find_action; | |
699 | |
700 case 1: | |
701 YY_RULE_SETUP | |
702 #line 30 "crlgen_lex_orig.l" | 603 #line 30 "crlgen_lex_orig.l" |
703 { | 604 { |
704 parserStatus = crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_ZDATE); | 605 parserStatus = |
705 if (parserStatus != SECSuccess) | 606 crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_ZDATE); |
706 return parserStatus; | 607 if (parserStatus != SECSuccess) return parserStatus; |
707 } | 608 } |
708 » YY_BREAK | 609 YY_BREAK |
709 case 2: | 610 case 2: |
710 YY_RULE_SETUP | 611 YY_RULE_SETUP |
711 #line 36 "crlgen_lex_orig.l" | 612 #line 36 "crlgen_lex_orig.l" |
712 { | 613 { |
713 parserStatus = crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_DIGIT); | 614 parserStatus = |
714 if (parserStatus != SECSuccess) | 615 crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_DIGIT); |
715 return parserStatus; | 616 if (parserStatus != SECSuccess) return parserStatus; |
716 } | 617 } |
717 » YY_BREAK | 618 YY_BREAK |
718 case 3: | 619 case 3: |
719 YY_RULE_SETUP | 620 YY_RULE_SETUP |
720 #line 42 "crlgen_lex_orig.l" | 621 #line 42 "crlgen_lex_orig.l" |
721 { | 622 { |
722 parserStatus = crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_DIGIT_RANGE); | 623 parserStatus = |
723 if (parserStatus != SECSuccess) | 624 crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_DIGIT_RANGE); |
724 return parserStatus; | 625 if (parserStatus != SECSuccess) return parserStatus; |
725 } | 626 } |
726 » YY_BREAK | 627 YY_BREAK |
727 case 4: | 628 case 4: |
728 YY_RULE_SETUP | 629 YY_RULE_SETUP |
729 #line 48 "crlgen_lex_orig.l" | 630 #line 48 "crlgen_lex_orig.l" |
730 { | 631 { |
731 parserStatus = crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_OID); | 632 parserStatus = |
732 if (parserStatus != SECSuccess) | 633 crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_OID); |
733 return parserStatus; | 634 if (parserStatus != SECSuccess) return parserStatus; |
734 } | 635 } |
735 » YY_BREAK | 636 YY_BREAK |
736 case 5: | 637 case 5: |
737 YY_RULE_SETUP | 638 YY_RULE_SETUP |
738 #line 54 "crlgen_lex_orig.l" | 639 #line 54 "crlgen_lex_orig.l" |
739 { | 640 { |
740 parserStatus = crlgen_createNewLangStruct(parserData, CRLGEN_ISSUER_CONTEXT); | 641 parserStatus = |
741 if (parserStatus != SECSuccess) | 642 crlgen_createNewLangStruct(parserData, CRLGEN_ISSUER_CONTEXT); |
742 return parserStatus; | 643 if (parserStatus != SECSuccess) return parserStatus; |
743 } | 644 } |
744 » YY_BREAK | 645 YY_BREAK |
745 case 6: | 646 case 6: |
746 YY_RULE_SETUP | 647 YY_RULE_SETUP |
747 #line 60 "crlgen_lex_orig.l" | 648 #line 60 "crlgen_lex_orig.l" |
748 { | 649 { |
749 parserStatus = crlgen_createNewLangStruct(parserData, CRLGEN_UPDATE_CONTEXT); | 650 parserStatus = |
750 if (parserStatus != SECSuccess) | 651 crlgen_createNewLangStruct(parserData, CRLGEN_UPDATE_CONTEXT); |
751 return parserStatus; | 652 if (parserStatus != SECSuccess) return parserStatus; |
752 } | 653 } |
753 » YY_BREAK | 654 YY_BREAK |
754 case 7: | 655 case 7: |
755 YY_RULE_SETUP | 656 YY_RULE_SETUP |
756 #line 65 "crlgen_lex_orig.l" | 657 #line 65 "crlgen_lex_orig.l" |
757 { | 658 { |
758 parserStatus = crlgen_createNewLangStruct(parserData, CRLGEN_NEXT_UPDATE_CONTEXT
); | 659 parserStatus = crlgen_createNewLangStruct(parserData, |
759 if (parserStatus != SECSuccess) | 660 CRLGEN_NEXT_UPDATE_CONTEXT); |
760 return parserStatus; | 661 if (parserStatus != SECSuccess) return parserStatus; |
761 } | 662 } |
762 » YY_BREAK | 663 YY_BREAK |
763 case 8: | 664 case 8: |
764 YY_RULE_SETUP | 665 YY_RULE_SETUP |
765 #line 71 "crlgen_lex_orig.l" | 666 #line 71 "crlgen_lex_orig.l" |
766 { | 667 { |
767 parserStatus = crlgen_createNewLangStruct(parserData, CRLGEN_CHANGE_RANGE_CONTEX
T); | 668 parserStatus = crlgen_createNewLangStruct( |
768 if (parserStatus != SECSuccess) | 669 parserData, CRLGEN_CHANGE_RANGE_CONTEXT); |
769 return parserStatus; | 670 if (parserStatus != SECSuccess) return parserStatus; |
770 } | 671 } |
771 » YY_BREAK | 672 YY_BREAK |
772 case 9: | 673 case 9: |
773 YY_RULE_SETUP | 674 YY_RULE_SETUP |
774 #line 77 "crlgen_lex_orig.l" | 675 #line 77 "crlgen_lex_orig.l" |
775 { | 676 { |
776 if (strcmp(yytext, "addcert") == 0) { | 677 if (strcmp(yytext, "addcert") == 0) { |
777 parserStatus = crlgen_createNewLangStruct(parserData, | 678 parserStatus = |
778 CRLGEN_ADD_CERT_CONTEXT); | 679 crlgen_createNewLangStruct(parserData, CRLGEN_ADD_CERT_CONTEXT); |
779 if (parserStatus != SECSuccess) | 680 if (parserStatus != SECSuccess) return parserStatus; |
780 return parserStatus; | 681 } else if (strcmp(yytext, "rmcert") == 0) { |
781 } else if (strcmp(yytext, "rmcert") == 0) { | 682 parserStatus = |
782 parserStatus = crlgen_createNewLangStruct(parserData, | 683 crlgen_createNewLangStruct(parserData, CRLGEN_RM_CERT_CONTEXT); |
783 CRLGEN_RM_CERT_CONTEXT); | 684 if (parserStatus != SECSuccess) return parserStatus; |
784 if (parserStatus != SECSuccess) | 685 } else if (strcmp(yytext, "addext") == 0) { |
785 return parserStatus; | 686 parserStatus = crlgen_createNewLangStruct( |
786 } else if (strcmp(yytext, "addext") == 0) { | 687 parserData, CRLGEN_ADD_EXTENSION_CONTEXT); |
787 parserStatus = crlgen_createNewLangStruct(parserData, | 688 if (parserStatus != SECSuccess) return parserStatus; |
788 CRLGEN_ADD_EXTENSION_CONTEXT); | 689 } else { |
789 if (parserStatus != SECSuccess) | 690 parserStatus = |
790 return parserStatus; | 691 crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_ID); |
791 } else { | 692 if (parserStatus != SECSuccess) return parserStatus; |
792 parserStatus = crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_ID); | 693 } |
793 if (parserStatus != SECSuccess) | 694 } |
794 return parserStatus; | 695 YY_BREAK |
795 } | 696 case 10: |
796 } | 697 YY_RULE_SETUP |
797 » YY_BREAK | |
798 case 10: | |
799 YY_RULE_SETUP | |
800 #line 100 "crlgen_lex_orig.l" | 698 #line 100 "crlgen_lex_orig.l" |
801 | 699 |
802 » YY_BREAK | 700 YY_BREAK |
803 case 11: | 701 case 11: |
804 YY_RULE_SETUP | 702 YY_RULE_SETUP |
805 #line 102 "crlgen_lex_orig.l" | 703 #line 102 "crlgen_lex_orig.l" |
806 { | 704 { |
807 if (yytext[yyleng-1] == '\\') { | 705 if (yytext[yyleng - 1] == '\\') { |
808 yymore(); | 706 yymore(); |
809 } else { | 707 } else { |
810 register int c; | 708 register int c; |
811 c = input(); | 709 c = input(); |
812 if (c != '\"') { | 710 if (c != '\"') { |
813 printf( "Error: Line ending \" is missing: %c\n", c); | 711 printf("Error: Line ending \" is missing: %c\n", c); |
814 unput(c); | 712 unput(c); |
815 } else { | 713 } else { |
816 parserStatus = crlgen_setNextData(parserData, yytext + 1, | 714 parserStatus = crlgen_setNextData(parserData, yytext + 1, |
817 CRLGEN_TYPE_STRING); | 715 CRLGEN_TYPE_STRING); |
818 if (parserStatus != SECSuccess) | 716 if (parserStatus != SECSuccess) return parserStatus; |
819 return parserStatus; | 717 } |
820 } | 718 } |
821 } | 719 } |
822 } | 720 YY_BREAK |
823 » YY_BREAK | 721 case 12: |
824 case 12: | 722 YY_RULE_SETUP |
825 YY_RULE_SETUP | |
826 #line 120 "crlgen_lex_orig.l" | 723 #line 120 "crlgen_lex_orig.l" |
827 { | 724 { |
828 parserStatus = crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_STRING); | 725 parserStatus = |
829 if (parserStatus != SECSuccess) | 726 crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_STRING); |
830 return parserStatus; | 727 if (parserStatus != SECSuccess) return parserStatus; |
831 } | 728 } |
832 » YY_BREAK | 729 YY_BREAK |
833 case 13: | 730 case 13: |
834 YY_RULE_SETUP | 731 YY_RULE_SETUP |
835 #line 128 "crlgen_lex_orig.l" | 732 #line 128 "crlgen_lex_orig.l" |
836 /* eat up one-line comments */ {} | 733 /* eat up one-line comments */ { |
837 » YY_BREAK | 734 } |
838 case 14: | 735 YY_BREAK |
839 YY_RULE_SETUP | 736 case 14: |
| 737 YY_RULE_SETUP |
840 #line 130 "crlgen_lex_orig.l" | 738 #line 130 "crlgen_lex_orig.l" |
841 {} | 739 {} |
842 » YY_BREAK | 740 YY_BREAK |
843 case 15: | 741 case 15: |
844 YY_RULE_SETUP | 742 YY_RULE_SETUP |
845 #line 132 "crlgen_lex_orig.l" | 743 #line 132 "crlgen_lex_orig.l" |
846 { | 744 { |
847 parserStatus = crlgen_updateCrl(parserData); | 745 parserStatus = crlgen_updateCrl(parserData); |
848 if (parserStatus != SECSuccess) | 746 if (parserStatus != SECSuccess) return parserStatus; |
849 return parserStatus; | 747 } |
850 } | 748 YY_BREAK |
851 » YY_BREAK | 749 case 16: |
852 case 16: | 750 YY_RULE_SETUP |
853 YY_RULE_SETUP | |
854 #line 138 "crlgen_lex_orig.l" | 751 #line 138 "crlgen_lex_orig.l" |
855 { | 752 { |
856 fprintf(stderr, "Syntax error at line %d: unknown token %s\n", | 753 fprintf(stderr, "Syntax error at line %d: unknown token %s\n", |
857 parserData->parsedLineNum, yytext); | 754 parserData->parsedLineNum, yytext); |
858 return SECFailure; | 755 return SECFailure; |
859 } | 756 } |
860 » YY_BREAK | 757 YY_BREAK |
861 case 17: | 758 case 17: |
862 YY_RULE_SETUP | 759 YY_RULE_SETUP |
863 #line 144 "crlgen_lex_orig.l" | 760 #line 144 "crlgen_lex_orig.l" |
864 ECHO; | 761 ECHO; |
865 » YY_BREAK | 762 YY_BREAK |
866 case YY_STATE_EOF(INITIAL): | 763 case YY_STATE_EOF(INITIAL) : |
867 » yyterminate(); | 764 yyterminate(); |
868 | 765 |
869 » case YY_END_OF_BUFFER: | 766 case YY_END_OF_BUFFER: { |
870 » » { | 767 /* Amount of text matched not including the EOB char. */ |
871 » » /* Amount of text matched not including the EOB char. */ | 768 int yy_amount_of_matched_text = (int)(yy_cp - yytext_ptr) - 1; |
872 » » int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; | 769 |
873 | 770 /* Undo the effects of YY_DO_BEFORE_ACTION. */ |
874 » » /* Undo the effects of YY_DO_BEFORE_ACTION. */ | 771 *yy_cp = yy_hold_char; |
875 » » *yy_cp = yy_hold_char; | 772 YY_RESTORE_YY_MORE_OFFSET |
876 » » YY_RESTORE_YY_MORE_OFFSET | 773 |
877 | 774 if (yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW) { |
878 » » if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) | 775 /* We're scanning a new file or input source. It's |
879 » » » { | 776 * possible that this happened because the user |
880 » » » /* We're scanning a new file or input source. It's | 777 * just pointed yyin at a new source and called |
881 » » » * possible that this happened because the user | 778 * yylex(). If so, then we have to assure |
882 » » » * just pointed yyin at a new source and called | 779 * consistency between yy_current_buffer and our |
883 » » » * yylex(). If so, then we have to assure | 780 * globals. Here is the right place to do so, because |
884 » » » * consistency between yy_current_buffer and our | 781 * this is the first action (other than possibly a |
885 » » » * globals. Here is the right place to do so, because | 782 * back-up) that will match for the new input source. |
886 » » » * this is the first action (other than possibly a | 783 */ |
887 » » » * back-up) that will match for the new input source. | 784 yy_n_chars = yy_current_buffer->yy_n_chars; |
888 » » » */ | 785 yy_current_buffer->yy_input_file = yyin; |
889 » » » yy_n_chars = yy_current_buffer->yy_n_chars; | 786 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; |
890 » » » yy_current_buffer->yy_input_file = yyin; | 787 } |
891 » » » yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; | 788 |
892 » » » } | 789 /* Note that here we test for yy_c_buf_p "<=" to the position |
893 | 790 * of the first EOB in the buffer, since yy_c_buf_p will |
894 » » /* Note that here we test for yy_c_buf_p "<=" to the position | 791 * already have been incremented past the NUL character |
895 » » * of the first EOB in the buffer, since yy_c_buf_p will | 792 * (since all states make transitions on EOB to the |
896 » » * already have been incremented past the NUL character | 793 * end-of-buffer state). Contrast this with the test |
897 » » * (since all states make transitions on EOB to the | 794 * in input(). |
898 » » * end-of-buffer state). Contrast this with the test | 795 */ |
899 » » * in input(). | 796 if (yy_c_buf_p <= |
900 » » */ | 797 &yy_current_buffer->yy_ch_buf[yy_n_chars]) {/* This was really a |
901 » » if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) | 798 NUL. */ |
902 » » » { /* This was really a NUL. */ | 799 yy_state_type yy_next_state; |
903 » » » yy_state_type yy_next_state; | 800 |
904 | 801 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; |
905 » » » yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; | 802 |
906 | 803 yy_current_state = yy_get_previous_state(); |
907 » » » yy_current_state = yy_get_previous_state(); | 804 |
908 | 805 /* Okay, we're now positioned to make the NUL |
909 » » » /* Okay, we're now positioned to make the NUL | 806 * transition. We couldn't have |
910 » » » * transition. We couldn't have | 807 * yy_get_previous_state() go ahead and do it |
911 » » » * yy_get_previous_state() go ahead and do it | 808 * for us because it doesn't know how to deal |
912 » » » * for us because it doesn't know how to deal | 809 * with the possibility of jamming (and we don't |
913 » » » * with the possibility of jamming (and we don't | 810 * want to build jamming into it because then it |
914 » » » * want to build jamming into it because then it | 811 * will run more slowly). |
915 » » » * will run more slowly). | 812 */ |
916 » » » */ | 813 |
917 | 814 yy_next_state = yy_try_NUL_trans(yy_current_state); |
918 » » » yy_next_state = yy_try_NUL_trans( yy_current_state ); | 815 |
919 | 816 yy_bp = yytext_ptr + YY_MORE_ADJ; |
920 » » » yy_bp = yytext_ptr + YY_MORE_ADJ; | 817 |
921 | 818 if (yy_next_state) { |
922 » » » if ( yy_next_state ) | 819 /* Consume the NUL. */ |
923 » » » » { | 820 yy_cp = ++yy_c_buf_p; |
924 » » » » /* Consume the NUL. */ | 821 yy_current_state = yy_next_state; |
925 » » » » yy_cp = ++yy_c_buf_p; | 822 goto yy_match; |
926 » » » » yy_current_state = yy_next_state; | 823 } else { |
927 » » » » goto yy_match; | 824 yy_cp = yy_c_buf_p; |
928 » » » » } | 825 goto yy_find_action; |
929 | 826 } |
930 » » » else | 827 } else |
931 » » » » { | 828 switch (yy_get_next_buffer()) { |
932 » » » » yy_cp = yy_c_buf_p; | 829 case EOB_ACT_END_OF_FILE: { |
933 » » » » goto yy_find_action; | 830 yy_did_buffer_switch_on_eof = 0; |
934 » » » » } | 831 |
935 » » » } | 832 if (yywrap()) { |
936 | 833 /* Note: because we've taken care in |
937 » » else switch ( yy_get_next_buffer() ) | 834 * yy_get_next_buffer() to have set up |
938 » » » { | 835 * yytext, we can now set up |
939 » » » case EOB_ACT_END_OF_FILE: | 836 * yy_c_buf_p so that if some total |
940 » » » » { | 837 * hoser (like flex itself) wants to |
941 » » » » yy_did_buffer_switch_on_eof = 0; | 838 * call the scanner after we return the |
942 | 839 * YY_NULL, it'll still work - another |
943 » » » » if ( yywrap() ) | 840 * YY_NULL will get returned. |
944 » » » » » { | 841 */ |
945 » » » » » /* Note: because we've taken care in | 842 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; |
946 » » » » » * yy_get_next_buffer() to have set up | 843 |
947 » » » » » * yytext, we can now set up | 844 yy_act = YY_STATE_EOF(YY_START); |
948 » » » » » * yy_c_buf_p so that if some total | 845 goto do_action; |
949 » » » » » * hoser (like flex itself) wants to | 846 } else { |
950 » » » » » * call the scanner after we return the | 847 if (!yy_did_buffer_switch_on_eof) YY_NEW_FILE; |
951 » » » » » * YY_NULL, it'll still work - another | 848 } |
952 » » » » » * YY_NULL will get returned. | 849 break; |
953 » » » » » */ | 850 } |
954 » » » » » yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; | 851 |
955 | 852 case EOB_ACT_CONTINUE_SCAN: |
956 » » » » » yy_act = YY_STATE_EOF(YY_START); | 853 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; |
957 » » » » » goto do_action; | 854 |
958 » » » » » } | 855 yy_current_state = yy_get_previous_state(); |
959 | 856 |
960 » » » » else | 857 yy_cp = yy_c_buf_p; |
961 » » » » » { | 858 yy_bp = yytext_ptr + YY_MORE_ADJ; |
962 » » » » » if ( ! yy_did_buffer_switch_on_eof ) | 859 goto yy_match; |
963 » » » » » » YY_NEW_FILE; | 860 |
964 » » » » » } | 861 case EOB_ACT_LAST_MATCH: |
965 » » » » break; | 862 yy_c_buf_p = &yy_current_buffer->yy_ch_buf[yy_n_chars]; |
966 » » » » } | 863 |
967 | 864 yy_current_state = yy_get_previous_state(); |
968 » » » case EOB_ACT_CONTINUE_SCAN: | 865 |
969 » » » » yy_c_buf_p = | 866 yy_cp = yy_c_buf_p; |
970 » » » » » yytext_ptr + yy_amount_of_matched_text; | 867 yy_bp = yytext_ptr + YY_MORE_ADJ; |
971 | 868 goto yy_find_action; |
972 » » » » yy_current_state = yy_get_previous_state(); | 869 } |
973 | 870 break; |
974 » » » » yy_cp = yy_c_buf_p; | 871 } |
975 » » » » yy_bp = yytext_ptr + YY_MORE_ADJ; | 872 |
976 » » » » goto yy_match; | 873 default: |
977 | 874 YY_FATAL_ERROR("fatal flex scanner internal error--no action found"); |
978 » » » case EOB_ACT_LAST_MATCH: | 875 } /* end of action switch */ |
979 » » » » yy_c_buf_p = | 876 } /* end of scanning one token */ |
980 » » » » &yy_current_buffer->yy_ch_buf[yy_n_chars]; | 877 } /* end of yylex */ |
981 | |
982 » » » » yy_current_state = yy_get_previous_state(); | |
983 | |
984 » » » » yy_cp = yy_c_buf_p; | |
985 » » » » yy_bp = yytext_ptr + YY_MORE_ADJ; | |
986 » » » » goto yy_find_action; | |
987 » » » } | |
988 » » break; | |
989 » » } | |
990 | |
991 » default: | |
992 » » YY_FATAL_ERROR( | |
993 » » » "fatal flex scanner internal error--no action found" ); | |
994 » } /* end of action switch */ | |
995 » » } /* end of scanning one token */ | |
996 » } /* end of yylex */ | |
997 | |
998 | 878 |
999 /* yy_get_next_buffer - try to read in a new buffer | 879 /* yy_get_next_buffer - try to read in a new buffer |
1000 * | 880 * |
1001 * Returns a code representing an action: | 881 * Returns a code representing an action: |
1002 * EOB_ACT_LAST_MATCH - | 882 * EOB_ACT_LAST_MATCH - |
1003 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position | 883 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position |
1004 * EOB_ACT_END_OF_FILE - end of file | 884 * EOB_ACT_END_OF_FILE - end of file |
1005 */ | 885 */ |
1006 | 886 |
1007 static int yy_get_next_buffer() | 887 static int yy_get_next_buffer() { |
1008 » { | 888 register char *dest = yy_current_buffer->yy_ch_buf; |
1009 » register char *dest = yy_current_buffer->yy_ch_buf; | 889 register char *source = yytext_ptr; |
1010 » register char *source = yytext_ptr; | 890 register int number_to_move, i; |
1011 » register int number_to_move, i; | 891 int ret_val; |
1012 » int ret_val; | 892 |
1013 | 893 if (yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1]) |
1014 » if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) | 894 YY_FATAL_ERROR("fatal flex scanner internal error--end of buffer missed"); |
1015 » » YY_FATAL_ERROR( | 895 |
1016 » » "fatal flex scanner internal error--end of buffer missed" ); | 896 if (yy_current_buffer->yy_fill_buffer == |
1017 | 897 0) {/* Don't try to fill the buffer, so this is an EOF. */ |
1018 » if ( yy_current_buffer->yy_fill_buffer == 0 ) | 898 if (yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1) { |
1019 » » { /* Don't try to fill the buffer, so this is an EOF. */ | 899 /* We matched a single character, the EOB, so |
1020 » » if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) | 900 * treat this as a final EOF. |
1021 » » » { | 901 */ |
1022 » » » /* We matched a single character, the EOB, so | 902 return EOB_ACT_END_OF_FILE; |
1023 » » » * treat this as a final EOF. | 903 } else { |
1024 » » » */ | 904 /* We matched some text prior to the EOB, first |
1025 » » » return EOB_ACT_END_OF_FILE; | 905 * process it. |
1026 » » » } | 906 */ |
1027 | 907 return EOB_ACT_LAST_MATCH; |
1028 » » else | 908 } |
1029 » » » { | 909 } |
1030 » » » /* We matched some text prior to the EOB, first | 910 |
1031 » » » * process it. | 911 /* Try to read more data. */ |
1032 » » » */ | 912 |
1033 » » » return EOB_ACT_LAST_MATCH; | 913 /* First move last chars to start of buffer. */ |
1034 » » » } | 914 number_to_move = (int)(yy_c_buf_p - yytext_ptr) - 1; |
1035 » » } | 915 |
1036 | 916 for (i = 0; i < number_to_move; ++i) *(dest++) = *(source++); |
1037 » /* Try to read more data. */ | 917 |
1038 | 918 if (yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING) |
1039 » /* First move last chars to start of buffer. */ | 919 /* don't do the read, it's not guaranteed to return an EOF, |
1040 » number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; | 920 * just force an EOF |
1041 | 921 */ |
1042 » for ( i = 0; i < number_to_move; ++i ) | 922 yy_current_buffer->yy_n_chars = yy_n_chars = 0; |
1043 » » *(dest++) = *(source++); | 923 |
1044 | 924 else { |
1045 » if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) | 925 int num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; |
1046 » » /* don't do the read, it's not guaranteed to return an EOF, | 926 |
1047 » » * just force an EOF | 927 while (num_to_read <= 0) {/* Not enough room in the buffer - grow it. */ |
1048 » » */ | |
1049 » » yy_current_buffer->yy_n_chars = yy_n_chars = 0; | |
1050 | |
1051 » else | |
1052 » » { | |
1053 » » int num_to_read = | |
1054 » » » yy_current_buffer->yy_buf_size - number_to_move - 1; | |
1055 | |
1056 » » while ( num_to_read <= 0 ) | |
1057 » » » { /* Not enough room in the buffer - grow it. */ | |
1058 #ifdef YY_USES_REJECT | 928 #ifdef YY_USES_REJECT |
1059 » » » YY_FATAL_ERROR( | 929 YY_FATAL_ERROR( |
1060 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); | 930 "input buffer overflow, can't enlarge buffer because " |
1061 #else | 931 "scanner uses REJECT"); |
1062 | 932 #else |
1063 » » » /* just a shorter name for the current buffer */ | 933 |
1064 » » » YY_BUFFER_STATE b = yy_current_buffer; | 934 /* just a shorter name for the current buffer */ |
1065 | 935 YY_BUFFER_STATE b = yy_current_buffer; |
1066 » » » int yy_c_buf_p_offset = | 936 |
1067 » » » » (int) (yy_c_buf_p - b->yy_ch_buf); | 937 int yy_c_buf_p_offset = (int)(yy_c_buf_p - b->yy_ch_buf); |
1068 | 938 |
1069 » » » if ( b->yy_is_our_buffer ) | 939 if (b->yy_is_our_buffer) { |
1070 » » » » { | 940 int new_size = b->yy_buf_size * 2; |
1071 » » » » int new_size = b->yy_buf_size * 2; | 941 |
1072 | 942 if (new_size <= 0) |
1073 » » » » if ( new_size <= 0 ) | 943 b->yy_buf_size += b->yy_buf_size / 8; |
1074 » » » » » b->yy_buf_size += b->yy_buf_size / 8; | 944 else |
1075 » » » » else | 945 b->yy_buf_size *= 2; |
1076 » » » » » b->yy_buf_size *= 2; | 946 |
1077 | 947 b->yy_ch_buf = (char *) |
1078 » » » » b->yy_ch_buf = (char *) | 948 /* Include room in for 2 EOB chars. */ |
1079 » » » » » /* Include room in for 2 EOB chars. */ | 949 yy_flex_realloc((void *)b->yy_ch_buf, b->yy_buf_size + 2); |
1080 » » » » » yy_flex_realloc( (void *) b->yy_ch_buf, | 950 } else |
1081 » » » » » » » b->yy_buf_size + 2 ); | 951 /* Can't grow it, we don't own it. */ |
1082 » » » » } | 952 b->yy_ch_buf = 0; |
1083 » » » else | 953 |
1084 » » » » /* Can't grow it, we don't own it. */ | 954 if (!b->yy_ch_buf) |
1085 » » » » b->yy_ch_buf = 0; | 955 YY_FATAL_ERROR("fatal error - scanner input buffer overflow"); |
1086 | 956 |
1087 » » » if ( ! b->yy_ch_buf ) | 957 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; |
1088 » » » » YY_FATAL_ERROR( | 958 |
1089 » » » » "fatal error - scanner input buffer overflow" ); | 959 num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; |
1090 | 960 #endif |
1091 » » » yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; | 961 } |
1092 | 962 |
1093 » » » num_to_read = yy_current_buffer->yy_buf_size - | 963 if (num_to_read > YY_READ_BUF_SIZE) num_to_read = YY_READ_BUF_SIZE; |
1094 » » » » » » number_to_move - 1; | 964 |
1095 #endif | 965 /* Read in more data. */ |
1096 » » » } | 966 YY_INPUT((&yy_current_buffer->yy_ch_buf[number_to_move]), yy_n_chars, |
1097 | 967 num_to_read); |
1098 » » if ( num_to_read > YY_READ_BUF_SIZE ) | 968 |
1099 » » » num_to_read = YY_READ_BUF_SIZE; | 969 yy_current_buffer->yy_n_chars = yy_n_chars; |
1100 | 970 } |
1101 » » /* Read in more data. */ | 971 |
1102 » » YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), | 972 if (yy_n_chars == 0) { |
1103 » » » yy_n_chars, num_to_read ); | 973 if (number_to_move == YY_MORE_ADJ) { |
1104 | 974 ret_val = EOB_ACT_END_OF_FILE; |
1105 » » yy_current_buffer->yy_n_chars = yy_n_chars; | 975 yyrestart(yyin); |
1106 » » } | 976 } else { |
1107 | 977 ret_val = EOB_ACT_LAST_MATCH; |
1108 » if ( yy_n_chars == 0 ) | 978 yy_current_buffer->yy_buffer_status = YY_BUFFER_EOF_PENDING; |
1109 » » { | 979 } |
1110 » » if ( number_to_move == YY_MORE_ADJ ) | 980 } else |
1111 » » » { | 981 ret_val = EOB_ACT_CONTINUE_SCAN; |
1112 » » » ret_val = EOB_ACT_END_OF_FILE; | 982 |
1113 » » » yyrestart( yyin ); | 983 yy_n_chars += number_to_move; |
1114 » » » } | 984 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; |
1115 | 985 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; |
1116 » » else | 986 |
1117 » » » { | 987 yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; |
1118 » » » ret_val = EOB_ACT_LAST_MATCH; | 988 |
1119 » » » yy_current_buffer->yy_buffer_status = | 989 return ret_val; |
1120 » » » » YY_BUFFER_EOF_PENDING; | 990 } |
1121 » » » } | |
1122 » » } | |
1123 | |
1124 » else | |
1125 » » ret_val = EOB_ACT_CONTINUE_SCAN; | |
1126 | |
1127 » yy_n_chars += number_to_move; | |
1128 » yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; | |
1129 » yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; | |
1130 | |
1131 » yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; | |
1132 | |
1133 » return ret_val; | |
1134 » } | |
1135 | |
1136 | 991 |
1137 /* yy_get_previous_state - get the state just before the EOB char was reached */ | 992 /* yy_get_previous_state - get the state just before the EOB char was reached */ |
1138 | 993 |
1139 static yy_state_type yy_get_previous_state() | 994 static yy_state_type yy_get_previous_state() { |
1140 » { | 995 register yy_state_type yy_current_state; |
1141 » register yy_state_type yy_current_state; | 996 register char *yy_cp; |
1142 » register char *yy_cp; | 997 |
1143 | 998 yy_current_state = yy_start; |
1144 » yy_current_state = yy_start; | 999 yy_current_state += YY_AT_BOL(); |
1145 » yy_current_state += YY_AT_BOL(); | 1000 |
1146 | 1001 for (yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp) { |
1147 » for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) | 1002 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); |
1148 » » { | 1003 if (yy_accept[yy_current_state]) { |
1149 » » register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1
); | 1004 yy_last_accepting_state = yy_current_state; |
1150 » » if ( yy_accept[yy_current_state] ) | 1005 yy_last_accepting_cpos = yy_cp; |
1151 » » » { | 1006 } |
1152 » » » yy_last_accepting_state = yy_current_state; | 1007 while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { |
1153 » » » yy_last_accepting_cpos = yy_cp; | 1008 yy_current_state = (int)yy_def[yy_current_state]; |
1154 » » » } | 1009 if (yy_current_state >= 67) yy_c = yy_meta[(unsigned int)yy_c]; |
1155 » » while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_s
tate ) | 1010 } |
1156 » » » { | 1011 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int)yy_c]; |
1157 » » » yy_current_state = (int) yy_def[yy_current_state]; | 1012 } |
1158 » » » if ( yy_current_state >= 67 ) | 1013 |
1159 » » » » yy_c = yy_meta[(unsigned int) yy_c]; | 1014 return yy_current_state; |
1160 » » » } | 1015 } |
1161 » » yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned
int) yy_c]; | |
1162 » » } | |
1163 | |
1164 » return yy_current_state; | |
1165 » } | |
1166 | |
1167 | 1016 |
1168 /* yy_try_NUL_trans - try to make a transition on the NUL character | 1017 /* yy_try_NUL_trans - try to make a transition on the NUL character |
1169 * | 1018 * |
1170 * synopsis | 1019 * synopsis |
1171 * next_state = yy_try_NUL_trans( current_state ); | 1020 * next_state = yy_try_NUL_trans( current_state ); |
1172 */ | 1021 */ |
1173 | 1022 |
1174 #ifdef YY_USE_PROTOS | 1023 #ifdef YY_USE_PROTOS |
1175 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) | 1024 static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state) |
1176 #else | 1025 #else |
1177 static yy_state_type yy_try_NUL_trans( yy_current_state ) | 1026 static yy_state_type yy_try_NUL_trans(yy_current_state) |
1178 yy_state_type yy_current_state; | 1027 yy_state_type yy_current_state; |
1179 #endif | 1028 #endif |
1180 » { | 1029 { |
1181 » register int yy_is_jam; | 1030 register int yy_is_jam; |
1182 » register char *yy_cp = yy_c_buf_p; | 1031 register char *yy_cp = yy_c_buf_p; |
1183 | 1032 |
1184 » register YY_CHAR yy_c = 1; | 1033 register YY_CHAR yy_c = 1; |
1185 » if ( yy_accept[yy_current_state] ) | 1034 if (yy_accept[yy_current_state]) { |
1186 » » { | 1035 yy_last_accepting_state = yy_current_state; |
1187 » » yy_last_accepting_state = yy_current_state; | 1036 yy_last_accepting_cpos = yy_cp; |
1188 » » yy_last_accepting_cpos = yy_cp; | 1037 } |
1189 » » } | 1038 while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { |
1190 » while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) | 1039 yy_current_state = (int)yy_def[yy_current_state]; |
1191 » » { | 1040 if (yy_current_state >= 67) yy_c = yy_meta[(unsigned int)yy_c]; |
1192 » » yy_current_state = (int) yy_def[yy_current_state]; | 1041 } |
1193 » » if ( yy_current_state >= 67 ) | 1042 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int)yy_c]; |
1194 » » » yy_c = yy_meta[(unsigned int) yy_c]; | 1043 yy_is_jam = (yy_current_state == 66); |
1195 » » } | 1044 |
1196 » yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_
c]; | 1045 return yy_is_jam ? 0 : yy_current_state; |
1197 » yy_is_jam = (yy_current_state == 66); | 1046 } |
1198 | |
1199 » return yy_is_jam ? 0 : yy_current_state; | |
1200 » } | |
1201 | |
1202 | 1047 |
1203 #ifndef YY_NO_UNPUT | 1048 #ifndef YY_NO_UNPUT |
1204 #ifdef YY_USE_PROTOS | 1049 #ifdef YY_USE_PROTOS |
1205 static void yyunput( int c, register char *yy_bp ) | 1050 static void yyunput(int c, register char *yy_bp) |
1206 #else | 1051 #else |
1207 static void yyunput( c, yy_bp ) | 1052 static void yyunput(c, yy_bp) int c; |
1208 int c; | |
1209 register char *yy_bp; | 1053 register char *yy_bp; |
1210 #endif | 1054 #endif |
1211 » { | 1055 { |
1212 » register char *yy_cp = yy_c_buf_p; | 1056 register char *yy_cp = yy_c_buf_p; |
1213 | 1057 |
1214 » /* undo effects of setting up yytext */ | 1058 /* undo effects of setting up yytext */ |
1215 » *yy_cp = yy_hold_char; | 1059 *yy_cp = yy_hold_char; |
1216 | 1060 |
1217 » if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) | 1061 if (yy_cp < yy_current_buffer->yy_ch_buf + |
1218 » » { /* need to shift things up to make room */ | 1062 2) {/* need to shift things up to make room */ |
1219 » » /* +2 for EOB chars. */ | 1063 /* +2 for EOB chars. */ |
1220 » » register int number_to_move = yy_n_chars + 2; | 1064 register int number_to_move = yy_n_chars + 2; |
1221 » » register char *dest = &yy_current_buffer->yy_ch_buf[ | 1065 register char *dest = |
1222 » » » » » yy_current_buffer->yy_buf_size + 2]; | 1066 &yy_current_buffer->yy_ch_buf[yy_current_buffer->yy_buf_size + 2]; |
1223 » » register char *source = | 1067 register char *source = &yy_current_buffer->yy_ch_buf[number_to_move]; |
1224 » » » » &yy_current_buffer->yy_ch_buf[number_to_move]; | 1068 |
1225 | 1069 while (source > yy_current_buffer->yy_ch_buf) *--dest = *--source; |
1226 » » while ( source > yy_current_buffer->yy_ch_buf ) | 1070 |
1227 » » » *--dest = *--source; | 1071 yy_cp += (int)(dest - source); |
1228 | 1072 yy_bp += (int)(dest - source); |
1229 » » yy_cp += (int) (dest - source); | 1073 yy_current_buffer->yy_n_chars = yy_n_chars = yy_current_buffer->yy_buf_size; |
1230 » » yy_bp += (int) (dest - source); | 1074 |
1231 » » yy_current_buffer->yy_n_chars = | 1075 if (yy_cp < yy_current_buffer->yy_ch_buf + 2) |
1232 » » » yy_n_chars = yy_current_buffer->yy_buf_size; | 1076 YY_FATAL_ERROR("flex scanner push-back overflow"); |
1233 | 1077 } |
1234 » » if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) | 1078 |
1235 » » » YY_FATAL_ERROR( "flex scanner push-back overflow" ); | 1079 *--yy_cp = (char)c; |
1236 » » } | 1080 |
1237 | 1081 yytext_ptr = yy_bp; |
1238 » *--yy_cp = (char) c; | 1082 yy_hold_char = *yy_cp; |
1239 | 1083 yy_c_buf_p = yy_cp; |
1240 | 1084 } |
1241 » yytext_ptr = yy_bp; | 1085 #endif /* ifndef YY_NO_UNPUT */ |
1242 » yy_hold_char = *yy_cp; | |
1243 » yy_c_buf_p = yy_cp; | |
1244 » } | |
1245 #endif» /* ifndef YY_NO_UNPUT */ | |
1246 | |
1247 | 1086 |
1248 #ifndef YY_NO_INPUT | 1087 #ifndef YY_NO_INPUT |
1249 #ifdef __cplusplus | 1088 #ifdef __cplusplus |
1250 static int yyinput() | 1089 static int yyinput() |
1251 #else | 1090 #else |
1252 static int input() | 1091 static int input() |
1253 #endif | 1092 #endif |
1254 » { | 1093 { |
1255 » int c; | 1094 int c; |
1256 | 1095 |
1257 » *yy_c_buf_p = yy_hold_char; | 1096 *yy_c_buf_p = yy_hold_char; |
1258 | 1097 |
1259 » if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) | 1098 if (*yy_c_buf_p == YY_END_OF_BUFFER_CHAR) { |
1260 » » { | 1099 /* yy_c_buf_p now points to the character we want to return. |
1261 » » /* yy_c_buf_p now points to the character we want to return. | 1100 * If this occurs *before* the EOB characters, then it's a |
1262 » » * If this occurs *before* the EOB characters, then it's a | 1101 * valid NUL; if not, then we've hit the end of the buffer. |
1263 » » * valid NUL; if not, then we've hit the end of the buffer. | 1102 */ |
1264 » » */ | 1103 if (yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars]) |
1265 » » if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) | 1104 /* This was really a NUL. */ |
1266 » » » /* This was really a NUL. */ | 1105 *yy_c_buf_p = '\0'; |
1267 » » » *yy_c_buf_p = '\0'; | 1106 |
1268 | 1107 else {/* need more input */ |
1269 » » else | 1108 int offset = yy_c_buf_p - yytext_ptr; |
1270 » » » { /* need more input */ | 1109 ++yy_c_buf_p; |
1271 » » » int offset = yy_c_buf_p - yytext_ptr; | 1110 |
1272 » » » ++yy_c_buf_p; | 1111 switch (yy_get_next_buffer()) { |
1273 | 1112 case EOB_ACT_LAST_MATCH: |
1274 » » » switch ( yy_get_next_buffer() ) | 1113 /* This happens because yy_g_n_b() |
1275 » » » » { | 1114 * sees that we've accumulated a |
1276 » » » » case EOB_ACT_LAST_MATCH: | 1115 * token and flags that we need to |
1277 » » » » » /* This happens because yy_g_n_b() | 1116 * try matching the token before |
1278 » » » » » * sees that we've accumulated a | 1117 * proceeding. But for input(), |
1279 » » » » » * token and flags that we need to | 1118 * there's no matching to consider. |
1280 » » » » » * try matching the token before | 1119 * So convert the EOB_ACT_LAST_MATCH |
1281 » » » » » * proceeding. But for input(), | 1120 * to EOB_ACT_END_OF_FILE. |
1282 » » » » » * there's no matching to consider. | 1121 */ |
1283 » » » » » * So convert the EOB_ACT_LAST_MATCH | 1122 |
1284 » » » » » * to EOB_ACT_END_OF_FILE. | 1123 /* Reset buffer status. */ |
1285 » » » » » */ | 1124 yyrestart(yyin); |
1286 | 1125 |
1287 » » » » » /* Reset buffer status. */ | 1126 /* fall through */ |
1288 » » » » » yyrestart( yyin ); | 1127 |
1289 | 1128 case EOB_ACT_END_OF_FILE: { |
1290 » » » » » /* fall through */ | 1129 if (yywrap()) return EOF; |
1291 | 1130 |
1292 » » » » case EOB_ACT_END_OF_FILE: | 1131 if (!yy_did_buffer_switch_on_eof) YY_NEW_FILE; |
1293 » » » » » { | |
1294 » » » » » if ( yywrap() ) | |
1295 » » » » » » return EOF; | |
1296 | |
1297 » » » » » if ( ! yy_did_buffer_switch_on_eof ) | |
1298 » » » » » » YY_NEW_FILE; | |
1299 #ifdef __cplusplus | 1132 #ifdef __cplusplus |
1300 » » » » » return yyinput(); | 1133 return yyinput(); |
1301 #else | 1134 #else |
1302 » » » » » return input(); | 1135 return input(); |
1303 #endif | 1136 #endif |
1304 » » » » » } | 1137 } |
1305 | 1138 |
1306 » » » » case EOB_ACT_CONTINUE_SCAN: | 1139 case EOB_ACT_CONTINUE_SCAN: |
1307 » » » » » yy_c_buf_p = yytext_ptr + offset; | 1140 yy_c_buf_p = yytext_ptr + offset; |
1308 » » » » » break; | 1141 break; |
1309 » » » » } | 1142 } |
1310 » » » } | 1143 } |
1311 » » } | 1144 } |
1312 | 1145 |
1313 » c = *(unsigned char *) yy_c_buf_p;» /* cast for 8-bit char's */ | 1146 c = *(unsigned char *)yy_c_buf_p; /* cast for 8-bit char's */ |
1314 » *yy_c_buf_p = '\0';» /* preserve yytext */ | 1147 *yy_c_buf_p = '\0'; /* preserve yytext */ |
1315 » yy_hold_char = *++yy_c_buf_p; | 1148 yy_hold_char = *++yy_c_buf_p; |
1316 | 1149 |
1317 » yy_current_buffer->yy_at_bol = (c == '\n'); | 1150 yy_current_buffer->yy_at_bol = (c == '\n'); |
1318 | 1151 |
1319 » return c; | 1152 return c; |
1320 » } | 1153 } |
1321 #endif /* YY_NO_INPUT */ | 1154 #endif /* YY_NO_INPUT */ |
1322 | 1155 |
1323 #ifdef YY_USE_PROTOS | 1156 #ifdef YY_USE_PROTOS |
1324 void yyrestart( FILE *input_file ) | 1157 void yyrestart(FILE *input_file) |
1325 #else | 1158 #else |
1326 void yyrestart( input_file ) | 1159 void yyrestart(input_file) FILE *input_file; |
1327 FILE *input_file; | 1160 #endif |
1328 #endif | 1161 { |
1329 » { | 1162 if (!yy_current_buffer) |
1330 » if ( ! yy_current_buffer ) | 1163 yy_current_buffer = yy_create_buffer(yyin, YY_BUF_SIZE); |
1331 » » yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); | 1164 |
1332 | 1165 yy_init_buffer(yy_current_buffer, input_file); |
1333 » yy_init_buffer( yy_current_buffer, input_file ); | 1166 yy_load_buffer_state(); |
1334 » yy_load_buffer_state(); | 1167 } |
1335 » } | 1168 |
1336 | 1169 #ifdef YY_USE_PROTOS |
1337 | 1170 void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer) |
1338 #ifdef YY_USE_PROTOS | 1171 #else |
1339 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) | 1172 void yy_switch_to_buffer(new_buffer) YY_BUFFER_STATE new_buffer; |
1340 #else | 1173 #endif |
1341 void yy_switch_to_buffer( new_buffer ) | 1174 { |
1342 YY_BUFFER_STATE new_buffer; | 1175 if (yy_current_buffer == new_buffer) return; |
1343 #endif | 1176 |
1344 » { | 1177 if (yy_current_buffer) { |
1345 » if ( yy_current_buffer == new_buffer ) | 1178 /* Flush out information for old buffer. */ |
1346 » » return; | 1179 *yy_c_buf_p = yy_hold_char; |
1347 | 1180 yy_current_buffer->yy_buf_pos = yy_c_buf_p; |
1348 » if ( yy_current_buffer ) | 1181 yy_current_buffer->yy_n_chars = yy_n_chars; |
1349 » » { | 1182 } |
1350 » » /* Flush out information for old buffer. */ | 1183 |
1351 » » *yy_c_buf_p = yy_hold_char; | 1184 yy_current_buffer = new_buffer; |
1352 » » yy_current_buffer->yy_buf_pos = yy_c_buf_p; | 1185 yy_load_buffer_state(); |
1353 » » yy_current_buffer->yy_n_chars = yy_n_chars; | 1186 |
1354 » » } | 1187 /* We don't actually know whether we did this switch during |
1355 | 1188 * EOF (yywrap()) processing, but the only time this flag |
1356 » yy_current_buffer = new_buffer; | 1189 * is looked at is after yywrap() is called, so it's safe |
1357 » yy_load_buffer_state(); | 1190 * to go ahead and always set it. |
1358 | 1191 */ |
1359 » /* We don't actually know whether we did this switch during | 1192 yy_did_buffer_switch_on_eof = 1; |
1360 » * EOF (yywrap()) processing, but the only time this flag | 1193 } |
1361 » * is looked at is after yywrap() is called, so it's safe | 1194 |
1362 » * to go ahead and always set it. | 1195 #ifdef YY_USE_PROTOS |
1363 » */ | 1196 void yy_load_buffer_state(void) |
1364 » yy_did_buffer_switch_on_eof = 1; | |
1365 » } | |
1366 | |
1367 | |
1368 #ifdef YY_USE_PROTOS | |
1369 void yy_load_buffer_state( void ) | |
1370 #else | 1197 #else |
1371 void yy_load_buffer_state() | 1198 void yy_load_buffer_state() |
1372 #endif | 1199 #endif |
1373 » { | 1200 { |
1374 » yy_n_chars = yy_current_buffer->yy_n_chars; | 1201 yy_n_chars = yy_current_buffer->yy_n_chars; |
1375 » yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; | 1202 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; |
1376 » yyin = yy_current_buffer->yy_input_file; | 1203 yyin = yy_current_buffer->yy_input_file; |
1377 » yy_hold_char = *yy_c_buf_p; | 1204 yy_hold_char = *yy_c_buf_p; |
1378 » } | 1205 } |
1379 | 1206 |
1380 | 1207 #ifdef YY_USE_PROTOS |
1381 #ifdef YY_USE_PROTOS | 1208 YY_BUFFER_STATE yy_create_buffer(FILE *file, int size) |
1382 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) | 1209 #else |
1383 #else | 1210 YY_BUFFER_STATE yy_create_buffer(file, size) FILE *file; |
1384 YY_BUFFER_STATE yy_create_buffer( file, size ) | 1211 int size; |
| 1212 #endif |
| 1213 { |
| 1214 YY_BUFFER_STATE b; |
| 1215 |
| 1216 b = (YY_BUFFER_STATE)yy_flex_alloc(sizeof(struct yy_buffer_state)); |
| 1217 if (!b) YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); |
| 1218 |
| 1219 b->yy_buf_size = size; |
| 1220 |
| 1221 /* yy_ch_buf has to be 2 characters longer than the size given because |
| 1222 * we need to put in 2 end-of-buffer characters. |
| 1223 */ |
| 1224 b->yy_ch_buf = (char *)yy_flex_alloc(b->yy_buf_size + 2); |
| 1225 if (!b->yy_ch_buf) |
| 1226 YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); |
| 1227 |
| 1228 b->yy_is_our_buffer = 1; |
| 1229 |
| 1230 yy_init_buffer(b, file); |
| 1231 |
| 1232 return b; |
| 1233 } |
| 1234 |
| 1235 #ifdef YY_USE_PROTOS |
| 1236 void yy_delete_buffer(YY_BUFFER_STATE b) |
| 1237 #else |
| 1238 void yy_delete_buffer(b) YY_BUFFER_STATE b; |
| 1239 #endif |
| 1240 { |
| 1241 if (!b) return; |
| 1242 |
| 1243 if (b == yy_current_buffer) yy_current_buffer = (YY_BUFFER_STATE)0; |
| 1244 |
| 1245 if (b->yy_is_our_buffer) yy_flex_free((void *)b->yy_ch_buf); |
| 1246 |
| 1247 yy_flex_free((void *)b); |
| 1248 } |
| 1249 |
| 1250 #ifdef YY_USE_PROTOS |
| 1251 void yy_init_buffer(YY_BUFFER_STATE b, FILE *file) |
| 1252 #else |
| 1253 void yy_init_buffer(b, file) YY_BUFFER_STATE b; |
1385 FILE *file; | 1254 FILE *file; |
1386 int size; | 1255 #endif |
1387 #endif | 1256 { |
1388 » { | 1257 yy_flush_buffer(b); |
1389 » YY_BUFFER_STATE b; | 1258 |
1390 | 1259 b->yy_input_file = file; |
1391 » b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); | 1260 b->yy_fill_buffer = 1; |
1392 » if ( ! b ) | |
1393 » » YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); | |
1394 | |
1395 » b->yy_buf_size = size; | |
1396 | |
1397 » /* yy_ch_buf has to be 2 characters longer than the size given because | |
1398 » * we need to put in 2 end-of-buffer characters. | |
1399 » */ | |
1400 » b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); | |
1401 » if ( ! b->yy_ch_buf ) | |
1402 » » YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); | |
1403 | |
1404 » b->yy_is_our_buffer = 1; | |
1405 | |
1406 » yy_init_buffer( b, file ); | |
1407 | |
1408 » return b; | |
1409 » } | |
1410 | |
1411 | |
1412 #ifdef YY_USE_PROTOS | |
1413 void yy_delete_buffer( YY_BUFFER_STATE b ) | |
1414 #else | |
1415 void yy_delete_buffer( b ) | |
1416 YY_BUFFER_STATE b; | |
1417 #endif | |
1418 » { | |
1419 » if ( ! b ) | |
1420 » » return; | |
1421 | |
1422 » if ( b == yy_current_buffer ) | |
1423 » » yy_current_buffer = (YY_BUFFER_STATE) 0; | |
1424 | |
1425 » if ( b->yy_is_our_buffer ) | |
1426 » » yy_flex_free( (void *) b->yy_ch_buf ); | |
1427 | |
1428 » yy_flex_free( (void *) b ); | |
1429 » } | |
1430 | |
1431 | |
1432 | |
1433 #ifdef YY_USE_PROTOS | |
1434 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) | |
1435 #else | |
1436 void yy_init_buffer( b, file ) | |
1437 YY_BUFFER_STATE b; | |
1438 FILE *file; | |
1439 #endif | |
1440 | |
1441 | |
1442 » { | |
1443 » yy_flush_buffer( b ); | |
1444 | |
1445 » b->yy_input_file = file; | |
1446 » b->yy_fill_buffer = 1; | |
1447 | 1261 |
1448 #if YY_ALWAYS_INTERACTIVE | 1262 #if YY_ALWAYS_INTERACTIVE |
1449 » b->yy_is_interactive = 1; | 1263 b->yy_is_interactive = 1; |
1450 #else | 1264 #else |
1451 #if YY_NEVER_INTERACTIVE | 1265 #if YY_NEVER_INTERACTIVE |
1452 » b->yy_is_interactive = 0; | 1266 b->yy_is_interactive = 0; |
1453 #else | 1267 #else |
1454 » b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; | 1268 b->yy_is_interactive = file ? (isatty(fileno(file)) > 0) : 0; |
1455 #endif | 1269 #endif |
1456 #endif | 1270 #endif |
1457 » } | 1271 } |
1458 | 1272 |
1459 | 1273 #ifdef YY_USE_PROTOS |
1460 #ifdef YY_USE_PROTOS | 1274 void yy_flush_buffer(YY_BUFFER_STATE b) |
1461 void yy_flush_buffer( YY_BUFFER_STATE b ) | 1275 #else |
1462 #else | 1276 void yy_flush_buffer(b) YY_BUFFER_STATE b; |
1463 void yy_flush_buffer( b ) | 1277 #endif |
1464 YY_BUFFER_STATE b; | 1278 { |
1465 #endif | 1279 if (!b) return; |
1466 | 1280 |
1467 » { | 1281 b->yy_n_chars = 0; |
1468 » if ( ! b ) | 1282 |
1469 » » return; | 1283 /* We always need two end-of-buffer characters. The first causes |
1470 | 1284 * a transition to the end-of-buffer state. The second causes |
1471 » b->yy_n_chars = 0; | 1285 * a jam in that state. |
1472 | 1286 */ |
1473 » /* We always need two end-of-buffer characters. The first causes | 1287 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; |
1474 » * a transition to the end-of-buffer state. The second causes | 1288 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; |
1475 » * a jam in that state. | 1289 |
1476 » */ | 1290 b->yy_buf_pos = &b->yy_ch_buf[0]; |
1477 » b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; | 1291 |
1478 » b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; | 1292 b->yy_at_bol = 1; |
1479 | 1293 b->yy_buffer_status = YY_BUFFER_NEW; |
1480 » b->yy_buf_pos = &b->yy_ch_buf[0]; | 1294 |
1481 | 1295 if (b == yy_current_buffer) yy_load_buffer_state(); |
1482 » b->yy_at_bol = 1; | 1296 } |
1483 » b->yy_buffer_status = YY_BUFFER_NEW; | |
1484 | |
1485 » if ( b == yy_current_buffer ) | |
1486 » » yy_load_buffer_state(); | |
1487 » } | |
1488 | |
1489 | 1297 |
1490 #ifndef YY_NO_SCAN_BUFFER | 1298 #ifndef YY_NO_SCAN_BUFFER |
1491 #ifdef YY_USE_PROTOS | 1299 #ifdef YY_USE_PROTOS |
1492 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) | 1300 YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size) |
1493 #else | 1301 #else |
1494 YY_BUFFER_STATE yy_scan_buffer( base, size ) | 1302 YY_BUFFER_STATE yy_scan_buffer(base, size) char *base; |
1495 char *base; | |
1496 yy_size_t size; | 1303 yy_size_t size; |
1497 #endif | 1304 #endif |
1498 » { | 1305 { |
1499 » YY_BUFFER_STATE b; | 1306 YY_BUFFER_STATE b; |
1500 | 1307 |
1501 » if ( size < 2 || | 1308 if (size < 2 || base[size - 2] != YY_END_OF_BUFFER_CHAR || |
1502 » base[size-2] != YY_END_OF_BUFFER_CHAR || | 1309 base[size - 1] != YY_END_OF_BUFFER_CHAR) |
1503 » base[size-1] != YY_END_OF_BUFFER_CHAR ) | 1310 /* They forgot to leave room for the EOB's. */ |
1504 » » /* They forgot to leave room for the EOB's. */ | 1311 return 0; |
1505 » » return 0; | 1312 |
1506 | 1313 b = (YY_BUFFER_STATE)yy_flex_alloc(sizeof(struct yy_buffer_state)); |
1507 » b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); | 1314 if (!b) YY_FATAL_ERROR("out of dynamic memory in yy_scan_buffer()"); |
1508 » if ( ! b ) | 1315 |
1509 » » YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); | 1316 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ |
1510 | 1317 b->yy_buf_pos = b->yy_ch_buf = base; |
1511 » b->yy_buf_size = size - 2;» /* "- 2" to take care of EOB's */ | 1318 b->yy_is_our_buffer = 0; |
1512 » b->yy_buf_pos = b->yy_ch_buf = base; | 1319 b->yy_input_file = 0; |
1513 » b->yy_is_our_buffer = 0; | 1320 b->yy_n_chars = b->yy_buf_size; |
1514 » b->yy_input_file = 0; | 1321 b->yy_is_interactive = 0; |
1515 » b->yy_n_chars = b->yy_buf_size; | 1322 b->yy_at_bol = 1; |
1516 » b->yy_is_interactive = 0; | 1323 b->yy_fill_buffer = 0; |
1517 » b->yy_at_bol = 1; | 1324 b->yy_buffer_status = YY_BUFFER_NEW; |
1518 » b->yy_fill_buffer = 0; | 1325 |
1519 » b->yy_buffer_status = YY_BUFFER_NEW; | 1326 yy_switch_to_buffer(b); |
1520 | 1327 |
1521 » yy_switch_to_buffer( b ); | 1328 return b; |
1522 | 1329 } |
1523 » return b; | 1330 #endif |
1524 » } | |
1525 #endif | |
1526 | |
1527 | 1331 |
1528 #ifndef YY_NO_SCAN_STRING | 1332 #ifndef YY_NO_SCAN_STRING |
1529 #ifdef YY_USE_PROTOS | 1333 #ifdef YY_USE_PROTOS |
1530 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) | 1334 YY_BUFFER_STATE yy_scan_string(yyconst char *yy_str) |
1531 #else | 1335 #else |
1532 YY_BUFFER_STATE yy_scan_string( yy_str ) | 1336 YY_BUFFER_STATE yy_scan_string(yy_str) yyconst char *yy_str; |
1533 yyconst char *yy_str; | 1337 #endif |
1534 #endif | 1338 { |
1535 » { | 1339 int len; |
1536 » int len; | 1340 for (len = 0; yy_str[len]; ++len) |
1537 » for ( len = 0; yy_str[len]; ++len ) | 1341 ; |
1538 » » ; | 1342 |
1539 | 1343 return yy_scan_bytes(yy_str, len); |
1540 » return yy_scan_bytes( yy_str, len ); | 1344 } |
1541 » } | 1345 #endif |
1542 #endif | |
1543 | |
1544 | 1346 |
1545 #ifndef YY_NO_SCAN_BYTES | 1347 #ifndef YY_NO_SCAN_BYTES |
1546 #ifdef YY_USE_PROTOS | 1348 #ifdef YY_USE_PROTOS |
1547 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) | 1349 YY_BUFFER_STATE yy_scan_bytes(yyconst char *bytes, int len) |
1548 #else | 1350 #else |
1549 YY_BUFFER_STATE yy_scan_bytes( bytes, len ) | 1351 YY_BUFFER_STATE yy_scan_bytes(bytes, len) yyconst char *bytes; |
1550 yyconst char *bytes; | |
1551 int len; | 1352 int len; |
1552 #endif | 1353 #endif |
1553 » { | 1354 { |
1554 » YY_BUFFER_STATE b; | 1355 YY_BUFFER_STATE b; |
1555 » char *buf; | 1356 char *buf; |
1556 » yy_size_t n; | 1357 yy_size_t n; |
1557 » int i; | 1358 int i; |
1558 | 1359 |
1559 » /* Get memory for full buffer, including space for trailing EOB's. */ | 1360 /* Get memory for full buffer, including space for trailing EOB's. */ |
1560 » n = len + 2; | 1361 n = len + 2; |
1561 » buf = (char *) yy_flex_alloc( n ); | 1362 buf = (char *)yy_flex_alloc(n); |
1562 » if ( ! buf ) | 1363 if (!buf) YY_FATAL_ERROR("out of dynamic memory in yy_scan_bytes()"); |
1563 » » YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); | 1364 |
1564 | 1365 for (i = 0; i < len; ++i) buf[i] = bytes[i]; |
1565 » for ( i = 0; i < len; ++i ) | 1366 |
1566 » » buf[i] = bytes[i]; | 1367 buf[len] = buf[len + 1] = YY_END_OF_BUFFER_CHAR; |
1567 | 1368 |
1568 » buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; | 1369 b = yy_scan_buffer(buf, n); |
1569 | 1370 if (!b) YY_FATAL_ERROR("bad buffer in yy_scan_bytes()"); |
1570 » b = yy_scan_buffer( buf, n ); | 1371 |
1571 » if ( ! b ) | 1372 /* It's okay to grow etc. this buffer, and we should throw it |
1572 » » YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); | 1373 * away when we're done. |
1573 | 1374 */ |
1574 » /* It's okay to grow etc. this buffer, and we should throw it | 1375 b->yy_is_our_buffer = 1; |
1575 » * away when we're done. | 1376 |
1576 » */ | 1377 return b; |
1577 » b->yy_is_our_buffer = 1; | 1378 } |
1578 | 1379 #endif |
1579 » return b; | |
1580 » } | |
1581 #endif | |
1582 | |
1583 | 1380 |
1584 #ifndef YY_NO_PUSH_STATE | 1381 #ifndef YY_NO_PUSH_STATE |
1585 #ifdef YY_USE_PROTOS | 1382 #ifdef YY_USE_PROTOS |
1586 static void yy_push_state( int new_state ) | 1383 static void yy_push_state(int new_state) |
1587 #else | 1384 #else |
1588 static void yy_push_state( new_state ) | 1385 static void yy_push_state(new_state) int new_state; |
1589 int new_state; | 1386 #endif |
1590 #endif | 1387 { |
1591 » { | 1388 if (yy_start_stack_ptr >= yy_start_stack_depth) { |
1592 » if ( yy_start_stack_ptr >= yy_start_stack_depth ) | 1389 yy_size_t new_size; |
1593 » » { | 1390 |
1594 » » yy_size_t new_size; | 1391 yy_start_stack_depth += YY_START_STACK_INCR; |
1595 | 1392 new_size = yy_start_stack_depth * sizeof(int); |
1596 » » yy_start_stack_depth += YY_START_STACK_INCR; | 1393 |
1597 » » new_size = yy_start_stack_depth * sizeof( int ); | 1394 if (!yy_start_stack) |
1598 | 1395 yy_start_stack = (int *)yy_flex_alloc(new_size); |
1599 » » if ( ! yy_start_stack ) | 1396 |
1600 » » » yy_start_stack = (int *) yy_flex_alloc( new_size ); | 1397 else |
1601 | 1398 yy_start_stack = (int *)yy_flex_realloc((void *)yy_start_stack, new_size); |
1602 » » else | 1399 |
1603 » » » yy_start_stack = (int *) yy_flex_realloc( | 1400 if (!yy_start_stack) |
1604 » » » » » (void *) yy_start_stack, new_size ); | 1401 YY_FATAL_ERROR("out of memory expanding start-condition stack"); |
1605 | 1402 } |
1606 » » if ( ! yy_start_stack ) | 1403 |
1607 » » » YY_FATAL_ERROR( | 1404 yy_start_stack[yy_start_stack_ptr++] = YY_START; |
1608 » » » "out of memory expanding start-condition stack" ); | 1405 |
1609 » » } | 1406 BEGIN(new_state); |
1610 | 1407 } |
1611 » yy_start_stack[yy_start_stack_ptr++] = YY_START; | 1408 #endif |
1612 | |
1613 » BEGIN(new_state); | |
1614 » } | |
1615 #endif | |
1616 | |
1617 | 1409 |
1618 #ifndef YY_NO_POP_STATE | 1410 #ifndef YY_NO_POP_STATE |
1619 static void yy_pop_state() | 1411 static void yy_pop_state() { |
1620 » { | 1412 if (--yy_start_stack_ptr < 0) |
1621 » if ( --yy_start_stack_ptr < 0 ) | 1413 YY_FATAL_ERROR("start-condition stack underflow"); |
1622 » » YY_FATAL_ERROR( "start-condition stack underflow" ); | 1414 |
1623 | 1415 BEGIN(yy_start_stack[yy_start_stack_ptr]); |
1624 » BEGIN(yy_start_stack[yy_start_stack_ptr]); | 1416 } |
1625 » } | 1417 #endif |
1626 #endif | |
1627 | |
1628 | 1418 |
1629 #ifndef YY_NO_TOP_STATE | 1419 #ifndef YY_NO_TOP_STATE |
1630 static int yy_top_state() | 1420 static int yy_top_state() { return yy_start_stack[yy_start_stack_ptr - 1]; } |
1631 » { | |
1632 » return yy_start_stack[yy_start_stack_ptr - 1]; | |
1633 » } | |
1634 #endif | 1421 #endif |
1635 | 1422 |
1636 #ifndef YY_EXIT_FAILURE | 1423 #ifndef YY_EXIT_FAILURE |
1637 #define YY_EXIT_FAILURE 2 | 1424 #define YY_EXIT_FAILURE 2 |
1638 #endif | 1425 #endif |
1639 | 1426 |
1640 #ifdef YY_USE_PROTOS | 1427 #ifdef YY_USE_PROTOS |
1641 static void yy_fatal_error( yyconst char msg[] ) | 1428 static void yy_fatal_error(yyconst char msg[]) |
1642 #else | 1429 #else |
1643 static void yy_fatal_error( msg ) | 1430 static void yy_fatal_error(msg) char msg[]; |
1644 char msg[]; | 1431 #endif |
1645 #endif | 1432 { |
1646 » { | 1433 (void)fprintf(stderr, "%s\n", msg); |
1647 » (void) fprintf( stderr, "%s\n", msg ); | 1434 exit(YY_EXIT_FAILURE); |
1648 » exit( YY_EXIT_FAILURE ); | 1435 } |
1649 » } | |
1650 | |
1651 | |
1652 | 1436 |
1653 /* Redefine yyless() so it works in section 3 code. */ | 1437 /* Redefine yyless() so it works in section 3 code. */ |
1654 | 1438 |
1655 #undef yyless | 1439 #undef yyless |
1656 #define yyless(n) \ | 1440 #define yyless(n) \ |
1657 » do \ | 1441 do { \ |
1658 » » { \ | 1442 /* Undo effects of setting up yytext. */ \ |
1659 » » /* Undo effects of setting up yytext. */ \ | 1443 yytext[yyleng] = yy_hold_char; \ |
1660 » » yytext[yyleng] = yy_hold_char; \ | 1444 yy_c_buf_p = yytext + n; \ |
1661 » » yy_c_buf_p = yytext + n; \ | 1445 yy_hold_char = *yy_c_buf_p; \ |
1662 » » yy_hold_char = *yy_c_buf_p; \ | 1446 *yy_c_buf_p = '\0'; \ |
1663 » » *yy_c_buf_p = '\0'; \ | 1447 yyleng = n; \ |
1664 » » yyleng = n; \ | 1448 } while (0) |
1665 » » } \ | |
1666 » while ( 0 ) | |
1667 | |
1668 | 1449 |
1669 /* Internal utility routines. */ | 1450 /* Internal utility routines. */ |
1670 | 1451 |
1671 #ifndef yytext_ptr | 1452 #ifndef yytext_ptr |
1672 #ifdef YY_USE_PROTOS | 1453 #ifdef YY_USE_PROTOS |
1673 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) | 1454 static void yy_flex_strncpy(char *s1, yyconst char *s2, int n) |
1674 #else | 1455 #else |
1675 static void yy_flex_strncpy( s1, s2, n ) | 1456 static void yy_flex_strncpy(s1, s2, n) char *s1; |
1676 char *s1; | |
1677 yyconst char *s2; | 1457 yyconst char *s2; |
1678 int n; | 1458 int n; |
1679 #endif | 1459 #endif |
1680 » { | 1460 { |
1681 » register int i; | 1461 register int i; |
1682 » for ( i = 0; i < n; ++i ) | 1462 for (i = 0; i < n; ++i) s1[i] = s2[i]; |
1683 » » s1[i] = s2[i]; | 1463 } |
1684 » } | |
1685 #endif | 1464 #endif |
1686 | 1465 |
1687 #ifdef YY_NEED_STRLEN | 1466 #ifdef YY_NEED_STRLEN |
1688 #ifdef YY_USE_PROTOS | 1467 #ifdef YY_USE_PROTOS |
1689 static int yy_flex_strlen( yyconst char *s ) | 1468 static int yy_flex_strlen(yyconst char *s) |
1690 #else | 1469 #else |
1691 static int yy_flex_strlen( s ) | 1470 static int yy_flex_strlen(s) yyconst char *s; |
1692 yyconst char *s; | 1471 #endif |
1693 #endif | 1472 { |
1694 » { | 1473 register int n; |
1695 » register int n; | 1474 for (n = 0; s[n]; ++n) |
1696 » for ( n = 0; s[n]; ++n ) | 1475 ; |
1697 » » ; | 1476 |
1698 | 1477 return n; |
1699 » return n; | 1478 } |
1700 » } | 1479 #endif |
1701 #endif | 1480 |
1702 | 1481 #ifdef YY_USE_PROTOS |
1703 | 1482 static void *yy_flex_alloc(yy_size_t size) |
1704 #ifdef YY_USE_PROTOS | 1483 #else |
1705 static void *yy_flex_alloc( yy_size_t size ) | 1484 static void *yy_flex_alloc(size) yy_size_t size; |
1706 #else | 1485 #endif |
1707 static void *yy_flex_alloc( size ) | 1486 { |
| 1487 return (void *)malloc(size); |
| 1488 } |
| 1489 |
| 1490 #ifdef YY_USE_PROTOS |
| 1491 static void *yy_flex_realloc(void *ptr, yy_size_t size) |
| 1492 #else |
| 1493 static void *yy_flex_realloc(ptr, size) void *ptr; |
1708 yy_size_t size; | 1494 yy_size_t size; |
1709 #endif | 1495 #endif |
1710 » { | 1496 { |
1711 » return (void *) malloc( size ); | 1497 /* The cast to (char *) in the following accommodates both |
1712 » } | 1498 * implementations that use char* generic pointers, and those |
1713 | 1499 * that use void* generic pointers. It works with the latter |
1714 #ifdef YY_USE_PROTOS | 1500 * because both ANSI C and C++ allow castless assignment from |
1715 static void *yy_flex_realloc( void *ptr, yy_size_t size ) | 1501 * any pointer type to void*, and deal with argument conversions |
1716 #else | 1502 * as though doing an assignment. |
1717 static void *yy_flex_realloc( ptr, size ) | 1503 */ |
1718 void *ptr; | 1504 return (void *)realloc((char *)ptr, size); |
1719 yy_size_t size; | 1505 } |
1720 #endif | 1506 |
1721 » { | 1507 #ifdef YY_USE_PROTOS |
1722 » /* The cast to (char *) in the following accommodates both | 1508 static void yy_flex_free(void *ptr) |
1723 » * implementations that use char* generic pointers, and those | 1509 #else |
1724 » * that use void* generic pointers. It works with the latter | 1510 static void yy_flex_free(ptr) void *ptr; |
1725 » * because both ANSI C and C++ allow castless assignment from | 1511 #endif |
1726 » * any pointer type to void*, and deal with argument conversions | 1512 { |
1727 » * as though doing an assignment. | 1513 free(ptr); |
1728 » */ | 1514 } |
1729 » return (void *) realloc( (char *) ptr, size ); | |
1730 » } | |
1731 | |
1732 #ifdef YY_USE_PROTOS | |
1733 static void yy_flex_free( void *ptr ) | |
1734 #else | |
1735 static void yy_flex_free( ptr ) | |
1736 void *ptr; | |
1737 #endif | |
1738 » { | |
1739 » free( ptr ); | |
1740 » } | |
1741 | 1515 |
1742 #if YY_MAIN | 1516 #if YY_MAIN |
1743 int main() | 1517 int main() { |
1744 » { | 1518 yylex(); |
1745 » yylex(); | 1519 return 0; |
1746 » return 0; | 1520 } |
1747 » } | |
1748 #endif | 1521 #endif |
1749 #line 144 "crlgen_lex_orig.l" | 1522 #line 144 "crlgen_lex_orig.l" |
1750 | 1523 |
1751 #include "prlock.h" | 1524 #include "prlock.h" |
1752 | 1525 |
1753 static PRLock *parserInvocationLock; | 1526 static PRLock *parserInvocationLock; |
1754 | 1527 |
1755 void CRLGEN_InitCrlGenParserLock() | 1528 void CRLGEN_InitCrlGenParserLock() { parserInvocationLock = PR_NewLock(); } |
1756 { | 1529 |
1757 parserInvocationLock = PR_NewLock(); | 1530 void CRLGEN_DestroyCrlGenParserLock() { PR_DestroyLock(parserInvocationLock); } |
1758 } | 1531 |
1759 | 1532 SECStatus CRLGEN_StartCrlGen(CRLGENGeneratorData *parserCtlData) { |
1760 void CRLGEN_DestroyCrlGenParserLock() | 1533 SECStatus rv; |
1761 { | 1534 |
1762 PR_DestroyLock(parserInvocationLock); | 1535 PR_Lock(parserInvocationLock); |
1763 } | 1536 |
1764 | 1537 parserStatus = SECSuccess; |
1765 | 1538 parserData = parserCtlData; |
1766 SECStatus CRLGEN_StartCrlGen(CRLGENGeneratorData *parserCtlData) | 1539 src = parserCtlData->src; |
1767 { | 1540 |
1768 SECStatus rv; | 1541 rv = yylex(); |
1769 | 1542 |
1770 PR_Lock(parserInvocationLock); | 1543 PR_Unlock(parserInvocationLock); |
1771 | 1544 |
1772 parserStatus = SECSuccess; | 1545 return rv; |
1773 parserData = parserCtlData; | 1546 } |
1774 src = parserCtlData->src; | 1547 |
1775 | 1548 int yywrap() { return 1; } |
1776 rv = yylex(); | |
1777 | |
1778 PR_Unlock(parserInvocationLock); | |
1779 | |
1780 return rv; | |
1781 } | |
1782 | |
1783 int yywrap() {return 1;} | |
OLD | NEW |