summaryrefslogtreecommitdiffstats
path: root/glcpp/glcpp-lex.l
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2010-06-16 12:01:17 -0700
committerKenneth Graunke <[email protected]>2010-06-21 11:25:50 -0700
commit1b1f43e6089bf1f78e8ff19b43a649b931fe4e31 (patch)
treead99d3f2b447043eaa827c6030f15ecec0bdb2bf /glcpp/glcpp-lex.l
parent4c8a1af8117ac8e69883c6ef88d3f3b073dc6e0a (diff)
glcpp: Add support for lexing from a string.
The standalone binary still reads from stdin, however.
Diffstat (limited to 'glcpp/glcpp-lex.l')
-rw-r--r--glcpp/glcpp-lex.l6
1 files changed, 6 insertions, 0 deletions
diff --git a/glcpp/glcpp-lex.l b/glcpp/glcpp-lex.l
index cc5f28f8f86..f736ac4d59d 100644
--- a/glcpp/glcpp-lex.l
+++ b/glcpp/glcpp-lex.l
@@ -201,3 +201,9 @@ NON_STARS_THEN_STARS [^*]*[*]+
}
%%
+
+void
+glcpp_lex_set_source_string(glcpp_parser_t *parser, const char *shader)
+{
+ yy_scan_string(shader, parser->scanner);
+}