X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=lexer.l.m4;h=22ad0e0ead615ba0f4becb522d88a60c8e655b74;hb=949af4df9625f3371e146f7c78f4f1a17a2bf6db;hp=0b7e705f8f521ea57f2d3c84a7c65c27bcdbaad0;hpb=d9cedcfbd2194ff9046d71400cb7878085c26499;p=userv.git diff --git a/lexer.l.m4 b/lexer.l.m4 index 0b7e705..22ad0e0 100644 --- a/lexer.l.m4 +++ b/lexer.l.m4 @@ -1,7 +1,7 @@ dnl userv - lexer.l.m4 dnl lexer, passed through m4 with defs from langauge.i4 /* - * Copyright (C)1996-1997 Ian Jackson + * Copyright (C)1996-1997,1999 Ian Jackson * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by @@ -42,6 +42,7 @@ include(language.i4) #include "common.h" #include "daemon.h" #include "lib.h" +#include "both.h" #include "tokens.h" #define HYPHEN '-' @@ -171,25 +172,31 @@ changequote({*,*}) 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]* { parseerrprint("missing newline at eof after comment"); return tokv_error; } -[^\ \t\n]+ return tokv_barestring; -\"([^\\\"\n]|\\[a-z]|\\[0-9]{3}|\\x[0-9A-Fa-f]{2}|\\[:punct:]|\\[ \t]*\n)*\" { +\"([^\\\"\n]|\\[a-z]|\\[0-9]{3}|\\x[0-9A-Fa-f]{2}|\\[[:punct:]]|\\[ \t]*\n)*\" { return dequote(yytext); } \".* { parseerrprint("misquoted or unterminated string"); return tokv_error; } +[^\ \t\n\\]+ return tokv_barestring; <> return tokv_eof; *} changequote(`,') %% + +const char *const builtinservicehelpstrings[]= { +undivert(5)dnl + 0 +}; ` #include "parser.c" '