From 80e9301d9be3f1fd85803a1fe5d9c6ac899e4e19 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Tue, 1 Jul 2014 14:55:56 -0700 Subject: [PATCH] glsl/glcpp: Alphabetize lists of start conditions MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit There is no behavioral change here. It's just easier to verify that lists of start conditions include all expected conditions when they appear in a consistent order. The state is special, so it appears first in all lists. All others appear in alphabetical order. Reviewed-by: Kenneth Graunke Reviewed-by: Kristian Høgsberg --- src/glsl/glcpp/glcpp-lex.l | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/glsl/glcpp/glcpp-lex.l b/src/glsl/glcpp/glcpp-lex.l index 1c3e0ab252d..f95e6a3919d 100644 --- a/src/glsl/glcpp/glcpp-lex.l +++ b/src/glsl/glcpp/glcpp-lex.l @@ -165,7 +165,7 @@ glcpp_lex_update_state_per_token (glcpp_parser_t *parser, int token) * update the "Internal compiler error" catch-all rule near the end of * this file. */ -%x DONE COMMENT HASH UNREACHABLE DEFINE NEWLINE_CATCHUP +%x COMMENT DEFINE DONE HASH NEWLINE_CATCHUP UNREACHABLE SPACE [[:space:]] NONSPACE [^[:space:]] @@ -253,7 +253,7 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]? } /* Multi-line comments */ -"/*" { yy_push_state(COMMENT, yyscanner); } +"/*" { yy_push_state(COMMENT, yyscanner); } [^*\r\n]* [^*\r\n]*[\r\n] { yylineno++; yycolumn = 0; parser->commented_newlines++; } "*"+[^*/\r\n]* @@ -543,7 +543,7 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]? * rule, then we have made a mistake above and need to fix one or more * of the preceding patterns to match that input. */ -. { +. { glcpp_error(yylloc, yyextra, "Internal compiler error: Unexpected character: %s", yytext); } -- 2.30.2