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:
fenner 2001-11-07 00:05:26 +00:00
parent 140b89bb77
commit a53b61e772
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