home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / pstoedit.zip / source.zip / pstoedit.2.50 / src / lexyy.cpp < prev    next >
C/C++ Source or Header  |  1996-11-28  |  77KB  |  2,430 lines

  1. /* A lexical scanner generated by flex */
  2.  
  3. /* Scanner skeleton version:
  4.  * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.89 96/05/25 21:02:21 vern Exp $
  5.  */
  6.  
  7. #define FLEX_SCANNER
  8. #define YY_FLEX_MAJOR_VERSION 2
  9. #define YY_FLEX_MINOR_VERSION 5
  10.  
  11. #include <stdio.h>
  12.  
  13.  
  14. /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
  15. #ifdef c_plusplus
  16. #ifndef __cplusplus
  17. #define __cplusplus
  18. #endif
  19. #endif
  20.  
  21.  
  22. #ifdef __cplusplus
  23.  
  24. #include <stdlib.h>
  25. #include <unistd.h>
  26.  
  27. /* Use prototypes in function declarations. */
  28. #define YY_USE_PROTOS
  29.  
  30. /* The "const" storage-class-modifier is valid. */
  31. #define YY_USE_CONST
  32.  
  33. #else    /* ! __cplusplus */
  34.  
  35. #if __STDC__
  36.  
  37. #define YY_USE_PROTOS
  38. #define YY_USE_CONST
  39.  
  40. #endif    /* __STDC__ */
  41. #endif    /* ! __cplusplus */
  42.  
  43. #ifdef __TURBOC__
  44.  #pragma warn -rch
  45.  #pragma warn -use
  46. #include <io.h>
  47. #include <stdlib.h>
  48. #define YY_USE_CONST
  49. #define YY_USE_PROTOS
  50. #endif
  51.  
  52. #ifdef YY_USE_CONST
  53. #define yyconst const
  54. #else
  55. #define yyconst
  56. #endif
  57.  
  58.  
  59. #ifdef YY_USE_PROTOS
  60. #define YY_PROTO(proto) proto
  61. #else
  62. #define YY_PROTO(proto) ()
  63. #endif
  64.  
  65. /* Returned upon end-of-file. */
  66. #define YY_NULL 0
  67.  
  68. /* Promotes a possibly negative, possibly signed char to an unsigned
  69.  * integer for use as an array index.  If the signed char is negative,
  70.  * we want to instead treat it as an 8-bit unsigned char, hence the
  71.  * double cast.
  72.  */
  73. #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
  74.  
  75. /* Enter a start condition.  This macro really ought to take a parameter,
  76.  * but we do it the disgusting crufty way forced on us by the ()-less
  77.  * definition of BEGIN.
  78.  */
  79. #define BEGIN yy_start = 1 + 2 *
  80.  
  81. /* Translate the current start state into a value that can be later handed
  82.  * to BEGIN to return to the state.  The YYSTATE alias is for lex
  83.  * compatibility.
  84.  */
  85. #define YY_START ((yy_start - 1) / 2)
  86. #define YYSTATE YY_START
  87.  
  88. /* Action number for EOF rule of a given start state. */
  89. #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
  90.  
  91. /* Special action meaning "start processing a new file". */
  92. #define YY_NEW_FILE yyrestart( yyin )
  93.  
  94. #define YY_END_OF_BUFFER_CHAR 0
  95.  
  96. /* Size of default input buffer. */
  97. #define YY_BUF_SIZE 16384
  98.  
  99. typedef struct yy_buffer_state *YY_BUFFER_STATE;
  100.  
  101. extern int yyleng;
  102. extern FILE *yyin, *yyout;
  103.  
  104. #define EOB_ACT_CONTINUE_SCAN 0
  105. #define EOB_ACT_END_OF_FILE 1
  106. #define EOB_ACT_LAST_MATCH 2
  107.  
  108. /* The funky do-while in the following #define is used to turn the definition
  109.  * int a single C statement (which needs a semi-colon terminator).  This
  110.  * avoids problems with code like:
  111.  *
  112.  *     if ( condition_holds )
  113.  *        yyless( 5 );
  114.  *    else
  115.  *        do_something_else();
  116.  *
  117.  * Prior to using the do-while the compiler would get upset at the
  118.  * "else" because it interpreted the "if" statement as being all
  119.  * done when it reached the ';' after the yyless() call.
  120.  */
  121.  
  122. /* Return all but the first 'n' matched characters back to the input stream. */
  123.  
  124. #define yyless(n) \
  125.     do \
  126.         { \
  127.         /* Undo effects of setting up yytext. */ \
  128.         *yy_cp = yy_hold_char; \
  129.         YY_RESTORE_YY_MORE_OFFSET \
  130.         yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
  131.         YY_DO_BEFORE_ACTION; /* set up yytext again */ \
  132.         } \
  133.     while ( 0 )
  134.  
  135. #define unput(c) yyunput( c, yytext_ptr )
  136.  
  137. /* The following is because we cannot portably get our hands on size_t
  138.  * (without autoconf's help, which isn't available because we want
  139.  * flex-generated scanners to compile on their own).
  140.  */
  141. typedef unsigned int yy_size_t;
  142.  
  143.  
  144. struct yy_buffer_state
  145.     {
  146.     FILE *yy_input_file;
  147.  
  148.     char *yy_ch_buf;        /* input buffer */
  149.     char *yy_buf_pos;        /* current position in input buffer */
  150.  
  151.     /* Size of input buffer in bytes, not including room for EOB
  152.      * characters.
  153.      */
  154.     yy_size_t yy_buf_size;
  155.  
  156.     /* Number of characters read into yy_ch_buf, not including EOB
  157.      * characters.
  158.      */
  159.     int yy_n_chars;
  160.  
  161.     /* Whether we "own" the buffer - i.e., we know we created it,
  162.      * and can realloc() it to grow it, and should free() it to
  163.      * delete it.
  164.      */
  165.     int yy_is_our_buffer;
  166.  
  167.     /* Whether this is an "interactive" input source; if so, and
  168.      * if we're using stdio for input, then we want to use getc()
  169.      * instead of fread(), to make sure we stop fetching input after
  170.      * each newline.
  171.      */
  172.     int yy_is_interactive;
  173.  
  174.     /* Whether we're considered to be at the beginning of a line.
  175.      * If so, '^' rules will be active on the next match, otherwise
  176.      * not.
  177.      */
  178.     int yy_at_bol;
  179.  
  180.     /* Whether to try to fill the input buffer when we reach the
  181.      * end of it.
  182.      */
  183.     int yy_fill_buffer;
  184.  
  185.     int yy_buffer_status;
  186. #define YY_BUFFER_NEW 0
  187. #define YY_BUFFER_NORMAL 1
  188.     /* When an EOF's been seen but there's still some text to process
  189.      * then we mark the buffer as YY_EOF_PENDING, to indicate that we
  190.      * shouldn't try reading from the input source any more.  We might
  191.      * still have a bunch of tokens to match, though, because of
  192.      * possible backing-up.
  193.      *
  194.      * When we actually see the EOF, we change the status to "new"
  195.      * (via yyrestart()), so that the user can continue scanning by
  196.      * just pointing yyin at a new input file.
  197.      */
  198. #define YY_BUFFER_EOF_PENDING 2
  199.     };
  200.  
  201. static YY_BUFFER_STATE yy_current_buffer = 0;
  202.  
  203. /* We provide macros for accessing buffer states in case in the
  204.  * future we want to put the buffer states in a more general
  205.  * "scanner state".
  206.  */
  207. #define YY_CURRENT_BUFFER yy_current_buffer
  208.  
  209.  
  210. /* yy_hold_char holds the character lost when yytext is formed. */
  211. static char yy_hold_char;
  212.  
  213. static int yy_n_chars;        /* number of characters read into yy_ch_buf */
  214.  
  215.  
  216. int yyleng;
  217.  
  218. /* Points to current character in buffer. */
  219. static char *yy_c_buf_p = (char *) 0;
  220. static int yy_init = 1;        /* whether we need to initialize */
  221. static int yy_start = 0;    /* start state number */
  222.  
  223. /* Flag which is used to allow yywrap()'s to do buffer switches
  224.  * instead of setting up a fresh yyin.  A bit of a hack ...
  225.  */
  226. static int yy_did_buffer_switch_on_eof;
  227.  
  228. void yyrestart YY_PROTO(( FILE *input_file ));
  229.  
  230. void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
  231. void yy_load_buffer_state YY_PROTO(( void ));
  232. YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
  233. void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
  234. void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
  235. void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
  236. #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
  237.  
  238. YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
  239. YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *str ));
  240. YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
  241.  
  242. static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
  243. static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
  244. static void yy_flex_free YY_PROTO(( void * ));
  245.  
  246. #define yy_new_buffer yy_create_buffer
  247.  
  248. #define yy_set_interactive(is_interactive) \
  249.     { \
  250.     if ( ! yy_current_buffer ) \
  251.         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
  252.     yy_current_buffer->yy_is_interactive = is_interactive; \
  253.     }
  254.  
  255. #define yy_set_bol(at_bol) \
  256.     { \
  257.     if ( ! yy_current_buffer ) \
  258.         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
  259.     yy_current_buffer->yy_at_bol = at_bol; \
  260.     }
  261.  
  262. #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
  263.  
  264. typedef unsigned char YY_CHAR;
  265. FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
  266. typedef int yy_state_type;
  267. extern char *yytext;
  268. #define yytext_ptr yytext
  269.  
  270. static yy_state_type yy_get_previous_state YY_PROTO(( void ));
  271. static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
  272. static int yy_get_next_buffer YY_PROTO(( void ));
  273. static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
  274.  
  275. /* Done after the current pattern has been matched and before the
  276.  * corresponding action - sets up yytext.
  277.  */
  278. #define YY_DO_BEFORE_ACTION \
  279.     yytext_ptr = yy_bp; \
  280.     yyleng = (int) (yy_cp - yy_bp); \
  281.     yy_hold_char = *yy_cp; \
  282.     *yy_cp = '\0'; \
  283.     yy_c_buf_p = yy_cp;
  284.  
  285. #define YY_NUM_RULES 35
  286. #define YY_END_OF_BUFFER 36
  287. static yyconst short int yy_accept[610] =
  288.     {   0,
  289.         0,    0,    0,    0,   36,   26,   26,   26,   26,   26,
  290.        26,    1,   26,   26,   34,   34,   34,   34,   34,    1,
  291.        34,   34,   34,   34,   34,   34,    0,    0,    0,    0,
  292.         0,    0,    0,    0,    0,   14,    0,    0,    0,    0,
  293.         1,    1,    0,    0,    0,    0,    0,    0,    0,    0,
  294.         0,    0,    1,    1,    0,    0,    0,    0,    0,    0,
  295.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  296.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  297.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  298.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  299.  
  300.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  301.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  302.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  303.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  304.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  305.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  306.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  307.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  308.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  309.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  310.  
  311.         0,    0,    0,    0,    0,   32,    0,    0,    0,    0,
  312.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  313.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  314.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  315.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  316.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  317.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  318.         0,    0,    0,    0,    0,    0,    0,    0,    0,   13,
  319.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  320.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  321.  
  322.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  323.         0,    0,    0,    0,   33,   28,   27,    0,    0,    0,
  324.         0,   31,    0,    0,    0,   23,    0,    0,    0,    0,
  325.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  326.         0,    0,    0,    0,    0,    3,    0,    0,    0,    0,
  327.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  328.         0,    0,    0,    0,    0,    0,    0,   29,    0,    0,
  329.         0,    0,    0,    0,    0,    0,   17,    0,    0,    0,
  330.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  331.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  332.  
  333.         0,    2,    0,    0,    0,    0,    0,    0,    0,    0,
  334.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  335.         4,    0,    0,    0,    0,    0,    0,    0,    0,    7,
  336.         0,    0,    0,    0,    0,   14,    0,    0,    0,    0,
  337.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  338.         0,    0,    0,    0,    0,    0,   30,    0,    0,    0,
  339.         0,    0,    0,    0,   24,    0,    0,    0,    0,    0,
  340.         0,    0,    4,    0,    0,    4,    0,    0,    0,    0,
  341.        18,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  342.         0,    0,    0,    0,    0,    0,    0,   25,    0,    4,
  343.  
  344.         0,    0,    6,    0,    0,    0,    0,    0,    0,    0,
  345.         0,   20,    0,   16,    0,    0,    0,    0,    0,    0,
  346.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  347.        11,    0,    0,    0,    0,    0,   19,    0,    0,    0,
  348.         0,    0,    0,    0,    0,    0,    0,    0,    5,    0,
  349.         0,    0,   12,    0,   22,    0,   21,    0,    0,    0,
  350.         0,    0,    0,    0,    0,   10,    0,    0,    0,    0,
  351.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  352.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  353.         0,    0,    0,    8,    0,    0,    0,    0,   15,    0,
  354.  
  355.         0,    0,    0,    0,    8,    0,    0,    9,    0
  356.     } ;
  357.  
  358. static yyconst int yy_ec[256] =
  359.     {   0,
  360.         1,    1,    1,    1,    1,    1,    1,    1,    1,    2,
  361.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  362.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  363.         1,    3,    1,    1,    1,    1,    4,    1,    1,    5,
  364.         6,    1,    1,    1,    7,    8,    1,    9,    9,    9,
  365.         9,    9,    9,    9,    9,    9,    9,    1,    1,    1,
  366.         1,    1,    1,    1,    1,    1,    1,    1,    1,   10,
  367.        11,    1,    1,    1,    1,    1,   12,   13,    1,   14,
  368.         1,    1,   15,    1,    1,    1,   16,    1,    1,    1,
  369.         1,    1,    1,    1,    1,    1,   17,   18,   19,   20,
  370.  
  371.        21,   22,   23,   24,   25,    1,   26,   27,   28,   29,
  372.        30,   31,    1,   32,   33,   34,   35,   36,   37,    1,
  373.        38,   39,    1,    1,    1,    1,    1,    1,    1,    1,
  374.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  375.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  376.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  377.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  378.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  379.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  380.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  381.  
  382.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  383.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  384.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  385.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  386.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  387.         1,    1,    1,    1,    1
  388.     } ;
  389.  
  390. static yyconst int yy_meta[40] =
  391.     {   0,
  392.         1,    2,    1,    1,    1,    1,    1,    1,    1,    1,
  393.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  394.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  395.         1,    1,    1,    1,    1,    1,    1,    1,    1
  396.     } ;
  397.  
  398. static yyconst short int yy_base[619] =
  399.     {   0,
  400.         0,   32,   64,   96,  476,  466, 1594,  127,    8,    9,
  401.        10,   17,   11,   24,  464, 1594,   13,   19,   44,   48,
  402.        27,   20,    3,   39,   28,   56,  395,   79,   71,   46,
  403.        60,   57,   67,   75,   73, 1594,  160,   78,  103,  105,
  404.       119,  130,   76,   99,   86,   91,  387,  111,  132,  129,
  405.       143,  192,  145,  164,  138,  144,  152,   92,  128,  161,
  406.       166,  167,  172,  174,  175,  176,  177,  181,  185,  187,
  407.       224,  200,  217,  202,  226,  218,  235,  242,  266,  219,
  408.       205,  248,  180,  230,  236,  256,  263,  298,  274,  271,
  409.       276,  282,  228,  246,  212,  264,  290,  291,  292,  241,
  410.  
  411.       287,  315,  283,  317,  295,  183,  319,  333,  335,  337,
  412.       340,  343,  345,  347,  350,  356,  358,  360,  365,  371,
  413.       299,  373,  377,  320,  348,  372,  378,  366,  379,  381,
  414.       383,  385,  386,  394,  398,  406,  410,  414,  418,  426,
  415.       428,  430,  434,  436,  440,  389,  401,  314,  442,  415,
  416.       421,  423,  431,  443,  449,  448,  455,  450,  457,  451,
  417.       458,  456,  461,  478,  480,  485,  489,  491,  493,  495,
  418.       497,  502,  504,  508,  506,  517,  519,  526,  527,  532,
  419.       459,  483,  512,  500,  522,  536,  537,  538,  539,  541,
  420.       545,  559,  561,  563,  566,  569,  571,  573,  578,  580,
  421.  
  422.       582,  584,  547,  567,  585, 1594,  588,  589,  592,  593,
  423.       603,  594,  596,  600,  468,  605,  606,  601,  604,  626,
  424.       630,  633,  636,  638,  640,  645,  642,  647,  649,  654,
  425.       652,  660,  656,  661,  663,  620,  675,  668,  669,  676,
  426.       677,  540,  682,  683,  684,  685,  687,  691,  698,  700,
  427.       705,  707,  710,  712,  719,  723,  729,  726,  688,  717,
  428.       731,  733,  735,  721,  738,  742,  713,  746,  748,  751,
  429.       750,  753,  755,  754,  760,  762,  764,  766,  771, 1594,
  430.       783,  785,  787,  789,  792,  795,  797,  799,  802,  807,
  431.       800,  815,  809,  767,  757,  820,  801,  813,  814,  821,
  432.  
  433.       823,  834,  826,  838,  848,  850,  856,  860,  864,  866,
  434.       868,  870,  822,  873, 1594, 1594, 1594,  839,  845,  874,
  435.       857, 1594,  875,  876,  877, 1594,  892,  878,  894,  896,
  436.       900,  903,  905,  911,  915,  917,  923,  926,  928,  932,
  437.       937,  886,  940,  944,  945, 1594,  918,  924,  920,  933,
  438.       939,  956,  958,  941,  960,  968,  974,  976,  978,  981,
  439.       983,  987,  989,  991,  994,  999,  979, 1594,  984,  995,
  440.       996, 1001, 1007,  251,  971,  608, 1594, 1008, 1020, 1023,
  441.      1028, 1030, 1032, 1034, 1036, 1038, 1042, 1044, 1048, 1051,
  442.      1053, 1058, 1060, 1065, 1066,  249,  253, 1039,  880, 1059,
  443.  
  444.      1054, 1594,  964, 1071, 1073, 1077, 1085, 1098, 1100, 1102,
  445.      1104, 1106, 1108, 1112, 1114, 1080, 1092, 1078, 1082, 1088,
  446.      1115, 1121, 1122, 1124, 1128, 1130, 1132, 1136, 1142, 1594,
  447.      1147, 1152, 1154, 1156, 1158, 1594, 1167,  327, 1165, 1169,
  448.      1173, 1144, 1175, 1171, 1149, 1010, 1179, 1177, 1183, 1195,
  449.      1188, 1197, 1199, 1211, 1213, 1216, 1594, 1186, 1220, 1191,
  450.      1200, 1193, 1224, 1217, 1594, 1226, 1232, 1234, 1239, 1241,
  451.      1244, 1246,    0, 1248, 1250, 1254, 1253, 1260, 1251, 1262,
  452.      1594, 1264, 1266,  882, 1252, 1272, 1276, 1289, 1291, 1293,
  453.      1295, 1297, 1299, 1303, 1283, 1309, 1286, 1594, 1278, 1314,
  454.  
  455.      1319, 1321, 1594, 1325, 1327, 1329, 1332, 1335, 1337, 1338,
  456.      1315, 1594, 1348, 1594, 1280, 1317, 1353, 1360, 1362, 1364,
  457.      1366, 1368, 1371, 1374, 1306, 1357, 1381, 1383, 1385, 1388,
  458.      1594, 1390, 1394, 1397, 1404, 1396, 1594, 1406, 1398, 1411,
  459.      1419, 1421, 1423, 1426, 1428, 1433, 1322, 1435, 1594, 1437,
  460.      1440, 1442, 1594, 1443, 1594, 1430, 1594, 1445, 1448, 1450,
  461.      1452, 1454, 1343, 1456,  174, 1594, 1459, 1463, 1375, 1465,
  462.      1468,  170, 1471, 1377, 1477, 1479, 1481, 1485, 1464, 1474,
  463.      1493, 1497, 1484, 1500, 1503, 1509, 1513, 1514, 1516, 1519,
  464.      1522, 1526, 1528, 1594, 1531, 1533, 1537, 1539, 1594, 1541,
  465.  
  466.      1547, 1550, 1554, 1556, 1594, 1558, 1561, 1594, 1594, 1581,
  467.      1583,  142, 1585,   16,    0, 1587, 1589, 1591
  468.     } ;
  469.  
  470. static yyconst short int yy_def[619] =
  471.     {   0,
  472.       610,  610,  611,  611,  609,  612,  609,  612,  613,  614,
  473.       612,  612,  612,  612,  615,  609,  615,  616,  615,  615,
  474.       615,  615,  615,  615,  615,  615,  612,  612,  612,  612,
  475.       612,  612,  612,  612,  613,  609,  617,  614,  614,  614,
  476.       612,  612,  612,  612,  612,  612,  615,  615,  615,  615,
  477.       616,  618,  615,  615,  615,  615,  615,  615,  615,  615,
  478.       615,  615,  612,  612,  612,  612,  612,  612,  613,  617,
  479.       617,  617,  617,  617,  617,  614,  614,  614,  614,  612,
  480.       612,  612,  612,  615,  615,  616,  618,  618,  618,  618,
  481.       618,  618,  615,  615,  615,  615,  615,  615,  615,  615,
  482.  
  483.       612,  612,  612,  612,  612,  612,  613,  613,  613,  617,
  484.       617,  617,  617,  617,  617,  617,  617,  617,  617,  617,
  485.       614,  614,  614,  614,  612,  612,  612,  612,  612,  612,
  486.       612,  615,  615,  616,  616,  618,  618,  618,  618,  618,
  487.       618,  618,  618,  618,  618,  615,  615,  615,  615,  615,
  488.       615,  615,  615,  615,  615,  615,  612,  612,  612,  612,
  489.       612,  612,  613,  613,  613,  617,  617,  617,  617,  617,
  490.       617,  617,  617,  617,  617,  617,  617,  614,  614,  614,
  491.       614,  612,  612,  612,  612,  612,  612,  612,  615,  615,
  492.       616,  616,  618,  618,  618,  618,  618,  618,  618,  618,
  493.  
  494.       618,  618,  615,  615,  615,  609,  615,  615,  615,  615,
  495.       615,  615,  615,  612,  612,  612,  612,  612,  612,  613,
  496.       613,  613,  617,  617,  617,  617,  617,  617,  617,  617,
  497.       617,  617,  617,  614,  614,  614,  614,  612,  612,  612,
  498.       612,  612,  612,  612,  615,  615,  616,  616,  618,  618,
  499.       618,  618,  618,  618,  618,  618,  618,  618,  615,  615,
  500.       615,  615,  615,  615,  615,  615,  615,  615,  612,  612,
  501.       612,  612,  612,  612,  613,  613,  613,  617,  617,  609,
  502.       617,  617,  617,  617,  617,  617,  617,  617,  614,  614,
  503.       614,  614,  612,  612,  612,  612,  612,  612,  612,  615,
  504.  
  505.       615,  616,  616,  618,  618,  618,  618,  618,  618,  618,
  506.       618,  618,  615,  615,  609,  609,  609,  615,  615,  615,
  507.       615,  609,  612,  612,  612,  609,  612,  612,  613,  613,
  508.       613,  617,  617,  617,  617,  617,  617,  617,  617,  617,
  509.       617,  614,  614,  614,  614,  609,  612,  612,  612,  612,
  510.       612,  612,  612,  615,  615,  616,  616,  618,  618,  618,
  511.       618,  618,  618,  618,  618,  618,  615,  609,  615,  615,
  512.       615,  615,  615,  612,  612,  612,  609,  612,  613,  613,
  513.       613,  617,  617,  617,  617,  617,  617,  617,  617,  617,
  514.       617,  614,  614,  614,  614,  612,  612,  612,  612,  612,
  515.  
  516.       612,  609,  615,  616,  616,  618,  618,  618,  618,  618,
  517.       618,  618,  618,  618,  615,  615,  615,  615,  615,  615,
  518.       612,  612,  612,  612,  613,  613,  613,  617,  617,  609,
  519.       617,  617,  617,  617,  617,  609,  617,  614,  614,  614,
  520.       612,  612,  612,  612,  612,  612,  615,  616,  616,  618,
  521.       618,  618,  618,  618,  618,  618,  609,  615,  615,  615,
  522.       615,  615,  612,  612,  609,  613,  613,  617,  617,  617,
  523.       617,  617,   71,  617,  617,  614,  614,  614,  612,  612,
  524.       609,  612,  612,  612,  615,  616,  618,  618,  618,  618,
  525.       618,  618,  618,  615,  615,  615,  615,  609,  612,  613,
  526.  
  527.       613,  617,  609,  617,  617,  617,  617,  617,  614,  614,
  528.       612,  609,  612,  609,  612,  615,  616,  618,  618,  618,
  529.       618,  618,  618,  615,  615,  612,  613,  617,  617,  617,
  530.       609,  617,  617,  614,  614,  612,  609,  612,  615,  616,
  531.       618,  618,  618,  618,  618,  615,  612,  613,  609,  617,
  532.       617,  617,  609,  614,  609,  612,  609,  615,  616,  618,
  533.       618,  618,  612,  613,   71,  609,  617,  614,  612,  615,
  534.       616,   88,  618,  612,  613,  617,  617,  614,  612,  615,
  535.       616,  618,  618,  612,  613,  617,  617,  614,  612,  615,
  536.       616,  618,  618,  609,  613,  617,  617,  614,  609,  616,
  537.  
  538.       618,  618,  613,  617,  609,  616,  618,  609,    0,  609,
  539.       609,  609,  609,  609,  609,  609,  609,  609
  540.     } ;
  541.  
  542. static yyconst short int yy_nxt[1634] =
  543.     {   0,
  544.        47,    7,    8,    9,   10,   48,   11,   12,   12,   36,
  545.        37,   39,   28,   28,   40,   48,   38,   41,   41,   28,
  546.        36,   52,   48,   42,   42,   42,   28,   58,   13,   48,
  547.        48,   43,   14,    7,    8,    9,   10,   42,   11,   12,
  548.        12,   48,   44,   49,   45,   50,   48,   46,   28,   57,
  549.        48,   53,   53,   55,   54,   54,   54,   60,   48,   28,
  550.        13,   56,   28,   59,   14,   16,   17,   18,   54,   28,
  551.        19,   20,   20,   28,   36,   69,   61,   28,   28,   64,
  552.        39,   28,   21,   40,   22,   23,   66,   67,   28,   62,
  553.        24,   25,   65,   28,   48,   63,   26,   16,   17,   18,
  554.  
  555.        29,   28,   19,   20,   20,   39,   68,   79,   40,   31,
  556.        40,   33,   80,   48,   21,   81,   22,   23,   96,   82,
  557.        83,   28,   24,   25,   76,   42,   42,   42,   26,   28,
  558.        48,   48,   28,   77,   48,   78,   42,   42,   42,   42,
  559.        48,   49,   27,   50,   36,   86,   48,   48,   29,   85,
  560.        42,   54,   54,   54,   48,   30,   97,   31,   32,   33,
  561.        34,   36,   71,   48,   84,   54,   48,   93,   48,   48,
  562.        54,   54,   54,   95,   28,   94,   28,   28,   28,   28,
  563.        72,   73,   28,   28,   54,   28,   36,   69,   36,   71,
  564.        74,  582,   75,   36,   88,  576,   98,  106,  100,   99,
  565.  
  566.       101,   36,   71,   36,   71,  102,  107,   28,  103,  104,
  567.       105,  162,   89,   90,   48,  108,  131,  109,   36,   71,
  568.        39,   28,   91,   40,   92,   36,   71,   36,   71,  116,
  569.        48,  126,   48,  110,  118,  111,  148,   39,   48,  112,
  570.        40,  117,  121,   48,   39,  113,  119,   40,   48,  125,
  571.        28,  441,  114,  421,   74,   28,  115,   36,   86,  120,
  572.       146,  127,  123,  132,   36,   88,   48,  122,   39,  133,
  573.       156,   40,   36,   88,  128,   36,   88,   36,   88,  129,
  574.       130,  147,  124,   36,   88,   28,  134,   76,  135,   28,
  575.       149,  442,   48,   48,   48,  142,   77,   28,   78,   36,
  576.  
  577.        88,   39,  144,  141,   40,  152,  157,  136,  143,  137,
  578.       150,  151,  159,  138,  161,  145,   48,   28,  153,   28,
  579.        36,   69,   39,  154,  155,   40,  139,  178,   91,  476,
  580.       140,  158,   40,  160,   36,   69,   36,   69,   36,   71,
  581.       205,   36,   71,  163,   36,   71,   36,   71,   36,   71,
  582.        28,   36,   71,  166,  168,  165,  181,   36,   71,   36,
  583.        71,   36,   71,  169,  182,  164,   36,   71,   28,  170,
  584.       119,  167,   36,   71,   28,   39,  171,  172,   40,   39,
  585.        28,   28,   40,   28,  173,   28,  174,   48,   48,   48,
  586.       185,   48,  183,  175,  184,   36,   86,   28,  176,   36,
  587.  
  588.        86,  186,  177,   48,  187,  190,  179,   36,   88,  203,
  589.       180,   36,   88,  188,  189,   36,   88,   48,  192,   36,
  590.        88,  204,  193,   48,  195,   48,  191,   36,   88,   36,
  591.        88,   36,   88,   48,  196,   36,   88,   36,   88,  209,
  592.       194,   36,   88,  206,   48,   48,  144,  197,  207,  198,
  593.        48,   48,   28,   28,  208,  210,  199,   28,   28,   28,
  594.        28,   39,   36,   69,   40,  211,   48,  200,   28,  201,
  595.        28,  202,  212,  213,  218,  609,  214,  216,  215,   36,
  596.        69,   36,   69,  237,  217,   28,   36,   71,  219,  220,
  597.        36,   71,   36,   71,   36,   71,   36,   71,   36,   71,
  598.  
  599.       270,  225,   28,   36,   71,   36,   71,   36,   71,   36,
  600.        71,  221,  223,  222,   28,  224,  238,  226,   36,   71,
  601.        36,   71,  240,  174,   28,  227,  228,  230,   39,   39,
  602.       229,   40,   40,  239,   39,  231,  232,   40,   28,   28,
  603.        28,   48,   28,   48,  609,  234,   36,   86,  233,   48,
  604.       241,  236,  609,  242,  244,  609,  235,  246,  297,  245,
  605.        36,   86,   36,   88,   36,   88,  243,   36,   88,   48,
  606.        36,   88,   36,   88,   36,   88,  251,  259,  247,   36,
  607.        88,   36,   88,   36,   88,   36,   88,   48,  249,  250,
  608.        48,   48,  248,  252,   48,   48,   48,  254,   48,  253,
  609.  
  610.       260,  257,   28,   28,  255,   48,   28,   28,   28,  256,
  611.        28,  261,  609,  258,  264,  423,  268,  262,  263,  609,
  612.       266,  265,   39,  267,  271,   40,  272,   36,   69,  269,
  613.       274,   36,   69,  273,   36,   69,  291,   36,   71,   36,
  614.        71,  280,   71,   36,   71,  275,   36,   71,   36,   71,
  615.        36,   71,  277,   36,   71,   36,   71,   36,   71,  276,
  616.       278,   36,   71,   39,  279,   39,   40,  281,   40,  284,
  617.        28,   28,  286,  283,  282,  285,  287,   39,   28,   28,
  618.        40,  288,  289,  290,   28,   28,   48,   48,   36,   86,
  619.        48,  293,   36,   86,  292,  609,  295,  296,  294,   36,
  620.  
  621.        88,   36,   88,  300,  313,  299,  280,   88,   36,   88,
  622.       303,   36,   88,   36,   88,   48,  302,  301,  298,   48,
  623.        36,   88,  304,   48,   36,   88,  305,   36,   88,  306,
  624.        36,   88,  315,   48,  316,   48,  317,   48,  308,  309,
  625.        48,  318,  307,  310,   48,  311,  314,  322,   48,  321,
  626.        28,  312,   28,   28,  326,   28,   28,   28,  319,   28,
  627.       320,   36,   69,   36,   69,   36,   69,   36,   71,   28,
  628.       328,  348,   36,   71,  325,  609,  323,  324,  327,  609,
  629.       331,  329,  330,  333,   36,   71,   36,   71,   36,   71,
  630.        36,   71,  332,   36,   71,  347,   36,   71,   36,   71,
  631.  
  632.        36,   71,   39,   28,   39,   40,  334,   40,  337,   39,
  633.       346,   28,   40,  336,  339,   28,   28,   39,  335,  341,
  634.        40,  338,   28,   48,   48,   48,  343,   36,   86,  340,
  635.       351,  342,  344,  609,  353,   36,   86,  609,  349,   36,
  636.        88,   48,  357,  352,  609,  354,  355,   48,  345,   36,
  637.        88,   36,   88,  369,  356,  367,  350,   36,   88,   48,
  638.       359,   36,   88,  370,  358,   36,   88,   36,   88,   36,
  639.        88,   36,   88,  360,  368,   48,   48,   28,   28,   28,
  640.        28,  371,   28,  363,   28,  364,  362,  373,   39,  361,
  641.       366,   40,  375,  377,   28,   36,   69,   36,   69,  444,
  642.  
  643.       365,   36,   69,  372,   36,   71,   36,   71,  374,  515,
  644.       376,  378,   36,   71,  392,  380,   36,   71,   36,   71,
  645.        28,  383,   28,  379,   36,   71,   28,   36,   71,   36,
  646.        71,  385,  381,   36,   71,   28,  398,  386,   36,   71,
  647.       382,   28,   39,   48,  384,   40,   39,   39,  397,   40,
  648.        40,  396,  389,  387,  388,  390,  391,  399,   28,  402,
  649.        28,  377,   48,  609,  393,  400,   48,  394,  395,   36,
  650.        86,  447,  401,   28,  403,   36,   86,   36,   88,   36,
  651.        88,   48,   36,   88,   36,   88,   48,  404,   36,   88,
  652.        36,   88,   36,   88,  407,   36,   88,   48,   48,  409,
  653.  
  654.        36,   88,  415,   48,  422,  609,  405,  410,  416,   48,
  655.        28,  417,   28,  406,  408,  412,  609,  413,  414,  411,
  656.       418,   36,   69,  420,   36,   69,  484,  419,  424,   36,
  657.        69,   36,   71,   36,   71,  430,   71,   36,   71,   36,
  658.        71,   28,  428,   36,   71,   36,   71,  426,  425,   36,
  659.        71,  427,  436,   71,   36,   71,   28,  432,  433,  429,
  660.        39,   28,   39,   40,  431,   40,  377,   39,   39,  443,
  661.        40,   40,   36,   86,   36,   86,  609,  434,   36,   88,
  662.        48,  435,   48,  437,   48,  446,   36,   88,  445,  450,
  663.        48,  438,  609,  439,   48,  448,  449,  460,  440,  430,
  664.  
  665.        88,   36,   88,   36,   88,   36,   88,   36,   88,  436,
  666.        88,  461,  451,   36,   88,  457,   48,   28,  458,  462,
  667.       454,  453,  459,   28,   28,  465,   28,  609,  452,   36,
  668.        69,   36,   69,  436,   69,  609,   29,   36,   71,  455,
  669.       609,  463,  456,   36,   71,   31,   28,   33,   36,   71,
  670.       464,   28,  468,   36,   71,   36,   71,   36,  473,   36,
  671.        71,  466,  469,  467,  480,  474,  470,   39,   36,   71,
  672.        40,   39,  477,   28,   40,   28,  481,   28,   36,   86,
  673.       483,   48,  471,  475,  436,   86,  609,  472,   48,   36,
  674.        88,  609,  478,   48,   29,   48,   36,   88,   36,   88,
  675.  
  676.        36,   88,   48,   31,  482,  479,  494,  485,  488,  497,
  677.       486,  487,   36,   88,   36,   88,  489,   36,   88,   28,
  678.       492,  481,   48,  609,  495,  498,   28,   36,  500,  490,
  679.       609,  496,  493,   36,   69,   36,   71,  499,  609,  501,
  680.       503,   71,   36,   71,  491,   36,   71,   36,   71,   36,
  681.        71,   36,   71,   28,   48,   39,   39,  504,   40,   40,
  682.       505,  502,   39,  512,   28,   40,   28,  514,   28,  506,
  683.       609,  511,  516,   36,   86,   76,  507,   36,   88,  517,
  684.        28,  509,   28,  508,   77,   48,   78,  513,   48,  510,
  685.       503,   88,   36,   88,   36,   88,   36,   88,   36,   88,
  686.  
  687.        36,   88,  609,  518,  512,   48,  524,  519,   48,  520,
  688.       514,   48,  538,  525,  526,   36,   69,   28,  521,   48,
  689.        36,   69,   36,   71,   28,  522,   36,   71,   36,   71,
  690.       531,   71,  523,   36,   71,  107,   36,   71,  546,   39,
  691.        39,  528,   40,   40,  108,   28,  109,  527,  536,  537,
  692.        28,  563,  532,  539,   36,   86,  529,  534,  533,   28,
  693.       530,   36,   88,   36,   88,   36,   88,  531,   88,   36,
  694.        88,  574,   36,   88,  535,  537,   48,   28,  547,   28,
  695.       541,  540,   36,   69,  549,   71,   36,   71,  544,   36,
  696.        71,   36,   71,  542,  545,  553,   71,  543,   28,   39,
  697.  
  698.        48,  548,   40,  579,  550,  555,   39,  557,   28,   40,
  699.       584,  551,   36,   86,  609,  161,  609,  556,  609,  558,
  700.       549,   88,   36,   88,   36,   88,  552,   36,   88,  553,
  701.        88,  559,   28,  554,  557,   48,   36,   69,   36,  565,
  702.       560,  566,   71,   36,   71,   39,  561,   48,   40,   36,
  703.        86,   36,  572,  566,   88,   36,   88,   36,   69,  569,
  704.        36,   71,  562,  567,  568,   39,   28,   48,   40,   36,
  705.        86,  564,   36,   88,  570,  573,   48,  575,   36,   69,
  706.        36,   71,   36,   71,  571,   36,   88,   39,  577,  581,
  707.        40,  609,  578,  580,   36,   86,  609,  589,   36,   88,
  708.  
  709.       583,  594,   28,  170,   36,   69,  585,  590,  586,  587,
  710.        36,   71,  593,  588,   36,   71,   39,  599,   28,   40,
  711.       594,   48,  591,   36,   86,  609,  592,   36,   88,   36,
  712.        88,  595,   36,   69,   36,   71,  609,  596,  605,   71,
  713.       594,   39,   36,   86,   40,  609,  597,  598,   36,   88,
  714.       600,  605,   88,  609,  601,  605,   69,  608,   71,  605,
  715.        86,  602,  608,   88,  603,  609,  604,  609,  609,  609,
  716.       609,  609,  609,  609,  606,  609,  609,  609,  609,  609,
  717.       607,    6,    6,   15,   15,   35,   35,   51,   51,   70,
  718.        70,   87,   87,    5,  609,  609,  609,  609,  609,  609,
  719.  
  720.       609,  609,  609,  609,  609,  609,  609,  609,  609,  609,
  721.       609,  609,  609,  609,  609,  609,  609,  609,  609,  609,
  722.       609,  609,  609,  609,  609,  609,  609,  609,  609,  609,
  723.       609,  609,  609
  724.     } ;
  725.  
  726. static yyconst short int yy_chk[1634] =
  727.     {   0,
  728.       615,    1,    1,    1,    1,   23,    1,    1,    1,    9,
  729.         9,   10,   11,   13,   10,   17,  614,   11,   11,   12,
  730.        18,   18,   22,   12,   12,   12,   14,   23,    1,   21,
  731.        25,   13,    1,    2,    2,    2,    2,   12,    2,    2,
  732.         2,   24,   14,   17,   14,   17,   19,   14,   30,   22,
  733.        20,   19,   19,   21,   20,   20,   20,   25,   26,   32,
  734.         2,   21,   31,   24,    2,    3,    3,    3,   20,   33,
  735.         3,    3,    3,   29,   35,   35,   26,   34,   43,   30,
  736.        38,   28,    3,   38,    3,    3,   32,   33,   45,   26,
  737.         3,    3,   31,   46,   58,   29,    3,    4,    4,    4,
  738.  
  739.        28,   44,    4,    4,    4,   39,   34,   40,   39,   28,
  740.        40,   28,   43,   48,    4,   44,    4,    4,   58,   45,
  741.        46,   41,    4,    4,   39,   41,   41,   41,    4,    8,
  742.        59,   50,   42,   39,   49,   39,   42,   42,   42,   41,
  743.        55,   48,  612,   48,   51,   51,   56,   53,    8,   50,
  744.        42,   53,   53,   53,   57,    8,   59,    8,    8,    8,
  745.         8,   37,   37,   60,   49,   53,   54,   55,   61,   62,
  746.        54,   54,   54,   57,   63,   56,   64,   65,   66,   67,
  747.        37,   37,   83,   68,   54,  106,   69,   69,   70,   70,
  748.        37,  572,   37,   52,   52,  565,   60,   68,   62,   61,
  749.  
  750.        63,   72,   72,   74,   74,   64,   69,   81,   65,   66,
  751.        67,  106,   52,   52,   95,   69,   83,   69,   73,   73,
  752.        76,   80,   52,   76,   52,   71,   71,   75,   75,   72,
  753.        93,   81,   84,   71,   74,   71,   95,   77,   85,   71,
  754.        77,   73,   76,  100,   78,   71,   75,   78,   94,   80,
  755.        82,  396,   71,  374,   71,  397,   71,   86,   86,   75,
  756.        93,   82,   78,   84,   87,   87,   96,   77,   79,   85,
  757.       100,   79,   90,   90,   82,   89,   89,   91,   91,   82,
  758.        82,   94,   79,   92,   92,  103,   86,   79,   86,  101,
  759.        96,  397,   97,   98,   99,   90,   79,  105,   79,   88,
  760.  
  761.        88,  121,   92,   89,  121,   99,  101,   88,   91,   88,
  762.        97,   98,  103,   88,  105,   92,  148,  102,   99,  104,
  763.       107,  107,  124,   99,   99,  124,   88,  121,   88,  438,
  764.        88,  102,  438,  104,  108,  108,  109,  109,  110,  110,
  765.       148,  111,  111,  107,  112,  112,  113,  113,  114,  114,
  766.       125,  115,  115,  110,  111,  109,  124,  116,  116,  117,
  767.       117,  118,  118,  112,  125,  108,  119,  119,  128,  113,
  768.       115,  110,  120,  120,  126,  122,  114,  116,  122,  123,
  769.       127,  129,  123,  130,  117,  131,  117,  132,  133,   47,
  770.       128,  146,  126,  118,  127,  134,  134,   27,  119,  135,
  771.  
  772.       135,  129,  120,  147,  130,  133,  122,  136,  136,  146,
  773.       123,  137,  137,  131,  132,  138,  138,  150,  135,  139,
  774.       139,  147,  136,  151,  137,  152,  134,  140,  140,  141,
  775.       141,  142,  142,  153,  138,  143,  143,  144,  144,  152,
  776.       136,  145,  145,  149,  149,  154,  140,  139,  150,  141,
  777.       156,  155,  158,  160,  151,  153,  142,  157,  162,  159,
  778.       161,  181,  163,  163,  181,  154,   15,  143,    6,  144,
  779.       215,  145,  155,  156,  161,    5,  157,  159,  158,  164,
  780.       164,  165,  165,  181,  160,  182,  166,  166,  162,  163,
  781.       167,  167,  168,  168,  169,  169,  170,  170,  171,  171,
  782.  
  783.       215,  168,  184,  172,  172,  173,  173,  175,  175,  174,
  784.       174,  164,  166,  165,  183,  167,  182,  169,  176,  176,
  785.       177,  177,  184,  170,  185,  171,  172,  174,  178,  179,
  786.       173,  178,  179,  183,  180,  175,  176,  180,  186,  187,
  787.       188,  189,  242,  190,    0,  178,  191,  191,  177,  203,
  788.       185,  180,    0,  186,  188,    0,  179,  190,  242,  189,
  789.       192,  192,  193,  193,  194,  194,  187,  195,  195,  204,
  790.       196,  196,  197,  197,  198,  198,  195,  203,  191,  199,
  791.       199,  200,  200,  201,  201,  202,  202,  205,  193,  194,
  792.       207,  208,  192,  196,  209,  210,  212,  198,  213,  197,
  793.  
  794.       204,  201,  214,  218,  199,  211,  219,  216,  217,  200,
  795.       376,  205,    0,  202,  209,  376,  213,  207,  208,    0,
  796.       211,  210,  236,  212,  216,  236,  217,  220,  220,  214,
  797.       219,  221,  221,  218,  222,  222,  236,  223,  223,  224,
  798.       224,  225,  225,  227,  227,  220,  226,  226,  228,  228,
  799.       229,  229,  222,  231,  231,  230,  230,  233,  233,  221,
  800.       223,  232,  232,  234,  224,  235,  234,  226,  235,  229,
  801.       238,  239,  231,  228,  227,  230,  232,  237,  240,  241,
  802.       237,  233,  234,  235,  243,  244,  245,  246,  247,  247,
  803.       259,  238,  248,  248,  237,    0,  240,  241,  239,  249,
  804.  
  805.       249,  250,  250,  245,  259,  244,  251,  251,  252,  252,
  806.       248,  253,  253,  254,  254,  267,  247,  246,  243,  260,
  807.       255,  255,  249,  264,  256,  256,  250,  258,  258,  252,
  808.       257,  257,  261,  261,  262,  262,  263,  263,  254,  255,
  809.       265,  264,  253,  256,  266,  257,  260,  268,  268,  267,
  810.       269,  258,  271,  270,  272,  272,  274,  273,  265,  295,
  811.       266,  275,  275,  276,  276,  277,  277,  278,  278,  294,
  812.       274,  295,  279,  279,  271,    0,  269,  270,  273,    0,
  813.       277,  275,  276,  279,  281,  281,  282,  282,  283,  283,
  814.       284,  284,  278,  285,  285,  294,  286,  286,  287,  287,
  815.  
  816.       288,  288,  291,  297,  289,  291,  281,  289,  284,  290,
  817.       293,  293,  290,  283,  286,  298,  299,  292,  282,  288,
  818.       292,  285,  296,  300,  313,  301,  290,  303,  303,  287,
  819.       297,  289,  291,    0,  299,  302,  302,    0,  296,  304,
  820.       304,  318,  303,  298,    0,  300,  301,  319,  292,  305,
  821.       305,  306,  306,  318,  302,  313,  296,  307,  307,  321,
  822.       305,  308,  308,  319,  304,  309,  309,  310,  310,  311,
  823.       311,  312,  312,  306,  314,  314,  320,  323,  324,  325,
  824.       328,  319,  399,  309,  484,  310,  308,  321,  342,  307,
  825.       312,  342,  324,  327,  327,  329,  329,  330,  330,  399,
  826.  
  827.       311,  331,  331,  320,  332,  332,  333,  333,  323,  484,
  828.       325,  328,  334,  334,  342,  330,  335,  335,  336,  336,
  829.       347,  333,  349,  329,  337,  337,  348,  338,  338,  339,
  830.       339,  335,  331,  340,  340,  350,  349,  336,  341,  341,
  831.       332,  351,  343,  354,  334,  343,  344,  345,  348,  344,
  832.       345,  347,  339,  337,  338,  340,  341,  350,  352,  353,
  833.       353,  355,  355,    0,  343,  351,  403,  344,  345,  356,
  834.       356,  403,  352,  375,  354,  357,  357,  358,  358,  359,
  835.       359,  367,  360,  360,  361,  361,  369,  356,  362,  362,
  836.       363,  363,  364,  364,  359,  365,  365,  370,  371,  361,
  837.  
  838.       366,  366,  367,  372,  375,    0,  357,  362,  369,  373,
  839.       378,  370,  446,  358,  360,  364,    0,  365,  366,  363,
  840.       371,  379,  379,  373,  380,  380,  446,  372,  378,  381,
  841.       381,  382,  382,  383,  383,  384,  384,  385,  385,  386,
  842.       386,  398,  382,  387,  387,  388,  388,  380,  379,  389,
  843.       389,  381,  390,  390,  391,  391,  401,  386,  387,  383,
  844.       392,  400,  393,  392,  385,  393,  394,  394,  395,  398,
  845.       394,  395,  404,  404,  405,  405,    0,  388,  406,  406,
  846.       418,  389,  416,  391,  419,  401,  407,  407,  400,  406,
  847.       420,  392,    0,  393,  417,  404,  405,  418,  395,  408,
  848.  
  849.       408,  409,  409,  410,  410,  411,  411,  412,  412,  413,
  850.       413,  419,  407,  414,  414,  415,  415,  421,  416,  420,
  851.       411,  410,  417,  422,  423,  424,  424,    0,  409,  425,
  852.       425,  426,  426,  427,  427,    0,  421,  428,  428,  412,
  853.         0,  422,  414,  429,  429,  421,  442,  421,  431,  431,
  854.       423,  445,  428,  432,  432,  433,  433,  434,  434,  435,
  855.       435,  425,  429,  426,  442,  435,  431,  439,  437,  437,
  856.       439,  440,  439,  444,  440,  441,  443,  443,  448,  448,
  857.       445,  447,  432,  437,  449,  449,    0,  433,  458,  451,
  858.       451,    0,  440,  460,  441,  462,  450,  450,  452,  452,
  859.  
  860.       453,  453,  461,  441,  444,  441,  458,  447,  451,  462,
  861.       448,  450,  454,  454,  455,  455,  452,  456,  456,  464,
  862.       455,  459,  459,    0,  460,  463,  463,  466,  466,  453,
  863.         0,  461,  456,  467,  467,  468,  468,  464,    0,  467,
  864.       469,  469,  470,  470,  454,  471,  471,  472,  472,  474,
  865.       474,  475,  475,  479,  485,  477,  476,  470,  477,  476,
  866.       471,  468,  478,  480,  480,  478,  482,  483,  483,  472,
  867.         0,  479,  485,  486,  486,  476,  474,  487,  487,  486,
  868.       499,  477,  515,  475,  476,  495,  476,  482,  497,  478,
  869.       488,  488,  489,  489,  490,  490,  491,  491,  492,  492,
  870.  
  871.       493,  493,    0,  487,  494,  494,  495,  489,  525,  490,
  872.       496,  496,  515,  497,  499,  500,  500,  511,  491,  516,
  873.       501,  501,  502,  502,  547,  492,  504,  504,  505,  505,
  874.       506,  506,  493,  507,  507,  500,  508,  508,  525,  509,
  875.       510,  502,  509,  510,  500,  563,  500,  501,  511,  513,
  876.       513,  547,  507,  516,  517,  517,  504,  509,  508,  526,
  877.       505,  518,  518,  519,  519,  520,  520,  521,  521,  522,
  878.       522,  563,  523,  523,  510,  524,  524,  569,  526,  574,
  879.       518,  517,  527,  527,  528,  528,  529,  529,  522,  530,
  880.       530,  532,  532,  519,  523,  533,  533,  520,  536,  534,
  881.  
  882.       539,  527,  534,  569,  529,  535,  535,  538,  538,  535,
  883.       574,  530,  540,  540,    0,  536,    0,  536,    0,  539,
  884.       541,  541,  542,  542,  543,  543,  532,  544,  544,  545,
  885.       545,  540,  556,  534,  546,  546,  548,  548,  550,  550,
  886.       542,  551,  551,  552,  552,  554,  543,  558,  554,  559,
  887.       559,  560,  560,  561,  561,  562,  562,  564,  564,  556,
  888.       567,  567,  544,  552,  554,  568,  579,  570,  568,  571,
  889.       571,  548,  573,  573,  558,  562,  580,  564,  575,  575,
  890.       576,  576,  577,  577,  559,  583,  583,  578,  567,  571,
  891.       578,    0,  568,  570,  581,  581,    0,  579,  582,  582,
  892.  
  893.       573,  584,  584,  576,  585,  585,  575,  580,  576,  577,
  894.       586,  586,  583,  578,  587,  587,  588,  589,  589,  588,
  895.       590,  590,  581,  591,  591,    0,  582,  592,  592,  593,
  896.       593,  585,  595,  595,  596,  596,    0,  586,  597,  597,
  897.       598,  598,  600,  600,  598,    0,  587,  588,  601,  601,
  898.       591,  602,  602,    0,  592,  603,  603,  604,  604,  606,
  899.       606,  593,  607,  607,  595,    0,  596,    0,    0,    0,
  900.         0,    0,    0,    0,  600,    0,    0,    0,    0,    0,
  901.       601,  610,  610,  611,  611,  613,  613,  616,  616,  617,
  902.       617,  618,  618,  609,  609,  609,  609,  609,  609,  609,
  903.  
  904.       609,  609,  609,  609,  609,  609,  609,  609,  609,  609,
  905.       609,  609,  609,  609,  609,  609,  609,  609,  609,  609,
  906.       609,  609,  609,  609,  609,  609,  609,  609,  609,  609,
  907.       609,  609,  609
  908.     } ;
  909.  
  910. static yy_state_type yy_last_accepting_state;
  911. static char *yy_last_accepting_cpos;
  912.  
  913. /* The intent behind this definition is that it'll catch
  914.  * any uses of REJECT which flex missed.
  915.  */
  916. #define REJECT reject_used_but_not_detected
  917. #define yymore() yymore_used_but_not_detected
  918. #define YY_MORE_ADJ 0
  919. #define YY_RESTORE_YY_MORE_OFFSET
  920. char *yytext;
  921. #define INITIAL 0
  922. /*
  923.    makeedit.l : This file is part of pstoedit
  924.    Simple parser to parse the intermediate flat PostScript and call the backend
  925.    output routines.
  926.  
  927.    Copyright (C) 1993,1994,1995,1996 Wolfgang Glunz, Wolfgang.Glunz@zfe.siemens.de
  928.  
  929.     This program is free software; you can redistribute it and/or modify
  930.     it under the terms of the GNU General Public License as published by
  931.     the Free Software Foundation; either version 2 of the License, or
  932.     (at your option) any later version.
  933.  
  934.     This program is distributed in the hope that it will be useful,
  935.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  936.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  937.     GNU General Public License for more details.
  938.  
  939.     You should have received a copy of the GNU General Public License
  940.     along with this program; if not, write to the Free Software
  941.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  942.  
  943. */
  944. // #include <stdio.h>
  945. #include <iostream.h>
  946. //#if !defined(unix) && !defined(__unix__) && !defined(__unix)
  947. //#include <strstrea.h>
  948. //#else
  949. //#include <strstream.h>
  950. //#endif
  951. #include <fstream.h>
  952. #include <string.h>
  953.  
  954. #include "drvbase.h"
  955.  
  956. static float  origx, origy;
  957. static char   *start_of_text;
  958. static char   *end_of_text;
  959. static float  number;
  960.  
  961. #define YY_SKIP_YYWRAP
  962. static int yywrap() { return 1;}
  963.  
  964. #define YY_NEVER_INTERACTIVE 1
  965. // to avoid usage of isatty
  966.  
  967. #define YY_NO_UNPUT
  968. // to avoid compiler warning
  969.  
  970. // define YY_DECL int yylex YY_PROTO(( *outputdriver ))
  971. #define YY_DECL int drvbase::yylex()
  972.  
  973. static non_standard_font = 0;
  974. #define READPATH 1
  975.  
  976.  
  977. /* Macros after this point can all be overridden by user definitions in
  978.  * section 1.
  979.  */
  980.  
  981. #ifndef YY_SKIP_YYWRAP
  982. #ifdef __cplusplus
  983. extern "C" int yywrap YY_PROTO(( void ));
  984. #else
  985. extern int yywrap YY_PROTO(( void ));
  986. #endif
  987. #endif
  988.  
  989. #ifndef YY_NO_UNPUT
  990. static void yyunput YY_PROTO(( int c, char *buf_ptr ));
  991. #endif
  992.  
  993. #ifndef yytext_ptr
  994. static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
  995. #endif
  996.  
  997. #ifdef YY_NEED_STRLEN
  998. static int yy_flex_strlen YY_PROTO(( yyconst char * ));
  999. #endif
  1000.  
  1001. #ifndef YY_NO_INPUT
  1002. #ifdef __cplusplus
  1003. static int yyinput YY_PROTO(( void ));
  1004. #else
  1005. static int input YY_PROTO(( void ));
  1006. #endif
  1007. #endif
  1008.  
  1009. #if YY_STACK_USED
  1010. static int yy_start_stack_ptr = 0;
  1011. static int yy_start_stack_depth = 0;
  1012. static int *yy_start_stack = 0;
  1013. #ifndef YY_NO_PUSH_STATE
  1014. static void yy_push_state YY_PROTO(( int new_state ));
  1015. #endif
  1016. #ifndef YY_NO_POP_STATE
  1017. static void yy_pop_state YY_PROTO(( void ));
  1018. #endif
  1019. #ifndef YY_NO_TOP_STATE
  1020. static int yy_top_state YY_PROTO(( void ));
  1021. #endif
  1022.  
  1023. #else
  1024. #define YY_NO_PUSH_STATE 1
  1025. #define YY_NO_POP_STATE 1
  1026. #define YY_NO_TOP_STATE 1
  1027. #endif
  1028.  
  1029. #ifdef YY_MALLOC_DECL
  1030. YY_MALLOC_DECL
  1031. #else
  1032. #if __STDC__
  1033. #ifndef __cplusplus
  1034. #include <stdlib.h>
  1035. #endif
  1036. #else
  1037. /* Just try to get by without declaring the routines.  This will fail
  1038.  * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
  1039.  * or sizeof(void*) != sizeof(int).
  1040.  */
  1041. #endif
  1042. #endif
  1043.  
  1044. /* Amount of stuff to slurp up with each read. */
  1045. #ifndef YY_READ_BUF_SIZE
  1046. #define YY_READ_BUF_SIZE 8192
  1047. #endif
  1048.  
  1049. /* Copy whatever the last rule matched to the standard output. */
  1050.  
  1051. #ifndef ECHO
  1052. /* This used to be an fputs(), but since the string might contain NUL's,
  1053.  * we now use fwrite().
  1054.  */
  1055. #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
  1056. #endif
  1057.  
  1058. /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
  1059.  * is returned in "result".
  1060.  */
  1061. #ifndef YY_INPUT
  1062. #define YY_INPUT(buf,result,max_size) \
  1063.     if ( yy_current_buffer->yy_is_interactive ) \
  1064.         { \
  1065.         int c = '*', n; \
  1066.         for ( n = 0; n < max_size && \
  1067.                  (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
  1068.             buf[n] = (char) c; \
  1069.         if ( c == '\n' ) \
  1070.             buf[n++] = (char) c; \
  1071.         if ( c == EOF && ferror( yyin ) ) \
  1072.             YY_FATAL_ERROR( "input in flex scanner failed" ); \
  1073.         result = n; \
  1074.         } \
  1075.     else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
  1076.           && ferror( yyin ) ) \
  1077.         YY_FATAL_ERROR( "input in flex scanner failed" );
  1078. #endif
  1079.  
  1080. /* No semi-colon after return; correct usage is to write "yyterminate();" -
  1081.  * we don't want an extra ';' after the "return" because that will cause
  1082.  * some compilers to complain about unreachable statements.
  1083.  */
  1084. #ifndef yyterminate
  1085. #define yyterminate() return YY_NULL
  1086. #endif
  1087.  
  1088. /* Number of entries by which start-condition stack grows. */
  1089. #ifndef YY_START_STACK_INCR
  1090. #define YY_START_STACK_INCR 25
  1091. #endif
  1092.  
  1093. /* Report a fatal error. */
  1094. #ifndef YY_FATAL_ERROR
  1095. #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
  1096. #endif
  1097.  
  1098. /* Default declaration of generated scanner - a define so the user can
  1099.  * easily add parameters.
  1100.  */
  1101. #ifndef YY_DECL
  1102. #define YY_DECL int yylex YY_PROTO(( void ))
  1103. #endif
  1104.  
  1105. /* Code executed at the beginning of each rule, after yytext and yyleng
  1106.  * have been set up.
  1107.  */
  1108. #ifndef YY_USER_ACTION
  1109. #define YY_USER_ACTION
  1110. #endif
  1111.  
  1112. /* Code executed at the end of each rule. */
  1113. #ifndef YY_BREAK
  1114. #define YY_BREAK break;
  1115. #endif
  1116.  
  1117. #define YY_RULE_SETUP \
  1118.     YY_USER_ACTION
  1119.  
  1120. YY_DECL
  1121.     {
  1122.     register yy_state_type yy_current_state;
  1123.     register char *yy_cp, *yy_bp;
  1124.     register int yy_act;
  1125.  
  1126.  
  1127.  
  1128.     if ( yy_init )
  1129.         {
  1130.         yy_init = 0;
  1131.  
  1132. #ifdef YY_USER_INIT
  1133.         YY_USER_INIT;
  1134. #endif
  1135.  
  1136.         if ( ! yy_start )
  1137.             yy_start = 1;    /* first start state */
  1138.  
  1139.         if ( ! yyin )
  1140.             yyin = stdin;
  1141.  
  1142.         if ( ! yyout )
  1143.             yyout = stdout;
  1144.  
  1145.         if ( ! yy_current_buffer )
  1146.             yy_current_buffer =
  1147.                 yy_create_buffer( yyin, YY_BUF_SIZE );
  1148.  
  1149.         yy_load_buffer_state();
  1150.         }
  1151.  
  1152.     while ( 1 )        /* loops until end-of-file is reached */
  1153.         {
  1154.         yy_cp = yy_c_buf_p;
  1155.  
  1156.         /* Support of yytext. */
  1157.         *yy_cp = yy_hold_char;
  1158.  
  1159.         /* yy_bp points to the position in yy_ch_buf of the start of
  1160.          * the current run.
  1161.          */
  1162.         yy_bp = yy_cp;
  1163.  
  1164.         yy_current_state = yy_start;
  1165. yy_match:
  1166.         do
  1167.             {
  1168.             register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
  1169.             if ( yy_accept[yy_current_state] )
  1170.                 {
  1171.                 yy_last_accepting_state = yy_current_state;
  1172.                 yy_last_accepting_cpos = yy_cp;
  1173.                 }
  1174.             while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1175.                 {
  1176.                 yy_current_state = (int) yy_def[yy_current_state];
  1177.                 if ( yy_current_state >= 610 )
  1178.                     yy_c = yy_meta[(unsigned int) yy_c];
  1179.                 }
  1180.             yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  1181.             ++yy_cp;
  1182.             }
  1183.         while ( yy_base[yy_current_state] != 1594 );
  1184.  
  1185. yy_find_action:
  1186.         yy_act = yy_accept[yy_current_state];
  1187.         if ( yy_act == 0 )
  1188.             { /* have to back up */
  1189.             yy_cp = yy_last_accepting_cpos;
  1190.             yy_current_state = yy_last_accepting_state;
  1191.             yy_act = yy_accept[yy_current_state];
  1192.             }
  1193.  
  1194.         YY_DO_BEFORE_ACTION;
  1195.  
  1196.  
  1197. do_action:    /* This label is used only to access EOF actions. */
  1198.  
  1199.  
  1200.         switch ( yy_act )
  1201.     { /* beginning of action switch */
  1202.             case 0: /* must back up */
  1203.             /* undo the effects of YY_DO_BEFORE_ACTION */
  1204.             *yy_cp = yy_hold_char;
  1205.             yy_cp = yy_last_accepting_cpos;
  1206.             yy_current_state = yy_last_accepting_state;
  1207.             goto yy_find_action;
  1208.  
  1209. case 1:
  1210. YY_RULE_SETUP
  1211. // Work around for Linux libg++ bug
  1212.              number = (float) atof(yytext);
  1213. // Original
  1214. //             istrstream s(yytext);
  1215. //             s >> number;
  1216.              
  1217.              addNumber(number * get_scale());
  1218.             }
  1219.     YY_BREAK
  1220. case 2:
  1221. YY_RULE_SETUP
  1222.             dumpPath(); // dump last path 
  1223.             if (!page_empty) {
  1224.                 close_page();
  1225.             }
  1226.             page_empty = 1;
  1227.             }
  1228.     YY_BREAK
  1229. case 3:
  1230. YY_RULE_SETUP
  1231.             if (numberOfElementsInPath() != 0) {
  1232.                 errf << "Error, path number " << pathnumber << " was not cleared correctly" << endl;
  1233.             }
  1234.  
  1235.             pathnumber++;
  1236.             BEGIN(READPATH); 
  1237.             currentPath->isPolygon=false;
  1238.             currentPath->nr=pathnumber;
  1239.             }
  1240.     YY_BREAK
  1241. case 4:
  1242. YY_RULE_SETUP
  1243. {
  1244.             /* /Helvetica findfont 14 scalefont setfont */
  1245.             if (!non_standard_font) {
  1246.             // in the case of a non standard font, the setCurrentFontName was
  1247.             // done during handling of nonstandard font
  1248.                 start_of_text = strchr (yytext,(int)'/') + 1 ;
  1249.                 end_of_text = strchr (yytext,(int)' ') ;
  1250.                 if (end_of_text) *end_of_text = (char) 0;
  1251.                 setCurrentFontName(start_of_text,0);
  1252.             }
  1253.             non_standard_font = 0; // reset 
  1254.             }
  1255.     YY_BREAK
  1256. case 5:
  1257. YY_RULE_SETUP
  1258.             /* fprintf(stderr,"%s\n",yytext);  */
  1259.             start_of_text = yytext+2;
  1260.             end_of_text =  strrchr (yytext,(int)' ') ;
  1261.             if (end_of_text) *end_of_text = (char) 0;
  1262.             setCurrentFontFamilyName(start_of_text);
  1263.             }
  1264.     YY_BREAK
  1265. case 6:
  1266. YY_RULE_SETUP
  1267.             /* fprintf(stderr,"%s\n",yytext);  */
  1268.             start_of_text = yytext+2;
  1269.             end_of_text =  strrchr (yytext,(int)' ') ;
  1270.             if (end_of_text) *end_of_text = (char) 0;
  1271.             setCurrentFontFullName(start_of_text);
  1272.             }
  1273.     YY_BREAK
  1274. case 7:
  1275. YY_RULE_SETUP
  1276.             /* fprintf(stderr,"%s\n",yytext);  */
  1277.             start_of_text = yytext+2;
  1278.             end_of_text =  strrchr (yytext,(int)' ') ;
  1279.             if (end_of_text) *end_of_text = (char) 0;
  1280.             setCurrentFontWeight(start_of_text);
  1281.             }
  1282.     YY_BREAK
  1283. case 8:
  1284. YY_RULE_SETUP
  1285. {
  1286.             }
  1287.     YY_BREAK
  1288. case 9:
  1289. YY_RULE_SETUP
  1290. {
  1291.             /* % Times-Roman Times-Roman@0 nonstandard font */
  1292.             /* % Bla Bla nonstandard font */ /* if it is not derived from a standard font */
  1293.             start_of_text = yytext+2;
  1294.             end_of_text =  strchr (start_of_text,(int)' ') ;
  1295.             if (end_of_text) *end_of_text = (char) 0;
  1296.             char   *start_of_secondname = end_of_text +1;
  1297.             char   *end_of_secondname = strchr (start_of_secondname,(int)' ') ;
  1298.             if (end_of_secondname) *end_of_secondname = (char) 0;
  1299.             non_standard_font = 1; // this avoids a further setting of CurrentFontName
  1300.             if (strcmp(start_of_text,start_of_secondname) == 0 ) {
  1301.                 // both names are equal, so it's not a derived font
  1302.                 setCurrentFontName(start_of_text,1);
  1303.             } else {
  1304.                 // it's a derived font, so use the base name
  1305.                 setCurrentFontName(start_of_text,0);
  1306.             }
  1307.             }
  1308.     YY_BREAK
  1309. case 10:
  1310. YY_RULE_SETUP
  1311. {
  1312.             setCurrentShowType(drvbase::eofill);
  1313.             }
  1314.     YY_BREAK
  1315. case 11:
  1316. YY_RULE_SETUP
  1317. {
  1318.             setCurrentShowType(drvbase::fill);
  1319.             }
  1320.     YY_BREAK
  1321. case 12:
  1322. YY_RULE_SETUP
  1323. {
  1324.             setCurrentShowType(drvbase::stroke);
  1325.             }
  1326.     YY_BREAK
  1327. case 13:
  1328. YY_RULE_SETUP
  1329. {
  1330.                 errf << yytext;
  1331.             }
  1332.     YY_BREAK
  1333. case 14:
  1334. YY_RULE_SETUP
  1335. { }
  1336.     YY_BREAK
  1337. case 15:
  1338. YY_RULE_SETUP
  1339. {
  1340.             // setCurrentFontSize(number * get_scale());
  1341.             setCurrentFontSize(pop());
  1342.             // pop(); 
  1343.             }
  1344.     YY_BREAK
  1345. case 16:
  1346. YY_RULE_SETUP
  1347. {
  1348.             float B = pop() / get_scale();
  1349.             float G = pop() / get_scale();
  1350.             float R = pop() / get_scale();
  1351.             /* printf("%s %f %f %f\n","setting RGB to ",R,G,B); */
  1352.             setRGB(R,G,B);
  1353.             }
  1354.     YY_BREAK
  1355. case 17:
  1356. YY_RULE_SETUP
  1357. {
  1358.                 yytext[strlen(yytext) -9] = '\0'; // strip of trailing setdash
  1359.                 setDash(yytext+1); // don't copy leading space
  1360.             }
  1361.     YY_BREAK
  1362. case 18:
  1363. YY_RULE_SETUP
  1364. {
  1365.             setCurrentLineCap((int) (number +0.5));
  1366.             pop(); 
  1367.             }
  1368.     YY_BREAK
  1369. case 19:
  1370. YY_RULE_SETUP
  1371. {
  1372.             setCurrentLineWidth(pop() );
  1373. //            setCurrentLineWidth(number * get_scale() );
  1374. //            pop(); 
  1375.             }
  1376.     YY_BREAK
  1377. case 20:
  1378. YY_RULE_SETUP
  1379. {
  1380.             float height = pop(); 
  1381.             if (height < 1.0 ) { height = 792 * get_scale() ; }
  1382.             setCurrentDeviceHeight(height);
  1383.             float width  = pop(); 
  1384.             if (width < 1.0 ) { width = 612 * get_scale() ; }
  1385.             setCurrentDeviceWidth(width);
  1386.             }
  1387.     YY_BREAK
  1388. case 21:
  1389. YY_RULE_SETUP
  1390. {
  1391.             const float ay = pop();
  1392.             const float ax = pop();
  1393.             const int   Char = (int) (pop() / get_scale()   +0.5);    
  1394.             const float cy = pop();
  1395.             const float cx = pop();
  1396.             setCurrentWidthParams(ax,ay,Char,cx,cy);
  1397.             }
  1398.     YY_BREAK
  1399. case 22:
  1400. YY_RULE_SETUP
  1401.             start_of_text = strchr (yytext,(int)'(') + 1 ;
  1402.             end_of_text = strrchr (yytext,(int)')') ;
  1403.             if (end_of_text) *end_of_text = (char) 0;
  1404.             dumpText(start_of_text);
  1405.             }
  1406.     YY_BREAK
  1407. case 23:
  1408. YY_RULE_SETUP
  1409. {
  1410.             setCurrentFontAngle(number);
  1411.             pop();
  1412.             }
  1413.     YY_BREAK
  1414. case 24:
  1415. YY_RULE_SETUP
  1416. {
  1417.             /* Because this is in the preamble, only pop 
  1418.                this has put something on the stack. */
  1419.             if (nextFreeNumber >= 2)
  1420.                 { pop(); pop(); }
  1421.             }
  1422.     YY_BREAK
  1423. case 25:
  1424. YY_RULE_SETUP
  1425. {
  1426.             /* Because this is in the preamble, only pop 
  1427.                this has put something on the stack. */
  1428.             if (nextFreeNumber >= 2)
  1429.                 { pop(); pop(); }
  1430.             }
  1431.     YY_BREAK
  1432. case 26:
  1433. YY_RULE_SETUP
  1434. { /* ignore any other stuff */ }
  1435.     YY_BREAK
  1436. case 27:
  1437. YY_RULE_SETUP
  1438.             // save coordinates for possible closepath
  1439.             origy = pop();
  1440.             origx = pop();
  1441.             if (numberOfElementsInPath() > 1) {
  1442.                 // this is an intermediate moveto
  1443.                 // if backend supports subpaths add it
  1444.                 // else dump last path and start a new one
  1445.                 if (backendSupportsSubPathes) {
  1446.                     Point p(origx,origy);
  1447.                     addtopath(new Moveto(&p)); // pass p as array
  1448.                 } else {
  1449.                     // dumppath
  1450.                     dumpPath();
  1451.                     // start new path
  1452.                     Point p(origx,origy);
  1453.                     addtopath(new Moveto(&p)); // pass p as array
  1454.                     
  1455.                 }
  1456.             } else {
  1457.                 // it is a starting moveto
  1458.                 Point p(origx,origy);
  1459.                 addtopath(new Moveto(&p)); // pass p as array
  1460.             }
  1461.            }
  1462.     YY_BREAK
  1463. case 28:
  1464. YY_RULE_SETUP
  1465. {
  1466.             float y = pop();
  1467.             float x = pop();
  1468.             Point p(x,y);
  1469.             addtopath(new Lineto(&p)); // pass p as array
  1470.             }
  1471.     YY_BREAK
  1472. case 29:
  1473. YY_RULE_SETUP
  1474.             if (!backendSupportsCurveto) {
  1475.                 errf << "illegal input received. curveto not expected by this backend\n";
  1476.                 exit(1);
  1477.             }
  1478.             Point p[3];
  1479.             for (int i = 0; i < 3; i++) {
  1480.                 float y = pop();
  1481.                 float x = pop();
  1482.                 p[i] = Point(x,y);
  1483.             }
  1484.             addtopath(new Curveto(p)); // pass p as array
  1485.             }
  1486.     YY_BREAK
  1487. case 30:
  1488. YY_RULE_SETUP
  1489. {
  1490.              Point startPoint(origx,origy);
  1491.              const basedrawingelement & lastelem = pathElement(numberOfElementsInPath() -1 );
  1492.             // check for last == first. Then no additional
  1493.             // lineto is needed. and isPolygon can be set to true
  1494.              if  ( (lastelem.getType() == lineto) && (lastelem.getPoint(0) == startPoint) ) {
  1495.                 // no need to close the path, it's already closed
  1496.              } else {
  1497.                 if (backendSupportsSubPathes) {
  1498.                      addtopath(new Closepath(0)); 
  1499.                 } else {
  1500.                      addtopath(new Lineto(&startPoint)); // pass p as array
  1501.                 }
  1502.  
  1503.              }
  1504.              currentPath->isPolygon=true;
  1505.              /* show is done by next stroke, fill or moveto */
  1506.             }
  1507.     YY_BREAK
  1508. case 31:
  1509. YY_RULE_SETUP
  1510.              BEGIN(INITIAL);
  1511.              dumpPath();
  1512.                            };
  1513.     YY_BREAK
  1514. case 32:
  1515. YY_RULE_SETUP
  1516.              BEGIN(INITIAL);
  1517.              dumpPath(); 
  1518.                            };
  1519.     YY_BREAK
  1520. case 33:
  1521. YY_RULE_SETUP
  1522.              BEGIN(INITIAL);
  1523.              dumpPath(); 
  1524.                            };
  1525.     YY_BREAK
  1526. case 34:
  1527. YY_RULE_SETUP
  1528. {}
  1529.     YY_BREAK
  1530. case 35:
  1531. YY_RULE_SETUP
  1532. ECHO;
  1533.     YY_BREAK
  1534. case YY_STATE_EOF(INITIAL):
  1535. case YY_STATE_EOF(READPATH):
  1536.     yyterminate();
  1537.  
  1538.     case YY_END_OF_BUFFER:
  1539.         {
  1540.         /* Amount of text matched not including the EOB char. */
  1541.         int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
  1542.  
  1543.         /* Undo the effects of YY_DO_BEFORE_ACTION. */
  1544.         *yy_cp = yy_hold_char;
  1545.         YY_RESTORE_YY_MORE_OFFSET
  1546.  
  1547.         if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
  1548.             {
  1549.             /* We're scanning a new file or input source.  It's
  1550.              * possible that this happened because the user
  1551.              * just pointed yyin at a new source and called
  1552.              * yylex().  If so, then we have to assure
  1553.              * consistency between yy_current_buffer and our
  1554.              * globals.  Here is the right place to do so, because
  1555.              * this is the first action (other than possibly a
  1556.              * back-up) that will match for the new input source.
  1557.              */
  1558.             yy_n_chars = yy_current_buffer->yy_n_chars;
  1559.             yy_current_buffer->yy_input_file = yyin;
  1560.             yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
  1561.             }
  1562.  
  1563.         /* Note that here we test for yy_c_buf_p "<=" to the position
  1564.          * of the first EOB in the buffer, since yy_c_buf_p will
  1565.          * already have been incremented past the NUL character
  1566.          * (since all states make transitions on EOB to the
  1567.          * end-of-buffer state).  Contrast this with the test
  1568.          * in input().
  1569.          */
  1570.         if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
  1571.             { /* This was really a NUL. */
  1572.             yy_state_type yy_next_state;
  1573.  
  1574.             yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
  1575.  
  1576.             yy_current_state = yy_get_previous_state();
  1577.  
  1578.             /* Okay, we're now positioned to make the NUL
  1579.              * transition.  We couldn't have
  1580.              * yy_get_previous_state() go ahead and do it
  1581.              * for us because it doesn't know how to deal
  1582.              * with the possibility of jamming (and we don't
  1583.              * want to build jamming into it because then it
  1584.              * will run more slowly).
  1585.              */
  1586.  
  1587.             yy_next_state = yy_try_NUL_trans( yy_current_state );
  1588.  
  1589.             yy_bp = yytext_ptr + YY_MORE_ADJ;
  1590.  
  1591.             if ( yy_next_state )
  1592.                 {
  1593.                 /* Consume the NUL. */
  1594.                 yy_cp = ++yy_c_buf_p;
  1595.                 yy_current_state = yy_next_state;
  1596.                 goto yy_match;
  1597.                 }
  1598.  
  1599.             else
  1600.                 {
  1601.                 yy_cp = yy_c_buf_p;
  1602.                 goto yy_find_action;
  1603.                 }
  1604.             }
  1605.  
  1606.         else switch ( yy_get_next_buffer() )
  1607.             {
  1608.             case EOB_ACT_END_OF_FILE:
  1609.                 {
  1610.                 yy_did_buffer_switch_on_eof = 0;
  1611.  
  1612.                 if ( yywrap() )
  1613.                     {
  1614.                     /* Note: because we've taken care in
  1615.                      * yy_get_next_buffer() to have set up
  1616.                      * yytext, we can now set up
  1617.                      * yy_c_buf_p so that if some total
  1618.                      * hoser (like flex itself) wants to
  1619.                      * call the scanner after we return the
  1620.                      * YY_NULL, it'll still work - another
  1621.                      * YY_NULL will get returned.
  1622.                      */
  1623.                     yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
  1624.  
  1625.                     yy_act = YY_STATE_EOF(YY_START);
  1626.                     goto do_action;
  1627.                     }
  1628.  
  1629.                 else
  1630.                     {
  1631.                     if ( ! yy_did_buffer_switch_on_eof )
  1632.                         YY_NEW_FILE;
  1633.                     }
  1634.                 break;
  1635.                 }
  1636.  
  1637.             case EOB_ACT_CONTINUE_SCAN:
  1638.                 yy_c_buf_p =
  1639.                     yytext_ptr + yy_amount_of_matched_text;
  1640.  
  1641.                 yy_current_state = yy_get_previous_state();
  1642.  
  1643.                 yy_cp = yy_c_buf_p;
  1644.                 yy_bp = yytext_ptr + YY_MORE_ADJ;
  1645.                 goto yy_match;
  1646.  
  1647.             case EOB_ACT_LAST_MATCH:
  1648.                 yy_c_buf_p =
  1649.                 &yy_current_buffer->yy_ch_buf[yy_n_chars];
  1650.  
  1651.                 yy_current_state = yy_get_previous_state();
  1652.  
  1653.                 yy_cp = yy_c_buf_p;
  1654.                 yy_bp = yytext_ptr + YY_MORE_ADJ;
  1655.                 goto yy_find_action;
  1656.             }
  1657.         break;
  1658.         }
  1659.  
  1660.     default:
  1661.         YY_FATAL_ERROR(
  1662.             "fatal flex scanner internal error--no action found" );
  1663.     } /* end of action switch */
  1664.         } /* end of scanning one token */
  1665.     } /* end of yylex */
  1666.  
  1667.  
  1668. /* yy_get_next_buffer - try to read in a new buffer
  1669.  *
  1670.  * Returns a code representing an action:
  1671.  *    EOB_ACT_LAST_MATCH -
  1672.  *    EOB_ACT_CONTINUE_SCAN - continue scanning from current position
  1673.  *    EOB_ACT_END_OF_FILE - end of file
  1674.  */
  1675.  
  1676. static int yy_get_next_buffer()
  1677.     {
  1678.     register char *dest = yy_current_buffer->yy_ch_buf;
  1679.     register char *source = yytext_ptr;
  1680.     register int number_to_move, i;
  1681.     int ret_val;
  1682.  
  1683.     if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
  1684.         YY_FATAL_ERROR(
  1685.         "fatal flex scanner internal error--end of buffer missed" );
  1686.  
  1687.     if ( yy_current_buffer->yy_fill_buffer == 0 )
  1688.         { /* Don't try to fill the buffer, so this is an EOF. */
  1689.         if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
  1690.             {
  1691.             /* We matched a single character, the EOB, so
  1692.              * treat this as a final EOF.
  1693.              */
  1694.             return EOB_ACT_END_OF_FILE;
  1695.             }
  1696.  
  1697.         else
  1698.             {
  1699.             /* We matched some text prior to the EOB, first
  1700.              * process it.
  1701.              */
  1702.             return EOB_ACT_LAST_MATCH;
  1703.             }
  1704.         }
  1705.  
  1706.     /* Try to read more data. */
  1707.  
  1708.     /* First move last chars to start of buffer. */
  1709.     number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
  1710.  
  1711.     for ( i = 0; i < number_to_move; ++i )
  1712.         *(dest++) = *(source++);
  1713.  
  1714.     if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
  1715.         /* don't do the read, it's not guaranteed to return an EOF,
  1716.          * just force an EOF
  1717.          */
  1718.         yy_n_chars = 0;
  1719.  
  1720.     else
  1721.         {
  1722.         int num_to_read =
  1723.             yy_current_buffer->yy_buf_size - number_to_move - 1;
  1724.  
  1725.         while ( num_to_read <= 0 )
  1726.             { /* Not enough room in the buffer - grow it. */
  1727. #ifdef YY_USES_REJECT
  1728.             YY_FATAL_ERROR(
  1729. "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
  1730. #else
  1731.  
  1732.             /* just a shorter name for the current buffer */
  1733.             YY_BUFFER_STATE b = yy_current_buffer;
  1734.  
  1735.             int yy_c_buf_p_offset =
  1736.                 (int) (yy_c_buf_p - b->yy_ch_buf);
  1737.  
  1738.             if ( b->yy_is_our_buffer )
  1739.                 {
  1740.                 int new_size = b->yy_buf_size * 2;
  1741.  
  1742.                 if ( new_size <= 0 )
  1743.                     b->yy_buf_size += b->yy_buf_size / 8;
  1744.                 else
  1745.                     b->yy_buf_size *= 2;
  1746.  
  1747.                 b->yy_ch_buf = (char *)
  1748.                     /* Include room in for 2 EOB chars. */
  1749.                     yy_flex_realloc( (void *) b->yy_ch_buf,
  1750.                              b->yy_buf_size + 2 );
  1751.                 }
  1752.             else
  1753.                 /* Can't grow it, we don't own it. */
  1754.                 b->yy_ch_buf = 0;
  1755.  
  1756.             if ( ! b->yy_ch_buf )
  1757.                 YY_FATAL_ERROR(
  1758.                 "fatal error - scanner input buffer overflow" );
  1759.  
  1760.             yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
  1761.  
  1762.             num_to_read = yy_current_buffer->yy_buf_size -
  1763.                         number_to_move - 1;
  1764. #endif
  1765.             }
  1766.  
  1767.         if ( num_to_read > YY_READ_BUF_SIZE )
  1768.             num_to_read = YY_READ_BUF_SIZE;
  1769.  
  1770.         /* Read in more data. */
  1771.         YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
  1772.             yy_n_chars, num_to_read );
  1773.         }
  1774.  
  1775.     if ( yy_n_chars == 0 )
  1776.         {
  1777.         if ( number_to_move == YY_MORE_ADJ )
  1778.             {
  1779.             ret_val = EOB_ACT_END_OF_FILE;
  1780.             yyrestart( yyin );
  1781.             }
  1782.  
  1783.         else
  1784.             {
  1785.             ret_val = EOB_ACT_LAST_MATCH;
  1786.             yy_current_buffer->yy_buffer_status =
  1787.                 YY_BUFFER_EOF_PENDING;
  1788.             }
  1789.         }
  1790.  
  1791.     else
  1792.         ret_val = EOB_ACT_CONTINUE_SCAN;
  1793.  
  1794.     yy_n_chars += number_to_move;
  1795.     yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
  1796.     yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
  1797.  
  1798.     yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
  1799.  
  1800.     return ret_val;
  1801.     }
  1802.  
  1803.  
  1804. /* yy_get_previous_state - get the state just before the EOB char was reached */
  1805.  
  1806. static yy_state_type yy_get_previous_state()
  1807.     {
  1808.     register yy_state_type yy_current_state;
  1809.     register char *yy_cp;
  1810.  
  1811.     yy_current_state = yy_start;
  1812.  
  1813.     for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
  1814.         {
  1815.         register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
  1816.         if ( yy_accept[yy_current_state] )
  1817.             {
  1818.             yy_last_accepting_state = yy_current_state;
  1819.             yy_last_accepting_cpos = yy_cp;
  1820.             }
  1821.         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1822.             {
  1823.             yy_current_state = (int) yy_def[yy_current_state];
  1824.             if ( yy_current_state >= 610 )
  1825.                 yy_c = yy_meta[(unsigned int) yy_c];
  1826.             }
  1827.         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  1828.         }
  1829.  
  1830.     return yy_current_state;
  1831.     }
  1832.  
  1833.  
  1834. /* yy_try_NUL_trans - try to make a transition on the NUL character
  1835.  *
  1836.  * synopsis
  1837.  *    next_state = yy_try_NUL_trans( current_state );
  1838.  */
  1839.  
  1840. #ifdef YY_USE_PROTOS
  1841. static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
  1842. #else
  1843. static yy_state_type yy_try_NUL_trans( yy_current_state )
  1844. yy_state_type yy_current_state;
  1845. #endif
  1846.     {
  1847.     register int yy_is_jam;
  1848.     register char *yy_cp = yy_c_buf_p;
  1849.  
  1850.     register YY_CHAR yy_c = 1;
  1851.     if ( yy_accept[yy_current_state] )
  1852.         {
  1853.         yy_last_accepting_state = yy_current_state;
  1854.         yy_last_accepting_cpos = yy_cp;
  1855.         }
  1856.     while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1857.         {
  1858.         yy_current_state = (int) yy_def[yy_current_state];
  1859.         if ( yy_current_state >= 610 )
  1860.             yy_c = yy_meta[(unsigned int) yy_c];
  1861.         }
  1862.     yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  1863.     yy_is_jam = (yy_current_state == 609);
  1864.  
  1865.     return yy_is_jam ? 0 : yy_current_state;
  1866.     }
  1867.  
  1868.  
  1869. #ifndef YY_NO_UNPUT
  1870. #ifdef YY_USE_PROTOS
  1871. static void yyunput( int c, register char *yy_bp )
  1872. #else
  1873. static void yyunput( c, yy_bp )
  1874. int c;
  1875. register char *yy_bp;
  1876. #endif
  1877.     {
  1878.     register char *yy_cp = yy_c_buf_p;
  1879.  
  1880.     /* undo effects of setting up yytext */
  1881.     *yy_cp = yy_hold_char;
  1882.  
  1883.     if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
  1884.         { /* need to shift things up to make room */
  1885.         /* +2 for EOB chars. */
  1886.         register int number_to_move = yy_n_chars + 2;
  1887.         register char *dest = &yy_current_buffer->yy_ch_buf[
  1888.                     yy_current_buffer->yy_buf_size + 2];
  1889.         register char *source =
  1890.                 &yy_current_buffer->yy_ch_buf[number_to_move];
  1891.  
  1892.         while ( source > yy_current_buffer->yy_ch_buf )
  1893.             *--dest = *--source;
  1894.  
  1895.         yy_cp += (int) (dest - source);
  1896.         yy_bp += (int) (dest - source);
  1897.         yy_n_chars = yy_current_buffer->yy_buf_size;
  1898.  
  1899.         if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
  1900.             YY_FATAL_ERROR( "flex scanner push-back overflow" );
  1901.         }
  1902.  
  1903.     *--yy_cp = (char) c;
  1904.  
  1905.  
  1906.     yytext_ptr = yy_bp;
  1907.     yy_hold_char = *yy_cp;
  1908.     yy_c_buf_p = yy_cp;
  1909.     }
  1910. #endif    /* ifndef YY_NO_UNPUT */
  1911.  
  1912.  
  1913. #ifdef __cplusplus
  1914. static int yyinput()
  1915. #else
  1916. static int input()
  1917. #endif
  1918.     {
  1919.     int c;
  1920.  
  1921.     *yy_c_buf_p = yy_hold_char;
  1922.  
  1923.     if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
  1924.         {
  1925.         /* yy_c_buf_p now points to the character we want to return.
  1926.          * If this occurs *before* the EOB characters, then it's a
  1927.          * valid NUL; if not, then we've hit the end of the buffer.
  1928.          */
  1929.         if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
  1930.             /* This was really a NUL. */
  1931.             *yy_c_buf_p = '\0';
  1932.  
  1933.         else
  1934.             { /* need more input */
  1935.             int offset = yy_c_buf_p - yytext_ptr;
  1936.             ++yy_c_buf_p;
  1937.  
  1938.             switch ( yy_get_next_buffer() )
  1939.                 {
  1940.                 case EOB_ACT_END_OF_FILE:
  1941.                     {
  1942.                     if ( yywrap() )
  1943.                         {
  1944.                         yy_c_buf_p = yytext_ptr + offset;
  1945.                         return EOF;
  1946.                         }
  1947.  
  1948.                     if ( ! yy_did_buffer_switch_on_eof )
  1949.                         YY_NEW_FILE;
  1950. #ifdef __cplusplus
  1951.                     return yyinput();
  1952. #else
  1953.                     return input();
  1954. #endif
  1955.                     }
  1956.  
  1957.                 case EOB_ACT_CONTINUE_SCAN:
  1958.                     yy_c_buf_p = yytext_ptr + offset;
  1959.                     break;
  1960.  
  1961.                 case EOB_ACT_LAST_MATCH:
  1962. #ifdef __cplusplus
  1963.                     YY_FATAL_ERROR(
  1964.                     "unexpected last match in yyinput()" );
  1965. #else
  1966.                     YY_FATAL_ERROR(
  1967.                     "unexpected last match in input()" );
  1968. #endif
  1969.                 }
  1970.             }
  1971.         }
  1972.  
  1973.     c = *(unsigned char *) yy_c_buf_p;    /* cast for 8-bit char's */
  1974.     *yy_c_buf_p = '\0';    /* preserve yytext */
  1975.     yy_hold_char = *++yy_c_buf_p;
  1976.  
  1977.  
  1978.     return c;
  1979.     }
  1980.  
  1981.  
  1982. #ifdef YY_USE_PROTOS
  1983. void yyrestart( FILE *input_file )
  1984. #else
  1985. void yyrestart( input_file )
  1986. FILE *input_file;
  1987. #endif
  1988.     {
  1989.     if ( ! yy_current_buffer )
  1990.         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
  1991.  
  1992.     yy_init_buffer( yy_current_buffer, input_file );
  1993.     yy_load_buffer_state();
  1994.     }
  1995.  
  1996.  
  1997. #ifdef YY_USE_PROTOS
  1998. void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
  1999. #else
  2000. void yy_switch_to_buffer( new_buffer )
  2001. YY_BUFFER_STATE new_buffer;
  2002. #endif
  2003.     {
  2004.     if ( yy_current_buffer == new_buffer )
  2005.         return;
  2006.  
  2007.     if ( yy_current_buffer )
  2008.         {
  2009.         /* Flush out information for old buffer. */
  2010.         *yy_c_buf_p = yy_hold_char;
  2011.         yy_current_buffer->yy_buf_pos = yy_c_buf_p;
  2012.         yy_current_buffer->yy_n_chars = yy_n_chars;
  2013.         }
  2014.  
  2015.     yy_current_buffer = new_buffer;
  2016.     yy_load_buffer_state();
  2017.  
  2018.     /* We don't actually know whether we did this switch during
  2019.      * EOF (yywrap()) processing, but the only time this flag
  2020.      * is looked at is after yywrap() is called, so it's safe
  2021.      * to go ahead and always set it.
  2022.      */
  2023.     yy_did_buffer_switch_on_eof = 1;
  2024.     }
  2025.  
  2026.  
  2027. #ifdef YY_USE_PROTOS
  2028. void yy_load_buffer_state( void )
  2029. #else
  2030. void yy_load_buffer_state()
  2031. #endif
  2032.     {
  2033.     yy_n_chars = yy_current_buffer->yy_n_chars;
  2034.     yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
  2035.     yyin = yy_current_buffer->yy_input_file;
  2036.     yy_hold_char = *yy_c_buf_p;
  2037.     }
  2038.  
  2039.  
  2040. #ifdef YY_USE_PROTOS
  2041. YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
  2042. #else
  2043. YY_BUFFER_STATE yy_create_buffer( file, size )
  2044. FILE *file;
  2045. int size;
  2046. #endif
  2047.     {
  2048.     YY_BUFFER_STATE b;
  2049.  
  2050.     b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
  2051.     if ( ! b )
  2052.         YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
  2053.  
  2054.     b->yy_buf_size = size;
  2055.  
  2056.     /* yy_ch_buf has to be 2 characters longer than the size given because
  2057.      * we need to put in 2 end-of-buffer characters.
  2058.      */
  2059.     b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
  2060.     if ( ! b->yy_ch_buf )
  2061.         YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
  2062.  
  2063.     b->yy_is_our_buffer = 1;
  2064.  
  2065.     yy_init_buffer( b, file );
  2066.  
  2067.     return b;
  2068.     }
  2069.  
  2070.  
  2071. #ifdef YY_USE_PROTOS
  2072. void yy_delete_buffer( YY_BUFFER_STATE b )
  2073. #else
  2074. void yy_delete_buffer( b )
  2075. YY_BUFFER_STATE b;
  2076. #endif
  2077.     {
  2078.     if ( ! b )
  2079.         return;
  2080.  
  2081.     if ( b == yy_current_buffer )
  2082.         yy_current_buffer = (YY_BUFFER_STATE) 0;
  2083.  
  2084.     if ( b->yy_is_our_buffer )
  2085.         yy_flex_free( (void *) b->yy_ch_buf );
  2086.  
  2087.     yy_flex_free( (void *) b );
  2088.     }
  2089.  
  2090.  
  2091. #ifndef YY_ALWAYS_INTERACTIVE
  2092. #ifndef YY_NEVER_INTERACTIVE
  2093. extern int isatty YY_PROTO(( int ));
  2094. #endif
  2095. #endif
  2096.  
  2097. #ifdef YY_USE_PROTOS
  2098. void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
  2099. #else
  2100. void yy_init_buffer( b, file )
  2101. YY_BUFFER_STATE b;
  2102. FILE *file;
  2103. #endif
  2104.  
  2105.  
  2106.     {
  2107.     yy_flush_buffer( b );
  2108.  
  2109.     b->yy_input_file = file;
  2110.     b->yy_fill_buffer = 1;
  2111.  
  2112. #if YY_ALWAYS_INTERACTIVE
  2113.     b->yy_is_interactive = 1;
  2114. #else
  2115. #if YY_NEVER_INTERACTIVE
  2116.     b->yy_is_interactive = 0;
  2117. #else
  2118.     b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
  2119. #endif
  2120. #endif
  2121.     }
  2122.  
  2123.  
  2124. #ifdef YY_USE_PROTOS
  2125. void yy_flush_buffer( YY_BUFFER_STATE b )
  2126. #else
  2127. void yy_flush_buffer( b )
  2128. YY_BUFFER_STATE b;
  2129. #endif
  2130.  
  2131.     {
  2132.     b->yy_n_chars = 0;
  2133.  
  2134.     /* We always need two end-of-buffer characters.  The first causes
  2135.      * a transition to the end-of-buffer state.  The second causes
  2136.      * a jam in that state.
  2137.      */
  2138.     b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
  2139.     b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
  2140.  
  2141.     b->yy_buf_pos = &b->yy_ch_buf[0];
  2142.  
  2143.     b->yy_at_bol = 1;
  2144.     b->yy_buffer_status = YY_BUFFER_NEW;
  2145.  
  2146.     if ( b == yy_current_buffer )
  2147.         yy_load_buffer_state();
  2148.     }
  2149.  
  2150.  
  2151. #ifndef YY_NO_SCAN_BUFFER
  2152. #ifdef YY_USE_PROTOS
  2153. YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
  2154. #else
  2155. YY_BUFFER_STATE yy_scan_buffer( base, size )
  2156. char *base;
  2157. yy_size_t size;
  2158. #endif
  2159.     {
  2160.     YY_BUFFER_STATE b;
  2161.  
  2162.     if ( size < 2 ||
  2163.          base[size-2] != YY_END_OF_BUFFER_CHAR ||
  2164.          base[size-1] != YY_END_OF_BUFFER_CHAR )
  2165.         /* They forgot to leave room for the EOB's. */
  2166.         return 0;
  2167.  
  2168.     b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
  2169.     if ( ! b )
  2170.         YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
  2171.  
  2172.     b->yy_buf_size = size - 2;    /* "- 2" to take care of EOB's */
  2173.     b->yy_buf_pos = b->yy_ch_buf = base;
  2174.     b->yy_is_our_buffer = 0;
  2175.     b->yy_input_file = 0;
  2176.     b->yy_n_chars = b->yy_buf_size;
  2177.     b->yy_is_interactive = 0;
  2178.     b->yy_at_bol = 1;
  2179.     b->yy_fill_buffer = 0;
  2180.     b->yy_buffer_status = YY_BUFFER_NEW;
  2181.  
  2182.     yy_switch_to_buffer( b );
  2183.  
  2184.     return b;
  2185.     }
  2186. #endif
  2187.  
  2188.  
  2189. #ifndef YY_NO_SCAN_STRING
  2190. #ifdef YY_USE_PROTOS
  2191. YY_BUFFER_STATE yy_scan_string( yyconst char *str )
  2192. #else
  2193. YY_BUFFER_STATE yy_scan_string( str )
  2194. yyconst char *str;
  2195. #endif
  2196.     {
  2197.     int len;
  2198.     for ( len = 0; str[len]; ++len )
  2199.         ;
  2200.  
  2201.     return yy_scan_bytes( str, len );
  2202.     }
  2203. #endif
  2204.  
  2205.  
  2206. #ifndef YY_NO_SCAN_BYTES
  2207. #ifdef YY_USE_PROTOS
  2208. YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
  2209. #else
  2210. YY_BUFFER_STATE yy_scan_bytes( bytes, len )
  2211. yyconst char *bytes;
  2212. int len;
  2213. #endif
  2214.     {
  2215.     YY_BUFFER_STATE b;
  2216.     char *buf;
  2217.     yy_size_t n;
  2218.     int i;
  2219.  
  2220.     /* Get memory for full buffer, including space for trailing EOB's. */
  2221.     n = len + 2;
  2222.     buf = (char *) yy_flex_alloc( n );
  2223.     if ( ! buf )
  2224.         YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
  2225.  
  2226.     for ( i = 0; i < len; ++i )
  2227.         buf[i] = bytes[i];
  2228.  
  2229.     buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
  2230.  
  2231.     b = yy_scan_buffer( buf, n );
  2232.     if ( ! b )
  2233.         YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
  2234.  
  2235.     /* It's okay to grow etc. this buffer, and we should throw it
  2236.      * away when we're done.
  2237.      */
  2238.     b->yy_is_our_buffer = 1;
  2239.  
  2240.     return b;
  2241.     }
  2242. #endif
  2243.  
  2244.  
  2245. #ifndef YY_NO_PUSH_STATE
  2246. #ifdef YY_USE_PROTOS
  2247. static void yy_push_state( int new_state )
  2248. #else
  2249. static void yy_push_state( new_state )
  2250. int new_state;
  2251. #endif
  2252.     {
  2253.     if ( yy_start_stack_ptr >= yy_start_stack_depth )
  2254.         {
  2255.         yy_size_t new_size;
  2256.  
  2257.         yy_start_stack_depth += YY_START_STACK_INCR;
  2258.         new_size = yy_start_stack_depth * sizeof( int );
  2259.  
  2260.         if ( ! yy_start_stack )
  2261.             yy_start_stack = (int *) yy_flex_alloc( new_size );
  2262.  
  2263.         else
  2264.             yy_start_stack = (int *) yy_flex_realloc(
  2265.                     (void *) yy_start_stack, new_size );
  2266.  
  2267.         if ( ! yy_start_stack )
  2268.             YY_FATAL_ERROR(
  2269.             "out of memory expanding start-condition stack" );
  2270.         }
  2271.  
  2272.     yy_start_stack[yy_start_stack_ptr++] = YY_START;
  2273.  
  2274.     BEGIN(new_state);
  2275.     }
  2276. #endif
  2277.  
  2278.  
  2279. #ifndef YY_NO_POP_STATE
  2280. static void yy_pop_state()
  2281.     {
  2282.     if ( --yy_start_stack_ptr < 0 )
  2283.         YY_FATAL_ERROR( "start-condition stack underflow" );
  2284.  
  2285.     BEGIN(yy_start_stack[yy_start_stack_ptr]);
  2286.     }
  2287. #endif
  2288.  
  2289.  
  2290. #ifndef YY_NO_TOP_STATE
  2291. static int yy_top_state()
  2292.     {
  2293.     return yy_start_stack[yy_start_stack_ptr - 1];
  2294.     }
  2295. #endif
  2296.  
  2297. #ifndef YY_EXIT_FAILURE
  2298. #define YY_EXIT_FAILURE 2
  2299. #endif
  2300.  
  2301. #ifdef YY_USE_PROTOS
  2302. static void yy_fatal_error( yyconst char msg[] )
  2303. #else
  2304. static void yy_fatal_error( msg )
  2305. char msg[];
  2306. #endif
  2307.     {
  2308.     (void) fprintf( stderr, "%s\n", msg );
  2309.     exit( YY_EXIT_FAILURE );
  2310.     }
  2311.  
  2312.  
  2313.  
  2314. /* Redefine yyless() so it works in section 3 code. */
  2315.  
  2316. #undef yyless
  2317. #define yyless(n) \
  2318.     do \
  2319.         { \
  2320.         /* Undo effects of setting up yytext. */ \
  2321.         yytext[yyleng] = yy_hold_char; \
  2322.         yy_c_buf_p = yytext + n; \
  2323.         yy_hold_char = *yy_c_buf_p; \
  2324.         *yy_c_buf_p = '\0'; \
  2325.         yyleng = n; \
  2326.         } \
  2327.     while ( 0 )
  2328.  
  2329.  
  2330. /* Internal utility routines. */
  2331.  
  2332. #ifndef yytext_ptr
  2333. #ifdef YY_USE_PROTOS
  2334. static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
  2335. #else
  2336. static void yy_flex_strncpy( s1, s2, n )
  2337. char *s1;
  2338. yyconst char *s2;
  2339. int n;
  2340. #endif
  2341.     {
  2342.     register int i;
  2343.     for ( i = 0; i < n; ++i )
  2344.         s1[i] = s2[i];
  2345.     }
  2346. #endif
  2347.  
  2348. #ifdef YY_NEED_STRLEN
  2349. #ifdef YY_USE_PROTOS
  2350. static int yy_flex_strlen( yyconst char *s )
  2351. #else
  2352. static int yy_flex_strlen( s )
  2353. yyconst char *s;
  2354. #endif
  2355.     {
  2356.     register int n;
  2357.     for ( n = 0; s[n]; ++n )
  2358.         ;
  2359.  
  2360.     return n;
  2361.     }
  2362. #endif
  2363.  
  2364.  
  2365. #ifdef YY_USE_PROTOS
  2366. static void *yy_flex_alloc( yy_size_t size )
  2367. #else
  2368. static void *yy_flex_alloc( size )
  2369. yy_size_t size;
  2370. #endif
  2371.     {
  2372.     return (void *) malloc( size );
  2373.     }
  2374.  
  2375. #ifdef YY_USE_PROTOS
  2376. static void *yy_flex_realloc( void *ptr, yy_size_t size )
  2377. #else
  2378. static void *yy_flex_realloc( ptr, size )
  2379. void *ptr;
  2380. yy_size_t size;
  2381. #endif
  2382.     {
  2383.     /* The cast to (char *) in the following accommodates both
  2384.      * implementations that use char* generic pointers, and those
  2385.      * that use void* generic pointers.  It works with the latter
  2386.      * because both ANSI C and C++ allow castless assignment from
  2387.      * any pointer type to void*, and deal with argument conversions
  2388.      * as though doing an assignment.
  2389.      */
  2390.     return (void *) realloc( (char *) ptr, size );
  2391.     }
  2392.  
  2393. #ifdef YY_USE_PROTOS
  2394. static void yy_flex_free( void *ptr )
  2395. #else
  2396. static void yy_flex_free( ptr )
  2397. void *ptr;
  2398. #endif
  2399.     {
  2400.     free( (char *) ptr );
  2401.     /* see above note in yy_flex_realloc regarding cast */
  2402.     }
  2403.  
  2404. #if YY_MAIN
  2405. int main()
  2406.     {
  2407.     yylex();
  2408.     return 0;
  2409.     }
  2410. #endif
  2411.  
  2412. void drvbase::yylexcleanup()
  2413. {
  2414. //    if (yy_state_buf) yy_flex_free(yy_state_buf);
  2415.     yy_delete_buffer( yy_current_buffer );
  2416. }
  2417.  
  2418.