34 lines
471 B
Plaintext
34 lines
471 B
Plaintext
|
/*
|
||
|
* @(#) $Id: pwyacc.y,v 1.1.1.1 2001-11-25 00:41:16 lkarsten Exp $
|
||
|
*
|
||
|
* yacc source for parsing the configuration file
|
||
|
*
|
||
|
*/
|
||
|
|
||
|
%{
|
||
|
int yyerror(const char *msg);
|
||
|
int yylex(void);
|
||
|
int config_set_string_var(int var, const char *value);
|
||
|
%}
|
||
|
|
||
|
%token SET HOST USER PASSWORD STRING
|
||
|
|
||
|
%%
|
||
|
|
||
|
input: ;
|
||
|
input: statement input ;
|
||
|
|
||
|
statement: SET variable STRING ';'
|
||
|
{
|
||
|
$$ = config_set_string_var($2, (const char *)$3);
|
||
|
}
|
||
|
|
||
|
;
|
||
|
|
||
|
variable: USER | PASSWORD | HOST
|
||
|
{ $$ = $1; }
|
||
|
;
|
||
|
|
||
|
%%
|
||
|
|