## modules/up/src/rpsl/rpsl/object_log.l.cc

/* [<][>][^][v][top][bottom][index][help] */

## FUNCTIONS

This source file includes following functions.

1. YY_PROTO
2. YY_PROTO
3. YY_SC_TO_UI
4. YY_STATE_EOF
5. yyless
6. unput
7. yy_set_interactive
8. yy_set_bol
9. YY_AT_BOL
10. yymore
11. YYLESS
12. YY_INPUT
13. yyterminate
14. YY_FATAL_ERROR
15. yy_get_next_buffer
16. yy_get_previous_state
17. yy_try_NUL_trans
18. yyunput
19. yyinput
20. yyrestart
21. yy_switch_to_buffer
22. yy_load_buffer_state
23. yy_create_buffer
24. yy_delete_buffer
25. yy_init_buffer
26. yy_flush_buffer
27. yy_scan_buffer
28. yy_scan_string
29. yy_scan_bytes
30. yy_push_state
31. yy_pop_state
32. yy_top_state
33. yy_fatal_error
34. yyless
35. yy_flex_strncpy
36. yy_flex_strlen
37. yy_flex_alloc
38. yy_flex_realloc
39. yy_flex_free
40. main
41. objectLog

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

/* [<][>][^][v][top][bottom][index][help] */