Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. #line 2 "program/lex.yy.c"
  2.  
  3. #line 4 "program/lex.yy.c"
  4.  
  5. #define  YY_INT_ALIGNED short int
  6.  
  7. /* A lexical scanner generated by flex */
  8.  
  9. #define FLEX_SCANNER
  10. #define YY_FLEX_MAJOR_VERSION 2
  11. #define YY_FLEX_MINOR_VERSION 5
  12. #define YY_FLEX_SUBMINOR_VERSION 39
  13. #if YY_FLEX_SUBMINOR_VERSION > 0
  14. #define FLEX_BETA
  15. #endif
  16.  
  17. /* First, we deal with  platform-specific or compiler-specific issues. */
  18.  
  19. /* begin standard C headers. */
  20. #include <stdio.h>
  21. #include <string.h>
  22. #include <errno.h>
  23. #include <stdlib.h>
  24.  
  25. /* end standard C headers. */
  26.  
  27. /* flex integer type definitions */
  28.  
  29. #ifndef FLEXINT_H
  30. #define FLEXINT_H
  31.  
  32. /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
  33.  
  34. #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  35.  
  36. /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
  37.  * if you want the limit (max/min) macros for int types.
  38.  */
  39. #ifndef __STDC_LIMIT_MACROS
  40. #define __STDC_LIMIT_MACROS 1
  41. #endif
  42.  
  43. #include <inttypes.h>
  44. typedef int8_t flex_int8_t;
  45. typedef uint8_t flex_uint8_t;
  46. typedef int16_t flex_int16_t;
  47. typedef uint16_t flex_uint16_t;
  48. typedef int32_t flex_int32_t;
  49. typedef uint32_t flex_uint32_t;
  50. #else
  51. typedef signed char flex_int8_t;
  52. typedef short int flex_int16_t;
  53. typedef int flex_int32_t;
  54. typedef unsigned char flex_uint8_t;
  55. typedef unsigned short int flex_uint16_t;
  56. typedef unsigned int flex_uint32_t;
  57.  
  58. /* Limits of integral types. */
  59. #ifndef INT8_MIN
  60. #define INT8_MIN               (-128)
  61. #endif
  62. #ifndef INT16_MIN
  63. #define INT16_MIN              (-32767-1)
  64. #endif
  65. #ifndef INT32_MIN
  66. #define INT32_MIN              (-2147483647-1)
  67. #endif
  68. #ifndef INT8_MAX
  69. #define INT8_MAX               (127)
  70. #endif
  71. #ifndef INT16_MAX
  72. #define INT16_MAX              (32767)
  73. #endif
  74. #ifndef INT32_MAX
  75. #define INT32_MAX              (2147483647)
  76. #endif
  77. #ifndef UINT8_MAX
  78. #define UINT8_MAX              (255U)
  79. #endif
  80. #ifndef UINT16_MAX
  81. #define UINT16_MAX             (65535U)
  82. #endif
  83. #ifndef UINT32_MAX
  84. #define UINT32_MAX             (4294967295U)
  85. #endif
  86.  
  87. #endif /* ! C99 */
  88.  
  89. #endif /* ! FLEXINT_H */
  90.  
  91. #ifdef __cplusplus
  92.  
  93. /* The "const" storage-class-modifier is valid. */
  94. #define YY_USE_CONST
  95.  
  96. #else   /* ! __cplusplus */
  97.  
  98. /* C99 requires __STDC__ to be defined as 1. */
  99. #if defined (__STDC__)
  100.  
  101. #define YY_USE_CONST
  102.  
  103. #endif  /* defined (__STDC__) */
  104. #endif  /* ! __cplusplus */
  105.  
  106. #ifdef YY_USE_CONST
  107. #define yyconst const
  108. #else
  109. #define yyconst
  110. #endif
  111.  
  112. /* Returned upon end-of-file. */
  113. #define YY_NULL 0
  114.  
  115. /* Promotes a possibly negative, possibly signed char to an unsigned
  116.  * integer for use as an array index.  If the signed char is negative,
  117.  * we want to instead treat it as an 8-bit unsigned char, hence the
  118.  * double cast.
  119.  */
  120. #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
  121.  
  122. /* An opaque pointer. */
  123. #ifndef YY_TYPEDEF_YY_SCANNER_T
  124. #define YY_TYPEDEF_YY_SCANNER_T
  125. typedef void* yyscan_t;
  126. #endif
  127.  
  128. /* For convenience, these vars (plus the bison vars far below)
  129.    are macros in the reentrant scanner. */
  130. #define yyin yyg->yyin_r
  131. #define yyout yyg->yyout_r
  132. #define yyextra yyg->yyextra_r
  133. #define yyleng yyg->yyleng_r
  134. #define yytext yyg->yytext_r
  135. #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
  136. #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
  137. #define yy_flex_debug yyg->yy_flex_debug_r
  138.  
  139. /* Enter a start condition.  This macro really ought to take a parameter,
  140.  * but we do it the disgusting crufty way forced on us by the ()-less
  141.  * definition of BEGIN.
  142.  */
  143. #define BEGIN yyg->yy_start = 1 + 2 *
  144.  
  145. /* Translate the current start state into a value that can be later handed
  146.  * to BEGIN to return to the state.  The YYSTATE alias is for lex
  147.  * compatibility.
  148.  */
  149. #define YY_START ((yyg->yy_start - 1) / 2)
  150. #define YYSTATE YY_START
  151.  
  152. /* Action number for EOF rule of a given start state. */
  153. #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
  154.  
  155. /* Special action meaning "start processing a new file". */
  156. #define YY_NEW_FILE _mesa_program_lexer_restart(yyin ,yyscanner )
  157.  
  158. #define YY_END_OF_BUFFER_CHAR 0
  159.  
  160. /* Size of default input buffer. */
  161. #ifndef YY_BUF_SIZE
  162. #define YY_BUF_SIZE 16384
  163. #endif
  164.  
  165. /* The state buf must be large enough to hold one state per character in the main buffer.
  166.  */
  167. #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
  168.  
  169. #ifndef YY_TYPEDEF_YY_BUFFER_STATE
  170. #define YY_TYPEDEF_YY_BUFFER_STATE
  171. typedef struct yy_buffer_state *YY_BUFFER_STATE;
  172. #endif
  173.  
  174. #ifndef YY_TYPEDEF_YY_SIZE_T
  175. #define YY_TYPEDEF_YY_SIZE_T
  176. typedef size_t yy_size_t;
  177. #endif
  178.  
  179. #define EOB_ACT_CONTINUE_SCAN 0
  180. #define EOB_ACT_END_OF_FILE 1
  181. #define EOB_ACT_LAST_MATCH 2
  182.  
  183.     #define YY_LESS_LINENO(n)
  184.     #define YY_LINENO_REWIND_TO(ptr)
  185.    
  186. /* Return all but the first "n" matched characters back to the input stream. */
  187. #define yyless(n) \
  188.         do \
  189.                 { \
  190.                 /* Undo effects of setting up yytext. */ \
  191.         int yyless_macro_arg = (n); \
  192.         YY_LESS_LINENO(yyless_macro_arg);\
  193.                 *yy_cp = yyg->yy_hold_char; \
  194.                 YY_RESTORE_YY_MORE_OFFSET \
  195.                 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
  196.                 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
  197.                 } \
  198.         while ( 0 )
  199.  
  200. #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
  201.  
  202. #ifndef YY_STRUCT_YY_BUFFER_STATE
  203. #define YY_STRUCT_YY_BUFFER_STATE
  204. struct yy_buffer_state
  205.         {
  206.         FILE *yy_input_file;
  207.  
  208.         char *yy_ch_buf;                /* input buffer */
  209.         char *yy_buf_pos;               /* current position in input buffer */
  210.  
  211.         /* Size of input buffer in bytes, not including room for EOB
  212.          * characters.
  213.          */
  214.         yy_size_t yy_buf_size;
  215.  
  216.         /* Number of characters read into yy_ch_buf, not including EOB
  217.          * characters.
  218.          */
  219.         yy_size_t yy_n_chars;
  220.  
  221.         /* Whether we "own" the buffer - i.e., we know we created it,
  222.          * and can realloc() it to grow it, and should free() it to
  223.          * delete it.
  224.          */
  225.         int yy_is_our_buffer;
  226.  
  227.         /* Whether this is an "interactive" input source; if so, and
  228.          * if we're using stdio for input, then we want to use getc()
  229.          * instead of fread(), to make sure we stop fetching input after
  230.          * each newline.
  231.          */
  232.         int yy_is_interactive;
  233.  
  234.         /* Whether we're considered to be at the beginning of a line.
  235.          * If so, '^' rules will be active on the next match, otherwise
  236.          * not.
  237.          */
  238.         int yy_at_bol;
  239.  
  240.     int yy_bs_lineno; /**< The line count. */
  241.     int yy_bs_column; /**< The column count. */
  242.    
  243.         /* Whether to try to fill the input buffer when we reach the
  244.          * end of it.
  245.          */
  246.         int yy_fill_buffer;
  247.  
  248.         int yy_buffer_status;
  249.  
  250. #define YY_BUFFER_NEW 0
  251. #define YY_BUFFER_NORMAL 1
  252.         /* When an EOF's been seen but there's still some text to process
  253.          * then we mark the buffer as YY_EOF_PENDING, to indicate that we
  254.          * shouldn't try reading from the input source any more.  We might
  255.          * still have a bunch of tokens to match, though, because of
  256.          * possible backing-up.
  257.          *
  258.          * When we actually see the EOF, we change the status to "new"
  259.          * (via _mesa_program_lexer_restart()), so that the user can continue scanning by
  260.          * just pointing yyin at a new input file.
  261.          */
  262. #define YY_BUFFER_EOF_PENDING 2
  263.  
  264.         };
  265. #endif /* !YY_STRUCT_YY_BUFFER_STATE */
  266.  
  267. /* We provide macros for accessing buffer states in case in the
  268.  * future we want to put the buffer states in a more general
  269.  * "scanner state".
  270.  *
  271.  * Returns the top of the stack, or NULL.
  272.  */
  273. #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
  274.                           ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
  275.                           : NULL)
  276.  
  277. /* Same as previous macro, but useful when we know that the buffer stack is not
  278.  * NULL or when we need an lvalue. For internal use only.
  279.  */
  280. #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
  281.  
  282. void _mesa_program_lexer_restart (FILE *input_file ,yyscan_t yyscanner );
  283. void _mesa_program_lexer__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
  284. YY_BUFFER_STATE _mesa_program_lexer__create_buffer (FILE *file,int size ,yyscan_t yyscanner );
  285. void _mesa_program_lexer__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
  286. void _mesa_program_lexer__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
  287. void _mesa_program_lexer_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
  288. void _mesa_program_lexer_pop_buffer_state (yyscan_t yyscanner );
  289.  
  290. static void _mesa_program_lexer_ensure_buffer_stack (yyscan_t yyscanner );
  291. static void _mesa_program_lexer__load_buffer_state (yyscan_t yyscanner );
  292. static void _mesa_program_lexer__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
  293.  
  294. #define YY_FLUSH_BUFFER _mesa_program_lexer__flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
  295.  
  296. YY_BUFFER_STATE _mesa_program_lexer__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
  297. YY_BUFFER_STATE _mesa_program_lexer__scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
  298. YY_BUFFER_STATE _mesa_program_lexer__scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
  299.  
  300. void *_mesa_program_lexer_alloc (yy_size_t ,yyscan_t yyscanner );
  301. void *_mesa_program_lexer_realloc (void *,yy_size_t ,yyscan_t yyscanner );
  302. void _mesa_program_lexer_free (void * ,yyscan_t yyscanner );
  303.  
  304. #define yy_new_buffer _mesa_program_lexer__create_buffer
  305.  
  306. #define yy_set_interactive(is_interactive) \
  307.         { \
  308.         if ( ! YY_CURRENT_BUFFER ){ \
  309.         _mesa_program_lexer_ensure_buffer_stack (yyscanner); \
  310.                 YY_CURRENT_BUFFER_LVALUE =    \
  311.             _mesa_program_lexer__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
  312.         } \
  313.         YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
  314.         }
  315.  
  316. #define yy_set_bol(at_bol) \
  317.         { \
  318.         if ( ! YY_CURRENT_BUFFER ){\
  319.         _mesa_program_lexer_ensure_buffer_stack (yyscanner); \
  320.                 YY_CURRENT_BUFFER_LVALUE =    \
  321.             _mesa_program_lexer__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
  322.         } \
  323.         YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
  324.         }
  325.  
  326. #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
  327.  
  328. /* Begin user sect3 */
  329.  
  330. #define _mesa_program_lexer_wrap(yyscanner) 1
  331. #define YY_SKIP_YYWRAP
  332.  
  333. typedef unsigned char YY_CHAR;
  334.  
  335. typedef int yy_state_type;
  336.  
  337. #define yytext_ptr yytext_r
  338.  
  339. static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
  340. static yy_state_type yy_try_NUL_trans (yy_state_type current_state  ,yyscan_t yyscanner);
  341. static int yy_get_next_buffer (yyscan_t yyscanner );
  342. static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
  343.  
  344. /* Done after the current pattern has been matched and before the
  345.  * corresponding action - sets up yytext.
  346.  */
  347. #define YY_DO_BEFORE_ACTION \
  348.         yyg->yytext_ptr = yy_bp; \
  349.         yyleng = (size_t) (yy_cp - yy_bp); \
  350.         yyg->yy_hold_char = *yy_cp; \
  351.         *yy_cp = '\0'; \
  352.         yyg->yy_c_buf_p = yy_cp;
  353.  
  354. #define YY_NUM_RULES 158
  355. #define YY_END_OF_BUFFER 159
  356. /* This struct is not used in this scanner,
  357.    but its presence is necessary. */
  358. struct yy_trans_info
  359.         {
  360.         flex_int32_t yy_verify;
  361.         flex_int32_t yy_nxt;
  362.         };
  363. static yyconst flex_int16_t yy_accept[779] =
  364.     {   0,
  365.         0,    0,  159,  157,  155,  154,  157,  157,  127,  153,
  366.       129,  129,  129,  129,  127,  127,  127,  127,  127,  127,
  367.       127,  127,  127,  127,  127,  127,  127,  127,  127,  127,
  368.       127,  127,  127,  127,  155,    0,    0,  156,  127,    0,
  369.       128,  130,  150,  150,    0,    0,    0,    0,  150,    0,
  370.         0,    0,    0,    0,    0,    0,  107,  151,  108,  109,
  371.       141,  141,  141,  141,    0,  129,    0,  115,  116,  117,
  372.       127,  127,  127,  127,  127,  127,  127,  127,  127,  127,
  373.       127,  127,  127,  127,  127,  127,  127,  127,  127,  127,
  374.       127,  127,  127,  127,  127,  127,  127,  127,  127,  127,
  375.  
  376.       127,  127,  127,  127,  127,  127,  127,  127,  127,  127,
  377.       127,  127,  127,  127,  127,  127,  127,  127,  127,    0,
  378.         0,    0,    0,    0,    0,    0,    0,    0,  149,    0,
  379.         0,    0,    0,    0,    0,    0,    0,    0,  148,  148,
  380.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  381.         0,    0,    0,  147,  147,  147,    0,    0,    0,    0,
  382.         0,    0,    0,    0,    0,    0,  138,  138,  138,  139,
  383.       139,  140,  131,  130,  131,    0,  132,   11,   12,  127,
  384.        13,  127,  127,   14,   15,  127,   16,   17,   18,   19,
  385.        20,   21,    6,   22,   23,   24,   25,   26,   28,   27,
  386.  
  387.        29,   30,   31,   32,   33,   34,   35,  127,  127,  127,
  388.        36,   37,  127,   38,   39,   40,   41,   42,  127,   43,
  389.        44,   45,   46,   47,   48,  127,   49,   50,   51,   52,
  390.        53,  127,  127,  127,  127,  127,  127,    0,    0,    0,
  391.         0,  130,    0,    0,    0,    0,    0,    0,    0,    0,
  392.         0,    0,   68,   69,   71,    0,  146,    0,    0,    0,
  393.         0,    0,    0,   85,    0,    0,    0,    0,    0,    0,
  394.         0,    0,    0,    0,  145,  144,  144,   97,    0,    0,
  395.         0,    0,    0,    0,    0,    0,    0,    0,  135,  135,
  396.       136,  137,    0,  133,   11,   11,  127,   12,   12,   12,
  397.  
  398.       127,  127,  127,  127,  127,   15,   15,  127,  118,   16,
  399.        16,  127,   17,   17,  127,   18,   18,  127,   19,   19,
  400.       127,   20,   20,  127,   21,   21,  127,   22,   22,  127,
  401.        24,   24,  127,   25,   25,  127,   28,   28,  127,   27,
  402.        27,  127,   30,   30,  127,   31,   31,  127,   32,   32,
  403.       127,   33,   33,  127,   34,   34,  127,   35,   35,  127,
  404.       127,  127,  127,   36,   36,  127,   37,   37,  127,  119,
  405.        38,   38,  127,  127,   40,   40,  127,   41,   41,  127,
  406.        42,   42,  127,  127,   43,   43,  127,   44,   44,  127,
  407.        45,   45,  127,   46,   46,  127,   47,   47,  127,  127,
  408.  
  409.        10,   49,  127,   50,  127,   51,  127,   52,  127,  127,
  410.       127,  127,  127,  127,  127,  127,    0,  152,    0,    0,
  411.         0,   61,   62,    0,    0,    0,    0,    0,    0,    0,
  412.        73,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  413.         0,    0,    0,    0,    0,    0,    0,    0,    0,  143,
  414.         0,    0,    0,  101,    0,  103,    0,    0,    0,    0,
  415.         0,    0,  142,  134,  127,  127,  127,    4,  127,  127,
  416.       127,  127,  127,  127,  127,  127,  127,  127,  127,  127,
  417.       127,  127,  127,  127,  127,  127,  127,  127,  127,  127,
  418.       127,    9,  127,  127,  127,  127,  127,  127,  127,  127,
  419.  
  420.       127,  127,  127,  127,  127,  127,  127,  127,  127,  127,
  421.       127,  127,  127,  127,   57,  127,  127,    0,    0,    0,
  422.         0,    0,   63,   64,    0,    0,    0,    0,   72,    0,
  423.         0,   76,   79,    0,    0,    0,    0,    0,    0,    0,
  424.        90,   91,    0,    0,    0,    0,   96,    0,    0,    0,
  425.         0,    0,    0,    0,    0,    0,    0,  127,  127,  127,
  426.       127,  127,  127,    5,  127,  127,  127,  127,  127,  127,
  427.       127,  127,  127,  127,  127,  127,  127,  127,  127,  127,
  428.       127,  127,  127,    7,    8,  127,  127,  127,  127,  127,
  429.       127,  127,  127,  127,  127,  127,  127,  127,  127,  127,
  430.  
  431.       127,  127,  127,  127,  127,  127,   58,  127,   54,    0,
  432.         0,    0,    0,  112,    0,    0,    0,    0,    0,    0,
  433.         0,    0,    0,   82,    0,   86,   87,    0,   89,    0,
  434.         0,    0,    0,    0,    0,    0,    0,    0,    0,  105,
  435.       106,    0,    0,  113,   11,    3,   12,  123,  124,  127,
  436.        14,   15,   16,   17,   18,   19,   20,   21,   22,   24,
  437.        25,   28,   27,   30,   31,   32,   33,   34,   35,   36,
  438.        37,   38,   39,   40,   41,   42,  127,  127,  127,   43,
  439.        44,   45,   46,   47,   48,   49,   50,   51,   52,   53,
  440.       127,   56,  114,    0,    0,   59,    0,   65,    0,    0,
  441.  
  442.         0,   74,    0,    0,    0,    0,    0,    0,   88,    0,
  443.         0,   94,   81,    0,    0,    0,    0,    0,    0,  110,
  444.         0,  127,  120,  121,  127,   55,    0,    0,    0,    0,
  445.        67,   70,   75,    0,    0,   80,    0,    0,    0,   93,
  446.         0,    0,    0,    0,  102,  104,    0,  127,  127,    2,
  447.         1,    0,   66,    0,   78,    0,   84,   92,    0,    0,
  448.        99,  100,  111,  127,  122,    0,   77,    0,   95,   98,
  449.       127,   60,   83,  127,  127,  125,  126,    0
  450.     } ;
  451.  
  452. static yyconst flex_int32_t yy_ec[256] =
  453.     {   0,
  454.         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
  455.         1,    1,    4,    1,    1,    1,    1,    1,    1,    1,
  456.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  457.         1,    2,    5,    1,    6,    7,    1,    1,    1,    1,
  458.         1,    1,    8,    1,    8,    9,    1,   10,   11,   12,
  459.        13,   14,   15,   15,   15,   15,   15,    1,    1,    1,
  460.         1,    1,    1,    1,   16,   17,   18,   19,   20,   21,
  461.        22,   23,   24,    7,   25,   26,   27,   28,   29,   30,
  462.        31,   32,   33,   34,   35,   36,   37,   38,   39,   40,
  463.         1,    1,    1,    1,   41,    1,   42,   43,   44,   45,
  464.  
  465.        46,   47,   48,   49,   50,   51,   52,   53,   54,   55,
  466.        56,   57,   58,   59,   60,   61,   62,   63,   64,   65,
  467.        66,   67,    1,    1,    1,    1,    1,    1,    1,    1,
  468.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  469.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  470.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  471.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  472.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  473.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  474.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  475.  
  476.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  477.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  478.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  479.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  480.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  481.         1,    1,    1,    1,    1
  482.     } ;
  483.  
  484. static yyconst flex_int32_t yy_meta[68] =
  485.     {   0,
  486.         1,    1,    1,    1,    1,    1,    2,    1,    3,    2,
  487.         2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
  488.         2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
  489.         2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
  490.         2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
  491.         2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
  492.         2,    2,    2,    2,    2,    2,    2
  493.     } ;
  494.  
  495. static yyconst flex_int16_t yy_base[782] =
  496.     {   0,
  497.         0,    0, 1207, 1208,   66, 1208, 1201, 1202,    0,   69,
  498.        85,  128,  140,  152,  151,   58,   56,   63,   76, 1180,
  499.       158,  160,   39,   61,  155,  179,   68, 1173, 1143, 1142,
  500.      1154, 1138, 1152, 1151,  105, 1180, 1192, 1208,    0,  215,
  501.      1208,  198,  177,  180,   20,  146,   66,  122,  184, 1152,
  502.      1138,   54,  137, 1136, 1148,  192, 1208,  207,  234,   98,
  503.       221,  228,  232,  236,  294,  306,  317, 1208, 1208, 1208,
  504.      1157, 1170, 1164,  189, 1153, 1156, 1152, 1167,  107,  233,
  505.      1149, 1163,  194, 1149, 1162, 1153, 1166, 1143, 1154, 1145,
  506.       214, 1146, 1137, 1146, 1137, 1136, 1137, 1131, 1137, 1148,
  507.  
  508.      1134, 1131, 1132,  220, 1146, 1133,  290, 1140, 1142, 1118,
  509.        65,  139, 1138, 1114, 1099, 1094, 1111, 1087, 1092, 1118,
  510.       176, 1107,  280, 1102,  331,  305, 1104, 1085,  307, 1095,
  511.      1091, 1086,  182, 1092, 1078, 1094, 1091, 1082,  314,  317,
  512.      1084, 1073, 1087, 1090, 1072, 1087, 1074, 1071, 1078,  308,
  513.      1086,  144,  313,  329,  332,  339, 1063, 1080, 1081, 1074,
  514.      1056,  267, 1057, 1079, 1070,  328,  335,  339,  343,  347,
  515.       351,  355, 1208,  413,  424,  430,  436,  434,  435, 1103,
  516.         0, 1102, 1085, 1075,  437, 1095,  438,  445,  462,  464,
  517.       466,  465,    0,  490,    0,  491,  492,    0,  493,  494,
  518.  
  519.         0,  518,  519,  520,  530,  531,  547, 1090, 1083, 1096,
  520.       555,  557, 1077,  558, 1069,  559,  583,  584, 1090,  585,
  521.       591,  595,  612,  616, 1067, 1077,  271,  293,  317,  413,
  522.      1065, 1057, 1056, 1041, 1041, 1040, 1039, 1082, 1054, 1042,
  523.       648,  654,  628, 1046,  231, 1043, 1037, 1037, 1031, 1044,
  524.      1044, 1029, 1208, 1208, 1044, 1032,  630, 1039,  322, 1036,
  525.      1042,  481, 1037, 1208, 1028, 1035, 1034, 1037, 1023, 1022,
  526.      1026, 1021,  338, 1026,  632,  640,  642, 1208, 1018, 1016,
  527.      1016, 1024, 1025, 1007,  594, 1012, 1018,  426,  454,  480,
  528.       528,  628,  692,  698, 1024,  587, 1031, 1022,  602,  659,
  529.  
  530.      1029, 1028, 1021, 1035, 1025, 1016,  678, 1023,    0, 1014,
  531.       679, 1021, 1012,  680, 1019, 1010,  696, 1017, 1008,  697,
  532.      1015, 1006,  698, 1013, 1004,  699, 1011, 1002,  700, 1009,
  533.      1000,  704, 1007,  998,  705, 1005,  996,  706, 1003,  994,
  534.       707, 1001,  992,  708,  999,  990,  709,  997,  988,  710,
  535.       995,  986,  711,  993,  984,  712,  991,  982,  713,  989,
  536.       992,  985,  992,  977,  714,  984,  975,  715,  982,    0,
  537.       973,  716,  980,  979,  970,  717,  977,  968,  718,  975,
  538.       966,  724,  973,  976,  963,  725,  970,  961,  726,  968,
  539.       959,  742,  966,  957,  743,  964,  955,  744,  962,  961,
  540.  
  541.         0,  952,  959,  950,  957,  948,  955,  946,  953,  952,
  542.       930,  924,  929,  935,  918,  933,  291, 1208,  932,  922,
  543.       926, 1208, 1208,  916,  925,  911,  928,  911,  914,  908,
  544.      1208,  909,  908,  905,  912,  905,  913,  909,  919,  916,
  545.       898,  904,  911,  895,  894,  912,  894,  906,  905, 1208,
  546.       904,  894,  898, 1208,  885, 1208,  890,  890,  898,  881,
  547.       882,  892, 1208, 1208,  924,  906,  922,    0,  757,  920,
  548.       920,  919,  918,  917,  916,  915,  914,  913,  912,  911,
  549.       910,  909,  908,  907,  906,  905,  904,  903,  902,  889,
  550.       882,    0,  899,  898,  897,  896,  895,  894,  893,  871,
  551.  
  552.       891,  890,  889,  888,  887,  886,  885,  884,  883,  882,
  553.       881,  850,  853,  833,    0,  834,  827,  834,  833,  834,
  554.       826,  844, 1208, 1208,  826,  824,  834,  827, 1208,  822,
  555.       839,  408, 1208,  830,  814,  815,  824,  815,  814,  814,
  556.      1208,  813,  822,  812,  828,  825, 1208,  824,  822,  811,
  557.       812,  808,  800,  807,  802,  803,  798,  824,  824,  822,
  558.       836,  835,  830,    0,  818,  817,  816,  815,  814,  813,
  559.       812,  811,  810,  809,  808,  807,  806,  805,  804,  803,
  560.       802,  801,  800,    0,    0,  799,  798,  797,  796,  795,
  561.       794,  793,  572,  792,  791,  790,  789,  788,  787,  786,
  562.  
  563.       785,  784,  783,  782,  760,  760,    0,  767,    0,  801,
  564.       800,  749,  767, 1208,  762,  757,  750,  746,  758,  748,
  565.       746,  742,  758,  749,  748, 1208, 1208,  751, 1208,  746,
  566.       733,  722,  733,  725,  726,  739,  734,  737,  719, 1208,
  567.      1208,  731,  720, 1208,    0,    0,    0,    0,    0,  759,
  568.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  569.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  570.         0,    0,    0,    0,    0,    0,  755,  754,  752,    0,
  571.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  572.       710,    0,    0,  761,  755, 1208,  702, 1208,  630,  626,
  573.  
  574.       611, 1208,  592,  606,  593,  594,  591,  599, 1208,  574,
  575.       582, 1208, 1208,  581,  566,  553,  551,  551,  541, 1208,
  576.       514,  548,    0,    0,  548,    0,  554,  545,  489,  473,
  577.      1208, 1208, 1208,  455,  454, 1208,  450,  417,  428, 1208,
  578.       415,  408,  364,  369, 1208, 1208,  351,  367,  356, 1208,
  579.      1208,  329, 1208,  326, 1208,  332, 1208, 1208,  315,  278,
  580.      1208, 1208, 1208,  296,    0,  198, 1208,  177, 1208, 1208,
  581.       270, 1208, 1208,  216,  172,    0,    0, 1208,  790,   70,
  582.       793
  583.     } ;
  584.  
  585. static yyconst flex_int16_t yy_def[782] =
  586.     {   0,
  587.       778,    1,  778,  778,  778,  778,  778,  779,  780,  778,
  588.       778,  778,  778,  778,  780,  780,  780,  780,  780,  780,
  589.       780,  780,  780,  780,  780,  780,  780,  780,  780,  780,
  590.       780,  780,  780,  780,  778,  778,  779,  778,  780,  778,
  591.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  592.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  593.       778,  778,  778,  778,  781,  778,  778,  778,  778,  778,
  594.       780,  780,  780,  780,  780,  780,  780,  780,  780,  780,
  595.       780,  780,  780,  780,  780,  780,  780,  780,  780,  780,
  596.       780,  780,  780,  780,  780,  780,  780,  780,  780,  780,
  597.  
  598.       780,  780,  780,  780,  780,  780,  780,  780,  780,  780,
  599.       780,  780,  780,  780,  780,  780,  780,  780,  780,  778,
  600.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  601.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  602.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  603.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  604.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  605.       778,  778,  778,  778,  778,  778,  778,  780,  780,  780,
  606.       780,  780,  780,  780,  780,  780,  780,  780,  780,  780,
  607.       780,  780,  780,  780,  780,  780,  780,  780,  780,  780,
  608.  
  609.       780,  780,  780,  780,  780,  780,  780,  780,  780,  780,
  610.       780,  780,  780,  780,  780,  780,  780,  780,  780,  780,
  611.       780,  780,  780,  780,  780,  780,  780,  780,  780,  780,
  612.       780,  780,  780,  780,  780,  780,  780,  778,  778,  778,
  613.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  614.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  615.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  616.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  617.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  618.       778,  778,  778,  778,  780,  780,  780,  780,  780,  780,
  619.  
  620.       780,  780,  780,  780,  780,  780,  780,  780,  780,  780,
  621.       780,  780,  780,  780,  780,  780,  780,  780,  780,  780,
  622.       780,  780,  780,  780,  780,  780,  780,  780,  780,  780,
  623.       780,  780,  780,  780,  780,  780,  780,  780,  780,  780,
  624.       780,  780,  780,  780,  780,  780,  780,  780,  780,  780,
  625.       780,  780,  780,  780,  780,  780,  780,  780,  780,  780,
  626.       780,  780,  780,  780,  780,  780,  780,  780,  780,  780,
  627.       780,  780,  780,  780,  780,  780,  780,  780,  780,  780,
  628.       780,  780,  780,  780,  780,  780,  780,  780,  780,  780,
  629.       780,  780,  780,  780,  780,  780,  780,  780,  780,  780,
  630.  
  631.       780,  780,  780,  780,  780,  780,  780,  780,  780,  780,
  632.       780,  780,  780,  780,  780,  780,  778,  778,  778,  778,
  633.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  634.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  635.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  636.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  637.       778,  778,  778,  778,  780,  780,  780,  780,  780,  780,
  638.       780,  780,  780,  780,  780,  780,  780,  780,  780,  780,
  639.       780,  780,  780,  780,  780,  780,  780,  780,  780,  780,
  640.       780,  780,  780,  780,  780,  780,  780,  780,  780,  780,
  641.  
  642.       780,  780,  780,  780,  780,  780,  780,  780,  780,  780,
  643.       780,  780,  780,  780,  780,  780,  780,  778,  778,  778,
  644.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  645.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  646.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  647.       778,  778,  778,  778,  778,  778,  778,  780,  780,  780,
  648.       780,  780,  780,  780,  780,  780,  780,  780,  780,  780,
  649.       780,  780,  780,  780,  780,  780,  780,  780,  780,  780,
  650.       780,  780,  780,  780,  780,  780,  780,  780,  780,  780,
  651.       780,  780,  780,  780,  780,  780,  780,  780,  780,  780,
  652.  
  653.       780,  780,  780,  780,  780,  780,  780,  780,  780,  778,
  654.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  655.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  656.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  657.       778,  778,  778,  778,  780,  780,  780,  780,  780,  780,
  658.       780,  780,  780,  780,  780,  780,  780,  780,  780,  780,
  659.       780,  780,  780,  780,  780,  780,  780,  780,  780,  780,
  660.       780,  780,  780,  780,  780,  780,  780,  780,  780,  780,
  661.       780,  780,  780,  780,  780,  780,  780,  780,  780,  780,
  662.       780,  780,  780,  778,  778,  778,  778,  778,  778,  778,
  663.  
  664.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  665.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  666.       778,  780,  780,  780,  780,  780,  778,  778,  778,  778,
  667.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  668.       778,  778,  778,  778,  778,  778,  778,  780,  780,  778,
  669.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  670.       778,  778,  778,  780,  780,  778,  778,  778,  778,  778,
  671.       780,  778,  778,  780,  780,  780,  780,    0,  778,  778,
  672.       778
  673.     } ;
  674.  
  675. static yyconst flex_int16_t yy_nxt[1276] =
  676.     {   0,
  677.         4,    5,    6,    5,    7,    8,    9,    4,   10,   11,
  678.        12,   13,   14,   11,   11,   15,    9,   16,   17,   18,
  679.        19,    9,    9,    9,   20,   21,   22,    9,   23,   24,
  680.         9,   25,   26,   27,    9,    9,    9,   28,    9,    9,
  681.         9,    9,    9,    9,    9,    9,   29,    9,    9,    9,
  682.         9,    9,    9,    9,    9,    9,   30,    9,   31,   32,
  683.        33,    9,   34,    9,    9,    9,    9,   35,   95,   35,
  684.        40,   39,  130,   96,   79,  131,   97,   41,   42,   42,
  685.        42,   42,   42,   42,   76,   80,   77,  111,   81,   98,
  686.        82,  226,   78,   65,   66,   66,   66,   66,   66,   66,
  687.  
  688.        83,   84,  227,  143,   67,  112,   35,   85,   35,  144,
  689.        43,   44,   45,   46,   47,   48,   49,   50,   51,  134,
  690.       135,   52,   53,   54,   55,   56,   57,   58,   59,   60,
  691.        67,  136,   61,   62,   63,   64,   65,   66,   66,   66,
  692.        66,   66,   66,  163,  187,  188,   68,   67,   65,   66,
  693.        66,   66,   66,   66,   66,  228,  164,  229,   69,   67,
  694.        65,   66,   66,   66,   66,   66,   66,   71,  230,   72,
  695.        70,   67,   99,   67,  100,   91,   73,  137,  145,   87,
  696.       138,   88,   74,   92,   75,   67,   89,  101,   93,   90,
  697.       777,  132,  146,  270,   94,  133,  102,   67,  103,  147,
  698.  
  699.       104,  105,  106,  271,  107,  194,  108,   42,   42,   42,
  700.        42,   42,   42,  109,  181,  110,   40,  125,  126,  126,
  701.       182,  129,  126,  195,  126,  139,  140,  126,  250,  127,
  702.       127,  126,  203,  150,  776,  126,  128,  128,  126,  217,
  703.       251,  773,  126,  125,  151,  189,  190,  152,  154,  155,
  704.       153,  204,  772,  218,  156,  191,  121,  122,   45,   46,
  705.        47,   48,  157,   50,   51,  126,  165,   52,   53,   54,
  706.        55,   56,   57,  123,   59,   60,  420,  158,  124,  159,
  707.       774,  775,  160,  161,  166,  166,  166,  166,  402,  421,
  708.       162,  167,  166,  168,  169,  170,  166,  166,  171,  172,
  709.  
  710.       166,  166,  166,  174,  174,  174,  174,  174,  174,  221,
  711.       404,  403,  283,  175,   65,   66,   66,   66,   66,   66,
  712.        66,  240,  284,  222,  176,   67,  177,  177,  177,  177,
  713.       177,  177,  771,  405,  406,  157,  770,  518,  241,  175,
  714.       242,  242,  242,  242,  242,  242,  243,  243,  243,  243,
  715.       246,   67,  243,  519,  243,  243,  243,  407,  257,  243,
  716.       267,  243,  272,  243,  243,  243,  268,  432,  273,  769,
  717.       243,  243,  243,  275,  243,  243,  243,  768,  767,  243,
  718.       276,  277,  433,  274,  766,  447,  243,  243,  448,  765,
  719.       243,  288,  288,  288,  288,  764,  763,  243,  288,  288,
  720.  
  721.       288,  288,  289,  288,  288,  290,  291,  288,  288,  288,
  722.       288,  288,  288,  288,  292,  288,  288,  288,  288,  288,
  723.       288,  288,   42,   42,   42,   42,   42,   42,  762,  761,
  724.       408,  293,  125,  294,  294,  294,  294,  294,  294,  177,
  725.       177,  177,  177,  177,  177,  177,  177,  177,  177,  177,
  726.       177,  295,  298,  409,  306,  310,  296,  299,  125,  307,
  727.       311,  621,  313,  760,  622,  296,  300,  314,  307,  311,
  728.       759,  296,  299,  758,  297,  301,  314,  308,  312,  316,
  729.       757,  319,  325,  322,  317,  315,  320,  326,  323,  463,
  730.       463,  463,  463,  317,  756,  320,  326,  323,  755,  317,
  731.  
  732.       754,  320,  318,  323,  321,  327,  324,  328,  331,  334,
  733.       337,  340,  329,  332,  335,  338,  341,  463,  463,  463,
  734.       463,  329,  332,  335,  338,  341,  436,  753,  332,  335,
  735.       330,  333,  336,  339,  342,  343,  346,  349,  752,  437,
  736.       344,  347,  350,  464,  463,  463,  463,  352,  355,  344,
  737.       347,  350,  353,  356,  751,  344,  347,  350,  345,  348,
  738.       351,  353,  356,  750,  358,  749,  748,  353,  356,  359,
  739.       354,  357,  364,  747,  367,  371,  375,  365,  359,  368,
  740.       372,  376,  677,  678,  359,  746,  365,  360,  368,  372,
  741.       376,  463,  463,  463,  463,  366,  376,  369,  373,  377,
  742.  
  743.       378,  381,  385,  679,  295,  379,  382,  386,  388,  745,
  744.       744,  743,  391,  389,  379,  382,  386,  392,  742,  298,
  745.       379,  382,  389,  380,  383,  387,  392,  297,  389,  394,
  746.       741,  390,  392,  397,  395,  393,  740,  457,  398,  458,
  747.       739,  459,  301,  395,  738,  737,  736,  398,  735,  395,
  748.       734,  733,  396,  398,  460,  732,  399,  242,  242,  242,
  749.       242,  242,  242,  242,  242,  242,  242,  242,  242,  418,
  750.       418,  418,  418,  418,  418,  418,  298,  418,  466,  418,
  751.       731,  418,  418,  450,  418,  730,  418,  418,  418,  418,
  752.       418,  463,  463,  463,  463,  306,  310,  313,  418,  301,
  753.  
  754.       418,  294,  294,  294,  294,  294,  294,  294,  294,  294,
  755.       294,  294,  294,  316,  319,  322,  325,  328,  308,  312,
  756.       315,  331,  334,  337,  340,  343,  346,  349,  352,  355,
  757.       358,  364,  367,  371,  375,  378,  318,  321,  324,  327,
  758.       330,  381,  385,  388,  333,  336,  339,  342,  345,  348,
  759.       351,  354,  357,  360,  366,  369,  373,  377,  380,  391,
  760.       394,  397,  729,  728,  383,  387,  390,  561,  562,  727,
  761.       726,  725,  724,  723,  722,  721,  720,  719,  718,  717,
  762.       716,  715,  393,  396,  399,  714,  713,  712,  711,  563,
  763.        37,   37,   37,  173,  173,  710,  709,  708,  707,  706,
  764.  
  765.       705,  704,  703,  702,  701,  700,  699,  698,  697,  696,
  766.       695,  694,  693,  692,  691,  690,  689,  688,  687,  686,
  767.       685,  684,  683,  682,  681,  680,  676,  675,  674,  673,
  768.       672,  671,  670,  669,  668,  667,  666,  665,  664,  663,
  769.       662,  661,  660,  659,  658,  657,  656,  655,  654,  653,
  770.       652,  651,  650,  649,  648,  647,  646,  645,  644,  643,
  771.       642,  641,  640,  639,  638,  637,  636,  635,  634,  633,
  772.       632,  631,  630,  629,  628,  627,  626,  625,  624,  623,
  773.       620,  619,  618,  617,  616,  615,  614,  613,  612,  611,
  774.       610,  609,  608,  607,  606,  605,  604,  603,  602,  601,
  775.  
  776.       600,  599,  598,  597,  596,  595,  594,  593,  592,  591,
  777.       590,  589,  588,  587,  586,  585,  584,  583,  582,  581,
  778.       580,  579,  578,  577,  576,  575,  574,  573,  572,  571,
  779.       570,  569,  568,  567,  566,  565,  564,  560,  559,  558,
  780.       557,  556,  555,  554,  553,  552,  551,  550,  549,  548,
  781.       547,  546,  545,  544,  543,  542,  541,  540,  539,  538,
  782.       537,  536,  535,  534,  533,  532,  531,  530,  529,  528,
  783.       527,  526,  525,  524,  523,  522,  521,  520,  517,  516,
  784.       515,  514,  513,  512,  511,  510,  409,  509,  407,  508,
  785.       405,  507,  403,  506,  505,  399,  504,  396,  503,  393,
  786.  
  787.       502,  390,  501,  387,  500,  499,  383,  498,  380,  497,
  788.       377,  496,  495,  373,  494,  369,  493,  366,  492,  491,
  789.       490,  489,  360,  488,  357,  487,  354,  486,  351,  485,
  790.       348,  484,  345,  483,  342,  482,  339,  481,  336,  480,
  791.       333,  479,  330,  478,  327,  477,  324,  476,  321,  475,
  792.       318,  474,  315,  473,  312,  472,  308,  471,  470,  469,
  793.       468,  467,  301,  465,  297,  462,  461,  456,  455,  454,
  794.       453,  452,  451,  449,  446,  445,  444,  443,  442,  441,
  795.       440,  439,  438,  435,  434,  431,  430,  429,  428,  427,
  796.       426,  425,  424,  423,  422,  419,  274,  246,  417,  416,
  797.  
  798.       415,  414,  413,  412,  411,  410,  401,  400,  384,  374,
  799.       370,  363,  362,  361,  309,  305,  304,  303,  302,  287,
  800.       286,  285,  282,  281,  280,  279,  278,  269,  266,  265,
  801.       264,  263,  262,  261,  260,  259,  258,  256,  255,  254,
  802.       253,  252,  249,  248,  247,  245,  244,  165,  239,  238,
  803.       237,  236,  235,  234,  233,  232,  231,  225,  224,  223,
  804.       220,  219,  216,  215,  214,  213,  212,  211,  210,  209,
  805.       208,  207,  206,  205,  202,  201,  200,  199,  198,  197,
  806.       196,  193,  192,  186,  185,  184,  183,  180,  179,  178,
  807.       149,  148,  142,  141,   38,  120,  119,  118,  117,  116,
  808.  
  809.       115,  114,  113,   86,   38,   36,  778,    3,  778,  778,
  810.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  811.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  812.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  813.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  814.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  815.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  816.       778,  778,  778,  778,  778
  817.     } ;
  818.  
  819. static yyconst flex_int16_t yy_chk[1276] =
  820.     {   0,
  821.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  822.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  823.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  824.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  825.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  826.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  827.         1,    1,    1,    1,    1,    1,    1,    5,   23,    5,
  828.        10,  780,   45,   23,   17,   45,   24,   10,   10,   10,
  829.        10,   10,   10,   10,   16,   17,   16,   27,   17,   24,
  830.        18,  111,   16,   11,   11,   11,   11,   11,   11,   11,
  831.  
  832.        18,   19,  111,   52,   11,   27,   35,   19,   35,   52,
  833.        10,   10,   10,   10,   10,   10,   10,   10,   10,   47,
  834.        47,   10,   10,   10,   10,   10,   10,   10,   10,   10,
  835.        11,   47,   10,   10,   10,   10,   12,   12,   12,   12,
  836.        12,   12,   12,   60,   79,   79,   12,   12,   13,   13,
  837.        13,   13,   13,   13,   13,  112,   60,  112,   13,   13,
  838.        14,   14,   14,   14,   14,   14,   14,   15,  112,   15,
  839.        14,   14,   25,   12,   25,   22,   15,   48,   53,   21,
  840.        48,   21,   15,   22,   15,   13,   21,   25,   22,   21,
  841.       775,   46,   53,  152,   22,   46,   26,   14,   26,   53,
  842.  
  843.        26,   26,   26,  152,   26,   83,   26,   42,   42,   42,
  844.        42,   42,   42,   26,   74,   26,   40,   42,   43,   43,
  845.        74,   44,   44,   83,   43,   49,   49,   44,  133,  121,
  846.        43,   49,   91,   56,  774,   43,  121,   43,   44,  104,
  847.       133,  768,   49,   42,   56,   80,   80,   56,   58,   58,
  848.        56,   91,  766,  104,   58,   80,   40,   40,   40,   40,
  849.        40,   40,   58,   40,   40,   58,   61,   40,   40,   40,
  850.        40,   40,   40,   40,   40,   40,  245,   59,   40,   59,
  851.       771,  771,   59,   59,   61,   61,   61,   61,  227,  245,
  852.        59,   62,   62,   62,   62,   63,   63,   63,   63,   64,
  853.  
  854.        64,   64,   64,   65,   65,   65,   65,   65,   65,  107,
  855.       228,  227,  162,   65,   66,   66,   66,   66,   66,   66,
  856.        66,  123,  162,  107,   67,   66,   67,   67,   67,   67,
  857.        67,   67,  764,  228,  229,  123,  760,  417,  125,   65,
  858.       125,  125,  125,  125,  125,  125,  126,  126,  129,  129,
  859.       129,   66,  126,  417,  129,  139,  139,  229,  140,  140,
  860.       150,  139,  153,  126,  140,  129,  150,  259,  153,  759,
  861.       154,  154,  139,  155,  155,  140,  154,  756,  754,  155,
  862.       156,  156,  259,  154,  752,  273,  156,  154,  273,  749,
  863.       155,  166,  166,  166,  166,  748,  747,  156,  167,  167,
  864.  
  865.       167,  167,  168,  168,  168,  168,  169,  169,  169,  169,
  866.       170,  170,  170,  170,  171,  171,  171,  171,  172,  172,
  867.       172,  172,  174,  174,  174,  174,  174,  174,  744,  743,
  868.       230,  175,  174,  175,  175,  175,  175,  175,  175,  176,
  869.       176,  176,  176,  176,  176,  177,  177,  177,  177,  177,
  870.       177,  178,  179,  230,  185,  187,  178,  179,  174,  185,
  871.       187,  532,  188,  742,  532,  178,  179,  188,  185,  187,
  872.       741,  178,  179,  739,  178,  179,  188,  185,  187,  189,
  873.       738,  190,  192,  191,  189,  188,  190,  192,  191,  288,
  874.       288,  288,  288,  189,  737,  190,  192,  191,  735,  189,
  875.  
  876.       734,  190,  189,  191,  190,  192,  191,  194,  196,  197,
  877.       199,  200,  194,  196,  197,  199,  200,  289,  289,  289,
  878.       289,  194,  196,  197,  199,  200,  262,  730,  196,  197,
  879.       194,  196,  197,  199,  200,  202,  203,  204,  729,  262,
  880.       202,  203,  204,  290,  290,  290,  290,  205,  206,  202,
  881.       203,  204,  205,  206,  728,  202,  203,  204,  202,  203,
  882.       204,  205,  206,  727,  207,  725,  722,  205,  206,  207,
  883.       205,  206,  211,  721,  212,  214,  216,  211,  207,  212,
  884.       214,  216,  593,  593,  207,  719,  211,  207,  212,  214,
  885.       216,  291,  291,  291,  291,  211,  216,  212,  214,  216,
  886.  
  887.       217,  218,  220,  593,  296,  217,  218,  220,  221,  718,
  888.       717,  716,  222,  221,  217,  218,  220,  222,  715,  299,
  889.       217,  218,  221,  217,  218,  220,  222,  296,  221,  223,
  890.       714,  221,  222,  224,  223,  222,  711,  285,  224,  285,
  891.       710,  285,  299,  223,  708,  707,  706,  224,  705,  223,
  892.       704,  703,  223,  224,  285,  701,  224,  241,  241,  241,
  893.       241,  241,  241,  242,  242,  242,  242,  242,  242,  243,
  894.       243,  257,  257,  275,  275,  243,  300,  257,  300,  275,
  895.       700,  276,  276,  277,  277,  699,  243,  276,  257,  277,
  896.       275,  292,  292,  292,  292,  307,  311,  314,  276,  300,
  897.  
  898.       277,  293,  293,  293,  293,  293,  293,  294,  294,  294,
  899.       294,  294,  294,  317,  320,  323,  326,  329,  307,  311,
  900.       314,  332,  335,  338,  341,  344,  347,  350,  353,  356,
  901.       359,  365,  368,  372,  376,  379,  317,  320,  323,  326,
  902.       329,  382,  386,  389,  332,  335,  338,  341,  344,  347,
  903.       350,  353,  356,  359,  365,  368,  372,  376,  379,  392,
  904.       395,  398,  697,  695,  382,  386,  389,  469,  469,  694,
  905.       691,  679,  678,  677,  650,  643,  642,  639,  638,  637,
  906.       636,  635,  392,  395,  398,  634,  633,  632,  631,  469,
  907.       779,  779,  779,  781,  781,  630,  628,  625,  624,  623,
  908.  
  909.       622,  621,  620,  619,  618,  617,  616,  615,  613,  612,
  910.       611,  610,  608,  606,  605,  604,  603,  602,  601,  600,
  911.       599,  598,  597,  596,  595,  594,  592,  591,  590,  589,
  912.       588,  587,  586,  583,  582,  581,  580,  579,  578,  577,
  913.       576,  575,  574,  573,  572,  571,  570,  569,  568,  567,
  914.       566,  565,  563,  562,  561,  560,  559,  558,  557,  556,
  915.       555,  554,  553,  552,  551,  550,  549,  548,  546,  545,
  916.       544,  543,  542,  540,  539,  538,  537,  536,  535,  534,
  917.       531,  530,  528,  527,  526,  525,  522,  521,  520,  519,
  918.       518,  517,  516,  514,  513,  512,  511,  510,  509,  508,
  919.  
  920.       507,  506,  505,  504,  503,  502,  501,  500,  499,  498,
  921.       497,  496,  495,  494,  493,  491,  490,  489,  488,  487,
  922.       486,  485,  484,  483,  482,  481,  480,  479,  478,  477,
  923.       476,  475,  474,  473,  472,  471,  470,  467,  466,  465,
  924.       462,  461,  460,  459,  458,  457,  455,  453,  452,  451,
  925.       449,  448,  447,  446,  445,  444,  443,  442,  441,  440,
  926.       439,  438,  437,  436,  435,  434,  433,  432,  430,  429,
  927.       428,  427,  426,  425,  424,  421,  420,  419,  416,  415,
  928.       414,  413,  412,  411,  410,  409,  408,  407,  406,  405,
  929.       404,  403,  402,  400,  399,  397,  396,  394,  393,  391,
  930.  
  931.       390,  388,  387,  385,  384,  383,  381,  380,  378,  377,
  932.       375,  374,  373,  371,  369,  367,  366,  364,  363,  362,
  933.       361,  360,  358,  357,  355,  354,  352,  351,  349,  348,
  934.       346,  345,  343,  342,  340,  339,  337,  336,  334,  333,
  935.       331,  330,  328,  327,  325,  324,  322,  321,  319,  318,
  936.       316,  315,  313,  312,  310,  308,  306,  305,  304,  303,
  937.       302,  301,  298,  297,  295,  287,  286,  284,  283,  282,
  938.       281,  280,  279,  274,  272,  271,  270,  269,  268,  267,
  939.       266,  265,  263,  261,  260,  258,  256,  255,  252,  251,
  940.       250,  249,  248,  247,  246,  244,  240,  239,  238,  237,
  941.  
  942.       236,  235,  234,  233,  232,  231,  226,  225,  219,  215,
  943.       213,  210,  209,  208,  186,  184,  183,  182,  180,  165,
  944.       164,  163,  161,  160,  159,  158,  157,  151,  149,  148,
  945.       147,  146,  145,  144,  143,  142,  141,  138,  137,  136,
  946.       135,  134,  132,  131,  130,  128,  127,  124,  122,  120,
  947.       119,  118,  117,  116,  115,  114,  113,  110,  109,  108,
  948.       106,  105,  103,  102,  101,  100,   99,   98,   97,   96,
  949.        95,   94,   93,   92,   90,   89,   88,   87,   86,   85,
  950.        84,   82,   81,   78,   77,   76,   75,   73,   72,   71,
  951.        55,   54,   51,   50,   37,   36,   34,   33,   32,   31,
  952.  
  953.        30,   29,   28,   20,    8,    7,    3,  778,  778,  778,
  954.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  955.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  956.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  957.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  958.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  959.       778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
  960.       778,  778,  778,  778,  778
  961.     } ;
  962.  
  963. /* The intent behind this definition is that it'll catch
  964.  * any uses of REJECT which flex missed.
  965.  */
  966. #define REJECT reject_used_but_not_detected
  967. #define yymore() yymore_used_but_not_detected
  968. #define YY_MORE_ADJ 0
  969. #define YY_RESTORE_YY_MORE_OFFSET
  970. #line 1 "../../../src/mesa/program/program_lexer.l"
  971. #line 2 "../../../src/mesa/program/program_lexer.l"
  972. /*
  973.  * Copyright © 2009 Intel Corporation
  974.  *
  975.  * Permission is hereby granted, free of charge, to any person obtaining a
  976.  * copy of this software and associated documentation files (the "Software"),
  977.  * to deal in the Software without restriction, including without limitation
  978.  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  979.  * and/or sell copies of the Software, and to permit persons to whom the
  980.  * Software is furnished to do so, subject to the following conditions:
  981.  *
  982.  * The above copyright notice and this permission notice (including the next
  983.  * paragraph) shall be included in all copies or substantial portions of the
  984.  * Software.
  985.  *
  986.  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  987.  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  988.  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
  989.  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  990.  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  991.  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  992.  * DEALINGS IN THE SOFTWARE.
  993.  */
  994. #include "main/glheader.h"
  995. #include "main/imports.h"
  996. #include "program/prog_instruction.h"
  997. #include "program/prog_statevars.h"
  998. #include "program/symbol_table.h"
  999. #include "program/program_parser.h"
  1000. #include "program/program_parse.tab.h"
  1001. #include "util/strtod.h"
  1002.  
  1003. #define require_ARB_vp (yyextra->mode == ARB_vertex)
  1004. #define require_ARB_fp (yyextra->mode == ARB_fragment)
  1005. #define require_NV_fp  (yyextra->option.NV_fragment)
  1006. #define require_shadow (yyextra->option.Shadow)
  1007. #define require_rect   (yyextra->option.TexRect)
  1008. #define require_texarray        (yyextra->option.TexArray)
  1009.  
  1010. #ifndef HAVE_UNISTD_H
  1011. #define YY_NO_UNISTD_H
  1012. #endif
  1013.  
  1014. #define return_token_or_IDENTIFIER(condition, token)    \
  1015.    do {                                                 \
  1016.       if (condition) {                                  \
  1017.          return token;                                  \
  1018.       } else {                                          \
  1019.          return handle_ident(yyextra, yytext, yylval);  \
  1020.       }                                                 \
  1021.    } while (0)
  1022.  
  1023. #define return_token_or_DOT(condition, token)           \
  1024.    do {                                                 \
  1025.       if (condition) {                                  \
  1026.          return token;                                  \
  1027.       } else {                                          \
  1028.          yyless(1);                                     \
  1029.          return DOT;                                    \
  1030.       }                                                 \
  1031.    } while (0)
  1032.  
  1033.  
  1034. #define return_opcode(condition, token, opcode, len)    \
  1035.    do {                                                 \
  1036.       if (condition &&                                  \
  1037.           _mesa_parse_instruction_suffix(yyextra,       \
  1038.                                          yytext + len,  \
  1039.                                          & yylval->temp_inst)) {        \
  1040.          yylval->temp_inst.Opcode = OPCODE_ ## opcode;  \
  1041.          return token;                                  \
  1042.       } else {                                          \
  1043.          return handle_ident(yyextra, yytext, yylval);  \
  1044.       }                                                 \
  1045.    } while (0)
  1046.  
  1047. #define SWIZZLE_INVAL  MAKE_SWIZZLE4(SWIZZLE_NIL, SWIZZLE_NIL, \
  1048.                                      SWIZZLE_NIL, SWIZZLE_NIL)
  1049.  
  1050. static unsigned
  1051. mask_from_char(char c)
  1052. {
  1053.    switch (c) {
  1054.    case 'x':
  1055.    case 'r':
  1056.       return WRITEMASK_X;
  1057.    case 'y':
  1058.    case 'g':
  1059.       return WRITEMASK_Y;
  1060.    case 'z':
  1061.    case 'b':
  1062.       return WRITEMASK_Z;
  1063.    case 'w':
  1064.    case 'a':
  1065.       return WRITEMASK_W;
  1066.    }
  1067.  
  1068.    return 0;
  1069. }
  1070.  
  1071. static unsigned
  1072. swiz_from_char(char c)
  1073. {
  1074.    switch (c) {
  1075.    case 'x':
  1076.    case 'r':
  1077.       return SWIZZLE_X;
  1078.    case 'y':
  1079.    case 'g':
  1080.       return SWIZZLE_Y;
  1081.    case 'z':
  1082.    case 'b':
  1083.       return SWIZZLE_Z;
  1084.    case 'w':
  1085.    case 'a':
  1086.       return SWIZZLE_W;
  1087.    }
  1088.  
  1089.    return 0;
  1090. }
  1091.  
  1092. static int
  1093. handle_ident(struct asm_parser_state *state, const char *text, YYSTYPE *lval)
  1094. {
  1095.    lval->string = strdup(text);
  1096.  
  1097.    return (_mesa_symbol_table_find_symbol(state->st, 0, text) == NULL)
  1098.       ? IDENTIFIER : USED_IDENTIFIER;
  1099. }
  1100.  
  1101. #define YY_USER_ACTION                                                  \
  1102.    do {                                                                 \
  1103.       yylloc->first_column = yylloc->last_column;                       \
  1104.       yylloc->last_column += yyleng;                                    \
  1105.       if ((yylloc->first_line == 1)                                     \
  1106.           && (yylloc->first_column == 1)) {                             \
  1107.          yylloc->position = 1;                                          \
  1108.       } else {                                                          \
  1109.          yylloc->position += yylloc->last_column - yylloc->first_column; \
  1110.       }                                                                 \
  1111.    } while(0);
  1112.  
  1113. #define YY_NO_INPUT
  1114.  
  1115. /* Yes, this is intentionally doing nothing. We have this line of code
  1116. here only to avoid the compiler complaining about an unput function
  1117. that is defined, but never called. */
  1118. #define YY_USER_INIT while (0) { unput(0); }
  1119.  
  1120. #define YY_EXTRA_TYPE struct asm_parser_state *
  1121.  
  1122. /* Flex defines a couple of functions with no declarations nor the
  1123. static keyword. Declare them here to avoid a compiler warning. */
  1124. int _mesa_program_lexer_get_column  (yyscan_t yyscanner);
  1125. void _mesa_program_lexer_set_column (int  column_no , yyscan_t yyscanner);
  1126.  
  1127. #line 1128 "program/lex.yy.c"
  1128.  
  1129. #define INITIAL 0
  1130.  
  1131. #ifndef YY_NO_UNISTD_H
  1132. /* Special case for "unistd.h", since it is non-ANSI. We include it way
  1133.  * down here because we want the user's section 1 to have been scanned first.
  1134.  * The user has a chance to override it with an option.
  1135.  */
  1136. #include <unistd.h>
  1137. #endif
  1138.  
  1139. #ifndef YY_EXTRA_TYPE
  1140. #define YY_EXTRA_TYPE void *
  1141. #endif
  1142.  
  1143. /* Holds the entire state of the reentrant scanner. */
  1144. struct yyguts_t
  1145.     {
  1146.  
  1147.     /* User-defined. Not touched by flex. */
  1148.     YY_EXTRA_TYPE yyextra_r;
  1149.  
  1150.     /* The rest are the same as the globals declared in the non-reentrant scanner. */
  1151.     FILE *yyin_r, *yyout_r;
  1152.     size_t yy_buffer_stack_top; /**< index of top of stack. */
  1153.     size_t yy_buffer_stack_max; /**< capacity of stack. */
  1154.     YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
  1155.     char yy_hold_char;
  1156.     yy_size_t yy_n_chars;
  1157.     yy_size_t yyleng_r;
  1158.     char *yy_c_buf_p;
  1159.     int yy_init;
  1160.     int yy_start;
  1161.     int yy_did_buffer_switch_on_eof;
  1162.     int yy_start_stack_ptr;
  1163.     int yy_start_stack_depth;
  1164.     int *yy_start_stack;
  1165.     yy_state_type yy_last_accepting_state;
  1166.     char* yy_last_accepting_cpos;
  1167.  
  1168.     int yylineno_r;
  1169.     int yy_flex_debug_r;
  1170.  
  1171.     char *yytext_r;
  1172.     int yy_more_flag;
  1173.     int yy_more_len;
  1174.  
  1175.     YYSTYPE * yylval_r;
  1176.  
  1177.     YYLTYPE * yylloc_r;
  1178.  
  1179.     }; /* end struct yyguts_t */
  1180.  
  1181. static int yy_init_globals (yyscan_t yyscanner );
  1182.  
  1183.     /* This must go here because YYSTYPE and YYLTYPE are included
  1184.      * from bison output in section 1.*/
  1185.     #    define yylval yyg->yylval_r
  1186.    
  1187.     #    define yylloc yyg->yylloc_r
  1188.    
  1189. int _mesa_program_lexer_lex_init (yyscan_t* scanner);
  1190.  
  1191. int _mesa_program_lexer_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
  1192.  
  1193. /* Accessor methods to globals.
  1194.    These are made visible to non-reentrant scanners for convenience. */
  1195.  
  1196. int _mesa_program_lexer_lex_destroy (yyscan_t yyscanner );
  1197.  
  1198. int _mesa_program_lexer_get_debug (yyscan_t yyscanner );
  1199.  
  1200. void _mesa_program_lexer_set_debug (int debug_flag ,yyscan_t yyscanner );
  1201.  
  1202. YY_EXTRA_TYPE _mesa_program_lexer_get_extra (yyscan_t yyscanner );
  1203.  
  1204. void _mesa_program_lexer_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
  1205.  
  1206. FILE *_mesa_program_lexer_get_in (yyscan_t yyscanner );
  1207.  
  1208. void _mesa_program_lexer_set_in  (FILE * in_str ,yyscan_t yyscanner );
  1209.  
  1210. FILE *_mesa_program_lexer_get_out (yyscan_t yyscanner );
  1211.  
  1212. void _mesa_program_lexer_set_out  (FILE * out_str ,yyscan_t yyscanner );
  1213.  
  1214. yy_size_t _mesa_program_lexer_get_leng (yyscan_t yyscanner );
  1215.  
  1216. char *_mesa_program_lexer_get_text (yyscan_t yyscanner );
  1217.  
  1218. int _mesa_program_lexer_get_lineno (yyscan_t yyscanner );
  1219.  
  1220. void _mesa_program_lexer_set_lineno (int line_number ,yyscan_t yyscanner );
  1221.  
  1222. int _mesa_program_lexer_get_column  (yyscan_t yyscanner );
  1223.  
  1224. void _mesa_program_lexer_set_column (int column_no ,yyscan_t yyscanner );
  1225.  
  1226. YYSTYPE * _mesa_program_lexer_get_lval (yyscan_t yyscanner );
  1227.  
  1228. void _mesa_program_lexer_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
  1229.  
  1230.        YYLTYPE *_mesa_program_lexer_get_lloc (yyscan_t yyscanner );
  1231.    
  1232.         void _mesa_program_lexer_set_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
  1233.    
  1234. /* Macros after this point can all be overridden by user definitions in
  1235.  * section 1.
  1236.  */
  1237.  
  1238. #ifndef YY_SKIP_YYWRAP
  1239. #ifdef __cplusplus
  1240. extern "C" int _mesa_program_lexer_wrap (yyscan_t yyscanner );
  1241. #else
  1242. extern int _mesa_program_lexer_wrap (yyscan_t yyscanner );
  1243. #endif
  1244. #endif
  1245.  
  1246.     static void yyunput (int c,char *buf_ptr  ,yyscan_t yyscanner);
  1247.    
  1248. #ifndef yytext_ptr
  1249. static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
  1250. #endif
  1251.  
  1252. #ifdef YY_NEED_STRLEN
  1253. static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
  1254. #endif
  1255.  
  1256. #ifndef YY_NO_INPUT
  1257.  
  1258. #ifdef __cplusplus
  1259. static int yyinput (yyscan_t yyscanner );
  1260. #else
  1261. static int input (yyscan_t yyscanner );
  1262. #endif
  1263.  
  1264. #endif
  1265.  
  1266. /* Amount of stuff to slurp up with each read. */
  1267. #ifndef YY_READ_BUF_SIZE
  1268. #define YY_READ_BUF_SIZE 8192
  1269. #endif
  1270.  
  1271. /* Copy whatever the last rule matched to the standard output. */
  1272. #ifndef ECHO
  1273. /* This used to be an fputs(), but since the string might contain NUL's,
  1274.  * we now use fwrite().
  1275.  */
  1276. #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
  1277. #endif
  1278.  
  1279. /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
  1280.  * is returned in "result".
  1281.  */
  1282. #ifndef YY_INPUT
  1283. #define YY_INPUT(buf,result,max_size) \
  1284.         if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
  1285.                 { \
  1286.                 int c = '*'; \
  1287.                 size_t n; \
  1288.                 for ( n = 0; n < max_size && \
  1289.                              (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
  1290.                         buf[n] = (char) c; \
  1291.                 if ( c == '\n' ) \
  1292.                         buf[n++] = (char) c; \
  1293.                 if ( c == EOF && ferror( yyin ) ) \
  1294.                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
  1295.                 result = n; \
  1296.                 } \
  1297.         else \
  1298.                 { \
  1299.                 errno=0; \
  1300.                 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
  1301.                         { \
  1302.                         if( errno != EINTR) \
  1303.                                 { \
  1304.                                 YY_FATAL_ERROR( "input in flex scanner failed" ); \
  1305.                                 break; \
  1306.                                 } \
  1307.                         errno=0; \
  1308.                         clearerr(yyin); \
  1309.                         } \
  1310.                 }\
  1311. \
  1312.  
  1313. #endif
  1314.  
  1315. /* No semi-colon after return; correct usage is to write "yyterminate();" -
  1316.  * we don't want an extra ';' after the "return" because that will cause
  1317.  * some compilers to complain about unreachable statements.
  1318.  */
  1319. #ifndef yyterminate
  1320. #define yyterminate() return YY_NULL
  1321. #endif
  1322.  
  1323. /* Number of entries by which start-condition stack grows. */
  1324. #ifndef YY_START_STACK_INCR
  1325. #define YY_START_STACK_INCR 25
  1326. #endif
  1327.  
  1328. /* Report a fatal error. */
  1329. #ifndef YY_FATAL_ERROR
  1330. #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
  1331. #endif
  1332.  
  1333. /* end tables serialization structures and prototypes */
  1334.  
  1335. /* Default declaration of generated scanner - a define so the user can
  1336.  * easily add parameters.
  1337.  */
  1338. #ifndef YY_DECL
  1339. #define YY_DECL_IS_OURS 1
  1340.  
  1341. extern int _mesa_program_lexer_lex \
  1342.                (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner);
  1343.  
  1344. #define YY_DECL int _mesa_program_lexer_lex \
  1345.                (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
  1346. #endif /* !YY_DECL */
  1347.  
  1348. /* Code executed at the beginning of each rule, after yytext and yyleng
  1349.  * have been set up.
  1350.  */
  1351. #ifndef YY_USER_ACTION
  1352. #define YY_USER_ACTION
  1353. #endif
  1354.  
  1355. /* Code executed at the end of each rule. */
  1356. #ifndef YY_BREAK
  1357. #define YY_BREAK break;
  1358. #endif
  1359.  
  1360. #define YY_RULE_SETUP \
  1361.         YY_USER_ACTION
  1362.  
  1363. /** The main scanner function which does all the work.
  1364.  */
  1365. YY_DECL
  1366. {
  1367.         register yy_state_type yy_current_state;
  1368.         register char *yy_cp, *yy_bp;
  1369.         register int yy_act;
  1370.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1371.  
  1372.     yylval = yylval_param;
  1373.  
  1374.     yylloc = yylloc_param;
  1375.  
  1376.         if ( !yyg->yy_init )
  1377.                 {
  1378.                 yyg->yy_init = 1;
  1379.  
  1380. #ifdef YY_USER_INIT
  1381.                 YY_USER_INIT;
  1382. #endif
  1383.  
  1384.                 if ( ! yyg->yy_start )
  1385.                         yyg->yy_start = 1;      /* first start state */
  1386.  
  1387.                 if ( ! yyin )
  1388.                         yyin = stdin;
  1389.  
  1390.                 if ( ! yyout )
  1391.                         yyout = stdout;
  1392.  
  1393.                 if ( ! YY_CURRENT_BUFFER ) {
  1394.                         _mesa_program_lexer_ensure_buffer_stack (yyscanner);
  1395.                         YY_CURRENT_BUFFER_LVALUE =
  1396.                                 _mesa_program_lexer__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
  1397.                 }
  1398.  
  1399.                 _mesa_program_lexer__load_buffer_state(yyscanner );
  1400.                 }
  1401.  
  1402.         {
  1403. #line 171 "../../../src/mesa/program/program_lexer.l"
  1404.  
  1405.  
  1406. #line 1407 "program/lex.yy.c"
  1407.  
  1408.         while ( 1 )             /* loops until end-of-file is reached */
  1409.                 {
  1410.                 yy_cp = yyg->yy_c_buf_p;
  1411.  
  1412.                 /* Support of yytext. */
  1413.                 *yy_cp = yyg->yy_hold_char;
  1414.  
  1415.                 /* yy_bp points to the position in yy_ch_buf of the start of
  1416.                  * the current run.
  1417.                  */
  1418.                 yy_bp = yy_cp;
  1419.  
  1420.                 yy_current_state = yyg->yy_start;
  1421. yy_match:
  1422.                 do
  1423.                         {
  1424.                         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
  1425.                         if ( yy_accept[yy_current_state] )
  1426.                                 {
  1427.                                 yyg->yy_last_accepting_state = yy_current_state;
  1428.                                 yyg->yy_last_accepting_cpos = yy_cp;
  1429.                                 }
  1430.                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1431.                                 {
  1432.                                 yy_current_state = (int) yy_def[yy_current_state];
  1433.                                 if ( yy_current_state >= 779 )
  1434.                                         yy_c = yy_meta[(unsigned int) yy_c];
  1435.                                 }
  1436.                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  1437.                         ++yy_cp;
  1438.                         }
  1439.                 while ( yy_base[yy_current_state] != 1208 );
  1440.  
  1441. yy_find_action:
  1442.                 yy_act = yy_accept[yy_current_state];
  1443.                 if ( yy_act == 0 )
  1444.                         { /* have to back up */
  1445.                         yy_cp = yyg->yy_last_accepting_cpos;
  1446.                         yy_current_state = yyg->yy_last_accepting_state;
  1447.                         yy_act = yy_accept[yy_current_state];
  1448.                         }
  1449.  
  1450.                 YY_DO_BEFORE_ACTION;
  1451.  
  1452. do_action:      /* This label is used only to access EOF actions. */
  1453.  
  1454.                 switch ( yy_act )
  1455.         { /* beginning of action switch */
  1456.                         case 0: /* must back up */
  1457.                         /* undo the effects of YY_DO_BEFORE_ACTION */
  1458.                         *yy_cp = yyg->yy_hold_char;
  1459.                         yy_cp = yyg->yy_last_accepting_cpos;
  1460.                         yy_current_state = yyg->yy_last_accepting_state;
  1461.                         goto yy_find_action;
  1462.  
  1463. case 1:
  1464. YY_RULE_SETUP
  1465. #line 173 "../../../src/mesa/program/program_lexer.l"
  1466. { return ARBvp_10; }
  1467.         YY_BREAK
  1468. case 2:
  1469. YY_RULE_SETUP
  1470. #line 174 "../../../src/mesa/program/program_lexer.l"
  1471. { return ARBfp_10; }
  1472.         YY_BREAK
  1473. case 3:
  1474. YY_RULE_SETUP
  1475. #line 175 "../../../src/mesa/program/program_lexer.l"
  1476. {
  1477.    yylval->integer = at_address;
  1478.    return_token_or_IDENTIFIER(require_ARB_vp, ADDRESS);
  1479. }
  1480.         YY_BREAK
  1481. case 4:
  1482. YY_RULE_SETUP
  1483. #line 179 "../../../src/mesa/program/program_lexer.l"
  1484. { return ALIAS; }
  1485.         YY_BREAK
  1486. case 5:
  1487. YY_RULE_SETUP
  1488. #line 180 "../../../src/mesa/program/program_lexer.l"
  1489. { return ATTRIB; }
  1490.         YY_BREAK
  1491. case 6:
  1492. YY_RULE_SETUP
  1493. #line 181 "../../../src/mesa/program/program_lexer.l"
  1494. { return END; }
  1495.         YY_BREAK
  1496. case 7:
  1497. YY_RULE_SETUP
  1498. #line 182 "../../../src/mesa/program/program_lexer.l"
  1499. { return OPTION; }
  1500.         YY_BREAK
  1501. case 8:
  1502. YY_RULE_SETUP
  1503. #line 183 "../../../src/mesa/program/program_lexer.l"
  1504. { return OUTPUT; }
  1505.         YY_BREAK
  1506. case 9:
  1507. YY_RULE_SETUP
  1508. #line 184 "../../../src/mesa/program/program_lexer.l"
  1509. { return PARAM; }
  1510.         YY_BREAK
  1511. case 10:
  1512. YY_RULE_SETUP
  1513. #line 185 "../../../src/mesa/program/program_lexer.l"
  1514. { yylval->integer = at_temp; return TEMP; }
  1515.         YY_BREAK
  1516. case 11:
  1517. YY_RULE_SETUP
  1518. #line 187 "../../../src/mesa/program/program_lexer.l"
  1519. { return_opcode(             1, VECTOR_OP, ABS, 3); }
  1520.         YY_BREAK
  1521. case 12:
  1522. YY_RULE_SETUP
  1523. #line 188 "../../../src/mesa/program/program_lexer.l"
  1524. { return_opcode(             1, BIN_OP, ADD, 3); }
  1525.         YY_BREAK
  1526. case 13:
  1527. YY_RULE_SETUP
  1528. #line 189 "../../../src/mesa/program/program_lexer.l"
  1529. { return_opcode(require_ARB_vp, ARL, ARL, 3); }
  1530.         YY_BREAK
  1531. case 14:
  1532. YY_RULE_SETUP
  1533. #line 191 "../../../src/mesa/program/program_lexer.l"
  1534. { return_opcode(require_ARB_fp, TRI_OP, CMP, 3); }
  1535.         YY_BREAK
  1536. case 15:
  1537. YY_RULE_SETUP
  1538. #line 192 "../../../src/mesa/program/program_lexer.l"
  1539. { return_opcode(require_ARB_fp, SCALAR_OP, COS, 3); }
  1540.         YY_BREAK
  1541. case 16:
  1542. YY_RULE_SETUP
  1543. #line 194 "../../../src/mesa/program/program_lexer.l"
  1544. { return_opcode(require_NV_fp,  VECTOR_OP, DDX, 3); }
  1545.         YY_BREAK
  1546. case 17:
  1547. YY_RULE_SETUP
  1548. #line 195 "../../../src/mesa/program/program_lexer.l"
  1549. { return_opcode(require_NV_fp,  VECTOR_OP, DDY, 3); }
  1550.         YY_BREAK
  1551. case 18:
  1552. YY_RULE_SETUP
  1553. #line 196 "../../../src/mesa/program/program_lexer.l"
  1554. { return_opcode(             1, BIN_OP, DP3, 3); }
  1555.         YY_BREAK
  1556. case 19:
  1557. YY_RULE_SETUP
  1558. #line 197 "../../../src/mesa/program/program_lexer.l"
  1559. { return_opcode(             1, BIN_OP, DP4, 3); }
  1560.         YY_BREAK
  1561. case 20:
  1562. YY_RULE_SETUP
  1563. #line 198 "../../../src/mesa/program/program_lexer.l"
  1564. { return_opcode(             1, BIN_OP, DPH, 3); }
  1565.         YY_BREAK
  1566. case 21:
  1567. YY_RULE_SETUP
  1568. #line 199 "../../../src/mesa/program/program_lexer.l"
  1569. { return_opcode(             1, BIN_OP, DST, 3); }
  1570.         YY_BREAK
  1571. case 22:
  1572. YY_RULE_SETUP
  1573. #line 201 "../../../src/mesa/program/program_lexer.l"
  1574. { return_opcode(             1, SCALAR_OP, EX2, 3); }
  1575.         YY_BREAK
  1576. case 23:
  1577. YY_RULE_SETUP
  1578. #line 202 "../../../src/mesa/program/program_lexer.l"
  1579. { return_opcode(require_ARB_vp, SCALAR_OP, EXP, 3); }
  1580.         YY_BREAK
  1581. case 24:
  1582. YY_RULE_SETUP
  1583. #line 204 "../../../src/mesa/program/program_lexer.l"
  1584. { return_opcode(             1, VECTOR_OP, FLR, 3); }
  1585.         YY_BREAK
  1586. case 25:
  1587. YY_RULE_SETUP
  1588. #line 205 "../../../src/mesa/program/program_lexer.l"
  1589. { return_opcode(             1, VECTOR_OP, FRC, 3); }
  1590.         YY_BREAK
  1591. case 26:
  1592. YY_RULE_SETUP
  1593. #line 207 "../../../src/mesa/program/program_lexer.l"
  1594. { return_opcode(require_ARB_fp, KIL, KIL, 3); }
  1595.         YY_BREAK
  1596. case 27:
  1597. YY_RULE_SETUP
  1598. #line 209 "../../../src/mesa/program/program_lexer.l"
  1599. { return_opcode(             1, VECTOR_OP, LIT, 3); }
  1600.         YY_BREAK
  1601. case 28:
  1602. YY_RULE_SETUP
  1603. #line 210 "../../../src/mesa/program/program_lexer.l"
  1604. { return_opcode(             1, SCALAR_OP, LG2, 3); }
  1605.         YY_BREAK
  1606. case 29:
  1607. YY_RULE_SETUP
  1608. #line 211 "../../../src/mesa/program/program_lexer.l"
  1609. { return_opcode(require_ARB_vp, SCALAR_OP, LOG, 3); }
  1610.         YY_BREAK
  1611. case 30:
  1612. YY_RULE_SETUP
  1613. #line 212 "../../../src/mesa/program/program_lexer.l"
  1614. { return_opcode(require_ARB_fp, TRI_OP, LRP, 3); }
  1615.         YY_BREAK
  1616. case 31:
  1617. YY_RULE_SETUP
  1618. #line 214 "../../../src/mesa/program/program_lexer.l"
  1619. { return_opcode(             1, TRI_OP, MAD, 3); }
  1620.         YY_BREAK
  1621. case 32:
  1622. YY_RULE_SETUP
  1623. #line 215 "../../../src/mesa/program/program_lexer.l"
  1624. { return_opcode(             1, BIN_OP, MAX, 3); }
  1625.         YY_BREAK
  1626. case 33:
  1627. YY_RULE_SETUP
  1628. #line 216 "../../../src/mesa/program/program_lexer.l"
  1629. { return_opcode(             1, BIN_OP, MIN, 3); }
  1630.         YY_BREAK
  1631. case 34:
  1632. YY_RULE_SETUP
  1633. #line 217 "../../../src/mesa/program/program_lexer.l"
  1634. { return_opcode(             1, VECTOR_OP, MOV, 3); }
  1635.         YY_BREAK
  1636. case 35:
  1637. YY_RULE_SETUP
  1638. #line 218 "../../../src/mesa/program/program_lexer.l"
  1639. { return_opcode(             1, BIN_OP, MUL, 3); }
  1640.         YY_BREAK
  1641. case 36:
  1642. YY_RULE_SETUP
  1643. #line 220 "../../../src/mesa/program/program_lexer.l"
  1644. { return_opcode(             1, BINSC_OP, POW, 3); }
  1645.         YY_BREAK
  1646. case 37:
  1647. YY_RULE_SETUP
  1648. #line 222 "../../../src/mesa/program/program_lexer.l"
  1649. { return_opcode(             1, SCALAR_OP, RCP, 3); }
  1650.         YY_BREAK
  1651. case 38:
  1652. YY_RULE_SETUP
  1653. #line 223 "../../../src/mesa/program/program_lexer.l"
  1654. { return_opcode(             1, SCALAR_OP, RSQ, 3); }
  1655.         YY_BREAK
  1656. case 39:
  1657. YY_RULE_SETUP
  1658. #line 225 "../../../src/mesa/program/program_lexer.l"
  1659. { return_opcode(require_ARB_fp, SCALAR_OP, SCS, 3); }
  1660.         YY_BREAK
  1661. case 40:
  1662. YY_RULE_SETUP
  1663. #line 226 "../../../src/mesa/program/program_lexer.l"
  1664. { return_opcode(require_NV_fp,  BIN_OP, SEQ, 3); }
  1665.         YY_BREAK
  1666. case 41:
  1667. YY_RULE_SETUP
  1668. #line 227 "../../../src/mesa/program/program_lexer.l"
  1669. { return_opcode(             1, BIN_OP, SGE, 3); }
  1670.         YY_BREAK
  1671. case 42:
  1672. YY_RULE_SETUP
  1673. #line 228 "../../../src/mesa/program/program_lexer.l"
  1674. { return_opcode(require_NV_fp,  BIN_OP, SGT, 3); }
  1675.         YY_BREAK
  1676. case 43:
  1677. YY_RULE_SETUP
  1678. #line 229 "../../../src/mesa/program/program_lexer.l"
  1679. { return_opcode(require_ARB_fp, SCALAR_OP, SIN, 3); }
  1680.         YY_BREAK
  1681. case 44:
  1682. YY_RULE_SETUP
  1683. #line 230 "../../../src/mesa/program/program_lexer.l"
  1684. { return_opcode(require_NV_fp,  BIN_OP, SLE, 3); }
  1685.         YY_BREAK
  1686. case 45:
  1687. YY_RULE_SETUP
  1688. #line 231 "../../../src/mesa/program/program_lexer.l"
  1689. { return_opcode(             1, BIN_OP, SLT, 3); }
  1690.         YY_BREAK
  1691. case 46:
  1692. YY_RULE_SETUP
  1693. #line 232 "../../../src/mesa/program/program_lexer.l"
  1694. { return_opcode(require_NV_fp,  BIN_OP, SNE, 3); }
  1695.         YY_BREAK
  1696. case 47:
  1697. YY_RULE_SETUP
  1698. #line 233 "../../../src/mesa/program/program_lexer.l"
  1699. { return_opcode(             1, BIN_OP, SUB, 3); }
  1700.         YY_BREAK
  1701. case 48:
  1702. YY_RULE_SETUP
  1703. #line 234 "../../../src/mesa/program/program_lexer.l"
  1704. { return_opcode(             1, SWZ, SWZ, 3); }
  1705.         YY_BREAK
  1706. case 49:
  1707. YY_RULE_SETUP
  1708. #line 236 "../../../src/mesa/program/program_lexer.l"
  1709. { return_opcode(require_ARB_fp, SAMPLE_OP, TEX, 3); }
  1710.         YY_BREAK
  1711. case 50:
  1712. YY_RULE_SETUP
  1713. #line 237 "../../../src/mesa/program/program_lexer.l"
  1714. { return_opcode(require_ARB_fp, SAMPLE_OP, TXB, 3); }
  1715.         YY_BREAK
  1716. case 51:
  1717. YY_RULE_SETUP
  1718. #line 238 "../../../src/mesa/program/program_lexer.l"
  1719. { return_opcode(require_NV_fp,  TXD_OP, TXD, 3); }
  1720.         YY_BREAK
  1721. case 52:
  1722. YY_RULE_SETUP
  1723. #line 239 "../../../src/mesa/program/program_lexer.l"
  1724. { return_opcode(require_ARB_fp, SAMPLE_OP, TXP, 3); }
  1725.         YY_BREAK
  1726. case 53:
  1727. YY_RULE_SETUP
  1728. #line 241 "../../../src/mesa/program/program_lexer.l"
  1729. { return_opcode(             1, BIN_OP, XPD, 3); }
  1730.         YY_BREAK
  1731. case 54:
  1732. YY_RULE_SETUP
  1733. #line 243 "../../../src/mesa/program/program_lexer.l"
  1734. { return_token_or_IDENTIFIER(require_ARB_vp, VERTEX); }
  1735.         YY_BREAK
  1736. case 55:
  1737. YY_RULE_SETUP
  1738. #line 244 "../../../src/mesa/program/program_lexer.l"
  1739. { return_token_or_IDENTIFIER(require_ARB_fp, FRAGMENT); }
  1740.         YY_BREAK
  1741. case 56:
  1742. YY_RULE_SETUP
  1743. #line 245 "../../../src/mesa/program/program_lexer.l"
  1744. { return PROGRAM; }
  1745.         YY_BREAK
  1746. case 57:
  1747. YY_RULE_SETUP
  1748. #line 246 "../../../src/mesa/program/program_lexer.l"
  1749. { return STATE; }
  1750.         YY_BREAK
  1751. case 58:
  1752. YY_RULE_SETUP
  1753. #line 247 "../../../src/mesa/program/program_lexer.l"
  1754. { return RESULT; }
  1755.         YY_BREAK
  1756. case 59:
  1757. YY_RULE_SETUP
  1758. #line 249 "../../../src/mesa/program/program_lexer.l"
  1759. { return AMBIENT; }
  1760.         YY_BREAK
  1761. case 60:
  1762. YY_RULE_SETUP
  1763. #line 250 "../../../src/mesa/program/program_lexer.l"
  1764. { return ATTENUATION; }
  1765.         YY_BREAK
  1766. case 61:
  1767. YY_RULE_SETUP
  1768. #line 251 "../../../src/mesa/program/program_lexer.l"
  1769. { return BACK; }
  1770.         YY_BREAK
  1771. case 62:
  1772. YY_RULE_SETUP
  1773. #line 252 "../../../src/mesa/program/program_lexer.l"
  1774. { return_token_or_DOT(require_ARB_vp, CLIP); }
  1775.         YY_BREAK
  1776. case 63:
  1777. YY_RULE_SETUP
  1778. #line 253 "../../../src/mesa/program/program_lexer.l"
  1779. { return COLOR; }
  1780.         YY_BREAK
  1781. case 64:
  1782. YY_RULE_SETUP
  1783. #line 254 "../../../src/mesa/program/program_lexer.l"
  1784. { return_token_or_DOT(require_ARB_fp, DEPTH); }
  1785.         YY_BREAK
  1786. case 65:
  1787. YY_RULE_SETUP
  1788. #line 255 "../../../src/mesa/program/program_lexer.l"
  1789. { return DIFFUSE; }
  1790.         YY_BREAK
  1791. case 66:
  1792. YY_RULE_SETUP
  1793. #line 256 "../../../src/mesa/program/program_lexer.l"
  1794. { return DIRECTION; }
  1795.         YY_BREAK
  1796. case 67:
  1797. YY_RULE_SETUP
  1798. #line 257 "../../../src/mesa/program/program_lexer.l"
  1799. { return EMISSION; }
  1800.         YY_BREAK
  1801. case 68:
  1802. YY_RULE_SETUP
  1803. #line 258 "../../../src/mesa/program/program_lexer.l"
  1804. { return ENV; }
  1805.         YY_BREAK
  1806. case 69:
  1807. YY_RULE_SETUP
  1808. #line 259 "../../../src/mesa/program/program_lexer.l"
  1809. { return EYE; }
  1810.         YY_BREAK
  1811. case 70:
  1812. YY_RULE_SETUP
  1813. #line 260 "../../../src/mesa/program/program_lexer.l"
  1814. { return FOGCOORD; }
  1815.         YY_BREAK
  1816. case 71:
  1817. YY_RULE_SETUP
  1818. #line 261 "../../../src/mesa/program/program_lexer.l"
  1819. { return FOG; }
  1820.         YY_BREAK
  1821. case 72:
  1822. YY_RULE_SETUP
  1823. #line 262 "../../../src/mesa/program/program_lexer.l"
  1824. { return FRONT; }
  1825.         YY_BREAK
  1826. case 73:
  1827. YY_RULE_SETUP
  1828. #line 263 "../../../src/mesa/program/program_lexer.l"
  1829. { return HALF; }
  1830.         YY_BREAK
  1831. case 74:
  1832. YY_RULE_SETUP
  1833. #line 264 "../../../src/mesa/program/program_lexer.l"
  1834. { return INVERSE; }
  1835.         YY_BREAK
  1836. case 75:
  1837. YY_RULE_SETUP
  1838. #line 265 "../../../src/mesa/program/program_lexer.l"
  1839. { return INVTRANS; }
  1840.         YY_BREAK
  1841. case 76:
  1842. YY_RULE_SETUP
  1843. #line 266 "../../../src/mesa/program/program_lexer.l"
  1844. { return LIGHT; }
  1845.         YY_BREAK
  1846. case 77:
  1847. YY_RULE_SETUP
  1848. #line 267 "../../../src/mesa/program/program_lexer.l"
  1849. { return LIGHTMODEL; }
  1850.         YY_BREAK
  1851. case 78:
  1852. YY_RULE_SETUP
  1853. #line 268 "../../../src/mesa/program/program_lexer.l"
  1854. { return LIGHTPROD; }
  1855.         YY_BREAK
  1856. case 79:
  1857. YY_RULE_SETUP
  1858. #line 269 "../../../src/mesa/program/program_lexer.l"
  1859. { return LOCAL; }
  1860.         YY_BREAK
  1861. case 80:
  1862. YY_RULE_SETUP
  1863. #line 270 "../../../src/mesa/program/program_lexer.l"
  1864. { return MATERIAL; }
  1865.         YY_BREAK
  1866. case 81:
  1867. YY_RULE_SETUP
  1868. #line 271 "../../../src/mesa/program/program_lexer.l"
  1869. { return MAT_PROGRAM; }
  1870.         YY_BREAK
  1871. case 82:
  1872. YY_RULE_SETUP
  1873. #line 272 "../../../src/mesa/program/program_lexer.l"
  1874. { return MATRIX; }
  1875.         YY_BREAK
  1876. case 83:
  1877. YY_RULE_SETUP
  1878. #line 273 "../../../src/mesa/program/program_lexer.l"
  1879. { return_token_or_DOT(require_ARB_vp, MATRIXINDEX); }
  1880.         YY_BREAK
  1881. case 84:
  1882. YY_RULE_SETUP
  1883. #line 274 "../../../src/mesa/program/program_lexer.l"
  1884. { return MODELVIEW; }
  1885.         YY_BREAK
  1886. case 85:
  1887. YY_RULE_SETUP
  1888. #line 275 "../../../src/mesa/program/program_lexer.l"
  1889. { return MVP; }
  1890.         YY_BREAK
  1891. case 86:
  1892. YY_RULE_SETUP
  1893. #line 276 "../../../src/mesa/program/program_lexer.l"
  1894. { return_token_or_DOT(require_ARB_vp, NORMAL); }
  1895.         YY_BREAK
  1896. case 87:
  1897. YY_RULE_SETUP
  1898. #line 277 "../../../src/mesa/program/program_lexer.l"
  1899. { return OBJECT; }
  1900.         YY_BREAK
  1901. case 88:
  1902. YY_RULE_SETUP
  1903. #line 278 "../../../src/mesa/program/program_lexer.l"
  1904. { return PALETTE; }
  1905.         YY_BREAK
  1906. case 89:
  1907. YY_RULE_SETUP
  1908. #line 279 "../../../src/mesa/program/program_lexer.l"
  1909. { return PARAMS; }
  1910.         YY_BREAK
  1911. case 90:
  1912. YY_RULE_SETUP
  1913. #line 280 "../../../src/mesa/program/program_lexer.l"
  1914. { return PLANE; }
  1915.         YY_BREAK
  1916. case 91:
  1917. YY_RULE_SETUP
  1918. #line 281 "../../../src/mesa/program/program_lexer.l"
  1919. { return_token_or_DOT(require_ARB_vp, POINT_TOK); }
  1920.         YY_BREAK
  1921. case 92:
  1922. YY_RULE_SETUP
  1923. #line 282 "../../../src/mesa/program/program_lexer.l"
  1924. { return_token_or_DOT(require_ARB_vp, POINTSIZE); }
  1925.         YY_BREAK
  1926. case 93:
  1927. YY_RULE_SETUP
  1928. #line 283 "../../../src/mesa/program/program_lexer.l"
  1929. { return POSITION; }
  1930.         YY_BREAK
  1931. case 94:
  1932. YY_RULE_SETUP
  1933. #line 284 "../../../src/mesa/program/program_lexer.l"
  1934. { return PRIMARY; }
  1935.         YY_BREAK
  1936. case 95:
  1937. YY_RULE_SETUP
  1938. #line 285 "../../../src/mesa/program/program_lexer.l"
  1939. { return PROJECTION; }
  1940.         YY_BREAK
  1941. case 96:
  1942. YY_RULE_SETUP
  1943. #line 286 "../../../src/mesa/program/program_lexer.l"
  1944. { return_token_or_DOT(require_ARB_fp, RANGE); }
  1945.         YY_BREAK
  1946. case 97:
  1947. YY_RULE_SETUP
  1948. #line 287 "../../../src/mesa/program/program_lexer.l"
  1949. { return ROW; }
  1950.         YY_BREAK
  1951. case 98:
  1952. YY_RULE_SETUP
  1953. #line 288 "../../../src/mesa/program/program_lexer.l"
  1954. { return SCENECOLOR; }
  1955.         YY_BREAK
  1956. case 99:
  1957. YY_RULE_SETUP
  1958. #line 289 "../../../src/mesa/program/program_lexer.l"
  1959. { return SECONDARY; }
  1960.         YY_BREAK
  1961. case 100:
  1962. YY_RULE_SETUP
  1963. #line 290 "../../../src/mesa/program/program_lexer.l"
  1964. { return SHININESS; }
  1965.         YY_BREAK
  1966. case 101:
  1967. YY_RULE_SETUP
  1968. #line 291 "../../../src/mesa/program/program_lexer.l"
  1969. { return_token_or_DOT(require_ARB_vp, SIZE_TOK); }
  1970.         YY_BREAK
  1971. case 102:
  1972. YY_RULE_SETUP
  1973. #line 292 "../../../src/mesa/program/program_lexer.l"
  1974. { return SPECULAR; }
  1975.         YY_BREAK
  1976. case 103:
  1977. YY_RULE_SETUP
  1978. #line 293 "../../../src/mesa/program/program_lexer.l"
  1979. { return SPOT; }
  1980.         YY_BREAK
  1981. case 104:
  1982. YY_RULE_SETUP
  1983. #line 294 "../../../src/mesa/program/program_lexer.l"
  1984. { return TEXCOORD; }
  1985.         YY_BREAK
  1986. case 105:
  1987. YY_RULE_SETUP
  1988. #line 295 "../../../src/mesa/program/program_lexer.l"
  1989. { return_token_or_DOT(require_ARB_fp, TEXENV); }
  1990.         YY_BREAK
  1991. case 106:
  1992. YY_RULE_SETUP
  1993. #line 296 "../../../src/mesa/program/program_lexer.l"
  1994. { return_token_or_DOT(require_ARB_vp, TEXGEN); }
  1995.         YY_BREAK
  1996. case 107:
  1997. YY_RULE_SETUP
  1998. #line 297 "../../../src/mesa/program/program_lexer.l"
  1999. { return_token_or_DOT(require_ARB_vp, TEXGEN_Q); }
  2000.         YY_BREAK
  2001. case 108:
  2002. YY_RULE_SETUP
  2003. #line 298 "../../../src/mesa/program/program_lexer.l"
  2004. { return_token_or_DOT(require_ARB_vp, TEXGEN_S); }
  2005.         YY_BREAK
  2006. case 109:
  2007. YY_RULE_SETUP
  2008. #line 299 "../../../src/mesa/program/program_lexer.l"
  2009. { return_token_or_DOT(require_ARB_vp, TEXGEN_T); }
  2010.         YY_BREAK
  2011. case 110:
  2012. YY_RULE_SETUP
  2013. #line 300 "../../../src/mesa/program/program_lexer.l"
  2014. { return TEXTURE; }
  2015.         YY_BREAK
  2016. case 111:
  2017. YY_RULE_SETUP
  2018. #line 301 "../../../src/mesa/program/program_lexer.l"
  2019. { return TRANSPOSE; }
  2020.         YY_BREAK
  2021. case 112:
  2022. YY_RULE_SETUP
  2023. #line 302 "../../../src/mesa/program/program_lexer.l"
  2024. { return_token_or_DOT(require_ARB_vp, VTXATTRIB); }
  2025.         YY_BREAK
  2026. case 113:
  2027. YY_RULE_SETUP
  2028. #line 303 "../../../src/mesa/program/program_lexer.l"
  2029. { return_token_or_DOT(require_ARB_vp, WEIGHT); }
  2030.         YY_BREAK
  2031. case 114:
  2032. YY_RULE_SETUP
  2033. #line 305 "../../../src/mesa/program/program_lexer.l"
  2034. { return_token_or_IDENTIFIER(require_ARB_fp, TEXTURE_UNIT); }
  2035.         YY_BREAK
  2036. case 115:
  2037. YY_RULE_SETUP
  2038. #line 306 "../../../src/mesa/program/program_lexer.l"
  2039. { return_token_or_IDENTIFIER(require_ARB_fp, TEX_1D); }
  2040.         YY_BREAK
  2041. case 116:
  2042. YY_RULE_SETUP
  2043. #line 307 "../../../src/mesa/program/program_lexer.l"
  2044. { return_token_or_IDENTIFIER(require_ARB_fp, TEX_2D); }
  2045.         YY_BREAK
  2046. case 117:
  2047. YY_RULE_SETUP
  2048. #line 308 "../../../src/mesa/program/program_lexer.l"
  2049. { return_token_or_IDENTIFIER(require_ARB_fp, TEX_3D); }
  2050.         YY_BREAK
  2051. case 118:
  2052. YY_RULE_SETUP
  2053. #line 309 "../../../src/mesa/program/program_lexer.l"
  2054. { return_token_or_IDENTIFIER(require_ARB_fp, TEX_CUBE); }
  2055.         YY_BREAK
  2056. case 119:
  2057. YY_RULE_SETUP
  2058. #line 310 "../../../src/mesa/program/program_lexer.l"
  2059. { return_token_or_IDENTIFIER(require_ARB_fp && require_rect, TEX_RECT); }
  2060.         YY_BREAK
  2061. case 120:
  2062. YY_RULE_SETUP
  2063. #line 311 "../../../src/mesa/program/program_lexer.l"
  2064. { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow, TEX_SHADOW1D); }
  2065.         YY_BREAK
  2066. case 121:
  2067. YY_RULE_SETUP
  2068. #line 312 "../../../src/mesa/program/program_lexer.l"
  2069. { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow, TEX_SHADOW2D); }
  2070.         YY_BREAK
  2071. case 122:
  2072. YY_RULE_SETUP
  2073. #line 313 "../../../src/mesa/program/program_lexer.l"
  2074. { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_rect, TEX_SHADOWRECT); }
  2075.         YY_BREAK
  2076. case 123:
  2077. YY_RULE_SETUP
  2078. #line 314 "../../../src/mesa/program/program_lexer.l"
  2079. { return_token_or_IDENTIFIER(require_ARB_fp && require_texarray, TEX_ARRAY1D); }
  2080.         YY_BREAK
  2081. case 124:
  2082. YY_RULE_SETUP
  2083. #line 315 "../../../src/mesa/program/program_lexer.l"
  2084. { return_token_or_IDENTIFIER(require_ARB_fp && require_texarray, TEX_ARRAY2D); }
  2085.         YY_BREAK
  2086. case 125:
  2087. YY_RULE_SETUP
  2088. #line 316 "../../../src/mesa/program/program_lexer.l"
  2089. { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW1D); }
  2090.         YY_BREAK
  2091. case 126:
  2092. YY_RULE_SETUP
  2093. #line 317 "../../../src/mesa/program/program_lexer.l"
  2094. { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW2D); }
  2095.         YY_BREAK
  2096. case 127:
  2097. YY_RULE_SETUP
  2098. #line 319 "../../../src/mesa/program/program_lexer.l"
  2099. { return handle_ident(yyextra, yytext, yylval); }
  2100.         YY_BREAK
  2101. case 128:
  2102. YY_RULE_SETUP
  2103. #line 321 "../../../src/mesa/program/program_lexer.l"
  2104. { return DOT_DOT; }
  2105.         YY_BREAK
  2106. case 129:
  2107. YY_RULE_SETUP
  2108. #line 323 "../../../src/mesa/program/program_lexer.l"
  2109. {
  2110.    yylval->integer = strtol(yytext, NULL, 10);
  2111.    return INTEGER;
  2112. }
  2113.         YY_BREAK
  2114. case 130:
  2115. YY_RULE_SETUP
  2116. #line 327 "../../../src/mesa/program/program_lexer.l"
  2117. {
  2118.    yylval->real = _mesa_strtof(yytext, NULL);
  2119.    return REAL;
  2120. }
  2121.         YY_BREAK
  2122. case 131:
  2123. /* rule 131 can match eol */
  2124. *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
  2125. YY_LINENO_REWIND_TO(yy_cp - 1);
  2126. yyg->yy_c_buf_p = yy_cp -= 1;
  2127. YY_DO_BEFORE_ACTION; /* set up yytext again */
  2128. YY_RULE_SETUP
  2129. #line 331 "../../../src/mesa/program/program_lexer.l"
  2130. {
  2131.    yylval->real = _mesa_strtof(yytext, NULL);
  2132.    return REAL;
  2133. }
  2134.         YY_BREAK
  2135. case 132:
  2136. YY_RULE_SETUP
  2137. #line 335 "../../../src/mesa/program/program_lexer.l"
  2138. {
  2139.    yylval->real = _mesa_strtof(yytext, NULL);
  2140.    return REAL;
  2141. }
  2142.         YY_BREAK
  2143. case 133:
  2144. YY_RULE_SETUP
  2145. #line 339 "../../../src/mesa/program/program_lexer.l"
  2146. {
  2147.    yylval->real = _mesa_strtof(yytext, NULL);
  2148.    return REAL;
  2149. }
  2150.         YY_BREAK
  2151. case 134:
  2152. YY_RULE_SETUP
  2153. #line 344 "../../../src/mesa/program/program_lexer.l"
  2154. {
  2155.    yylval->swiz_mask.swizzle = SWIZZLE_NOOP;
  2156.    yylval->swiz_mask.mask = WRITEMASK_XYZW;
  2157.    return MASK4;
  2158. }
  2159.         YY_BREAK
  2160. case 135:
  2161. YY_RULE_SETUP
  2162. #line 350 "../../../src/mesa/program/program_lexer.l"
  2163. {
  2164.    yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
  2165.    yylval->swiz_mask.mask = WRITEMASK_XY
  2166.       | mask_from_char(yytext[3]);
  2167.    return MASK3;
  2168. }
  2169.         YY_BREAK
  2170. case 136:
  2171. YY_RULE_SETUP
  2172. #line 356 "../../../src/mesa/program/program_lexer.l"
  2173. {
  2174.    yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
  2175.    yylval->swiz_mask.mask = WRITEMASK_XZW;
  2176.    return MASK3;
  2177. }
  2178.         YY_BREAK
  2179. case 137:
  2180. YY_RULE_SETUP
  2181. #line 361 "../../../src/mesa/program/program_lexer.l"
  2182. {
  2183.    yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
  2184.    yylval->swiz_mask.mask = WRITEMASK_YZW;
  2185.    return MASK3;
  2186. }
  2187.         YY_BREAK
  2188. case 138:
  2189. YY_RULE_SETUP
  2190. #line 367 "../../../src/mesa/program/program_lexer.l"
  2191. {
  2192.    yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
  2193.    yylval->swiz_mask.mask = WRITEMASK_X
  2194.       | mask_from_char(yytext[2]);
  2195.    return MASK2;
  2196. }
  2197.         YY_BREAK
  2198. case 139:
  2199. YY_RULE_SETUP
  2200. #line 373 "../../../src/mesa/program/program_lexer.l"
  2201. {
  2202.    yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
  2203.    yylval->swiz_mask.mask = WRITEMASK_Y
  2204.       | mask_from_char(yytext[2]);
  2205.    return MASK2;
  2206. }
  2207.         YY_BREAK
  2208. case 140:
  2209. YY_RULE_SETUP
  2210. #line 379 "../../../src/mesa/program/program_lexer.l"
  2211. {
  2212.    yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
  2213.    yylval->swiz_mask.mask = WRITEMASK_ZW;
  2214.    return MASK2;
  2215. }
  2216.         YY_BREAK
  2217. case 141:
  2218. YY_RULE_SETUP
  2219. #line 385 "../../../src/mesa/program/program_lexer.l"
  2220. {
  2221.    const unsigned s = swiz_from_char(yytext[1]);
  2222.    yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(s, s, s, s);
  2223.    yylval->swiz_mask.mask = mask_from_char(yytext[1]);
  2224.    return MASK1;
  2225. }
  2226.         YY_BREAK
  2227. case 142:
  2228. YY_RULE_SETUP
  2229. #line 392 "../../../src/mesa/program/program_lexer.l"
  2230. {
  2231.    yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(swiz_from_char(yytext[1]),
  2232.                                             swiz_from_char(yytext[2]),
  2233.                                             swiz_from_char(yytext[3]),
  2234.                                             swiz_from_char(yytext[4]));
  2235.    yylval->swiz_mask.mask = 0;
  2236.    return SWIZZLE;
  2237. }
  2238.         YY_BREAK
  2239. case 143:
  2240. YY_RULE_SETUP
  2241. #line 401 "../../../src/mesa/program/program_lexer.l"
  2242. {
  2243.    yylval->swiz_mask.swizzle = SWIZZLE_NOOP;
  2244.    yylval->swiz_mask.mask = WRITEMASK_XYZW;
  2245.    return_token_or_DOT(require_ARB_fp, MASK4);
  2246. }
  2247.         YY_BREAK
  2248. case 144:
  2249. YY_RULE_SETUP
  2250. #line 407 "../../../src/mesa/program/program_lexer.l"
  2251. {
  2252.    yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
  2253.    yylval->swiz_mask.mask = WRITEMASK_XY
  2254.       | mask_from_char(yytext[3]);
  2255.    return_token_or_DOT(require_ARB_fp, MASK3);
  2256. }
  2257.         YY_BREAK
  2258. case 145:
  2259. YY_RULE_SETUP
  2260. #line 413 "../../../src/mesa/program/program_lexer.l"
  2261. {
  2262.    yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
  2263.    yylval->swiz_mask.mask = WRITEMASK_XZW;
  2264.    return_token_or_DOT(require_ARB_fp, MASK3);
  2265. }
  2266.         YY_BREAK
  2267. case 146:
  2268. YY_RULE_SETUP
  2269. #line 418 "../../../src/mesa/program/program_lexer.l"
  2270. {
  2271.    yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
  2272.    yylval->swiz_mask.mask = WRITEMASK_YZW;
  2273.    return_token_or_DOT(require_ARB_fp, MASK3);
  2274. }
  2275.         YY_BREAK
  2276. case 147:
  2277. YY_RULE_SETUP
  2278. #line 424 "../../../src/mesa/program/program_lexer.l"
  2279. {
  2280.    yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
  2281.    yylval->swiz_mask.mask = WRITEMASK_X
  2282.       | mask_from_char(yytext[2]);
  2283.    return_token_or_DOT(require_ARB_fp, MASK2);
  2284. }
  2285.         YY_BREAK
  2286. case 148:
  2287. YY_RULE_SETUP
  2288. #line 430 "../../../src/mesa/program/program_lexer.l"
  2289. {
  2290.    yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
  2291.    yylval->swiz_mask.mask = WRITEMASK_Y
  2292.       | mask_from_char(yytext[2]);
  2293.    return_token_or_DOT(require_ARB_fp, MASK2);
  2294. }
  2295.         YY_BREAK
  2296. case 149:
  2297. YY_RULE_SETUP
  2298. #line 436 "../../../src/mesa/program/program_lexer.l"
  2299. {
  2300.    yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
  2301.    yylval->swiz_mask.mask = WRITEMASK_ZW;
  2302.    return_token_or_DOT(require_ARB_fp, MASK2);
  2303. }
  2304.         YY_BREAK
  2305. case 150:
  2306. YY_RULE_SETUP
  2307. #line 442 "../../../src/mesa/program/program_lexer.l"
  2308. {
  2309.    const unsigned s = swiz_from_char(yytext[1]);
  2310.    yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(s, s, s, s);
  2311.    yylval->swiz_mask.mask = mask_from_char(yytext[1]);
  2312.    return_token_or_DOT(require_ARB_fp, MASK1);
  2313. }
  2314.         YY_BREAK
  2315. case 151:
  2316. YY_RULE_SETUP
  2317. #line 450 "../../../src/mesa/program/program_lexer.l"
  2318. {
  2319.    if (require_ARB_vp) {
  2320.       return TEXGEN_R;
  2321.    } else {
  2322.       yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_X,
  2323.                                                 SWIZZLE_X, SWIZZLE_X);
  2324.       yylval->swiz_mask.mask = WRITEMASK_X;
  2325.       return MASK1;
  2326.    }
  2327. }
  2328.         YY_BREAK
  2329. case 152:
  2330. YY_RULE_SETUP
  2331. #line 461 "../../../src/mesa/program/program_lexer.l"
  2332. {
  2333.    yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(swiz_from_char(yytext[1]),
  2334.                                             swiz_from_char(yytext[2]),
  2335.                                             swiz_from_char(yytext[3]),
  2336.                                             swiz_from_char(yytext[4]));
  2337.    yylval->swiz_mask.mask = 0;
  2338.    return_token_or_DOT(require_ARB_fp, SWIZZLE);
  2339. }
  2340.         YY_BREAK
  2341. case 153:
  2342. YY_RULE_SETUP
  2343. #line 470 "../../../src/mesa/program/program_lexer.l"
  2344. { return DOT; }
  2345.         YY_BREAK
  2346. case 154:
  2347. /* rule 154 can match eol */
  2348. YY_RULE_SETUP
  2349. #line 472 "../../../src/mesa/program/program_lexer.l"
  2350. {
  2351.    yylloc->first_line++;
  2352.    yylloc->first_column = 1;
  2353.    yylloc->last_line++;
  2354.    yylloc->last_column = 1;
  2355.    yylloc->position++;
  2356. }
  2357.         YY_BREAK
  2358. case 155:
  2359. YY_RULE_SETUP
  2360. #line 479 "../../../src/mesa/program/program_lexer.l"
  2361. /* eat whitespace */ ;
  2362.         YY_BREAK
  2363. case 156:
  2364. *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
  2365. yyg->yy_c_buf_p = yy_cp -= 1;
  2366. YY_DO_BEFORE_ACTION; /* set up yytext again */
  2367. YY_RULE_SETUP
  2368. #line 480 "../../../src/mesa/program/program_lexer.l"
  2369. /* eat comments */ ;
  2370.         YY_BREAK
  2371. case 157:
  2372. YY_RULE_SETUP
  2373. #line 481 "../../../src/mesa/program/program_lexer.l"
  2374. { return yytext[0]; }
  2375.         YY_BREAK
  2376. case 158:
  2377. YY_RULE_SETUP
  2378. #line 482 "../../../src/mesa/program/program_lexer.l"
  2379. ECHO;
  2380.         YY_BREAK
  2381. #line 2382 "program/lex.yy.c"
  2382. case YY_STATE_EOF(INITIAL):
  2383.         yyterminate();
  2384.  
  2385.         case YY_END_OF_BUFFER:
  2386.                 {
  2387.                 /* Amount of text matched not including the EOB char. */
  2388.                 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
  2389.  
  2390.                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
  2391.                 *yy_cp = yyg->yy_hold_char;
  2392.                 YY_RESTORE_YY_MORE_OFFSET
  2393.  
  2394.                 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
  2395.                         {
  2396.                         /* We're scanning a new file or input source.  It's
  2397.                          * possible that this happened because the user
  2398.                          * just pointed yyin at a new source and called
  2399.                          * _mesa_program_lexer_lex().  If so, then we have to assure
  2400.                          * consistency between YY_CURRENT_BUFFER and our
  2401.                          * globals.  Here is the right place to do so, because
  2402.                          * this is the first action (other than possibly a
  2403.                          * back-up) that will match for the new input source.
  2404.                          */
  2405.                         yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
  2406.                         YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
  2407.                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
  2408.                         }
  2409.  
  2410.                 /* Note that here we test for yy_c_buf_p "<=" to the position
  2411.                  * of the first EOB in the buffer, since yy_c_buf_p will
  2412.                  * already have been incremented past the NUL character
  2413.                  * (since all states make transitions on EOB to the
  2414.                  * end-of-buffer state).  Contrast this with the test
  2415.                  * in input().
  2416.                  */
  2417.                 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
  2418.                         { /* This was really a NUL. */
  2419.                         yy_state_type yy_next_state;
  2420.  
  2421.                         yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
  2422.  
  2423.                         yy_current_state = yy_get_previous_state( yyscanner );
  2424.  
  2425.                         /* Okay, we're now positioned to make the NUL
  2426.                          * transition.  We couldn't have
  2427.                          * yy_get_previous_state() go ahead and do it
  2428.                          * for us because it doesn't know how to deal
  2429.                          * with the possibility of jamming (and we don't
  2430.                          * want to build jamming into it because then it
  2431.                          * will run more slowly).
  2432.                          */
  2433.  
  2434.                         yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
  2435.  
  2436.                         yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
  2437.  
  2438.                         if ( yy_next_state )
  2439.                                 {
  2440.                                 /* Consume the NUL. */
  2441.                                 yy_cp = ++yyg->yy_c_buf_p;
  2442.                                 yy_current_state = yy_next_state;
  2443.                                 goto yy_match;
  2444.                                 }
  2445.  
  2446.                         else
  2447.                                 {
  2448.                                 yy_cp = yyg->yy_c_buf_p;
  2449.                                 goto yy_find_action;
  2450.                                 }
  2451.                         }
  2452.  
  2453.                 else switch ( yy_get_next_buffer( yyscanner ) )
  2454.                         {
  2455.                         case EOB_ACT_END_OF_FILE:
  2456.                                 {
  2457.                                 yyg->yy_did_buffer_switch_on_eof = 0;
  2458.  
  2459.                                 if ( _mesa_program_lexer_wrap(yyscanner ) )
  2460.                                         {
  2461.                                         /* Note: because we've taken care in
  2462.                                          * yy_get_next_buffer() to have set up
  2463.                                          * yytext, we can now set up
  2464.                                          * yy_c_buf_p so that if some total
  2465.                                          * hoser (like flex itself) wants to
  2466.                                          * call the scanner after we return the
  2467.                                          * YY_NULL, it'll still work - another
  2468.                                          * YY_NULL will get returned.
  2469.                                          */
  2470.                                         yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
  2471.  
  2472.                                         yy_act = YY_STATE_EOF(YY_START);
  2473.                                         goto do_action;
  2474.                                         }
  2475.  
  2476.                                 else
  2477.                                         {
  2478.                                         if ( ! yyg->yy_did_buffer_switch_on_eof )
  2479.                                                 YY_NEW_FILE;
  2480.                                         }
  2481.                                 break;
  2482.                                 }
  2483.  
  2484.                         case EOB_ACT_CONTINUE_SCAN:
  2485.                                 yyg->yy_c_buf_p =
  2486.                                         yyg->yytext_ptr + yy_amount_of_matched_text;
  2487.  
  2488.                                 yy_current_state = yy_get_previous_state( yyscanner );
  2489.  
  2490.                                 yy_cp = yyg->yy_c_buf_p;
  2491.                                 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
  2492.                                 goto yy_match;
  2493.  
  2494.                         case EOB_ACT_LAST_MATCH:
  2495.                                 yyg->yy_c_buf_p =
  2496.                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
  2497.  
  2498.                                 yy_current_state = yy_get_previous_state( yyscanner );
  2499.  
  2500.                                 yy_cp = yyg->yy_c_buf_p;
  2501.                                 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
  2502.                                 goto yy_find_action;
  2503.                         }
  2504.                 break;
  2505.                 }
  2506.  
  2507.         default:
  2508.                 YY_FATAL_ERROR(
  2509.                         "fatal flex scanner internal error--no action found" );
  2510.         } /* end of action switch */
  2511.                 } /* end of scanning one token */
  2512.         } /* end of user's declarations */
  2513. } /* end of _mesa_program_lexer_lex */
  2514.  
  2515. /* yy_get_next_buffer - try to read in a new buffer
  2516.  *
  2517.  * Returns a code representing an action:
  2518.  *      EOB_ACT_LAST_MATCH -
  2519.  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
  2520.  *      EOB_ACT_END_OF_FILE - end of file
  2521.  */
  2522. static int yy_get_next_buffer (yyscan_t yyscanner)
  2523. {
  2524.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2525.         register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
  2526.         register char *source = yyg->yytext_ptr;
  2527.         register int number_to_move, i;
  2528.         int ret_val;
  2529.  
  2530.         if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
  2531.                 YY_FATAL_ERROR(
  2532.                 "fatal flex scanner internal error--end of buffer missed" );
  2533.  
  2534.         if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
  2535.                 { /* Don't try to fill the buffer, so this is an EOF. */
  2536.                 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
  2537.                         {
  2538.                         /* We matched a single character, the EOB, so
  2539.                          * treat this as a final EOF.
  2540.                          */
  2541.                         return EOB_ACT_END_OF_FILE;
  2542.                         }
  2543.  
  2544.                 else
  2545.                         {
  2546.                         /* We matched some text prior to the EOB, first
  2547.                          * process it.
  2548.                          */
  2549.                         return EOB_ACT_LAST_MATCH;
  2550.                         }
  2551.                 }
  2552.  
  2553.         /* Try to read more data. */
  2554.  
  2555.         /* First move last chars to start of buffer. */
  2556.         number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
  2557.  
  2558.         for ( i = 0; i < number_to_move; ++i )
  2559.                 *(dest++) = *(source++);
  2560.  
  2561.         if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
  2562.                 /* don't do the read, it's not guaranteed to return an EOF,
  2563.                  * just force an EOF
  2564.                  */
  2565.                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
  2566.  
  2567.         else
  2568.                 {
  2569.                         yy_size_t num_to_read =
  2570.                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
  2571.  
  2572.                 while ( num_to_read <= 0 )
  2573.                         { /* Not enough room in the buffer - grow it. */
  2574.  
  2575.                         /* just a shorter name for the current buffer */
  2576.                         YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
  2577.  
  2578.                         int yy_c_buf_p_offset =
  2579.                                 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
  2580.  
  2581.                         if ( b->yy_is_our_buffer )
  2582.                                 {
  2583.                                 yy_size_t new_size = b->yy_buf_size * 2;
  2584.  
  2585.                                 if ( new_size <= 0 )
  2586.                                         b->yy_buf_size += b->yy_buf_size / 8;
  2587.                                 else
  2588.                                         b->yy_buf_size *= 2;
  2589.  
  2590.                                 b->yy_ch_buf = (char *)
  2591.                                         /* Include room in for 2 EOB chars. */
  2592.                                         _mesa_program_lexer_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
  2593.                                 }
  2594.                         else
  2595.                                 /* Can't grow it, we don't own it. */
  2596.                                 b->yy_ch_buf = 0;
  2597.  
  2598.                         if ( ! b->yy_ch_buf )
  2599.                                 YY_FATAL_ERROR(
  2600.                                 "fatal error - scanner input buffer overflow" );
  2601.  
  2602.                         yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
  2603.  
  2604.                         num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
  2605.                                                 number_to_move - 1;
  2606.  
  2607.                         }
  2608.  
  2609.                 if ( num_to_read > YY_READ_BUF_SIZE )
  2610.                         num_to_read = YY_READ_BUF_SIZE;
  2611.  
  2612.                 /* Read in more data. */
  2613.                 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
  2614.                         yyg->yy_n_chars, num_to_read );
  2615.  
  2616.                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
  2617.                 }
  2618.  
  2619.         if ( yyg->yy_n_chars == 0 )
  2620.                 {
  2621.                 if ( number_to_move == YY_MORE_ADJ )
  2622.                         {
  2623.                         ret_val = EOB_ACT_END_OF_FILE;
  2624.                         _mesa_program_lexer_restart(yyin  ,yyscanner);
  2625.                         }
  2626.  
  2627.                 else
  2628.                         {
  2629.                         ret_val = EOB_ACT_LAST_MATCH;
  2630.                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
  2631.                                 YY_BUFFER_EOF_PENDING;
  2632.                         }
  2633.                 }
  2634.  
  2635.         else
  2636.                 ret_val = EOB_ACT_CONTINUE_SCAN;
  2637.  
  2638.         if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
  2639.                 /* Extend the array by 50%, plus the number we really need. */
  2640.                 yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
  2641.                 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) _mesa_program_lexer_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
  2642.                 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
  2643.                         YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
  2644.         }
  2645.  
  2646.         yyg->yy_n_chars += number_to_move;
  2647.         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
  2648.         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
  2649.  
  2650.         yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
  2651.  
  2652.         return ret_val;
  2653. }
  2654.  
  2655. /* yy_get_previous_state - get the state just before the EOB char was reached */
  2656.  
  2657.     static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
  2658. {
  2659.         register yy_state_type yy_current_state;
  2660.         register char *yy_cp;
  2661.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2662.  
  2663.         yy_current_state = yyg->yy_start;
  2664.  
  2665.         for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
  2666.                 {
  2667.                 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
  2668.                 if ( yy_accept[yy_current_state] )
  2669.                         {
  2670.                         yyg->yy_last_accepting_state = yy_current_state;
  2671.                         yyg->yy_last_accepting_cpos = yy_cp;
  2672.                         }
  2673.                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  2674.                         {
  2675.                         yy_current_state = (int) yy_def[yy_current_state];
  2676.                         if ( yy_current_state >= 779 )
  2677.                                 yy_c = yy_meta[(unsigned int) yy_c];
  2678.                         }
  2679.                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  2680.                 }
  2681.  
  2682.         return yy_current_state;
  2683. }
  2684.  
  2685. /* yy_try_NUL_trans - try to make a transition on the NUL character
  2686.  *
  2687.  * synopsis
  2688.  *      next_state = yy_try_NUL_trans( current_state );
  2689.  */
  2690.     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state , yyscan_t yyscanner)
  2691. {
  2692.         register int yy_is_jam;
  2693.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
  2694.         register char *yy_cp = yyg->yy_c_buf_p;
  2695.  
  2696.         register YY_CHAR yy_c = 1;
  2697.         if ( yy_accept[yy_current_state] )
  2698.                 {
  2699.                 yyg->yy_last_accepting_state = yy_current_state;
  2700.                 yyg->yy_last_accepting_cpos = yy_cp;
  2701.                 }
  2702.         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  2703.                 {
  2704.                 yy_current_state = (int) yy_def[yy_current_state];
  2705.                 if ( yy_current_state >= 779 )
  2706.                         yy_c = yy_meta[(unsigned int) yy_c];
  2707.                 }
  2708.         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  2709.         yy_is_jam = (yy_current_state == 778);
  2710.  
  2711.         (void)yyg;
  2712.         return yy_is_jam ? 0 : yy_current_state;
  2713. }
  2714.  
  2715.     static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
  2716. {
  2717.         register char *yy_cp;
  2718.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2719.  
  2720.     yy_cp = yyg->yy_c_buf_p;
  2721.  
  2722.         /* undo effects of setting up yytext */
  2723.         *yy_cp = yyg->yy_hold_char;
  2724.  
  2725.         if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
  2726.                 { /* need to shift things up to make room */
  2727.                 /* +2 for EOB chars. */
  2728.                 register yy_size_t number_to_move = yyg->yy_n_chars + 2;
  2729.                 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
  2730.                                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
  2731.                 register char *source =
  2732.                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
  2733.  
  2734.                 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
  2735.                         *--dest = *--source;
  2736.  
  2737.                 yy_cp += (int) (dest - source);
  2738.                 yy_bp += (int) (dest - source);
  2739.                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
  2740.                         yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
  2741.  
  2742.                 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
  2743.                         YY_FATAL_ERROR( "flex scanner push-back overflow" );
  2744.                 }
  2745.  
  2746.         *--yy_cp = (char) c;
  2747.  
  2748.         yyg->yytext_ptr = yy_bp;
  2749.         yyg->yy_hold_char = *yy_cp;
  2750.         yyg->yy_c_buf_p = yy_cp;
  2751. }
  2752.  
  2753. #ifndef YY_NO_INPUT
  2754. #ifdef __cplusplus
  2755.     static int yyinput (yyscan_t yyscanner)
  2756. #else
  2757.     static int input  (yyscan_t yyscanner)
  2758. #endif
  2759.  
  2760. {
  2761.         int c;
  2762.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2763.  
  2764.         *yyg->yy_c_buf_p = yyg->yy_hold_char;
  2765.  
  2766.         if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
  2767.                 {
  2768.                 /* yy_c_buf_p now points to the character we want to return.
  2769.                  * If this occurs *before* the EOB characters, then it's a
  2770.                  * valid NUL; if not, then we've hit the end of the buffer.
  2771.                  */
  2772.                 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
  2773.                         /* This was really a NUL. */
  2774.                         *yyg->yy_c_buf_p = '\0';
  2775.  
  2776.                 else
  2777.                         { /* need more input */
  2778.                         yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
  2779.                         ++yyg->yy_c_buf_p;
  2780.  
  2781.                         switch ( yy_get_next_buffer( yyscanner ) )
  2782.                                 {
  2783.                                 case EOB_ACT_LAST_MATCH:
  2784.                                         /* This happens because yy_g_n_b()
  2785.                                          * sees that we've accumulated a
  2786.                                          * token and flags that we need to
  2787.                                          * try matching the token before
  2788.                                          * proceeding.  But for input(),
  2789.                                          * there's no matching to consider.
  2790.                                          * So convert the EOB_ACT_LAST_MATCH
  2791.                                          * to EOB_ACT_END_OF_FILE.
  2792.                                          */
  2793.  
  2794.                                         /* Reset buffer status. */
  2795.                                         _mesa_program_lexer_restart(yyin ,yyscanner);
  2796.  
  2797.                                         /*FALLTHROUGH*/
  2798.  
  2799.                                 case EOB_ACT_END_OF_FILE:
  2800.                                         {
  2801.                                         if ( _mesa_program_lexer_wrap(yyscanner ) )
  2802.                                                 return EOF;
  2803.  
  2804.                                         if ( ! yyg->yy_did_buffer_switch_on_eof )
  2805.                                                 YY_NEW_FILE;
  2806. #ifdef __cplusplus
  2807.                                         return yyinput(yyscanner);
  2808. #else
  2809.                                         return input(yyscanner);
  2810. #endif
  2811.                                         }
  2812.  
  2813.                                 case EOB_ACT_CONTINUE_SCAN:
  2814.                                         yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
  2815.                                         break;
  2816.                                 }
  2817.                         }
  2818.                 }
  2819.  
  2820.         c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
  2821.         *yyg->yy_c_buf_p = '\0';        /* preserve yytext */
  2822.         yyg->yy_hold_char = *++yyg->yy_c_buf_p;
  2823.  
  2824.         return c;
  2825. }
  2826. #endif  /* ifndef YY_NO_INPUT */
  2827.  
  2828. /** Immediately switch to a different input stream.
  2829.  * @param input_file A readable stream.
  2830.  * @param yyscanner The scanner object.
  2831.  * @note This function does not reset the start condition to @c INITIAL .
  2832.  */
  2833.     void _mesa_program_lexer_restart  (FILE * input_file , yyscan_t yyscanner)
  2834. {
  2835.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2836.  
  2837.         if ( ! YY_CURRENT_BUFFER ){
  2838.         _mesa_program_lexer_ensure_buffer_stack (yyscanner);
  2839.                 YY_CURRENT_BUFFER_LVALUE =
  2840.             _mesa_program_lexer__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
  2841.         }
  2842.  
  2843.         _mesa_program_lexer__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
  2844.         _mesa_program_lexer__load_buffer_state(yyscanner );
  2845. }
  2846.  
  2847. /** Switch to a different input buffer.
  2848.  * @param new_buffer The new input buffer.
  2849.  * @param yyscanner The scanner object.
  2850.  */
  2851.     void _mesa_program_lexer__switch_to_buffer  (YY_BUFFER_STATE  new_buffer , yyscan_t yyscanner)
  2852. {
  2853.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2854.  
  2855.         /* TODO. We should be able to replace this entire function body
  2856.          * with
  2857.          *              _mesa_program_lexer_pop_buffer_state();
  2858.          *              _mesa_program_lexer_push_buffer_state(new_buffer);
  2859.      */
  2860.         _mesa_program_lexer_ensure_buffer_stack (yyscanner);
  2861.         if ( YY_CURRENT_BUFFER == new_buffer )
  2862.                 return;
  2863.  
  2864.         if ( YY_CURRENT_BUFFER )
  2865.                 {
  2866.                 /* Flush out information for old buffer. */
  2867.                 *yyg->yy_c_buf_p = yyg->yy_hold_char;
  2868.                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
  2869.                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
  2870.                 }
  2871.  
  2872.         YY_CURRENT_BUFFER_LVALUE = new_buffer;
  2873.         _mesa_program_lexer__load_buffer_state(yyscanner );
  2874.  
  2875.         /* We don't actually know whether we did this switch during
  2876.          * EOF (_mesa_program_lexer_wrap()) processing, but the only time this flag
  2877.          * is looked at is after _mesa_program_lexer_wrap() is called, so it's safe
  2878.          * to go ahead and always set it.
  2879.          */
  2880.         yyg->yy_did_buffer_switch_on_eof = 1;
  2881. }
  2882.  
  2883. static void _mesa_program_lexer__load_buffer_state  (yyscan_t yyscanner)
  2884. {
  2885.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2886.         yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
  2887.         yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
  2888.         yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
  2889.         yyg->yy_hold_char = *yyg->yy_c_buf_p;
  2890. }
  2891.  
  2892. /** Allocate and initialize an input buffer state.
  2893.  * @param file A readable stream.
  2894.  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
  2895.  * @param yyscanner The scanner object.
  2896.  * @return the allocated buffer state.
  2897.  */
  2898.     YY_BUFFER_STATE _mesa_program_lexer__create_buffer  (FILE * file, int  size , yyscan_t yyscanner)
  2899. {
  2900.         YY_BUFFER_STATE b;
  2901.    
  2902.         b = (YY_BUFFER_STATE) _mesa_program_lexer_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
  2903.         if ( ! b )
  2904.                 YY_FATAL_ERROR( "out of dynamic memory in _mesa_program_lexer__create_buffer()" );
  2905.  
  2906.         b->yy_buf_size = size;
  2907.  
  2908.         /* yy_ch_buf has to be 2 characters longer than the size given because
  2909.          * we need to put in 2 end-of-buffer characters.
  2910.          */
  2911.         b->yy_ch_buf = (char *) _mesa_program_lexer_alloc(b->yy_buf_size + 2 ,yyscanner );
  2912.         if ( ! b->yy_ch_buf )
  2913.                 YY_FATAL_ERROR( "out of dynamic memory in _mesa_program_lexer__create_buffer()" );
  2914.  
  2915.         b->yy_is_our_buffer = 1;
  2916.  
  2917.         _mesa_program_lexer__init_buffer(b,file ,yyscanner);
  2918.  
  2919.         return b;
  2920. }
  2921.  
  2922. /** Destroy the buffer.
  2923.  * @param b a buffer created with _mesa_program_lexer__create_buffer()
  2924.  * @param yyscanner The scanner object.
  2925.  */
  2926.     void _mesa_program_lexer__delete_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
  2927. {
  2928.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2929.  
  2930.         if ( ! b )
  2931.                 return;
  2932.  
  2933.         if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
  2934.                 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
  2935.  
  2936.         if ( b->yy_is_our_buffer )
  2937.                 _mesa_program_lexer_free((void *) b->yy_ch_buf ,yyscanner );
  2938.  
  2939.         _mesa_program_lexer_free((void *) b ,yyscanner );
  2940. }
  2941.  
  2942. /* Initializes or reinitializes a buffer.
  2943.  * This function is sometimes called more than once on the same buffer,
  2944.  * such as during a _mesa_program_lexer_restart() or at EOF.
  2945.  */
  2946.     static void _mesa_program_lexer__init_buffer  (YY_BUFFER_STATE  b, FILE * file , yyscan_t yyscanner)
  2947.  
  2948. {
  2949.         int oerrno = errno;
  2950.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2951.  
  2952.         _mesa_program_lexer__flush_buffer(b ,yyscanner);
  2953.  
  2954.         b->yy_input_file = file;
  2955.         b->yy_fill_buffer = 1;
  2956.  
  2957.     /* If b is the current buffer, then _mesa_program_lexer__init_buffer was _probably_
  2958.      * called from _mesa_program_lexer_restart() or through yy_get_next_buffer.
  2959.      * In that case, we don't want to reset the lineno or column.
  2960.      */
  2961.     if (b != YY_CURRENT_BUFFER){
  2962.         b->yy_bs_lineno = 1;
  2963.         b->yy_bs_column = 0;
  2964.     }
  2965.  
  2966.         b->yy_is_interactive = 0;
  2967.    
  2968.         errno = oerrno;
  2969. }
  2970.  
  2971. /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
  2972.  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
  2973.  * @param yyscanner The scanner object.
  2974.  */
  2975.     void _mesa_program_lexer__flush_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
  2976. {
  2977.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  2978.         if ( ! b )
  2979.                 return;
  2980.  
  2981.         b->yy_n_chars = 0;
  2982.  
  2983.         /* We always need two end-of-buffer characters.  The first causes
  2984.          * a transition to the end-of-buffer state.  The second causes
  2985.          * a jam in that state.
  2986.          */
  2987.         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
  2988.         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
  2989.  
  2990.         b->yy_buf_pos = &b->yy_ch_buf[0];
  2991.  
  2992.         b->yy_at_bol = 1;
  2993.         b->yy_buffer_status = YY_BUFFER_NEW;
  2994.  
  2995.         if ( b == YY_CURRENT_BUFFER )
  2996.                 _mesa_program_lexer__load_buffer_state(yyscanner );
  2997. }
  2998.  
  2999. /** Pushes the new state onto the stack. The new state becomes
  3000.  *  the current state. This function will allocate the stack
  3001.  *  if necessary.
  3002.  *  @param new_buffer The new state.
  3003.  *  @param yyscanner The scanner object.
  3004.  */
  3005. void _mesa_program_lexer_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
  3006. {
  3007.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3008.         if (new_buffer == NULL)
  3009.                 return;
  3010.  
  3011.         _mesa_program_lexer_ensure_buffer_stack(yyscanner);
  3012.  
  3013.         /* This block is copied from _mesa_program_lexer__switch_to_buffer. */
  3014.         if ( YY_CURRENT_BUFFER )
  3015.                 {
  3016.                 /* Flush out information for old buffer. */
  3017.                 *yyg->yy_c_buf_p = yyg->yy_hold_char;
  3018.                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
  3019.                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
  3020.                 }
  3021.  
  3022.         /* Only push if top exists. Otherwise, replace top. */
  3023.         if (YY_CURRENT_BUFFER)
  3024.                 yyg->yy_buffer_stack_top++;
  3025.         YY_CURRENT_BUFFER_LVALUE = new_buffer;
  3026.  
  3027.         /* copied from _mesa_program_lexer__switch_to_buffer. */
  3028.         _mesa_program_lexer__load_buffer_state(yyscanner );
  3029.         yyg->yy_did_buffer_switch_on_eof = 1;
  3030. }
  3031.  
  3032. /** Removes and deletes the top of the stack, if present.
  3033.  *  The next element becomes the new top.
  3034.  *  @param yyscanner The scanner object.
  3035.  */
  3036. void _mesa_program_lexer_pop_buffer_state (yyscan_t yyscanner)
  3037. {
  3038.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3039.         if (!YY_CURRENT_BUFFER)
  3040.                 return;
  3041.  
  3042.         _mesa_program_lexer__delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
  3043.         YY_CURRENT_BUFFER_LVALUE = NULL;
  3044.         if (yyg->yy_buffer_stack_top > 0)
  3045.                 --yyg->yy_buffer_stack_top;
  3046.  
  3047.         if (YY_CURRENT_BUFFER) {
  3048.                 _mesa_program_lexer__load_buffer_state(yyscanner );
  3049.                 yyg->yy_did_buffer_switch_on_eof = 1;
  3050.         }
  3051. }
  3052.  
  3053. /* Allocates the stack if it does not exist.
  3054.  *  Guarantees space for at least one push.
  3055.  */
  3056. static void _mesa_program_lexer_ensure_buffer_stack (yyscan_t yyscanner)
  3057. {
  3058.         yy_size_t num_to_alloc;
  3059.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3060.  
  3061.         if (!yyg->yy_buffer_stack) {
  3062.  
  3063.                 /* First allocation is just for 2 elements, since we don't know if this
  3064.                  * scanner will even need a stack. We use 2 instead of 1 to avoid an
  3065.                  * immediate realloc on the next call.
  3066.          */
  3067.                 num_to_alloc = 1;
  3068.                 yyg->yy_buffer_stack = (struct yy_buffer_state**)_mesa_program_lexer_alloc
  3069.                                                                 (num_to_alloc * sizeof(struct yy_buffer_state*)
  3070.                                                                 , yyscanner);
  3071.                 if ( ! yyg->yy_buffer_stack )
  3072.                         YY_FATAL_ERROR( "out of dynamic memory in _mesa_program_lexer_ensure_buffer_stack()" );
  3073.                                                                  
  3074.                 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
  3075.                                
  3076.                 yyg->yy_buffer_stack_max = num_to_alloc;
  3077.                 yyg->yy_buffer_stack_top = 0;
  3078.                 return;
  3079.         }
  3080.  
  3081.         if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
  3082.  
  3083.                 /* Increase the buffer to prepare for a possible push. */
  3084.                 int grow_size = 8 /* arbitrary grow size */;
  3085.  
  3086.                 num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
  3087.                 yyg->yy_buffer_stack = (struct yy_buffer_state**)_mesa_program_lexer_realloc
  3088.                                                                 (yyg->yy_buffer_stack,
  3089.                                                                 num_to_alloc * sizeof(struct yy_buffer_state*)
  3090.                                                                 , yyscanner);
  3091.                 if ( ! yyg->yy_buffer_stack )
  3092.                         YY_FATAL_ERROR( "out of dynamic memory in _mesa_program_lexer_ensure_buffer_stack()" );
  3093.  
  3094.                 /* zero only the new slots.*/
  3095.                 memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
  3096.                 yyg->yy_buffer_stack_max = num_to_alloc;
  3097.         }
  3098. }
  3099.  
  3100. /** Setup the input buffer state to scan directly from a user-specified character buffer.
  3101.  * @param base the character buffer
  3102.  * @param size the size in bytes of the character buffer
  3103.  * @param yyscanner The scanner object.
  3104.  * @return the newly allocated buffer state object.
  3105.  */
  3106. YY_BUFFER_STATE _mesa_program_lexer__scan_buffer  (char * base, yy_size_t  size , yyscan_t yyscanner)
  3107. {
  3108.         YY_BUFFER_STATE b;
  3109.    
  3110.         if ( size < 2 ||
  3111.              base[size-2] != YY_END_OF_BUFFER_CHAR ||
  3112.              base[size-1] != YY_END_OF_BUFFER_CHAR )
  3113.                 /* They forgot to leave room for the EOB's. */
  3114.                 return 0;
  3115.  
  3116.         b = (YY_BUFFER_STATE) _mesa_program_lexer_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
  3117.         if ( ! b )
  3118.                 YY_FATAL_ERROR( "out of dynamic memory in _mesa_program_lexer__scan_buffer()" );
  3119.  
  3120.         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
  3121.         b->yy_buf_pos = b->yy_ch_buf = base;
  3122.         b->yy_is_our_buffer = 0;
  3123.         b->yy_input_file = 0;
  3124.         b->yy_n_chars = b->yy_buf_size;
  3125.         b->yy_is_interactive = 0;
  3126.         b->yy_at_bol = 1;
  3127.         b->yy_fill_buffer = 0;
  3128.         b->yy_buffer_status = YY_BUFFER_NEW;
  3129.  
  3130.         _mesa_program_lexer__switch_to_buffer(b ,yyscanner );
  3131.  
  3132.         return b;
  3133. }
  3134.  
  3135. /** Setup the input buffer state to scan a string. The next call to _mesa_program_lexer_lex() will
  3136.  * scan from a @e copy of @a str.
  3137.  * @param yystr a NUL-terminated string to scan
  3138.  * @param yyscanner The scanner object.
  3139.  * @return the newly allocated buffer state object.
  3140.  * @note If you want to scan bytes that may contain NUL values, then use
  3141.  *       _mesa_program_lexer__scan_bytes() instead.
  3142.  */
  3143. YY_BUFFER_STATE _mesa_program_lexer__scan_string (yyconst char * yystr , yyscan_t yyscanner)
  3144. {
  3145.    
  3146.         return _mesa_program_lexer__scan_bytes(yystr,strlen(yystr) ,yyscanner);
  3147. }
  3148.  
  3149. /** Setup the input buffer state to scan the given bytes. The next call to _mesa_program_lexer_lex() will
  3150.  * scan from a @e copy of @a bytes.
  3151.  * @param yybytes the byte buffer to scan
  3152.  * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
  3153.  * @param yyscanner The scanner object.
  3154.  * @return the newly allocated buffer state object.
  3155.  */
  3156. YY_BUFFER_STATE _mesa_program_lexer__scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len , yyscan_t yyscanner)
  3157. {
  3158.         YY_BUFFER_STATE b;
  3159.         char *buf;
  3160.         yy_size_t n;
  3161.         yy_size_t i;
  3162.    
  3163.         /* Get memory for full buffer, including space for trailing EOB's. */
  3164.         n = _yybytes_len + 2;
  3165.         buf = (char *) _mesa_program_lexer_alloc(n ,yyscanner );
  3166.         if ( ! buf )
  3167.                 YY_FATAL_ERROR( "out of dynamic memory in _mesa_program_lexer__scan_bytes()" );
  3168.  
  3169.         for ( i = 0; i < _yybytes_len; ++i )
  3170.                 buf[i] = yybytes[i];
  3171.  
  3172.         buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
  3173.  
  3174.         b = _mesa_program_lexer__scan_buffer(buf,n ,yyscanner);
  3175.         if ( ! b )
  3176.                 YY_FATAL_ERROR( "bad buffer in _mesa_program_lexer__scan_bytes()" );
  3177.  
  3178.         /* It's okay to grow etc. this buffer, and we should throw it
  3179.          * away when we're done.
  3180.          */
  3181.         b->yy_is_our_buffer = 1;
  3182.  
  3183.         return b;
  3184. }
  3185.  
  3186. #ifndef YY_EXIT_FAILURE
  3187. #define YY_EXIT_FAILURE 2
  3188. #endif
  3189.  
  3190. static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
  3191. {
  3192.         (void) fprintf( stderr, "%s\n", msg );
  3193.         exit( YY_EXIT_FAILURE );
  3194. }
  3195.  
  3196. /* Redefine yyless() so it works in section 3 code. */
  3197.  
  3198. #undef yyless
  3199. #define yyless(n) \
  3200.         do \
  3201.                 { \
  3202.                 /* Undo effects of setting up yytext. */ \
  3203.         int yyless_macro_arg = (n); \
  3204.         YY_LESS_LINENO(yyless_macro_arg);\
  3205.                 yytext[yyleng] = yyg->yy_hold_char; \
  3206.                 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
  3207.                 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
  3208.                 *yyg->yy_c_buf_p = '\0'; \
  3209.                 yyleng = yyless_macro_arg; \
  3210.                 } \
  3211.         while ( 0 )
  3212.  
  3213. /* Accessor  methods (get/set functions) to struct members. */
  3214.  
  3215. /** Get the user-defined data for this scanner.
  3216.  * @param yyscanner The scanner object.
  3217.  */
  3218. YY_EXTRA_TYPE _mesa_program_lexer_get_extra  (yyscan_t yyscanner)
  3219. {
  3220.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3221.     return yyextra;
  3222. }
  3223.  
  3224. /** Get the current line number.
  3225.  * @param yyscanner The scanner object.
  3226.  */
  3227. int _mesa_program_lexer_get_lineno  (yyscan_t yyscanner)
  3228. {
  3229.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3230.    
  3231.         if (! YY_CURRENT_BUFFER)
  3232.             return 0;
  3233.    
  3234.     return yylineno;
  3235. }
  3236.  
  3237. /** Get the current column number.
  3238.  * @param yyscanner The scanner object.
  3239.  */
  3240. int _mesa_program_lexer_get_column  (yyscan_t yyscanner)
  3241. {
  3242.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3243.    
  3244.         if (! YY_CURRENT_BUFFER)
  3245.             return 0;
  3246.    
  3247.     return yycolumn;
  3248. }
  3249.  
  3250. /** Get the input stream.
  3251.  * @param yyscanner The scanner object.
  3252.  */
  3253. FILE *_mesa_program_lexer_get_in  (yyscan_t yyscanner)
  3254. {
  3255.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3256.     return yyin;
  3257. }
  3258.  
  3259. /** Get the output stream.
  3260.  * @param yyscanner The scanner object.
  3261.  */
  3262. FILE *_mesa_program_lexer_get_out  (yyscan_t yyscanner)
  3263. {
  3264.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3265.     return yyout;
  3266. }
  3267.  
  3268. /** Get the length of the current token.
  3269.  * @param yyscanner The scanner object.
  3270.  */
  3271. yy_size_t _mesa_program_lexer_get_leng  (yyscan_t yyscanner)
  3272. {
  3273.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3274.     return yyleng;
  3275. }
  3276.  
  3277. /** Get the current token.
  3278.  * @param yyscanner The scanner object.
  3279.  */
  3280.  
  3281. char *_mesa_program_lexer_get_text  (yyscan_t yyscanner)
  3282. {
  3283.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3284.     return yytext;
  3285. }
  3286.  
  3287. /** Set the user-defined data. This data is never touched by the scanner.
  3288.  * @param user_defined The data to be associated with this scanner.
  3289.  * @param yyscanner The scanner object.
  3290.  */
  3291. void _mesa_program_lexer_set_extra (YY_EXTRA_TYPE  user_defined , yyscan_t yyscanner)
  3292. {
  3293.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3294.     yyextra = user_defined ;
  3295. }
  3296.  
  3297. /** Set the current line number.
  3298.  * @param line_number
  3299.  * @param yyscanner The scanner object.
  3300.  */
  3301. void _mesa_program_lexer_set_lineno (int  line_number , yyscan_t yyscanner)
  3302. {
  3303.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3304.  
  3305.         /* lineno is only valid if an input buffer exists. */
  3306.         if (! YY_CURRENT_BUFFER )
  3307.            YY_FATAL_ERROR( "_mesa_program_lexer_set_lineno called with no buffer" );
  3308.    
  3309.     yylineno = line_number;
  3310. }
  3311.  
  3312. /** Set the current column.
  3313.  * @param line_number
  3314.  * @param yyscanner The scanner object.
  3315.  */
  3316. void _mesa_program_lexer_set_column (int  column_no , yyscan_t yyscanner)
  3317. {
  3318.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3319.  
  3320.         /* column is only valid if an input buffer exists. */
  3321.         if (! YY_CURRENT_BUFFER )
  3322.            YY_FATAL_ERROR( "_mesa_program_lexer_set_column called with no buffer" );
  3323.    
  3324.     yycolumn = column_no;
  3325. }
  3326.  
  3327. /** Set the input stream. This does not discard the current
  3328.  * input buffer.
  3329.  * @param in_str A readable stream.
  3330.  * @param yyscanner The scanner object.
  3331.  * @see _mesa_program_lexer__switch_to_buffer
  3332.  */
  3333. void _mesa_program_lexer_set_in (FILE *  in_str , yyscan_t yyscanner)
  3334. {
  3335.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3336.     yyin = in_str ;
  3337. }
  3338.  
  3339. void _mesa_program_lexer_set_out (FILE *  out_str , yyscan_t yyscanner)
  3340. {
  3341.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3342.     yyout = out_str ;
  3343. }
  3344.  
  3345. int _mesa_program_lexer_get_debug  (yyscan_t yyscanner)
  3346. {
  3347.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3348.     return yy_flex_debug;
  3349. }
  3350.  
  3351. void _mesa_program_lexer_set_debug (int  bdebug , yyscan_t yyscanner)
  3352. {
  3353.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3354.     yy_flex_debug = bdebug ;
  3355. }
  3356.  
  3357. /* Accessor methods for yylval and yylloc */
  3358.  
  3359. YYSTYPE * _mesa_program_lexer_get_lval  (yyscan_t yyscanner)
  3360. {
  3361.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3362.     return yylval;
  3363. }
  3364.  
  3365. void _mesa_program_lexer_set_lval (YYSTYPE *  yylval_param , yyscan_t yyscanner)
  3366. {
  3367.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3368.     yylval = yylval_param;
  3369. }
  3370.  
  3371. YYLTYPE *_mesa_program_lexer_get_lloc  (yyscan_t yyscanner)
  3372. {
  3373.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3374.     return yylloc;
  3375. }
  3376.    
  3377. void _mesa_program_lexer_set_lloc (YYLTYPE *  yylloc_param , yyscan_t yyscanner)
  3378. {
  3379.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3380.     yylloc = yylloc_param;
  3381. }
  3382.    
  3383. /* User-visible API */
  3384.  
  3385. /* _mesa_program_lexer_lex_init is special because it creates the scanner itself, so it is
  3386.  * the ONLY reentrant function that doesn't take the scanner as the last argument.
  3387.  * That's why we explicitly handle the declaration, instead of using our macros.
  3388.  */
  3389.  
  3390. int _mesa_program_lexer_lex_init(yyscan_t* ptr_yy_globals)
  3391.  
  3392. {
  3393.     if (ptr_yy_globals == NULL){
  3394.         errno = EINVAL;
  3395.         return 1;
  3396.     }
  3397.  
  3398.     *ptr_yy_globals = (yyscan_t) _mesa_program_lexer_alloc ( sizeof( struct yyguts_t ), NULL );
  3399.  
  3400.     if (*ptr_yy_globals == NULL){
  3401.         errno = ENOMEM;
  3402.         return 1;
  3403.     }
  3404.  
  3405.     /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
  3406.     memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
  3407.  
  3408.     return yy_init_globals ( *ptr_yy_globals );
  3409. }
  3410.  
  3411. /* _mesa_program_lexer_lex_init_extra has the same functionality as _mesa_program_lexer_lex_init, but follows the
  3412.  * convention of taking the scanner as the last argument. Note however, that
  3413.  * this is a *pointer* to a scanner, as it will be allocated by this call (and
  3414.  * is the reason, too, why this function also must handle its own declaration).
  3415.  * The user defined value in the first argument will be available to _mesa_program_lexer_alloc in
  3416.  * the yyextra field.
  3417.  */
  3418.  
  3419. int _mesa_program_lexer_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
  3420.  
  3421. {
  3422.     struct yyguts_t dummy_yyguts;
  3423.  
  3424.     _mesa_program_lexer_set_extra (yy_user_defined, &dummy_yyguts);
  3425.  
  3426.     if (ptr_yy_globals == NULL){
  3427.         errno = EINVAL;
  3428.         return 1;
  3429.     }
  3430.        
  3431.     *ptr_yy_globals = (yyscan_t) _mesa_program_lexer_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
  3432.        
  3433.     if (*ptr_yy_globals == NULL){
  3434.         errno = ENOMEM;
  3435.         return 1;
  3436.     }
  3437.    
  3438.     /* By setting to 0xAA, we expose bugs in
  3439.     yy_init_globals. Leave at 0x00 for releases. */
  3440.     memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
  3441.    
  3442.     _mesa_program_lexer_set_extra (yy_user_defined, *ptr_yy_globals);
  3443.    
  3444.     return yy_init_globals ( *ptr_yy_globals );
  3445. }
  3446.  
  3447. static int yy_init_globals (yyscan_t yyscanner)
  3448. {
  3449.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3450.     /* Initialization is the same as for the non-reentrant scanner.
  3451.      * This function is called from _mesa_program_lexer_lex_destroy(), so don't allocate here.
  3452.      */
  3453.  
  3454.     yyg->yy_buffer_stack = 0;
  3455.     yyg->yy_buffer_stack_top = 0;
  3456.     yyg->yy_buffer_stack_max = 0;
  3457.     yyg->yy_c_buf_p = (char *) 0;
  3458.     yyg->yy_init = 0;
  3459.     yyg->yy_start = 0;
  3460.  
  3461.     yyg->yy_start_stack_ptr = 0;
  3462.     yyg->yy_start_stack_depth = 0;
  3463.     yyg->yy_start_stack =  NULL;
  3464.  
  3465. /* Defined in main.c */
  3466. #ifdef YY_STDINIT
  3467.     yyin = stdin;
  3468.     yyout = stdout;
  3469. #else
  3470.     yyin = (FILE *) 0;
  3471.     yyout = (FILE *) 0;
  3472. #endif
  3473.  
  3474.     /* For future reference: Set errno on error, since we are called by
  3475.      * _mesa_program_lexer_lex_init()
  3476.      */
  3477.     return 0;
  3478. }
  3479.  
  3480. /* _mesa_program_lexer_lex_destroy is for both reentrant and non-reentrant scanners. */
  3481. int _mesa_program_lexer_lex_destroy  (yyscan_t yyscanner)
  3482. {
  3483.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3484.  
  3485.     /* Pop the buffer stack, destroying each element. */
  3486.         while(YY_CURRENT_BUFFER){
  3487.                 _mesa_program_lexer__delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
  3488.                 YY_CURRENT_BUFFER_LVALUE = NULL;
  3489.                 _mesa_program_lexer_pop_buffer_state(yyscanner);
  3490.         }
  3491.  
  3492.         /* Destroy the stack itself. */
  3493.         _mesa_program_lexer_free(yyg->yy_buffer_stack ,yyscanner);
  3494.         yyg->yy_buffer_stack = NULL;
  3495.  
  3496.     /* Destroy the start condition stack. */
  3497.         _mesa_program_lexer_free(yyg->yy_start_stack ,yyscanner );
  3498.         yyg->yy_start_stack = NULL;
  3499.  
  3500.     /* Reset the globals. This is important in a non-reentrant scanner so the next time
  3501.      * _mesa_program_lexer_lex() is called, initialization will occur. */
  3502.     yy_init_globals( yyscanner);
  3503.  
  3504.     /* Destroy the main struct (reentrant only). */
  3505.     _mesa_program_lexer_free ( yyscanner , yyscanner );
  3506.     yyscanner = NULL;
  3507.     return 0;
  3508. }
  3509.  
  3510. /*
  3511.  * Internal utility routines.
  3512.  */
  3513.  
  3514. #ifndef yytext_ptr
  3515. static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
  3516. {
  3517.         register int i;
  3518.         for ( i = 0; i < n; ++i )
  3519.                 s1[i] = s2[i];
  3520. }
  3521. #endif
  3522.  
  3523. #ifdef YY_NEED_STRLEN
  3524. static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
  3525. {
  3526.         register int n;
  3527.         for ( n = 0; s[n]; ++n )
  3528.                 ;
  3529.  
  3530.         return n;
  3531. }
  3532. #endif
  3533.  
  3534. void *_mesa_program_lexer_alloc (yy_size_t  size , yyscan_t yyscanner)
  3535. {
  3536.         return (void *) malloc( size );
  3537. }
  3538.  
  3539. void *_mesa_program_lexer_realloc  (void * ptr, yy_size_t  size , yyscan_t yyscanner)
  3540. {
  3541.         /* The cast to (char *) in the following accommodates both
  3542.          * implementations that use char* generic pointers, and those
  3543.          * that use void* generic pointers.  It works with the latter
  3544.          * because both ANSI C and C++ allow castless assignment from
  3545.          * any pointer type to void*, and deal with argument conversions
  3546.          * as though doing an assignment.
  3547.          */
  3548.         return (void *) realloc( (char *) ptr, size );
  3549. }
  3550.  
  3551. void _mesa_program_lexer_free (void * ptr , yyscan_t yyscanner)
  3552. {
  3553.         free( (char *) ptr );   /* see _mesa_program_lexer_realloc() for (char *) cast */
  3554. }
  3555.  
  3556. #define YYTABLES_NAME "yytables"
  3557.  
  3558. #line 482 "../../../src/mesa/program/program_lexer.l"
  3559.  
  3560.  
  3561.  
  3562. void
  3563. _mesa_program_lexer_ctor(void **scanner, struct asm_parser_state *state,
  3564.                          const char *string, size_t len)
  3565. {
  3566.    _mesa_program_lexer_lex_init_extra(state,scanner);
  3567.    _mesa_program_lexer__scan_bytes(string,len,*scanner);
  3568. }
  3569.  
  3570. void
  3571. _mesa_program_lexer_dtor(void *scanner)
  3572. {
  3573.    _mesa_program_lexer_lex_destroy(scanner);
  3574. }
  3575.  
  3576.