aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/program/program_parse.y
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-08-01 13:25:23 +0200
committermarha <marha@users.sourceforge.net>2013-08-01 13:25:23 +0200
commitc3d3ea464f7f4e53e8fe3e11ecada36cb209ba4d (patch)
treef86937d9126b2d543ffd13f861a1271f48bd69e6 /mesalib/src/mesa/program/program_parse.y
parentacad661e29a4f09d06f829fdfea949814da57da6 (diff)
parent0659c77949b38440a2a9ba67e1ee9cacef1f3a7f (diff)
downloadvcxsrv-c3d3ea464f7f4e53e8fe3e11ecada36cb209ba4d.tar.gz
vcxsrv-c3d3ea464f7f4e53e8fe3e11ecada36cb209ba4d.tar.bz2
vcxsrv-c3d3ea464f7f4e53e8fe3e11ecada36cb209ba4d.zip
Merge remote-tracking branch 'origin/released'
* origin/released: libX11 mesa xserver xkeyboard-config git update 1 aug 2013
Diffstat (limited to 'mesalib/src/mesa/program/program_parse.y')
-rw-r--r--mesalib/src/mesa/program/program_parse.y20
1 files changed, 13 insertions, 7 deletions
diff --git a/mesalib/src/mesa/program/program_parse.y b/mesalib/src/mesa/program/program_parse.y
index e2da63347..a76db4e86 100644
--- a/mesalib/src/mesa/program/program_parse.y
+++ b/mesalib/src/mesa/program/program_parse.y
@@ -98,7 +98,7 @@ static struct asm_instruction *asm_instruction_copy_ctor(
#define YYLLOC_DEFAULT(Current, Rhs, N) \
do { \
- if (YYID(N)) { \
+ if (N) { \
(Current).first_line = YYRHSLOC(Rhs, 1).first_line; \
(Current).first_column = YYRHSLOC(Rhs, 1).first_column; \
(Current).position = YYRHSLOC(Rhs, 1).position; \
@@ -112,16 +112,14 @@ static struct asm_instruction *asm_instruction_copy_ctor(
(Current).position = YYRHSLOC(Rhs, 0).position \
+ (Current).first_column; \
} \
- } while(YYID(0))
-
-#define YYLEX_PARAM state->scanner
+ } while(0)
%}
%pure-parser
%locations
+%lex-param { struct asm_parser_state *state }
%parse-param { struct asm_parser_state *state }
%error-verbose
-%lex-param { void *scanner }
%union {
struct asm_instruction *inst;
@@ -269,8 +267,16 @@ static struct asm_instruction *asm_instruction_copy_ctor(
%type <negate> optionalSign
%{
-extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param,
- void *yyscanner);
+extern int
+_mesa_program_lexer_lex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param,
+ void *yyscanner);
+
+static int
+yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param,
+ struct asm_parser_state *state)
+{
+ return _mesa_program_lexer_lex(yylval_param, yylloc_param, state->scanner);
+}
%}
%%