Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. #line 2 "glsl_lexer.cpp"
  2.  
  3. #line 4 "glsl_lexer.cpp"
  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_glsl_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_glsl_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_glsl_lexer_restart (FILE *input_file ,yyscan_t yyscanner );
  283. void _mesa_glsl_lexer__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
  284. YY_BUFFER_STATE _mesa_glsl_lexer__create_buffer (FILE *file,int size ,yyscan_t yyscanner );
  285. void _mesa_glsl_lexer__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
  286. void _mesa_glsl_lexer__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
  287. void _mesa_glsl_lexer_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
  288. void _mesa_glsl_lexer_pop_buffer_state (yyscan_t yyscanner );
  289.  
  290. static void _mesa_glsl_lexer_ensure_buffer_stack (yyscan_t yyscanner );
  291. static void _mesa_glsl_lexer__load_buffer_state (yyscan_t yyscanner );
  292. static void _mesa_glsl_lexer__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
  293.  
  294. #define YY_FLUSH_BUFFER _mesa_glsl_lexer__flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
  295.  
  296. YY_BUFFER_STATE _mesa_glsl_lexer__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
  297. YY_BUFFER_STATE _mesa_glsl_lexer__scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
  298. YY_BUFFER_STATE _mesa_glsl_lexer__scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
  299.  
  300. void *_mesa_glsl_lexer_alloc (yy_size_t ,yyscan_t yyscanner );
  301. void *_mesa_glsl_lexer_realloc (void *,yy_size_t ,yyscan_t yyscanner );
  302. void _mesa_glsl_lexer_free (void * ,yyscan_t yyscanner );
  303.  
  304. #define yy_new_buffer _mesa_glsl_lexer__create_buffer
  305.  
  306. #define yy_set_interactive(is_interactive) \
  307.         { \
  308.         if ( ! YY_CURRENT_BUFFER ){ \
  309.         _mesa_glsl_lexer_ensure_buffer_stack (yyscanner); \
  310.                 YY_CURRENT_BUFFER_LVALUE =    \
  311.             _mesa_glsl_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_glsl_lexer_ensure_buffer_stack (yyscanner); \
  320.                 YY_CURRENT_BUFFER_LVALUE =    \
  321.             _mesa_glsl_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_glsl_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 263
  355. #define YY_END_OF_BUFFER 264
  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[1038] =
  364.     {   0,
  365.         0,    0,   16,   16,    0,    0,  264,  262,    1,   22,
  366.       262,  262,  262,  262,  262,  262,  262,  262,  176,  174,
  367.       262,  262,  262,  261,  262,  261,  261,  261,  261,  261,
  368.       261,  261,  261,  261,  261,  261,  261,  261,  261,  261,
  369.       261,  261,  261,  261,  261,  262,    1,  262,   21,   16,
  370.        20,   21,   19,   17,   18,   14,   13,    1,  158,  167,
  371.       159,  170,  164,  153,  166,  154,  173,  178,  165,  179,
  372.       176,    0,    0,  176,    0,  174,  174,  162,  155,  157,
  373.       156,  163,  261,  171,  161,  261,  261,  261,  261,  261,
  374.       261,  261,  261,  261,  261,  261,  261,  261,   31,  261,
  375.  
  376.       261,  261,  261,  261,  261,  261,  261,  261,  261,  261,
  377.       261,  261,   35,  261,  261,   62,  261,  261,  261,  261,
  378.       261,  261,  261,  261,  261,  261,  261,  261,  261,  261,
  379.       261,  261,  261,  261,  261,  261,  261,  261,  261,  261,
  380.       261,  261,  261,  261,  261,  261,  261,  261,  261,  261,
  381.       172,  160,    1,    0,    0,    2,    0,    0,    0,    0,
  382.        16,   15,   19,   18,    0,  178,    0,    0,  177,    0,
  383.       179,    0,    0,    0,  180,  175,  168,  169,  261,  187,
  384.       261,  261,  261,  261,  261,  261,  261,  261,  261,  261,
  385.       261,  261,  261,  261,  261,  261,  261,  261,  261,  261,
  386.  
  387.       261,  261,  261,  261,   34,  261,  261,  261,  261,  261,
  388.       261,  261,  261,  261,  261,   27,  261,  261,  261,  261,
  389.       261,  261,  261,  261,  261,  261,  261,   63,  261,  261,
  390.       261,  261,  261,  261,  261,  261,  261,  261,  261,  261,
  391.       261,  261,  261,  261,  261,  261,  261,  261,  261,  261,
  392.       261,  261,  261,  261,  261,  261,  261,  261,  261,  261,
  393.       261,  261,  261,    0,    0,    0,    0,   15,    0,  178,
  394.       182,    0,  177,    0,    0,    0,  179,  183,  180,    0,
  395.         0,  175,  261,  261,  261,   25,  261,  261,  245,  238,
  396.       261,  261,  261,  261,  261,  261,  261,  261,  261,  261,
  397.  
  398.       261,   33,  190,  261,  261,  261,  261,   69,  261,  261,
  399.       195,  208,  261,  261,  261,  261,  261,  261,  261,  261,
  400.       261,  261,  261,  261,  205,  241,   50,   51,   52,  261,
  401.       261,  261,  261,  261,  261,  261,  261,  261,  261,  261,
  402.       261,  261,  261,  261,  261,  261,  261,  261,  261,  261,
  403.       261,  261,  261,  261,  193,  185,  261,  261,   28,  261,
  404.       261,  261,  261,  261,  261,  261,   47,   48,   49,  151,
  405.       261,  261,  261,    0,    0,    0,    0,    0,  177,  181,
  406.       184,  261,  261,  261,   29,   38,   39,   40,  261,  188,
  407.       261,  261,   24,  261,  261,  261,  219,  220,  221,  261,
  408.  
  409.       216,  217,  218,  261,  186,  261,  209,   26,  231,  232,
  410.       233,  243,  213,  214,  215,  261,  261,  261,   64,  211,
  411.       261,  261,  261,   41,   42,   43,  261,  261,  261,  261,
  412.       261,  261,  261,  261,  261,  261,  261,  258,  261,  261,
  413.       261,  261,  261,  261,  261,  261,  206,  261,  261,  261,
  414.       261,  261,  261,  261,  261,  261,  261,  261,  189,  261,
  415.       261,  240,   44,   45,   46,  261,  261,   32,  261,    0,
  416.         0,    0,    0,  248,  261,  261,  261,  261,  246,  261,
  417.       261,  261,  261,  261,  261,  207,  202,  251,  261,  261,
  418.       261,  261,  261,  261,  198,  261,  261,  261,  152,   53,
  419.  
  420.        54,   55,   56,   57,   58,   59,   60,   61,  261,  261,
  421.       261,  261,  212,  194,  261,  261,  200,  261,  261,  261,
  422.        37,  261,  259,  237,   70,  201,  150,  261,  249,  196,
  423.       261,  261,  261,  261,  261,  261,  261,  261,  261,    0,
  424.         0,    0,    0,  261,  261,  261,  261,  261,  197,   36,
  425.       222,  223,  224,  225,  226,  227,  228,  229,  230,  261,
  426.       261,  261,  261,  261,  261,  107,  108,  109,  261,  261,
  427.       261,  261,  261,  242,  261,  261,  261,  261,  106,  261,
  428.       261,  261,  261,  261,  261,  261,  261,  191,  261,  261,
  429.       261,  261,  261,   65,  261,  261,   66,  261,  261,    0,
  430.  
  431.         0,    0,    0,    0,  261,  261,   67,  144,   30,  203,
  432.       118,  119,  120,  261,  261,  261,  261,  261,  261,  261,
  433.       261,  261,  261,  261,  261,  261,  261,  199,  261,  261,
  434.       261,  147,  257,  146,  261,  261,  261,  261,  261,  261,
  435.       261,  261,  192,  129,  130,  131,  261,  261,  210,  261,
  436.       145,  261,    0,    0,    6,    0,    0,    0,   12,    3,
  437.       261,   23,  261,  261,  261,  261,  261,  261,  261,  261,
  438.       261,  116,  261,  261,  261,  111,  204,   68,  261,  261,
  439.       261,  261,  261,  239,  261,  247,  244,  252,   72,   73,
  440.        74,  261,  261,  261,  261,  261,  261,  261,  261,  261,
  441.  
  442.       261,  261,  261,  261,  261,  261,  148,    0,    0,    0,
  443.         0,    0,    0,    0,  261,  261,  261,  127,  261,  261,
  444.       122,  261,  261,  261,  261,  261,  261,  261,  261,   83,
  445.        84,   85,  261,  261,  261,  261,  261,  261,  261,  261,
  446.       261,  261,  261,  261,  261,  260,  261,  261,  138,  261,
  447.       261,  133,   89,   90,   91,  261,  261,    4,    0,    5,
  448.         0,    0,    0,    0,    0,    0,  149,  261,  261,  261,
  449.       261,  261,  261,  261,  261,  261,  261,  110,  261,  112,
  450.       261,  261,  261,  261,  261,  261,  261,  261,  261,  261,
  451.       261,   95,  261,  261,  261,  261,   75,  261,  261,  261,
  452.  
  453.       261,  261,  261,  261,  261,  261,  261,  261,  261,  261,
  454.         0,    0,    0,    0,  261,  261,  261,  121,  123,  261,
  455.       113,  261,  114,  261,  261,  261,  261,  261,   96,  261,
  456.       261,   86,  261,  261,  261,  261,  261,  261,  261,  261,
  457.       261,  261,  261,  261,  261,  261,  261,  132,  134,  261,
  458.       261,  261,   97,  261,  261,   92,    0,    0,    0,  124,
  459.       125,  261,  261,  261,  140,  261,  261,  141,  261,  261,
  460.       261,  261,  261,  261,  261,   71,  261,  261,  261,  261,
  461.       234,  261,  235,  250,  261,  261,  261,  135,  136,  261,
  462.       261,  261,  261,  261,  261,  261,  261,    0,    0,    0,
  463.  
  464.       261,  261,  261,  261,  117,  115,  261,  261,  261,  253,
  465.       255,  261,   76,  261,   77,  261,  261,  261,  261,  261,
  466.       261,  261,  261,  261,  261,  261,  254,  256,  261,    0,
  467.         0,    0,    0,  128,  126,  261,  261,   87,   88,  261,
  468.       261,  261,   78,  261,  261,  261,   79,  261,  261,  261,
  469.       139,  137,   93,   94,  261,  261,    0,    0,    0,    0,
  470.       261,  261,  261,  261,  261,  261,   98,  261,  101,  261,
  471.       261,  261,  261,    0,    0,    0,    0,  261,  261,   99,
  472.       102,  261,  261,  261,  261,   80,  261,  100,  103,    0,
  473.         0,    0,    7,    0,    0,  142,  143,  261,  261,  261,
  474.  
  475.       261,  105,    0,    0,    8,    0,    0,  261,  261,  236,
  476.       261,    0,    0,    0,   81,   82,  261,    0,    0,    0,
  477.         9,  261,    0,    0,   10,  104,    0,    0,    0,    0,
  478.         0,    0,    0,    0,    0,   11,    0
  479.     } ;
  480.  
  481. static yyconst flex_int32_t yy_ec[256] =
  482.     {   0,
  483.         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
  484.         1,    1,    4,    1,    1,    1,    1,    1,    1,    1,
  485.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  486.         1,    2,    5,    1,    6,    1,    7,    8,    1,    9,
  487.        10,   11,   12,    1,   13,   14,   15,   16,   17,   18,
  488.        19,   20,   21,   21,   21,   22,   22,   23,    1,   24,
  489.        25,   26,    1,    1,   27,   28,   29,   30,   31,   32,
  490.        33,   34,   34,   34,   34,   35,   36,   34,   37,   34,
  491.        34,   38,   39,   40,   41,   34,   34,   42,   34,   34,
  492.         1,    1,    1,   43,   44,    1,   45,   46,   47,   48,
  493.  
  494.        49,   50,   51,   52,   53,   54,   55,   56,   57,   58,
  495.        59,   60,   34,   61,   62,   63,   64,   65,   66,   67,
  496.        68,   69,    1,   70,    1,    1,    1,    1,    1,    1,
  497.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  498.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  499.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  500.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  501.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  502.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  503.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  504.  
  505.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  506.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  507.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  508.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  509.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  510.         1,    1,    1,    1,    1
  511.     } ;
  512.  
  513. static yyconst flex_int32_t yy_meta[71] =
  514.     {   0,
  515.         1,    1,    2,    1,    1,    1,    1,    1,    1,    1,
  516.         1,    1,    1,    1,    1,    3,    3,    3,    3,    3,
  517.         3,    3,    1,    1,    1,    1,    4,    4,    4,    4,
  518.         4,    3,    5,    5,    6,    5,    5,    5,    5,    5,
  519.         5,    5,    1,    5,    4,    4,    4,    4,    4,    3,
  520.         5,    5,    5,    5,    5,    6,    5,    5,    5,    5,
  521.         5,    5,    5,    5,    5,    5,    5,    5,    5,    1
  522.     } ;
  523.  
  524. static yyconst flex_int16_t yy_base[1050] =
  525.     {   0,
  526.         0,   69,   75,  145, 1409, 1408, 1410, 1413,   70, 1413,
  527.      1384, 1383,   94, 1382,   91,   92,   90, 1381,  202,  256,
  528.        89, 1380,   95,    0,   79,   68,   64,   79,  124,   76,
  529.       131, 1345,  127,  141,   81,   88,   82, 1339,  140,  146,
  530.       182,  179,  149,  193,  148,  183,  252,  176, 1413,  140,
  531.      1413, 1387,  243, 1413,    0, 1413, 1413,  208, 1413, 1413,
  532.      1413, 1413, 1413, 1413, 1413, 1413, 1413,  305, 1413,  346,
  533.       188,  282,  272, 1413,    0,    0, 1413, 1376, 1413, 1413,
  534.      1413, 1375,    0, 1413, 1413, 1336, 1341,  123, 1338, 1347,
  535.      1346, 1332, 1335, 1347,  254, 1341, 1328, 1344, 1324, 1338,
  536.  
  537.      1324, 1321, 1321, 1327,  170,  212, 1321, 1332, 1317, 1323,
  538.      1327, 1328,    0, 1319, 1330,  279, 1329, 1324, 1304,  249,
  539.      1308, 1322, 1312,  226, 1305,  220, 1318, 1320,  271, 1299,
  540.      1307, 1304, 1293, 1302,  152,  222, 1307, 1302, 1305, 1293,
  541.      1296,  117,  255,  265, 1306, 1293, 1306,   83, 1299, 1298,
  542.      1413, 1413,  326,  343,  345, 1413, 1283, 1296, 1287, 1298,
  543.       339,    0,  353,    0,  367, 1413, 1314, 1295,  380,  401,
  544.      1413, 1312, 1293,  421,  396,  288, 1413, 1413, 1289,    0,
  545.      1284, 1279, 1283, 1293, 1290,  246, 1273, 1273, 1285, 1276,
  546.       187, 1287, 1284, 1267, 1283, 1281, 1278, 1269, 1276, 1262,
  547.  
  548.      1260, 1273, 1258, 1275,    0, 1272, 1259, 1267, 1264, 1268,
  549.      1269, 1262, 1259, 1247, 1246, 1260, 1263, 1250, 1259, 1246,
  550.      1253, 1243,  331, 1249, 1252, 1242, 1250, 1238, 1242, 1233,
  551.      1248, 1247, 1237, 1244,  294, 1227, 1246, 1229, 1227, 1238,
  552.      1227, 1222, 1220, 1222, 1233, 1218, 1220, 1217, 1229, 1228,
  553.      1231, 1212,  332, 1221, 1216, 1214, 1224, 1202,  340, 1221,
  554.      1223, 1211, 1203, 1202, 1206, 1218, 1201,    0,  437,  412,
  555.      1413,  453, 1413, 1229, 1210,  460,  451, 1413, 1413, 1227,
  556.      1208, 1413, 1192, 1203, 1202,    0, 1199,  406,    0,    0,
  557.      1192, 1190, 1190, 1191, 1186, 1195, 1183, 1201,  414, 1189,
  558.  
  559.       430,    0,    0, 1183, 1194, 1193, 1193,    0, 1177,  469,
  560.         0,    0, 1179,  472, 1187, 1188, 1178, 1172, 1171, 1172,
  561.      1171, 1171,  475, 1166,    0,    0, 1162, 1161, 1160, 1162,
  562.      1163, 1168, 1162, 1158, 1172, 1167, 1167, 1165, 1164, 1157,
  563.      1151, 1153, 1152, 1155, 1155, 1147, 1150, 1145, 1154, 1159,
  564.      1146, 1143, 1156, 1146,    0,    0, 1153, 1149,    0, 1140,
  565.      1140, 1146, 1136, 1144,  478, 1141,    0,    0,    0,    0,
  566.      1130, 1143, 1142, 1141, 1140, 1137, 1125,  492,  467, 1413,
  567.      1413, 1137, 1138, 1138,    0,    0,    0,    0, 1124,    0,
  568.      1133, 1123,    0, 1122, 1123, 1117, 1110, 1109, 1108, 1125,
  569.  
  570.         0,    0,    0, 1115,    0, 1111,    0,    0,    0,    0,
  571.         0,    0,    0,    0,    0, 1122,  487, 1121,    0,    0,
  572.      1119, 1115, 1111,    0,    0,    0, 1103,  500,  506,  509,
  573.      1108, 1104, 1110, 1100, 1098, 1112, 1096,    0, 1096, 1110,
  574.      1098, 1094, 1101, 1095, 1107, 1102,    0, 1100, 1097, 1101,
  575.      1084, 1082, 1085, 1092, 1098, 1093, 1092, 1079,    0, 1081,
  576.      1082,    0,    0,    0,    0, 1079, 1083,    0, 1076, 1076,
  577.      1131, 1075, 1078,    0, 1086, 1065, 1075, 1069,    0, 1062,
  578.      1062, 1076,  512,  515,  518,    0, 1078,    0,  522, 1092,
  579.      1091, 1090, 1055, 1054,    0, 1072, 1071, 1066,    0,    0,
  580.  
  581.         0,    0,    0,    0,    0,    0,    0,    0, 1054, 1068,
  582.      1054, 1051,    0,    0, 1057,  344,    0, 1053, 1061, 1060,
  583.         0, 1052, 1044,    0,    0,    0,    0, 1041,    0,    0,
  584.      1040, 1052,  525, 1044, 1051, 1050, 1047, 1041, 1038, 1033,
  585.       543, 1049, 1034, 1028, 1028, 1042, 1026, 1039,    0,    0,
  586.         0,    0,    0,    0,    0,    0,    0,    0,    0, 1031,
  587.      1056, 1055, 1054, 1019, 1018,  190,  519,    0, 1031, 1034,
  588.      1032, 1020, 1016,    0, 1029, 1026, 1025, 1014,    0, 1013,
  589.      1003, 1021, 1006, 1009,  549, 1014, 1017,    0, 1035, 1034,
  590.      1033,  998,  997,    0, 1012,  998,    0, 1009, 1001, 1003,
  591.  
  592.       567,  573, 1053,  996, 1000, 1003,    0,    0,    0,    0,
  593.      1024,  371,    0, 1000, 1003,  987,  995,  985, 1006,  995,
  594.       991,  992,  992,  991,  976,  579,  989,    0,  990,  978,
  595.       977,    0,    0,    0,  973, 1003, 1002, 1001,  966,  965,
  596.       961,  969,    0,  999,  574,    0,  975,  978,    0,  585,
  597.         0,  955,  963,  603, 1413,  624,    0,  630,  614, 1413,
  598.       963,    0,  959,  958,  979,  968,  966,  966,  953,  968,
  599.       951,  984,  963,  964,  959,  980,    0,    0,  976,  975,
  600.       974,  939,  938,    0,  938,    0,    0,    0,  377,  627,
  601.       962,  949,  952,  934,  947,  934,  933,  954,  943,  941,
  602.  
  603.       941,  959,  958,  957,  922,  921,    0,  926,  658,  665,
  604.       458,  943,  933,  921,  917,  918,  917,  950,  929,  926,
  605.       947,  928,  924,  926,  909,  906,  920,  906,  905,  938,
  606.       601,    0,  914,  917,  909,  900,  908,  898,  919,  908,
  607.       904,  906,  904,  904,  898,    0,  885,  882,  915,  892,
  608.       889,  908,  907,  653,    0,  878,  856, 1413,  461, 1413,
  609.       690,    0,  696,  871,  854,  836,    0,  853,  852,  835,
  610.       832,  833,  831,  823,  831,  821,  827,    0,  828,    0,
  611.       825,  824,  823,  844,  833,  830,  830,  813,  816,  829,
  612.       812,  845,  824,  825,  822,   24,  572,  132,  235,  269,
  613.  
  614.       258,  293,  315,  329,  339,  345,  388,  386,  395,  402,
  615.       482,  434,  436,  450,  453,  454,  486,    0,    0,  487,
  616.       510,  486,  517,  526,  506,  528,  513,  518,  554,  535,
  617.       551,  588,  568,  573,  581,  585,  570,  572,  588,  575,
  618.       594,  595,  605,  600,  591,  596,  608,    0,    0,  609,
  619.       610,  611,  661,  643,  645,  668,  661,  646,  644,    0,
  620.         0,  657,  658,  652,    0,  653,  651,    0,  652,  676,
  621.       677,  662,  661,  665,  666,    0,  660,  670,  662,  670,
  622.       693,  674,    0,    0,  673,  690,  691,    0,    0,  692,
  623.       693,  694,  695,  680,  679,  682,  683,  743,  744,  694,
  624.  
  625.       680,  681,  705,  706,    0,    0,  684,  686,  694,    0,
  626.         0,  695,  718,  692,  720,  715,  709,  696,  718,  716,
  627.       709,  698,  699,  700,  701,  709,    0,    0,  710,  770,
  628.       771,  772,  706,    0,    0,  728,  729,    0,    0,  733,
  629.       734,  729,    0,  730,  715,  739,    0,  717,  727,  750,
  630.         0,    0,    0,    0,  743,  744,  732,  789,  742,  744,
  631.       735,  736,  728,  729,  753,  754,    0,  753,  763,  737,
  632.       773,  737,  738,  742,  758,  807,  809,  744,  746,    0,
  633.         0,  765,  766,  756,  764,    0,  780,    0,    0,  775,
  634.       819,  820, 1413,  823,  822,    0,    0,  767,  768,  762,
  635.  
  636.       788,    0,  773,  833, 1413,  834,  787,  772,  773,    0,
  637.       792,  788,  792,  842,    0,    0,  787,  802,  847,  848,
  638.      1413,  785,  795,  852, 1413,    0,  792,  854,  857,  858,
  639.       859,  808,  809,  865,  866, 1413, 1413,  904,  910,  914,
  640.       918,  922,  926,  930,  934,  938,  942,  946,  948
  641.     } ;
  642.  
  643. static yyconst flex_int16_t yy_def[1050] =
  644.     {   0,
  645.      1037,    1, 1038, 1038, 1039, 1039, 1037, 1037, 1037, 1037,
  646.      1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037,
  647.      1037, 1037, 1037, 1040, 1037, 1040, 1040, 1040, 1040, 1040,
  648.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  649.      1040, 1040, 1040, 1040, 1040, 1037, 1037, 1037, 1037, 1037,
  650.      1037, 1037, 1037, 1037, 1041, 1037, 1037, 1037, 1037, 1037,
  651.      1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037,
  652.        19, 1037, 1037, 1037, 1042,   20, 1037, 1037, 1037, 1037,
  653.      1037, 1037, 1040, 1037, 1037, 1040, 1040, 1040, 1040, 1040,
  654.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  655.  
  656.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  657.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  658.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  659.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  660.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  661.      1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037,
  662.      1037, 1043, 1037, 1041, 1037, 1037, 1037, 1037,   70, 1037,
  663.      1037, 1037, 1037, 1037, 1044, 1042, 1037, 1037, 1040, 1040,
  664.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  665.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  666.  
  667.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  668.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  669.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  670.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  671.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  672.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  673.      1040, 1040, 1040, 1037, 1037, 1037, 1037, 1043, 1037, 1045,
  674.      1037, 1037, 1037, 1037, 1037, 1037, 1046, 1037, 1037, 1037,
  675.      1037, 1037, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  676.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  677.  
  678.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  679.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  680.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  681.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  682.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  683.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  684.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  685.      1040, 1040, 1040, 1037, 1037, 1037, 1037, 1037, 1047, 1037,
  686.      1037, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  687.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  688.  
  689.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  690.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  691.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  692.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  693.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  694.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  695.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1037,
  696.      1037, 1037, 1037, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  697.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  698.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  699.  
  700.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  701.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  702.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  703.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1037,
  704.      1037, 1037, 1037, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  705.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  706.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  707.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  708.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  709.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1037,
  710.  
  711.      1037, 1037, 1037, 1037, 1040, 1040, 1040, 1040, 1040, 1040,
  712.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  713.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  714.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  715.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  716.      1040, 1040, 1037, 1037, 1037, 1037, 1048, 1037, 1037, 1037,
  717.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  718.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  719.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  720.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  721.  
  722.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1037, 1037, 1037,
  723.      1048, 1037, 1037, 1037, 1040, 1040, 1040, 1040, 1040, 1040,
  724.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  725.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  726.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  727.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1037, 1037, 1037,
  728.      1037, 1049, 1037, 1037, 1037, 1037, 1040, 1040, 1040, 1040,
  729.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  730.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  731.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  732.  
  733.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  734.      1049, 1037, 1037, 1037, 1040, 1040, 1040, 1040, 1040, 1040,
  735.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  736.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  737.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  738.      1040, 1040, 1040, 1040, 1040, 1040, 1037, 1037, 1037, 1040,
  739.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  740.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  741.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  742.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1037, 1037, 1037,
  743.  
  744.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  745.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  746.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1037,
  747.      1037, 1037, 1037, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  748.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  749.      1040, 1040, 1040, 1040, 1040, 1040, 1037, 1037, 1037, 1037,
  750.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040,
  751.      1040, 1040, 1040, 1037, 1037, 1037, 1037, 1040, 1040, 1040,
  752.      1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1037,
  753.      1037, 1037, 1037, 1037, 1037, 1040, 1040, 1040, 1040, 1040,
  754.  
  755.      1040, 1040, 1037, 1037, 1037, 1037, 1037, 1040, 1040, 1040,
  756.      1040, 1037, 1037, 1037, 1040, 1040, 1040, 1037, 1037, 1037,
  757.      1037, 1040, 1037, 1037, 1037, 1040, 1037, 1037, 1037, 1037,
  758.      1037, 1037, 1037, 1037, 1037, 1037,    0, 1037, 1037, 1037,
  759.      1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037
  760.     } ;
  761.  
  762. static yyconst flex_int16_t yy_nxt[1484] =
  763.     {   0,
  764.         8,    9,   10,    9,   11,    8,   12,   13,    8,    8,
  765.        14,   15,   16,   17,   18,   19,   20,   20,   20,   20,
  766.        20,   20,    8,   21,   22,   23,   24,   24,   24,   24,
  767.        24,   24,   24,   24,   24,   24,   24,   24,   24,   24,
  768.        24,   24,   25,   24,   26,   27,   28,   29,   30,   31,
  769.        32,   33,   34,   24,   24,   35,   36,   37,   38,   39,
  770.        40,   41,   42,   43,   44,   45,   24,   24,   24,   46,
  771.        47,   58,  841,   58,   48,   49,   50,   51,   50,   49,
  772.        49,   49,   49,   49,   49,   49,   49,   49,   49,   52,
  773.        49,   53,   53,   53,   53,   53,   53,   54,   49,   49,
  774.  
  775.        49,   61,   64,   84,   66,   68,   68,   68,   68,   68,
  776.        68,   68,   78,   79,   86,   65,   67,   49,   62,   81,
  777.        82,   85,   89,   92,   90,  119,  123,   93,   91,   87,
  778.        88,  101,  121,  102,   94,  260,  122,   95,  261,  120,
  779.       124,  161,  103,  161,   49,   49,   50,   51,   50,   49,
  780.        49,   49,   49,   49,   49,   49,   49,   49,   49,   52,
  781.        49,   53,   53,   53,   53,   53,   53,   54,   49,   49,
  782.        49,  110,   96,  251,  252,  104,   97,  155,  156,  111,
  783.        98,  181,   99,  105,  126,  182,  106,   49,  100,  107,
  784.       113,  112,  844,  114,  129,  108,  242,  115,  116,  149,
  785.  
  786.       127,  142,  117,  128,  130,  118,  143,  151,  150,   58,
  787.       144,   58,  243,  145,   49,   70,  616,   71,   71,   71,
  788.        71,   71,   71,   72,  157,  201,  131,  138,  617, 1037,
  789.       139,  158,   73,  132,  133,  159,  202,  146,  134,  140,
  790.       160,  147,   74,   75,  135,  136,  141,  137,  295,  296,
  791.        73,  148,  152,  153, 1037,   58,  203,  154,  163,  163,
  792.       163,  163,  163,  163,  163,   74,  229,  244,   75,   70,
  793.       204,   76,   76,   76,   76,   76,   76,   76,  226,  845,
  794.       230,  245,  231,  174,  174,  227,   73,  175,  175,  175,
  795.       175,  175,  175,  175,  289,   70,   77,   72,   72,   72,
  796.  
  797.        72,   72,   72,   72,   73,  189,  221,  253,  290,  255,
  798.       190,  191,   73,  846,  222,  234,  254,  256,  847,   77,
  799.        68,   68,   68,   68,   68,   68,   68,  153,  282,   58,
  800.        73,  154,  235,  236,  213,  165,  166,  214,  215,  167,
  801.       161,  216,  161,  217,  155,  156,  155,  156,  327,  328,
  802.       329,  282,  341,  165,  166,  848,  342,  367,  368,  369,
  803.       168,  169,  169,  169,  169,  169,  169,  169,  163,  163,
  804.       163,  163,  163,  163,  163,  849,  170,  171,  269,  269,
  805.       172,  360,  270,  270,  270,  270,  270,  270,  270,  850,
  806.       361,  157,  579,  157,  170,  171,  580,  664,  158,  851,
  807.  
  808.       158,  173,  159,  736,  159,  852,  665,  160,  666,  160,
  809.       272,  273,  276,  276,  274,  737,  277,  277,  277,  277,
  810.       277,  277,  277,  386,  387,  388,  853,  279,  272,  273,
  811.       280,  397,  398,  399,  854,  275,  175,  175,  175,  175,
  812.       175,  175,  175,  166,  855,  279,  167,  401,  402,  403,
  813.       856,  281,  270,  270,  270,  270,  270,  270,  270,  654,
  814.       655,  166,  759,  760,  378,  378,  857,  168,  379,  379,
  815.       379,  379,  379,  379,  379,  277,  277,  277,  277,  277,
  816.       277,  277,  171,  759,  760,  172,  409,  410,  411,  413,
  817.       414,  415,  424,  425,  426,  463,  464,  465,  273,  858,
  818.  
  819.       171,  274,  859,  490,  491,  492,  173,  379,  379,  379,
  820.       379,  379,  379,  379,  493,  494,  273,  500,  501,  502,
  821.       860,  861,  275,  503,  504,  505,  506,  507,  508,  551,
  822.       552,  553,  554,  555,  556,  557,  558,  559,  561,  562,
  823.       563,  589,  590,  591,  541,  618,  862,  863,  864,  564,
  824.       565,  865,  592,  593,  619,  866,  620,  621,  601,  602,
  825.       602,  602,  602,  602,  602,  636,  637,  638,  654,  655,
  826.       867,  868,  869,  870,  654,  655,  639,  640,  871,  641,
  827.       872,  873,  656,  656,  656,  656,  656,  656,  658,  658,
  828.       658,  658,  658,  658,  658,  679,  680,  681,  842,  874,
  829.  
  830.       697,  702,  703,  704,  654,  655,  682,  683,  657,  698,
  831.       843,  699,  705,  706,  875,  659,  876,  877,  709,  710,
  832.       710,  710,  710,  710,  710,  654,  655,  783,  878,  879,
  833.       880,  654,  655,  657,  881,  882,  784,  883,  785,  656,
  834.       656,  656,  656,  656,  656,  658,  658,  658,  658,  658,
  835.       658,  658,  712,  738,  884,  885,  886,  887,  888,  759,
  836.       760,  713,  739,  889,  740,  741,  759,  760,  890,  891,
  837.       892,  893,  714,  761,  761,  761,  761,  761,  761,  806,
  838.       763,  763,  763,  763,  763,  763,  763,  894,  807,  895,
  839.       808,  759,  760,  896,  897,  898,  899,  759,  760,  762,
  840.  
  841.       900,  901,  902,  903,  904,  761,  761,  761,  761,  761,
  842.       761,  763,  763,  763,  763,  763,  763,  763,  905,  906,
  843.       907,  908,  909,  910,  762,  911,  912,  913,  914,  915,
  844.       916,  917,  918,  919,  920,  921,  922,  923,  924,  925,
  845.       926,  927,  928,  929,  930,  931,  933,  934,  935,  936,
  846.       937,  938,  932,  939,  940,  941,  942,  943,  944,  945,
  847.       946,  947,  948,  949,  950,  951,  952,  953,  954,  955,
  848.       956,  930,  931,  958,  960,  961,  962,  963,  964,  932,
  849.       965,  966,  967,  968,  969,  970,  971,  972,  973,  974,
  850.       958,  975,  977,  978,  979,  980,  981,  982,  983,  976,
  851.  
  852.       984,  985,  986,  987,  988,  989,  990,  991,  992,  996,
  853.       994,  997,  998,  999, 1000, 1001,  993,  995, 1002, 1003,
  854.      1004,  992,  957, 1006,  994, 1008, 1009, 1010, 1005,  993,
  855.       959,  995, 1011, 1012, 1004, 1006, 1013, 1015, 1016, 1017,
  856.      1018, 1019, 1005, 1020, 1014, 1022, 1023,  959, 1024, 1020,
  857.      1026, 1021, 1027, 1024, 1028, 1029, 1025, 1021, 1029, 1031,
  858.      1031, 1025, 1030, 1033, 1034, 1030, 1035, 1035,  840,  839,
  859.       838,  837,  836,  835, 1036, 1036,  834,  833,  832,  831,
  860.      1007,  830,  829,  828,  827,  826,  825,  824,  823,  822,
  861.       821,  820, 1007,  819,  818,  817,  816,  815,  814,  813,
  862.  
  863.       812,  810, 1032, 1032,   55,   55,   55,   55,   55,   55,
  864.        56,   56,   56,   56,   56,   56,   83,   83,   83,   83,
  865.       164,  164,  164,  164,  176,  176,  268,  809,  268,  268,
  866.       268,  268,  175,  805,  804,  175,  270,  803,  802,  270,
  867.       277,  801,  800,  277,  379,  799,  798,  379,  711,  711,
  868.       811,  811,  797,  796,  795,  794,  793,  792,  791,  790,
  869.       789,  788,  787,  786,  782,  781,  780,  779,  778,  777,
  870.       776,  775,  774,  773,  772,  771,  770,  769,  768,  767,
  871.       766,  765,  764,  758,  757,  756,  755,  754,  753,  752,
  872.       751,  750,  749,  748,  747,  746,  745,  744,  743,  742,
  873.  
  874.       735,  734,  733,  732,  731,  730,  729,  728,  727,  726,
  875.       725,  724,  723,  722,  721,  720,  719,  718,  717,  716,
  876.       715,  708,  707,  701,  700,  696,  695,  694,  693,  692,
  877.       691,  690,  689,  688,  687,  686,  685,  684,  678,  677,
  878.       676,  675,  674,  673,  672,  671,  670,  669,  668,  667,
  879.       663,  662,  661,  660,  659,  653,  652,  651,  650,  649,
  880.       648,  647,  646,  645,  644,  643,  642,  635,  634,  633,
  881.       632,  631,  630,  629,  628,  627,  626,  625,  624,  623,
  882.       622,  615,  614,  613,  612,  611,  610,  609,  608,  607,
  883.       606,  605,  604,  603,  600,  599,  598,  597,  596,  595,
  884.  
  885.       594,  588,  587,  586,  585,  584,  583,  582,  581,  578,
  886.       577,  576,  575,  574,  573,  572,  571,  570,  569,  568,
  887.       567,  566,  560,  550,  549,  548,  547,  546,  545,  544,
  888.       543,  542,  541,  540,  539,  538,  537,  536,  535,  534,
  889.       533,  532,  531,  530,  529,  528,  527,  526,  525,  524,
  890.       523,  522,  521,  520,  519,  518,  517,  516,  515,  514,
  891.       513,  512,  511,  510,  509,  499,  498,  497,  496,  495,
  892.       489,  488,  487,  486,  485,  484,  483,  482,  481,  480,
  893.       479,  478,  477,  476,  475,  474,  473,  472,  471,  470,
  894.       469,  468,  467,  466,  462,  461,  460,  459,  458,  457,
  895.  
  896.       456,  455,  454,  453,  452,  451,  450,  449,  448,  447,
  897.       446,  445,  444,  443,  442,  441,  440,  439,  438,  437,
  898.       436,  435,  434,  433,  432,  431,  430,  429,  428,  427,
  899.       423,  422,  421,  420,  419,  418,  417,  416,  412,  408,
  900.       407,  406,  405,  404,  400,  396,  395,  394,  393,  392,
  901.       391,  390,  389,  385,  384,  383,  382,  381,  381,  380,
  902.       380,  377,  376,  375,  374,  373,  372,  371,  370,  366,
  903.       365,  364,  363,  362,  359,  358,  357,  356,  355,  354,
  904.       353,  352,  351,  350,  349,  348,  347,  346,  345,  344,
  905.       343,  340,  339,  338,  337,  336,  335,  334,  333,  332,
  906.  
  907.       331,  330,  326,  325,  324,  323,  322,  321,  320,  319,
  908.       318,  317,  316,  315,  314,  313,  312,  311,  310,  309,
  909.       308,  307,  306,  305,  304,  303,  302,  301,  300,  299,
  910.       298,  297,  294,  293,  292,  291,  288,  287,  286,  285,
  911.       284,  283,  278,  278,  271,  271,  267,  266,  265,  264,
  912.       263,  262,  259,  258,  257,  250,  249,  248,  247,  246,
  913.       241,  240,  239,  238,  237,  233,  232,  228,  225,  224,
  914.       223,  220,  219,  218,  212,  211,  210,  209,  208,  207,
  915.       206,  205,  200,  199,  198,  197,  196,  195,  194,  193,
  916.       192,  188,  187,  186,  185,  184,  183,  180,  179,  178,
  917.  
  918.       177,  162,  125,  109,   80,   69,   63,   60,   59, 1037,
  919.        57,   57,    7, 1037, 1037, 1037, 1037, 1037, 1037, 1037,
  920.      1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037,
  921.      1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037,
  922.      1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037,
  923.      1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037,
  924.      1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037,
  925.      1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037,
  926.      1037, 1037, 1037
  927.     } ;
  928.  
  929. static yyconst flex_int16_t yy_chk[1484] =
  930.     {   0,
  931.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  932.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  933.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  934.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  935.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  936.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  937.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  938.         2,    9,  796,    9,    2,    3,    3,    3,    3,    3,
  939.         3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
  940.         3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
  941.  
  942.         3,   13,   15,   25,   16,   17,   17,   17,   17,   17,
  943.        17,   17,   21,   21,   26,   15,   16,    3,   13,   23,
  944.        23,   25,   27,   28,   27,   35,   37,   28,   27,   26,
  945.        26,   30,   36,   30,   28,  148,   36,   28,  148,   35,
  946.        37,   50,   30,   50,    3,    4,    4,    4,    4,    4,
  947.         4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
  948.         4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
  949.         4,   33,   29,  142,  142,   31,   29,   48,   48,   33,
  950.        29,   88,   29,   31,   39,   88,   31,    4,   29,   31,
  951.        34,   33,  798,   34,   40,   31,  135,   34,   34,   45,
  952.  
  953.        39,   43,   34,   39,   40,   34,   43,   46,   45,   58,
  954.        43,   58,  135,   43,    4,   19,  566,   19,   19,   19,
  955.        19,   19,   19,   19,   48,  105,   41,   42,  566,   71,
  956.        42,   48,   19,   41,   41,   48,  105,   44,   41,   42,
  957.        48,   44,   19,   19,   41,   41,   42,   41,  191,  191,
  958.        19,   44,   46,   47,   71,   47,  106,   47,   53,   53,
  959.        53,   53,   53,   53,   53,   19,  126,  136,   19,   20,
  960.       106,   20,   20,   20,   20,   20,   20,   20,  124,  799,
  961.       126,  136,  126,   73,   73,  124,   20,   73,   73,   73,
  962.        73,   73,   73,   73,  186,   72,   20,   72,   72,   72,
  963.  
  964.        72,   72,   72,   72,   20,   95,  120,  143,  186,  144,
  965.        95,   95,   72,  800,  120,  129,  143,  144,  801,   20,
  966.        68,   68,   68,   68,   68,   68,   68,  153,  176,  153,
  967.        72,  153,  129,  129,  116,   68,   68,  116,  116,   68,
  968.       161,  116,  161,  116,  154,  154,  155,  155,  223,  223,
  969.       223,  176,  235,   68,   68,  802,  235,  259,  259,  259,
  970.        68,   70,   70,   70,   70,   70,   70,   70,  163,  163,
  971.       163,  163,  163,  163,  163,  803,   70,   70,  165,  165,
  972.        70,  253,  165,  165,  165,  165,  165,  165,  165,  804,
  973.       253,  154,  516,  155,   70,   70,  516,  612,  154,  805,
  974.  
  975.       155,   70,  154,  689,  155,  806,  612,  154,  612,  155,
  976.       169,  169,  170,  170,  169,  689,  170,  170,  170,  170,
  977.       170,  170,  170,  288,  288,  288,  807,  175,  169,  169,
  978.       175,  299,  299,  299,  808,  169,  174,  174,  174,  174,
  979.       174,  174,  174,  270,  809,  175,  270,  301,  301,  301,
  980.       810,  175,  269,  269,  269,  269,  269,  269,  269,  711,
  981.       711,  270,  759,  759,  272,  272,  812,  270,  272,  272,
  982.       272,  272,  272,  272,  272,  276,  276,  276,  276,  276,
  983.       276,  276,  277,  811,  811,  277,  310,  310,  310,  314,
  984.       314,  314,  323,  323,  323,  365,  365,  365,  379,  813,
  985.  
  986.       277,  379,  814,  417,  417,  417,  277,  378,  378,  378,
  987.       378,  378,  378,  378,  417,  417,  379,  428,  428,  428,
  988.       815,  816,  379,  429,  429,  429,  430,  430,  430,  483,
  989.       483,  483,  484,  484,  484,  485,  485,  485,  489,  489,
  990.       489,  533,  533,  533,  541,  567,  817,  820,  821,  489,
  991.       489,  822,  533,  533,  567,  823,  567,  567,  541,  541,
  992.       541,  541,  541,  541,  541,  585,  585,  585,  601,  601,
  993.       824,  825,  826,  827,  602,  602,  585,  585,  828,  585,
  994.       829,  830,  601,  601,  601,  601,  601,  601,  602,  602,
  995.       602,  602,  602,  602,  602,  626,  626,  626,  797,  831,
  996.  
  997.       645,  650,  650,  650,  654,  654,  626,  626,  601,  645,
  998.       797,  645,  650,  650,  832,  659,  833,  834,  654,  654,
  999.       654,  654,  654,  654,  654,  656,  656,  731,  835,  836,
  1000.       837,  658,  658,  601,  838,  839,  731,  840,  731,  656,
  1001.       656,  656,  656,  656,  656,  658,  658,  658,  658,  658,
  1002.       658,  658,  659,  690,  841,  842,  843,  844,  845,  709,
  1003.       709,  659,  690,  846,  690,  690,  710,  710,  847,  850,
  1004.       851,  852,  659,  709,  709,  709,  709,  709,  709,  754,
  1005.       710,  710,  710,  710,  710,  710,  710,  853,  754,  854,
  1006.       754,  761,  761,  855,  856,  857,  858,  763,  763,  709,
  1007.  
  1008.       859,  862,  863,  864,  866,  761,  761,  761,  761,  761,
  1009.       761,  763,  763,  763,  763,  763,  763,  763,  867,  869,
  1010.       870,  871,  872,  873,  709,  874,  875,  877,  878,  879,
  1011.       880,  881,  882,  885,  886,  887,  890,  891,  892,  893,
  1012.       894,  895,  896,  897,  898,  899,  900,  901,  902,  903,
  1013.       904,  907,  899,  908,  909,  912,  913,  914,  915,  916,
  1014.       917,  918,  919,  920,  921,  922,  923,  924,  925,  926,
  1015.       929,  930,  931,  932,  933,  936,  937,  940,  941,  931,
  1016.       942,  944,  945,  946,  948,  949,  950,  955,  956,  957,
  1017.       958,  959,  960,  961,  962,  963,  964,  965,  966,  959,
  1018.  
  1019.       968,  969,  970,  971,  972,  973,  974,  975,  976,  978,
  1020.       977,  979,  982,  983,  984,  985,  976,  977,  987,  990,
  1021.       991,  992,  930,  995,  994,  998,  999, 1000,  991,  992,
  1022.       932,  994, 1001, 1003, 1004, 1006, 1007, 1008, 1009, 1011,
  1023.      1012, 1013, 1004, 1014, 1007, 1017, 1018,  958, 1019, 1020,
  1024.      1022, 1014, 1023, 1024, 1027, 1028, 1019, 1020, 1029, 1030,
  1025.      1031, 1024, 1028, 1032, 1033, 1029, 1034, 1035,  795,  794,
  1026.       793,  792,  791,  790, 1034, 1035,  789,  788,  787,  786,
  1027.       995,  785,  784,  783,  782,  781,  779,  777,  776,  775,
  1028.       774,  773, 1006,  772,  771,  770,  769,  768,  766,  765,
  1029.  
  1030.       764,  757, 1030, 1031, 1038, 1038, 1038, 1038, 1038, 1038,
  1031.      1039, 1039, 1039, 1039, 1039, 1039, 1040, 1040, 1040, 1040,
  1032.      1041, 1041, 1041, 1041, 1042, 1042, 1043,  756, 1043, 1043,
  1033.      1043, 1043, 1044,  753,  752, 1044, 1045,  751,  750, 1045,
  1034.      1046,  749,  748, 1046, 1047,  747,  745, 1047, 1048, 1048,
  1035.      1049, 1049,  744,  743,  742,  741,  740,  739,  738,  737,
  1036.       736,  735,  734,  733,  730,  729,  728,  727,  726,  725,
  1037.       724,  723,  722,  721,  720,  719,  718,  717,  716,  715,
  1038.       714,  713,  712,  708,  706,  705,  704,  703,  702,  701,
  1039.       700,  699,  698,  697,  696,  695,  694,  693,  692,  691,
  1040.  
  1041.       685,  683,  682,  681,  680,  679,  676,  675,  674,  673,
  1042.       672,  671,  670,  669,  668,  667,  666,  665,  664,  663,
  1043.       661,  653,  652,  648,  647,  644,  642,  641,  640,  639,
  1044.       638,  637,  636,  635,  631,  630,  629,  627,  625,  624,
  1045.       623,  622,  621,  620,  619,  618,  617,  616,  615,  614,
  1046.       611,  606,  605,  604,  603,  600,  599,  598,  596,  595,
  1047.       593,  592,  591,  590,  589,  587,  586,  584,  583,  582,
  1048.       581,  580,  578,  577,  576,  575,  573,  572,  571,  570,
  1049.       569,  565,  564,  563,  562,  561,  560,  548,  547,  546,
  1050.       545,  544,  543,  542,  540,  539,  538,  537,  536,  535,
  1051.  
  1052.       534,  532,  531,  528,  523,  522,  520,  519,  518,  515,
  1053.       512,  511,  510,  509,  498,  497,  496,  494,  493,  492,
  1054.       491,  490,  487,  482,  481,  480,  478,  477,  476,  475,
  1055.       473,  472,  471,  470,  469,  467,  466,  461,  460,  458,
  1056.       457,  456,  455,  454,  453,  452,  451,  450,  449,  448,
  1057.       446,  445,  444,  443,  442,  441,  440,  439,  437,  436,
  1058.       435,  434,  433,  432,  431,  427,  423,  422,  421,  418,
  1059.       416,  406,  404,  400,  399,  398,  397,  396,  395,  394,
  1060.       392,  391,  389,  384,  383,  382,  377,  376,  375,  374,
  1061.       373,  372,  371,  366,  364,  363,  362,  361,  360,  358,
  1062.  
  1063.       357,  354,  353,  352,  351,  350,  349,  348,  347,  346,
  1064.       345,  344,  343,  342,  341,  340,  339,  338,  337,  336,
  1065.       335,  334,  333,  332,  331,  330,  329,  328,  327,  324,
  1066.       322,  321,  320,  319,  318,  317,  316,  315,  313,  309,
  1067.       307,  306,  305,  304,  300,  298,  297,  296,  295,  294,
  1068.       293,  292,  291,  287,  285,  284,  283,  281,  280,  275,
  1069.       274,  267,  266,  265,  264,  263,  262,  261,  260,  258,
  1070.       257,  256,  255,  254,  252,  251,  250,  249,  248,  247,
  1071.       246,  245,  244,  243,  242,  241,  240,  239,  238,  237,
  1072.       236,  234,  233,  232,  231,  230,  229,  228,  227,  226,
  1073.  
  1074.       225,  224,  222,  221,  220,  219,  218,  217,  216,  215,
  1075.       214,  213,  212,  211,  210,  209,  208,  207,  206,  204,
  1076.       203,  202,  201,  200,  199,  198,  197,  196,  195,  194,
  1077.       193,  192,  190,  189,  188,  187,  185,  184,  183,  182,
  1078.       181,  179,  173,  172,  168,  167,  160,  159,  158,  157,
  1079.       150,  149,  147,  146,  145,  141,  140,  139,  138,  137,
  1080.       134,  133,  132,  131,  130,  128,  127,  125,  123,  122,
  1081.       121,  119,  118,  117,  115,  114,  112,  111,  110,  109,
  1082.       108,  107,  104,  103,  102,  101,  100,   99,   98,   97,
  1083.        96,   94,   93,   92,   91,   90,   89,   87,   86,   82,
  1084.  
  1085.        78,   52,   38,   32,   22,   18,   14,   12,   11,    7,
  1086.         6,    5, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037,
  1087.      1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037,
  1088.      1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037,
  1089.      1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037,
  1090.      1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037,
  1091.      1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037,
  1092.      1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037,
  1093.      1037, 1037, 1037
  1094.     } ;
  1095.  
  1096. /* The intent behind this definition is that it'll catch
  1097.  * any uses of REJECT which flex missed.
  1098.  */
  1099. #define REJECT reject_used_but_not_detected
  1100. #define yymore() yymore_used_but_not_detected
  1101. #define YY_MORE_ADJ 0
  1102. #define YY_RESTORE_YY_MORE_OFFSET
  1103. #line 1 "../../../src/glsl/glsl_lexer.ll"
  1104. #line 2 "../../../src/glsl/glsl_lexer.ll"
  1105. /*
  1106.  * Copyright © 2008, 2009 Intel Corporation
  1107.  *
  1108.  * Permission is hereby granted, free of charge, to any person obtaining a
  1109.  * copy of this software and associated documentation files (the "Software"),
  1110.  * to deal in the Software without restriction, including without limitation
  1111.  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  1112.  * and/or sell copies of the Software, and to permit persons to whom the
  1113.  * Software is furnished to do so, subject to the following conditions:
  1114.  *
  1115.  * The above copyright notice and this permission notice (including the next
  1116.  * paragraph) shall be included in all copies or substantial portions of the
  1117.  * Software.
  1118.  *
  1119.  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  1120.  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  1121.  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
  1122.  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  1123.  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  1124.  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  1125.  * DEALINGS IN THE SOFTWARE.
  1126.  */
  1127. #include <ctype.h>
  1128. #include <limits.h>
  1129. #include "util/strtod.h"
  1130. #include "ast.h"
  1131. #include "glsl_parser_extras.h"
  1132. #include "glsl_parser.h"
  1133.  
  1134. static int classify_identifier(struct _mesa_glsl_parse_state *, const char *);
  1135.  
  1136. #ifdef _MSC_VER
  1137. #define YY_NO_UNISTD_H
  1138. #endif
  1139.  
  1140. #define YY_USER_ACTION                                          \
  1141.    do {                                                         \
  1142.       yylloc->first_column = yycolumn + 1;                      \
  1143.       yylloc->first_line = yylloc->last_line = yylineno + 1;    \
  1144.       yycolumn += yyleng;                                       \
  1145.       yylloc->last_column = yycolumn + 1;                       \
  1146.    } while(0);
  1147.  
  1148. #define YY_USER_INIT yylineno = 0; yycolumn = 0; yylloc->source = 0;
  1149.  
  1150. /* A macro for handling reserved words and keywords across language versions.
  1151.  *
  1152.  * Certain words start out as identifiers, become reserved words in
  1153.  * later language revisions, and finally become language keywords.
  1154.  * This may happen at different times in desktop GLSL and GLSL ES.
  1155.  *
  1156.  * For example, consider the following lexer rule:
  1157.  * samplerBuffer       KEYWORD(130, 0, 140, 0, SAMPLERBUFFER)
  1158.  *
  1159.  * This means that "samplerBuffer" will be treated as:
  1160.  * - a keyword (SAMPLERBUFFER token)         ...in GLSL >= 1.40
  1161.  * - a reserved word - error                 ...in GLSL >= 1.30
  1162.  * - an identifier                           ...in GLSL <  1.30 or GLSL ES
  1163.  */
  1164. #define KEYWORD(reserved_glsl, reserved_glsl_es,                        \
  1165.                 allowed_glsl, allowed_glsl_es, token)                   \
  1166.    KEYWORD_WITH_ALT(reserved_glsl, reserved_glsl_es,                    \
  1167.                     allowed_glsl, allowed_glsl_es, false, token)
  1168.  
  1169. /**
  1170.  * Like the KEYWORD macro, but the word is also treated as a keyword
  1171.  * if the given boolean expression is true.
  1172.  */
  1173. #define KEYWORD_WITH_ALT(reserved_glsl, reserved_glsl_es,               \
  1174.                          allowed_glsl, allowed_glsl_es,                 \
  1175.                          alt_expr, token)                               \
  1176.    do {                                                                 \
  1177.       if (yyextra->is_version(allowed_glsl, allowed_glsl_es)            \
  1178.           || (alt_expr)) {                                              \
  1179.          return token;                                                  \
  1180.       } else if (yyextra->is_version(reserved_glsl,                     \
  1181.                                      reserved_glsl_es)) {               \
  1182.          _mesa_glsl_error(yylloc, yyextra,                              \
  1183.                           "illegal use of reserved word `%s'", yytext); \
  1184.          return ERROR_TOK;                                              \
  1185.       } else {                                                          \
  1186.          void *mem_ctx = yyextra;                                       \
  1187.          yylval->identifier = ralloc_strdup(mem_ctx, yytext);           \
  1188.          return classify_identifier(yyextra, yytext);                   \
  1189.       }                                                                 \
  1190.    } while (0)
  1191.  
  1192. /**
  1193.  * A macro for handling keywords that have been present in GLSL since
  1194.  * its origin, but were changed into reserved words in GLSL 3.00 ES.
  1195.  */
  1196. #define DEPRECATED_ES_KEYWORD(token)                                    \
  1197.    do {                                                                 \
  1198.       if (yyextra->is_version(0, 300)) {                                \
  1199.          _mesa_glsl_error(yylloc, yyextra,                              \
  1200.                           "illegal use of reserved word `%s'", yytext); \
  1201.          return ERROR_TOK;                                              \
  1202.       } else {                                                          \
  1203.          return token;                                                  \
  1204.       }                                                                 \
  1205.    } while (0)
  1206.  
  1207. static int
  1208. literal_integer(char *text, int len, struct _mesa_glsl_parse_state *state,
  1209.                 YYSTYPE *lval, YYLTYPE *lloc, int base)
  1210. {
  1211.    bool is_uint = (text[len - 1] == 'u' ||
  1212.                    text[len - 1] == 'U');
  1213.    const char *digits = text;
  1214.  
  1215.    /* Skip "0x" */
  1216.    if (base == 16)
  1217.       digits += 2;
  1218.  
  1219. #ifdef _MSC_VER
  1220.    unsigned __int64 value = _strtoui64(digits, NULL, base);
  1221. #else
  1222.    unsigned long long value = strtoull(digits, NULL, base);
  1223. #endif
  1224.  
  1225.    lval->n = (int)value;
  1226.  
  1227.    if (value > UINT_MAX) {
  1228.       /* Note that signed 0xffffffff is valid, not out of range! */
  1229.       if (state->is_version(130, 300)) {
  1230.          _mesa_glsl_error(lloc, state,
  1231.                           "literal value `%s' out of range", text);
  1232.       } else {
  1233.          _mesa_glsl_warning(lloc, state,
  1234.                             "literal value `%s' out of range", text);
  1235.       }
  1236.    } else if (base == 10 && !is_uint && (unsigned)value > (unsigned)INT_MAX + 1) {
  1237.       /* Tries to catch unintentionally providing a negative value.
  1238.        * Note that -2147483648 is parsed as -(2147483648), so we don't
  1239.        * want to warn for INT_MAX.
  1240.        */
  1241.       _mesa_glsl_warning(lloc, state,
  1242.                          "signed literal value `%s' is interpreted as %d",
  1243.                          text, lval->n);
  1244.    }
  1245.    return is_uint ? UINTCONSTANT : INTCONSTANT;
  1246. }
  1247.  
  1248. #define LITERAL_INTEGER(base) \
  1249.    literal_integer(yytext, yyleng, yyextra, yylval, yylloc, base)
  1250.  
  1251. /* Note: When adding any start conditions to this list, you must also
  1252. * update the "Internal compiler error" catch-all rule near the end of
  1253. * this file. */
  1254.  
  1255. #line 1256 "glsl_lexer.cpp"
  1256.  
  1257. #define INITIAL 0
  1258. #define PP 1
  1259. #define PRAGMA 2
  1260.  
  1261. #ifndef YY_NO_UNISTD_H
  1262. /* Special case for "unistd.h", since it is non-ANSI. We include it way
  1263.  * down here because we want the user's section 1 to have been scanned first.
  1264.  * The user has a chance to override it with an option.
  1265.  */
  1266. #include <unistd.h>
  1267. #endif
  1268.  
  1269. #define YY_EXTRA_TYPE struct _mesa_glsl_parse_state *
  1270.  
  1271. /* Holds the entire state of the reentrant scanner. */
  1272. struct yyguts_t
  1273.     {
  1274.  
  1275.     /* User-defined. Not touched by flex. */
  1276.     YY_EXTRA_TYPE yyextra_r;
  1277.  
  1278.     /* The rest are the same as the globals declared in the non-reentrant scanner. */
  1279.     FILE *yyin_r, *yyout_r;
  1280.     size_t yy_buffer_stack_top; /**< index of top of stack. */
  1281.     size_t yy_buffer_stack_max; /**< capacity of stack. */
  1282.     YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
  1283.     char yy_hold_char;
  1284.     yy_size_t yy_n_chars;
  1285.     yy_size_t yyleng_r;
  1286.     char *yy_c_buf_p;
  1287.     int yy_init;
  1288.     int yy_start;
  1289.     int yy_did_buffer_switch_on_eof;
  1290.     int yy_start_stack_ptr;
  1291.     int yy_start_stack_depth;
  1292.     int *yy_start_stack;
  1293.     yy_state_type yy_last_accepting_state;
  1294.     char* yy_last_accepting_cpos;
  1295.  
  1296.     int yylineno_r;
  1297.     int yy_flex_debug_r;
  1298.  
  1299.     char *yytext_r;
  1300.     int yy_more_flag;
  1301.     int yy_more_len;
  1302.  
  1303.     YYSTYPE * yylval_r;
  1304.  
  1305.     YYLTYPE * yylloc_r;
  1306.  
  1307.     }; /* end struct yyguts_t */
  1308.  
  1309. static int yy_init_globals (yyscan_t yyscanner );
  1310.  
  1311.     /* This must go here because YYSTYPE and YYLTYPE are included
  1312.      * from bison output in section 1.*/
  1313.     #    define yylval yyg->yylval_r
  1314.    
  1315.     #    define yylloc yyg->yylloc_r
  1316.    
  1317. int _mesa_glsl_lexer_lex_init (yyscan_t* scanner);
  1318.  
  1319. int _mesa_glsl_lexer_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
  1320.  
  1321. /* Accessor methods to globals.
  1322.    These are made visible to non-reentrant scanners for convenience. */
  1323.  
  1324. int _mesa_glsl_lexer_lex_destroy (yyscan_t yyscanner );
  1325.  
  1326. int _mesa_glsl_lexer_get_debug (yyscan_t yyscanner );
  1327.  
  1328. void _mesa_glsl_lexer_set_debug (int debug_flag ,yyscan_t yyscanner );
  1329.  
  1330. YY_EXTRA_TYPE _mesa_glsl_lexer_get_extra (yyscan_t yyscanner );
  1331.  
  1332. void _mesa_glsl_lexer_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
  1333.  
  1334. FILE *_mesa_glsl_lexer_get_in (yyscan_t yyscanner );
  1335.  
  1336. void _mesa_glsl_lexer_set_in  (FILE * in_str ,yyscan_t yyscanner );
  1337.  
  1338. FILE *_mesa_glsl_lexer_get_out (yyscan_t yyscanner );
  1339.  
  1340. void _mesa_glsl_lexer_set_out  (FILE * out_str ,yyscan_t yyscanner );
  1341.  
  1342. yy_size_t _mesa_glsl_lexer_get_leng (yyscan_t yyscanner );
  1343.  
  1344. char *_mesa_glsl_lexer_get_text (yyscan_t yyscanner );
  1345.  
  1346. int _mesa_glsl_lexer_get_lineno (yyscan_t yyscanner );
  1347.  
  1348. void _mesa_glsl_lexer_set_lineno (int line_number ,yyscan_t yyscanner );
  1349.  
  1350. int _mesa_glsl_lexer_get_column  (yyscan_t yyscanner );
  1351.  
  1352. void _mesa_glsl_lexer_set_column (int column_no ,yyscan_t yyscanner );
  1353.  
  1354. YYSTYPE * _mesa_glsl_lexer_get_lval (yyscan_t yyscanner );
  1355.  
  1356. void _mesa_glsl_lexer_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
  1357.  
  1358.        YYLTYPE *_mesa_glsl_lexer_get_lloc (yyscan_t yyscanner );
  1359.    
  1360.         void _mesa_glsl_lexer_set_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
  1361.    
  1362. /* Macros after this point can all be overridden by user definitions in
  1363.  * section 1.
  1364.  */
  1365.  
  1366. #ifndef YY_SKIP_YYWRAP
  1367. #ifdef __cplusplus
  1368. extern "C" int _mesa_glsl_lexer_wrap (yyscan_t yyscanner );
  1369. #else
  1370. extern int _mesa_glsl_lexer_wrap (yyscan_t yyscanner );
  1371. #endif
  1372. #endif
  1373.  
  1374. #ifndef yytext_ptr
  1375. static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
  1376. #endif
  1377.  
  1378. #ifdef YY_NEED_STRLEN
  1379. static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
  1380. #endif
  1381.  
  1382. #ifndef YY_NO_INPUT
  1383.  
  1384. #ifdef __cplusplus
  1385. static int yyinput (yyscan_t yyscanner );
  1386. #else
  1387. static int input (yyscan_t yyscanner );
  1388. #endif
  1389.  
  1390. #endif
  1391.  
  1392. /* Amount of stuff to slurp up with each read. */
  1393. #ifndef YY_READ_BUF_SIZE
  1394. #define YY_READ_BUF_SIZE 8192
  1395. #endif
  1396.  
  1397. /* Copy whatever the last rule matched to the standard output. */
  1398. #ifndef ECHO
  1399. /* This used to be an fputs(), but since the string might contain NUL's,
  1400.  * we now use fwrite().
  1401.  */
  1402. #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
  1403. #endif
  1404.  
  1405. /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
  1406.  * is returned in "result".
  1407.  */
  1408. #ifndef YY_INPUT
  1409. #define YY_INPUT(buf,result,max_size) \
  1410.         if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
  1411.                 { \
  1412.                 int c = '*'; \
  1413.                 size_t n; \
  1414.                 for ( n = 0; n < max_size && \
  1415.                              (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
  1416.                         buf[n] = (char) c; \
  1417.                 if ( c == '\n' ) \
  1418.                         buf[n++] = (char) c; \
  1419.                 if ( c == EOF && ferror( yyin ) ) \
  1420.                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
  1421.                 result = n; \
  1422.                 } \
  1423.         else \
  1424.                 { \
  1425.                 errno=0; \
  1426.                 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
  1427.                         { \
  1428.                         if( errno != EINTR) \
  1429.                                 { \
  1430.                                 YY_FATAL_ERROR( "input in flex scanner failed" ); \
  1431.                                 break; \
  1432.                                 } \
  1433.                         errno=0; \
  1434.                         clearerr(yyin); \
  1435.                         } \
  1436.                 }\
  1437. \
  1438.  
  1439. #endif
  1440.  
  1441. /* No semi-colon after return; correct usage is to write "yyterminate();" -
  1442.  * we don't want an extra ';' after the "return" because that will cause
  1443.  * some compilers to complain about unreachable statements.
  1444.  */
  1445. #ifndef yyterminate
  1446. #define yyterminate() return YY_NULL
  1447. #endif
  1448.  
  1449. /* Number of entries by which start-condition stack grows. */
  1450. #ifndef YY_START_STACK_INCR
  1451. #define YY_START_STACK_INCR 25
  1452. #endif
  1453.  
  1454. /* Report a fatal error. */
  1455. #ifndef YY_FATAL_ERROR
  1456. #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
  1457. #endif
  1458.  
  1459. /* end tables serialization structures and prototypes */
  1460.  
  1461. /* Default declaration of generated scanner - a define so the user can
  1462.  * easily add parameters.
  1463.  */
  1464. #ifndef YY_DECL
  1465. #define YY_DECL_IS_OURS 1
  1466.  
  1467. extern int _mesa_glsl_lexer_lex \
  1468.                (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner);
  1469.  
  1470. #define YY_DECL int _mesa_glsl_lexer_lex \
  1471.                (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
  1472. #endif /* !YY_DECL */
  1473.  
  1474. /* Code executed at the beginning of each rule, after yytext and yyleng
  1475.  * have been set up.
  1476.  */
  1477. #ifndef YY_USER_ACTION
  1478. #define YY_USER_ACTION
  1479. #endif
  1480.  
  1481. /* Code executed at the end of each rule. */
  1482. #ifndef YY_BREAK
  1483. #define YY_BREAK break;
  1484. #endif
  1485.  
  1486. #define YY_RULE_SETUP \
  1487.         if ( yyleng > 0 ) \
  1488.                 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
  1489.                                 (yytext[yyleng - 1] == '\n'); \
  1490.         YY_USER_ACTION
  1491.  
  1492. /** The main scanner function which does all the work.
  1493.  */
  1494. YY_DECL
  1495. {
  1496.         register yy_state_type yy_current_state;
  1497.         register char *yy_cp, *yy_bp;
  1498.         register int yy_act;
  1499.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  1500.  
  1501.     yylval = yylval_param;
  1502.  
  1503.     yylloc = yylloc_param;
  1504.  
  1505.         if ( !yyg->yy_init )
  1506.                 {
  1507.                 yyg->yy_init = 1;
  1508.  
  1509. #ifdef YY_USER_INIT
  1510.                 YY_USER_INIT;
  1511. #endif
  1512.  
  1513.                 if ( ! yyg->yy_start )
  1514.                         yyg->yy_start = 1;      /* first start state */
  1515.  
  1516.                 if ( ! yyin )
  1517.                         yyin = stdin;
  1518.  
  1519.                 if ( ! yyout )
  1520.                         yyout = stdout;
  1521.  
  1522.                 if ( ! YY_CURRENT_BUFFER ) {
  1523.                         _mesa_glsl_lexer_ensure_buffer_stack (yyscanner);
  1524.                         YY_CURRENT_BUFFER_LVALUE =
  1525.                                 _mesa_glsl_lexer__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
  1526.                 }
  1527.  
  1528.                 _mesa_glsl_lexer__load_buffer_state(yyscanner );
  1529.                 }
  1530.  
  1531.         {
  1532. #line 169 "../../../src/glsl/glsl_lexer.ll"
  1533.  
  1534.  
  1535. #line 1536 "glsl_lexer.cpp"
  1536.  
  1537.         while ( 1 )             /* loops until end-of-file is reached */
  1538.                 {
  1539.                 yy_cp = yyg->yy_c_buf_p;
  1540.  
  1541.                 /* Support of yytext. */
  1542.                 *yy_cp = yyg->yy_hold_char;
  1543.  
  1544.                 /* yy_bp points to the position in yy_ch_buf of the start of
  1545.                  * the current run.
  1546.                  */
  1547.                 yy_bp = yy_cp;
  1548.  
  1549.                 yy_current_state = yyg->yy_start;
  1550.                 yy_current_state += YY_AT_BOL();
  1551. yy_match:
  1552.                 do
  1553.                         {
  1554.                         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
  1555.                         if ( yy_accept[yy_current_state] )
  1556.                                 {
  1557.                                 yyg->yy_last_accepting_state = yy_current_state;
  1558.                                 yyg->yy_last_accepting_cpos = yy_cp;
  1559.                                 }
  1560.                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1561.                                 {
  1562.                                 yy_current_state = (int) yy_def[yy_current_state];
  1563.                                 if ( yy_current_state >= 1038 )
  1564.                                         yy_c = yy_meta[(unsigned int) yy_c];
  1565.                                 }
  1566.                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  1567.                         ++yy_cp;
  1568.                         }
  1569.                 while ( yy_current_state != 1037 );
  1570.                 yy_cp = yyg->yy_last_accepting_cpos;
  1571.                 yy_current_state = yyg->yy_last_accepting_state;
  1572.  
  1573. yy_find_action:
  1574.                 yy_act = yy_accept[yy_current_state];
  1575.  
  1576.                 YY_DO_BEFORE_ACTION;
  1577.  
  1578. do_action:      /* This label is used only to access EOF actions. */
  1579.  
  1580.                 switch ( yy_act )
  1581.         { /* beginning of action switch */
  1582.                         case 0: /* must back up */
  1583.                         /* undo the effects of YY_DO_BEFORE_ACTION */
  1584.                         *yy_cp = yyg->yy_hold_char;
  1585.                         yy_cp = yyg->yy_last_accepting_cpos;
  1586.                         yy_current_state = yyg->yy_last_accepting_state;
  1587.                         goto yy_find_action;
  1588.  
  1589. case 1:
  1590. YY_RULE_SETUP
  1591. #line 171 "../../../src/glsl/glsl_lexer.ll"
  1592. ;
  1593.         YY_BREAK
  1594. /* Preprocessor tokens. */
  1595. case 2:
  1596. *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
  1597. yyg->yy_c_buf_p = yy_cp -= 1;
  1598. YY_DO_BEFORE_ACTION; /* set up yytext again */
  1599. YY_RULE_SETUP
  1600. #line 174 "../../../src/glsl/glsl_lexer.ll"
  1601. ;
  1602.         YY_BREAK
  1603. case 3:
  1604. YY_RULE_SETUP
  1605. #line 175 "../../../src/glsl/glsl_lexer.ll"
  1606. { BEGIN PP; return VERSION_TOK; }
  1607.         YY_BREAK
  1608. case 4:
  1609. YY_RULE_SETUP
  1610. #line 176 "../../../src/glsl/glsl_lexer.ll"
  1611. { BEGIN PP; return EXTENSION; }
  1612.         YY_BREAK
  1613. case 5:
  1614. *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
  1615. yyg->yy_c_buf_p = yy_cp -= 1;
  1616. YY_DO_BEFORE_ACTION; /* set up yytext again */
  1617. YY_RULE_SETUP
  1618. #line 177 "../../../src/glsl/glsl_lexer.ll"
  1619. {
  1620.                                    /* Eat characters until the first digit is
  1621.                                     * encountered
  1622.                                     */
  1623.                                    char *ptr = yytext;
  1624.                                    while (!isdigit(*ptr))
  1625.                                       ptr++;
  1626.  
  1627.                                    /* Subtract one from the line number because
  1628.                                     * yylineno is zero-based instead of
  1629.                                     * one-based.
  1630.                                     */
  1631.                                    yylineno = strtol(ptr, &ptr, 0) - 1;
  1632.  
  1633.                                    /* From GLSL 3.30 and GLSL ES on, after processing the
  1634.                                     * line directive (including its new-line), the implementation
  1635.                                     * will behave as if it is compiling at the line number passed
  1636.                                     * as argument. It was line number + 1 in older specifications.
  1637.                                     */
  1638.                                    if (yyextra->is_version(330, 100))
  1639.                                       yylineno--;
  1640.  
  1641.                                    yylloc->source = strtol(ptr, NULL, 0);
  1642.                                 }
  1643.         YY_BREAK
  1644. case 6:
  1645. *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
  1646. yyg->yy_c_buf_p = yy_cp -= 1;
  1647. YY_DO_BEFORE_ACTION; /* set up yytext again */
  1648. YY_RULE_SETUP
  1649. #line 201 "../../../src/glsl/glsl_lexer.ll"
  1650. {
  1651.                                    /* Eat characters until the first digit is
  1652.                                     * encountered
  1653.                                     */
  1654.                                    char *ptr = yytext;
  1655.                                    while (!isdigit(*ptr))
  1656.                                       ptr++;
  1657.  
  1658.                                    /* Subtract one from the line number because
  1659.                                     * yylineno is zero-based instead of
  1660.                                     * one-based.
  1661.                                     */
  1662.                                    yylineno = strtol(ptr, &ptr, 0) - 1;
  1663.  
  1664.                                    /* From GLSL 3.30 and GLSL ES on, after processing the
  1665.                                     * line directive (including its new-line), the implementation
  1666.                                     * will behave as if it is compiling at the line number passed
  1667.                                     * as argument. It was line number + 1 in older specifications.
  1668.                                     */
  1669.                                    if (yyextra->is_version(330, 100))
  1670.                                       yylineno--;
  1671.                                 }
  1672.         YY_BREAK
  1673. case 7:
  1674. YY_RULE_SETUP
  1675. #line 223 "../../../src/glsl/glsl_lexer.ll"
  1676. {
  1677.                                   BEGIN PP;
  1678.                                   return PRAGMA_DEBUG_ON;
  1679.                                 }
  1680.         YY_BREAK
  1681. case 8:
  1682. YY_RULE_SETUP
  1683. #line 227 "../../../src/glsl/glsl_lexer.ll"
  1684. {
  1685.                                   BEGIN PP;
  1686.                                   return PRAGMA_DEBUG_OFF;
  1687.                                 }
  1688.         YY_BREAK
  1689. case 9:
  1690. YY_RULE_SETUP
  1691. #line 231 "../../../src/glsl/glsl_lexer.ll"
  1692. {
  1693.                                   BEGIN PP;
  1694.                                   return PRAGMA_OPTIMIZE_ON;
  1695.                                 }
  1696.         YY_BREAK
  1697. case 10:
  1698. YY_RULE_SETUP
  1699. #line 235 "../../../src/glsl/glsl_lexer.ll"
  1700. {
  1701.                                   BEGIN PP;
  1702.                                   return PRAGMA_OPTIMIZE_OFF;
  1703.                                 }
  1704.         YY_BREAK
  1705. case 11:
  1706. YY_RULE_SETUP
  1707. #line 239 "../../../src/glsl/glsl_lexer.ll"
  1708. {
  1709.                                   BEGIN PP;
  1710.                                   return PRAGMA_INVARIANT_ALL;
  1711.                                 }
  1712.         YY_BREAK
  1713. case 12:
  1714. YY_RULE_SETUP
  1715. #line 243 "../../../src/glsl/glsl_lexer.ll"
  1716. { BEGIN PRAGMA; }
  1717.         YY_BREAK
  1718. case 13:
  1719. /* rule 13 can match eol */
  1720. YY_RULE_SETUP
  1721. #line 245 "../../../src/glsl/glsl_lexer.ll"
  1722. { BEGIN 0; yylineno++; yycolumn = 0; }
  1723.         YY_BREAK
  1724. case 14:
  1725. YY_RULE_SETUP
  1726. #line 246 "../../../src/glsl/glsl_lexer.ll"
  1727. { }
  1728.         YY_BREAK
  1729. case 15:
  1730. YY_RULE_SETUP
  1731. #line 248 "../../../src/glsl/glsl_lexer.ll"
  1732. { }
  1733.         YY_BREAK
  1734. case 16:
  1735. YY_RULE_SETUP
  1736. #line 249 "../../../src/glsl/glsl_lexer.ll"
  1737. { }
  1738.         YY_BREAK
  1739. case 17:
  1740. YY_RULE_SETUP
  1741. #line 250 "../../../src/glsl/glsl_lexer.ll"
  1742. return COLON;
  1743.         YY_BREAK
  1744. case 18:
  1745. YY_RULE_SETUP
  1746. #line 251 "../../../src/glsl/glsl_lexer.ll"
  1747. {
  1748.                                    void *mem_ctx = yyextra;
  1749.                                    yylval->identifier = ralloc_strdup(mem_ctx, yytext);
  1750.                                    return IDENTIFIER;
  1751.                                 }
  1752.         YY_BREAK
  1753. case 19:
  1754. YY_RULE_SETUP
  1755. #line 256 "../../../src/glsl/glsl_lexer.ll"
  1756. {
  1757.                                     yylval->n = strtol(yytext, NULL, 10);
  1758.                                     return INTCONSTANT;
  1759.                                 }
  1760.         YY_BREAK
  1761. case 20:
  1762. /* rule 20 can match eol */
  1763. YY_RULE_SETUP
  1764. #line 260 "../../../src/glsl/glsl_lexer.ll"
  1765. { BEGIN 0; yylineno++; yycolumn = 0; return EOL; }
  1766.         YY_BREAK
  1767. case 21:
  1768. YY_RULE_SETUP
  1769. #line 261 "../../../src/glsl/glsl_lexer.ll"
  1770. { return yytext[0]; }
  1771.         YY_BREAK
  1772. case 22:
  1773. /* rule 22 can match eol */
  1774. YY_RULE_SETUP
  1775. #line 263 "../../../src/glsl/glsl_lexer.ll"
  1776. { yylineno++; yycolumn = 0; }
  1777.         YY_BREAK
  1778. case 23:
  1779. YY_RULE_SETUP
  1780. #line 265 "../../../src/glsl/glsl_lexer.ll"
  1781. DEPRECATED_ES_KEYWORD(ATTRIBUTE);
  1782.         YY_BREAK
  1783. case 24:
  1784. YY_RULE_SETUP
  1785. #line 266 "../../../src/glsl/glsl_lexer.ll"
  1786. return CONST_TOK;
  1787.         YY_BREAK
  1788. case 25:
  1789. YY_RULE_SETUP
  1790. #line 267 "../../../src/glsl/glsl_lexer.ll"
  1791. return BOOL_TOK;
  1792.         YY_BREAK
  1793. case 26:
  1794. YY_RULE_SETUP
  1795. #line 268 "../../../src/glsl/glsl_lexer.ll"
  1796. return FLOAT_TOK;
  1797.         YY_BREAK
  1798. case 27:
  1799. YY_RULE_SETUP
  1800. #line 269 "../../../src/glsl/glsl_lexer.ll"
  1801. return INT_TOK;
  1802.         YY_BREAK
  1803. case 28:
  1804. YY_RULE_SETUP
  1805. #line 270 "../../../src/glsl/glsl_lexer.ll"
  1806. KEYWORD(130, 300, 130, 300, UINT_TOK);
  1807.         YY_BREAK
  1808. case 29:
  1809. YY_RULE_SETUP
  1810. #line 272 "../../../src/glsl/glsl_lexer.ll"
  1811. return BREAK;
  1812.         YY_BREAK
  1813. case 30:
  1814. YY_RULE_SETUP
  1815. #line 273 "../../../src/glsl/glsl_lexer.ll"
  1816. return CONTINUE;
  1817.         YY_BREAK
  1818. case 31:
  1819. YY_RULE_SETUP
  1820. #line 274 "../../../src/glsl/glsl_lexer.ll"
  1821. return DO;
  1822.         YY_BREAK
  1823. case 32:
  1824. YY_RULE_SETUP
  1825. #line 275 "../../../src/glsl/glsl_lexer.ll"
  1826. return WHILE;
  1827.         YY_BREAK
  1828. case 33:
  1829. YY_RULE_SETUP
  1830. #line 276 "../../../src/glsl/glsl_lexer.ll"
  1831. return ELSE;
  1832.         YY_BREAK
  1833. case 34:
  1834. YY_RULE_SETUP
  1835. #line 277 "../../../src/glsl/glsl_lexer.ll"
  1836. return FOR;
  1837.         YY_BREAK
  1838. case 35:
  1839. YY_RULE_SETUP
  1840. #line 278 "../../../src/glsl/glsl_lexer.ll"
  1841. return IF;
  1842.         YY_BREAK
  1843. case 36:
  1844. YY_RULE_SETUP
  1845. #line 279 "../../../src/glsl/glsl_lexer.ll"
  1846. return DISCARD;
  1847.         YY_BREAK
  1848. case 37:
  1849. YY_RULE_SETUP
  1850. #line 280 "../../../src/glsl/glsl_lexer.ll"
  1851. return RETURN;
  1852.         YY_BREAK
  1853. case 38:
  1854. YY_RULE_SETUP
  1855. #line 282 "../../../src/glsl/glsl_lexer.ll"
  1856. return BVEC2;
  1857.         YY_BREAK
  1858. case 39:
  1859. YY_RULE_SETUP
  1860. #line 283 "../../../src/glsl/glsl_lexer.ll"
  1861. return BVEC3;
  1862.         YY_BREAK
  1863. case 40:
  1864. YY_RULE_SETUP
  1865. #line 284 "../../../src/glsl/glsl_lexer.ll"
  1866. return BVEC4;
  1867.         YY_BREAK
  1868. case 41:
  1869. YY_RULE_SETUP
  1870. #line 285 "../../../src/glsl/glsl_lexer.ll"
  1871. return IVEC2;
  1872.         YY_BREAK
  1873. case 42:
  1874. YY_RULE_SETUP
  1875. #line 286 "../../../src/glsl/glsl_lexer.ll"
  1876. return IVEC3;
  1877.         YY_BREAK
  1878. case 43:
  1879. YY_RULE_SETUP
  1880. #line 287 "../../../src/glsl/glsl_lexer.ll"
  1881. return IVEC4;
  1882.         YY_BREAK
  1883. case 44:
  1884. YY_RULE_SETUP
  1885. #line 288 "../../../src/glsl/glsl_lexer.ll"
  1886. KEYWORD(130, 300, 130, 300, UVEC2);
  1887.         YY_BREAK
  1888. case 45:
  1889. YY_RULE_SETUP
  1890. #line 289 "../../../src/glsl/glsl_lexer.ll"
  1891. KEYWORD(130, 300, 130, 300, UVEC3);
  1892.         YY_BREAK
  1893. case 46:
  1894. YY_RULE_SETUP
  1895. #line 290 "../../../src/glsl/glsl_lexer.ll"
  1896. KEYWORD(130, 300, 130, 300, UVEC4);
  1897.         YY_BREAK
  1898. case 47:
  1899. YY_RULE_SETUP
  1900. #line 291 "../../../src/glsl/glsl_lexer.ll"
  1901. return VEC2;
  1902.         YY_BREAK
  1903. case 48:
  1904. YY_RULE_SETUP
  1905. #line 292 "../../../src/glsl/glsl_lexer.ll"
  1906. return VEC3;
  1907.         YY_BREAK
  1908. case 49:
  1909. YY_RULE_SETUP
  1910. #line 293 "../../../src/glsl/glsl_lexer.ll"
  1911. return VEC4;
  1912.         YY_BREAK
  1913. case 50:
  1914. YY_RULE_SETUP
  1915. #line 294 "../../../src/glsl/glsl_lexer.ll"
  1916. return MAT2X2;
  1917.         YY_BREAK
  1918. case 51:
  1919. YY_RULE_SETUP
  1920. #line 295 "../../../src/glsl/glsl_lexer.ll"
  1921. return MAT3X3;
  1922.         YY_BREAK
  1923. case 52:
  1924. YY_RULE_SETUP
  1925. #line 296 "../../../src/glsl/glsl_lexer.ll"
  1926. return MAT4X4;
  1927.         YY_BREAK
  1928. case 53:
  1929. YY_RULE_SETUP
  1930. #line 297 "../../../src/glsl/glsl_lexer.ll"
  1931. KEYWORD(120, 300, 120, 300, MAT2X2);
  1932.         YY_BREAK
  1933. case 54:
  1934. YY_RULE_SETUP
  1935. #line 298 "../../../src/glsl/glsl_lexer.ll"
  1936. KEYWORD(120, 300, 120, 300, MAT2X3);
  1937.         YY_BREAK
  1938. case 55:
  1939. YY_RULE_SETUP
  1940. #line 299 "../../../src/glsl/glsl_lexer.ll"
  1941. KEYWORD(120, 300, 120, 300, MAT2X4);
  1942.         YY_BREAK
  1943. case 56:
  1944. YY_RULE_SETUP
  1945. #line 300 "../../../src/glsl/glsl_lexer.ll"
  1946. KEYWORD(120, 300, 120, 300, MAT3X2);
  1947.         YY_BREAK
  1948. case 57:
  1949. YY_RULE_SETUP
  1950. #line 301 "../../../src/glsl/glsl_lexer.ll"
  1951. KEYWORD(120, 300, 120, 300, MAT3X3);
  1952.         YY_BREAK
  1953. case 58:
  1954. YY_RULE_SETUP
  1955. #line 302 "../../../src/glsl/glsl_lexer.ll"
  1956. KEYWORD(120, 300, 120, 300, MAT3X4);
  1957.         YY_BREAK
  1958. case 59:
  1959. YY_RULE_SETUP
  1960. #line 303 "../../../src/glsl/glsl_lexer.ll"
  1961. KEYWORD(120, 300, 120, 300, MAT4X2);
  1962.         YY_BREAK
  1963. case 60:
  1964. YY_RULE_SETUP
  1965. #line 304 "../../../src/glsl/glsl_lexer.ll"
  1966. KEYWORD(120, 300, 120, 300, MAT4X3);
  1967.         YY_BREAK
  1968. case 61:
  1969. YY_RULE_SETUP
  1970. #line 305 "../../../src/glsl/glsl_lexer.ll"
  1971. KEYWORD(120, 300, 120, 300, MAT4X4);
  1972.         YY_BREAK
  1973. case 62:
  1974. YY_RULE_SETUP
  1975. #line 307 "../../../src/glsl/glsl_lexer.ll"
  1976. return IN_TOK;
  1977.         YY_BREAK
  1978. case 63:
  1979. YY_RULE_SETUP
  1980. #line 308 "../../../src/glsl/glsl_lexer.ll"
  1981. return OUT_TOK;
  1982.         YY_BREAK
  1983. case 64:
  1984. YY_RULE_SETUP
  1985. #line 309 "../../../src/glsl/glsl_lexer.ll"
  1986. return INOUT_TOK;
  1987.         YY_BREAK
  1988. case 65:
  1989. YY_RULE_SETUP
  1990. #line 310 "../../../src/glsl/glsl_lexer.ll"
  1991. return UNIFORM;
  1992.         YY_BREAK
  1993. case 66:
  1994. YY_RULE_SETUP
  1995. #line 311 "../../../src/glsl/glsl_lexer.ll"
  1996. DEPRECATED_ES_KEYWORD(VARYING);
  1997.         YY_BREAK
  1998. case 67:
  1999. YY_RULE_SETUP
  2000. #line 312 "../../../src/glsl/glsl_lexer.ll"
  2001. KEYWORD(120, 300, 120, 300, CENTROID);
  2002.         YY_BREAK
  2003. case 68:
  2004. YY_RULE_SETUP
  2005. #line 313 "../../../src/glsl/glsl_lexer.ll"
  2006. KEYWORD(120, 100, 120, 100, INVARIANT);
  2007.         YY_BREAK
  2008. case 69:
  2009. YY_RULE_SETUP
  2010. #line 314 "../../../src/glsl/glsl_lexer.ll"
  2011. KEYWORD(130, 100, 130, 300, FLAT);
  2012.         YY_BREAK
  2013. case 70:
  2014. YY_RULE_SETUP
  2015. #line 315 "../../../src/glsl/glsl_lexer.ll"
  2016. KEYWORD(130, 300, 130, 300, SMOOTH);
  2017.         YY_BREAK
  2018. case 71:
  2019. YY_RULE_SETUP
  2020. #line 316 "../../../src/glsl/glsl_lexer.ll"
  2021. KEYWORD(130, 300, 130, 0, NOPERSPECTIVE);
  2022.         YY_BREAK
  2023. case 72:
  2024. YY_RULE_SETUP
  2025. #line 318 "../../../src/glsl/glsl_lexer.ll"
  2026. DEPRECATED_ES_KEYWORD(SAMPLER1D);
  2027.         YY_BREAK
  2028. case 73:
  2029. YY_RULE_SETUP
  2030. #line 319 "../../../src/glsl/glsl_lexer.ll"
  2031. return SAMPLER2D;
  2032.         YY_BREAK
  2033. case 74:
  2034. YY_RULE_SETUP
  2035. #line 320 "../../../src/glsl/glsl_lexer.ll"
  2036. return SAMPLER3D;
  2037.         YY_BREAK
  2038. case 75:
  2039. YY_RULE_SETUP
  2040. #line 321 "../../../src/glsl/glsl_lexer.ll"
  2041. return SAMPLERCUBE;
  2042.         YY_BREAK
  2043. case 76:
  2044. YY_RULE_SETUP
  2045. #line 322 "../../../src/glsl/glsl_lexer.ll"
  2046. KEYWORD(130, 300, 130, 0, SAMPLER1DARRAY);
  2047.         YY_BREAK
  2048. case 77:
  2049. YY_RULE_SETUP
  2050. #line 323 "../../../src/glsl/glsl_lexer.ll"
  2051. KEYWORD(130, 300, 130, 300, SAMPLER2DARRAY);
  2052.         YY_BREAK
  2053. case 78:
  2054. YY_RULE_SETUP
  2055. #line 324 "../../../src/glsl/glsl_lexer.ll"
  2056. DEPRECATED_ES_KEYWORD(SAMPLER1DSHADOW);
  2057.         YY_BREAK
  2058. case 79:
  2059. YY_RULE_SETUP
  2060. #line 325 "../../../src/glsl/glsl_lexer.ll"
  2061. return SAMPLER2DSHADOW;
  2062.         YY_BREAK
  2063. case 80:
  2064. YY_RULE_SETUP
  2065. #line 326 "../../../src/glsl/glsl_lexer.ll"
  2066. KEYWORD(130, 300, 130, 300, SAMPLERCUBESHADOW);
  2067.         YY_BREAK
  2068. case 81:
  2069. YY_RULE_SETUP
  2070. #line 327 "../../../src/glsl/glsl_lexer.ll"
  2071. KEYWORD(130, 300, 130, 0, SAMPLER1DARRAYSHADOW);
  2072.         YY_BREAK
  2073. case 82:
  2074. YY_RULE_SETUP
  2075. #line 328 "../../../src/glsl/glsl_lexer.ll"
  2076. KEYWORD(130, 300, 130, 300, SAMPLER2DARRAYSHADOW);
  2077.         YY_BREAK
  2078. case 83:
  2079. YY_RULE_SETUP
  2080. #line 329 "../../../src/glsl/glsl_lexer.ll"
  2081. KEYWORD(130, 300, 130, 0, ISAMPLER1D);
  2082.         YY_BREAK
  2083. case 84:
  2084. YY_RULE_SETUP
  2085. #line 330 "../../../src/glsl/glsl_lexer.ll"
  2086. KEYWORD(130, 300, 130, 300, ISAMPLER2D);
  2087.         YY_BREAK
  2088. case 85:
  2089. YY_RULE_SETUP
  2090. #line 331 "../../../src/glsl/glsl_lexer.ll"
  2091. KEYWORD(130, 300, 130, 300, ISAMPLER3D);
  2092.         YY_BREAK
  2093. case 86:
  2094. YY_RULE_SETUP
  2095. #line 332 "../../../src/glsl/glsl_lexer.ll"
  2096. KEYWORD(130, 300, 130, 300, ISAMPLERCUBE);
  2097.         YY_BREAK
  2098. case 87:
  2099. YY_RULE_SETUP
  2100. #line 333 "../../../src/glsl/glsl_lexer.ll"
  2101. KEYWORD(130, 300, 130, 0, ISAMPLER1DARRAY);
  2102.         YY_BREAK
  2103. case 88:
  2104. YY_RULE_SETUP
  2105. #line 334 "../../../src/glsl/glsl_lexer.ll"
  2106. KEYWORD(130, 300, 130, 300, ISAMPLER2DARRAY);
  2107.         YY_BREAK
  2108. case 89:
  2109. YY_RULE_SETUP
  2110. #line 335 "../../../src/glsl/glsl_lexer.ll"
  2111. KEYWORD(130, 300, 130, 0, USAMPLER1D);
  2112.         YY_BREAK
  2113. case 90:
  2114. YY_RULE_SETUP
  2115. #line 336 "../../../src/glsl/glsl_lexer.ll"
  2116. KEYWORD(130, 300, 130, 300, USAMPLER2D);
  2117.         YY_BREAK
  2118. case 91:
  2119. YY_RULE_SETUP
  2120. #line 337 "../../../src/glsl/glsl_lexer.ll"
  2121. KEYWORD(130, 300, 130, 300, USAMPLER3D);
  2122.         YY_BREAK
  2123. case 92:
  2124. YY_RULE_SETUP
  2125. #line 338 "../../../src/glsl/glsl_lexer.ll"
  2126. KEYWORD(130, 300, 130, 300, USAMPLERCUBE);
  2127.         YY_BREAK
  2128. case 93:
  2129. YY_RULE_SETUP
  2130. #line 339 "../../../src/glsl/glsl_lexer.ll"
  2131. KEYWORD(130, 300, 130, 0, USAMPLER1DARRAY);
  2132.         YY_BREAK
  2133. case 94:
  2134. YY_RULE_SETUP
  2135. #line 340 "../../../src/glsl/glsl_lexer.ll"
  2136. KEYWORD(130, 300, 130, 300, USAMPLER2DARRAY);
  2137.         YY_BREAK
  2138. /* additional keywords in ARB_texture_multisample, included in GLSL 1.50 */
  2139. /* these are reserved but not defined in GLSL 3.00 */
  2140. case 95:
  2141. YY_RULE_SETUP
  2142. #line 344 "../../../src/glsl/glsl_lexer.ll"
  2143. KEYWORD_WITH_ALT(150, 300, 150, 0, yyextra->ARB_texture_multisample_enable, SAMPLER2DMS);
  2144.         YY_BREAK
  2145. case 96:
  2146. YY_RULE_SETUP
  2147. #line 345 "../../../src/glsl/glsl_lexer.ll"
  2148. KEYWORD_WITH_ALT(150, 300, 150, 0, yyextra->ARB_texture_multisample_enable, ISAMPLER2DMS);
  2149.         YY_BREAK
  2150. case 97:
  2151. YY_RULE_SETUP
  2152. #line 346 "../../../src/glsl/glsl_lexer.ll"
  2153. KEYWORD_WITH_ALT(150, 300, 150, 0, yyextra->ARB_texture_multisample_enable, USAMPLER2DMS);
  2154.         YY_BREAK
  2155. case 98:
  2156. YY_RULE_SETUP
  2157. #line 347 "../../../src/glsl/glsl_lexer.ll"
  2158. KEYWORD_WITH_ALT(150, 300, 150, 0, yyextra->ARB_texture_multisample_enable, SAMPLER2DMSARRAY);
  2159.         YY_BREAK
  2160. case 99:
  2161. YY_RULE_SETUP
  2162. #line 348 "../../../src/glsl/glsl_lexer.ll"
  2163. KEYWORD_WITH_ALT(150, 300, 150, 0, yyextra->ARB_texture_multisample_enable, ISAMPLER2DMSARRAY);
  2164.         YY_BREAK
  2165. case 100:
  2166. YY_RULE_SETUP
  2167. #line 349 "../../../src/glsl/glsl_lexer.ll"
  2168. KEYWORD_WITH_ALT(150, 300, 150, 0, yyextra->ARB_texture_multisample_enable, USAMPLER2DMSARRAY);
  2169.         YY_BREAK
  2170. /* keywords available with ARB_texture_cube_map_array_enable extension on desktop GLSL */
  2171. case 101:
  2172. YY_RULE_SETUP
  2173. #line 352 "../../../src/glsl/glsl_lexer.ll"
  2174. KEYWORD_WITH_ALT(400, 0, 400, 0, yyextra->ARB_texture_cube_map_array_enable, SAMPLERCUBEARRAY);
  2175.         YY_BREAK
  2176. case 102:
  2177. YY_RULE_SETUP
  2178. #line 353 "../../../src/glsl/glsl_lexer.ll"
  2179. KEYWORD_WITH_ALT(400, 0, 400, 0, yyextra->ARB_texture_cube_map_array_enable, ISAMPLERCUBEARRAY);
  2180.         YY_BREAK
  2181. case 103:
  2182. YY_RULE_SETUP
  2183. #line 354 "../../../src/glsl/glsl_lexer.ll"
  2184. KEYWORD_WITH_ALT(400, 0, 400, 0, yyextra->ARB_texture_cube_map_array_enable, USAMPLERCUBEARRAY);
  2185.         YY_BREAK
  2186. case 104:
  2187. YY_RULE_SETUP
  2188. #line 355 "../../../src/glsl/glsl_lexer.ll"
  2189. KEYWORD_WITH_ALT(400, 0, 400, 0, yyextra->ARB_texture_cube_map_array_enable, SAMPLERCUBEARRAYSHADOW);
  2190.         YY_BREAK
  2191. case 105:
  2192. YY_RULE_SETUP
  2193. #line 357 "../../../src/glsl/glsl_lexer.ll"
  2194. {
  2195.                           if (yyextra->OES_EGL_image_external_enable)
  2196.                              return SAMPLEREXTERNALOES;
  2197.                           else
  2198.                              return IDENTIFIER;
  2199.                 }
  2200.         YY_BREAK
  2201. /* keywords available with ARB_gpu_shader5 */
  2202. case 106:
  2203. YY_RULE_SETUP
  2204. #line 365 "../../../src/glsl/glsl_lexer.ll"
  2205. KEYWORD_WITH_ALT(400, 0, 400, 0, yyextra->ARB_gpu_shader5_enable, PRECISE);
  2206.         YY_BREAK
  2207. /* keywords available with ARB_shader_image_load_store */
  2208. case 107:
  2209. YY_RULE_SETUP
  2210. #line 368 "../../../src/glsl/glsl_lexer.ll"
  2211. KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IMAGE1D);
  2212.         YY_BREAK
  2213. case 108:
  2214. YY_RULE_SETUP
  2215. #line 369 "../../../src/glsl/glsl_lexer.ll"
  2216. KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IMAGE2D);
  2217.         YY_BREAK
  2218. case 109:
  2219. YY_RULE_SETUP
  2220. #line 370 "../../../src/glsl/glsl_lexer.ll"
  2221. KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IMAGE3D);
  2222.         YY_BREAK
  2223. case 110:
  2224. YY_RULE_SETUP
  2225. #line 371 "../../../src/glsl/glsl_lexer.ll"
  2226. KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IMAGE2DRECT);
  2227.         YY_BREAK
  2228. case 111:
  2229. YY_RULE_SETUP
  2230. #line 372 "../../../src/glsl/glsl_lexer.ll"
  2231. KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IMAGECUBE);
  2232.         YY_BREAK
  2233. case 112:
  2234. YY_RULE_SETUP
  2235. #line 373 "../../../src/glsl/glsl_lexer.ll"
  2236. KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IMAGEBUFFER);
  2237.         YY_BREAK
  2238. case 113:
  2239. YY_RULE_SETUP
  2240. #line 374 "../../../src/glsl/glsl_lexer.ll"
  2241. KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IMAGE1DARRAY);
  2242.         YY_BREAK
  2243. case 114:
  2244. YY_RULE_SETUP
  2245. #line 375 "../../../src/glsl/glsl_lexer.ll"
  2246. KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IMAGE2DARRAY);
  2247.         YY_BREAK
  2248. case 115:
  2249. YY_RULE_SETUP
  2250. #line 376 "../../../src/glsl/glsl_lexer.ll"
  2251. KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IMAGECUBEARRAY);
  2252.         YY_BREAK
  2253. case 116:
  2254. YY_RULE_SETUP
  2255. #line 377 "../../../src/glsl/glsl_lexer.ll"
  2256. KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IMAGE2DMS);
  2257.         YY_BREAK
  2258. case 117:
  2259. YY_RULE_SETUP
  2260. #line 378 "../../../src/glsl/glsl_lexer.ll"
  2261. KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IMAGE2DMSARRAY);
  2262.         YY_BREAK
  2263. case 118:
  2264. YY_RULE_SETUP
  2265. #line 379 "../../../src/glsl/glsl_lexer.ll"
  2266. KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IIMAGE1D);
  2267.         YY_BREAK
  2268. case 119:
  2269. YY_RULE_SETUP
  2270. #line 380 "../../../src/glsl/glsl_lexer.ll"
  2271. KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IIMAGE2D);
  2272.         YY_BREAK
  2273. case 120:
  2274. YY_RULE_SETUP
  2275. #line 381 "../../../src/glsl/glsl_lexer.ll"
  2276. KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IIMAGE3D);
  2277.         YY_BREAK
  2278. case 121:
  2279. YY_RULE_SETUP
  2280. #line 382 "../../../src/glsl/glsl_lexer.ll"
  2281. KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IIMAGE2DRECT);
  2282.         YY_BREAK
  2283. case 122:
  2284. YY_RULE_SETUP
  2285. #line 383 "../../../src/glsl/glsl_lexer.ll"
  2286. KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IIMAGECUBE);
  2287.         YY_BREAK
  2288. case 123:
  2289. YY_RULE_SETUP
  2290. #line 384 "../../../src/glsl/glsl_lexer.ll"
  2291. KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IIMAGEBUFFER);
  2292.         YY_BREAK
  2293. case 124:
  2294. YY_RULE_SETUP
  2295. #line 385 "../../../src/glsl/glsl_lexer.ll"
  2296. KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IIMAGE1DARRAY);
  2297.         YY_BREAK
  2298. case 125:
  2299. YY_RULE_SETUP
  2300. #line 386 "../../../src/glsl/glsl_lexer.ll"
  2301. KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IIMAGE2DARRAY);
  2302.         YY_BREAK
  2303. case 126:
  2304. YY_RULE_SETUP
  2305. #line 387 "../../../src/glsl/glsl_lexer.ll"
  2306. KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IIMAGECUBEARRAY);
  2307.         YY_BREAK
  2308. case 127:
  2309. YY_RULE_SETUP
  2310. #line 388 "../../../src/glsl/glsl_lexer.ll"
  2311. KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IIMAGE2DMS);
  2312.         YY_BREAK
  2313. case 128:
  2314. YY_RULE_SETUP
  2315. #line 389 "../../../src/glsl/glsl_lexer.ll"
  2316. KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IIMAGE2DMSARRAY);
  2317.         YY_BREAK
  2318. case 129:
  2319. YY_RULE_SETUP
  2320. #line 390 "../../../src/glsl/glsl_lexer.ll"
  2321. KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, UIMAGE1D);
  2322.         YY_BREAK
  2323. case 130:
  2324. YY_RULE_SETUP
  2325. #line 391 "../../../src/glsl/glsl_lexer.ll"
  2326. KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, UIMAGE2D);
  2327.         YY_BREAK
  2328. case 131:
  2329. YY_RULE_SETUP
  2330. #line 392 "../../../src/glsl/glsl_lexer.ll"
  2331. KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, UIMAGE3D);
  2332.         YY_BREAK
  2333. case 132:
  2334. YY_RULE_SETUP
  2335. #line 393 "../../../src/glsl/glsl_lexer.ll"
  2336. KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, UIMAGE2DRECT);
  2337.         YY_BREAK
  2338. case 133:
  2339. YY_RULE_SETUP
  2340. #line 394 "../../../src/glsl/glsl_lexer.ll"
  2341. KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, UIMAGECUBE);
  2342.         YY_BREAK
  2343. case 134:
  2344. YY_RULE_SETUP
  2345. #line 395 "../../../src/glsl/glsl_lexer.ll"
  2346. KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, UIMAGEBUFFER);
  2347.         YY_BREAK
  2348. case 135:
  2349. YY_RULE_SETUP
  2350. #line 396 "../../../src/glsl/glsl_lexer.ll"
  2351. KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, UIMAGE1DARRAY);
  2352.         YY_BREAK
  2353. case 136:
  2354. YY_RULE_SETUP
  2355. #line 397 "../../../src/glsl/glsl_lexer.ll"
  2356. KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, UIMAGE2DARRAY);
  2357.         YY_BREAK
  2358. case 137:
  2359. YY_RULE_SETUP
  2360. #line 398 "../../../src/glsl/glsl_lexer.ll"
  2361. KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, UIMAGECUBEARRAY);
  2362.         YY_BREAK
  2363. case 138:
  2364. YY_RULE_SETUP
  2365. #line 399 "../../../src/glsl/glsl_lexer.ll"
  2366. KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, UIMAGE2DMS);
  2367.         YY_BREAK
  2368. case 139:
  2369. YY_RULE_SETUP
  2370. #line 400 "../../../src/glsl/glsl_lexer.ll"
  2371. KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, UIMAGE2DMSARRAY);
  2372.         YY_BREAK
  2373. case 140:
  2374. YY_RULE_SETUP
  2375. #line 401 "../../../src/glsl/glsl_lexer.ll"
  2376. KEYWORD(130, 300, 0, 0, IMAGE1DSHADOW);
  2377.         YY_BREAK
  2378. case 141:
  2379. YY_RULE_SETUP
  2380. #line 402 "../../../src/glsl/glsl_lexer.ll"
  2381. KEYWORD(130, 300, 0, 0, IMAGE2DSHADOW);
  2382.         YY_BREAK
  2383. case 142:
  2384. YY_RULE_SETUP
  2385. #line 403 "../../../src/glsl/glsl_lexer.ll"
  2386. KEYWORD(130, 300, 0, 0, IMAGE1DARRAYSHADOW);
  2387.         YY_BREAK
  2388. case 143:
  2389. YY_RULE_SETUP
  2390. #line 404 "../../../src/glsl/glsl_lexer.ll"
  2391. KEYWORD(130, 300, 0, 0, IMAGE2DARRAYSHADOW);
  2392.         YY_BREAK
  2393. case 144:
  2394. YY_RULE_SETUP
  2395. #line 406 "../../../src/glsl/glsl_lexer.ll"
  2396. KEYWORD_WITH_ALT(420, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, COHERENT);
  2397.         YY_BREAK
  2398. case 145:
  2399. YY_RULE_SETUP
  2400. #line 407 "../../../src/glsl/glsl_lexer.ll"
  2401. KEYWORD_WITH_ALT(110, 100, 420, 0, yyextra->ARB_shader_image_load_store_enable, VOLATILE);
  2402.         YY_BREAK
  2403. case 146:
  2404. YY_RULE_SETUP
  2405. #line 408 "../../../src/glsl/glsl_lexer.ll"
  2406. KEYWORD_WITH_ALT(420, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, RESTRICT);
  2407.         YY_BREAK
  2408. case 147:
  2409. YY_RULE_SETUP
  2410. #line 409 "../../../src/glsl/glsl_lexer.ll"
  2411. KEYWORD_WITH_ALT(420, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, READONLY);
  2412.         YY_BREAK
  2413. case 148:
  2414. YY_RULE_SETUP
  2415. #line 410 "../../../src/glsl/glsl_lexer.ll"
  2416. KEYWORD_WITH_ALT(420, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, WRITEONLY);
  2417.         YY_BREAK
  2418. case 149:
  2419. YY_RULE_SETUP
  2420. #line 412 "../../../src/glsl/glsl_lexer.ll"
  2421. KEYWORD_WITH_ALT(420, 300, 420, 310, yyextra->ARB_shader_atomic_counters_enable, ATOMIC_UINT);
  2422.         YY_BREAK
  2423. case 150:
  2424. YY_RULE_SETUP
  2425. #line 414 "../../../src/glsl/glsl_lexer.ll"
  2426. return STRUCT;
  2427.         YY_BREAK
  2428. case 151:
  2429. YY_RULE_SETUP
  2430. #line 415 "../../../src/glsl/glsl_lexer.ll"
  2431. return VOID_TOK;
  2432.         YY_BREAK
  2433. case 152:
  2434. YY_RULE_SETUP
  2435. #line 417 "../../../src/glsl/glsl_lexer.ll"
  2436. {
  2437.                   if ((yyextra->is_version(140, 300))
  2438.                       || yyextra->AMD_conservative_depth_enable
  2439.                       || yyextra->ARB_conservative_depth_enable
  2440.                       || yyextra->ARB_explicit_attrib_location_enable
  2441.                       || yyextra->ARB_explicit_uniform_location_enable
  2442.                       || yyextra->has_separate_shader_objects()
  2443.                       || yyextra->ARB_uniform_buffer_object_enable
  2444.                       || yyextra->ARB_fragment_coord_conventions_enable
  2445.                       || yyextra->ARB_shading_language_420pack_enable
  2446.                       || yyextra->ARB_compute_shader_enable) {
  2447.                       return LAYOUT_TOK;
  2448.                    } else {
  2449.                       void *mem_ctx = yyextra;
  2450.                       yylval->identifier = ralloc_strdup(mem_ctx, yytext);
  2451.                       return classify_identifier(yyextra, yytext);
  2452.                    }
  2453.                 }
  2454.         YY_BREAK
  2455. case 153:
  2456. YY_RULE_SETUP
  2457. #line 436 "../../../src/glsl/glsl_lexer.ll"
  2458. return INC_OP;
  2459.         YY_BREAK
  2460. case 154:
  2461. YY_RULE_SETUP
  2462. #line 437 "../../../src/glsl/glsl_lexer.ll"
  2463. return DEC_OP;
  2464.         YY_BREAK
  2465. case 155:
  2466. YY_RULE_SETUP
  2467. #line 438 "../../../src/glsl/glsl_lexer.ll"
  2468. return LE_OP;
  2469.         YY_BREAK
  2470. case 156:
  2471. YY_RULE_SETUP
  2472. #line 439 "../../../src/glsl/glsl_lexer.ll"
  2473. return GE_OP;
  2474.         YY_BREAK
  2475. case 157:
  2476. YY_RULE_SETUP
  2477. #line 440 "../../../src/glsl/glsl_lexer.ll"
  2478. return EQ_OP;
  2479.         YY_BREAK
  2480. case 158:
  2481. YY_RULE_SETUP
  2482. #line 441 "../../../src/glsl/glsl_lexer.ll"
  2483. return NE_OP;
  2484.         YY_BREAK
  2485. case 159:
  2486. YY_RULE_SETUP
  2487. #line 442 "../../../src/glsl/glsl_lexer.ll"
  2488. return AND_OP;
  2489.         YY_BREAK
  2490. case 160:
  2491. YY_RULE_SETUP
  2492. #line 443 "../../../src/glsl/glsl_lexer.ll"
  2493. return OR_OP;
  2494.         YY_BREAK
  2495. case 161:
  2496. YY_RULE_SETUP
  2497. #line 444 "../../../src/glsl/glsl_lexer.ll"
  2498. return XOR_OP;
  2499.         YY_BREAK
  2500. case 162:
  2501. YY_RULE_SETUP
  2502. #line 445 "../../../src/glsl/glsl_lexer.ll"
  2503. return LEFT_OP;
  2504.         YY_BREAK
  2505. case 163:
  2506. YY_RULE_SETUP
  2507. #line 446 "../../../src/glsl/glsl_lexer.ll"
  2508. return RIGHT_OP;
  2509.         YY_BREAK
  2510. case 164:
  2511. YY_RULE_SETUP
  2512. #line 448 "../../../src/glsl/glsl_lexer.ll"
  2513. return MUL_ASSIGN;
  2514.         YY_BREAK
  2515. case 165:
  2516. YY_RULE_SETUP
  2517. #line 449 "../../../src/glsl/glsl_lexer.ll"
  2518. return DIV_ASSIGN;
  2519.         YY_BREAK
  2520. case 166:
  2521. YY_RULE_SETUP
  2522. #line 450 "../../../src/glsl/glsl_lexer.ll"
  2523. return ADD_ASSIGN;
  2524.         YY_BREAK
  2525. case 167:
  2526. YY_RULE_SETUP
  2527. #line 451 "../../../src/glsl/glsl_lexer.ll"
  2528. return MOD_ASSIGN;
  2529.         YY_BREAK
  2530. case 168:
  2531. YY_RULE_SETUP
  2532. #line 452 "../../../src/glsl/glsl_lexer.ll"
  2533. return LEFT_ASSIGN;
  2534.         YY_BREAK
  2535. case 169:
  2536. YY_RULE_SETUP
  2537. #line 453 "../../../src/glsl/glsl_lexer.ll"
  2538. return RIGHT_ASSIGN;
  2539.         YY_BREAK
  2540. case 170:
  2541. YY_RULE_SETUP
  2542. #line 454 "../../../src/glsl/glsl_lexer.ll"
  2543. return AND_ASSIGN;
  2544.         YY_BREAK
  2545. case 171:
  2546. YY_RULE_SETUP
  2547. #line 455 "../../../src/glsl/glsl_lexer.ll"
  2548. return XOR_ASSIGN;
  2549.         YY_BREAK
  2550. case 172:
  2551. YY_RULE_SETUP
  2552. #line 456 "../../../src/glsl/glsl_lexer.ll"
  2553. return OR_ASSIGN;
  2554.         YY_BREAK
  2555. case 173:
  2556. YY_RULE_SETUP
  2557. #line 457 "../../../src/glsl/glsl_lexer.ll"
  2558. return SUB_ASSIGN;
  2559.         YY_BREAK
  2560. case 174:
  2561. YY_RULE_SETUP
  2562. #line 459 "../../../src/glsl/glsl_lexer.ll"
  2563. {
  2564.                             return LITERAL_INTEGER(10);
  2565.                         }
  2566.         YY_BREAK
  2567. case 175:
  2568. YY_RULE_SETUP
  2569. #line 462 "../../../src/glsl/glsl_lexer.ll"
  2570. {
  2571.                             return LITERAL_INTEGER(16);
  2572.                         }
  2573.         YY_BREAK
  2574. case 176:
  2575. YY_RULE_SETUP
  2576. #line 465 "../../../src/glsl/glsl_lexer.ll"
  2577. {
  2578.                             return LITERAL_INTEGER(8);
  2579.                         }
  2580.         YY_BREAK
  2581. case 177:
  2582. #line 470 "../../../src/glsl/glsl_lexer.ll"
  2583. case 178:
  2584. #line 471 "../../../src/glsl/glsl_lexer.ll"
  2585. case 179:
  2586. #line 472 "../../../src/glsl/glsl_lexer.ll"
  2587. case 180:
  2588. YY_RULE_SETUP
  2589. #line 472 "../../../src/glsl/glsl_lexer.ll"
  2590. {
  2591.                             yylval->real = _mesa_strtof(yytext, NULL);
  2592.                             return FLOATCONSTANT;
  2593.                         }
  2594.         YY_BREAK
  2595. case 181:
  2596. #line 478 "../../../src/glsl/glsl_lexer.ll"
  2597. case 182:
  2598. #line 479 "../../../src/glsl/glsl_lexer.ll"
  2599. case 183:
  2600. #line 480 "../../../src/glsl/glsl_lexer.ll"
  2601. case 184:
  2602. YY_RULE_SETUP
  2603. #line 480 "../../../src/glsl/glsl_lexer.ll"
  2604. {
  2605.                             if (!yyextra->is_version(400, 0) &&
  2606.                                 !yyextra->ARB_gpu_shader_fp64_enable)
  2607.                                 return ERROR_TOK;
  2608.                             yylval->dreal = _mesa_strtod(yytext, NULL);
  2609.                             return DOUBLECONSTANT;
  2610.                         }
  2611.         YY_BREAK
  2612. case 185:
  2613. YY_RULE_SETUP
  2614. #line 488 "../../../src/glsl/glsl_lexer.ll"
  2615. {
  2616.                             yylval->n = 1;
  2617.                             return BOOLCONSTANT;
  2618.                         }
  2619.         YY_BREAK
  2620. case 186:
  2621. YY_RULE_SETUP
  2622. #line 492 "../../../src/glsl/glsl_lexer.ll"
  2623. {
  2624.                             yylval->n = 0;
  2625.                             return BOOLCONSTANT;
  2626.                         }
  2627.         YY_BREAK
  2628. /* Reserved words in GLSL 1.10. */
  2629. case 187:
  2630. YY_RULE_SETUP
  2631. #line 499 "../../../src/glsl/glsl_lexer.ll"
  2632. KEYWORD(110, 100, 0, 0, ASM);
  2633.         YY_BREAK
  2634. case 188:
  2635. YY_RULE_SETUP
  2636. #line 500 "../../../src/glsl/glsl_lexer.ll"
  2637. KEYWORD(110, 100, 0, 0, CLASS);
  2638.         YY_BREAK
  2639. case 189:
  2640. YY_RULE_SETUP
  2641. #line 501 "../../../src/glsl/glsl_lexer.ll"
  2642. KEYWORD(110, 100, 0, 0, UNION);
  2643.         YY_BREAK
  2644. case 190:
  2645. YY_RULE_SETUP
  2646. #line 502 "../../../src/glsl/glsl_lexer.ll"
  2647. KEYWORD(110, 100, 0, 0, ENUM);
  2648.         YY_BREAK
  2649. case 191:
  2650. YY_RULE_SETUP
  2651. #line 503 "../../../src/glsl/glsl_lexer.ll"
  2652. KEYWORD(110, 100, 0, 0, TYPEDEF);
  2653.         YY_BREAK
  2654. case 192:
  2655. YY_RULE_SETUP
  2656. #line 504 "../../../src/glsl/glsl_lexer.ll"
  2657. KEYWORD(110, 100, 0, 0, TEMPLATE);
  2658.         YY_BREAK
  2659. case 193:
  2660. YY_RULE_SETUP
  2661. #line 505 "../../../src/glsl/glsl_lexer.ll"
  2662. KEYWORD(110, 100, 0, 0, THIS);
  2663.         YY_BREAK
  2664. case 194:
  2665. YY_RULE_SETUP
  2666. #line 506 "../../../src/glsl/glsl_lexer.ll"
  2667. KEYWORD_WITH_ALT(110, 100, 140, 300, yyextra->ARB_uniform_buffer_object_enable, PACKED_TOK);
  2668.         YY_BREAK
  2669. case 195:
  2670. YY_RULE_SETUP
  2671. #line 507 "../../../src/glsl/glsl_lexer.ll"
  2672. KEYWORD(110, 100, 0, 0, GOTO);
  2673.         YY_BREAK
  2674. case 196:
  2675. YY_RULE_SETUP
  2676. #line 508 "../../../src/glsl/glsl_lexer.ll"
  2677. KEYWORD(110, 100, 130, 300, SWITCH);
  2678.         YY_BREAK
  2679. case 197:
  2680. YY_RULE_SETUP
  2681. #line 509 "../../../src/glsl/glsl_lexer.ll"
  2682. KEYWORD(110, 100, 130, 300, DEFAULT);
  2683.         YY_BREAK
  2684. case 198:
  2685. YY_RULE_SETUP
  2686. #line 510 "../../../src/glsl/glsl_lexer.ll"
  2687. KEYWORD(110, 100, 0, 0, INLINE_TOK);
  2688.         YY_BREAK
  2689. case 199:
  2690. YY_RULE_SETUP
  2691. #line 511 "../../../src/glsl/glsl_lexer.ll"
  2692. KEYWORD(110, 100, 0, 0, NOINLINE);
  2693.         YY_BREAK
  2694. case 200:
  2695. YY_RULE_SETUP
  2696. #line 512 "../../../src/glsl/glsl_lexer.ll"
  2697. KEYWORD(110, 100, 0, 0, PUBLIC_TOK);
  2698.         YY_BREAK
  2699. case 201:
  2700. YY_RULE_SETUP
  2701. #line 513 "../../../src/glsl/glsl_lexer.ll"
  2702. KEYWORD(110, 100, 0, 0, STATIC);
  2703.         YY_BREAK
  2704. case 202:
  2705. YY_RULE_SETUP
  2706. #line 514 "../../../src/glsl/glsl_lexer.ll"
  2707. KEYWORD(110, 100, 0, 0, EXTERN);
  2708.         YY_BREAK
  2709. case 203:
  2710. YY_RULE_SETUP
  2711. #line 515 "../../../src/glsl/glsl_lexer.ll"
  2712. KEYWORD(110, 100, 0, 0, EXTERNAL);
  2713.         YY_BREAK
  2714. case 204:
  2715. YY_RULE_SETUP
  2716. #line 516 "../../../src/glsl/glsl_lexer.ll"
  2717. KEYWORD(110, 100, 0, 0, INTERFACE);
  2718.         YY_BREAK
  2719. case 205:
  2720. YY_RULE_SETUP
  2721. #line 517 "../../../src/glsl/glsl_lexer.ll"
  2722. KEYWORD(110, 100, 0, 0, LONG_TOK);
  2723.         YY_BREAK
  2724. case 206:
  2725. YY_RULE_SETUP
  2726. #line 518 "../../../src/glsl/glsl_lexer.ll"
  2727. KEYWORD(110, 100, 0, 0, SHORT_TOK);
  2728.         YY_BREAK
  2729. case 207:
  2730. YY_RULE_SETUP
  2731. #line 519 "../../../src/glsl/glsl_lexer.ll"
  2732. KEYWORD_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, DOUBLE_TOK);
  2733.         YY_BREAK
  2734. case 208:
  2735. YY_RULE_SETUP
  2736. #line 520 "../../../src/glsl/glsl_lexer.ll"
  2737. KEYWORD(110, 100, 0, 0, HALF);
  2738.         YY_BREAK
  2739. case 209:
  2740. YY_RULE_SETUP
  2741. #line 521 "../../../src/glsl/glsl_lexer.ll"
  2742. KEYWORD(110, 100, 0, 0, FIXED_TOK);
  2743.         YY_BREAK
  2744. case 210:
  2745. YY_RULE_SETUP
  2746. #line 522 "../../../src/glsl/glsl_lexer.ll"
  2747. KEYWORD(110, 100, 0, 0, UNSIGNED);
  2748.         YY_BREAK
  2749. case 211:
  2750. YY_RULE_SETUP
  2751. #line 523 "../../../src/glsl/glsl_lexer.ll"
  2752. KEYWORD(110, 100, 0, 0, INPUT_TOK);
  2753.         YY_BREAK
  2754. case 212:
  2755. YY_RULE_SETUP
  2756. #line 524 "../../../src/glsl/glsl_lexer.ll"
  2757. KEYWORD(110, 100, 0, 0, OUTPUT);
  2758.         YY_BREAK
  2759. case 213:
  2760. YY_RULE_SETUP
  2761. #line 525 "../../../src/glsl/glsl_lexer.ll"
  2762. KEYWORD(110, 100, 0, 0, HVEC2);
  2763.         YY_BREAK
  2764. case 214:
  2765. YY_RULE_SETUP
  2766. #line 526 "../../../src/glsl/glsl_lexer.ll"
  2767. KEYWORD(110, 100, 0, 0, HVEC3);
  2768.         YY_BREAK
  2769. case 215:
  2770. YY_RULE_SETUP
  2771. #line 527 "../../../src/glsl/glsl_lexer.ll"
  2772. KEYWORD(110, 100, 0, 0, HVEC4);
  2773.         YY_BREAK
  2774. case 216:
  2775. YY_RULE_SETUP
  2776. #line 528 "../../../src/glsl/glsl_lexer.ll"
  2777. KEYWORD_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, DVEC2);
  2778.         YY_BREAK
  2779. case 217:
  2780. YY_RULE_SETUP
  2781. #line 529 "../../../src/glsl/glsl_lexer.ll"
  2782. KEYWORD_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, DVEC3);
  2783.         YY_BREAK
  2784. case 218:
  2785. YY_RULE_SETUP
  2786. #line 530 "../../../src/glsl/glsl_lexer.ll"
  2787. KEYWORD_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, DVEC4);
  2788.         YY_BREAK
  2789. case 219:
  2790. YY_RULE_SETUP
  2791. #line 531 "../../../src/glsl/glsl_lexer.ll"
  2792. KEYWORD_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, DMAT2X2);
  2793.         YY_BREAK
  2794. case 220:
  2795. YY_RULE_SETUP
  2796. #line 532 "../../../src/glsl/glsl_lexer.ll"
  2797. KEYWORD_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, DMAT3X3);
  2798.         YY_BREAK
  2799. case 221:
  2800. YY_RULE_SETUP
  2801. #line 533 "../../../src/glsl/glsl_lexer.ll"
  2802. KEYWORD_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, DMAT4X4);
  2803.         YY_BREAK
  2804. case 222:
  2805. YY_RULE_SETUP
  2806. #line 534 "../../../src/glsl/glsl_lexer.ll"
  2807. KEYWORD_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, DMAT2X2);
  2808.         YY_BREAK
  2809. case 223:
  2810. YY_RULE_SETUP
  2811. #line 535 "../../../src/glsl/glsl_lexer.ll"
  2812. KEYWORD_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, DMAT2X3);
  2813.         YY_BREAK
  2814. case 224:
  2815. YY_RULE_SETUP
  2816. #line 536 "../../../src/glsl/glsl_lexer.ll"
  2817. KEYWORD_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, DMAT2X4);
  2818.         YY_BREAK
  2819. case 225:
  2820. YY_RULE_SETUP
  2821. #line 537 "../../../src/glsl/glsl_lexer.ll"
  2822. KEYWORD_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, DMAT3X2);
  2823.         YY_BREAK
  2824. case 226:
  2825. YY_RULE_SETUP
  2826. #line 538 "../../../src/glsl/glsl_lexer.ll"
  2827. KEYWORD_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, DMAT3X3);
  2828.         YY_BREAK
  2829. case 227:
  2830. YY_RULE_SETUP
  2831. #line 539 "../../../src/glsl/glsl_lexer.ll"
  2832. KEYWORD_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, DMAT3X4);
  2833.         YY_BREAK
  2834. case 228:
  2835. YY_RULE_SETUP
  2836. #line 540 "../../../src/glsl/glsl_lexer.ll"
  2837. KEYWORD_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, DMAT4X2);
  2838.         YY_BREAK
  2839. case 229:
  2840. YY_RULE_SETUP
  2841. #line 541 "../../../src/glsl/glsl_lexer.ll"
  2842. KEYWORD_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, DMAT4X3);
  2843.         YY_BREAK
  2844. case 230:
  2845. YY_RULE_SETUP
  2846. #line 542 "../../../src/glsl/glsl_lexer.ll"
  2847. KEYWORD_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, DMAT4X4);
  2848.         YY_BREAK
  2849. case 231:
  2850. YY_RULE_SETUP
  2851. #line 543 "../../../src/glsl/glsl_lexer.ll"
  2852. KEYWORD(110, 100, 0, 0, FVEC2);
  2853.         YY_BREAK
  2854. case 232:
  2855. YY_RULE_SETUP
  2856. #line 544 "../../../src/glsl/glsl_lexer.ll"
  2857. KEYWORD(110, 100, 0, 0, FVEC3);
  2858.         YY_BREAK
  2859. case 233:
  2860. YY_RULE_SETUP
  2861. #line 545 "../../../src/glsl/glsl_lexer.ll"
  2862. KEYWORD(110, 100, 0, 0, FVEC4);
  2863.         YY_BREAK
  2864. case 234:
  2865. YY_RULE_SETUP
  2866. #line 546 "../../../src/glsl/glsl_lexer.ll"
  2867. DEPRECATED_ES_KEYWORD(SAMPLER2DRECT);
  2868.         YY_BREAK
  2869. case 235:
  2870. YY_RULE_SETUP
  2871. #line 547 "../../../src/glsl/glsl_lexer.ll"
  2872. KEYWORD(110, 100, 0, 0, SAMPLER3DRECT);
  2873.         YY_BREAK
  2874. case 236:
  2875. YY_RULE_SETUP
  2876. #line 548 "../../../src/glsl/glsl_lexer.ll"
  2877. DEPRECATED_ES_KEYWORD(SAMPLER2DRECTSHADOW);
  2878.         YY_BREAK
  2879. case 237:
  2880. YY_RULE_SETUP
  2881. #line 549 "../../../src/glsl/glsl_lexer.ll"
  2882. KEYWORD(110, 100, 0, 0, SIZEOF);
  2883.         YY_BREAK
  2884. case 238:
  2885. YY_RULE_SETUP
  2886. #line 550 "../../../src/glsl/glsl_lexer.ll"
  2887. KEYWORD(110, 100, 0, 0, CAST);
  2888.         YY_BREAK
  2889. case 239:
  2890. YY_RULE_SETUP
  2891. #line 551 "../../../src/glsl/glsl_lexer.ll"
  2892. KEYWORD(110, 100, 0, 0, NAMESPACE);
  2893.         YY_BREAK
  2894. case 240:
  2895. YY_RULE_SETUP
  2896. #line 552 "../../../src/glsl/glsl_lexer.ll"
  2897. KEYWORD(110, 100, 0, 0, USING);
  2898.         YY_BREAK
  2899. /* Additional reserved words in GLSL 1.20. */
  2900. case 241:
  2901. YY_RULE_SETUP
  2902. #line 555 "../../../src/glsl/glsl_lexer.ll"
  2903. KEYWORD(120, 100, 130, 100, LOWP);
  2904.         YY_BREAK
  2905. case 242:
  2906. YY_RULE_SETUP
  2907. #line 556 "../../../src/glsl/glsl_lexer.ll"
  2908. KEYWORD(120, 100, 130, 100, MEDIUMP);
  2909.         YY_BREAK
  2910. case 243:
  2911. YY_RULE_SETUP
  2912. #line 557 "../../../src/glsl/glsl_lexer.ll"
  2913. KEYWORD(120, 100, 130, 100, HIGHP);
  2914.         YY_BREAK
  2915. case 244:
  2916. YY_RULE_SETUP
  2917. #line 558 "../../../src/glsl/glsl_lexer.ll"
  2918. KEYWORD(120, 100, 130, 100, PRECISION);
  2919.         YY_BREAK
  2920. /* Additional reserved words in GLSL 1.30. */
  2921. case 245:
  2922. YY_RULE_SETUP
  2923. #line 561 "../../../src/glsl/glsl_lexer.ll"
  2924. KEYWORD(130, 300, 130, 300, CASE);
  2925.         YY_BREAK
  2926. case 246:
  2927. YY_RULE_SETUP
  2928. #line 562 "../../../src/glsl/glsl_lexer.ll"
  2929. KEYWORD(130, 300, 0, 0, COMMON);
  2930.         YY_BREAK
  2931. case 247:
  2932. YY_RULE_SETUP
  2933. #line 563 "../../../src/glsl/glsl_lexer.ll"
  2934. KEYWORD(130, 300, 0, 0, PARTITION);
  2935.         YY_BREAK
  2936. case 248:
  2937. YY_RULE_SETUP
  2938. #line 564 "../../../src/glsl/glsl_lexer.ll"
  2939. KEYWORD(130, 300, 0, 0, ACTIVE);
  2940.         YY_BREAK
  2941. case 249:
  2942. YY_RULE_SETUP
  2943. #line 565 "../../../src/glsl/glsl_lexer.ll"
  2944. KEYWORD(130, 100, 0, 0, SUPERP);
  2945.         YY_BREAK
  2946. case 250:
  2947. YY_RULE_SETUP
  2948. #line 566 "../../../src/glsl/glsl_lexer.ll"
  2949. KEYWORD(130, 300, 140, 0, SAMPLERBUFFER);
  2950.         YY_BREAK
  2951. case 251:
  2952. YY_RULE_SETUP
  2953. #line 567 "../../../src/glsl/glsl_lexer.ll"
  2954. KEYWORD(130, 300, 0, 0, FILTER);
  2955.         YY_BREAK
  2956. case 252:
  2957. YY_RULE_SETUP
  2958. #line 568 "../../../src/glsl/glsl_lexer.ll"
  2959. KEYWORD_WITH_ALT(130, 0, 140, 0, yyextra->ARB_uniform_buffer_object_enable && !yyextra->es_shader, ROW_MAJOR);
  2960.         YY_BREAK
  2961. /* Additional reserved words in GLSL 1.40 */
  2962. case 253:
  2963. YY_RULE_SETUP
  2964. #line 571 "../../../src/glsl/glsl_lexer.ll"
  2965. KEYWORD(140, 300, 140, 0, ISAMPLER2DRECT);
  2966.         YY_BREAK
  2967. case 254:
  2968. YY_RULE_SETUP
  2969. #line 572 "../../../src/glsl/glsl_lexer.ll"
  2970. KEYWORD(140, 300, 140, 0, USAMPLER2DRECT);
  2971.         YY_BREAK
  2972. case 255:
  2973. YY_RULE_SETUP
  2974. #line 573 "../../../src/glsl/glsl_lexer.ll"
  2975. KEYWORD(140, 300, 140, 0, ISAMPLERBUFFER);
  2976.         YY_BREAK
  2977. case 256:
  2978. YY_RULE_SETUP
  2979. #line 574 "../../../src/glsl/glsl_lexer.ll"
  2980. KEYWORD(140, 300, 140, 0, USAMPLERBUFFER);
  2981.         YY_BREAK
  2982. /* Additional reserved words in GLSL ES 3.00 */
  2983. case 257:
  2984. YY_RULE_SETUP
  2985. #line 577 "../../../src/glsl/glsl_lexer.ll"
  2986. KEYWORD(0, 300, 0, 0, RESOURCE);
  2987.         YY_BREAK
  2988. case 258:
  2989. YY_RULE_SETUP
  2990. #line 578 "../../../src/glsl/glsl_lexer.ll"
  2991. KEYWORD(0, 300, 0, 0, PATCH);
  2992.         YY_BREAK
  2993. case 259:
  2994. YY_RULE_SETUP
  2995. #line 579 "../../../src/glsl/glsl_lexer.ll"
  2996. KEYWORD_WITH_ALT(400, 300, 400, 0, yyextra->ARB_gpu_shader5_enable, SAMPLE);
  2997.         YY_BREAK
  2998. case 260:
  2999. YY_RULE_SETUP
  3000. #line 580 "../../../src/glsl/glsl_lexer.ll"
  3001. KEYWORD(0, 300, 0, 0, SUBROUTINE);
  3002.         YY_BREAK
  3003. case 261:
  3004. YY_RULE_SETUP
  3005. #line 583 "../../../src/glsl/glsl_lexer.ll"
  3006. {
  3007.                             struct _mesa_glsl_parse_state *state = yyextra;
  3008.                             void *ctx = state; 
  3009.                             if (state->es_shader && strlen(yytext) > 1024) {
  3010.                                _mesa_glsl_error(yylloc, state,
  3011.                                                 "Identifier `%s' exceeds 1024 characters",
  3012.                                                 yytext);
  3013.                             } else {
  3014.                               yylval->identifier = ralloc_strdup(ctx, yytext);
  3015.                             }
  3016.                             return classify_identifier(state, yytext);
  3017.                         }
  3018.         YY_BREAK
  3019. case 262:
  3020. YY_RULE_SETUP
  3021. #line 596 "../../../src/glsl/glsl_lexer.ll"
  3022. { return yytext[0]; }
  3023.         YY_BREAK
  3024. case 263:
  3025. YY_RULE_SETUP
  3026. #line 598 "../../../src/glsl/glsl_lexer.ll"
  3027. YY_FATAL_ERROR( "flex scanner jammed" );
  3028.         YY_BREAK
  3029. #line 3030 "glsl_lexer.cpp"
  3030. case YY_STATE_EOF(INITIAL):
  3031. case YY_STATE_EOF(PP):
  3032. case YY_STATE_EOF(PRAGMA):
  3033.         yyterminate();
  3034.  
  3035.         case YY_END_OF_BUFFER:
  3036.                 {
  3037.                 /* Amount of text matched not including the EOB char. */
  3038.                 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
  3039.  
  3040.                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
  3041.                 *yy_cp = yyg->yy_hold_char;
  3042.                 YY_RESTORE_YY_MORE_OFFSET
  3043.  
  3044.                 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
  3045.                         {
  3046.                         /* We're scanning a new file or input source.  It's
  3047.                          * possible that this happened because the user
  3048.                          * just pointed yyin at a new source and called
  3049.                          * _mesa_glsl_lexer_lex().  If so, then we have to assure
  3050.                          * consistency between YY_CURRENT_BUFFER and our
  3051.                          * globals.  Here is the right place to do so, because
  3052.                          * this is the first action (other than possibly a
  3053.                          * back-up) that will match for the new input source.
  3054.                          */
  3055.                         yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
  3056.                         YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
  3057.                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
  3058.                         }
  3059.  
  3060.                 /* Note that here we test for yy_c_buf_p "<=" to the position
  3061.                  * of the first EOB in the buffer, since yy_c_buf_p will
  3062.                  * already have been incremented past the NUL character
  3063.                  * (since all states make transitions on EOB to the
  3064.                  * end-of-buffer state).  Contrast this with the test
  3065.                  * in input().
  3066.                  */
  3067.                 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
  3068.                         { /* This was really a NUL. */
  3069.                         yy_state_type yy_next_state;
  3070.  
  3071.                         yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
  3072.  
  3073.                         yy_current_state = yy_get_previous_state( yyscanner );
  3074.  
  3075.                         /* Okay, we're now positioned to make the NUL
  3076.                          * transition.  We couldn't have
  3077.                          * yy_get_previous_state() go ahead and do it
  3078.                          * for us because it doesn't know how to deal
  3079.                          * with the possibility of jamming (and we don't
  3080.                          * want to build jamming into it because then it
  3081.                          * will run more slowly).
  3082.                          */
  3083.  
  3084.                         yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
  3085.  
  3086.                         yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
  3087.  
  3088.                         if ( yy_next_state )
  3089.                                 {
  3090.                                 /* Consume the NUL. */
  3091.                                 yy_cp = ++yyg->yy_c_buf_p;
  3092.                                 yy_current_state = yy_next_state;
  3093.                                 goto yy_match;
  3094.                                 }
  3095.  
  3096.                         else
  3097.                                 {
  3098.                                 yy_cp = yyg->yy_last_accepting_cpos;
  3099.                                 yy_current_state = yyg->yy_last_accepting_state;
  3100.                                 goto yy_find_action;
  3101.                                 }
  3102.                         }
  3103.  
  3104.                 else switch ( yy_get_next_buffer( yyscanner ) )
  3105.                         {
  3106.                         case EOB_ACT_END_OF_FILE:
  3107.                                 {
  3108.                                 yyg->yy_did_buffer_switch_on_eof = 0;
  3109.  
  3110.                                 if ( _mesa_glsl_lexer_wrap(yyscanner ) )
  3111.                                         {
  3112.                                         /* Note: because we've taken care in
  3113.                                          * yy_get_next_buffer() to have set up
  3114.                                          * yytext, we can now set up
  3115.                                          * yy_c_buf_p so that if some total
  3116.                                          * hoser (like flex itself) wants to
  3117.                                          * call the scanner after we return the
  3118.                                          * YY_NULL, it'll still work - another
  3119.                                          * YY_NULL will get returned.
  3120.                                          */
  3121.                                         yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
  3122.  
  3123.                                         yy_act = YY_STATE_EOF(YY_START);
  3124.                                         goto do_action;
  3125.                                         }
  3126.  
  3127.                                 else
  3128.                                         {
  3129.                                         if ( ! yyg->yy_did_buffer_switch_on_eof )
  3130.                                                 YY_NEW_FILE;
  3131.                                         }
  3132.                                 break;
  3133.                                 }
  3134.  
  3135.                         case EOB_ACT_CONTINUE_SCAN:
  3136.                                 yyg->yy_c_buf_p =
  3137.                                         yyg->yytext_ptr + yy_amount_of_matched_text;
  3138.  
  3139.                                 yy_current_state = yy_get_previous_state( yyscanner );
  3140.  
  3141.                                 yy_cp = yyg->yy_c_buf_p;
  3142.                                 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
  3143.                                 goto yy_match;
  3144.  
  3145.                         case EOB_ACT_LAST_MATCH:
  3146.                                 yyg->yy_c_buf_p =
  3147.                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
  3148.  
  3149.                                 yy_current_state = yy_get_previous_state( yyscanner );
  3150.  
  3151.                                 yy_cp = yyg->yy_c_buf_p;
  3152.                                 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
  3153.                                 goto yy_find_action;
  3154.                         }
  3155.                 break;
  3156.                 }
  3157.  
  3158.         default:
  3159.                 YY_FATAL_ERROR(
  3160.                         "fatal flex scanner internal error--no action found" );
  3161.         } /* end of action switch */
  3162.                 } /* end of scanning one token */
  3163.         } /* end of user's declarations */
  3164. } /* end of _mesa_glsl_lexer_lex */
  3165.  
  3166. /* yy_get_next_buffer - try to read in a new buffer
  3167.  *
  3168.  * Returns a code representing an action:
  3169.  *      EOB_ACT_LAST_MATCH -
  3170.  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
  3171.  *      EOB_ACT_END_OF_FILE - end of file
  3172.  */
  3173. static int yy_get_next_buffer (yyscan_t yyscanner)
  3174. {
  3175.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3176.         register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
  3177.         register char *source = yyg->yytext_ptr;
  3178.         register int number_to_move, i;
  3179.         int ret_val;
  3180.  
  3181.         if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
  3182.                 YY_FATAL_ERROR(
  3183.                 "fatal flex scanner internal error--end of buffer missed" );
  3184.  
  3185.         if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
  3186.                 { /* Don't try to fill the buffer, so this is an EOF. */
  3187.                 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
  3188.                         {
  3189.                         /* We matched a single character, the EOB, so
  3190.                          * treat this as a final EOF.
  3191.                          */
  3192.                         return EOB_ACT_END_OF_FILE;
  3193.                         }
  3194.  
  3195.                 else
  3196.                         {
  3197.                         /* We matched some text prior to the EOB, first
  3198.                          * process it.
  3199.                          */
  3200.                         return EOB_ACT_LAST_MATCH;
  3201.                         }
  3202.                 }
  3203.  
  3204.         /* Try to read more data. */
  3205.  
  3206.         /* First move last chars to start of buffer. */
  3207.         number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
  3208.  
  3209.         for ( i = 0; i < number_to_move; ++i )
  3210.                 *(dest++) = *(source++);
  3211.  
  3212.         if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
  3213.                 /* don't do the read, it's not guaranteed to return an EOF,
  3214.                  * just force an EOF
  3215.                  */
  3216.                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
  3217.  
  3218.         else
  3219.                 {
  3220.                         yy_size_t num_to_read =
  3221.                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
  3222.  
  3223.                 while ( num_to_read <= 0 )
  3224.                         { /* Not enough room in the buffer - grow it. */
  3225.  
  3226.                         /* just a shorter name for the current buffer */
  3227.                         YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
  3228.  
  3229.                         int yy_c_buf_p_offset =
  3230.                                 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
  3231.  
  3232.                         if ( b->yy_is_our_buffer )
  3233.                                 {
  3234.                                 yy_size_t new_size = b->yy_buf_size * 2;
  3235.  
  3236.                                 if ( new_size <= 0 )
  3237.                                         b->yy_buf_size += b->yy_buf_size / 8;
  3238.                                 else
  3239.                                         b->yy_buf_size *= 2;
  3240.  
  3241.                                 b->yy_ch_buf = (char *)
  3242.                                         /* Include room in for 2 EOB chars. */
  3243.                                         _mesa_glsl_lexer_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
  3244.                                 }
  3245.                         else
  3246.                                 /* Can't grow it, we don't own it. */
  3247.                                 b->yy_ch_buf = 0;
  3248.  
  3249.                         if ( ! b->yy_ch_buf )
  3250.                                 YY_FATAL_ERROR(
  3251.                                 "fatal error - scanner input buffer overflow" );
  3252.  
  3253.                         yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
  3254.  
  3255.                         num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
  3256.                                                 number_to_move - 1;
  3257.  
  3258.                         }
  3259.  
  3260.                 if ( num_to_read > YY_READ_BUF_SIZE )
  3261.                         num_to_read = YY_READ_BUF_SIZE;
  3262.  
  3263.                 /* Read in more data. */
  3264.                 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
  3265.                         yyg->yy_n_chars, num_to_read );
  3266.  
  3267.                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
  3268.                 }
  3269.  
  3270.         if ( yyg->yy_n_chars == 0 )
  3271.                 {
  3272.                 if ( number_to_move == YY_MORE_ADJ )
  3273.                         {
  3274.                         ret_val = EOB_ACT_END_OF_FILE;
  3275.                         _mesa_glsl_lexer_restart(yyin  ,yyscanner);
  3276.                         }
  3277.  
  3278.                 else
  3279.                         {
  3280.                         ret_val = EOB_ACT_LAST_MATCH;
  3281.                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
  3282.                                 YY_BUFFER_EOF_PENDING;
  3283.                         }
  3284.                 }
  3285.  
  3286.         else
  3287.                 ret_val = EOB_ACT_CONTINUE_SCAN;
  3288.  
  3289.         if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
  3290.                 /* Extend the array by 50%, plus the number we really need. */
  3291.                 yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
  3292.                 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) _mesa_glsl_lexer_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
  3293.                 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
  3294.                         YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
  3295.         }
  3296.  
  3297.         yyg->yy_n_chars += number_to_move;
  3298.         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
  3299.         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
  3300.  
  3301.         yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
  3302.  
  3303.         return ret_val;
  3304. }
  3305.  
  3306. /* yy_get_previous_state - get the state just before the EOB char was reached */
  3307.  
  3308.     static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
  3309. {
  3310.         register yy_state_type yy_current_state;
  3311.         register char *yy_cp;
  3312.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3313.  
  3314.         yy_current_state = yyg->yy_start;
  3315.         yy_current_state += YY_AT_BOL();
  3316.  
  3317.         for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
  3318.                 {
  3319.                 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
  3320.                 if ( yy_accept[yy_current_state] )
  3321.                         {
  3322.                         yyg->yy_last_accepting_state = yy_current_state;
  3323.                         yyg->yy_last_accepting_cpos = yy_cp;
  3324.                         }
  3325.                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  3326.                         {
  3327.                         yy_current_state = (int) yy_def[yy_current_state];
  3328.                         if ( yy_current_state >= 1038 )
  3329.                                 yy_c = yy_meta[(unsigned int) yy_c];
  3330.                         }
  3331.                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  3332.                 }
  3333.  
  3334.         return yy_current_state;
  3335. }
  3336.  
  3337. /* yy_try_NUL_trans - try to make a transition on the NUL character
  3338.  *
  3339.  * synopsis
  3340.  *      next_state = yy_try_NUL_trans( current_state );
  3341.  */
  3342.     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state , yyscan_t yyscanner)
  3343. {
  3344.         register int yy_is_jam;
  3345.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
  3346.         register char *yy_cp = yyg->yy_c_buf_p;
  3347.  
  3348.         register YY_CHAR yy_c = 1;
  3349.         if ( yy_accept[yy_current_state] )
  3350.                 {
  3351.                 yyg->yy_last_accepting_state = yy_current_state;
  3352.                 yyg->yy_last_accepting_cpos = yy_cp;
  3353.                 }
  3354.         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  3355.                 {
  3356.                 yy_current_state = (int) yy_def[yy_current_state];
  3357.                 if ( yy_current_state >= 1038 )
  3358.                         yy_c = yy_meta[(unsigned int) yy_c];
  3359.                 }
  3360.         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  3361.         yy_is_jam = (yy_current_state == 1037);
  3362.  
  3363.         (void)yyg;
  3364.         return yy_is_jam ? 0 : yy_current_state;
  3365. }
  3366.  
  3367. #ifndef YY_NO_INPUT
  3368. #ifdef __cplusplus
  3369.     static int yyinput (yyscan_t yyscanner)
  3370. #else
  3371.     static int input  (yyscan_t yyscanner)
  3372. #endif
  3373.  
  3374. {
  3375.         int c;
  3376.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3377.  
  3378.         *yyg->yy_c_buf_p = yyg->yy_hold_char;
  3379.  
  3380.         if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
  3381.                 {
  3382.                 /* yy_c_buf_p now points to the character we want to return.
  3383.                  * If this occurs *before* the EOB characters, then it's a
  3384.                  * valid NUL; if not, then we've hit the end of the buffer.
  3385.                  */
  3386.                 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
  3387.                         /* This was really a NUL. */
  3388.                         *yyg->yy_c_buf_p = '\0';
  3389.  
  3390.                 else
  3391.                         { /* need more input */
  3392.                         yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
  3393.                         ++yyg->yy_c_buf_p;
  3394.  
  3395.                         switch ( yy_get_next_buffer( yyscanner ) )
  3396.                                 {
  3397.                                 case EOB_ACT_LAST_MATCH:
  3398.                                         /* This happens because yy_g_n_b()
  3399.                                          * sees that we've accumulated a
  3400.                                          * token and flags that we need to
  3401.                                          * try matching the token before
  3402.                                          * proceeding.  But for input(),
  3403.                                          * there's no matching to consider.
  3404.                                          * So convert the EOB_ACT_LAST_MATCH
  3405.                                          * to EOB_ACT_END_OF_FILE.
  3406.                                          */
  3407.  
  3408.                                         /* Reset buffer status. */
  3409.                                         _mesa_glsl_lexer_restart(yyin ,yyscanner);
  3410.  
  3411.                                         /*FALLTHROUGH*/
  3412.  
  3413.                                 case EOB_ACT_END_OF_FILE:
  3414.                                         {
  3415.                                         if ( _mesa_glsl_lexer_wrap(yyscanner ) )
  3416.                                                 return EOF;
  3417.  
  3418.                                         if ( ! yyg->yy_did_buffer_switch_on_eof )
  3419.                                                 YY_NEW_FILE;
  3420. #ifdef __cplusplus
  3421.                                         return yyinput(yyscanner);
  3422. #else
  3423.                                         return input(yyscanner);
  3424. #endif
  3425.                                         }
  3426.  
  3427.                                 case EOB_ACT_CONTINUE_SCAN:
  3428.                                         yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
  3429.                                         break;
  3430.                                 }
  3431.                         }
  3432.                 }
  3433.  
  3434.         c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
  3435.         *yyg->yy_c_buf_p = '\0';        /* preserve yytext */
  3436.         yyg->yy_hold_char = *++yyg->yy_c_buf_p;
  3437.  
  3438.         YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
  3439.  
  3440.         return c;
  3441. }
  3442. #endif  /* ifndef YY_NO_INPUT */
  3443.  
  3444. /** Immediately switch to a different input stream.
  3445.  * @param input_file A readable stream.
  3446.  * @param yyscanner The scanner object.
  3447.  * @note This function does not reset the start condition to @c INITIAL .
  3448.  */
  3449.     void _mesa_glsl_lexer_restart  (FILE * input_file , yyscan_t yyscanner)
  3450. {
  3451.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3452.  
  3453.         if ( ! YY_CURRENT_BUFFER ){
  3454.         _mesa_glsl_lexer_ensure_buffer_stack (yyscanner);
  3455.                 YY_CURRENT_BUFFER_LVALUE =
  3456.             _mesa_glsl_lexer__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
  3457.         }
  3458.  
  3459.         _mesa_glsl_lexer__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
  3460.         _mesa_glsl_lexer__load_buffer_state(yyscanner );
  3461. }
  3462.  
  3463. /** Switch to a different input buffer.
  3464.  * @param new_buffer The new input buffer.
  3465.  * @param yyscanner The scanner object.
  3466.  */
  3467.     void _mesa_glsl_lexer__switch_to_buffer  (YY_BUFFER_STATE  new_buffer , yyscan_t yyscanner)
  3468. {
  3469.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3470.  
  3471.         /* TODO. We should be able to replace this entire function body
  3472.          * with
  3473.          *              _mesa_glsl_lexer_pop_buffer_state();
  3474.          *              _mesa_glsl_lexer_push_buffer_state(new_buffer);
  3475.      */
  3476.         _mesa_glsl_lexer_ensure_buffer_stack (yyscanner);
  3477.         if ( YY_CURRENT_BUFFER == new_buffer )
  3478.                 return;
  3479.  
  3480.         if ( YY_CURRENT_BUFFER )
  3481.                 {
  3482.                 /* Flush out information for old buffer. */
  3483.                 *yyg->yy_c_buf_p = yyg->yy_hold_char;
  3484.                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
  3485.                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
  3486.                 }
  3487.  
  3488.         YY_CURRENT_BUFFER_LVALUE = new_buffer;
  3489.         _mesa_glsl_lexer__load_buffer_state(yyscanner );
  3490.  
  3491.         /* We don't actually know whether we did this switch during
  3492.          * EOF (_mesa_glsl_lexer_wrap()) processing, but the only time this flag
  3493.          * is looked at is after _mesa_glsl_lexer_wrap() is called, so it's safe
  3494.          * to go ahead and always set it.
  3495.          */
  3496.         yyg->yy_did_buffer_switch_on_eof = 1;
  3497. }
  3498.  
  3499. static void _mesa_glsl_lexer__load_buffer_state  (yyscan_t yyscanner)
  3500. {
  3501.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3502.         yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
  3503.         yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
  3504.         yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
  3505.         yyg->yy_hold_char = *yyg->yy_c_buf_p;
  3506. }
  3507.  
  3508. /** Allocate and initialize an input buffer state.
  3509.  * @param file A readable stream.
  3510.  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
  3511.  * @param yyscanner The scanner object.
  3512.  * @return the allocated buffer state.
  3513.  */
  3514.     YY_BUFFER_STATE _mesa_glsl_lexer__create_buffer  (FILE * file, int  size , yyscan_t yyscanner)
  3515. {
  3516.         YY_BUFFER_STATE b;
  3517.    
  3518.         b = (YY_BUFFER_STATE) _mesa_glsl_lexer_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
  3519.         if ( ! b )
  3520.                 YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl_lexer__create_buffer()" );
  3521.  
  3522.         b->yy_buf_size = size;
  3523.  
  3524.         /* yy_ch_buf has to be 2 characters longer than the size given because
  3525.          * we need to put in 2 end-of-buffer characters.
  3526.          */
  3527.         b->yy_ch_buf = (char *) _mesa_glsl_lexer_alloc(b->yy_buf_size + 2 ,yyscanner );
  3528.         if ( ! b->yy_ch_buf )
  3529.                 YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl_lexer__create_buffer()" );
  3530.  
  3531.         b->yy_is_our_buffer = 1;
  3532.  
  3533.         _mesa_glsl_lexer__init_buffer(b,file ,yyscanner);
  3534.  
  3535.         return b;
  3536. }
  3537.  
  3538. /** Destroy the buffer.
  3539.  * @param b a buffer created with _mesa_glsl_lexer__create_buffer()
  3540.  * @param yyscanner The scanner object.
  3541.  */
  3542.     void _mesa_glsl_lexer__delete_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
  3543. {
  3544.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3545.  
  3546.         if ( ! b )
  3547.                 return;
  3548.  
  3549.         if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
  3550.                 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
  3551.  
  3552.         if ( b->yy_is_our_buffer )
  3553.                 _mesa_glsl_lexer_free((void *) b->yy_ch_buf ,yyscanner );
  3554.  
  3555.         _mesa_glsl_lexer_free((void *) b ,yyscanner );
  3556. }
  3557.  
  3558. /* Initializes or reinitializes a buffer.
  3559.  * This function is sometimes called more than once on the same buffer,
  3560.  * such as during a _mesa_glsl_lexer_restart() or at EOF.
  3561.  */
  3562.     static void _mesa_glsl_lexer__init_buffer  (YY_BUFFER_STATE  b, FILE * file , yyscan_t yyscanner)
  3563.  
  3564. {
  3565.         int oerrno = errno;
  3566.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3567.  
  3568.         _mesa_glsl_lexer__flush_buffer(b ,yyscanner);
  3569.  
  3570.         b->yy_input_file = file;
  3571.         b->yy_fill_buffer = 1;
  3572.  
  3573.     /* If b is the current buffer, then _mesa_glsl_lexer__init_buffer was _probably_
  3574.      * called from _mesa_glsl_lexer_restart() or through yy_get_next_buffer.
  3575.      * In that case, we don't want to reset the lineno or column.
  3576.      */
  3577.     if (b != YY_CURRENT_BUFFER){
  3578.         b->yy_bs_lineno = 1;
  3579.         b->yy_bs_column = 0;
  3580.     }
  3581.  
  3582.         b->yy_is_interactive = 0;
  3583.    
  3584.         errno = oerrno;
  3585. }
  3586.  
  3587. /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
  3588.  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
  3589.  * @param yyscanner The scanner object.
  3590.  */
  3591.     void _mesa_glsl_lexer__flush_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
  3592. {
  3593.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3594.         if ( ! b )
  3595.                 return;
  3596.  
  3597.         b->yy_n_chars = 0;
  3598.  
  3599.         /* We always need two end-of-buffer characters.  The first causes
  3600.          * a transition to the end-of-buffer state.  The second causes
  3601.          * a jam in that state.
  3602.          */
  3603.         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
  3604.         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
  3605.  
  3606.         b->yy_buf_pos = &b->yy_ch_buf[0];
  3607.  
  3608.         b->yy_at_bol = 1;
  3609.         b->yy_buffer_status = YY_BUFFER_NEW;
  3610.  
  3611.         if ( b == YY_CURRENT_BUFFER )
  3612.                 _mesa_glsl_lexer__load_buffer_state(yyscanner );
  3613. }
  3614.  
  3615. /** Pushes the new state onto the stack. The new state becomes
  3616.  *  the current state. This function will allocate the stack
  3617.  *  if necessary.
  3618.  *  @param new_buffer The new state.
  3619.  *  @param yyscanner The scanner object.
  3620.  */
  3621. void _mesa_glsl_lexer_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
  3622. {
  3623.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3624.         if (new_buffer == NULL)
  3625.                 return;
  3626.  
  3627.         _mesa_glsl_lexer_ensure_buffer_stack(yyscanner);
  3628.  
  3629.         /* This block is copied from _mesa_glsl_lexer__switch_to_buffer. */
  3630.         if ( YY_CURRENT_BUFFER )
  3631.                 {
  3632.                 /* Flush out information for old buffer. */
  3633.                 *yyg->yy_c_buf_p = yyg->yy_hold_char;
  3634.                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
  3635.                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
  3636.                 }
  3637.  
  3638.         /* Only push if top exists. Otherwise, replace top. */
  3639.         if (YY_CURRENT_BUFFER)
  3640.                 yyg->yy_buffer_stack_top++;
  3641.         YY_CURRENT_BUFFER_LVALUE = new_buffer;
  3642.  
  3643.         /* copied from _mesa_glsl_lexer__switch_to_buffer. */
  3644.         _mesa_glsl_lexer__load_buffer_state(yyscanner );
  3645.         yyg->yy_did_buffer_switch_on_eof = 1;
  3646. }
  3647.  
  3648. /** Removes and deletes the top of the stack, if present.
  3649.  *  The next element becomes the new top.
  3650.  *  @param yyscanner The scanner object.
  3651.  */
  3652. void _mesa_glsl_lexer_pop_buffer_state (yyscan_t yyscanner)
  3653. {
  3654.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3655.         if (!YY_CURRENT_BUFFER)
  3656.                 return;
  3657.  
  3658.         _mesa_glsl_lexer__delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
  3659.         YY_CURRENT_BUFFER_LVALUE = NULL;
  3660.         if (yyg->yy_buffer_stack_top > 0)
  3661.                 --yyg->yy_buffer_stack_top;
  3662.  
  3663.         if (YY_CURRENT_BUFFER) {
  3664.                 _mesa_glsl_lexer__load_buffer_state(yyscanner );
  3665.                 yyg->yy_did_buffer_switch_on_eof = 1;
  3666.         }
  3667. }
  3668.  
  3669. /* Allocates the stack if it does not exist.
  3670.  *  Guarantees space for at least one push.
  3671.  */
  3672. static void _mesa_glsl_lexer_ensure_buffer_stack (yyscan_t yyscanner)
  3673. {
  3674.         yy_size_t num_to_alloc;
  3675.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3676.  
  3677.         if (!yyg->yy_buffer_stack) {
  3678.  
  3679.                 /* First allocation is just for 2 elements, since we don't know if this
  3680.                  * scanner will even need a stack. We use 2 instead of 1 to avoid an
  3681.                  * immediate realloc on the next call.
  3682.          */
  3683.                 num_to_alloc = 1;
  3684.                 yyg->yy_buffer_stack = (struct yy_buffer_state**)_mesa_glsl_lexer_alloc
  3685.                                                                 (num_to_alloc * sizeof(struct yy_buffer_state*)
  3686.                                                                 , yyscanner);
  3687.                 if ( ! yyg->yy_buffer_stack )
  3688.                         YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl_lexer_ensure_buffer_stack()" );
  3689.                                                                  
  3690.                 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
  3691.                                
  3692.                 yyg->yy_buffer_stack_max = num_to_alloc;
  3693.                 yyg->yy_buffer_stack_top = 0;
  3694.                 return;
  3695.         }
  3696.  
  3697.         if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
  3698.  
  3699.                 /* Increase the buffer to prepare for a possible push. */
  3700.                 int grow_size = 8 /* arbitrary grow size */;
  3701.  
  3702.                 num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
  3703.                 yyg->yy_buffer_stack = (struct yy_buffer_state**)_mesa_glsl_lexer_realloc
  3704.                                                                 (yyg->yy_buffer_stack,
  3705.                                                                 num_to_alloc * sizeof(struct yy_buffer_state*)
  3706.                                                                 , yyscanner);
  3707.                 if ( ! yyg->yy_buffer_stack )
  3708.                         YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl_lexer_ensure_buffer_stack()" );
  3709.  
  3710.                 /* zero only the new slots.*/
  3711.                 memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
  3712.                 yyg->yy_buffer_stack_max = num_to_alloc;
  3713.         }
  3714. }
  3715.  
  3716. /** Setup the input buffer state to scan directly from a user-specified character buffer.
  3717.  * @param base the character buffer
  3718.  * @param size the size in bytes of the character buffer
  3719.  * @param yyscanner The scanner object.
  3720.  * @return the newly allocated buffer state object.
  3721.  */
  3722. YY_BUFFER_STATE _mesa_glsl_lexer__scan_buffer  (char * base, yy_size_t  size , yyscan_t yyscanner)
  3723. {
  3724.         YY_BUFFER_STATE b;
  3725.    
  3726.         if ( size < 2 ||
  3727.              base[size-2] != YY_END_OF_BUFFER_CHAR ||
  3728.              base[size-1] != YY_END_OF_BUFFER_CHAR )
  3729.                 /* They forgot to leave room for the EOB's. */
  3730.                 return 0;
  3731.  
  3732.         b = (YY_BUFFER_STATE) _mesa_glsl_lexer_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
  3733.         if ( ! b )
  3734.                 YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl_lexer__scan_buffer()" );
  3735.  
  3736.         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
  3737.         b->yy_buf_pos = b->yy_ch_buf = base;
  3738.         b->yy_is_our_buffer = 0;
  3739.         b->yy_input_file = 0;
  3740.         b->yy_n_chars = b->yy_buf_size;
  3741.         b->yy_is_interactive = 0;
  3742.         b->yy_at_bol = 1;
  3743.         b->yy_fill_buffer = 0;
  3744.         b->yy_buffer_status = YY_BUFFER_NEW;
  3745.  
  3746.         _mesa_glsl_lexer__switch_to_buffer(b ,yyscanner );
  3747.  
  3748.         return b;
  3749. }
  3750.  
  3751. /** Setup the input buffer state to scan a string. The next call to _mesa_glsl_lexer_lex() will
  3752.  * scan from a @e copy of @a str.
  3753.  * @param yystr a NUL-terminated string to scan
  3754.  * @param yyscanner The scanner object.
  3755.  * @return the newly allocated buffer state object.
  3756.  * @note If you want to scan bytes that may contain NUL values, then use
  3757.  *       _mesa_glsl_lexer__scan_bytes() instead.
  3758.  */
  3759. YY_BUFFER_STATE _mesa_glsl_lexer__scan_string (yyconst char * yystr , yyscan_t yyscanner)
  3760. {
  3761.    
  3762.         return _mesa_glsl_lexer__scan_bytes(yystr,strlen(yystr) ,yyscanner);
  3763. }
  3764.  
  3765. /** Setup the input buffer state to scan the given bytes. The next call to _mesa_glsl_lexer_lex() will
  3766.  * scan from a @e copy of @a bytes.
  3767.  * @param yybytes the byte buffer to scan
  3768.  * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
  3769.  * @param yyscanner The scanner object.
  3770.  * @return the newly allocated buffer state object.
  3771.  */
  3772. YY_BUFFER_STATE _mesa_glsl_lexer__scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len , yyscan_t yyscanner)
  3773. {
  3774.         YY_BUFFER_STATE b;
  3775.         char *buf;
  3776.         yy_size_t n;
  3777.         yy_size_t i;
  3778.    
  3779.         /* Get memory for full buffer, including space for trailing EOB's. */
  3780.         n = _yybytes_len + 2;
  3781.         buf = (char *) _mesa_glsl_lexer_alloc(n ,yyscanner );
  3782.         if ( ! buf )
  3783.                 YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl_lexer__scan_bytes()" );
  3784.  
  3785.         for ( i = 0; i < _yybytes_len; ++i )
  3786.                 buf[i] = yybytes[i];
  3787.  
  3788.         buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
  3789.  
  3790.         b = _mesa_glsl_lexer__scan_buffer(buf,n ,yyscanner);
  3791.         if ( ! b )
  3792.                 YY_FATAL_ERROR( "bad buffer in _mesa_glsl_lexer__scan_bytes()" );
  3793.  
  3794.         /* It's okay to grow etc. this buffer, and we should throw it
  3795.          * away when we're done.
  3796.          */
  3797.         b->yy_is_our_buffer = 1;
  3798.  
  3799.         return b;
  3800. }
  3801.  
  3802. #ifndef YY_EXIT_FAILURE
  3803. #define YY_EXIT_FAILURE 2
  3804. #endif
  3805.  
  3806. static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
  3807. {
  3808.         (void) fprintf( stderr, "%s\n", msg );
  3809.         exit( YY_EXIT_FAILURE );
  3810. }
  3811.  
  3812. /* Redefine yyless() so it works in section 3 code. */
  3813.  
  3814. #undef yyless
  3815. #define yyless(n) \
  3816.         do \
  3817.                 { \
  3818.                 /* Undo effects of setting up yytext. */ \
  3819.         int yyless_macro_arg = (n); \
  3820.         YY_LESS_LINENO(yyless_macro_arg);\
  3821.                 yytext[yyleng] = yyg->yy_hold_char; \
  3822.                 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
  3823.                 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
  3824.                 *yyg->yy_c_buf_p = '\0'; \
  3825.                 yyleng = yyless_macro_arg; \
  3826.                 } \
  3827.         while ( 0 )
  3828.  
  3829. /* Accessor  methods (get/set functions) to struct members. */
  3830.  
  3831. /** Get the user-defined data for this scanner.
  3832.  * @param yyscanner The scanner object.
  3833.  */
  3834. YY_EXTRA_TYPE _mesa_glsl_lexer_get_extra  (yyscan_t yyscanner)
  3835. {
  3836.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3837.     return yyextra;
  3838. }
  3839.  
  3840. /** Get the current line number.
  3841.  * @param yyscanner The scanner object.
  3842.  */
  3843. int _mesa_glsl_lexer_get_lineno  (yyscan_t yyscanner)
  3844. {
  3845.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3846.    
  3847.         if (! YY_CURRENT_BUFFER)
  3848.             return 0;
  3849.    
  3850.     return yylineno;
  3851. }
  3852.  
  3853. /** Get the current column number.
  3854.  * @param yyscanner The scanner object.
  3855.  */
  3856. int _mesa_glsl_lexer_get_column  (yyscan_t yyscanner)
  3857. {
  3858.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3859.    
  3860.         if (! YY_CURRENT_BUFFER)
  3861.             return 0;
  3862.    
  3863.     return yycolumn;
  3864. }
  3865.  
  3866. /** Get the input stream.
  3867.  * @param yyscanner The scanner object.
  3868.  */
  3869. FILE *_mesa_glsl_lexer_get_in  (yyscan_t yyscanner)
  3870. {
  3871.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3872.     return yyin;
  3873. }
  3874.  
  3875. /** Get the output stream.
  3876.  * @param yyscanner The scanner object.
  3877.  */
  3878. FILE *_mesa_glsl_lexer_get_out  (yyscan_t yyscanner)
  3879. {
  3880.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3881.     return yyout;
  3882. }
  3883.  
  3884. /** Get the length of the current token.
  3885.  * @param yyscanner The scanner object.
  3886.  */
  3887. yy_size_t _mesa_glsl_lexer_get_leng  (yyscan_t yyscanner)
  3888. {
  3889.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3890.     return yyleng;
  3891. }
  3892.  
  3893. /** Get the current token.
  3894.  * @param yyscanner The scanner object.
  3895.  */
  3896.  
  3897. char *_mesa_glsl_lexer_get_text  (yyscan_t yyscanner)
  3898. {
  3899.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3900.     return yytext;
  3901. }
  3902.  
  3903. /** Set the user-defined data. This data is never touched by the scanner.
  3904.  * @param user_defined The data to be associated with this scanner.
  3905.  * @param yyscanner The scanner object.
  3906.  */
  3907. void _mesa_glsl_lexer_set_extra (YY_EXTRA_TYPE  user_defined , yyscan_t yyscanner)
  3908. {
  3909.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3910.     yyextra = user_defined ;
  3911. }
  3912.  
  3913. /** Set the current line number.
  3914.  * @param line_number
  3915.  * @param yyscanner The scanner object.
  3916.  */
  3917. void _mesa_glsl_lexer_set_lineno (int  line_number , yyscan_t yyscanner)
  3918. {
  3919.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3920.  
  3921.         /* lineno is only valid if an input buffer exists. */
  3922.         if (! YY_CURRENT_BUFFER )
  3923.            YY_FATAL_ERROR( "_mesa_glsl_lexer_set_lineno called with no buffer" );
  3924.    
  3925.     yylineno = line_number;
  3926. }
  3927.  
  3928. /** Set the current column.
  3929.  * @param line_number
  3930.  * @param yyscanner The scanner object.
  3931.  */
  3932. void _mesa_glsl_lexer_set_column (int  column_no , yyscan_t yyscanner)
  3933. {
  3934.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3935.  
  3936.         /* column is only valid if an input buffer exists. */
  3937.         if (! YY_CURRENT_BUFFER )
  3938.            YY_FATAL_ERROR( "_mesa_glsl_lexer_set_column called with no buffer" );
  3939.    
  3940.     yycolumn = column_no;
  3941. }
  3942.  
  3943. /** Set the input stream. This does not discard the current
  3944.  * input buffer.
  3945.  * @param in_str A readable stream.
  3946.  * @param yyscanner The scanner object.
  3947.  * @see _mesa_glsl_lexer__switch_to_buffer
  3948.  */
  3949. void _mesa_glsl_lexer_set_in (FILE *  in_str , yyscan_t yyscanner)
  3950. {
  3951.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3952.     yyin = in_str ;
  3953. }
  3954.  
  3955. void _mesa_glsl_lexer_set_out (FILE *  out_str , yyscan_t yyscanner)
  3956. {
  3957.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3958.     yyout = out_str ;
  3959. }
  3960.  
  3961. int _mesa_glsl_lexer_get_debug  (yyscan_t yyscanner)
  3962. {
  3963.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3964.     return yy_flex_debug;
  3965. }
  3966.  
  3967. void _mesa_glsl_lexer_set_debug (int  bdebug , yyscan_t yyscanner)
  3968. {
  3969.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3970.     yy_flex_debug = bdebug ;
  3971. }
  3972.  
  3973. /* Accessor methods for yylval and yylloc */
  3974.  
  3975. YYSTYPE * _mesa_glsl_lexer_get_lval  (yyscan_t yyscanner)
  3976. {
  3977.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3978.     return yylval;
  3979. }
  3980.  
  3981. void _mesa_glsl_lexer_set_lval (YYSTYPE *  yylval_param , yyscan_t yyscanner)
  3982. {
  3983.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3984.     yylval = yylval_param;
  3985. }
  3986.  
  3987. YYLTYPE *_mesa_glsl_lexer_get_lloc  (yyscan_t yyscanner)
  3988. {
  3989.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3990.     return yylloc;
  3991. }
  3992.    
  3993. void _mesa_glsl_lexer_set_lloc (YYLTYPE *  yylloc_param , yyscan_t yyscanner)
  3994. {
  3995.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  3996.     yylloc = yylloc_param;
  3997. }
  3998.    
  3999. /* User-visible API */
  4000.  
  4001. /* _mesa_glsl_lexer_lex_init is special because it creates the scanner itself, so it is
  4002.  * the ONLY reentrant function that doesn't take the scanner as the last argument.
  4003.  * That's why we explicitly handle the declaration, instead of using our macros.
  4004.  */
  4005.  
  4006. int _mesa_glsl_lexer_lex_init(yyscan_t* ptr_yy_globals)
  4007.  
  4008. {
  4009.     if (ptr_yy_globals == NULL){
  4010.         errno = EINVAL;
  4011.         return 1;
  4012.     }
  4013.  
  4014.     *ptr_yy_globals = (yyscan_t) _mesa_glsl_lexer_alloc ( sizeof( struct yyguts_t ), NULL );
  4015.  
  4016.     if (*ptr_yy_globals == NULL){
  4017.         errno = ENOMEM;
  4018.         return 1;
  4019.     }
  4020.  
  4021.     /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
  4022.     memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
  4023.  
  4024.     return yy_init_globals ( *ptr_yy_globals );
  4025. }
  4026.  
  4027. /* _mesa_glsl_lexer_lex_init_extra has the same functionality as _mesa_glsl_lexer_lex_init, but follows the
  4028.  * convention of taking the scanner as the last argument. Note however, that
  4029.  * this is a *pointer* to a scanner, as it will be allocated by this call (and
  4030.  * is the reason, too, why this function also must handle its own declaration).
  4031.  * The user defined value in the first argument will be available to _mesa_glsl_lexer_alloc in
  4032.  * the yyextra field.
  4033.  */
  4034.  
  4035. int _mesa_glsl_lexer_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
  4036.  
  4037. {
  4038.     struct yyguts_t dummy_yyguts;
  4039.  
  4040.     _mesa_glsl_lexer_set_extra (yy_user_defined, &dummy_yyguts);
  4041.  
  4042.     if (ptr_yy_globals == NULL){
  4043.         errno = EINVAL;
  4044.         return 1;
  4045.     }
  4046.        
  4047.     *ptr_yy_globals = (yyscan_t) _mesa_glsl_lexer_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
  4048.        
  4049.     if (*ptr_yy_globals == NULL){
  4050.         errno = ENOMEM;
  4051.         return 1;
  4052.     }
  4053.    
  4054.     /* By setting to 0xAA, we expose bugs in
  4055.     yy_init_globals. Leave at 0x00 for releases. */
  4056.     memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
  4057.    
  4058.     _mesa_glsl_lexer_set_extra (yy_user_defined, *ptr_yy_globals);
  4059.    
  4060.     return yy_init_globals ( *ptr_yy_globals );
  4061. }
  4062.  
  4063. static int yy_init_globals (yyscan_t yyscanner)
  4064. {
  4065.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  4066.     /* Initialization is the same as for the non-reentrant scanner.
  4067.      * This function is called from _mesa_glsl_lexer_lex_destroy(), so don't allocate here.
  4068.      */
  4069.  
  4070.     yyg->yy_buffer_stack = 0;
  4071.     yyg->yy_buffer_stack_top = 0;
  4072.     yyg->yy_buffer_stack_max = 0;
  4073.     yyg->yy_c_buf_p = (char *) 0;
  4074.     yyg->yy_init = 0;
  4075.     yyg->yy_start = 0;
  4076.  
  4077.     yyg->yy_start_stack_ptr = 0;
  4078.     yyg->yy_start_stack_depth = 0;
  4079.     yyg->yy_start_stack =  NULL;
  4080.  
  4081. /* Defined in main.c */
  4082. #ifdef YY_STDINIT
  4083.     yyin = stdin;
  4084.     yyout = stdout;
  4085. #else
  4086.     yyin = (FILE *) 0;
  4087.     yyout = (FILE *) 0;
  4088. #endif
  4089.  
  4090.     /* For future reference: Set errno on error, since we are called by
  4091.      * _mesa_glsl_lexer_lex_init()
  4092.      */
  4093.     return 0;
  4094. }
  4095.  
  4096. /* _mesa_glsl_lexer_lex_destroy is for both reentrant and non-reentrant scanners. */
  4097. int _mesa_glsl_lexer_lex_destroy  (yyscan_t yyscanner)
  4098. {
  4099.     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
  4100.  
  4101.     /* Pop the buffer stack, destroying each element. */
  4102.         while(YY_CURRENT_BUFFER){
  4103.                 _mesa_glsl_lexer__delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
  4104.                 YY_CURRENT_BUFFER_LVALUE = NULL;
  4105.                 _mesa_glsl_lexer_pop_buffer_state(yyscanner);
  4106.         }
  4107.  
  4108.         /* Destroy the stack itself. */
  4109.         _mesa_glsl_lexer_free(yyg->yy_buffer_stack ,yyscanner);
  4110.         yyg->yy_buffer_stack = NULL;
  4111.  
  4112.     /* Destroy the start condition stack. */
  4113.         _mesa_glsl_lexer_free(yyg->yy_start_stack ,yyscanner );
  4114.         yyg->yy_start_stack = NULL;
  4115.  
  4116.     /* Reset the globals. This is important in a non-reentrant scanner so the next time
  4117.      * _mesa_glsl_lexer_lex() is called, initialization will occur. */
  4118.     yy_init_globals( yyscanner);
  4119.  
  4120.     /* Destroy the main struct (reentrant only). */
  4121.     _mesa_glsl_lexer_free ( yyscanner , yyscanner );
  4122.     yyscanner = NULL;
  4123.     return 0;
  4124. }
  4125.  
  4126. /*
  4127.  * Internal utility routines.
  4128.  */
  4129.  
  4130. #ifndef yytext_ptr
  4131. static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
  4132. {
  4133.         register int i;
  4134.         for ( i = 0; i < n; ++i )
  4135.                 s1[i] = s2[i];
  4136. }
  4137. #endif
  4138.  
  4139. #ifdef YY_NEED_STRLEN
  4140. static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
  4141. {
  4142.         register int n;
  4143.         for ( n = 0; s[n]; ++n )
  4144.                 ;
  4145.  
  4146.         return n;
  4147. }
  4148. #endif
  4149.  
  4150. void *_mesa_glsl_lexer_alloc (yy_size_t  size , yyscan_t yyscanner)
  4151. {
  4152.         return (void *) malloc( size );
  4153. }
  4154.  
  4155. void *_mesa_glsl_lexer_realloc  (void * ptr, yy_size_t  size , yyscan_t yyscanner)
  4156. {
  4157.         /* The cast to (char *) in the following accommodates both
  4158.          * implementations that use char* generic pointers, and those
  4159.          * that use void* generic pointers.  It works with the latter
  4160.          * because both ANSI C and C++ allow castless assignment from
  4161.          * any pointer type to void*, and deal with argument conversions
  4162.          * as though doing an assignment.
  4163.          */
  4164.         return (void *) realloc( (char *) ptr, size );
  4165. }
  4166.  
  4167. void _mesa_glsl_lexer_free (void * ptr , yyscan_t yyscanner)
  4168. {
  4169.         free( (char *) ptr );   /* see _mesa_glsl_lexer_realloc() for (char *) cast */
  4170. }
  4171.  
  4172. #define YYTABLES_NAME "yytables"
  4173.  
  4174. #line 598 "../../../src/glsl/glsl_lexer.ll"
  4175.  
  4176.  
  4177.  
  4178. int
  4179. classify_identifier(struct _mesa_glsl_parse_state *state, const char *name)
  4180. {
  4181.    if (state->symbols->get_variable(name) || state->symbols->get_function(name))
  4182.       return IDENTIFIER;
  4183.    else if (state->symbols->get_type(name))
  4184.       return TYPE_IDENTIFIER;
  4185.    else
  4186.       return NEW_IDENTIFIER;
  4187. }
  4188.  
  4189. void
  4190. _mesa_glsl_lexer_ctor(struct _mesa_glsl_parse_state *state, const char *string)
  4191. {
  4192.    _mesa_glsl_lexer_lex_init_extra(state,& state->scanner);
  4193.    _mesa_glsl_lexer__scan_string(string,state->scanner);
  4194. }
  4195.  
  4196. void
  4197. _mesa_glsl_lexer_dtor(struct _mesa_glsl_parse_state *state)
  4198. {
  4199.    _mesa_glsl_lexer_lex_destroy(state->scanner);
  4200. }
  4201.  
  4202.