From 9210e03bbc515d6447b7f777524b706e89be5245 Mon Sep 17 00:00:00 2001 From: Erik Mackdanz Date: Thu, 21 Sep 2017 22:29:39 +0000 Subject: [PATCH] Fix so that comments can go elsewhere in input file --- src/lex.l | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/lex.l b/src/lex.l index 2e6cf4d..864b130 100644 --- a/src/lex.l +++ b/src/lex.l @@ -4,6 +4,8 @@ #include "lex.h" #define MAX_FILENAME_LEN 64 + int comment_caller; + qn_config_t* config = NULL; char filename[MAX_FILENAME_LEN+1]; @@ -182,9 +184,13 @@ RUNSPEC once|loop BEGIN(INITIAL); } -# BEGIN(comment); - -\n BEGIN(INITIAL); +# { + comment_caller = YY_START; + BEGIN(comment); +} +\n { + BEGIN(comment_caller); +} .* pattern { -- 2.11.4.GIT