From 77215e7e7babe73e5d959ab5ad82054a8d73c538 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 11 Aug 2010 17:01:31 -0700 Subject: glsl2: Emit error from lexer when illegal reserved word is encountered Without this, the parser will generate obtuse, useless error diagnostics when reservered word that are not used by the grammar are encountered in a shader. Fixes bugzilla #29519. --- src/glsl/glsl_parser.ypp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/glsl/glsl_parser.ypp') diff --git a/src/glsl/glsl_parser.ypp b/src/glsl/glsl_parser.ypp index 3e60454bb24..74971cfb9da 100644 --- a/src/glsl/glsl_parser.ypp +++ b/src/glsl/glsl_parser.ypp @@ -116,6 +116,8 @@ %token SAMPLER2DRECT SAMPLER3DRECT SAMPLER2DRECTSHADOW %token SIZEOF CAST NAMESPACE USING +%token ERROR_TOK + %token COMMON PARTITION ACTIVE SAMPLERBUFFER FILTER %token IMAGE1D IMAGE2D IMAGE3D IMAGECUBE IMAGE1DARRAY IMAGE2DARRAY %token IIMAGE1D IIMAGE2D IIMAGE3D IIMAGECUBE IIMAGE1DARRAY IIMAGE2DARRAY -- cgit v1.2.3