Subversion Repositories Vertical

Rev

Blame | Last modification | View Log | Download | RSS feed

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