"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "zlexer.lex" between
nsd-4.3.5.tar.gz and nsd-4.3.6.tar.gz

About: NSD is an authoritative only, high performance, simple name server daemon.

zlexer.lex  (nsd-4.3.5):zlexer.lex  (nsd-4.3.6)
skipping to change at line 133 skipping to change at line 133
#endif #endif
#ifndef YY_NO_INPUT #ifndef YY_NO_INPUT
#define YY_NO_INPUT 1 #define YY_NO_INPUT 1
#endif #endif
%} %}
SPACE [ \t] SPACE [ \t]
LETTER [a-zA-Z] LETTER [a-zA-Z]
NEWLINE [\n\r] NEWLINE [\n\r]
ZONESTR [^ \t\n\r();.\"\$]|\\.|\\\n ZONESTR [^ \t\n\r();.\"\$]|\\.|\\\n
CHARSTR [^ \t\n\r();.]|\\.|\\\n CHARSTR [^ \t\n\r();.\"]|\\.|\\\n
QUOTE \" QUOTE \"
DOLLAR \$ DOLLAR \$
COMMENT ; COMMENT ;
DOT \. DOT \.
BIT [^\]\n]|\\. BIT [^\]\n]|\\.
ANY [^\"\n\\]|\\. ANY [^\"\n\\]|\\.
ANYNOSPC [^\"\n\\ \t]|\\.
%x incl bitlabel quotedstring %x incl bitlabel quotedstring
%% %%
{SPACE}*{COMMENT}.* /* ignore */ {SPACE}*{COMMENT}.* /* ignore */
^{DOLLAR}TTL { lexer_state = PARSING_RDATA; return DOLLAR_TTL; } ^{DOLLAR}TTL { lexer_state = PARSING_RDATA; return DOLLAR_TTL; }
^{DOLLAR}ORIGIN { lexer_state = PARSING_RDATA; return DOLLAR_ORIGIN; } ^{DOLLAR}ORIGIN { lexer_state = PARSING_RDATA; return DOLLAR_ORIGIN; }
/* /*
* Handle $INCLUDE directives. See * Handle $INCLUDE directives. See
skipping to change at line 315 skipping to change at line 314
} }
/* Quoted strings. Strip leading and ending quotes. */ /* Quoted strings. Strip leading and ending quotes. */
{QUOTE} { BEGIN(quotedstring); LEXOUT(("\" ")); } {QUOTE} { BEGIN(quotedstring); LEXOUT(("\" ")); }
<quotedstring><<EOF>> { <quotedstring><<EOF>> {
zc_error("EOF inside quoted string"); zc_error("EOF inside quoted string");
BEGIN(INITIAL); BEGIN(INITIAL);
yyrestart(yyin); /* this is so that lex does not give an internal err */ yyrestart(yyin); /* this is so that lex does not give an internal err */
yyterminate(); yyterminate();
} }
<quotedstring>{ANY}* { LEXOUT(("STR ")); yymore(); } <quotedstring>{ANY}* { LEXOUT(("QSTR ")); yymore(); }
<quotedstring>\n { ++parser->line; yymore(); } <quotedstring>\n { ++parser->line; yymore(); }
<quotedstring>{QUOTE}{ANYNOSPC}{ANYNOSPC}* {
/* for strings like "abc"def */
char* qt;
LEXOUT(("\" "));
BEGIN(INITIAL);
for(qt=yytext; *qt!=0; qt++) {
if(qt[0]=='"') {
/* (unescaped) character is quote */
break;
}
if(qt[0] == '\\' && qt[1] == '\\') {
/* escaped backslash, skip that backslash */
qt+=1;
continue;
}
if(qt[0] == '\\' && qt[1] == '"') {
/* escaped quote, skip that quote */
qt+=1;
continue;
}
}
assert(qt);
assert(*qt=='"');
/* remove middle quote */
if(qt[1] != 0)
memmove(qt, qt+1, strlen(qt+1));
yytext[yyleng - 1] = '\0';
return parse_token(STR, yytext, &lexer_state);
}
<quotedstring>{QUOTE} { <quotedstring>{QUOTE} {
LEXOUT(("\" ")); LEXOUT(("\" "));
BEGIN(INITIAL); BEGIN(INITIAL);
yytext[yyleng - 1] = '\0'; yytext[yyleng - 1] = '\0';
return parse_token(STR, yytext, &lexer_state); return parse_token(QSTR, yytext, &lexer_state);
} }
{ZONESTR}({CHARSTR})* { {ZONESTR}({CHARSTR})* {
/* Any allowed word. */ /* Any allowed word. */
return parse_token(STR, yytext, &lexer_state); return parse_token(STR, yytext, &lexer_state);
} }
. { . {
zc_error("unknown character '%c' (\\%03d) seen - is this a zonefile?", zc_error("unknown character '%c' (\\%03d) seen - is this a zonefile?",
(int) yytext[0], (int) yytext[0]); (int) yytext[0], (int) yytext[0]);
} }
 End of changes. 5 change blocks. 
33 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)