1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00

Don't ignore unknown characters. The previous code treated a line like:

hosts:!!!!!!!!@@@@@$%^&*()()*$(files{}{}|||++!)(dns

exactly the same as:

hosts: files dns

Recover from parse errors by looking for the end of a line; this
allows entries without errors to still be parsed even if there is
an erroneous entry earlier in the file.
This commit is contained in:
Bill Fenner 2001-11-07 00:05:26 +00:00
parent 33b6e7aabe
commit 70982dca88
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=86162
2 changed files with 5 additions and 3 deletions

View File

@ -94,9 +94,7 @@ STRING [a-zA-Z][a-zA-Z0-9_]*
return STRING;
}
[:=\[\]] return yytext[0];
. ; /* ignore all else */
. return yytext[0];
%%

View File

@ -87,6 +87,10 @@ Entry
{
_nsdbtput(&curdbt);
}
| error NL
{
yyerrok;
}
;
Database