The {HASH} alias is identical to the open-coded regular expressions being
replaced here, so no behavioral change, (just easier-to-read code).
---
 src/glsl/glsl_lexer.ll |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/glsl/glsl_lexer.ll b/src/glsl/glsl_lexer.ll
index 2f66c58..4fca4ea 100644
--- a/src/glsl/glsl_lexer.ll
+++ b/src/glsl/glsl_lexer.ll
@@ -166,9 +166,9 @@ HASH                ^{SPC}#{SPC}
 [ \r\t]+               ;
 
     /* Preprocessor tokens. */ 
-^[ \t]*#[ \t]*$                        ;
-^[ \t]*#[ \t]*version          { BEGIN PP; return VERSION_TOK; }
-^[ \t]*#[ \t]*extension                { BEGIN PP; return EXTENSION; }
+{HASH}$                                ;
+{HASH}version                  { BEGIN PP; return VERSION_TOK; }
+{HASH}extension                        { BEGIN PP; return EXTENSION; }
 {HASH}line{SPCP}{INT}{SPCP}{INT}{SPC}$ {
                                   /* Eat characters until the first digit is
                                    * encountered
-- 
1.7.10

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to