[Mesa-dev] [PATCH 3/5] glsl: rename VERSION to VERSION_TOK for automake

Ian Romanick idr at freedesktop.org
Wed Jan 4 11:54:47 PST 2012


On 12/23/2011 04:21 PM, Matt Turner wrote:
> Signed-off-by: Matt Turner<mattst88 at gmail.com>

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

> ---
>   src/glsl/glsl_lexer.ll  |    2 +-
>   src/glsl/glsl_parser.yy |    4 ++--
>   2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/glsl/glsl_lexer.ll b/src/glsl/glsl_lexer.ll
> index c7cfedd..936a907 100644
> --- a/src/glsl/glsl_lexer.ll
> +++ b/src/glsl/glsl_lexer.ll
> @@ -148,7 +148,7 @@ HASH		^{SPC}#{SPC}
>
>       /* Preprocessor tokens. */
>   ^[ \t]*#[ \t]*$			;
> -^[ \t]*#[ \t]*version		{ BEGIN PP; return VERSION; }
> +^[ \t]*#[ \t]*version		{ BEGIN PP; return VERSION_TOK; }
>   ^[ \t]*#[ \t]*extension		{ BEGIN PP; return EXTENSION; }
>   {HASH}line{SPCP}{INT}{SPCP}{INT}{SPC}$ {
>   				   /* Eat characters until the first digit is
> diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
> index 8a0377f..e774b46 100644
> --- a/src/glsl/glsl_parser.yy
> +++ b/src/glsl/glsl_parser.yy
> @@ -118,7 +118,7 @@ static void yyerror(YYLTYPE *loc, _mesa_glsl_parse_state *st, const char *msg)
>   %token INVARIANT
>   %token LOWP MEDIUMP HIGHP SUPERP PRECISION
>
> -%token VERSION EXTENSION LINE COLON EOL INTERFACE OUTPUT
> +%token VERSION_TOK EXTENSION LINE COLON EOL INTERFACE OUTPUT
>   %token PRAGMA_DEBUG_ON PRAGMA_DEBUG_OFF
>   %token PRAGMA_OPTIMIZE_ON PRAGMA_OPTIMIZE_OFF
>   %token PRAGMA_INVARIANT_ALL
> @@ -246,7 +246,7 @@ translation_unit:
>
>   version_statement:
>   	/* blank - no #version specified: defaults are already set */
> -	| VERSION INTCONSTANT EOL
> +	| VERSION_TOK INTCONSTANT EOL
>   	{
>   	   bool supported = false;
>



More information about the mesa-dev mailing list