ReactOS  0.4.14-dev-52-g6116262
hlsl.yy.c File Reference
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include "config.h"
#include "wine/port.h"
#include "wine/debug.h"
#include "d3dcompiler_private.h"
#include "hlsl.tab.h"
Include dependency graph for hlsl.yy.c:

Go to the source code of this file.

Classes

struct  yy_buffer_state
 
struct  yy_trans_info
 

Macros

#define YY_INT_ALIGNED   short int
 
#define yy_create_buffer   hlsl__create_buffer
 
#define yy_delete_buffer   hlsl__delete_buffer
 
#define yy_flex_debug   hlsl__flex_debug
 
#define yy_init_buffer   hlsl__init_buffer
 
#define yy_flush_buffer   hlsl__flush_buffer
 
#define yy_load_buffer_state   hlsl__load_buffer_state
 
#define yy_switch_to_buffer   hlsl__switch_to_buffer
 
#define yyin   hlsl_in
 
#define yyleng   hlsl_leng
 
#define yylex   hlsl_lex
 
#define yylineno   hlsl_lineno
 
#define yyout   hlsl_out
 
#define yyrestart   hlsl_restart
 
#define yytext   hlsl_text
 
#define yywrap   hlsl_wrap
 
#define yyalloc   hlsl_alloc
 
#define yyrealloc   hlsl_realloc
 
#define yyfree   hlsl_free
 
#define FLEX_SCANNER
 
#define YY_FLEX_MAJOR_VERSION   2
 
#define YY_FLEX_MINOR_VERSION   5
 
#define YY_FLEX_SUBMINOR_VERSION   37
 
#define FLEX_BETA
 
#define FLEXINT_H
 
#define INT8_MIN   (-128)
 
#define INT16_MIN   (-32767-1)
 
#define INT32_MIN   (-2147483647-1)
 
#define INT8_MAX   (127)
 
#define INT16_MAX   (32767)
 
#define INT32_MAX   (2147483647)
 
#define UINT8_MAX   (255U)
 
#define UINT16_MAX   (65535U)
 
#define UINT32_MAX   (4294967295U)
 
#define yyconst
 
#define YY_NULL   0
 
#define YY_SC_TO_UI(c)   ((unsigned int) (unsigned char) c)
 
#define BEGIN   (yy_start) = 1 + 2 *
 
#define YY_START   (((yy_start) - 1) / 2)
 
#define YYSTATE   YY_START
 
#define YY_STATE_EOF(state)   (YY_END_OF_BUFFER + state + 1)
 
#define YY_NEW_FILE   hlsl_restart(hlsl_in )
 
#define YY_END_OF_BUFFER_CHAR   0
 
#define YY_BUF_SIZE   16384
 
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
 
#define YY_TYPEDEF_YY_BUFFER_STATE
 
#define YY_TYPEDEF_YY_SIZE_T
 
#define EOB_ACT_CONTINUE_SCAN   0
 
#define EOB_ACT_END_OF_FILE   1
 
#define EOB_ACT_LAST_MATCH   2
 
#define YY_LESS_LINENO(n)
 
#define yyless(n)
 
#define unput(c)   yyunput( c, (yytext_ptr) )
 
#define YY_STRUCT_YY_BUFFER_STATE
 
#define YY_BUFFER_NEW   0
 
#define YY_BUFFER_NORMAL   1
 
#define YY_BUFFER_EOF_PENDING   2
 
#define YY_CURRENT_BUFFER
 
#define YY_CURRENT_BUFFER_LVALUE   (yy_buffer_stack)[(yy_buffer_stack_top)]
 
#define YY_FLUSH_BUFFER   hlsl__flush_buffer(YY_CURRENT_BUFFER )
 
#define yy_new_buffer   hlsl__create_buffer
 
#define yy_set_interactive(is_interactive)
 
#define yy_set_bol(at_bol)
 
#define YY_AT_BOL()   (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
 
#define hlsl_wrap()   1
 
#define YY_SKIP_YYWRAP
 
#define yytext_ptr   hlsl_text
 
#define YY_DO_BEFORE_ACTION
 
#define YY_NUM_RULES   125
 
#define YY_END_OF_BUFFER   126
 
#define REJECT   reject_used_but_not_detected
 
#define yymore()   yymore_used_but_not_detected
 
#define YY_MORE_ADJ   0
 
#define YY_RESTORE_YY_MORE_OFFSET
 
#define YY_NO_UNISTD_H
 
#define YY_USER_ACTION
 
#define YY_NO_INPUT   1
 
#define INITIAL   0
 
#define pp   1
 
#define pp_line   2
 
#define pp_pragma   3
 
#define pp_ignore   4
 
#define YY_EXTRA_TYPE   void *
 
#define YY_READ_BUF_SIZE   8192
 
#define ECHO   do { if (fwrite( hlsl_text, hlsl_leng, 1, hlsl_out )) {} } while (0)
 
#define YY_INPUT(buf, result, max_size)
 
#define yyterminate()   return YY_NULL
 
#define YY_START_STACK_INCR   25
 
#define YY_FATAL_ERROR(msg)   yy_fatal_error( msg )
 
#define YY_DECL_IS_OURS   1
 
#define YY_DECL   int hlsl_lex (void)
 
#define YY_BREAK   break;
 
#define YY_RULE_SETUP
 
#define YY_EXIT_FAILURE   2
 
#define yyless(n)
 
#define YYTABLES_NAME   "yytables"
 

Typedefs

typedef signed char flex_int8_t
 
typedef short int flex_int16_t
 
typedef int flex_int32_t
 
typedef unsigned char flex_uint8_t
 
typedef unsigned short int flex_uint16_t
 
typedef unsigned int flex_uint32_t
 
typedef struct yy_buffer_stateYY_BUFFER_STATE
 
typedef size_t yy_size_t
 
typedef unsigned char YY_CHAR
 
typedef int yy_state_type
 

Functions

void hlsl_restart (FILE *input_file)
 
void hlsl__switch_to_buffer (YY_BUFFER_STATE new_buffer)
 
YY_BUFFER_STATE hlsl__create_buffer (FILE *file, int size)
 
void hlsl__delete_buffer (YY_BUFFER_STATE b)
 
void hlsl__flush_buffer (YY_BUFFER_STATE b)
 
void hlsl_push_buffer_state (YY_BUFFER_STATE new_buffer)
 
void hlsl_pop_buffer_state (void)
 
static void hlsl_ensure_buffer_stack (void)
 
static void hlsl__load_buffer_state (void)
 
static void hlsl__init_buffer (YY_BUFFER_STATE b, FILE *file)
 
YY_BUFFER_STATE hlsl__scan_buffer (char *base, yy_size_t size)
 
YY_BUFFER_STATE hlsl__scan_string (yyconst char *yy_str)
 
YY_BUFFER_STATE hlsl__scan_bytes (yyconst char *bytes, yy_size_t len)
 
voidhlsl_alloc (yy_size_t)
 
voidhlsl_realloc (void *, yy_size_t)
 
void hlsl_free (void *)
 
static yy_state_type yy_get_previous_state (void)
 
static yy_state_type yy_try_NUL_trans (yy_state_type current_state)
 
static int yy_get_next_buffer (void)
 
static void yy_fatal_error (yyconst char msg[])
 
 WINE_DEFAULT_DEBUG_CHANNEL (hlsl_parser)
 
static int yy_init_globals (void)
 
int hlsl_lex_destroy (void)
 
int hlsl_get_debug (void)
 
void hlsl_set_debug (int debug_flag)
 
YY_EXTRA_TYPE hlsl_get_extra (void)
 
void hlsl_set_extra (YY_EXTRA_TYPE user_defined)
 
FILEhlsl_get_in (void)
 
void hlsl_set_in (FILE *in_str)
 
FILEhlsl_get_out (void)
 
void hlsl_set_out (FILE *out_str)
 
yy_size_t hlsl_get_leng (void)
 
charhlsl_get_text (void)
 
int hlsl_get_lineno (void)
 
void hlsl_set_lineno (int line_number)
 
int hlsl_lex (void)
 
 if (!(yy_init))
 
 while (1)
 
static void yy_fatal_error (yyconst char *msg)
 
struct bwriter_shaderparse_hlsl (enum shader_type type, DWORD major, DWORD minor, const char *entrypoint, char **messages)
 
struct bwriter_shaderparse_hlsl_shader (const char *text, enum shader_type type, DWORD major, DWORD minor, const char *entrypoint, char **messages)
 

Variables

yy_size_t hlsl_leng
 
FILEhlsl_in = (FILE *) 0
 
FILEhlsl_out = (FILE *) 0
 
static size_t yy_buffer_stack_top = 0
 
static size_t yy_buffer_stack_max = 0
 
static YY_BUFFER_STATEyy_buffer_stack = 0
 
static char yy_hold_char
 
static yy_size_t yy_n_chars
 
static charyy_c_buf_p = (char *) 0
 
static int yy_init = 0
 
static int yy_start = 0
 
static int yy_did_buffer_switch_on_eof
 
int hlsl_lineno = 1
 
charhlsl_text
 
static yyconst flex_int16_t yy_accept [717]
 
static yyconst flex_int32_t yy_ec [256]
 
static yyconst flex_int32_t yy_meta [72]
 
static yyconst flex_int16_t yy_base [725]
 
static yyconst flex_int16_t yy_def [725]
 
static yyconst flex_int16_t yy_nxt [1011]
 
static yyconst flex_int16_t yy_chk [1011]
 
static yy_state_type yy_last_accepting_state
 
static charyy_last_accepting_cpos
 
int hlsl__flex_debug = 0
 
 YY_DECL
 
register charyy_cp
 
register charyy_bp
 
register int yy_act
 

Macro Definition Documentation

◆ BEGIN

#define BEGIN   (yy_start) = 1 + 2 *

Definition at line 145 of file hlsl.yy.c.

◆ ECHO

#define ECHO   do { if (fwrite( hlsl_text, hlsl_leng, 1, hlsl_out )) {} } while (0)

Definition at line 1066 of file hlsl.yy.c.

◆ EOB_ACT_CONTINUE_SCAN

#define EOB_ACT_CONTINUE_SCAN   0

Definition at line 185 of file hlsl.yy.c.

◆ EOB_ACT_END_OF_FILE

#define EOB_ACT_END_OF_FILE   1

Definition at line 186 of file hlsl.yy.c.

◆ EOB_ACT_LAST_MATCH

#define EOB_ACT_LAST_MATCH   2

Definition at line 187 of file hlsl.yy.c.

◆ FLEX_BETA

#define FLEX_BETA

Definition at line 33 of file hlsl.yy.c.

◆ FLEX_SCANNER

#define FLEX_SCANNER

Definition at line 28 of file hlsl.yy.c.

◆ FLEXINT_H

#define FLEXINT_H

Definition at line 49 of file hlsl.yy.c.

◆ hlsl_wrap

#define hlsl_wrap ( )    1

Definition at line 355 of file hlsl.yy.c.

◆ INITIAL

#define INITIAL   0

Definition at line 977 of file hlsl.yy.c.

◆ INT16_MAX

#define INT16_MAX   (32767)

Definition at line 91 of file hlsl.yy.c.

◆ INT16_MIN

#define INT16_MIN   (-32767-1)

Definition at line 82 of file hlsl.yy.c.

◆ INT32_MAX

#define INT32_MAX   (2147483647)

Definition at line 94 of file hlsl.yy.c.

◆ INT32_MIN

#define INT32_MIN   (-2147483647-1)

Definition at line 85 of file hlsl.yy.c.

◆ INT8_MAX

#define INT8_MAX   (127)

Definition at line 88 of file hlsl.yy.c.

◆ INT8_MIN

#define INT8_MIN   (-128)

Definition at line 79 of file hlsl.yy.c.

◆ pp

#define pp   1

Definition at line 978 of file hlsl.yy.c.

◆ pp_ignore

#define pp_ignore   4

Definition at line 981 of file hlsl.yy.c.

◆ pp_line

#define pp_line   2

Definition at line 979 of file hlsl.yy.c.

◆ pp_pragma

#define pp_pragma   3

Definition at line 980 of file hlsl.yy.c.

◆ REJECT

#define REJECT   reject_used_but_not_detected

Definition at line 929 of file hlsl.yy.c.

◆ UINT16_MAX

#define UINT16_MAX   (65535U)

Definition at line 100 of file hlsl.yy.c.

◆ UINT32_MAX

#define UINT32_MAX   (4294967295U)

Definition at line 103 of file hlsl.yy.c.

◆ UINT8_MAX

#define UINT8_MAX   (255U)

Definition at line 97 of file hlsl.yy.c.

◆ unput

#define unput (   c)    yyunput( c, (yytext_ptr) )

Definition at line 205 of file hlsl.yy.c.

◆ YY_AT_BOL

#define YY_AT_BOL ( )    (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

Definition at line 351 of file hlsl.yy.c.

◆ YY_BREAK

#define YY_BREAK   break;

Definition at line 1145 of file hlsl.yy.c.

◆ YY_BUF_SIZE

#define YY_BUF_SIZE   16384

Definition at line 164 of file hlsl.yy.c.

◆ YY_BUFFER_EOF_PENDING

#define YY_BUFFER_EOF_PENDING   2

Definition at line 267 of file hlsl.yy.c.

