aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-11-29 09:05:13 +0100
committermarha <marha@users.sourceforge.net>2012-11-29 09:05:49 +0100
commit0831039c0d449a3b5874c12ee365a8d5d2be7b8c (patch)
tree4edb707b79145f619fefc18c2359659ca660612f /mesalib/src/glsl
parent6bc629065956c81d836bbdb12f5f580d8a3db8e5 (diff)
parentd2d73da59e64acdc4718e4e6790a69d967bee875 (diff)
downloadvcxsrv-0831039c0d449a3b5874c12ee365a8d5d2be7b8c.tar.gz
vcxsrv-0831039c0d449a3b5874c12ee365a8d5d2be7b8c.tar.bz2
vcxsrv-0831039c0d449a3b5874c12ee365a8d5d2be7b8c.zip
Merge remote-tracking branch 'origin/released'
* origin/released: fontconfig xserver mesa git update 29 nov 2012 Conflicts: xorg-server/dix/dispatch.c xorg-server/hw/xwin/InitOutput.c xorg-server/hw/xwin/ddraw.h xorg-server/hw/xwin/glx/indirect.c xorg-server/hw/xwin/winclipboardthread.c xorg-server/hw/xwin/winclipboardxevents.c xorg-server/hw/xwin/winengine.c xorg-server/hw/xwin/winerror.c xorg-server/hw/xwin/winglobals.c xorg-server/hw/xwin/winkeybd.c xorg-server/hw/xwin/winmultiwindowwm.c xorg-server/hw/xwin/winmultiwindowwndproc.c xorg-server/hw/xwin/winprocarg.c xorg-server/hw/xwin/winwin32rootless.c xorg-server/hw/xwin/winwindow.h xorg-server/os/osinit.c xorg-server/os/utils.c
Diffstat (limited to 'mesalib/src/glsl')
-rw-r--r--mesalib/src/glsl/glcpp/glcpp-lex.l6
-rw-r--r--mesalib/src/glsl/glsl_parser.yy7
2 files changed, 9 insertions, 4 deletions
diff --git a/mesalib/src/glsl/glcpp/glcpp-lex.l b/mesalib/src/glsl/glcpp/glcpp-lex.l
index 783c54549..fd28711d1 100644
--- a/mesalib/src/glsl/glcpp/glcpp-lex.l
+++ b/mesalib/src/glsl/glcpp/glcpp-lex.l
@@ -120,7 +120,7 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]?
return SPACE;
}
-{HASH}version {
+{HASH}version{HSPACE}+ {
yylval->str = ralloc_strdup (yyextra, yytext);
yyextra->space_tokens = 0;
return HASH_VERSION;
@@ -135,7 +135,7 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]?
return OTHER;
}
-{HASH}line {
+{HASH}line{HSPACE}+ {
return HASH_LINE;
}
@@ -158,7 +158,7 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]?
return HASH_IF;
}
-{HASH}elif {
+{HASH}elif/[^_a-zA-Z0-9] {
yyextra->lexing_if = 1;
yyextra->space_tokens = 0;
return HASH_ELIF;
diff --git a/mesalib/src/glsl/glsl_parser.yy b/mesalib/src/glsl/glsl_parser.yy
index a0665067d..407dbbeeb 100644
--- a/mesalib/src/glsl/glsl_parser.yy
+++ b/mesalib/src/glsl/glsl_parser.yy
@@ -238,6 +238,7 @@ static void yyerror(YYLTYPE *loc, _mesa_glsl_parse_state *st, const char *msg)
%type <node> conditionopt
%type <node> for_init_statement
%type <for_rest_statement> for_rest_statement
+%type <n> integer_constant
%%
translation_unit:
@@ -1122,6 +1123,10 @@ layout_qualifier_id_list:
}
;
+integer_constant:
+ INTCONSTANT { $$ = $1; }
+ | UINTCONSTANT { $$ = $1; }
+
layout_qualifier_id:
any_identifier
{
@@ -1191,7 +1196,7 @@ layout_qualifier_id:
YYERROR;
}
}
- | any_identifier '=' INTCONSTANT
+ | any_identifier '=' integer_constant
{
memset(& $$, 0, sizeof($$));