home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / fns101.zip / Add-Ons / Fnorb / src / lexer.c < prev    next >
C/C++ Source or Header  |  1999-06-28  |  64KB  |  2,343 lines

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