OSDN Git Service

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