version 1.13, 2015/11/27 21:10:17 |
version 1.14, 2015/12/04 09:41:49 |
|
|
/* skip comments; NUL is allowed; no continuation */ |
/* skip comments; NUL is allowed; no continuation */ |
while ((c = getc(yyfp)) != '\n') |
while ((c = getc(yyfp)) != '\n') |
if (c == EOF) |
if (c == EOF) |
return 0; |
goto eof; |
yylval.colno = 0; |
yylval.colno = 0; |
yylval.lineno++; |
yylval.lineno++; |
return c; |
return c; |
case EOF: |
case EOF: |
return 0; |
goto eof; |
} |
} |
|
|
/* parsing next word */ |
/* parsing next word */ |
|
|
* the main loop. |
* the main loop. |
*/ |
*/ |
if (c == EOF) |
if (c == EOF) |
return 0; |
goto eof; |
else if (qpos == -1) /* accept, e.g., empty args: cmd foo args "" */ |
else if (qpos == -1) /* accept, e.g., empty args: cmd foo args "" */ |
goto repeat; |
goto repeat; |
} |
} |
|
|
err(1, "strdup"); |
err(1, "strdup"); |
yylval.str = str; |
yylval.str = str; |
return TSTRING; |
return TSTRING; |
|
|
|
eof: |
|
if (ferror(yyfp)) |
|
yyerror("input error reading config"); |
|
return 0; |
} |
} |