summary refs log tree commit diff
path: root/bin/hilex.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/hilex.c')
-rw-r--r--bin/hilex.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/hilex.c b/bin/hilex.c
index afcc5000..a5c682ac 100644
--- a/bin/hilex.c
+++ b/bin/hilex.c
@@ -35,6 +35,14 @@ static const char *Class[] = {
 #undef X
 };
 
+static FILE *yyin;
+static char *yytext;
+static int yylex(void) {
+	static size_t cap = 0;
+	return (getline(&yytext, &cap, yyin) < 0 ? None : Normal);
+}
+static const struct Lexer LexText = { yylex, &yyin, &yytext };
+
 static const struct {
 	const struct Lexer *lexer;
 	const char *name;