summaryrefslogtreecommitdiffstats
path: root/src/cfg_file.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/cfg_file.l')
-rw-r--r--src/cfg_file.l5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cfg_file.l b/src/cfg_file.l
index 3224b4fde..8d347409f 100644
--- a/src/cfg_file.l
+++ b/src/cfg_file.l
@@ -11,7 +11,7 @@
#ifdef WITH_LUA
#include "lua.h"
#else
-#define add_luabuf(x) yyerror ("lua support diabled"); YYERROR
+#define add_luabuf(x) yyerror ("lua support diabled")
#endif
#define MAX_INCLUDE_DEPTH 10
@@ -157,6 +157,9 @@ yes|YES|no|NO|[yY]|[nN] yylval.flag=parse_flag(yytext); return FLAG;
<module>\$[a-zA-Z_][a-zA-Z0-9_]+ yylval.string=strdup(yytext + 1); return VARIABLE;
<module>\".+[^\\]\" yylval.string=strdup(yytext + 1); yylval.string[strlen(yylval.string) - 1] = '\0'; unescape_quotes(yylval.string); return QUOTEDSTRING;
+<lua>\n /* ignore EOL */;
+<lua>[ \t]+ /* ignore whitespace */;
+<lua>[ \t]*#.* /* ignore comments */;
<lua>^.endlua$ BEGIN(INITIAL);
<lua>.* add_luabuf(yytext);