On Sun, Aug 23, 2009 at 08:37:21AM -0500, Manoj Srivastava wrote: > Hi, > > Do you have a small input file that demonstrates this, that I > can put up on the upstream BTS? If not, I can try and make one up.
Attached. It's the actual file that caused me to detect this problem; while it's not small, it should show you what's wrong. Reduction of the file is left as an exercise to the, er, maintainer. > manoj > ps: yes, I am lazy Me too ;-P -- The biometric identification system at the gates of the CIA headquarters works because there's a guard with a large gun making sure no one is trying to fool the system. http://www.schneier.com/blog/archives/2009/01/biometrics.html
/* * ---------------------------------------------------------------------------- * "THE BEER-WARE LICENSE" (Revision 42): * <[email protected]> wrote this software. As long as you retain this * notice you can do whatever you want with this stuff. If we meet some * day, and you think this stuff is worth it, you can buy me a beer in * return. Wouter Verhelst. * ---------------------------------------------------------------------------- * (with thanks to [email protected]) */ %{ #include <ipcfg/private/configparse.h> #include <ipcfg/cnode.h> #include "ipcfg-parser.h" %} %option noyywrap nounput batch yylineno %% action return ACTION; all return ALL; config return CONFIG; daemon return DAEMON; group return GROUP; fail return FAIL; if return IF; iface return IFACE; must return MUST; namespace return NAMESPACE; no return NO; one return ONE; plugins return PLUGINS; require return REQUIRE; test return TEST; trip return TRIP; want return WANT; \"[^\"]*\" { yylval.string = strdup(yytext+1); yylval.string[strlen(yylval.string)-1]='\0' ; return QUOTEDSTRING; } [[:space:]] /* ignore whitespace */ #.*$ /* ignore comments */ . return (int)yytext[0]; %% int yyerror(char* s) { return fprintf(stderr, SYSCONFDIR "/ipcfg/config: line %d: %s\n", yylineno, s); } int p_ipcfg_read_config(void) { if(!(yyin = fopen(SYSCONFDIR "/ipcfg/config", "r"))) { perror("Could not open config file"); exit(EXIT_FAILURE); } return p_ipcfg_parse(); }

