home *** CD-ROM | disk | FTP | other *** search
/ Frostbyte's 1980s DOS Shareware Collection / floppyshareware.zip / floppyshareware / FORTH / FLEX.ARC / SCAN.C < prev    next >
Text File  |  1988-10-09  |  37KB  |  1,320 lines

  1. #define YY_DEFAULT_ACTION YY_FATAL_ERROR( "flex scanner jammed" );
  2. #define FLEX_USE_ECS
  3. #define FLEX_USE_MECS
  4. /* A lexical scanner generated by flex */
  5.  
  6. #ifndef MSDOS
  7. # include "flexskeldef.h"
  8. #else
  9. # include "flexsdef.h"
  10. #endif
  11.  
  12. # line 1 "scan.l"
  13. #define INITIAL 0
  14. /* scan.l - scanner for flex input */
  15. /*
  16.  * Copyright (c) 1987, the University of California
  17.  *
  18.  * The United States Government has rights in this work pursuant to
  19.  * contract no. DE-AC03-76SF00098 between the United States Department of
  20.  * Energy and the University of California.
  21.  *
  22.  * This program may be redistributed.  Enhancements and derivative works
  23.  * may be created provided the new works, if made available to the general
  24.  * public, are made available for use by anyone.
  25.  */
  26. # line 16 "scan.l"
  27. #include "flexdef.h"
  28. #include "parse.h"
  29.  
  30. #define ACTION_ECHO fprintf( temp_action_file, "%s", yytext )
  31. #define MARK_END_OF_PROLOG fprintf( temp_action_file, "%%%% end of prolog\n" );
  32.  
  33. #undef YY_DECL
  34. #define YY_DECL \
  35.     int flexscan()
  36.  
  37. #define RETURNCHAR \
  38.     yylval = yytext[0]; \
  39.     return ( CHAR );
  40.  
  41. #define RETURNNAME \
  42.     (void) strcpy( nmstr, yytext ); \
  43.     return ( NAME );
  44.  
  45. #define PUT_BACK_STRING(str, start) \
  46.     for ( i = strlen( str ) - 1; i >= start; --i ) \
  47.         unput(str[i])
  48. #define SECT2 2
  49. #define SECT2PROLOG 4
  50. #define SECT3 6
  51. #define CODEBLOCK 8
  52. #define PICKUPDEF 10
  53. #define SC 12
  54. #define CARETISBOL 14
  55. #define NUM 16
  56. #define QUOTE 18
  57. #define FIRSTCCL 20
  58. #define CCL 22
  59. #define ACTION 24
  60. #define RECOVER 26
  61. #define BRACEERROR 28
  62. #define C_COMMENT 30
  63. #define C_COMMENT_2 32
  64. #define ACTION_COMMENT 34
  65. #define ACTION_STRING 36
  66. #define PERCENT_BRACE_ACTION 38
  67. # line 53 "scan.l"
  68. #define YY_JAM 226
  69. #define YY_JAM_BASE 800
  70. #define YY_TEMPLATE 227
  71. static char l[227] =
  72.     {    0,
  73.        -2,   -2,   -2,     -2,   -2,   -2,   -2,     -2,   -2,   -2,
  74.        -2,   -2,   -2,     -2,   -2,   -2,   -2,     -2,   -2,   -2,
  75.        -2,   -2,   -2,     -2,   -2,   -2,   -2,     -2,   -2,   -2,
  76.        -2,   -2,   -2,     -2,   -2,   -2,   -2,     -2,   -2,   -2,
  77.        14,    7,   13,     11,    7,   12,   14,     14,   14,   10,
  78.        46,   39,   40,     32,   46,   45,   30,     46,   46,   46,
  79.        39,   28,   46,     45,   31,    0,   27,     99,    0,   21,
  80.     0,   23,   22,     24,   52,   48,   49,     51,   53,   67,
  81.        68,   65,   64,     66,   54,   56,   55,     54,   60,   59,
  82.        60,   60,   62,     62,   62,   63,   76,     80,   79,   81,
  83.  
  84.        81,   74,   75,      0,   25,   70,   69,     17,   19,   18,
  85.        89,   91,   90,     83,   85,   84,   92,     94,   95,   96,
  86.        72,   72,   73,     72,    7,   11,    0,      7,    1,    0,
  87.     2,    0,    8,      4,    5,    0,    3,     10,   39,   40,
  88.     0,    0,   35,      0,    0,   97,   97,      0,   34,   33,
  89.        34,    0,   39,     28,    0,    0,    0,     42,   38,   26,
  90.     0,   23,   50,     51,   64,   98,   98,      0,   57,   58,
  91.        61,   76,    0,     78,    0,   77,   15,     87,   83,   82,
  92.        92,   93,   71,      1,    0,    9,    8,      0,    0,    6,
  93.        36,    0,   37,     43,    0,    0,   97,     34,   34,   44,
  94.  
  95.        29,    0,   36,      0,   29,    0,   42,      0,   20,   98,
  96.     0,   16,    0,     88,   71,    0,    0,     97,   98,    0,
  97.     0,   97,   98,      4,    0,    0
  98.     } ;
  99.  
  100. static char e[128] =
  101.     {    0,
  102.     1,    1,    1,      1,    1,    1,    1,      1,    2,    3,
  103.     1,    1,    1,      1,    1,    1,    1,      1,    1,    1,
  104.     1,    1,    1,      1,    1,    1,    1,      1,    1,    1,
  105.     1,    2,    1,      4,    5,    6,    7,      1,    8,    9,
  106.     9,   10,    9,     11,   12,    9,   13,     14,   15,   15,
  107.        15,   15,   15,     15,   15,   15,   15,      1,    1,   16,
  108.     1,   17,    9,      1,   23,   22,   22,     22,   22,   22,
  109.        22,   22,   22,     22,   22,   22,   22,     22,   22,   22,
  110.        22,   24,   25,     26,   22,   22,   22,     27,   22,   22,
  111.        18,   19,   20,     21,   22,    1,   23,     22,   22,   22,
  112.  
  113.        22,   22,   22,     22,   22,   22,   22,     22,   22,   22,
  114.        22,   22,   22,     24,   25,   26,   22,     22,   22,   27,
  115.        22,   22,   28,     29,   30,    1,    1
  116.     } ;
  117.  
  118. static char m[31] =
  119.     {    0,
  120.     1,    2,    3,      4,    1,    1,    1,      5,    1,    6,
  121.     1,    1,    5,      7,    7,    1,    1,      1,    8,    9,
  122.     1,    7,    7,      7,    7,    7,    7,      5,    1,   10
  123.     } ;
  124.  
  125. static short int b[276] =
  126.     {    0,
  127.     0,   26,   52,     80,  286,  285,    0,      0,  284,    1,
  128.     3,    7,   99,    116,  265,  264,  141,    169,   11,   13,
  129.     0,   22,   25,     47,  197,  225,  281,    280,    8,   10,
  130.        32,   54,   66,     69,   75,   85,   88,     99,  110,  112,
  131.       800,  280,  800,      0,   44,  800,  277,    104,  269,    0,
  132.       800,  144,  800,    800,   71,  800,  800,    259,   83,  242,
  133.       268,  800,  270,    266,  800,  271,    0,    800,  270,  800,
  134.        33,    0,  270,    800,  800,  800,  242,      0,  800,  800,
  135.       800,  800,   91,    800,  800,  800,  800,    114,  800,  800,
  136.       116,  250,  800,      0,  136,  800,    0,    800,  800,  126,
  137.  
  138.       251,  800,  800,    257,  800,  800,  800,    150,  800,  246,
  139.       151,  800,  245,      0,  800,  241,    0,    800,  800,    0,
  140.       249,  156,  800,    145,  249,    0,  247,    162,  800,  246,
  141.       800,  245,    0,    219,  800,  234,  800,      0,  167,  800,
  142.       206,  229,  800,    147,  165,  800,  162,      0,    0,  800,
  143.       284,  165,  313,    800,  178,  179,  184,      0,  800,  800,
  144.       218,    0,  800,      0,  178,  800,  180,      0,  800,  800,
  145.       800,    0,  190,    800,    0,  800,  216,    187,    0,  800,
  146.     0,  800,    0,    800,  185,  800,    0,    139,  146,  800,
  147.       800,  133,  800,    800,  188,  100,  197,      0,    0,  800,
  148.  
  149.       800,  210,  201,    213,  800,  212,    0,     97,  800,  203,
  150.        91,  800,   74,    800,    0,   51,  216,    209,  225,   34,
  151.       227,  800,  800,    800,  224,  800,  342,    352,  362,  372,
  152.       382,  392,  402,    412,  422,  432,  442,    452,  462,  472,
  153.       482,  492,  502,    512,   13,  522,  532,    542,   11,  552,
  154.       562,  572,  582,    592,  602,    0,  612,    622,  632,  642,
  155.       651,  661,  671,    681,  691,  701,  711,    721,  731,  740,
  156.       750,  760,  770,    780,  790
  157.     } ;
  158.  
  159. static short int d[276] =
  160.     {    0,
  161.       227,  227,  228,    228,  229,  229,  230,    230,  231,  231,
  162.       232,  232,  233,    233,  226,  226,  234,    234,  235,  235,
  163.       236,  236,  237,    237,  238,  238,  239,    239,  226,  226,
  164.       240,  240,  241,    241,  242,  242,  243,    243,  244,  244,
  165.       226,  226,  226,    245,  246,  226,  247,    248,  226,  249,
  166.       226,  226,  226,    226,  226,  226,  226,    250,  251,  252,
  167.       253,  226,  226,    226,  226,  229,  254,    226,  231,  226,
  168.       231,  255,  226,    226,  226,  226,  226,    256,  226,  226,
  169.       226,  226,  226,    226,  226,  226,  226,    251,  226,  226,
  170.       257,  258,  226,    259,  251,  226,  260,    226,  226,  261,
  171.  
  172.       226,  226,  226,    239,  226,  226,  226,    240,  226,  226,
  173.       241,  226,  226,    262,  226,  226,  263,    226,  226,  264,
  174.       244,  244,  226,    244,  226,  245,  246,    246,  226,  247,
  175.       226,  265,  266,    226,  226,  267,  226,    249,  226,  226,
  176.       226,  268,  226,    250,  250,  226,  226,    251,  269,  226,
  177.       269,  253,  253,    226,  253,  253,  270,    271,  226,  226,
  178.       272,  255,  226,    256,  226,  226,  226,    257,  226,  226,
  179.       226,  260,  261,    226,  261,  226,  273,    274,  262,  226,
  180.       263,  226,  275,    226,  265,  226,  266,    226,  267,  226,
  181.       226,  268,  226,    226,  250,  250,  226,    269,  151,  226,
  182.  
  183.       226,  253,  253,    270,  226,  270,  271,    272,  226,  226,
  184.       273,  226,  274,    226,  275,  226,  250,    226,  226,  226,
  185.       250,  226,  226,    226,  250,-32767,  226,  226,  226,  226,
  186.       226,  226,  226,    226,  226,  226,  226,    226,  226,  226,
  187.       226,  226,  226,    226,  226,  226,  226,    226,  226,  226,
  188.       226,  226,  226,    226,  226,  226,  226,    226,  226,  226,
  189.       226,  226,  226,    226,  226,  226,  226,    226,  226,  226,
  190.       226,  226,  226,    226,  226
  191.     } ;
  192.  
  193. static short int n[831] =
  194.     {    0,
  195.       226,   42,   43,     70,   73,   74,  164,     71,   73,   74,
  196.       106,   90,  106,     86,   87,   86,   87,    138,   91,  126,
  197.        92,   44,   44,     44,   44,   44,   44,     45,   46,   88,
  198.        47,   88,   48,     90,  109,   70,   94,    107,   49,  107,
  199.        91,  110,   92,     95,   96,  128,  129,     50,   50,   50,
  200.        50,   50,   50,     52,   53,   54,  109,     55,   94,  224,
  201.        56,   56,  161,    110,   56,   95,   96,     57,  112,   58,
  202.        59,  112,  143,    143,  220,  113,  214,    115,  113,   60,
  203.        56,   61,   62,     54,  116,   55,   63,    115,   56,   56,
  204.       118,  119,   64,    212,  116,   57,  147,     58,   59,  209,
  205.  
  206.        65,  118,  119,    148,  165,  165,  120,     60,   56,   76,
  207.       133,  122,  123,    122,  123,   77,  124,    120,  124,  144,
  208.        78,   78,   78,     78,   78,   78,   76,    147,  134,  167,
  209.       135,  136,   77,    174,  148,  193,  168,     78,   78,   78,
  210.        78,   78,   78,     81,  175,  139,  140,    226,  190,  147,
  211.       141,   82,  226,    226,   83,   83,  148,    122,  226,  226,
  212.       226,  216,  124,    128,  129,  145,  194,    201,  139,  140,
  213.        84,   81,  142,    141,  183,  197,  197,    202,  195,   82,
  214.       201,  201,   83,     83,  144,  196,  205,    186,  159,  214,
  215.       202,  165,  165,    210,  210,  142,  206,    174,   84,   98,
  216.  
  217.        99,  217,  217,    201,  100,  203,  145,    194,  175,  101,
  218.       218,  218,  201,    202,  205,  205,  219,    219,  212,  226,
  219.       209,  192,  222,    222,  102,  206,  103,     98,   99,  221,
  220.       221,  193,  100,    191,  145,  194,  190,    101,  223,  223,
  221.       225,  225,  145,    194,  188,  145,  194,    186,  131,  184,
  222.       125,  226,  102,    180,  103,  150,  150,    178,  177,  105,
  223.       176,  170,  163,    151,  151,  151,  151,    151,  151,  153,
  224.       154,   73,   70,     67,  155,  159,  158,    145,  137,  131,
  225.       156,  125,  105,    105,   79,   79,   70,     67,   67,  226,
  226.       226,  226,  226,    226,  226,  226,  157,    199,  199,  226,
  227.  
  228.       226,  226,  226,    226,  226,  199,  199,    199,  199,  199,
  229.       199,  226,  226,    200,  153,  154,  226,    226,  226,  155,
  230.       226,  226,  226,    226,  226,  156,  226,    226,  226,  226,
  231.       226,  226,  226,    226,  226,  226,  226,    226,  226,  226,
  232.       226,  157,   41,     41,   41,   41,   41,     41,   41,   41,
  233.        41,   41,   51,     51,   51,   51,   51,     51,   51,   51,
  234.        51,   51,   66,     66,   66,   66,   66,     66,   66,   66,
  235.        66,   66,   68,     68,   68,   68,   68,     68,   68,   68,
  236.        68,   68,   69,     69,   69,   69,   69,     69,   69,   69,
  237.        69,   69,   72,     72,   72,   72,   72,     72,   72,   72,
  238.  
  239.        72,   72,   75,     75,  226,   75,   75,     75,   75,   75,
  240.        75,   75,   80,     80,   80,   80,   80,     80,   80,   80,
  241.        80,   80,   85,     85,   85,   85,   85,     85,   85,   85,
  242.        85,   85,   89,     89,  226,   89,   89,     89,   89,   89,
  243.        89,   89,   93,     93,  226,   93,   93,     93,   93,   93,
  244.        93,   93,   97,     97,   97,   97,   97,     97,   97,   97,
  245.        97,   97,  104,    104,  104,  104,  104,    104,  104,  104,
  246.       104,  104,  108,    108,  108,  108,  108,    108,  108,  108,
  247.       108,  108,  111,    111,  111,  111,  111,    111,  111,  111,
  248.       111,  111,  114,    114,  114,  114,  114,    114,  114,  114,
  249.  
  250.       114,  114,  117,    117,  117,  117,  117,    117,  117,  117,
  251.       117,  117,  121,    121,  121,  121,  121,    121,  121,  121,
  252.       121,  121,  127,    127,  127,  127,  127,    127,  127,  127,
  253.       127,  127,  130,    130,  130,  130,  130,    130,  130,  130,
  254.       130,  130,  132,    132,  132,  132,  132,    132,  132,  132,
  255.       132,  132,  144,    144,  226,  144,  144,    144,  144,  144,
  256.       226,  144,  146,    146,  226,  146,  146,    146,  146,  146,
  257.       146,  146,  149,    149,  226,  149,  149,    149,  149,  149,
  258.       149,  149,  152,    152,  152,  152,  152,    152,  152,  152,
  259.       152,  152,  160,    226,  226,  160,  160,    160,  160,  160,
  260.  
  261.       160,  160,  162,    162,  226,  162,  162,    162,  162,  162,
  262.       162,  162,  166,    166,  226,  166,  166,    166,  166,  166,
  263.       166,  166,  169,    169,  226,  169,  169,    169,  169,  169,
  264.       169,  169,  171,    171,  226,  171,  171,    171,  171,  171,
  265.       226,  171,  172,    172,  226,  226,  226,    172,  172,  172,
  266.       172,  173,  173,    226,  173,  173,  173,    173,  173,  173,
  267.       173,  179,  179,    226,  179,  179,  226,    179,  179,  179,
  268.       179,  181,  181,    226,  226,  181,  181,    181,  226,  181,
  269.       181,  182,  182,    226,  182,  182,  182,    182,  182,  182,
  270.       182,  185,  185,    185,  185,  185,  185,    185,  185,  185,
  271.  
  272.       185,  187,  187,    226,  187,  187,  187,    187,  187,  187,
  273.       187,  189,  189,    189,  189,  189,  189,    189,  189,  189,
  274.       189,  192,  192,    192,  192,  192,  192,    192,  192,  192,
  275.       192,  198,  198,    226,  198,  198,  198,    198,  198,  198,
  276.       204,  204,  204,    204,  204,  204,  204,    204,  204,  204,
  277.       207,  207,  226,    207,  207,  207,  207,    207,  207,  207,
  278.       208,  208,  208,    208,  208,  208,  208,    208,  208,  208,
  279.       211,  211,  211,    211,  211,  211,  211,    211,  211,  211,
  280.       213,  213,  213,    213,  213,  213,  213,    213,  213,  213,
  281.       215,  215,  226,    215,  215,  215,  215,    215,  215,  215,
  282.  
  283.       226,  226,  226,    226,  226,  226,  226,    226,  226,  226,
  284.       226,  226,  226,    226,  226,  226,  226,    226,  226,  226,
  285.       226,  226,  226,    226,  226,  226,  226,    226,  226,  226
  286.     } ;
  287.  
  288. static short int c[831] =
  289.     {    0,
  290.     0,    1,    1,     10,   11,   11,  256,     10,   12,   12,
  291.        29,   21,   30,     19,   19,   20,   20,    249,   21,  245,
  292.        21,    1,    1,      1,    1,    1,    1,      2,    2,   19,
  293.     2,   20,    2,     22,   31,   71,   23,     29,    2,   30,
  294.        22,   31,   22,     23,   23,   45,   45,      2,    2,    2,
  295.     2,    2,    2,      3,    3,    3,   32,      3,   24,  220,
  296.     3,    3,   71,     32,    3,   24,   24,      3,   33,    3,
  297.     3,   34,   55,     55,  216,   33,  213,     35,   34,    3,
  298.     3,    4,    4,      4,   35,    4,    4,     36,    4,    4,
  299.        37,   37,    4,    211,   36,    4,   59,      4,    4,  208,
  300.  
  301.     4,   38,   38,     59,   83,   83,   37,      4,    4,   13,
  302.        48,   39,   39,     40,   40,   13,   39,     38,   40,  196,
  303.        13,   13,   13,     13,   13,   13,   14,     88,   48,   91,
  304.        48,   48,   14,    100,   88,  192,   91,     14,   14,   14,
  305.        14,   14,   14,     17,  100,   52,   52,    124,  189,   95,
  306.        52,   17,  108,    111,   17,   17,   95,    122,  122,  108,
  307.       111,  188,  122,    128,  128,  144,  144,    152,  139,  139,
  308.        17,   18,   52,    139,  124,  147,  147,    152,  145,   18,
  309.       155,  156,   18,     18,  145,  145,  157,    185,  156,  178,
  310.       155,  165,  165,    167,  167,  139,  157,    173,   18,   25,
  311.  
  312.        25,  195,  195,    203,   25,  155,  195,    195,  173,   25,
  313.       197,  197,  202,    203,  206,  204,  210,    210,  177,  202,
  314.       161,  206,  218,    218,   25,  204,   25,     26,   26,  217,
  315.       217,  142,   26,    141,  217,  217,  136,     26,  219,  219,
  316.       221,  221,  225,    225,  134,  221,  221,    132,  130,  127,
  317.       125,  121,   26,    116,   26,   60,   60,    113,  110,  104,
  318.       101,   92,   77,     60,   60,   60,   60,     60,   60,   61,
  319.        61,   73,   69,     66,   61,   64,   63,     58,   49,   47,
  320.        61,   42,   28,     27,   16,   15,    9,      6,    5,    0,
  321.     0,    0,    0,      0,    0,    0,   61,    151,  151,    0,
  322.  
  323.     0,    0,    0,      0,    0,  151,  151,    151,  151,  151,
  324.       151,    0,    0,    151,  153,  153,    0,      0,    0,  153,
  325.     0,    0,    0,      0,    0,  153,    0,      0,    0,    0,
  326.     0,    0,    0,      0,    0,    0,    0,      0,    0,    0,
  327.     0,  153,  227,    227,  227,  227,  227,    227,  227,  227,
  328.       227,  227,  228,    228,  228,  228,  228,    228,  228,  228,
  329.       228,  228,  229,    229,  229,  229,  229,    229,  229,  229,
  330.       229,  229,  230,    230,  230,  230,  230,    230,  230,  230,
  331.       230,  230,  231,    231,  231,  231,  231,    231,  231,  231,
  332.       231,  231,  232,    232,  232,  232,  232,    232,  232,  232,
  333.  
  334.       232,  232,  233,    233,    0,  233,  233,    233,  233,  233,
  335.       233,  233,  234,    234,  234,  234,  234,    234,  234,  234,
  336.       234,  234,  235,    235,  235,  235,  235,    235,  235,  235,
  337.       235,  235,  236,    236,    0,  236,  236,    236,  236,  236,
  338.       236,  236,  237,    237,    0,  237,  237,    237,  237,  237,
  339.       237,  237,  238,    238,  238,  238,  238,    238,  238,  238,
  340.       238,  238,  239,    239,  239,  239,  239,    239,  239,  239,
  341.       239,  239,  240,    240,  240,  240,  240,    240,  240,  240,
  342.       240,  240,  241,    241,  241,  241,  241,    241,  241,  241,
  343.       241,  241,  242,    242,  242,  242,  242,    242,  242,  242,
  344.  
  345.       242,  242,  243,    243,  243,  243,  243,    243,  243,  243,
  346.       243,  243,  244,    244,  244,  244,  244,    244,  244,  244,
  347.       244,  244,  246,    246,  246,  246,  246,    246,  246,  246,
  348.       246,  246,  247,    247,  247,  247,  247,    247,  247,  247,
  349.       247,  247,  248,    248,  248,  248,  248,    248,  248,  248,
  350.       248,  248,  250,    250,    0,  250,  250,    250,  250,  250,
  351.     0,  250,  251,    251,    0,  251,  251,    251,  251,  251,
  352.       251,  251,  252,    252,    0,  252,  252,    252,  252,  252,
  353.       252,  252,  253,    253,  253,  253,  253,    253,  253,  253,
  354.       253,  253,  254,      0,    0,  254,  254,    254,  254,  254,
  355.  
  356.       254,  254,  255,    255,    0,  255,  255,    255,  255,  255,
  357.       255,  255,  257,    257,    0,  257,  257,    257,  257,  257,
  358.       257,  257,  258,    258,    0,  258,  258,    258,  258,  258,
  359.       258,  258,  259,    259,    0,  259,  259,    259,  259,  259,
  360.     0,  259,  260,    260,    0,    0,    0,    260,  260,  260,
  361.       260,  261,  261,      0,  261,  261,  261,    261,  261,  261,
  362.       261,  262,  262,      0,  262,  262,    0,    262,  262,  262,
  363.       262,  263,  263,      0,    0,  263,  263,    263,    0,  263,
  364.       263,  264,  264,      0,  264,  264,  264,    264,  264,  264,
  365.       264,  265,  265,    265,  265,  265,  265,    265,  265,  265,
  366.  
  367.       265,  266,  266,      0,  266,  266,  266,    266,  266,  266,
  368.       266,  267,  267,    267,  267,  267,  267,    267,  267,  267,
  369.       267,  268,  268,    268,  268,  268,  268,    268,  268,  268,
  370.       268,  269,  269,      0,  269,  269,  269,    269,  269,  269,
  371.       270,  270,  270,    270,  270,  270,  270,    270,  270,  270,
  372.       271,  271,    0,    271,  271,  271,  271,    271,  271,  271,
  373.       272,  272,  272,    272,  272,  272,  272,    272,  272,  272,
  374.       273,  273,  273,    273,  273,  273,  273,    273,  273,  273,
  375.       274,  274,  274,    274,  274,  274,  274,    274,  274,  274,
  376.       275,  275,    0,    275,  275,  275,  275,    275,  275,  275,
  377.  
  378.       226,  226,  226,    226,  226,  226,  226,    226,  226,  226,
  379.       226,  226,  226,    226,  226,  226,  226,    226,  226,  226,
  380.       226,  226,  226,    226,  226,  226,  226,    226,  226,  226
  381.     } ;
  382.  
  383.  
  384. /* these declarations have to come after the section 1 code or lint gets
  385.  * confused about whether the variables are used
  386.  */
  387. FILE *yyin = stdin, *yyout = stdout;
  388.  
  389. /* these variables are all declared out here so that section 3 code can
  390.  * manipulate them
  391.  */
  392. static int yy_start, yy_b_buf_p, yy_c_buf_p, yy_e_buf_p;
  393. static int yy_saw_eof, yy_init = 1;
  394.  
  395. /* yy_ch_buf has to be 1 character longer than YY_BUF_SIZE, since when
  396.  * setting up yytext we can try to put a '\0' just past the end of the
  397.  * matched text
  398.  */
  399. static char yy_ch_buf[YY_BUF_SIZE + 1];
  400. static int yy_st_buf[YY_BUF_SIZE];
  401. static char yy_hold_char;
  402. char *yytext;
  403. static int yyleng;
  404.  
  405. YY_DECL
  406.     {
  407.     int yy_n_chars, yy_lp, yy_iii, yy_buf_pos, yy_act;
  408.  
  409.  
  410.     static int bracelevel, didadef;
  411.     int i, cclval;
  412.     char nmdef[MAXLINE], myesc();
  413.  
  414.  
  415.     if ( yy_init )
  416.     {
  417.     YY_INIT;
  418.     yy_start = 1;
  419.     yy_init = 0;
  420.     }
  421.  
  422.     goto get_next_token;
  423.  
  424. do_action:
  425.     for ( ; ; )
  426.     {
  427.     YY_DO_BEFORE_ACTION
  428.  
  429. #ifdef FLEX_DEBUG
  430.     fprintf( stderr, "--accepting rule #%d\n", yy_act );
  431. #endif
  432.     switch ( yy_act )
  433.         {
  434. case 1:
  435. # line 58 "scan.l"
  436. ++linenum; ECHO; /* indented code */
  437.     YY_BREAK
  438. case 2:
  439. # line 59 "scan.l"
  440. ++linenum; ECHO; /* treat as a comment */
  441.     YY_BREAK
  442. case 3:
  443. # line 60 "scan.l"
  444. ECHO; BEGIN(C_COMMENT);
  445.     YY_BREAK
  446. case 4:
  447. # line 61 "scan.l"
  448. return ( SCDECL );
  449.     YY_BREAK
  450. case 5:
  451. # line 62 "scan.l"
  452. return ( XSCDECL );
  453.     YY_BREAK
  454. case 6:
  455. # line 63 "scan.l"
  456. ++linenum; line_directive_out( stdout ); BEGIN(CODEBLOCK);
  457.     YY_BREAK
  458. case 7:
  459. # line 64 "scan.l"
  460. return ( WHITESPACE );
  461.     YY_BREAK
  462. case 8:
  463. # line 66 "scan.l"
  464. {
  465.             sectnum = 2;
  466.             line_directive_out( stdout );
  467.             BEGIN(SECT2PROLOG);
  468.             return ( SECTEND );
  469.             }
  470.     YY_BREAK
  471. case 9:
  472. # line 73 "scan.l"
  473. {
  474.             fprintf( stderr,
  475.                  "old-style lex command at line %d ignored:\n\t%s",
  476.                  linenum, yytext );
  477.             ++linenum;
  478.             }
  479.     YY_BREAK
  480. case 10:
  481. # line 80 "scan.l"
  482. {
  483.             (void) strcpy( nmstr, yytext );
  484.             didadef = false;
  485.             BEGIN(PICKUPDEF);
  486.             }
  487.     YY_BREAK
  488. case 11:
  489. # line 86 "scan.l"
  490. RETURNNAME;
  491.     YY_BREAK
  492. case 12:
  493. # line 87 "scan.l"
  494. ++linenum; /* allows blank lines in section 1 */
  495.     YY_BREAK
  496. case 13:
  497. # line 88 "scan.l"
  498. ++linenum; return ( '\n' );
  499.     YY_BREAK
  500. case 14:
  501. # line 89 "scan.l"
  502. synerr( "illegal character" ); BEGIN(RECOVER);
  503.     YY_BREAK
  504. case 15:
  505. # line 92 "scan.l"
  506. ECHO; BEGIN(0);
  507.     YY_BREAK
  508. case 16:
  509. # line 93 "scan.l"
  510. ++linenum; ECHO; BEGIN(0);
  511.     YY_BREAK
  512. case 17:
  513. # line 94 "scan.l"
  514. ECHO;
  515.     YY_BREAK
  516. case 18:
  517. # line 95 "scan.l"
  518. ECHO;
  519.     YY_BREAK
  520. case 19:
  521. # line 96 "scan.l"
  522. ++linenum; ECHO;
  523.     YY_BREAK
  524. case 20:
  525. # line 98 "scan.l"
  526. ++linenum; BEGIN(0);
  527.     YY_BREAK
  528. case 21:
  529. # line 99 "scan.l"
  530. ++linenum; ECHO;
  531.     YY_BREAK
  532. case 22:
  533. # line 101 "scan.l"
  534. /* separates name and definition */
  535.     YY_BREAK
  536. case 23:
  537. # line 103 "scan.l"
  538. {
  539.             (void) strcpy( nmdef, yytext );
  540.  
  541.             for ( i = strlen( nmdef ) - 1;
  542.                   i >= 0 &&
  543.                   nmdef[i] == ' ' || nmdef[i] == '\t';
  544.                   --i )
  545.                 ;
  546.  
  547.             nmdef[i + 1] = '\0';
  548.  
  549.             ndinstal( nmstr, nmdef );
  550.             didadef = true;
  551.             }
  552.     YY_BREAK
  553. case 24:
  554. # line 118 "scan.l"
  555. {
  556.             if ( ! didadef )
  557.                 synerr( "incomplete name definition" );
  558.             BEGIN(0);
  559.             ++linenum;
  560.             }
  561.     YY_BREAK
  562. case 25:
  563. # line 125 "scan.l"
  564. ++linenum; BEGIN(0); RETURNNAME;
  565.     YY_BREAK
  566. case 26:
  567. YY_DO_BEFORE_SCAN; /* undo effects of setting up yytext */
  568. yy_c_buf_p -= 1;
  569. YY_DO_BEFORE_ACTION; /* set up yytext again */
  570. # line 128 "scan.l"
  571. {
  572.             ++linenum;
  573.             ACTION_ECHO;
  574.             MARK_END_OF_PROLOG;
  575.             BEGIN(SECT2);
  576.             }
  577.     YY_BREAK
  578. case 27:
  579. # line 135 "scan.l"
  580. ++linenum; ACTION_ECHO;
  581.     YY_BREAK
  582. case 28:
  583. # line 137 "scan.l"
  584. ++linenum; /* allow blank lines in section 2 */
  585.     YY_BREAK
  586.     /* this horrible mess of a rule matches indented lines which
  587.      * do not contain "/*".  We need to make the distinction because
  588.      * otherwise this rule will be taken instead of the rule which
  589.      * matches the beginning of comments like this one
  590.      */
  591. case 29:
  592. # line 144 "scan.l"
  593. {
  594.             synerr( "indented code found outside of action" );
  595.             ++linenum;
  596.             }
  597.     YY_BREAK
  598. case 30:
  599. # line 149 "scan.l"
  600. BEGIN(SC); return ( '<' );
  601.     YY_BREAK
  602. case 31:
  603. # line 150 "scan.l"
  604. return ( '^' );
  605.     YY_BREAK
  606. case 32:
  607. # line 151 "scan.l"
  608. BEGIN(QUOTE); return ( '"' );
  609.     YY_BREAK
  610. case 33:
  611. YY_DO_BEFORE_SCAN; /* undo effects of setting up yytext */
  612. yy_c_buf_p = yy_b_buf_p;
  613. YY_DO_BEFORE_ACTION; /* set up yytext again */
  614. # line 152 "scan.l"
  615. BEGIN(NUM); return ( '{' );
  616.     YY_BREAK
  617. case 34:
  618. # line 153 "scan.l"
  619. BEGIN(BRACEERROR);
  620.     YY_BREAK
  621. case 35:
  622. YY_DO_BEFORE_SCAN; /* undo effects of setting up yytext */
  623. yy_c_buf_p = yy_b_buf_p;
  624. YY_DO_BEFORE_ACTION; /* set up yytext again */
  625. # line 154 "scan.l"
  626. return ( '$' );
  627.     YY_BREAK
  628. case 36:
  629. # line 156 "scan.l"
  630. {
  631.             bracelevel = 1;
  632.             BEGIN(PERCENT_BRACE_ACTION);
  633.             return ( '\n' );
  634.             }
  635.     YY_BREAK
  636. case 37:
  637. # line 161 "scan.l"
  638. ++linenum; return ( '\n' );
  639.     YY_BREAK
  640. case 38:
  641. # line 163 "scan.l"
  642. ACTION_ECHO; BEGIN(C_COMMENT_2);
  643.     YY_BREAK
  644. case 39:
  645. # line 165 "scan.l"
  646. { /* needs to be separate from following rule due to
  647.                * bug with trailing context
  648.                */
  649.             bracelevel = 0;
  650.             BEGIN(ACTION);
  651.             return ( '\n' );
  652.             }
  653.     YY_BREAK
  654. case 40:
  655. YY_DO_BEFORE_SCAN; /* undo effects of setting up yytext */
  656. yy_c_buf_p -= 1;
  657. YY_DO_BEFORE_ACTION; /* set up yytext again */
  658. # line 173 "scan.l"
  659. {
  660.             bracelevel = 0;
  661.             BEGIN(ACTION);
  662.             return ( '\n' );
  663.             }
  664.     YY_BREAK
  665. case 41:
  666. # line 179 "scan.l"
  667. ++linenum; return ( '\n' );
  668.     YY_BREAK
  669. case 42:
  670. # line 181 "scan.l"
  671. {
  672.             /* guarantee that the SECT3 rule will have something
  673.              * to match
  674.              */
  675.             yyless(1);
  676.             sectnum = 3;
  677.             BEGIN(SECT3);
  678.             return ( EOF ); /* to stop the parser */
  679.             }
  680.     YY_BREAK
  681. case 43:
  682. # line 191 "scan.l"
  683. {
  684.             (void) strcpy( nmstr, yytext );
  685.  
  686.             /* check to see if we've already encountered this ccl */
  687.             if ( (cclval = ccllookup( nmstr )) )
  688.                 {
  689.                 yylval = cclval;
  690.                 ++cclreuse;
  691.                 return ( PREVCCL );
  692.                 }
  693.             else
  694.                 {
  695.                 /* we fudge a bit.    We know that this ccl will
  696.                  * soon be numbered as lastccl + 1 by cclinit
  697.                  */
  698.                 cclinstal( nmstr, lastccl + 1 );
  699.  
  700.                 /* push back everything but the leading bracket
  701.                  * so the ccl can be rescanned
  702.                  */
  703.                 PUT_BACK_STRING(nmstr, 1);
  704.  
  705.                 BEGIN(FIRSTCCL);
  706.                 return ( '[' );
  707.                 }
  708.             }
  709.     YY_BREAK
  710. case 44:
  711. # line 218 "scan.l"
  712. {
  713.             register char *nmdefptr;
  714.             char *ndlookup();
  715.  
  716.             (void) strcpy( nmstr, yytext );
  717.             nmstr[yyleng - 1] = '\0';  /* chop trailing brace */
  718.  
  719.             /* lookup from "nmstr + 1" to chop leading brace */
  720.             if ( ! (nmdefptr = ndlookup( nmstr + 1 )) )
  721.                 synerr( "undefined {name}" );
  722.  
  723.             else
  724.                 { /* push back name surrounded by ()'s */
  725.                 unput(')');
  726.                 PUT_BACK_STRING(nmdefptr, 0);
  727.                 unput('(');
  728.                 }
  729.             }
  730.     YY_BREAK
  731. case 45:
  732. # line 237 "scan.l"
  733. return ( yytext[0] );
  734.     YY_BREAK
  735. case 46:
  736. # line 238 "scan.l"
  737. RETURNCHAR;
  738.     YY_BREAK
  739. case 47:
  740. # line 239 "scan.l"
  741. ++linenum; return ( '\n' );
  742.     YY_BREAK
  743. case 48:
  744. # line 242 "scan.l"
  745. return ( ',' );
  746.     YY_BREAK
  747. case 49:
  748. # line 243 "scan.l"
  749. BEGIN(SECT2); return ( '>' );
  750.     YY_BREAK
  751. case 50:
  752. YY_DO_BEFORE_SCAN; /* undo effects of setting up yytext */
  753. yy_c_buf_p = yy_b_buf_p;
  754. YY_DO_BEFORE_ACTION; /* set up yytext again */
  755. # line 244 "scan.l"
  756. BEGIN(CARETISBOL); return ( '>' );
  757.     YY_BREAK
  758. case 51:
  759. # line 245 "scan.l"
  760. RETURNNAME;
  761.     YY_BREAK
  762. case 52:
  763. # line 246 "scan.l"
  764. synerr( "bad start condition name" );
  765.     YY_BREAK
  766. case 53:
  767. # line 248 "scan.l"
  768. BEGIN(SECT2); return ( '^' );
  769.     YY_BREAK
  770. case 54:
  771. # line 251 "scan.l"
  772. RETURNCHAR;
  773.     YY_BREAK
  774. case 55:
  775. # line 252 "scan.l"
  776. BEGIN(SECT2); return ( '"' );
  777.     YY_BREAK
  778. case 56:
  779. # line 254 "scan.l"
  780. {
  781.             synerr( "missing quote" );
  782.             BEGIN(SECT2);
  783.             ++linenum;
  784.             return ( '"' );
  785.             }
  786.     YY_BREAK
  787. case 57:
  788. YY_DO_BEFORE_SCAN; /* undo effects of setting up yytext */
  789. yy_c_buf_p = yy_b_buf_p;
  790. YY_DO_BEFORE_ACTION; /* set up yytext again */
  791. # line 262 "scan.l"
  792. BEGIN(CCL); return ( '^' );
  793.     YY_BREAK
  794. case 58:
  795. YY_DO_BEFORE_SCAN; /* undo effects of setting up yytext */
  796. yy_c_buf_p = yy_b_buf_p;
  797. YY_DO_BEFORE_ACTION; /* set up yytext again */
  798. # line 263 "scan.l"
  799. return ( '^' );
  800.     YY_BREAK
  801. case 59:
  802. # line 264 "scan.l"
  803. BEGIN(CCL); yylval = '-'; return ( CHAR );
  804.     YY_BREAK
  805. case 60:
  806. # line 265 "scan.l"
  807. BEGIN(CCL); RETURNCHAR;
  808.     YY_BREAK
  809. case 61:
  810. YY_DO_BEFORE_SCAN; /* undo effects of setting up yytext */
  811. yy_c_buf_p = yy_b_buf_p;
  812. YY_DO_BEFORE_ACTION; /* set up yytext again */
  813. # line 267 "scan.l"
  814. return ( '-' );
  815.     YY_BREAK
  816. case 62:
  817. # line 268 "scan.l"
  818. RETURNCHAR;
  819.     YY_BREAK
  820. case 63:
  821. # line 269 "scan.l"
  822. BEGIN(SECT2); return ( ']' );
  823.     YY_BREAK
  824. case 64:
  825. # line 272 "scan.l"
  826. {
  827.             yylval = myctoi( yytext );
  828.             return ( NUMBER );
  829.             }
  830.     YY_BREAK
  831. case 65:
  832. # line 277 "scan.l"
  833. return ( ',' );
  834.     YY_BREAK
  835. case 66:
  836. # line 278 "scan.l"
  837. BEGIN(SECT2); return ( '}' );
  838.     YY_BREAK
  839. case 67:
  840. # line 280 "scan.l"
  841. {
  842.             synerr( "bad character inside {}'s" );
  843.             BEGIN(SECT2);
  844.             return ( '}' );
  845.             }
  846.     YY_BREAK
  847. case 68:
  848. # line 286 "scan.l"
  849. {
  850.             synerr( "missing }" );
  851.             BEGIN(SECT2);
  852.             ++linenum;
  853.             return ( '}' );
  854.             }
  855.     YY_BREAK
  856. case 69:
  857. # line 294 "scan.l"
  858. synerr( "bad name in {}'s" ); BEGIN(SECT2);
  859.     YY_BREAK
  860. case 70:
  861. # line 295 "scan.l"
  862. synerr( "missing }" ); ++linenum; BEGIN(SECT2);
  863.     YY_BREAK
  864. case 71:
  865. # line 298 "scan.l"
  866. bracelevel = 0;
  867.     YY_BREAK
  868. case 72:
  869. # line 299 "scan.l"
  870. ACTION_ECHO;
  871.     YY_BREAK
  872. case 73:
  873. # line 300 "scan.l"
  874. {
  875.             ++linenum;
  876.             ACTION_ECHO;
  877.             if ( bracelevel == 0 )
  878.                 {
  879.                 fputs( "\tYY_BREAK\n", temp_action_file );
  880.                 BEGIN(SECT2);
  881.                 }
  882.             }
  883.     YY_BREAK
  884. case 74:
  885. # line 310 "scan.l"
  886. ACTION_ECHO; ++bracelevel;
  887.     YY_BREAK
  888. case 75:
  889. # line 311 "scan.l"
  890. ACTION_ECHO; --bracelevel;
  891.     YY_BREAK
  892. case 76:
  893. # line 312 "scan.l"
  894. ACTION_ECHO;
  895.     YY_BREAK
  896. case 77:
  897. # line 313 "scan.l"
  898. ACTION_ECHO; BEGIN(ACTION_COMMENT);
  899.     YY_BREAK
  900. case 78:
  901. # line 314 "scan.l"
  902. ACTION_ECHO; /* character constant */
  903.     YY_BREAK
  904. case 79:
  905. # line 315 "scan.l"
  906. ACTION_ECHO; BEGIN(ACTION_STRING);
  907.     YY_BREAK
  908. case 80:
  909. # line 316 "scan.l"
  910. {
  911.             ++linenum;
  912.             ACTION_ECHO;
  913.             if ( bracelevel == 0 )
  914.                 {
  915.                 fputs( "\tYY_BREAK\n", temp_action_file );
  916.                 BEGIN(SECT2);
  917.                 }
  918.             }
  919.     YY_BREAK
  920. case 81:
  921. # line 325 "scan.l"
  922. ACTION_ECHO;
  923.     YY_BREAK
  924. case 82:
  925. # line 327 "scan.l"
  926. ACTION_ECHO; BEGIN(ACTION);
  927.     YY_BREAK
  928. case 83:
  929. # line 328 "scan.l"
  930. ACTION_ECHO;
  931.     YY_BREAK
  932. case 84:
  933. # line 329 "scan.l"
  934. ACTION_ECHO;
  935.     YY_BREAK
  936. case 85:
  937. # line 330 "scan.l"
  938. ++linenum; ACTION_ECHO;
  939.     YY_BREAK
  940. case 86:
  941. # line 331 "scan.l"
  942. ACTION_ECHO;
  943.     YY_BREAK
  944. case 87:
  945. # line 333 "scan.l"
  946. ACTION_ECHO; BEGIN(SECT2);
  947.     YY_BREAK
  948. case 88:
  949. # line 334 "scan.l"
  950. ++linenum; ACTION_ECHO; BEGIN(SECT2);
  951.     YY_BREAK
  952. case 89:
  953. # line 335 "scan.l"
  954. ACTION_ECHO;
  955.     YY_BREAK
  956. case 90:
  957. # line 336 "scan.l"
  958. ACTION_ECHO;
  959.     YY_BREAK
  960. case 91:
  961. # line 337 "scan.l"
  962. ++linenum; ACTION_ECHO;
  963.     YY_BREAK
  964. case 92:
  965. # line 339 "scan.l"
  966. ACTION_ECHO;
  967.     YY_BREAK
  968. case 93:
  969. # line 340 "scan.l"
  970. ACTION_ECHO;
  971.     YY_BREAK
  972. case 94:
  973. # line 341 "scan.l"
  974. ++linenum; ACTION_ECHO;
  975.     YY_BREAK
  976. case 95:
  977. # line 342 "scan.l"
  978. ACTION_ECHO; BEGIN(ACTION);
  979.     YY_BREAK
  980. case 96:
  981. # line 343 "scan.l"
  982. ACTION_ECHO;
  983.     YY_BREAK
  984. case 97:
  985. # line 346 "scan.l"
  986. {
  987.             yylval = myesc( yytext );
  988.             return ( CHAR );
  989.             }
  990.     YY_BREAK
  991. case 98:
  992. # line 351 "scan.l"
  993. {
  994.             yylval = myesc( yytext );
  995.             BEGIN(CCL);
  996.             return ( CHAR );
  997.             }
  998.     YY_BREAK
  999. case 99:
  1000. # line 358 "scan.l"
  1001. {
  1002.             register int numchars;
  1003.  
  1004.             /* black magic - we know the names of a flex scanner's
  1005.              * internal variables.    We cap the input buffer with
  1006.              * an end-of-string and dump it to the output.
  1007.              */
  1008.             YY_DO_BEFORE_SCAN; /* recover from setting up yytext */
  1009.  
  1010. #ifdef FLEX_FAST_SKEL
  1011.             fputs( yy_c_buf_p + 1, stdout );
  1012. #else
  1013.             yy_ch_buf[yy_e_buf_p + 1] = '\0';
  1014.  
  1015.             /* ignore the first character; it's the second '%'
  1016.              * put back by the yyless(1) above
  1017.              */
  1018.             fputs( yy_ch_buf + yy_c_buf_p + 1, stdout );
  1019. #endif
  1020.  
  1021.             /* if we don't do this, the data written by write()
  1022.              * can get overwritten when stdout is finally flushed
  1023.              */
  1024.             (void) fflush( stdout );
  1025.  
  1026.             while ( (numchars = read( fileno(yyin), yy_ch_buf,
  1027.                           YY_BUF_MAX )) > 0 )
  1028.                 (void) write( fileno(stdout), yy_ch_buf, numchars );
  1029.  
  1030.             if ( numchars < 0 )
  1031.                 flexerror( "fatal read error in section 3" );
  1032.  
  1033.             return ( EOF );
  1034.             }
  1035.     YY_BREAK
  1036.  
  1037. case YY_NEW_FILE:
  1038. break; /* begin reading from new file */
  1039.  
  1040. case YY_DO_DEFAULT:
  1041. YY_DEFAULT_ACTION;
  1042. break;
  1043.  
  1044. case YY_END_TOK:
  1045. return ( YY_END_TOK );
  1046.  
  1047. default:
  1048. YY_FATAL_ERROR( "fatal flex scanner internal error" );
  1049.         }
  1050.  
  1051. get_next_token:
  1052.     {
  1053.     register int yy_curst;
  1054.     register char yy_sym;
  1055.  
  1056.     YY_DO_BEFORE_SCAN
  1057.  
  1058.     /* set up to begin running DFA */
  1059.  
  1060.     yy_curst = yy_start;
  1061.  
  1062.     if ( yy_ch_buf[yy_c_buf_p] == '\n' )
  1063.         ++yy_curst;
  1064.  
  1065.     /* yy_b_buf_p points to the position in yy_ch_buf
  1066.      * of the start of the current run.
  1067.      */
  1068.  
  1069.     yy_b_buf_p = yy_c_buf_p + 1;
  1070.  
  1071.     do /* until the machine jams */
  1072.         {
  1073.         if ( yy_c_buf_p == yy_e_buf_p )
  1074.         { /* need more input */
  1075.         if ( yy_e_buf_p >= YY_BUF_LIM )
  1076.             { /* not enough room to do another read */
  1077.             /* see if we can make some room for more chars */
  1078.  
  1079.             yy_n_chars = yy_e_buf_p - yy_b_buf_p;
  1080.  
  1081.             if ( yy_n_chars >= 0 )
  1082.             /* shift down buffer to make room */
  1083.             for ( yy_iii = 0; yy_iii <= yy_n_chars; ++yy_iii )
  1084.                 {
  1085.                 yy_buf_pos = yy_b_buf_p + yy_iii;
  1086.                 yy_ch_buf[yy_iii] = yy_ch_buf[yy_buf_pos];
  1087.                 yy_st_buf[yy_iii] = yy_st_buf[yy_buf_pos];
  1088.                 }
  1089.  
  1090.             yy_b_buf_p = 0;
  1091.             yy_e_buf_p = yy_n_chars;
  1092.  
  1093.             if ( yy_e_buf_p >= YY_BUF_LIM )
  1094.             YY_FATAL_ERROR( "flex input buffer overflowed" );
  1095.  
  1096.             yy_c_buf_p = yy_e_buf_p;
  1097.             }
  1098.  
  1099.         else if ( yy_saw_eof )
  1100.             {
  1101. saweof:         if ( yy_b_buf_p > yy_e_buf_p )
  1102.             {
  1103.             if ( yywrap() )
  1104.                 {
  1105.                 yy_act = YY_END_TOK;
  1106.                 goto do_action;
  1107.                 }
  1108.  
  1109.             else
  1110.                 {
  1111.                 YY_INIT;
  1112.                 yy_act = YY_NEW_FILE;
  1113.                 goto do_action;
  1114.                 }
  1115.             }
  1116.  
  1117.             else /* do a jam to eat up more input */
  1118.             {
  1119. #ifndef FLEX_INTERACTIVE_SCANNER
  1120.             /* we're going to decrement yy_c_buf_p upon doing
  1121.              * the jam.  In this case, that's wrong, since
  1122.              * it points to the last non-jam character.  So
  1123.              * we increment it now to counter the decrement.
  1124.              */
  1125.             ++yy_c_buf_p;
  1126. #endif
  1127.             break;
  1128.             }
  1129.             }
  1130.  
  1131.         YY_INPUT( (yy_ch_buf + yy_c_buf_p + 1), yy_n_chars,
  1132.               YY_MAX_LINE );
  1133.  
  1134.         if ( yy_n_chars == YY_NULL )
  1135.             {
  1136.             if ( yy_saw_eof )
  1137.     YY_FATAL_ERROR( "flex scanner saw EOF twice - shouldn't happen" );
  1138.             yy_saw_eof = 1;
  1139.             goto saweof;
  1140.             }
  1141.  
  1142.         yy_e_buf_p += yy_n_chars;
  1143.         }
  1144.  
  1145.         ++yy_c_buf_p;
  1146.  
  1147. #ifdef FLEX_USE_ECS
  1148.         yy_sym = e[yy_ch_buf[yy_c_buf_p]];
  1149. #else
  1150.         yy_sym = yy_ch_buf[yy_c_buf_p];
  1151. #endif
  1152.  
  1153. #ifdef FLEX_FULL_TABLE
  1154.         yy_curst = n[yy_curst][yy_sym];
  1155.  
  1156. #else /* get next state from compressed table */
  1157.  
  1158.         while ( c[b[yy_curst] + yy_sym] != yy_curst )
  1159.         {
  1160.         yy_curst = d[yy_curst];
  1161.  
  1162. #ifdef FLEX_USE_MECS
  1163.         /* we've arrange it so that templates are never chained
  1164.          * to one another.  This means we can afford make a
  1165.          * very simple test to see if we need to convert to
  1166.          * yy_sym's meta-equivalence class without worrying
  1167.          * about erroneously looking up the meta-equivalence
  1168.          * class twice
  1169.          */
  1170.  
  1171.         if ( yy_curst >= YY_TEMPLATE )
  1172.             yy_sym = m[yy_sym];
  1173. #endif
  1174.         }
  1175.  
  1176.         yy_curst = n[b[yy_curst] + yy_sym];
  1177.  
  1178. #endif
  1179.  
  1180.         yy_st_buf[yy_c_buf_p] = yy_curst;
  1181.  
  1182.         }
  1183. #ifdef FLEX_INTERACTIVE_SCANNER
  1184.     while ( b[yy_curst] != YY_JAM_BASE );
  1185. #else
  1186.     while ( yy_curst != YY_JAM );
  1187.     --yy_c_buf_p; /* put back character we jammed on */
  1188.  
  1189. #endif
  1190.  
  1191.     if ( yy_c_buf_p >= yy_b_buf_p )
  1192.         { /* we matched some text */
  1193.         yy_curst = yy_st_buf[yy_c_buf_p];
  1194.         yy_lp = l[yy_curst];
  1195.  
  1196. #ifdef FLEX_REJECT_ENABLED
  1197. find_rule: /* we branch to this label when doing a REJECT */
  1198. #endif
  1199.  
  1200.         for ( ; ; ) /* until we find what rule we matched */
  1201.         {
  1202. #ifdef FLEX_REJECT_ENABLED
  1203.         if ( yy_lp && yy_lp < l[yy_curst + 1] )
  1204.             {
  1205.             yy_act = a[yy_lp];
  1206.             goto do_action; /* "continue 2" */
  1207.             }
  1208. #else
  1209.         if ( yy_lp )
  1210.             {
  1211.             yy_act = yy_lp;
  1212.             goto do_action; /* "continue 2" */
  1213.             }
  1214. #endif
  1215.  
  1216.         if ( --yy_c_buf_p < yy_b_buf_p )
  1217.             break;
  1218.  
  1219.         yy_curst = yy_st_buf[yy_c_buf_p];
  1220.         yy_lp = l[yy_curst];
  1221.         }
  1222.         }
  1223.  
  1224.     /* if we got this far, then we didn't find any accepting
  1225.      * states
  1226.      */
  1227.  
  1228.     /* so that the default applies to the first char read */
  1229.     ++yy_c_buf_p;
  1230.  
  1231.     yy_act = YY_DO_DEFAULT;
  1232.     }
  1233.     }
  1234.  
  1235.     /*NOTREACHED*/
  1236.     }
  1237.  
  1238.  
  1239. static int unput( c )
  1240. char c;
  1241.  
  1242.     {
  1243.     YY_DO_BEFORE_SCAN; /* undo effects of setting up yytext */
  1244.  
  1245.     if ( yy_c_buf_p == 0 )
  1246.     {
  1247.     register int i;
  1248.     register int yy_buf_pos = YY_BUF_MAX;
  1249.  
  1250.     for ( i = yy_e_buf_p; i >= yy_c_buf_p; --i )
  1251.         {
  1252.         yy_ch_buf[yy_buf_pos] = yy_ch_buf[i];
  1253.         yy_st_buf[yy_buf_pos] = yy_st_buf[i];
  1254.         --yy_buf_pos;
  1255.         }
  1256.  
  1257.     yy_c_buf_p = YY_BUF_MAX - yy_e_buf_p;
  1258.     yy_e_buf_p = YY_BUF_MAX;
  1259.     }
  1260.  
  1261.     if ( yy_c_buf_p <= 0 )
  1262.     YY_FATAL_ERROR( "flex scanner push-back overflow" );
  1263.  
  1264.     if ( yy_c_buf_p >= yy_b_buf_p && yy_ch_buf[yy_c_buf_p] == '\n' )
  1265.     yy_ch_buf[yy_c_buf_p - 1] = '\n';
  1266.  
  1267.     yy_ch_buf[yy_c_buf_p--] = c;
  1268.  
  1269.     YY_DO_BEFORE_ACTION; /* set up yytext again */
  1270.     }
  1271.  
  1272.  
  1273. static int input()
  1274.  
  1275.     {
  1276.     int c;
  1277.  
  1278.     YY_DO_BEFORE_SCAN
  1279.  
  1280.     if ( yy_c_buf_p == yy_e_buf_p )
  1281.     { /* need more input */
  1282.     int yy_n_chars;
  1283.  
  1284.     /* we can throw away the entire current buffer */
  1285.     if ( yy_saw_eof )
  1286.         {
  1287.         if ( yywrap() )
  1288.         return ( EOF );
  1289.  
  1290.         YY_INIT;
  1291.         }
  1292.  
  1293.     yy_b_buf_p = 0;
  1294.     YY_INPUT( yy_ch_buf, yy_n_chars, YY_MAX_LINE );
  1295.  
  1296.     if ( yy_n_chars == YY_NULL )
  1297.         {
  1298.         yy_saw_eof = 1;
  1299.  
  1300.         if ( yywrap() )
  1301.         return ( EOF );
  1302.  
  1303.         YY_INIT;
  1304.  
  1305.         return ( input() );
  1306.         }
  1307.  
  1308.     yy_c_buf_p = -1;
  1309.     yy_e_buf_p = yy_n_chars - 1;
  1310.     }
  1311.  
  1312.     c = yy_ch_buf[++yy_c_buf_p];
  1313.  
  1314.     YY_DO_BEFORE_ACTION;
  1315.  
  1316.     return ( c );
  1317.     }
  1318. # line 392 "scan.l"
  1319.  
  1320.