◆ YY_BUFFER_NEW

#define YY_BUFFER_NEW   0

Definition at line 255 of file hlsl.yy.c.

◆ YY_BUFFER_NORMAL

#define YY_BUFFER_NORMAL   1

Definition at line 256 of file hlsl.yy.c.

◆ yy_create_buffer

#define yy_create_buffer   hlsl__create_buffer

Definition at line 9 of file hlsl.yy.c.

◆ YY_CURRENT_BUFFER

#define YY_CURRENT_BUFFER
Value:
: NULL)
smooth NULL
Definition: ftsmooth.c:416
static size_t yy_buffer_stack_top
Definition: hlsl.yy.c:273
static YY_BUFFER_STATE * yy_buffer_stack
Definition: hlsl.yy.c:275

Definition at line 283 of file hlsl.yy.c.

◆ YY_CURRENT_BUFFER_LVALUE

#define YY_CURRENT_BUFFER_LVALUE   (yy_buffer_stack)[(yy_buffer_stack_top)]

Definition at line 290 of file hlsl.yy.c.

◆ YY_DECL

#define YY_DECL   int hlsl_lex (void)

Definition at line 1133 of file hlsl.yy.c.

◆ YY_DECL_IS_OURS

#define YY_DECL_IS_OURS   1

Definition at line 1129 of file hlsl.yy.c.

◆ yy_delete_buffer

#define yy_delete_buffer   hlsl__delete_buffer

Definition at line 10 of file hlsl.yy.c.

◆ YY_DO_BEFORE_ACTION

#define YY_DO_BEFORE_ACTION
Value:
hlsl_leng = (size_t) (yy_cp - yy_bp); \
*yy_cp = '\0'; \
static char yy_hold_char
Definition: hlsl.yy.c:293
#define yytext_ptr
Definition: hlsl.yy.c:369
register char * yy_cp
Definition: hlsl.yy.c:1159
__kernel_size_t size_t
Definition: linux.h:237
register char * yy_bp
Definition: hlsl.yy.c:1159
static char * yy_c_buf_p
Definition: hlsl.yy.c:298

Definition at line 379 of file hlsl.yy.c.

◆ YY_END_OF_BUFFER

#define YY_END_OF_BUFFER   126

Definition at line 387 of file hlsl.yy.c.

◆ YY_END_OF_BUFFER_CHAR

#define YY_END_OF_BUFFER_CHAR   0

Definition at line 160 of file hlsl.yy.c.

◆ YY_EXIT_FAILURE

#define YY_EXIT_FAILURE   2

Definition at line 2716 of file hlsl.yy.c.

◆ YY_EXTRA_TYPE

#define YY_EXTRA_TYPE   void *

Definition at line 992 of file hlsl.yy.c.

◆ YY_FATAL_ERROR

#define YY_FATAL_ERROR (   msg)    yy_fatal_error( msg )

Definition at line 1120 of file hlsl.yy.c.

◆ yy_flex_debug

#define yy_flex_debug   hlsl__flex_debug

Definition at line 11 of file hlsl.yy.c.

◆ YY_FLEX_MAJOR_VERSION

#define YY_FLEX_MAJOR_VERSION   2

Definition at line 29 of file hlsl.yy.c.

◆ YY_FLEX_MINOR_VERSION

#define YY_FLEX_MINOR_VERSION   5

Definition at line 30 of file hlsl.yy.c.

◆ YY_FLEX_SUBMINOR_VERSION

#define YY_FLEX_SUBMINOR_VERSION   37

Definition at line 31 of file hlsl.yy.c.

◆ yy_flush_buffer

#define yy_flush_buffer   hlsl__flush_buffer

Definition at line 13 of file hlsl.yy.c.

◆ YY_FLUSH_BUFFER

#define YY_FLUSH_BUFFER   hlsl__flush_buffer(YY_CURRENT_BUFFER )

Definition at line 319 of file hlsl.yy.c.

◆ yy_init_buffer

#define yy_init_buffer   hlsl__init_buffer

Definition at line 12 of file hlsl.yy.c.

◆ YY_INPUT

