home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2002 April / pcpro0402.iso / essentials / graphics / Gimp / gimp-src-20001226.exe / src / gimp / plug-ins / imagemap / imap_cern_lex.c < prev    next >
Encoding:
C/C++ Source or Header  |  2000-05-22  |  44.2 KB  |  1,708 lines

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