Subversion Repositories Vertical

Rev

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

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