#define YY_INPUT (   buf,
  result,
  max_size 
)
Value:
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
size_t n; \
for ( n = 0; n < max_size && \
(c = getc( hlsl_in )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
if ( c == EOF && ferror( hlsl_in ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else \
{ \
errno=0; \
while ( (result = fread(buf, 1, max_size, hlsl_in))==0 && ferror(hlsl_in)) \
{ \
if( errno != EINTR) \
{ \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
break; \
} \
errno=0; \
clearerr(hlsl_in); \
} \
}\
\
_Check_return_ _CRTIMP int __cdecl ferror(_In_ FILE *_File)
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define EINTR
Definition: acclib.h:80
GLdouble n
Definition: glext.h:7729
_Check_return_ _CRTIMP int __cdecl getc(_Inout_ FILE *_File)
int errno
_Check_return_opt_ _CRTIMP size_t __cdecl fread(_Out_writes_bytes_(_ElementSize *_Count) void *_DstBuf, _In_ size_t _ElementSize, _In_ size_t _Count, _Inout_ FILE *_File)
FILE * hlsl_in
Definition: hlsl.yy.c:360
static INT max_size
Definition: history.c:51
unsigned char
Definition: typeof.h:29
#define YY_CURRENT_BUFFER_LVALUE
Definition: hlsl.yy.c:290
const GLubyte * c
Definition: glext.h:8905
#define EOF
Definition: stdio.h:24
#define c
Definition: ke_i.h:80
GLuint64EXT * result
Definition: glext.h:11304

Definition at line 1073 of file hlsl.yy.c.

◆ YY_INT_ALIGNED

#define YY_INT_ALIGNED   short int

Definition at line 5 of file hlsl.yy.c.

◆ YY_LESS_LINENO

#define YY_LESS_LINENO (   n)

Definition at line 189 of file hlsl.yy.c.

◆ yy_load_buffer_state

#define yy_load_buffer_state   hlsl__load_buffer_state

Definition at line 14 of file hlsl.yy.c.

◆ YY_MORE_ADJ

#define YY_MORE_ADJ   0

Definition at line 931 of file hlsl.yy.c.

◆ yy_new_buffer

#define yy_new_buffer   hlsl__create_buffer

Definition at line 329 of file hlsl.yy.c.

◆ YY_NEW_FILE

#define YY_NEW_FILE   hlsl_restart(hlsl_in )

Definition at line 158 of file hlsl.yy.c.

◆ YY_NO_INPUT

#define YY_NO_INPUT   1

Definition at line 973 of file hlsl.yy.c.

◆ YY_NO_UNISTD_H

#define YY_NO_UNISTD_H

Definition at line 960 of file hlsl.yy.c.

◆ YY_NULL

#define YY_NULL   0

Definition at line 132 of file hlsl.yy.c.

◆ YY_NUM_RULES

#define YY_NUM_RULES   125

Definition at line 386 of file hlsl.yy.c.

◆ YY_READ_BUF_SIZE

#define YY_READ_BUF_SIZE   8192

Definition at line 1058 of file hlsl.yy.c.

◆ YY_RESTORE_YY_MORE_OFFSET

#define YY_RESTORE_YY_MORE_OFFSET

Definition at line 932 of file hlsl.yy.c.

◆ YY_RULE_SETUP

#define YY_RULE_SETUP
Value:
if ( hlsl_leng > 0 ) \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
(hlsl_text[hlsl_leng - 1] == '\n'); \
YY_USER_ACTION
yy_size_t hlsl_leng
Definition: hlsl.yy.c:295
char * hlsl_text
Definition: hlsl.yy.c:933

Definition at line 1148 of file hlsl.yy.c.

◆ YY_SC_TO_UI

#define YY_SC_TO_UI (   c)    ((unsigned int) (unsigned char) c)

Definition at line 139 of file hlsl.yy.c.

◆ yy_set_bol

#define yy_set_bol (   at_bol)
Value:
{ \
if ( ! YY_CURRENT_BUFFER ){\
hlsl_ensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
hlsl__create_buffer(hlsl_in,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
FILE * hlsl_in
Definition: hlsl.yy.c:360
#define YY_BUF_SIZE
Definition: hlsl.yy.c:164
#define YY_CURRENT_BUFFER
Definition: hlsl.yy.c:283

Definition at line 341 of file hlsl.yy.c.

◆ yy_set_interactive

#define yy_set_interactive (   is_interactive)
Value:
{ \
if ( ! YY_CURRENT_BUFFER ){ \
hlsl_ensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
hlsl__create_buffer(hlsl_in,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
FILE * hlsl_in
Definition: hlsl.yy.c:360
#define YY_BUF_SIZE
Definition: hlsl.yy.c:164
#define YY_CURRENT_BUFFER
Definition: hlsl.yy.c:283

Definition at line 331 of file hlsl.yy.c.

◆ YY_SKIP_YYWRAP

#define YY_SKIP_YYWRAP

Definition at line 356 of file hlsl.yy.c.

◆ YY_START

#define YY_START   (((yy_start) - 1) / 2)

Definition at line 151 of file hlsl.yy.c.

◆ YY_START_STACK_INCR

#define YY_START_STACK_INCR   25

Definition at line 1115 of file hlsl.yy.c.

◆ YY_STATE_BUF_SIZE

#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))

Definition at line 169 of file hlsl.yy.c.

◆ YY_STATE_EOF

#define YY_STATE_EOF (   state)    (YY_END_OF_BUFFER + state + 1)

Definition at line 155 of file hlsl.yy.c.

◆ YY_STRUCT_YY_BUFFER_STATE

#define YY_STRUCT_YY_BUFFER_STATE

Definition at line 208 of file hlsl.yy.c.

◆ yy_switch_to_buffer

#define yy_switch_to_buffer   hlsl__switch_to_buffer

Definition at line 15 of file hlsl.yy.c.

◆ YY_TYPEDEF_YY_BUFFER_STATE

#define YY_TYPEDEF_YY_BUFFER_STATE

Definition at line 172 of file hlsl.yy.c.

◆ YY_TYPEDEF_YY_SIZE_T

#define YY_TYPEDEF_YY_SIZE_T

Definition at line 177 of file hlsl.yy.c.

◆ YY_USER_ACTION

#define YY_USER_ACTION
Value:
do { \
hlsl_lloc.first_column = hlsl_ctx.column; \
hlsl_lloc.first_line = hlsl_ctx.line_no; \
hlsl_ctx.column += hlsl_leng; \
} while(0);
struct hlsl_parse_ctx hlsl_ctx
Definition: hlsl.tab.c:87
yy_size_t hlsl_leng
Definition: hlsl.yy.c:295

Definition at line 966 of file hlsl.yy.c.

◆ yyalloc

Definition at line 24 of file hlsl.yy.c.

◆ yyconst

#define yyconst

Definition at line 128 of file hlsl.yy.c.

◆ yyfree

#define yyfree   hlsl_free

Definition at line 26 of file hlsl.yy.c.

◆ yyin

#define yyin   hlsl_in

Definition at line 16 of file hlsl.yy.c.

◆ yyleng

#define yyleng   hlsl_leng

Definition at line 17 of file hlsl.yy.c.

◆ yyless [1/2]

#define yyless (   n)
Value:
do \
{ \
/* Undo effects of setting up hlsl_text. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
YY_RESTORE_YY_MORE_OFFSET \
(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up hlsl_text again */ \
} \
while ( 0 )
GLdouble n
Definition: glext.h:7729
static char yy_hold_char
Definition: hlsl.yy.c:293
#define YY_MORE_ADJ
Definition: hlsl.yy.c:931
register char * yy_cp
Definition: hlsl.yy.c:1159
register char * yy_bp
Definition: hlsl.yy.c:1159
static char * yy_c_buf_p
Definition: hlsl.yy.c:298

Definition at line 2728 of file hlsl.yy.c.

◆ yyless [2/2]

#define yyless (   n)
Value:
do \
{ \
/* Undo effects of setting up hlsl_text. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
hlsl_text[hlsl_leng] = (yy_hold_char); \
(yy_c_buf_p) = hlsl_text + yyless_macro_arg; \
*(yy_c_buf_p) = '\0'; \
hlsl_leng = yyless_macro_arg; \
} \
while ( 0 )
GLdouble n
Definition: glext.h:7729
static char yy_hold_char
Definition: hlsl.yy.c:293
static char * yy_c_buf_p
Definition: hlsl.yy.c:298
yy_size_t hlsl_leng
Definition: hlsl.yy.c:295
char * hlsl_text
Definition: hlsl.yy.c:933

Definition at line 2728 of file hlsl.yy.c.

◆ yylex

#define yylex   hlsl_lex

Definition at line 18 of file hlsl.yy.c.

◆ yylineno

#define yylineno   hlsl_lineno

Definition at line 19 of file hlsl.yy.c.

◆ yymore

#define yymore ( )    yymore_used_but_not_detected

Definition at line 930 of file hlsl.yy.c.

◆ yyout

#define yyout   hlsl_out

Definition at line 20 of file hlsl.yy.c.

◆ yyrealloc

#define yyrealloc   hlsl_realloc

Definition at line 25 of file hlsl.yy.c.

◆ yyrestart

#define yyrestart   hlsl_restart

Definition at line 21 of file hlsl.yy.c.

◆ YYSTATE

#define YYSTATE   YY_START

Definition at line 152 of file hlsl.yy.c.

◆ YYTABLES_NAME

#define YYTABLES_NAME   "yytables"

Definition at line 2918 of file hlsl.yy.c.

◆ yyterminate

#define yyterminate ( )    return YY_NULL

Definition at line 1110 of file hlsl.yy.c.

◆ yytext

#define yytext   hlsl_text

Definition at line 22 of file hlsl.yy.c.

◆ yytext_ptr

#define yytext_ptr   hlsl_text

Definition at line 369 of file hlsl.yy.c.

◆ yywrap

#define yywrap   hlsl_wrap

Definition at line 23 of file hlsl.yy.c.

Typedef Documentation

◆ flex_int16_t

Definition at line 71 of file hlsl.yy.c.

◆ flex_int32_t

typedef int flex_int32_t

Definition at line 72 of file hlsl.yy.c.

◆ flex_int8_t

Definition at line 70 of file hlsl.yy.c.

◆ flex_uint16_t

typedef unsigned short int flex_uint16_t

Definition at line 74 of file hlsl.yy.c.

◆ flex_uint32_t

typedef unsigned int flex_uint32_t

Definition at line 75 of file hlsl.yy.c.

◆ flex_uint8_t

typedef unsigned char flex_uint8_t

Definition at line 73 of file hlsl.yy.c.

◆ YY_BUFFER_STATE

Definition at line 173 of file hlsl.yy.c.

◆ YY_CHAR

typedef unsigned char YY_CHAR

Definition at line 358 of file hlsl.yy.c.

◆ yy_size_t

typedef size_t yy_size_t

Definition at line 178 of file hlsl.yy.c.

◆ yy_state_type

typedef int yy_state_type

Definition at line 362 of file hlsl.yy.c.

Function Documentation

◆ hlsl__create_buffer()

YY_BUFFER_STATE hlsl__create_buffer ( FILE file,
int  size 
)

Allocate and initialize an input buffer state.

Parameters
fileA readable stream.
sizeThe character buffer size in bytes. When in doubt, use YY_BUF_SIZE.
Returns
the allocated buffer state.

Definition at line 2433 of file hlsl.yy.c.

2434 {
2436 
2437  b = (YY_BUFFER_STATE) hlsl_alloc(sizeof( struct yy_buffer_state ) );
2438  if ( ! b )
2439  YY_FATAL_ERROR( "out of dynamic memory in hlsl__create_buffer()" );
2440 
2441  b->yy_buf_size = size;
2442 
2443  /* yy_ch_buf has to be 2 characters longer than the size given because
2444  * we need to put in 2 end-of-buffer characters.
2445  */
2446  b->yy_ch_buf = (char *) hlsl_alloc(b->yy_buf_size + 2 );
2447  if ( ! b->yy_ch_buf )
2448  YY_FATAL_ERROR( "out of dynamic memory in hlsl__create_buffer()" );
2449 
2450  b->yy_is_our_buffer = 1;
2451 
2453 
2454  return b;
2455 }
static void hlsl__init_buffer(YY_BUFFER_STATE b, FILE *file)
Definition: hlsl.yy.c:2480
void * hlsl_alloc(yy_size_t)
Definition: hlsl.yy.c:2896
#define b
Definition: ke_i.h:79
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLsizeiptr size
Definition: glext.h:5919
struct yy_buffer_state * YY_BUFFER_STATE
Definition: hlsl.yy.c:173
#define YY_FATAL_ERROR(msg)
Definition: hlsl.yy.c:1120
Definition: fci.c:126

Referenced by hlsl_restart(), and if().

◆ hlsl__delete_buffer()

void hlsl__delete_buffer ( YY_BUFFER_STATE  b)

Destroy the buffer.

Parameters
ba buffer created with hlsl__create_buffer()

Definition at line 2461 of file hlsl.yy.c.

2462 {
2463 
2464  if ( ! b )
2465  return;
2466 
2467  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2469 
2470  if ( b->yy_is_our_buffer )
2471  hlsl_free((void *) b->yy_ch_buf );
2472 
2473  hlsl_free((void *) b );
2474 }
void hlsl_free(void *)
Definition: hlsl.yy.c:2913
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define YY_CURRENT_BUFFER_LVALUE
Definition: hlsl.yy.c:290
struct yy_buffer_state * YY_BUFFER_STATE
Definition: hlsl.yy.c:173
#define YY_CURRENT_BUFFER
Definition: hlsl.yy.c:283

Referenced by hlsl_lex_destroy(), hlsl_pop_buffer_state(), and parse_hlsl_shader().

◆ hlsl__flush_buffer()

void hlsl__flush_buffer ( YY_BUFFER_STATE  b)

Discard all buffered characters. On the next scan, YY_INPUT will be called.

Parameters
bthe buffer state to be flushed, usually YY_CURRENT_BUFFER.

Definition at line 2508 of file hlsl.yy.c.

2509 {
2510  if ( ! b )
2511  return;
2512 
2513  b->yy_n_chars = 0;
2514 
2515  /* We always need two end-of-buffer characters. The first causes
2516  * a transition to the end-of-buffer state. The second causes
2517  * a jam in that state.
2518  */
2519  b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2520  b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2521 
2522  b->yy_buf_pos = &b->yy_ch_buf[0];
2523 
2524  b->yy_at_bol = 1;
2525  b->yy_buffer_status = YY_BUFFER_NEW;
2526 
2527  if ( b == YY_CURRENT_BUFFER )
2529 }
static void hlsl__load_buffer_state(void)
Definition: hlsl.yy.c:2419
#define YY_BUFFER_NEW
Definition: hlsl.yy.c:255
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define YY_END_OF_BUFFER_CHAR
Definition: hlsl.yy.c:160
#define YY_CURRENT_BUFFER
Definition: hlsl.yy.c:283

Referenced by hlsl__init_buffer().

◆ hlsl__init_buffer()

static void hlsl__init_buffer ( YY_BUFFER_STATE  b,
FILE file 
)
static

Definition at line 2480 of file hlsl.yy.c.

2482 {
2483  int oerrno = errno;
2484 
2486 
2487  b->yy_input_file = file;
2488  b->yy_fill_buffer = 1;
2489 
2490  /* If b is the current buffer, then hlsl__init_buffer was _probably_
2491  * called from hlsl_restart() or through yy_get_next_buffer.
2492  * In that case, we don't want to reset the lineno or column.
2493  */
2494  if (b != YY_CURRENT_BUFFER){
2495  b->yy_bs_lineno = 1;
2496  b->yy_bs_column = 0;
2497  }
2498 
2499  b->yy_is_interactive = 0;
2500 
2501  errno = oerrno;
2502 }
int errno
void hlsl__flush_buffer(YY_BUFFER_STATE b)
Definition: hlsl.yy.c:2508
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
const char file[]
Definition: icontest.c:11
#define YY_CURRENT_BUFFER
Definition: hlsl.yy.c:283

Referenced by hlsl__create_buffer(), and hlsl_restart().

◆ hlsl__load_buffer_state()

static void hlsl__load_buffer_state ( void  )
static

Definition at line 2419 of file hlsl.yy.c.

2420 {
2421  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2422  (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2423  hlsl_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2424  (yy_hold_char) = *(yy_c_buf_p);
2425 }
static char yy_hold_char
Definition: hlsl.yy.c:293
#define yytext_ptr
Definition: hlsl.yy.c:369
FILE * hlsl_in
Definition: hlsl.yy.c:360
#define YY_CURRENT_BUFFER_LVALUE
Definition: hlsl.yy.c:290
static char * yy_c_buf_p
Definition: hlsl.yy.c:298
static yy_size_t yy_n_chars
Definition: hlsl.yy.c:294

Referenced by hlsl__flush_buffer(), hlsl__switch_to_buffer(), hlsl_pop_buffer_state(), hlsl_push_buffer_state(), hlsl_restart(), and if().

◆ hlsl__scan_buffer()

YY_BUFFER_STATE hlsl__scan_buffer ( char base,
yy_size_t  size 
)

Setup the input buffer state to scan directly from a user-specified character buffer.

Parameters
basethe character buffer
sizethe size in bytes of the character buffer
Returns
the newly allocated buffer state object.

Definition at line 2635 of file hlsl.yy.c.

2636 {
2638 
2639  if ( size < 2 ||
2642  /* They forgot to leave room for the EOB's. */
2643  return 0;
2644 
2645  b = (YY_BUFFER_STATE) hlsl_alloc(sizeof( struct yy_buffer_state ) );
2646  if ( ! b )
2647  YY_FATAL_ERROR( "out of dynamic memory in hlsl__scan_buffer()" );
2648 
2649  b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2650  b->yy_buf_pos = b->yy_ch_buf = base;
2651  b->yy_is_our_buffer = 0;
2652  b->yy_input_file = 0;
2653  b->yy_n_chars = b->yy_buf_size;
2654  b->yy_is_interactive = 0;
2655  b->yy_at_bol = 1;
2656  b->yy_fill_buffer = 0;
2657  b->yy_buffer_status = YY_BUFFER_NEW;
2658 
2660 
2661  return b;
2662 }
void hlsl__switch_to_buffer(YY_BUFFER_STATE new_buffer)
Definition: hlsl.yy.c:2388
#define YY_BUFFER_NEW
Definition: hlsl.yy.c:255
void * hlsl_alloc(yy_size_t)
Definition: hlsl.yy.c:2896
GLuint base
Definition: 3dtext.c:35
#define b
Definition: ke_i.h:79
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLsizeiptr size
Definition: glext.h:5919
#define YY_END_OF_BUFFER_CHAR
Definition: hlsl.yy.c:160
struct yy_buffer_state * YY_BUFFER_STATE
Definition: hlsl.yy.c:173
#define YY_FATAL_ERROR(msg)
Definition: hlsl.yy.c:1120

Referenced by hlsl__scan_bytes().

◆ hlsl__scan_bytes()

YY_BUFFER_STATE hlsl__scan_bytes ( yyconst char yybytes,
yy_size_t  _yybytes_len 
)

Setup the input buffer state to scan the given bytes. The next call to hlsl_lex() will scan from a copy of bytes.

Parameters
yybytesthe byte buffer to scan
_yybytes_lenthe number of bytes in the buffer pointed to by bytes.
Returns
the newly allocated buffer state object.

Definition at line 2685 of file hlsl.yy.c.

2686 {
2688  char *buf;
2689  yy_size_t n;
2690  yy_size_t i;
2691 
2692  /* Get memory for full buffer, including space for trailing EOB's. */
2693  n = _yybytes_len + 2;
2694  buf = (char *) hlsl_alloc(n );
2695  if ( ! buf )
2696  YY_FATAL_ERROR( "out of dynamic memory in hlsl__scan_bytes()" );
2697 
2698  for ( i = 0; i < _yybytes_len; ++i )
2699  buf[i] = yybytes[i];
2700 
2701  buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2702 
2703  b = hlsl__scan_buffer(buf,n );
2704  if ( ! b )
2705  YY_FATAL_ERROR( "bad buffer in hlsl__scan_bytes()" );
2706 
2707  /* It's okay to grow etc. this buffer, and we should throw it
2708  * away when we're done.
2709  */
2710  b->yy_is_our_buffer = 1;
2711 
2712  return b;
2713 }
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLdouble n
Definition: glext.h:7729
size_t yy_size_t
Definition: macro.lex.yy.c:159
void * hlsl_alloc(yy_size_t)
Definition: hlsl.yy.c:2896
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define b
Definition: ke_i.h:79
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define YY_END_OF_BUFFER_CHAR
Definition: hlsl.yy.c:160
YY_BUFFER_STATE hlsl__scan_buffer(char *base, yy_size_t size)
Definition: hlsl.yy.c:2635
#define YY_FATAL_ERROR(msg)
Definition: hlsl.yy.c:1120

Referenced by hlsl__scan_string().

◆ hlsl__scan_string()

YY_BUFFER_STATE hlsl__scan_string ( yyconst char yystr)

Setup the input buffer state to scan a string. The next call to hlsl_lex() will scan from a copy of str.

Parameters
yystra NUL-terminated string to scan
Returns
the newly allocated buffer state object.
Note
If you want to scan bytes that may contain NUL values, then use hlsl__scan_bytes() instead.

Definition at line 2672 of file hlsl.yy.c.

2673 {
2674 
2675  return hlsl__scan_bytes(yystr,strlen(yystr) );
2676 }
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
YY_BUFFER_STATE hlsl__scan_bytes(yyconst char *bytes, yy_size_t len)
Definition: hlsl.yy.c:2685

Referenced by parse_hlsl_shader().

◆ hlsl__switch_to_buffer()

void hlsl__switch_to_buffer ( YY_BUFFER_STATE  new_buffer)

Switch to a different input buffer.

Parameters
new_bufferThe new input buffer.

Definition at line 2388 of file hlsl.yy.c.

2389 {
2390 
2391  /* TODO. We should be able to replace this entire function body
2392  * with
2393  * hlsl_pop_buffer_state();
2394  * hlsl_push_buffer_state(new_buffer);
2395  */
2397  if ( YY_CURRENT_BUFFER == new_buffer )
2398  return;
2399 
2400  if ( YY_CURRENT_BUFFER )
2401  {
2402  /* Flush out information for old buffer. */
2403  *(yy_c_buf_p) = (yy_hold_char);
2404  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2405  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2406  }
2407 
2408  YY_CURRENT_BUFFER_LVALUE = new_buffer;
2410 
2411  /* We don't actually know whether we did this switch during
2412  * EOF (hlsl_wrap()) processing, but the only time this flag
2413  * is looked at is after hlsl_wrap() is called, so it's safe
2414  * to go ahead and always set it.
2415  */
2417 }
static void hlsl__load_buffer_state(void)
Definition: hlsl.yy.c:2419
static int yy_did_buffer_switch_on_eof
Definition: hlsl.yy.c:305
static char yy_hold_char
Definition: hlsl.yy.c:293
static void hlsl_ensure_buffer_stack(void)
Definition: hlsl.yy.c:2586
#define YY_CURRENT_BUFFER_LVALUE
Definition: hlsl.yy.c:290
static char * yy_c_buf_p
Definition: hlsl.yy.c:298
#define YY_CURRENT_BUFFER
Definition: hlsl.yy.c:283
static yy_size_t yy_n_chars
Definition: hlsl.yy.c:294

Referenced by hlsl__scan_buffer(), and parse_hlsl_shader().

◆ hlsl_alloc()

void * hlsl_alloc ( yy_size_t  size)

Definition at line 2896 of file hlsl.yy.c.

2897 {
2898  return (void *) malloc( size );
2899 }
GLsizeiptr size
Definition: glext.h:5919
#define malloc
Definition: debug_ros.c:4

Referenced by hlsl__create_buffer(), hlsl__scan_buffer(), hlsl__scan_bytes(), and hlsl_ensure_buffer_stack().

◆ hlsl_ensure_buffer_stack()

static void hlsl_ensure_buffer_stack ( void  )
static

Definition at line 2586 of file hlsl.yy.c.

2587 {
2588  yy_size_t num_to_alloc;
2589 
2590  if (!(yy_buffer_stack)) {
2591 
2592  /* First allocation is just for 2 elements, since we don't know if this
2593  * scanner will even need a stack. We use 2 instead of 1 to avoid an
2594  * immediate realloc on the next call.
2595  */
2596  num_to_alloc = 1;
2598  (num_to_alloc * sizeof(struct yy_buffer_state*)
2599  );
2600  if ( ! (yy_buffer_stack) )
2601  YY_FATAL_ERROR( "out of dynamic memory in hlsl_ensure_buffer_stack()" );
2602 
2603  memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2604 
2605  (yy_buffer_stack_max) = num_to_alloc;
2606  (yy_buffer_stack_top) = 0;
2607  return;
2608  }
2609 
2610  if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2611 
2612  /* Increase the buffer to prepare for a possible push. */
2613  int grow_size = 8 /* arbitrary grow size */;
2614 
2615  num_to_alloc = (yy_buffer_stack_max) + grow_size;
2617  ((yy_buffer_stack),
2618  num_to_alloc * sizeof(struct yy_buffer_state*)
2619  );
2620  if ( ! (yy_buffer_stack) )
2621  YY_FATAL_ERROR( "out of dynamic memory in hlsl_ensure_buffer_stack()" );
2622 
2623  /* zero only the new slots.*/
2624  memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2625  (yy_buffer_stack_max) = num_to_alloc;
2626  }
2627 }
size_t yy_size_t
Definition: macro.lex.yy.c:159
void * hlsl_alloc(yy_size_t)
Definition: hlsl.yy.c:2896
static size_t yy_buffer_stack_top
Definition: hlsl.yy.c:273
static size_t yy_buffer_stack_max
Definition: hlsl.yy.c:274
void * hlsl_realloc(void *, yy_size_t)
Definition: hlsl.yy.c:2901
static YY_BUFFER_STATE * yy_buffer_stack
Definition: hlsl.yy.c:275
#define YY_FATAL_ERROR(msg)
Definition: hlsl.yy.c:1120
#define memset(x, y, z)
Definition: compat.h:39

Referenced by hlsl__switch_to_buffer(), hlsl_push_buffer_state(), hlsl_restart(), and if().

◆ hlsl_free()

void hlsl_free ( void ptr)

Definition at line 2913 of file hlsl.yy.c.

2914 {
2915  free( (char *) ptr ); /* see hlsl_realloc() for (char *) cast */
2916 }
#define free
Definition: debug_ros.c:5
static PVOID ptr
Definition: dispmode.c:27

Referenced by hlsl__delete_buffer(), and hlsl_lex_destroy().

◆ hlsl_get_debug()

int hlsl_get_debug ( void  )

Definition at line 2812 of file hlsl.yy.c.

2813 {
2814  return hlsl__flex_debug;
2815 }
int hlsl__flex_debug
Definition: hlsl.yy.c:924

◆ hlsl_get_extra()

YY_EXTRA_TYPE hlsl_get_extra ( void  )

◆ hlsl_get_in()

FILE * hlsl_get_in ( void  )

Get the input stream.

Definition at line 2756 of file hlsl.yy.c.

2757 {
2758  return hlsl_in;
2759 }
FILE * hlsl_in
Definition: hlsl.yy.c:360

◆ hlsl_get_leng()

yy_size_t hlsl_get_leng ( void  )

Get the length of the current token.

Definition at line 2772 of file hlsl.yy.c.

2773 {
2774  return hlsl_leng;
2775 }
yy_size_t hlsl_leng
Definition: hlsl.yy.c:295

◆ hlsl_get_lineno()

int hlsl_get_lineno ( void  )

Get the current line number.

Definition at line 2747 of file hlsl.yy.c.

2748 {
2749 
2750  return hlsl_lineno;
2751 }
int hlsl_lineno
Definition: hlsl.yy.c:366

◆ hlsl_get_out()

FILE * hlsl_get_out ( void  )

Get the output stream.

Definition at line 2764 of file hlsl.yy.c.

2765 {
2766  return hlsl_out;
2767 }
FILE * hlsl_out
Definition: hlsl.yy.c:360

◆ hlsl_get_text()

char * hlsl_get_text ( void  )

Get the current token.

Definition at line 2781 of file hlsl.yy.c.

2782 {
2783  return hlsl_text;
2784 }
char * hlsl_text
Definition: hlsl.yy.c:933

◆ hlsl_lex()

int hlsl_lex ( void  )

◆ hlsl_lex_destroy()

int hlsl_lex_destroy ( void  )

Definition at line 2851 of file hlsl.yy.c.

2852 {
2853 
2854  /* Pop the buffer stack, destroying each element. */
2855  while(YY_CURRENT_BUFFER){
2859  }
2860 
2861  /* Destroy the stack itself. */
2863  (yy_buffer_stack) = NULL;
2864 
2865  /* Reset the globals. This is important in a non-reentrant scanner so the next time
2866  * hlsl_lex() is called, initialization will occur. */
2867  yy_init_globals( );
2868 
2869  return 0;
2870 }
void hlsl_pop_buffer_state(void)
Definition: hlsl.yy.c:2567
void hlsl__delete_buffer(YY_BUFFER_STATE b)
Definition: hlsl.yy.c:2461
smooth NULL
Definition: ftsmooth.c:416
void hlsl_free(void *)
Definition: hlsl.yy.c:2913
#define YY_CURRENT_BUFFER_LVALUE
Definition: hlsl.yy.c:290
static YY_BUFFER_STATE * yy_buffer_stack
Definition: hlsl.yy.c:275
#define YY_CURRENT_BUFFER
Definition: hlsl.yy.c:283
static int yy_init_globals(void)
Definition: hlsl.yy.c:2822

◆ hlsl_pop_buffer_state()

void hlsl_pop_buffer_state ( void  )

Removes and deletes the top of the stack, if present. The next element becomes the new top.

Definition at line 2567 of file hlsl.yy.c.

2568 {
2569  if (!YY_CURRENT_BUFFER)
2570  return;
2571 
2574  if ((yy_buffer_stack_top) > 0)
2575  --(yy_buffer_stack_top);
2576 
2577  if (YY_CURRENT_BUFFER) {
2580  }
2581 }
static void hlsl__load_buffer_state(void)
Definition: hlsl.yy.c:2419
static int yy_did_buffer_switch_on_eof
Definition: hlsl.yy.c:305
void hlsl__delete_buffer(YY_BUFFER_STATE b)
Definition: hlsl.yy.c:2461
smooth NULL
Definition: ftsmooth.c:416
#define YY_CURRENT_BUFFER_LVALUE
Definition: hlsl.yy.c:290
static size_t yy_buffer_stack_top
Definition: hlsl.yy.c:273
#define YY_CURRENT_BUFFER
Definition: hlsl.yy.c:283

Referenced by hlsl_lex_destroy().

◆ hlsl_push_buffer_state()

void hlsl_push_buffer_state ( YY_BUFFER_STATE  new_buffer)

Pushes the new state onto the stack. The new state becomes the current state. This function will allocate the stack if necessary.

Parameters
new_bufferThe new state.

Definition at line 2537 of file hlsl.yy.c.

2538 {
2539  if (new_buffer == NULL)
2540  return;
2541 
2543 
2544  /* This block is copied from hlsl__switch_to_buffer. */
2545  if ( YY_CURRENT_BUFFER )
2546  {
2547  /* Flush out information for old buffer. */
2548  *(yy_c_buf_p) = (yy_hold_char);
2549  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2550  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2551  }
2552 
2553  /* Only push if top exists. Otherwise, replace top. */
2554  if (YY_CURRENT_BUFFER)
2555  (yy_buffer_stack_top)++;
2556  YY_CURRENT_BUFFER_LVALUE = new_buffer;
2557 
2558  /* copied from hlsl__switch_to_buffer. */
2561 }
static void hlsl__load_buffer_state(void)
Definition: hlsl.yy.c:2419
static int yy_did_buffer_switch_on_eof
Definition: hlsl.yy.c:305
static char yy_hold_char
Definition: hlsl.yy.c:293
smooth NULL
Definition: ftsmooth.c:416
static void hlsl_ensure_buffer_stack(void)
Definition: hlsl.yy.c:2586
#define YY_CURRENT_BUFFER_LVALUE
Definition: hlsl.yy.c:290
static size_t yy_buffer_stack_top
Definition: hlsl.yy.c:273
static char * yy_c_buf_p
Definition: hlsl.yy.c:298
#define YY_CURRENT_BUFFER
Definition: hlsl.yy.c:283
static yy_size_t yy_n_chars
Definition: hlsl.yy.c:294

◆ hlsl_realloc()

void * hlsl_realloc ( void ptr,
yy_size_t  size 
)

Definition at line 2901 of file hlsl.yy.c.

2902 {
2903  /* The cast to (char *) in the following accommodates both
2904  * implementations that use char* generic pointers, and those
2905  * that use void* generic pointers. It works with the latter
2906  * because both ANSI C and C++ allow castless assignment from
2907  * any pointer type to void*, and deal with argument conversions
2908  * as though doing an assignment.
2909  */
2910  return (void *) realloc( (char *) ptr, size );
2911 }
#define realloc
Definition: debug_ros.c:6
static PVOID ptr
Definition: dispmode.c:27
GLsizeiptr size
Definition: glext.h:5919

Referenced by hlsl_ensure_buffer_stack(), and yy_get_next_buffer().

◆ hlsl_restart()

void hlsl_restart ( FILE input_file)

Immediately switch to a different input stream.

Parameters
input_fileA readable stream.
Note
This function does not reset the start condition to INITIAL .

Definition at line 2371 of file hlsl.yy.c.

2372 {
2373 
2374  if ( ! YY_CURRENT_BUFFER ){
2378  }
2379 
2380  hlsl__init_buffer(YY_CURRENT_BUFFER,input_file );
2382 }
static void hlsl__load_buffer_state(void)
Definition: hlsl.yy.c:2419
static void hlsl__init_buffer(YY_BUFFER_STATE b, FILE *file)
Definition: hlsl.yy.c:2480
FILE * hlsl_in
Definition: hlsl.yy.c:360
#define YY_BUF_SIZE
Definition: hlsl.yy.c:164
YY_BUFFER_STATE hlsl__create_buffer(FILE *file, int size)
Definition: hlsl.yy.c:2433
static void hlsl_ensure_buffer_stack(void)
Definition: hlsl.yy.c:2586
#define YY_CURRENT_BUFFER_LVALUE
Definition: hlsl.yy.c:290
#define YY_CURRENT_BUFFER
Definition: hlsl.yy.c:283

Referenced by yy_get_next_buffer().

◆ hlsl_set_debug()

void hlsl_set_debug ( int  debug_flag)

Definition at line 2817 of file hlsl.yy.c.

2818 {
2819  hlsl__flex_debug = bdebug ;
2820 }
int hlsl__flex_debug
Definition: hlsl.yy.c:924

◆ hlsl_set_extra()

void hlsl_set_extra ( YY_EXTRA_TYPE  user_defined)

◆ hlsl_set_in()

void hlsl_set_in ( FILE in_str)

Set the input stream. This does not discard the current input buffer.

Parameters
in_strA readable stream.
See also
hlsl__switch_to_buffer

Definition at line 2802 of file hlsl.yy.c.

2803 {
2804  hlsl_in = in_str ;
2805 }
FILE * hlsl_in
Definition: hlsl.yy.c:360

◆ hlsl_set_lineno()

void hlsl_set_lineno ( int  line_number)

Set the current line number.

Parameters
line_number

Definition at line 2790 of file hlsl.yy.c.

2791 {
2792 
2794 }
int line_number
Definition: parser.yy.c:775
int hlsl_lineno
Definition: hlsl.yy.c:366

◆ hlsl_set_out()

void hlsl_set_out ( FILE out_str)

Definition at line 2807 of file hlsl.yy.c.

2808 {
2809  hlsl_out = out_str ;
2810 }
FILE * hlsl_out
Definition: hlsl.yy.c:360

◆ if()

if ( yy_init)

Definition at line 1166 of file hlsl.yy.c.

1167  {
1168  (yy_init) = 1;
1169 
1170 #ifdef YY_USER_INIT
1171  YY_USER_INIT;
1172 #endif
1173 
1174  if ( ! (yy_start) )
1175  (yy_start) = 1; /* first start state */
1176 
1177  if ( ! hlsl_in )
1178  hlsl_in = stdin;
1179 
1180  if ( ! hlsl_out )
1181  hlsl_out = stdout;
1182 
1183  if ( ! YY_CURRENT_BUFFER ) {
1187  }
1188 
1190  }
static void hlsl__load_buffer_state(void)
Definition: hlsl.yy.c:2419
FILE * stdin
FILE * stdout
FILE * hlsl_in
Definition: hlsl.yy.c:360
#define YY_BUF_SIZE
Definition: hlsl.yy.c:164
static int yy_init
Definition: hlsl.yy.c:299
YY_BUFFER_STATE hlsl__create_buffer(FILE *file, int size)
Definition: hlsl.yy.c:2433
static void hlsl_ensure_buffer_stack(void)
Definition: hlsl.yy.c:2586
FILE * hlsl_out
Definition: hlsl.yy.c:360
#define YY_CURRENT_BUFFER_LVALUE
Definition: hlsl.yy.c:290
#define YY_CURRENT_BUFFER
Definition: hlsl.yy.c:283
static int yy_start
Definition: hlsl.yy.c:300

◆ parse_hlsl()

struct bwriter_shader* parse_hlsl ( enum shader_type  type,
DWORD  major,
DWORD  minor,
const char entrypoint,
char **  messages 
)

Definition at line 4891 of file hlsl.tab.c.

4893 {
4894  struct hlsl_scope *scope, *next_scope;
4895  struct hlsl_type *hlsl_type, *next_type;
4896  struct hlsl_ir_var *var, *next_var;
4897  unsigned int i;
4898 
4899  hlsl_ctx.status = PARSE_SUCCESS;
4900  hlsl_ctx.messages.size = hlsl_ctx.messages.capacity = 0;
4901  hlsl_ctx.line_no = hlsl_ctx.column = 1;
4902  hlsl_ctx.source_file = d3dcompiler_strdup("");
4903  hlsl_ctx.source_files = d3dcompiler_alloc(sizeof(*hlsl_ctx.source_files));
4904  if (hlsl_ctx.source_files)
4905  hlsl_ctx.source_files[0] = hlsl_ctx.source_file;
4906  hlsl_ctx.source_files_count = 1;
4907  hlsl_ctx.cur_scope = NULL;
4908  hlsl_ctx.matrix_majority = HLSL_COLUMN_MAJOR;
4909  list_init(&hlsl_ctx.scopes);
4910  list_init(&hlsl_ctx.types);
4911  init_functions_tree(&hlsl_ctx.functions);
4912 
4913  push_scope(&hlsl_ctx);
4914  hlsl_ctx.globals = hlsl_ctx.cur_scope;
4916 
4917  hlsl_parse();
4918 
4919  if (TRACE_ON(hlsl_parser))
4920  {
4921  TRACE("IR dump.\n");
4923  }
4924 
4925  TRACE("Compilation status = %d\n", hlsl_ctx.status);
4926  if (messages)
4927  {
4928  if (hlsl_ctx.messages.size)
4929  *messages = hlsl_ctx.messages.string;
4930  else
4931  *messages = NULL;
4932  }
4933  else
4934  {
4935  if (hlsl_ctx.messages.capacity)
4936  d3dcompiler_free(hlsl_ctx.messages.string);
4937  }
4938 
4939  for (i = 0; i < hlsl_ctx.source_files_count; ++i)
4940  d3dcompiler_free((void *)hlsl_ctx.source_files[i]);
4941  d3dcompiler_free(hlsl_ctx.source_files);
4942 
4943  TRACE("Freeing functions IR.\n");
4945 
4946  TRACE("Freeing variables.\n");
4947  LIST_FOR_EACH_ENTRY_SAFE(scope, next_scope, &hlsl_ctx.scopes, struct hlsl_scope, entry)
4948  {
4949  LIST_FOR_EACH_ENTRY_SAFE(var, next_var, &scope->vars, struct hlsl_ir_var, scope_entry)
4950  {
4951  free_declaration(var);
4952  }
4953  wine_rb_destroy(&scope->types, NULL, NULL);
4954  d3dcompiler_free(scope);
4955  }
4956 
4957  TRACE("Freeing types.\n");
4958  LIST_FOR_EACH_ENTRY_SAFE(hlsl_type, next_type, &hlsl_ctx.types, struct hlsl_type, entry)
4959  {
4961  }
4962 
4963  return NULL;
4964 }
void free_hlsl_type(struct hlsl_type *type) DECLSPEC_HIDDEN
Definition: utils.c:2278
void push_scope(struct hlsl_parse_ctx *ctx) DECLSPEC_HIDDEN
Definition: utils.c:1704
struct list vars
static BOOL d3dcompiler_free(void *ptr)
static void * d3dcompiler_alloc(SIZE_T size)
static void dump_function(struct wine_rb_entry *entry, void *context)
Definition: hlsl.tab.c:4885
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
void free_function_rb(struct wine_rb_entry *entry, void *context) DECLSPEC_HIDDEN
Definition: utils.c:2451
smooth NULL
Definition: ftsmooth.c:416
int hlsl_parse(void)
#define TRACE(s)
Definition: solgame.cpp:4
static char * d3dcompiler_strdup(const char *string)
static void wine_rb_destroy(struct wine_rb_tree *tree, wine_rb_traverse_func_t *callback, void *context)
Definition: rbtree.h:198
struct hlsl_parse_ctx hlsl_ctx
Definition: hlsl.tab.c:87
uint32_t entry
Definition: isohybrid.c:63
struct list scope_entry
void free_declaration(struct hlsl_ir_var *decl) DECLSPEC_HIDDEN
Definition: utils.c:801
static void wine_rb_for_each_entry(struct wine_rb_tree *tree, wine_rb_traverse_func_t *callback, void *context)
Definition: rbtree.h:185
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
static void declare_predefined_types(struct hlsl_scope *scope)
Definition: hlsl.tab.c:252
void init_functions_tree(struct wine_rb_tree *funcs) DECLSPEC_HIDDEN
Definition: utils.c:1833
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
Definition: list.h:149
#define TRACE_ON(x)
Definition: compat.h:65
struct wine_rb_tree types

Referenced by parse_hlsl_shader().

◆ parse_hlsl_shader()

struct bwriter_shader* parse_hlsl_shader ( const char text,
enum shader_type  type,
DWORD  major,
DWORD  minor,
const char entrypoint,
char **  messages 
)

Definition at line 2927 of file hlsl.yy.c.

2929 {
2930  struct bwriter_shader *ret = NULL;
2932 
2935 
2936  ret = parse_hlsl(type, major, minor, entrypoint, messages);
2937 
2939  return ret;
2940 }
void hlsl__switch_to_buffer(YY_BUFFER_STATE new_buffer)
Definition: hlsl.yy.c:2388
const WCHAR * text
Definition: package.c:1827
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLuint buffer
Definition: glext.h:5915
void hlsl__delete_buffer(YY_BUFFER_STATE b)
Definition: hlsl.yy.c:2461
smooth NULL
Definition: ftsmooth.c:416
int ret
#define major(rdev)
Definition: propsheet.cpp:879
YY_BUFFER_STATE hlsl__scan_string(yyconst char *yy_str)
Definition: hlsl.yy.c:2672
#define minor(rdev)
Definition: propsheet.cpp:880
struct bwriter_shader * parse_hlsl(enum shader_type type, DWORD major, DWORD minor, const char *entrypoint, char **messages)
Definition: hlsl.tab.c:4891

Referenced by compile_shader().

◆ while()

while ( )

Definition at line 1192 of file hlsl.yy.c.

1193  {
1194  yy_cp = (yy_c_buf_p);
1195 
1196  /* Support of hlsl_text. */
1197  *yy_cp = (yy_hold_char);
1198 
1199  /* yy_bp points to the position in yy_ch_buf of the start of
1200  * the current run.
1201  */
1202  yy_bp = yy_cp;
1203 
1206 yy_match:
1207  do
1208  {
1209  register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1210  if ( yy_accept[yy_current_state] )
1211  {
1214  }
1215  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1216  {
1218  if ( yy_current_state >= 717 )
1219  yy_c = yy_meta[(unsigned int) yy_c];
1220  }
1221  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1222  ++yy_cp;
1223  }
1224  while ( yy_current_state != 716 );
1227 
1228 yy_find_action:
1230 
1232 
1233 do_action: /* This label is used only to access EOF actions. */
1234 
1235  switch ( yy_act )
1236  { /* beginning of action switch */
1237  case 0: /* must back up */
1238  /* undo the effects of YY_DO_BEFORE_ACTION */
1239  *yy_cp = (yy_hold_char);
1242  goto yy_find_action;
1243 
1244 case 1:
1246 #line 61 "hlsl.l"
1247 {
1248  hlsl_message("Line %u: Reserved keyword \"%s\" used.\n", hlsl_ctx.line_no, hlsl_text);
1250  }
1251  YY_BREAK
1252 case 2:
1254 #line 65 "hlsl.l"
1255 {
1256  hlsl_message("Line %u: Reserved keyword \"%s\" used.\n", hlsl_ctx.line_no, hlsl_text);
1258  }
1259  YY_BREAK
1260 case 3:
1262 #line 69 "hlsl.l"
1263 {
1264  hlsl_message("Line %u: Reserved keyword \"%s\" used.\n", hlsl_ctx.line_no, hlsl_text);
1266  }
1267  YY_BREAK
1268 case 4:
1270 #line 73 "hlsl.l"
1271 {
1272  hlsl_message("Line %u: Reserved keyword \"%s\" used.\n", hlsl_ctx.line_no, hlsl_text);
1274  }
1275  YY_BREAK
1276 case 5:
1278 #line 78 "hlsl.l"
1279 {return KW_BLENDSTATE; }
1280  YY_BREAK
1281 case 6:
1283 #line 79 "hlsl.l"
1284 {return KW_BREAK; }
1285  YY_BREAK
1286 case 7:
1288 #line 80 "hlsl.l"
1289 {return KW_BUFFER; }
1290  YY_BREAK
1291 case 8:
1293 #line 81 "hlsl.l"
1294 {return KW_CBUFFER; }
1295  YY_BREAK
1296 case 9:
1298 #line 82 "hlsl.l"
1299 {return KW_COMPILE; }
1300  YY_BREAK
1301 case 10:
1303 #line 83 "hlsl.l"
1304 {return KW_CONST; }
1305  YY_BREAK
1306 case 11:
1308 #line 84 "hlsl.l"
1309 {return KW_CONTINUE; }
1310  YY_BREAK
1311 case 12:
1313 #line 85 "hlsl.l"
1314 {return KW_DEPTHSTENCILSTATE; }
1315  YY_BREAK
1316 case 13:
1318 #line 86 "hlsl.l"
1319 {return KW_DEPTHSTENCILVIEW; }
1320  YY_BREAK
1321 case 14:
1323 #line 87 "hlsl.l"
1324 {return KW_DISCARD; }
1325  YY_BREAK
1326 case 15:
1328 #line 88 "hlsl.l"
1329 {return KW_DO; }
1330  YY_BREAK
1331 case 16:
1333 #line 89 "hlsl.l"
1334 {return KW_DOUBLE; }
1335  YY_BREAK
1336 case 17:
1338 #line 90 "hlsl.l"
1339 {return KW_ELSE; }
1340  YY_BREAK
1341 case 18:
1343 #line 91 "hlsl.l"
1344 {return KW_EXTERN; }
1345  YY_BREAK
1346 case 19:
1348 #line 92 "hlsl.l"
1349 {return KW_FALSE; }
1350  YY_BREAK
1351 case 20:
1353 #line 93 "hlsl.l"
1354 {return KW_FOR; }
1355  YY_BREAK
1356 case 21:
1358 #line 94 "hlsl.l"
1359 {return KW_GEOMETRYSHADER; }
1360  YY_BREAK
1361 case 22:
1363 #line 95 "hlsl.l"
1364 {return KW_GROUPSHARED; }
1365  YY_BREAK
1366 case 23:
1368 #line 96 "hlsl.l"
1369 {return KW_IF; }
1370  YY_BREAK
1371 case 24:
1373 #line 97 "hlsl.l"
1374 {return KW_IN; }
1375  YY_BREAK
1376 case 25:
1378 #line 98 "hlsl.l"
1379 {return KW_INLINE; }
1380  YY_BREAK
1381 case 26:
1383 #line 99 "hlsl.l"
1384 {return KW_INOUT; }
1385  YY_BREAK
1386 case 27:
1388 #line 100 "hlsl.l"
1389 {return KW_MATRIX; }
1390  YY_BREAK
1391 case 28:
1393 #line 101 "hlsl.l"
1394 {return KW_NAMESPACE; }
1395  YY_BREAK
1396 case 29:
1398 #line 102 "hlsl.l"
1399 {return KW_NOINTERPOLATION; }
1400  YY_BREAK
1401 case 30:
1403 #line 103 "hlsl.l"
1404 {return KW_OUT; }
1405  YY_BREAK
1406 case 31:
1408 #line 104 "hlsl.l"
1409 {return KW_PASS; }
1410  YY_BREAK
1411 case 32:
1413 #line 105 "hlsl.l"
1414 {return KW_PIXELSHADER; }
1415  YY_BREAK
1416 case 33:
1418 #line 106 "hlsl.l"
1419 {return KW_PRECISE; }
1420  YY_BREAK
1421 case 34:
1423 #line 107 "hlsl.l"
1424 {return KW_RASTERIZERSTATE; }
1425  YY_BREAK
1426 case 35:
1428 #line 108 "hlsl.l"
1429 {return KW_RENDERTARGETVIEW; }
1430  YY_BREAK
1431 case 36:
1433 #line 109 "hlsl.l"
1434 {return KW_RETURN; }
1435  YY_BREAK
1436 case 37:
1438 #line 110 "hlsl.l"
1439 {return KW_REGISTER; }
1440  YY_BREAK
1441 case 38:
1443 #line 111 "hlsl.l"
1444 {return KW_SAMPLER; }
1445  YY_BREAK
1446 case 39:
1448 #line 112 "hlsl.l"
1449 {return KW_SAMPLER1D; }
1450  YY_BREAK
1451 case 40:
1453 #line 113 "hlsl.l"
1454 {return KW_SAMPLER2D; }
1455  YY_BREAK
1456 case 41:
1458 #line 114 "hlsl.l"
1459 {return KW_SAMPLER3D; }
1460  YY_BREAK
1461 case 42:
1463 #line 115 "hlsl.l"
1464 {return KW_SAMPLERCUBE; }
1465  YY_BREAK
1466 case 43:
1468 #line 116 "hlsl.l"
1469 {return KW_SAMPLER_STATE; }
1470  YY_BREAK
1471 case 44:
1473 #line 117 "hlsl.l"
1474 {return KW_SAMPLERCOMPARISONSTATE;}
1475  YY_BREAK
1476 case 45:
1478 #line 118 "hlsl.l"
1479 {return KW_SHARED; }
1480  YY_BREAK
1481 case 46:
1483 #line 119 "hlsl.l"
1484 {return KW_STATEBLOCK; }
1485  YY_BREAK
1486 case 47:
1488 #line 120 "hlsl.l"
1489 {return KW_STATEBLOCK_STATE; }
1490  YY_BREAK
1491 case 48:
1493 #line 121 "hlsl.l"
1494 {return KW_STATIC; }
1495  YY_BREAK
1496 case 49:
1498 #line 122 "hlsl.l"
1499 {return KW_STRING; }
1500  YY_BREAK
1501 case 50:
1503 #line 123 "hlsl.l"
1504 {return KW_STRUCT; }
1505  YY_BREAK
1506 case 51:
1508 #line 124 "hlsl.l"
1509 {return KW_SWITCH; }
1510  YY_BREAK
1511 case 52:
1513 #line 125 "hlsl.l"
1514 {return KW_TBUFFER; }
1515  YY_BREAK
1516 case 53:
1518 #line 126 "hlsl.l"
1519 {return KW_TECHNIQUE; }
1520  YY_BREAK
1521 case 54:
1523 #line 127 "hlsl.l"
1524 {return KW_TECHNIQUE10; }
1525  YY_BREAK
1526 case 55:
1528 #line 128 "hlsl.l"
1529 {return KW_TEXTURE; }
1530  YY_BREAK
1531 case 56:
1533 #line 129 "hlsl.l"
1534 {return KW_TEXTURE1D; }
1535  YY_BREAK
1536 case 57:
1538 #line 130 "hlsl.l"
1539 {return KW_TEXTURE1DARRAY; }
1540  YY_BREAK
1541 case 58:
1543 #line 131 "hlsl.l"
1544 {return KW_TEXTURE2D; }
1545  YY_BREAK
1546 case 59:
1548 #line 132 "hlsl.l"
1549 {return KW_TEXTURE2DARRAY; }
1550  YY_BREAK
1551 case 60:
1553 #line 133 "hlsl.l"
1554 {return KW_TEXTURE2DMS; }
1555  YY_BREAK
1556 case 61:
1558 #line 134 "hlsl.l"
1559 {return KW_TEXTURE2DMSARRAY; }
1560  YY_BREAK
1561 case 62:
1563 #line 135 "hlsl.l"
1564 {return KW_TEXTURE3D; }
1565  YY_BREAK
1566 case 63:
1568 #line 136 "hlsl.l"
1569 {return KW_TEXTURE3DARRAY; }
1570  YY_BREAK
1571 case 64:
1573 #line 137 "hlsl.l"
1574 {return KW_TEXTURECUBE; }
1575  YY_BREAK
1576 case 65:
1578 #line 138 "hlsl.l"
1579 {return KW_TRUE; }
1580  YY_BREAK
1581 case 66:
1583 #line 139 "hlsl.l"
1584 {return KW_TYPEDEF; }
1585  YY_BREAK
1586 case 67:
1588 #line 140 "hlsl.l"
1589 {return KW_UNIFORM; }
1590  YY_BREAK
1591 case 68:
1593 #line 141 "hlsl.l"
1594 {return KW_VECTOR; }
1595  YY_BREAK
1596 case 69:
1598 #line 142 "hlsl.l"
1599 {return KW_VERTEXSHADER; }
1600  YY_BREAK
1601 case 70:
1603 #line 143 "hlsl.l"
1604 {return KW_VOID; }
1605  YY_BREAK
1606 case 71:
1608 #line 144 "hlsl.l"
1609 {return KW_VOLATILE; }
1610  YY_BREAK
1611 case 72:
1613 #line 145 "hlsl.l"
1614 {return KW_WHILE; }
1615  YY_BREAK
1616 case 73:
1618 #line 147 "hlsl.l"
1619 {return OP_INC; }
1620  YY_BREAK
1621 case 74:
1623 #line 148 "hlsl.l"
1624 {return OP_DEC; }
1625  YY_BREAK
1626 case 75:
1628 #line 149 "hlsl.l"
1629 {return OP_AND; }
1630  YY_BREAK
1631 case 76:
1633 #line 150 "hlsl.l"
1634 {return OP_OR; }
1635  YY_BREAK
1636 case 77:
1638 #line 151 "hlsl.l"
1639 {return OP_EQ; }
1640  YY_BREAK
1641 case 78:
1643 #line 152 "hlsl.l"
1644 {return OP_LEFTSHIFT; }
1645  YY_BREAK
1646 case 79:
1648 #line 153 "hlsl.l"
1649 {return OP_LEFTSHIFTASSIGN; }
1650  YY_BREAK
1651 case 80:
1653 #line 154 "hlsl.l"
1654 {return OP_RIGHTSHIFT; }
1655  YY_BREAK
1656 case 81:
1658 #line 155 "hlsl.l"
1659 {return OP_RIGHTSHIFTASSIGN; }
1660  YY_BREAK
1661 case 82:
1663 #line 156 "hlsl.l"
1664 {return OP_ELLIPSIS; }
1665  YY_BREAK
1666 case 83:
1668 #line 157 "hlsl.l"
1669 {return OP_LE; }
1670  YY_BREAK
1671 case 84:
1673 #line 158 "hlsl.l"
1674 {return OP_GE; }
1675  YY_BREAK
1676 case 85:
1678 #line 159 "hlsl.l"
1679 {return OP_NE; }
1680  YY_BREAK
1681 case 86:
1683 #line 160 "hlsl.l"
1684 {return OP_ADDASSIGN; }
1685  YY_BREAK
1686 case 87:
1688 #line 161 "hlsl.l"
1689 {return OP_SUBASSIGN; }
1690  YY_BREAK
1691 case 88:
1693 #line 162 "hlsl.l"
1694 {return OP_MULASSIGN; }
1695  YY_BREAK
1696 case 89:
1698 #line 163 "hlsl.l"
1699 {return OP_DIVASSIGN; }
1700  YY_BREAK
1701 case 90:
1703 #line 164 "hlsl.l"
1704 {return OP_MODASSIGN; }
1705  YY_BREAK
1706 case 91:
1708 #line 165 "hlsl.l"
1709 {return OP_ANDASSIGN; }
1710  YY_BREAK
1711 case 92:
1713 #line 166 "hlsl.l"
1714 {return OP_ORASSIGN; }
1715  YY_BREAK
1716 case 93:
1718 #line 167 "hlsl.l"
1719 {return OP_XORASSIGN; }
1720  YY_BREAK
1721 case 94:
1723 #line 168 "hlsl.l"
1724 {return OP_UNKNOWN1; }
1725  YY_BREAK
1726 case 95:
1728 #line 169 "hlsl.l"
1729 {return OP_UNKNOWN2; }
1730  YY_BREAK
1731 case 96:
1733 #line 170 "hlsl.l"
1734 {return OP_UNKNOWN3; }
1735  YY_BREAK
1736 case 97:
1738 #line 171 "hlsl.l"
1739 {return OP_UNKNOWN4; }
1740  YY_BREAK
1741 case 98:
1743 #line 173 "hlsl.l"
1744 {return KW_COLUMN_MAJOR; }
1745  YY_BREAK
1746 case 99:
1748 #line 174 "hlsl.l"
1749 {return KW_ROW_MAJOR; }
1750  YY_BREAK
1751 case 100:
1753 #line 176 "hlsl.l"
1754 {
1756  if (get_variable(hlsl_ctx.cur_scope, hlsl_text)
1758  return VAR_IDENTIFIER;
1759  else if (get_type(hlsl_ctx.cur_scope, hlsl_text, TRUE))
1760  return TYPE_IDENTIFIER;
1761  else
1762  return NEW_IDENTIFIER;
1763  }
1764  YY_BREAK
1765 case 101:
1767 #line 187 "hlsl.l"
1768 {
1770  return C_FLOAT;
1771  }
1772  YY_BREAK
1773 case 102:
1775 #line 191 "hlsl.l"
1776 {
1778  return C_FLOAT;
1779  }
1780  YY_BREAK
1781 case 103:
1783 #line 195 "hlsl.l"
1784 {
1786  return C_FLOAT;
1787  }
1788  YY_BREAK
1789 case 104:
1791 #line 199 "hlsl.l"
1792 {
1793  sscanf(hlsl_text, "0x%x", &hlsl_lval.intval);
1794  return C_INTEGER;
1795  }
1796  YY_BREAK
1797 case 105:
1799 #line 203 "hlsl.l"
1800 {
1801  sscanf(hlsl_text, "0%o", &hlsl_lval.intval);
1802  return C_INTEGER;
1803  }
1804  YY_BREAK
1805 case 106:
1807 #line 207 "hlsl.l"
1808 {
1810  return C_INTEGER;
1811  }
1812  YY_BREAK
1813 case 107:
1815 #line 212 "hlsl.l"
1816 {}
1817  YY_BREAK
1818 case 108:
1820 #line 214 "hlsl.l"
1821 {}
1822  YY_BREAK
1823 case 109:
1824 /* rule 109 can match eol */
1826 #line 215 "hlsl.l"
1827 {
1828  hlsl_ctx.line_no++;
1829  hlsl_ctx.column = 1;
1830  }
1831  YY_BREAK
1832 case 110:
1834 #line 220 "hlsl.l"
1835 {
1836  BEGIN pp;
1837  }
1838  YY_BREAK
1839 case 111:
1841 #line 224 "hlsl.l"
1842 {
1843  TRACE("Got a #pragma.\n");
1844  BEGIN pp_pragma;
1845  }
1846  YY_BREAK
1847 case 112:
1849 #line 228 "hlsl.l"
1850 {
1851  TRACE("#pragma setting row_major mode.\n");
1852  hlsl_ctx.matrix_majority = HLSL_ROW_MAJOR;
1853  BEGIN pp_ignore;
1854  }
1855  YY_BREAK
1856 case 113:
1858 #line 233 "hlsl.l"
1859 {
1860  TRACE("#pragma setting column_major mode.\n");
1861  hlsl_ctx.matrix_majority = HLSL_COLUMN_MAJOR;
1862  BEGIN pp_ignore;
1863  }
1864  YY_BREAK
1865 case 114:
1866 /* rule 114 can match eol */
1868 #line 238 "hlsl.l"
1869 {
1870  FIXME("Unsupported preprocessor #pragma directive at line %u.\n", hlsl_ctx.line_no);
1871  BEGIN INITIAL;
1872  }
1873  YY_BREAK
1874 case 115:
1876 #line 242 "hlsl.l"
1877 {}
1878  YY_BREAK
1879 case 116:
1881 #line 243 "hlsl.l"
1882 {
1883  TRACE("Preprocessor line info.\n");
1884  BEGIN pp_line;
1886  return PRE_LINE;
1887  }
1888  YY_BREAK
1889 case 117:
1890 /* rule 117 can match eol */
1892 #line 249 "hlsl.l"
1893 {
1894  char *string = d3dcompiler_strdup(hlsl_text + 1);
1895 
1896  BEGIN pp_ignore;
1897  string[strlen(string) - 1] = 0;
1898  hlsl_lval.name = string;
1899  return STRING;
1900  }
1901  YY_BREAK
1902 case 118:
1904 #line 257 "hlsl.l"
1905 {}
1906  YY_BREAK
1907 case 119:
1908 /* rule 119 can match eol */
1910 #line 258 "hlsl.l"
1911 {
1912  FIXME("Malformed preprocessor line directive?\n");
1913  BEGIN INITIAL;
1914  }
1915  YY_BREAK
1916 case 120:
1917 /* rule 120 can match eol */
1919 #line 262 "hlsl.l"
1920 {
1921  BEGIN INITIAL;
1922  }
1923  YY_BREAK
1924 case 121:
1926 #line 265 "hlsl.l"
1927 {}
1928  YY_BREAK
1929 case 122:
1930 /* rule 122 can match eol */
1932 #line 266 "hlsl.l"
1933 {
1934  FIXME("Unexpected preprocessor directive.\n");
1935  BEGIN INITIAL;
1936  }
1937  YY_BREAK
1938 case 123:
1940 #line 270 "hlsl.l"
1941 {}
1942  YY_BREAK
1943 case 124:
1945 #line 272 "hlsl.l"
1946 {
1947  return hlsl_text[0];
1948  }
1949  YY_BREAK
1950 case 125:
1952 #line 276 "hlsl.l"
1953 ECHO;
1954  YY_BREAK
1955 #line 1956 "hlsl.yy.c"
1956 case YY_STATE_EOF(INITIAL):
1957 case YY_STATE_EOF(pp):
1958 case YY_STATE_EOF(pp_line):
1959 case YY_STATE_EOF(pp_pragma):
1960 case YY_STATE_EOF(pp_ignore):
1961  yyterminate();
1962 
1963  case YY_END_OF_BUFFER:
1964  {
1965  /* Amount of text matched not including the EOB char. */
1966  int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1967 
1968  /* Undo the effects of YY_DO_BEFORE_ACTION. */
1969  *yy_cp = (yy_hold_char);
1971 
1972  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1973  {
1974  /* We're scanning a new file or input source. It's
1975  * possible that this happened because the user
1976  * just pointed hlsl_in at a new source and called
1977  * hlsl_lex(). If so, then we have to assure
1978  * consistency between YY_CURRENT_BUFFER and our
1979  * globals. Here is the right place to do so, because
1980  * this is the first action (other than possibly a
1981  * back-up) that will match for the new input source.
1982  */
1983  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1984  YY_CURRENT_BUFFER_LVALUE->yy_input_file = hlsl_in;
1985  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1986  }
1987 
1988  /* Note that here we test for yy_c_buf_p "<=" to the position
1989  * of the first EOB in the buffer, since yy_c_buf_p will
1990  * already have been incremented past the NUL character
1991  * (since all states make transitions on EOB to the
1992  * end-of-buffer state). Contrast this with the test
1993  * in input().
1994  */
1995  if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1996  { /* This was really a NUL. */
1997  yy_state_type yy_next_state;
1998 
1999  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
2000 
2002 
2003  /* Okay, we're now positioned to make the NUL
2004  * transition. We couldn't have
2005  * yy_get_previous_state() go ahead and do it
2006  * for us because it doesn't know how to deal
2007  * with the possibility of jamming (and we don't
2008  * want to build jamming into it because then it
2009  * will run more slowly).
2010  */
2011 
2012  yy_next_state = yy_try_NUL_trans( yy_current_state );
2013 
2015 
2016  if ( yy_next_state )
2017  {
2018  /* Consume the NUL. */
2019  yy_cp = ++(yy_c_buf_p);
2020  yy_current_state = yy_next_state;
2021  goto yy_match;
2022  }
2023 
2024  else
2025  {
2028  goto yy_find_action;
2029  }
2030  }
2031 
2032  else switch ( yy_get_next_buffer( ) )
2033  {
2034  case EOB_ACT_END_OF_FILE:
2035  {
2037 
2038  if ( hlsl_wrap( ) )
2039  {
2040  /* Note: because we've taken care in
2041  * yy_get_next_buffer() to have set up
2042  * hlsl_text, we can now set up
2043  * yy_c_buf_p so that if some total
2044  * hoser (like flex itself) wants to
2045  * call the scanner after we return the
2046  * YY_NULL, it'll still work - another
2047  * YY_NULL will get returned.
2048  */
2050 
2052  goto do_action;
2053  }
2054 
2055  else
2056  {
2057  if ( ! (yy_did_buffer_switch_on_eof) )
2058  YY_NEW_FILE;
2059  }
2060  break;
2061  }
2062 
2063  case EOB_ACT_CONTINUE_SCAN:
2064  (yy_c_buf_p) =
2065  (yytext_ptr) + yy_amount_of_matched_text;
2066 
2068 
2069  yy_cp = (yy_c_buf_p);
2071  goto yy_match;
2072 
2073  case EOB_ACT_LAST_MATCH:
2074  (yy_c_buf_p) =
2075  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
2076 
2078 
2079  yy_cp = (yy_c_buf_p);
2081  goto yy_find_action;
2082  }
2083  break;
2084  }
2085 
2086  default:
2088  "fatal flex scanner internal error--no action found" );
2089  } /* end of action switch */
2090  } /* end of scanning one token */
char * name
Definition: hlsl.tab.c:1109
#define TRUE
Definition: types.h:120
#define OP_EQ
Definition: query.h:36
#define OP_GE
Definition: query.h:42
static yyconst flex_int16_t yy_accept[717]
Definition: hlsl.yy.c:395
unsigned char YY_CHAR
Definition: macro.lex.yy.c:336
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
static yy_state_type yy_get_previous_state(void)
Definition: hlsl.yy.c:2234
#define YY_BUFFER_NEW
Definition: hlsl.yy.c:255
static int yy_did_buffer_switch_on_eof
Definition: hlsl.yy.c:305
static char yy_hold_char
Definition: hlsl.yy.c:293
static char * yy_last_accepting_cpos
Definition: hlsl.yy.c:921
#define YY_END_OF_BUFFER
Definition: hlsl.yy.c:387
#define yy_current_state()
Definition: ppl.yy.c:1235
void hlsl_message(const char *fmt,...) PRINTF_ATTR(1
#define YY_MORE_ADJ
Definition: hlsl.yy.c:931
#define OP_AND
Definition: query.h:37
struct hlsl_ir_var * get_variable(struct hlsl_scope *scope, const char *name) DECLSPEC_HIDDEN
Definition: utils.c:787
#define YY_SC_TO_UI(c)
Definition: hlsl.yy.c:139
_Check_return_ _CRTIMP double __cdecl atof(_In_z_ const char *str)
#define yytext_ptr
Definition: hlsl.yy.c:369
#define yyterminate()
Definition: hlsl.yy.c:1110
register char * yy_cp
Definition: hlsl.yy.c:1159
FILE * hlsl_in
Definition: hlsl.yy.c:360
#define FIXME(fmt,...)
Definition: debug.h:110
#define pp
Definition: hlsl.yy.c:978
static yy_state_type yy_try_NUL_trans(yy_state_type current_state)
Definition: hlsl.yy.c:2267
int yy_state_type
Definition: macro.lex.yy.c:340
#define EOB_ACT_LAST_MATCH
Definition: hlsl.yy.c:187
static yyconst flex_int16_t yy_base[725]
Definition: hlsl.yy.c:522
#define OP_NE
Definition: query.h:43
_Check_return_ _CRTIMP int __cdecl sscanf(_In_z_ const char *_Src, _In_z_ _Scanf_format_string_ const char *_Format,...)
#define BEGIN
Definition: hlsl.yy.c:145
#define pp_ignore
Definition: hlsl.yy.c:981
static yyconst flex_int32_t yy_ec[256]
Definition: hlsl.yy.c:478
#define EOB_ACT_END_OF_FILE
Definition: hlsl.yy.c:186
#define TRACE(s)
Definition: solgame.cpp:4
static char * d3dcompiler_strdup(const char *string)
#define YY_CURRENT_BUFFER_LVALUE
Definition: hlsl.yy.c:290
#define YY_START
Definition: hlsl.yy.c:151
#define YY_RULE_SETUP
Definition: hlsl.yy.c:1148
#define EOB_ACT_CONTINUE_SCAN
Definition: hlsl.yy.c:185
#define STRING(String)
static yyconst flex_int16_t yy_chk[1011]
Definition: hlsl.yy.c:805
#define OP_LE
Definition: query.h:41
FLOAT floatval
Definition: hlsl.tab.c:1107
struct hlsl_parse_ctx hlsl_ctx
Definition: hlsl.tab.c:87
register int yy_act
Definition: hlsl.yy.c:1160
YYSTYPE hlsl_lval
BOOL find_function(const char *name) DECLSPEC_HIDDEN
Definition: utils.c:855
#define YY_BUFFER_NORMAL
Definition: hlsl.yy.c:256
INT intval
Definition: hlsl.tab.c:1106
static void set_parse_status(enum parse_status *current, enum parse_status update)
#define ECHO
Definition: hlsl.yy.c:1066
#define YY_BREAK
Definition: hlsl.yy.c:1145
static yyconst flex_int16_t yy_nxt[1011]
Definition: hlsl.yy.c:690
char string[160]
Definition: util.h:11
register char * yy_bp
Definition: hlsl.yy.c:1159
static yy_state_type yy_last_accepting_state
Definition: hlsl.yy.c:920
static char * yy_c_buf_p
Definition: hlsl.yy.c:298
#define INITIAL
Definition: hlsl.yy.c:977
#define YY_RESTORE_YY_MORE_OFFSET
Definition: hlsl.yy.c:932
static yyconst flex_int16_t yy_def[725]
Definition: hlsl.yy.c:606
#define OP_OR
Definition: query.h:38
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
static int yy_get_next_buffer(void)
Definition: hlsl.yy.c:2100
struct hlsl_type * get_type(struct hlsl_scope *scope, const char *name, BOOL recursive) DECLSPEC_HIDDEN
Definition: utils.c:844
#define hlsl_wrap()
Definition: hlsl.yy.c:355
#define pp_pragma
Definition: hlsl.yy.c:980
#define YY_STATE_EOF(state)
Definition: hlsl.yy.c:155
#define pp_line
Definition: hlsl.yy.c:979
#define YY_FATAL_ERROR(msg)
Definition: hlsl.yy.c:1120
static yy_size_t yy_n_chars
Definition: hlsl.yy.c:294
#define YY_NEW_FILE
Definition: hlsl.yy.c:158
char * hlsl_text
Definition: hlsl.yy.c:933
static yyconst flex_int32_t yy_meta[72]
Definition: hlsl.yy.c:510
#define YY_AT_BOL()
Definition: hlsl.yy.c:351
#define YY_DO_BEFORE_ACTION
Definition: hlsl.yy.c:379
static int yy_start
Definition: hlsl.yy.c:300
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( hlsl_parser  )

◆ yy_fatal_error() [1/2]

static void yy_fatal_error ( yyconst char  msg[])
static

◆ yy_fatal_error() [2/2]

static void yy_fatal_error ( yyconst char msg)
static

Definition at line 2719 of file hlsl.yy.c.

2720 {
2721  (void) fprintf( stderr, "%s\n", msg );
2722  exit( YY_EXIT_FAILURE );
2723 }
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
#define YY_EXIT_FAILURE
Definition: hlsl.yy.c:2716
#define msg(x)
Definition: auth_time.c:54
FILE * stderr
void exit(int exitcode)
Definition: _exit.c:33

◆ yy_get_next_buffer()

static int yy_get_next_buffer ( void  )
static

Definition at line 2100 of file hlsl.yy.c.

2101 {
2102  register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2103  register char *source = (yytext_ptr);
2104  register int number_to_move, i;
2105  int ret_val;
2106 
2107  if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
2109  "fatal flex scanner internal error--end of buffer missed" );
2110 
2111  if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2112  { /* Don't try to fill the buffer, so this is an EOF. */
2113  if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
2114  {
2115  /* We matched a single character, the EOB, so
2116  * treat this as a final EOF.
2117  */
2118  return EOB_ACT_END_OF_FILE;
2119  }
2120 
2121  else
2122  {
2123  /* We matched some text prior to the EOB, first
2124  * process it.
2125  */
2126  return EOB_ACT_LAST_MATCH;
2127  }
2128  }
2129 
2130  /* Try to read more data. */
2131 
2132  /* First move last chars to start of buffer. */
2133  number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
2134 
2135  for ( i = 0; i < number_to_move; ++i )
2136  *(dest++) = *(source++);
2137 
2138  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2139  /* don't do the read, it's not guaranteed to return an EOF,
2140  * just force an EOF
2141  */
2142  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
2143 
2144  else
2145  {
2146  yy_size_t num_to_read =
2147  YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2148 
2149  while ( num_to_read <= 0 )
2150  { /* Not enough room in the buffer - grow it. */
2151 
2152  /* just a shorter name for the current buffer */
2154 
2155  int yy_c_buf_p_offset =
2156  (int) ((yy_c_buf_p) - b->yy_ch_buf);
2157 
2158  if ( b->yy_is_our_buffer )
2159  {
2160  yy_size_t new_size = b->yy_buf_size * 2;
2161 
2162  if ( new_size <= 0 )
2163  b->yy_buf_size += b->yy_buf_size / 8;
2164  else
2165  b->yy_buf_size *= 2;
2166 
2167  b->yy_ch_buf = (char *)
2168  /* Include room in for 2 EOB chars. */
2169  hlsl_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
2170  }
2171  else
2172  /* Can't grow it, we don't own it. */
2173  b->yy_ch_buf = 0;
2174 
2175  if ( ! b->yy_ch_buf )
2177  "fatal error - scanner input buffer overflow" );
2178 
2179  (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
2180 
2181  num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2182  number_to_move - 1;
2183 
2184  }
2185 
2186  if ( num_to_read > YY_READ_BUF_SIZE )
2187  num_to_read = YY_READ_BUF_SIZE;
2188 
2189  /* Read in more data. */
2190  YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2191  (yy_n_chars), num_to_read );
2192 
2193  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2194  }
2195 
2196  if ( (yy_n_chars) == 0 )
2197  {
2198  if ( number_to_move == YY_MORE_ADJ )
2199  {
2200  ret_val = EOB_ACT_END_OF_FILE;
2202  }
2203 
2204  else
2205  {
2206  ret_val = EOB_ACT_LAST_MATCH;
2207  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2209  }
2210  }
2211 
2212  else
2213  ret_val = EOB_ACT_CONTINUE_SCAN;
2214 
2215  if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2216  /* Extend the array by 50%, plus the number we really need. */
2217  yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
2218  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) hlsl_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
2219  if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2220  YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2221  }
2222 
2223  (yy_n_chars) += number_to_move;
2226 
2227  (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2228 
2229  return ret_val;
2230 }
#define YY_INPUT(buf, result, max_size)
Definition: hlsl.yy.c:1073
#define YY_READ_BUF_SIZE
Definition: hlsl.yy.c:1058
size_t yy_size_t
Definition: macro.lex.yy.c:159
#define YY_MORE_ADJ
Definition: hlsl.yy.c:931
#define yytext_ptr
Definition: hlsl.yy.c:369
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
void hlsl_restart(FILE *input_file)
Definition: hlsl.yy.c:2371
FILE * hlsl_in
Definition: hlsl.yy.c:360
#define EOB_ACT_LAST_MATCH
Definition: hlsl.yy.c:187
#define EOB_ACT_END_OF_FILE
Definition: hlsl.yy.c:186
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define YY_CURRENT_BUFFER_LVALUE
Definition: hlsl.yy.c:290
#define EOB_ACT_CONTINUE_SCAN
Definition: hlsl.yy.c:185
#define YY_BUFFER_EOF_PENDING
Definition: hlsl.yy.c:267
#define YY_END_OF_BUFFER_CHAR
Definition: hlsl.yy.c:160
static char * yy_c_buf_p
Definition: hlsl.yy.c:298
void * hlsl_realloc(void *, yy_size_t)
Definition: hlsl.yy.c:2901
static char * dest
Definition: rtl.c:135
#define YY_FATAL_ERROR(msg)
Definition: hlsl.yy.c:1120
static yy_size_t yy_n_chars
Definition: hlsl.yy.c:294
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31

Referenced by while().

◆ yy_get_previous_state()

static yy_state_type yy_get_previous_state ( void  )
static

Definition at line 2234 of file hlsl.yy.c.

2235 {
2237  register char *yy_cp;
2238 
2241 
2242  for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2243  {
2244  register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2245  if ( yy_accept[yy_current_state] )
2246  {
2249  }
2250  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2251  {
2253  if ( yy_current_state >= 717 )
2254  yy_c = yy_meta[(unsigned int) yy_c];
2255  }
2256  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2257  }
2258 
2259  return yy_current_state;
2260 }
static yyconst flex_int16_t yy_accept[717]
Definition: hlsl.yy.c:395
unsigned char YY_CHAR
Definition: macro.lex.yy.c:336
static char * yy_last_accepting_cpos
Definition: hlsl.yy.c:921
#define yy_current_state()
Definition: ppl.yy.c:1235
#define YY_MORE_ADJ
Definition: hlsl.yy.c:931
#define YY_SC_TO_UI(c)
Definition: hlsl.yy.c:139
#define yytext_ptr
Definition: hlsl.yy.c:369
register char * yy_cp
Definition: hlsl.yy.c:1159
int yy_state_type
Definition: macro.lex.yy.c:340
static yyconst flex_int16_t yy_base[725]
Definition: hlsl.yy.c:522
static yyconst flex_int32_t yy_ec[256]
Definition: hlsl.yy.c:478
static yyconst flex_int16_t yy_chk[1011]
Definition: hlsl.yy.c:805
static yyconst flex_int16_t yy_nxt[1011]
Definition: hlsl.yy.c:690
static yy_state_type yy_last_accepting_state
Definition: hlsl.yy.c:920
static char * yy_c_buf_p
Definition: hlsl.yy.c:298
static yyconst flex_int16_t yy_def[725]
Definition: hlsl.yy.c:606
static yyconst flex_int32_t yy_meta[72]
Definition: hlsl.yy.c:510
#define YY_AT_BOL()
Definition: hlsl.yy.c:351
static int yy_start
Definition: hlsl.yy.c:300
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31

Referenced by while().

◆ yy_init_globals()

static int yy_init_globals ( void  )
static

Definition at line 2822 of file hlsl.yy.c.

2823 {
2824  /* Initialization is the same as for the non-reentrant scanner.
2825  * This function is called from hlsl_lex_destroy(), so don't allocate here.
2826  */
2827 
2828  (yy_buffer_stack) = 0;
2829  (yy_buffer_stack_top) = 0;
2830  (yy_buffer_stack_max) = 0;
2831  (yy_c_buf_p) = (char *) 0;
2832  (yy_init) = 0;
2833  (yy_start) = 0;
2834 
2835 /* Defined in main.c */
2836 #ifdef YY_STDINIT
2837  hlsl_in = stdin;
2838  hlsl_out = stdout;
2839 #else
2840  hlsl_in = (FILE *) 0;
2841  hlsl_out = (FILE *) 0;
2842 #endif
2843 
2844  /* For future reference: Set errno on error, since we are called by
2845  * hlsl_lex_init()
2846  */
2847  return 0;
2848 }
FILE * stdin
FILE * stdout
FILE * hlsl_in
Definition: hlsl.yy.c:360
static int yy_init
Definition: hlsl.yy.c:299
FILE * hlsl_out
Definition: hlsl.yy.c:360
static size_t yy_buffer_stack_top
Definition: hlsl.yy.c:273
static size_t yy_buffer_stack_max
Definition: hlsl.yy.c:274
static char * yy_c_buf_p
Definition: hlsl.yy.c:298
static YY_BUFFER_STATE * yy_buffer_stack
Definition: hlsl.yy.c:275
static int yy_start
Definition: hlsl.yy.c:300

Referenced by hlsl_lex_destroy().

◆ yy_try_NUL_trans()

static yy_state_type yy_try_NUL_trans ( yy_state_type  current_state)
static

Definition at line 2267 of file hlsl.yy.c.

2268 {
2269  register int yy_is_jam;
2270  register char *yy_cp = (yy_c_buf_p);
2271 
2272  register YY_CHAR yy_c = 1;
2273  if ( yy_accept[yy_current_state] )
2274  {
2277  }
2278  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2279  {
2281  if ( yy_current_state >= 717 )
2282  yy_c = yy_meta[(unsigned int) yy_c];
2283  }
2284  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2285  yy_is_jam = (yy_current_state == 716);
2286 
2287  return yy_is_jam ? 0 : yy_current_state;
2288 }
static yyconst flex_int16_t yy_accept[717]
Definition: hlsl.yy.c:395
unsigned char YY_CHAR
Definition: macro.lex.yy.c:336
static char * yy_last_accepting_cpos
Definition: hlsl.yy.c:921
#define yy_current_state()
Definition: ppl.yy.c:1235
register char * yy_cp
Definition: hlsl.yy.c:1159
static yyconst flex_int16_t yy_base[725]
Definition: hlsl.yy.c:522
static yyconst flex_int16_t yy_chk[1011]
Definition: hlsl.yy.c:805
static yyconst flex_int16_t yy_nxt[1011]
Definition: hlsl.yy.c:690
static yy_state_type yy_last_accepting_state
Definition: hlsl.yy.c:920
static char * yy_c_buf_p
Definition: hlsl.yy.c:298
static yyconst flex_int16_t yy_def[725]
Definition: hlsl.yy.c:606
static yyconst flex_int32_t yy_meta[72]
Definition: hlsl.yy.c:510
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31

Referenced by while().

Variable Documentation

◆ hlsl__flex_debug

int hlsl__flex_debug = 0

Definition at line 924 of file hlsl.yy.c.

Referenced by hlsl_get_debug(), and hlsl_set_debug().

◆ hlsl_in

◆ hlsl_leng

yy_size_t hlsl_leng

Definition at line 295 of file hlsl.yy.c.

Referenced by hlsl_get_leng().

◆ hlsl_lineno

int hlsl_lineno = 1

Definition at line 366 of file hlsl.yy.c.

Referenced by hlsl_get_lineno(), and hlsl_set_lineno().

◆ hlsl_out

FILE * hlsl_out = (FILE *) 0

Definition at line 360 of file hlsl.yy.c.

Referenced by hlsl_get_out(), hlsl_set_out(), if(), and yy_init_globals().

◆ hlsl_text

char * hlsl_text

Definition at line 933 of file hlsl.yy.c.

Referenced by hlsl_get_text(), and while().

◆ yy_accept

yyconst flex_int16_t yy_accept[717]
static

Definition at line 395 of file hlsl.yy.c.

Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().

◆ yy_act

register int yy_act

Definition at line 1160 of file hlsl.yy.c.

Referenced by while().

◆ yy_base

yyconst flex_int16_t yy_base[725]
static

Definition at line 522 of file hlsl.yy.c.

Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().

◆ yy_bp

register char * yy_bp

Definition at line 1159 of file hlsl.yy.c.

Referenced by while().

◆ yy_buffer_stack

YY_BUFFER_STATE* yy_buffer_stack = 0
static

Stack as an array.

Definition at line 275 of file hlsl.yy.c.

Referenced by hlsl_ensure_buffer_stack(), hlsl_lex_destroy(), and yy_init_globals().

◆ yy_buffer_stack_max

size_t yy_buffer_stack_max = 0
static

capacity of stack.

Definition at line 274 of file hlsl.yy.c.

Referenced by hlsl_ensure_buffer_stack(), and yy_init_globals().

◆ yy_buffer_stack_top

size_t yy_buffer_stack_top = 0
static

index of top of stack.

Definition at line 273 of file hlsl.yy.c.

Referenced by hlsl_ensure_buffer_stack(), hlsl_pop_buffer_state(), hlsl_push_buffer_state(), and yy_init_globals().

◆ yy_c_buf_p

◆ yy_chk

yyconst flex_int16_t yy_chk[1011]
static

Definition at line 805 of file hlsl.yy.c.

Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().

◆ yy_cp

register char* yy_cp

Definition at line 1159 of file hlsl.yy.c.

Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().

◆ YY_DECL

YY_DECL
Initial value:
{
#define yy_current_state()
Definition: ppl.yy.c:1235
int yy_state_type
Definition: macro.lex.yy.c:340

The main scanner function which does all the work.

Definition at line 1157 of file hlsl.yy.c.

◆ yy_def

yyconst flex_int16_t yy_def[725]
static

Definition at line 606 of file hlsl.yy.c.

Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().

◆ yy_did_buffer_switch_on_eof

int yy_did_buffer_switch_on_eof
static

◆ yy_ec

yyconst flex_int32_t yy_ec[256]
static

Definition at line 478 of file hlsl.yy.c.

Referenced by while(), and yy_get_previous_state().

◆ yy_hold_char

char yy_hold_char
static

◆ yy_init

int yy_init = 0
static

Definition at line 299 of file hlsl.yy.c.

Referenced by if(), and yy_init_globals().

◆ yy_last_accepting_cpos

char* yy_last_accepting_cpos
static

Definition at line 921 of file hlsl.yy.c.

Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().

◆ yy_last_accepting_state

yy_state_type yy_last_accepting_state
static

Definition at line 920 of file hlsl.yy.c.

Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().

◆ yy_meta

yyconst flex_int32_t yy_meta[72]
static
Initial value:
=
{ 0,
1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 3, 3, 3, 3,
3, 3, 1, 1, 1, 1, 1, 3, 3, 3,
3, 3, 3, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 3, 3, 3, 3, 3, 3,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
1
}

Definition at line 510 of file hlsl.yy.c.

Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().

◆ yy_n_chars

◆ yy_nxt

yyconst flex_int16_t yy_nxt[1011]
static

Definition at line 690 of file hlsl.yy.c.

Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().

◆ yy_start

int yy_start = 0
static

Definition at line 300 of file hlsl.yy.c.

Referenced by if(), while(), yy_get_previous_state(), and yy_init_globals().