[Mesa-dev] [PATCH 03/10] glsl: Use {HASH} expression consistently.
Carl Worth
cworth at cworth.org
Sat Dec 8 13:43:38 PST 2012
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
More information about the mesa-dev
mailing list