chiark / gitweb /
@@ -7,7 +7,7 @@
[userv.git] / lexer.l
diff --git a/lexer.l b/lexer.l
index 388089a764770904b091aa31e2517734632c678d..f3a2957dfc1b5f6d3e4bf194bc0eb13c2c8113c7 100644 (file)
--- a/lexer.l
+++ b/lexer.l
@@ -43,6 +43,7 @@
 #include "common.h"
 #include "daemon.h"
 #include "lib.h"
+#include "both.h"
 #include "tokens.h"
 
 #define HYPHEN '-'
@@ -264,7 +265,8 @@ error { lr_dir= df_error; lr_loglevel= LOG_ERR; return tokv_word_error; }
                          lr_max=-1;
                          return tokv_fdstoend;
                        }
-[\ \t]+                        return tokv_lwsp;
+([\ \t]*\\[\ \t]*\n[\ \t]*)+   return tokv_lwsp;
+[\ \t]+                                return tokv_lwsp;
 [\ \t]*\n              cstate->lineno++; return tokv_newline;
 [\ \t]*\#[^\n]*\n      cstate->lineno++; return tokv_newline;
 [\ \t]*\#[^\n]*                {
@@ -278,7 +280,7 @@ error { lr_dir= df_error; lr_loglevel= LOG_ERR; return tokv_word_error; }
                          parseerrprint("misquoted or unterminated string");
                          return tokv_error;
                        }
-[^\ \t\n]+             return tokv_barestring;
+[^\ \t\n\\]+           return tokv_barestring;
 <<EOF>>                        return tokv_eof;