At each version of GLSL there are a number of words reserved for future use (see section 3.6 in the GLSL spec). The lexer processes these and generates tokens for them. Upon encountering these tokens, the parse will generate error messages that are not useful. For example, using the keyword "half" for a function name in a GLSL 1.10 shader results in the diagnostic: error: 0:3(1): error: empty declaration list A better message would be: error: 0:3(1): error: invalid use of reserved word `half'
Fixed by: commit db36e88052918ad383c3acdd24f2b9864e240ddb Author: Ian Romanick <ian.d.romanick@intel.com> Date: Wed Aug 11 17:03:37 2010 -0700 glsl2: Commit generated files changed by previous commit commit 77215e7e7babe73e5d959ab5ad82054a8d73c538 Author: Ian Romanick <ian.d.romanick@intel.com> Date: Wed Aug 11 17:01:31 2010 -0700 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.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.