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:
parent
140b89bb77
commit
a53b61e772
@ -94,9 +94,7 @@ STRING [a-zA-Z][a-zA-Z0-9_]*
|
||||
return STRING;
|
||||
}
|
||||
|
||||
[:=\[\]] return yytext[0];
|
||||
|
||||
. ; /* ignore all else */
|
||||
. return yytext[0];
|
||||
|
||||
%%
|
||||
|
||||
|
@ -87,6 +87,10 @@ Entry
|
||||
{
|
||||
_nsdbtput(&curdbt);
|
||||
}
|
||||
| error NL
|
||||
{
|
||||
yyerrok;
|
||||
}
|
||||
;
|
||||
|
||||
Database
|
||||
|
Loading…
Reference in New Issue
Block a user