2 dnl lexer, passed through m4 with defs from langauge.i4
4 * Copyright (C)1996-1997 Ian Jackson
6 * This is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with userv; if not, write to the Free Software
18 * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
47 static int lineno, atnewline, notedreferer;
48 static int dequote(char *inplace);
57 [\ \t]+ return tokv_lwsp;
58 [\ \t]*\n atnewline= 1; lineno++; return tokv_newline;
59 [\ \t]*\#[^\n]*\n atnewline= 1; lineno++; return tokv_newline;
60 [\ \t]*\#[^\n]* atnewline= 0; parseerrprint("missing newline at eof after comment"); return tokv_error;
61 [^\ \t\n]+ atnewline= 0; return tokv_barestring;
62 <<EOF>> return tokv_eof;
63 \"([^\\\"\n]|\\[a-z]|\\[0-9]{3}|\\x[0-9a-f]{2}|\\[:punct:]|\\[ \t]*\n)*\" return dequote(yytext);
64 \".* atnewline= 0; parseerrprint("misquoted or unterminated string"); return tokv_error;